Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-gyp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4793e1dcb8f16182d6292fd2af579082fc11294f
Choose a base ref
...
head repository: nodejs/node-gyp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 33affe2fbf96d05b2a16acd5d0ecdc2d97ac9376
Choose a head ref
Loading
Showing with 32,135 additions and 26,833 deletions.
  1. +49 −0 .github/ISSUE_TEMPLATE.md
  2. +17 −0 .github/PULL_REQUEST_TEMPLATE.md
  3. +40 −0 .github/workflows/Python_tests.yml
  4. +3 −0 .gitignore
  5. +0 −7 .jshintrc
  6. +93 −0 .travis.yml
  7. +0 −35 0001-gyp-always-install-into-PRODUCT_DIR.patch
  8. +0 −36 0002-gyp-apply-https-codereview.chromium.org-11361103.patch
  9. +0 −39 0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch
  10. +338 −0 CHANGELOG.md
  11. +34 −0 CONTRIBUTING.md
  12. +134 −110 README.md
  13. +74 −5 addon.gypi
  14. +17 −25 bin/node-gyp.js
  15. +4 −0 gyp/.flake8
  16. +31 −0 gyp/.github/workflows/Python_tests.yml
  17. +27 −0 gyp/.github/workflows/nodejs-windows.yml
  18. +143 −1 gyp/.gitignore
  19. +7 −3 gyp/AUTHORS
  20. +4 −0 gyp/CODE_OF_CONDUCT.md
  21. +32 −0 gyp/CONTRIBUTING.md
  22. +0 −24 gyp/DEPS
  23. +1 −0 gyp/LICENSE
  24. +0 −1 gyp/OWNERS
  25. +0 −137 gyp/PRESUBMIT.py
  26. +4 −0 gyp/README.md
  27. +0 −466 gyp/buildbot/aosp_manifest.xml
  28. +0 −136 gyp/buildbot/buildbot_run.py
  29. +0 −6 gyp/buildbot/commit_queue/OWNERS
  30. +0 −3 gyp/buildbot/commit_queue/README
  31. +0 −15 gyp/buildbot/commit_queue/cq_config.json
  32. +0 −10 gyp/codereview.settings
  33. 0 gyp/gyp.bat
  34. +40 −5 gyp/gyp_main.py
  35. +0 −274 gyp/gyptest.py
  36. +274 −244 gyp/pylib/gyp/MSVSNew.py
  37. +112 −114 gyp/pylib/gyp/MSVSProject.py
  38. +892 −714 gyp/pylib/gyp/MSVSSettings.py
  39. +1,473 −1,409 gyp/pylib/gyp/MSVSSettings_test.py
  40. +33 −32 gyp/pylib/gyp/MSVSToolFile.py
  41. +109 −103 gyp/pylib/gyp/MSVSUserFile.py
  42. +175 −174 gyp/pylib/gyp/MSVSUtil.py
  43. +461 −333 gyp/pylib/gyp/MSVSVersion.py
  44. +609 −466 gyp/pylib/gyp/__init__.py
  45. +437 −390 gyp/pylib/gyp/common.py
  46. +52 −46 gyp/pylib/gyp/common_test.py
  47. +92 −91 gyp/pylib/gyp/easy_xml.py
  48. +96 −87 gyp/pylib/gyp/easy_xml_test.py
  49. +36 −35 gyp/pylib/gyp/flock_tool.py
  50. +591 −523 gyp/pylib/gyp/generator/analyzer.py
  51. +964 −885 gyp/pylib/gyp/generator/android.py
  52. +1,118 −1,012 gyp/pylib/gyp/generator/cmake.py
  53. +120 −0 gyp/pylib/gyp/generator/compile_commands_json.py
  54. +80 −75 gyp/pylib/gyp/generator/dump_dependency_json.py
  55. +388 −343 gyp/pylib/gyp/generator/eclipse.py
  56. +34 −39 gyp/pylib/gyp/generator/gypd.py
  57. +28 −26 gyp/pylib/gyp/generator/gypsh.py
  58. +1,920 −1,594 gyp/pylib/gyp/generator/make.py
  59. +3,118 −2,613 gyp/pylib/gyp/generator/msvs.py
  60. +34 −24 gyp/pylib/gyp/generator/msvs_test.py
  61. +2,718 −2,194 gyp/pylib/gyp/generator/ninja.py
  62. +43 −35 gyp/pylib/gyp/generator/ninja_test.py
  63. +1,281 −1,187 gyp/pylib/gyp/generator/xcode.py
  64. +9 −7 gyp/pylib/gyp/generator/xcode_test.py
  65. +2,747 −2,461 gyp/pylib/gyp/input.py
  66. +85 −77 gyp/pylib/gyp/input_test.py
  67. +630 −464 gyp/pylib/gyp/mac_tool.py
  68. +1,080 −906 gyp/pylib/gyp/msvs_emulation.py
  69. +68 −54 gyp/pylib/gyp/ninja_syntax.py
  70. +0 −289 gyp/pylib/gyp/ordered_dict.py
  71. +34 −16 gyp/pylib/gyp/simple_copy.py
  72. +341 −270 gyp/pylib/gyp/win_tool.py
  73. +1,646 −1,344 gyp/pylib/gyp/xcode_emulation.py
  74. +257 −225 gyp/pylib/gyp/xcode_ninja.py
  75. +2,481 −2,212 gyp/pylib/gyp/xcodeproj_file.py
  76. +38 −42 gyp/pylib/gyp/xml_fix.py
  77. +2 −0 gyp/requirements_dev.txt
  78. +0 −81 gyp/samples/samples
  79. +0 −5 gyp/samples/samples.bat
  80. +34 −9 gyp/setup.py
  81. +269 −0 gyp/test_gyp.py
  82. +68 −65 gyp/tools/graphviz.py
  83. +94 −92 gyp/tools/pretty_gyp.py
  84. +142 −129 gyp/tools/pretty_sln.py
  85. +273 −257 gyp/tools/pretty_vcproj.py
  86. +250 −0 lib/Find-VisualStudio.cs
  87. +56 −136 lib/build.js
  88. +6 −13 lib/clean.js
  89. +175 −285 lib/configure.js
  90. +26 −24 lib/find-node-directory.js
  91. +316 −0 lib/find-python.js
  92. +434 −0 lib/find-visualstudio.js
  93. +131 −153 lib/install.js
  94. +9 −15 lib/list.js
  95. +79 −85 lib/node-gyp.js
  96. +79 −85 lib/process-release.js
  97. +92 −0 lib/proxy.js
  98. +5 −6 lib/rebuild.js
  99. +11 −17 lib/remove.js
  100. +64 −0 lib/util.js
  101. +88 −0 macOS_Catalina.md
  102. +21 −0 macOS_Catalina_acid_test.sh
  103. +19 −20 package.json
  104. +9 −6 src/win_delay_load_hook.cc
  105. +3 −0 test/common.js
  106. +0 −164 test/docker.sh
  107. +1 −0 test/fixtures/VS_2017_BuildTools_minimal.txt
  108. +1 −0 test/fixtures/VS_2017_Community_workload.txt
  109. +1 −0 test/fixtures/VS_2017_Express.txt
  110. +1 −0 test/fixtures/VS_2017_Unusable.txt
  111. +1 −0 test/fixtures/VS_2019_BuildTools_minimal.txt
  112. +1 −0 test/fixtures/VS_2019_Community_workload.txt
  113. +1 −0 test/fixtures/VS_2019_Preview.txt
  114. +19 −19 test/fixtures/ca.crt
  115. +19 −17 test/fixtures/server.crt
  116. +27 −28 test/fixtures/server.key
  117. +30 −0 test/fixtures/test-charmap.py
  118. +3 −4 test/node_modules/hello_world/hello.cc
  119. +140 −0 test/process-exec-sync.js
  120. +13 −10 test/simple-proxy.js
  121. +132 −10 test/test-addon.js
  122. +22 −15 test/test-configure-python.js
  123. +186 −20 test/test-download.js
  124. +18 −20 test/test-find-accessible-sync.js
  125. +24 −20 test/test-find-node-directory.js
  126. +137 −234 test/test-find-python.js
  127. +676 −0 test/test-find-visualstudio.js
  128. +38 −0 test/test-install.js
  129. +7 −7 test/test-options.js
  130. +86 −289 test/test-process-release.js
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
Thank you for reporting an issue!
Remember, this issue tracker is for reporting issues ONLY with node-gyp.
If you have an issue installing a specific module, please file an issue on
that module's issue tracker (`npm issues modulename`). Open issue here only if
you are sure this is an issue with node-gyp, not with the module you are
trying to build.
Fill out the form below. We probably won't investigate an issue that does not
provide the basic information we require.
-->

* **Node Version**: <!-- `node -v` and `npm -v` -->
* **Platform**: <!-- `uname -a` (UNIX), or `systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"` (Windows) -->
* **Compiler**: <!-- `cc -v` (UNIX) or `msbuild /version & cl` (Windows) -->
* **Module**: <!-- what you tried to build/install -->

<details><summary>Verbose output (from npm or node-gyp):</summary>

```
Paste your log here, between the backticks. It can be:
- npm --verbose output,
- or contents of npm-debug.log,
- or output of node-gyp rebuild --verbose.
Include the command you were trying to run.
This should look like this:
>npm --verbose
npm info it worked if it ends with ok
npm verb cli [
npm verb cli 'C:\\...\\node\\13.9.0\\x64\\node.exe',
npm verb cli 'C:\\...\\node\\13.9.0\\x64\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@6.13.7
npm info using node@v13.9.0
Usage: npm <command>
(...)
```

</details>

<!-- Any further details -->

17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
Thank you for your pull request. Please review the below requirements.
Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] `npm install && npm test` passes
- [ ] tests are included <!-- Bug fixes and new features should include tests -->
- [ ] documentation is changed or added
- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)

##### Description of change
<!-- Provide a description of the change -->

40 changes: 40 additions & 0 deletions .github/workflows/Python_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# TODO: Line 15, enable python-version: 3.5
# TODO: Line 36, enable pytest --doctest-modules

name: Python_tests
on: [push, pull_request]
jobs:
Python_tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 15
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest # -r requirements.txt
- name: Lint with flake8
if: matrix.os == 'ubuntu-latest'
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest (Linux and macOS)
if: matrix.os != 'windows-latest'
run: pytest
- name: Test with pytest (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" pytest
# - name: Run doctests with pytest
# run: pytest --doctest-modules
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
gyp/test
node_modules
test/.node-gyp
.ncu
.nyc_output
package-lock.json
7 changes: 0 additions & 7 deletions .jshintrc

This file was deleted.

93 changes: 93 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
dist: xenial
language: python
cache: pip
addons:
homebrew:
update: true
packages:
- npm
- pyenv
jobs:
include:
- name: "Python 2.7 on Linux"
env: NODE_GYP_FORCE_PYTHON=python2
python: 2.7

- name: "Node.js 10 & Python 3.8 on Linux"
python: 3.8
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 10

- name: "Node.js 12 & Python 3.5 on Linux"
python: 3.5
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 12
- name: "Node.js 12 & Python 3.6 on Linux"
python: 3.6
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 12
- name: "Node.js 12 & Python 3.7 on Linux"
python: 3.7
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 12
- name: "Node.js 12 & Python 3.8 on Linux"
python: 3.8
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 12

- name: "Python 2.7 on macOS"
os: osx
osx_image: xcode11.2
language: shell # 'language: python' is not yet supported on macOS
env: NODE_GYP_FORCE_PYTHON=python2 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=2.7.17
before_install: pyenv install $PYENV_VERSION
- name: "Python 3.8 on macOS"
os: osx
osx_image: xcode11.2
language: shell # 'language: python' is not yet supported on macOS
env: NODE_GYP_FORCE_PYTHON=python3 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=3.8.0
before_install: pyenv install $PYENV_VERSION

- name: "Node.js 12 & Python 2.7 on Windows"
os: windows
language: node_js
node_js: 12 # node
env: >-
PATH=/c/Python27:/c/Python27/Scripts:$PATH
NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
before_install: choco install python2

- name: "Node.js 12 & Python 3.7 on Windows"
os: windows
language: node_js
node_js: 12 # node
env: >-
PATH=/c/Python37:/c/Python37/Scripts:$PATH
NODE_GYP_FORCE_PYTHON=/c/Python37/python.exe
before_install: choco install python --version=3.7.4
- name: "Node.js 12 & Python 3.8 on Windows"
os: windows
language: node_js
node_js: 12 # node
env: >-
PATH=/c/Python38:/c/Python38/Scripts:$PATH
NODE_GYP_FORCE_PYTHON=/c/Python38/python.exe
before_install: choco install python

install:
- python -m pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python
before_script:
- python -m flake8 --version
# stop the build if there are Python syntax errors or undefined names
- python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. Two space indentation is OK. The GitHub editor is 127 chars wide
- python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
- npm install
- npm list
script:
- node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})'
- npm test
- GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
notifications:
on_success: change
on_failure: change # `always` will be the setting once code changes slow down
35 changes: 0 additions & 35 deletions 0001-gyp-always-install-into-PRODUCT_DIR.patch

This file was deleted.

36 changes: 0 additions & 36 deletions 0002-gyp-apply-https-codereview.chromium.org-11361103.patch

This file was deleted.

39 changes: 0 additions & 39 deletions 0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch

This file was deleted.

Loading