Skip to content

Commit cd38d1e

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

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/ci-win.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ jobs:
6060
- name: Install dependencies
6161
run: |
6262
npm install
63+
# node-gyp@12 (from package.json) supports Visual Studio 2026, but only
64+
# node-gyp@13 emits the linker options that Node.js 26 builds require
65+
# (older node-gyp trips LNK1117 on '/opt:lldltojobs'). Upgrade in place for
66+
# Node.js >= 26; other versions keep node-gyp@12.
67+
- name: Use node-gyp@13 for Node.js >= 26
68+
if: matrix.node-version == '26.x'
69+
run: npm install --no-save node-gyp@13
6370
- name: npm test
6471
shell: bash
6572
run: |

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ jobs:
5555
- name: Install dependencies
5656
run: |
5757
npm install
58+
# Node.js >= 26 requires node-gyp@13; older versions keep node-gyp@12
59+
# (from package.json).
60+
- name: Use node-gyp@13 for Node.js >= 26
61+
if: matrix.node-version == '26.x'
62+
run: npm install --no-save node-gyp@13
5863
- name: npm test
5964
run: |
6065
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)