fix(env): stop auto-writing .node-version file (#666) - #667
Merged
Conversation
fengmk2
force-pushed
the
remove-node-version-auto-write
branch
2 times, most recently
from
March 2, 2026 13:22
be4cd52 to
095505c
Compare
fengmk2
marked this pull request as ready for review
March 2, 2026 13:43
cpojer
approved these changes
Mar 3, 2026
Member
Author
Merge activity
|
fengmk2
force-pushed
the
remove-node-version-auto-write
branch
from
March 3, 2026 02:34
5576ece to
0196c33
Compare
Remove the auto-write behavior where the shim would create a .node-version file when no version source existed. The file should only be written explicitly via `vp env pin`.
After removing auto-write of .node-version (#666), `ensure_project_runtime()` still called `download_runtime_for_project()` which skips the user's `default_node_version` config and goes straight to LTS. This caused `vp run` and `vp exec` to use a different Node.js version than `vp env which` in unpinned projects. Fix by switching to `config::resolve_version()` which checks the full resolution chain (env var → .node-version → engines.node → devEngines.runtime → user default → LTS).
…ct runtime Restructure ensure_project_runtime() to delegate to download_runtime_for_project() when project version sources exist, fixing two issues: - Range versions now check locally cached versions before network (P1) - Invalid engines.node correctly falls through to devEngines.runtime (P2)
…are invalid When resolve_node_version() finds a version source with an invalid value (e.g., engines.node: "typo"), it returns Some(...) which previously routed to download_runtime_for_project(). That function falls to LTS when all sources are invalid, skipping the user's configured default. Add has_valid_version_source() to validate project sources before routing. When no valid source exists, fall through to config::resolve_version() which checks the user default from config.json before LTS.
Tests that change the global default Node.js version (via `vp env default`) can interfere with each other when run concurrently. Add a `serial` field to steps.json that partitions tests into serial and parallel groups — serial tests run first with concurrency 1, then parallel tests run with full CPU concurrency.
When engines.node contained an invalid version and devEngines.runtime was also present in the same package.json, `vp exec` skipped the fallback and went straight to user default/LTS. Extend the fallback match in resolve_version() to also handle VersionSource::EnginesNode, so invalid engines.node correctly falls through to devEngines.runtime.
fengmk2
force-pushed
the
remove-node-version-auto-write
branch
from
March 3, 2026 02:50
0196c33 to
59dec20
Compare
fengmk2
added a commit
that referenced
this pull request
Aug 7, 2026
Apply STE-style simplification to the report, scripts, and POC comment. Link every referenced nub/vp issue. Record the verified #667 status: PR #2313 fixes the core binding lookup, nub 0.7.2 materializes packages with undeclared imports per-project, and aube 1.37's slot layout resolves the old require. vp build passes on current versions.
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.

Remove the auto-write behavior where the shim would create a
.node-version file when no version source existed. The file should
only be written explicitly via
vp env pin.closes VP-208