Skip to content

Commit c6125fb

Browse files
committed
deps: conditionally install node-gyp for vs2026
1 parent e65234b commit c6125fb

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/ci-win.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
- standard
1919
- experimental
2020
node-version:
21-
- 20.x
2221
- 22.x
2322
- 24.x
2423
- 25.x
@@ -60,6 +59,13 @@ jobs:
6059
- name: Install dependencies
6160
run: |
6261
npm install
62+
# node-gyp@12 (from package.json) supports Visual Studio 2026, but only
63+
# node-gyp@13 emits the linker options that Node.js 26 builds require
64+
# (older node-gyp trips LNK1117 on '/opt:lldltojobs'). Upgrade in place for
65+
# Node.js >= 26; other versions keep node-gyp@12.
66+
- name: Use node-gyp@13 for Node.js >= 26
67+
if: matrix.node-version == '26.x'
68+
run: npm install --no-save node-gyp@13
6369
- name: npm test
6470
shell: bash
6571
run: |

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
- standard
1919
- experimental
2020
node-version:
21-
- 20.x
2221
- 22.x
2322
- 24.x
2423
- 25.x
@@ -55,6 +54,11 @@ jobs:
5554
- name: Install dependencies
5655
run: |
5756
npm install
57+
# Node.js >= 26 requires node-gyp@13; older versions keep node-gyp@12
58+
# (from package.json).
59+
- name: Use node-gyp@13 for Node.js >= 26
60+
if: matrix.node-version == '26.x'
61+
run: npm install --no-save node-gyp@13
5862
- name: npm test
5963
run: |
6064
if [ "${{ matrix.api_version }}" = "experimental" ]; then

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@
424424
"eslint": "^9.13.0",
425425
"fs-extra": "^11.1.1",
426426
"neostandard": "^0.12.0",
427+
"node-gyp": "^12.4.0",
427428
"pre-commit": "^1.2.2",
428429
"semver": "^7.6.0"
429430
},

0 commit comments

Comments
 (0)