Skip to content

feat: test msnodesqlv8 against v2-v5 across supported Node versions#1870

Merged
dhensby merged 1 commit into
tediousjs:masterfrom
dhensby:claude/awesome-khayyam-8a2dee
Jun 23, 2026
Merged

feat: test msnodesqlv8 against v2-v5 across supported Node versions#1870
dhensby merged 1 commit into
tediousjs:masterfrom
dhensby:claude/awesome-khayyam-8a2dee

Conversation

@dhensby

@dhensby dhensby commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Why

PRs were failing on the Windows CI matrix — specifically Node 20 on windows-2025 (every SQL Server version) — while installing msnodesqlv8@^2, which fell back to a node-gyp source build that couldn't find a Visual Studio toolchain:

gyp ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\18\Enterprise"
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use

The cause is environmental, not in node-mssql: GitHub's windows-2025 label is being routed to the windows-2025-vs2026 image (Visual Studio 2026, internal version 18), and the bundled node-gyp can't detect VS 2026 — see actions/runner-images#14004 and nodejs/node-gyp#3250.

It only hit Node 20 because that was the one matrix cell that compiled from source: msnodesqlv8@^2 ships no prebuilt win32-x64 binary for Node 20 (ABI 115), whereas Node 18 (v2 prebuild) and Node 22/24 (v4 prebuilds) loaded prebuilt binaries and never invoked node-gyp.

What

Gate each msnodesqlv8 major to the Node versions it actually ships a prebuilt win32-x64 binary for, so CI never compiles from source — which makes the VS toolchain on the runner image irrelevant:

Node v2 v3 v4 v5
18
20
22
24

This fixes the failure and broadens driver coverage from {v2, v4} to {v2, v3, v4, v5}. The README driver line is updated to v2-v5.

It also removes a pre-existing always-false condition (node == '22.x' && node == '24.x') that silently skipped the msnodesqlv8 tests on Node 22/24 entirely.

Notes

  • v5 is the N-API rewrite. Its cells (Node 20/22/24) are newly exercised and could surface real adapter incompatibilities. fail-fast: false (already on the windows matrix) means any such failure reports independently rather than cancelling siblings.
  • Linux msnodesqlv8 testing remains disabled (separate, pre-existing segfault) and is out of scope here.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Windows CI workflow to exercise msnodesqlv8 majors v2–v5 only on Node.js versions where prebuilt win32-x64 binaries are available, avoiding flaky node-gyp source builds on newer GitHub runner images (e.g., VS 2026 on windows-2025). It also updates documentation to reflect the expanded supported driver major range.

Changes:

  • Update the Windows CI matrix steps to install/test msnodesqlv8 across v2, v3, v4, and v5 with Node-version gating.
  • Remove the previously always-false condition that prevented msnodesqlv8 tests from running on some Node versions.
  • Update README driver description to indicate msnodesqlv8 coverage across v2–v5.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Updates the MSNodeSQLv8 driver description to reflect v2–v5 coverage.
.github/workflows/nodejs.yml Expands and gates Windows CI msnodesqlv8 installs/tests across majors v2–v5 to avoid source builds and improve coverage.

Comment thread .github/workflows/nodejs.yml
Exercise the optional msnodesqlv8 driver against every supported major
on each Node version that ships a prebuilt win32-x64 binary for it,
rather than only v2 (Node 18/20) and v4 (Node 22/24):

  v2: Node 18            v3: Node 18, 20
  v4: Node 18-24         v5: Node 20, 22, 24

v2 ships no prebuilt binary for Node 20+, so it fell back to a node-gyp
source build that broke once windows-2025 moved to Visual Studio 2026
(which the bundled node-gyp cannot detect). Gating each major to its
prebuilt-binary range removes the source build entirely and broadens
coverage to v3 and v5.

Also drops an always-false condition (node == '22.x' && node == '24.x')
that silently skipped the driver tests on Node 22 and 24.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dhensby dhensby force-pushed the claude/awesome-khayyam-8a2dee branch from 8a0fceb to 9ed51d2 Compare June 23, 2026 10:57
@dhensby dhensby merged commit 944c75f into tediousjs:master Jun 23, 2026
47 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 12.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dhensby dhensby deleted the claude/awesome-khayyam-8a2dee branch June 23, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants