feat(env): make vp env off disable Node.js management for all vp commands#1255
feat(env): make vp env off disable Node.js management for all vp commands#1255graphite-app[bot] merged 1 commit intomainfrom
vp env off disable Node.js management for all vp commands#1255Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
9ce4b34 to
0d4e245
Compare
|
Question regarding I imagine that there might be use-cases for three things:
Can you walk me through what our plan is exactly? |
|
Before this PR change: After this PR change: I think after the change there are only 2 modes: either intercept everything or fall back everything, without the current intermediate state. As for falling back to vp management mode when system Node.js is not found, I think this is reasonable because we assume some new users will only install vp without installing Node.js first. |
Merge activity
|
…mmands (#1255) Previously, `vp env off` only affected shim dispatch (node/npm/npx invoked directly). All vp commands (create, build, install, etc.) still downloaded managed Node.js via JsExecutor, ignoring the system-first mode setting. Now when `vp env off` is active, JsExecutor checks ShimMode before downloading and uses the system-installed Node.js found in PATH. This fixes NixOS/Guix (where downloaded binaries fail), air-gapped environments, and users managing Node.js via other tools (mise, nvm). - Add JsRuntime::from_system() constructor for system binary paths - Add system-first checks to ensure_cli_runtime/ensure_project_runtime - Expose find_system_tool as pub(crate) and deduplicate doctor.rs copy - Update vp env off/on messaging to reflect broader scope - Add CI E2E tests for system-first mode on all platforms Closes #977
0d4e245 to
cb849cd
Compare

Previously,
vp env offonly affected shim dispatch (node/npm/npxinvoked directly). All vp commands (create, build, install, etc.)
still downloaded managed Node.js via JsExecutor, ignoring the
system-first mode setting.
Now when
vp env offis active, JsExecutor checks ShimMode beforedownloading and uses the system-installed Node.js found in PATH.
This fixes NixOS/Guix (where downloaded binaries fail), air-gapped
environments, and users managing Node.js via other tools (mise, nvm).
Closes #977