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: 4c387070872d8cc7224524852f03df4cd3b90a7a
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: f5fa6b86fd2847ca8c1996102f43d44f98780c4a
Choose a head ref
Loading
Showing with 33,407 additions and 27,814 deletions.
  1. +52 −0 .github/ISSUE_TEMPLATE.md
  2. +17 −0 .github/PULL_REQUEST_TEMPLATE.md
  3. +56 −0 .github/workflows/release-please.yml
  4. +45 −0 .github/workflows/tests.yml
  5. +25 −0 .github/workflows/visual-studio.yml
  6. +4 −0 .gitignore
  7. +0 −7 .jshintrc
  8. +542 −37 CHANGELOG.md
  9. +34 −0 CONTRIBUTING.md
  10. +156 −142 README.md
  11. +55 −3 addon.gypi
  12. +17 −25 bin/node-gyp.js
  13. +14 −0 docs/Common-issues.md
  14. +94 −0 docs/Error-pre-versions-of-node-cannot-be-installed.md
  15. +7 −0 docs/Home.md
  16. +86 −0 docs/Linking-to-OpenSSL.md
  17. +45 −0 docs/Updating-npm-bundled-node-gyp.md
  18. +48 −0 docs/binding.gyp-files-in-the-wild.md
  19. +4 −0 gyp/.flake8
  20. +30 −0 gyp/.github/workflows/Python_tests.yml
  21. +42 −0 gyp/.github/workflows/node-gyp.yml
  22. +27 −0 gyp/.github/workflows/nodejs-windows.yml
  23. +16 −0 gyp/.github/workflows/release-please.yml
  24. +143 −1 gyp/.gitignore
  25. +7 −3 gyp/AUTHORS
  26. +177 −0 gyp/CHANGELOG.md
  27. +4 −0 gyp/CODE_OF_CONDUCT.md
  28. +32 −0 gyp/CONTRIBUTING.md
  29. +0 −24 gyp/DEPS
  30. +1 −0 gyp/LICENSE
  31. +0 −1 gyp/OWNERS
  32. +0 −137 gyp/PRESUBMIT.py
  33. +7 −0 gyp/README.md
  34. +0 −466 gyp/buildbot/aosp_manifest.xml
  35. +0 −136 gyp/buildbot/buildbot_run.py
  36. +0 −6 gyp/buildbot/commit_queue/OWNERS
  37. +0 −3 gyp/buildbot/commit_queue/README
  38. +0 −15 gyp/buildbot/commit_queue/cq_config.json
  39. +0 −10 gyp/codereview.settings
  40. 0 gyp/gyp.bat
  41. +35 −6 gyp/gyp_main.py
  42. +0 −274 gyp/gyptest.py
  43. +279 −252 gyp/pylib/gyp/MSVSNew.py
  44. +115 −117 gyp/pylib/gyp/MSVSProject.py
  45. +891 −717 gyp/pylib/gyp/MSVSSettings.py
  46. +1,474 −1,410 gyp/pylib/gyp/MSVSSettings_test.py
  47. +34 −33 gyp/pylib/gyp/MSVSToolFile.py
  48. +112 −106 gyp/pylib/gyp/MSVSUserFile.py
  49. +175 −174 gyp/pylib/gyp/MSVSUtil.py
  50. +466 −335 gyp/pylib/gyp/MSVSVersion.py
  51. +585 −467 gyp/pylib/gyp/__init__.py
  52. +437 −391 gyp/pylib/gyp/common.py
  53. +53 −47 gyp/pylib/gyp/common_test.py
  54. +94 −91 gyp/pylib/gyp/easy_xml.py
  55. +94 −88 gyp/pylib/gyp/easy_xml_test.py
  56. +40 −39 gyp/pylib/gyp/flock_tool.py
  57. +598 −531 gyp/pylib/gyp/generator/analyzer.py
  58. +1,079 −1,001 gyp/pylib/gyp/generator/android.py
  59. +1,115 −1,015 gyp/pylib/gyp/generator/cmake.py
  60. +120 −0 gyp/pylib/gyp/generator/compile_commands_json.py
  61. +79 −75 gyp/pylib/gyp/generator/dump_dependency_json.py
  62. +382 −343 gyp/pylib/gyp/generator/eclipse.py
  63. +34 −39 gyp/pylib/gyp/generator/gypd.py
  64. +28 −26 gyp/pylib/gyp/generator/gypsh.py
  65. +2,020 −1,722 gyp/pylib/gyp/generator/make.py
  66. +3,164 −2,680 gyp/pylib/gyp/generator/msvs.py
  67. +32 −25 gyp/pylib/gyp/generator/msvs_test.py
  68. +2,809 −2,283 gyp/pylib/gyp/generator/ninja.py
  69. +44 −36 gyp/pylib/gyp/generator/ninja_test.py
  70. +1,285 −1,191 gyp/pylib/gyp/generator/xcode.py
  71. +10 −8 gyp/pylib/gyp/generator/xcode_test.py
  72. +2,710 −2,470 gyp/pylib/gyp/input.py
  73. +86 −78 gyp/pylib/gyp/input_test.py
  74. +627 −466 gyp/pylib/gyp/mac_tool.py
  75. +1,196 −1,012 gyp/pylib/gyp/msvs_emulation.py
  76. +69 −55 gyp/pylib/gyp/ninja_syntax.py
  77. +0 −289 gyp/pylib/gyp/ordered_dict.py
  78. +31 −16 gyp/pylib/gyp/simple_copy.py
  79. +332 −272 gyp/pylib/gyp/win_tool.py
  80. +1,670 −1,360 gyp/pylib/gyp/xcode_emulation.py
  81. +257 −225 gyp/pylib/gyp/xcode_ninja.py
  82. +2,485 −2,215 gyp/pylib/gyp/xcodeproj_file.py
  83. +39 −43 gyp/pylib/gyp/xml_fix.py
  84. +2 −0 gyp/requirements_dev.txt
  85. +0 −81 gyp/samples/samples
  86. +0 −5 gyp/samples/samples.bat
  87. +33 −10 gyp/setup.py
  88. +260 −0 gyp/test_gyp.py
  89. +1 −1 gyp/tools/README
  90. +1 −1 gyp/tools/emacs/gyp-tests.el
  91. +1 −1 gyp/tools/emacs/gyp.el
  92. +68 −66 gyp/tools/graphviz.py
  93. +94 −93 gyp/tools/pretty_gyp.py
  94. +142 −130 gyp/tools/pretty_sln.py
  95. +271 −261 gyp/tools/pretty_vcproj.py
  96. +36 −57 lib/{Find-VS2017.cs → Find-VisualStudio.cs}
  97. +53 −115 lib/build.js
  98. +6 −13 lib/clean.js
  99. +131 −360 lib/configure.js
  100. +146 −0 lib/create-config-gypi.js
  101. +26 −24 lib/find-node-directory.js
  102. +344 −0 lib/find-python.js
  103. +446 −0 lib/find-visualstudio.js
  104. +0 −46 lib/find-vs2017.js
  105. +266 −359 lib/install.js
  106. +9 −15 lib/list.js
  107. +80 −85 lib/node-gyp.js
  108. +78 −86 lib/process-release.js
  109. +5 −6 lib/rebuild.js
  110. +11 −17 lib/remove.js
  111. +64 −0 lib/util.js
  112. +104 −0 macOS_Catalina.md
  113. +21 −0 macOS_Catalina_acid_test.sh
  114. +19 −20 package.json
  115. +9 −6 src/win_delay_load_hook.cc
  116. +3 −0 test/common.js
  117. +0 −164 test/docker.sh
  118. +1 −0 test/fixtures/VS_2017_BuildTools_minimal.txt
  119. +1 −0 test/fixtures/VS_2017_Community_workload.txt
  120. +1 −0 test/fixtures/VS_2017_Express.txt
  121. +1 −0 test/fixtures/VS_2017_Unusable.txt
  122. +1 −0 test/fixtures/VS_2019_BuildTools_minimal.txt
  123. +1 −0 test/fixtures/VS_2019_Community_workload.txt
  124. +1 −0 test/fixtures/VS_2019_Preview.txt
  125. +19 −19 test/fixtures/ca.crt
  126. +6 −0 test/fixtures/nodedir/include/node/config.gypi
  127. +19 −17 test/fixtures/server.crt
  128. +27 −28 test/fixtures/server.key
  129. +31 −0 test/fixtures/test-charmap.py
  130. +3 −4 test/node_modules/hello_world/hello.cc
  131. +140 −0 test/process-exec-sync.js
  132. +13 −10 test/simple-proxy.js
  133. +132 −10 test/test-addon.js
  134. +22 −14 test/test-configure-python.js
  135. +70 −0 test/test-create-config-gypi.js
  136. +172 −67 test/test-download.js
  137. +18 −20 test/test-find-accessible-sync.js
  138. +24 −20 test/test-find-node-directory.js
  139. +133 −246 test/test-find-python.js
  140. +676 −0 test/test-find-visualstudio.js
  141. +46 −0 test/test-install.js
  142. +15 −9 test/test-options.js
  143. +86 −289 test/test-process-release.js
  144. +46 −0 update-gyp.py
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
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.
-->

Please look thru your error log for the string `gyp info using node-gyp@` and if the version number is less than the [current release of node-gyp](https://github.com/nodejs/node-gyp/releases) then __please upgrade__ using the instructions at https://github.com/nodejs/node-gyp/blob/master/docs/Updating-npm-bundled-node-gyp.md and try your command again.

Requests for help with [`node-sass` are very common](https://github.com/nodejs/node-gyp/issues?q=label%3A%22Node+Sass+--%3E+Dart+Sass%22). Please be aware that this package is deprecated, you should seek alternatives and avoid opening new issues about it here.

* **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/googleapis/release-please#how-should-i-write-my-commits)

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

56 changes: 56 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: release-please

on:
push:
branches:
- master

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v2
id: release
with:
package-name: node-gyp
release-type: node
changelog-types: >
[{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"bin","section":"Core","hidden":false},
{"type":"gyp","section":"Core","hidden":false},
{"type":"lib","section":"Core","hidden":false},
{"type":"src","section":"Core","hidden":false},
{"type":"test","section":"Tests","hidden":false},
{"type":"build","section":"Core","hidden":false},
{"type":"clean","section":"Core","hidden":false},
{"type":"configure","section":"Core","hidden":false},
{"type":"install","section":"Core","hidden":false},
{"type":"list","section":"Core","hidden":false},
{"type":"rebuild","section":"Core","hidden":false},
{"type":"remove","section":"Core","hidden":false},
{"type":"deps","section":"Core","hidden":false},
{"type":"python","section":"Core","hidden":false},
{"type":"lin","section":"Core","hidden":false},
{"type":"linux","section":"Core","hidden":false},
{"type":"mac","section":"Core","hidden":false},
{"type":"macos","section":"Core","hidden":false},
{"type":"win","section":"Core","hidden":false},
{"type":"windows","section":"Core","hidden":false},
{"type":"zos","section":"Core","hidden":false},
{"type":"doc","section":"Doc","hidden":false},
{"type":"docs","section":"Doc","hidden":false},
{"type":"readme","section":"Doc","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":false},
{"type":"refactor","section":"Miscellaneous","hidden":false},
{"type":"ci","section":"Miscellaneous","hidden":false},
{"type":"meta","section":"Miscellaneous","hidden":false}]
# Standard Conventional Commits: `feat` and `fix`
# node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test`
# node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove`
# Core abstract category: `deps`
# Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos`
# Documentation: `doc`, `docs`, `readme`
# Standard Conventional Commits: `chore` (under "Miscellaneous")
# Miscellaneous abstract categories: `refactor`, `ci`, `meta`
45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# TODO: Line 43, enable pytest --doctest-modules

name: Tests
on: [push, pull_request]
jobs:
Tests:
strategy:
fail-fast: false
max-parallel: 15
matrix:
node: [12.x, 14.x, 16.x]
python: ["3.6", "3.8", "3.10"]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
env:
PYTHON_VERSION: ${{ matrix.python }}
- name: Install Dependencies
run: |
npm install --no-progress
pip install flake8 pytest
- name: Set Windows environment
if: matrix.os == 'windows-latest'
run: |
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- name: Lint Python
if: matrix.os == 'ubuntu-latest'
run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics
- name: Run Python tests
run: python -m pytest
# - name: Run doctests with pytest
# run: python -m pytest --doctest-modules
- name: Run Node tests
run: npm test
25 changes: 25 additions & 0 deletions .github/workflows/visual-studio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Tests on Windows
on: [push, pull_request]
jobs:
Tests:
strategy:
fail-fast: false
max-parallel: 15
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies
run: |
npm install --no-progress
- name: Set Windows environment
if: matrix.os == 'windows-latest'
run: |
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- name: Environment Information
run: npx envinfo
- name: Run Node tests
run: npm test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*.swp
gyp/test
node_modules
test/.node-gyp
.ncu
.nyc_output
package-lock.json
7 changes: 0 additions & 7 deletions .jshintrc

This file was deleted.

Loading