From 9105db917001096b0f29d0310cf240c0925c00ce Mon Sep 17 00:00:00 2001 From: Dan Hensby Date: Thu, 30 Jul 2026 17:44:09 +0100 Subject: [PATCH] ci: pin msnodesqlv8 v5 to 5.2.1 on Node 20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit msnodesqlv8 5.2.2 stopped publishing a Node 20 (ABI 115) win32-x64 prebuild, so `npm install msnodesqlv8@^5` — which resolves to 5.2.3 — falls through its `prebuild-install || node-gyp rebuild` install script to a source build on Node 20. That build succeeds slowly on windows-2022 (~3 minutes) but fails outright on windows-2025, where node-gyp 10.1.0 cannot detect the Visual Studio 2026 install the image now ships. This failed all four `windows-2025, 20.x` cells on every run regardless of the changes under test. Upstream builds prebuilds for Node 22/24/26 only, so a floating `@^5` will not regain a Node 20 binary. Gate `@^5` to Node 22-24 and add a Node 20 step pinned to 5.2.1, the last v5 release shipping an ABI 115 win32-x64 prebuild. This keeps the v5-on-Node-20 coverage that simply gating v5 to Node 22-24 would have dropped — Node 20 remains supported via `engines.node: ">=18.19.0"` — and removes the slow source build from windows-2022 too. Every gated combination now resolves to a published win32-x64 prebuild: v2 Node 18; v3 Node 18-20; v4 Node 18-24; v5 Node 20 (5.2.1) and Node 22-24 (5.2.3). Co-Authored-By: Claude Opus 4.8 --- .github/workflows/nodejs.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c87c430b..38b944f9 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -162,6 +162,13 @@ jobs: # brittle on the GitHub Windows images (e.g. the VS 2026 rollout on # windows-2025 that node-gyp cannot detect). Coverage: # v2: Node 18 v3: Node 18-20 v4: Node 18-24 v5: Node 20-24 + # + # v5 is split: msnodesqlv8 5.2.2 dropped the Node 20 (ABI 115) win32-x64 + # prebuild, so `@^5` (5.2.3+) is gated to Node 22-24 and Node 20 is pinned + # to 5.2.1 — the last v5 release that ships one. Upstream now builds + # prebuilds for Node 22/24/26 only, so a floating `@^5` will not regain a + # Node 20 prebuild; leaving Node 20 on `@^5` source-builds via node-gyp, + # which is slow on windows-2022 and fails outright on windows-2025. - name: Install msnodesqlv8 v2 if: ${{ matrix.node == '18.x' }} run: npm install --no-save msnodesqlv8@^2 @@ -180,11 +187,17 @@ jobs: - name: Run msnodesqlv8 v4 tests if: ${{ matrix.node == '18.x' || matrix.node == '20.x' || matrix.node == '22.x' || matrix.node == '24.x' }} run: npm run test-msnodesqlv8 + - name: Install msnodesqlv8 v5 (Node 20, pinned) + if: ${{ matrix.node == '20.x' }} + run: npm install --no-save msnodesqlv8@5.2.1 + - name: Run msnodesqlv8 v5 tests (Node 20, pinned) + if: ${{ matrix.node == '20.x' }} + run: npm run test-msnodesqlv8 - name: Install msnodesqlv8 v5 - if: ${{ matrix.node == '20.x' || matrix.node == '22.x' || matrix.node == '24.x' }} + if: ${{ matrix.node == '22.x' || matrix.node == '24.x' }} run: npm install --no-save msnodesqlv8@^5 - name: Run msnodesqlv8 v5 tests - if: ${{ matrix.node == '20.x' || matrix.node == '22.x' || matrix.node == '24.x' }} + if: ${{ matrix.node == '22.x' || matrix.node == '24.x' }} run: npm run test-msnodesqlv8 release: name: Release