Repository navigation
feat: Support for Visual Studio 2026 (18.x) to enable node-gyp to work with the latest Visual Studio preview and release versions. - #3240
Merged
Conversation
feat: Add support for Visual Studio 2026 (18.x) - Add versionMajor 18 mapping to versionYear 2026 - Update toolset to v145 for VS2026 (confirmed from MS docs) - Support both Insiders (18\Insiders) and Release (2026\Community) installation paths - Add comprehensive test coverage for both VS2026 variants - Maintain backward compatibility with all existing VS versions This enables node-gyp to work with Visual Studio 2026 Preview/Insiders and future 18.x releases.
Closed
legendecas
reviewed
Nov 12, 2025
| } else if (versionYear === 2022) { | ||
| return 'v143' | ||
| } else if (versionYear === 2026) { | ||
| return 'v145' |
Member
There was a problem hiding this comment.
It seems like this version has not been updated in the doc yet: https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170#version-macros
Contributor
Author
There was a problem hiding this comment.
It seems like this version has not been updated in the doc yet: https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170#version-macros
Clearly, Microsoft's development team is far behind in terms of documentation update speed.
However, I can assure you that VS2026 uses version 145 and has passed rigorous unit and compilation tests.
My personal product has been successfully compiled and released using this PR. ;)
legendecas
approved these changes
Nov 12, 2025
lukekarrys
approved these changes
Nov 12, 2025
This was referenced Nov 12, 2025
2 of 4 tasks
2 tasks
This was referenced Jun 18, 2026
9 of 12 tasks
OGMatrix
added a commit
to OGMatrix/mcmodding-mcp
that referenced
this pull request
Aug 28, 2026
…ecompression with fallback * feat: add zstd database compression and streamed native decompression Add zstd compression in release and weekly workflows. Add streamed native decompression with fallback for unsupported Node.js * fix(zstd): resolve PR review feedback for node versioning, stream errors, and test guards * fix: verify downloaded database integrity against manifest hash - manage.ts: fetch the manifest before downloading, verify the temp file's SHA256 before installing (catches truncated or corrupted downloads, including silently-truncated zstd frames), and reuse the fetched manifest instead of a second network round-trip - db-versioning.ts: clean up the partial .tmp file when a download or decompression fails so it cannot be mistaken for a valid database - add tests: calculateFileHash unit tests plus integration tests for the zstd download path (skipped on runtimes without native zstd) * fix(ci): exclude windows + Node 20 from test matrix Node 20 is EOL and better-sqlite3 no longer ships prebuilds for it (ABI 115), so the Windows cell compiles it from source. The node-gyp bundled with pnpm cannot detect the VS 2026 (v18) toolchain on windows-latest (VS 2026 support landed in node-gyp 12.1.0, nodejs/node-gyp#3240, pnpm#10268). Node 20 remains covered on Linux/macOS, where the source build works; all Node 22 cells install from prebuilds. * fix(tests): raise timeout for real LLM round-trip tests The network-dependent tests in index.test.ts make real LLM/embedding calls (embedding model init is slow in CI). One of them already had a 120s budget and still timed out on the windows-latest cell, and the sibling LLM test took 92s in the same run. Give the four LLM-path tests a 5-minute budget instead of the 60s default / 120s patch. --------- Co-authored-by: OGMatrix <matrix@ogmatrix.net>
tnunamak
added a commit
to PDP-Connect/data-connect
that referenced
this pull request
Sep 2, 2026
windows-latest's Visual Studio install moved to a bare "\18\" path (VS 2026 naming). node-gyp bundled with Node 22.23.1's npm (10.9.8) can't parse that version and fails better-sqlite3's native build with `unknown version "undefined" found at ... \18\Enterprise`. Tried pinning a modern node-gyp (>=12.1.0, which added VS2026/18.x detection per nodejs/node-gyp#3240) via npm_config_node_gyp first, but npm's run-script hardcodes its own bundled node-gyp for automatic native rebuilds during `npm ci` and ignores that config (npm/cli#2839) — confirmed live: the env var was set but the rebuild still used node-gyp 11.5.0 and failed identically. Pin to windows-2022 instead, whose Visual Studio install predates this naming change, until actions/setup-node's Node 22 LTS bundles npm>=11.6.3. Fixes #47 Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
tnunamak
added a commit
to PDP-Connect/data-connect
that referenced
this pull request
Sep 3, 2026
windows-latest now ships a Visual Studio install under a bare "\18\" path (VS 2026's naming scheme). The node-gyp bundled with Node 22.23.1's npm (10.9.8) predates VS18 detection support and fails better-sqlite3's native build with `unknown version "undefined" found at ... \18\Enterprise`. Install node-gyp>=12.1.0 (nodejs/node-gyp#3240 added VS2026/18.x detection) globally on the Windows leg only, and point npm at it via npm_config_node_gyp, so node-gyp is resolved before any `npm ci` triggers a native build. Fixes #47 Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
tnunamak
added a commit
to PDP-Connect/data-connect
that referenced
this pull request
Sep 3, 2026
windows-latest's Visual Studio install moved to a bare "\18\" path (VS 2026 naming). node-gyp bundled with Node 22.23.1's npm (10.9.8) can't parse that version and fails better-sqlite3's native build with `unknown version "undefined" found at ... \18\Enterprise`. Tried pinning a modern node-gyp (>=12.1.0, which added VS2026/18.x detection per nodejs/node-gyp#3240) via npm_config_node_gyp first, but npm's run-script hardcodes its own bundled node-gyp for automatic native rebuilds during `npm ci` and ignores that config (npm/cli#2839) — confirmed live: the env var was set but the rebuild still used node-gyp 11.5.0 and failed identically. Pin to windows-2022 instead, whose Visual Studio install predates this naming change, until actions/setup-node's Node 22 LTS bundles npm>=11.6.3. Fixes #47 Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
npm install && npm run lint && npm testpassesDescription of change
Add support for Visual Studio 2026 (18.x) to enable node-gyp to work with the latest Visual Studio preview and release versions.
Changes made:
getVersionInfo()functionC:\Program Files\Microsoft Visual Studio\18\InsidersC:\Program Files\Microsoft Visual Studio\2026\CommunityTechnical Details:
lib/find-visualstudio.jswith new version mappingsVS_2026_Insiders_workload.txtandVS_2026_Community_workload.txtThis change enables developers using Visual Studio 2026 to compile native Node.js addons without manual configuration.