You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhancement: fall back to .nvmrc, .node-version or volta.node for the Node.js runtime #628
src/core-open/scanners/node-scanner.ts takes the Node.js runtime only from package.jsonengines.node. Lots of apps pin Node instead with .nvmrc, .node-version, or "volta": { "node": "20.11.1" } in package.json, and get no runtime or runtime lag in vg scan. (The platform matrix report already reads .nvmrc / .node-version / .tool-versions in src/reporting/scanners/platform-matrix.ts, which is a useful reference.)
What to do
When engines.node is missing, use volta.node, then .nvmrc, then .node-version from the package directory.
Accept values like v20.11.1, 20, and lts/iron; skip values that can't be mapped to a version instead of guessing.
Add unit tests.
Acceptance
A package with no engines and .nvmrcv20.11.1 reports runtime 20.11.1 and a runtime lag.
engines.node still wins when present.
An unmappable .nvmrc value leaves the runtime empty.
Confirmed: the Node runtime comes only from pj.engines?.node (line 313 of src/core-open/scanners/node-scanner.ts).
Fallback order: volta.node from the same package.json, then .nvmrc, then .node-version in the package directory. Strip a leading v, accept bare majors like 20, and map lts/<codename> only if the runtime catalog already knows the codename; otherwise leave the runtime empty. src/reporting/scanners/platform-matrix.ts already reads these files and is a handy reference. This is a nice first issue, so comment if you'd like it assigned.
Happy to take this. Fallback order volta.node, .nvmrc, .node-version, mapping lts/<codename> only through the runtime catalog and leaving anything unmappable empty.
Activity
vibgrate-team commentedon Nov 10, 2026
Confirmed: the Node runtime comes only from
pj.engines?.node(line 313 ofsrc/core-open/scanners/node-scanner.ts).Fallback order:
volta.nodefrom the samepackage.json, then.nvmrc, then.node-versionin the package directory. Strip a leadingv, accept bare majors like20, and maplts/<codename>only if the runtime catalog already knows the codename; otherwise leave the runtime empty.src/reporting/scanners/platform-matrix.tsalready reads these files and is a handy reference. This is a nice first issue, so comment if you'd like it assigned.noahkhomer18 commentedon Nov 20, 2026
Happy to take this. Fallback order
volta.node,.nvmrc,.node-version, mappinglts/<codename>only through the runtime catalog and leaving anything unmappable empty.