feat(js-executor): block vp commands when Node.js version is incompatible#1360
Merged
fengmk2 merged 19 commits intovoidzero-dev:mainfrom Apr 13, 2026
Merged
Conversation
… vp JS commands When a user sets an incompatible Node.js version via `vp env use`, all JS-based vp commands fail with cryptic errors. This adds an explicit check in `ensure_project_runtime()` that compares the resolved version against vp's own engine requirements (read from the CLI's package.json). If the version is outside the required range an `Error::NodeVersionIncompatible` is returned with a clear message and a hint to run `vp env use 22`. System runtimes (version = "system") and unparseable versions are skipped silently so `vp env off` users are not affected. Fixes voidzero-dev#1358 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…heck Cover check_runtime_compatibility (compatible, v-prefixed, incompatible, system, unparseable version, invalid requirement range) and get_cli_engines_requirement (reads engines.node from package.json, returns None when package.json is missing). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for viteplus-preview canceled.
|
21ab3bf to
e2a1a36
Compare
Contributor
Author
|
Done! There are a few test snapshots got updated as they are using node version out of vp's engines scope defined in package.json |
Member
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3f3b046ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fengmk2
reviewed
Apr 12, 2026
Member
|
@liangmiQwQ Can we add a snap test for block error reporting? To ensure this functionality remains effective in future changes. Others LGTM ❤️ |
Contributor
Author
|
Got it, I would add it soon |
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.
Closes #1358
This PR added check logic to block running / downloading node with unsupported node versions.
The check logic is added in
ensure_project_runtimefn to make sure allvpcommands run locally node be checked, not only for Categories C cmds. While directnodewon't be influenced.Generated with Claude Code