Skip to content

Commit 9e7d486

Browse files
authored
Merge branch 'main' into patch-1
2 parents 36ebfdc + d644ce4 commit 9e7d486

File tree

100 files changed

+5302
-3157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5302
-3157
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ provide the basic information we require.
1313
1414
-->
1515

16+
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/main/docs/Updating-npm-bundled-node-gyp.md and try your command again.
17+
18+
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.
19+
1620
* **Node Version**: <!-- `node -v` and `npm -v` -->
1721
* **Platform**: <!-- `uname -a` (UNIX), or `systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"` (Windows) -->
1822
* **Compiler**: <!-- `cc -v` (UNIX) or `msbuild /version & cl` (Windows) -->
@@ -46,4 +50,3 @@ Usage: npm <command>
4650
</details>
4751

4852
<!-- Any further details -->
49-

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
Thank you for your pull request. Please review the below requirements.
33
4-
Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
4+
Contributor guide: https://github.com/nodejs/node/blob/main/CONTRIBUTING.md
55
-->
66

77
##### Checklist
@@ -10,7 +10,7 @@ Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
1010
- [ ] `npm install && npm test` passes
1111
- [ ] tests are included <!-- Bug fixes and new features should include tests -->
1212
- [ ] documentation is changed or added
13-
- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)
13+
- [ ] commit message follows [commit guidelines](https://github.com/googleapis/release-please#how-should-i-write-my-commits)
1414

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

.github/workflows/release-please.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-please:
10+
permissions:
11+
contents: write # to create release commit (google-github-actions/release-please-action)
12+
pull-requests: write # to create release PR (google-github-actions/release-please-action)
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v2
17+
id: release
18+
with:
19+
package-name: node-gyp
20+
release-type: node
21+
changelog-types: >
22+
[{"type":"feat","section":"Features","hidden":false},
23+
{"type":"fix","section":"Bug Fixes","hidden":false},
24+
{"type":"bin","section":"Core","hidden":false},
25+
{"type":"gyp","section":"Core","hidden":false},
26+
{"type":"lib","section":"Core","hidden":false},
27+
{"type":"src","section":"Core","hidden":false},
28+
{"type":"test","section":"Tests","hidden":false},
29+
{"type":"build","section":"Core","hidden":false},
30+
{"type":"clean","section":"Core","hidden":false},
31+
{"type":"configure","section":"Core","hidden":false},
32+
{"type":"install","section":"Core","hidden":false},
33+
{"type":"list","section":"Core","hidden":false},
34+
{"type":"rebuild","section":"Core","hidden":false},
35+
{"type":"remove","section":"Core","hidden":false},
36+
{"type":"deps","section":"Core","hidden":false},
37+
{"type":"python","section":"Core","hidden":false},
38+
{"type":"lin","section":"Core","hidden":false},
39+
{"type":"linux","section":"Core","hidden":false},
40+
{"type":"mac","section":"Core","hidden":false},
41+
{"type":"macos","section":"Core","hidden":false},
42+
{"type":"win","section":"Core","hidden":false},
43+
{"type":"windows","section":"Core","hidden":false},
44+
{"type":"zos","section":"Core","hidden":false},
45+
{"type":"doc","section":"Doc","hidden":false},
46+
{"type":"docs","section":"Doc","hidden":false},
47+
{"type":"readme","section":"Doc","hidden":false},
48+
{"type":"chore","section":"Miscellaneous","hidden":false},
49+
{"type":"refactor","section":"Miscellaneous","hidden":false},
50+
{"type":"ci","section":"Miscellaneous","hidden":false},
51+
{"type":"meta","section":"Miscellaneous","hidden":false}]
52+
53+
# Standard Conventional Commits: `feat` and `fix`
54+
# node-gyp subdirectories: `bin`, `gyp`, `lib`, `src`, `test`
55+
# node-gyp subcommands: `build`, `clean`, `configure`, `install`, `list`, `rebuild`, `remove`
56+
# Core abstract category: `deps`
57+
# Languages/platforms: `python`, `lin`, `linux`, `mac`, `macos`, `win`, `window`, `zos`
58+
# Documentation: `doc`, `docs`, `readme`
59+
# Standard Conventional Commits: `chore` (under "Miscellaneous")
60+
# Miscellaneous abstract categories: `refactor`, `ci`, `meta`

.github/workflows/tests.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,60 @@
1-
# TODO: Line 47, enable pytest --doctest-modules
1+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
2+
# TODO: Line 48, enable pytest --doctest-modules
23

34
name: Tests
4-
on: [push, pull_request]
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
permissions:
12+
contents: read # to fetch code (actions/checkout)
13+
514
jobs:
15+
Lint_Python:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- run: pip install --user ruff
20+
- run: ruff --output-format=github --select="E,F,PLC,PLE,UP,W,YTT" --ignore="E721,PLC1901,S101,UP031" --target-version=py38 .
621
Tests:
22+
needs: Lint_Python # Lint_Python takes ~5 seconds, so wait for it to pass before running the full matrix of tests.
723
strategy:
8-
fail-fast: false
24+
fail-fast: false
925
max-parallel: 15
1026
matrix:
11-
node: [10.x, 12.x, 14.x]
12-
python: [3.6, 3.8, 3.9]
27+
node: [16.x, 18.x, 20.x]
28+
python: ["3.8", "3.11"]
1329
os: [macos-latest, ubuntu-latest, windows-latest]
1430
runs-on: ${{ matrix.os }}
1531
steps:
1632
- name: Checkout Repository
17-
uses: actions/checkout@v2
33+
uses: actions/checkout@v4
1834
- name: Use Node.js ${{ matrix.node }}
19-
uses: actions/setup-node@v1
35+
uses: actions/setup-node@v3
2036
with:
2137
node-version: ${{ matrix.node }}
2238
- name: Use Python ${{ matrix.python }}
23-
uses: actions/setup-python@v2
39+
uses: actions/setup-python@v4
2440
with:
2541
python-version: ${{ matrix.python }}
2642
env:
27-
PYTHON_VERSION: ${{ matrix.python }}
43+
PYTHON_VERSION: ${{ matrix.python }} # Why do this?
2844
- name: Install Dependencies
2945
run: |
3046
npm install --no-progress
31-
pip install flake8 pytest
47+
pip install pytest
3248
- name: Set Windows environment
33-
if: matrix.os == 'windows-latest'
49+
if: startsWith(matrix.os, 'windows')
3450
run: |
3551
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
3652
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
37-
- name: Lint Python
38-
if: matrix.os == 'ubuntu-latest'
39-
run: |
40-
# stop the build if there are Python syntax errors or undefined names
41-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
42-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
43-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4453
- name: Run Python tests
45-
run: |
46-
python -m pytest
54+
run: python -m pytest
4755
# - name: Run doctests with pytest
4856
# run: python -m pytest --doctest-modules
57+
- name: Environment Information
58+
run: npx envinfo
4959
- name: Run Node tests
50-
run: |
51-
npm test
60+
run: npm test

.github/workflows/visual-studio.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
2+
3+
name: visual-studio
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
permissions:
11+
contents: read # to fetch code (actions/checkout)
12+
13+
jobs:
14+
visual-studio:
15+
strategy:
16+
fail-fast: false
17+
max-parallel: 8
18+
matrix:
19+
os: [windows-latest]
20+
msvs-version: [2016, 2019, 2022] # https://github.com/actions/virtual-environments/tree/main/images/win
21+
runs-on: ${{ matrix.os }}
22+
steps:
23+
- name: Checkout Repository
24+
uses: actions/checkout@v3
25+
- name: Install Dependencies
26+
run: |
27+
npm install --no-progress
28+
# npm audit fix --force
29+
- name: Set Windows environment
30+
if: startsWith(matrix.os, 'windows')
31+
run: |
32+
echo 'GYP_MSVS_VERSION=${{ matrix.msvs-version }}' >> $Env:GITHUB_ENV
33+
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
34+
- name: Environment Information
35+
run: npx envinfo
36+
- name: Run Node tests
37+
run: npm test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
*.swp
12
gyp/test
23
node_modules
34
test/.node-gyp

0 commit comments

Comments
 (0)