feat(env): add per-manager shim versions and update env use - #2659
Draft
liangmiQwQ wants to merge 9 commits into
Draft
feat(env): add per-manager shim versions and update env use#2659liangmiQwQ wants to merge 9 commits into
liangmiQwQ wants to merge 9 commits into
Conversation
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.
Stack 2/2, depends on #2658. Merge #2658 first, then this PR. Both PRs target
mainbecause the branches are hosted in a fork. This PR currently includes the first layer; review only layer 2.This PR adds
VP_NPM_VERSION,VP_PNPM_VERSION,VP_YARN_VERSION, andVP_BUN_VERSIONto override each package manager's direct shim version independently. Each variable covers the family's aliases and takes priority over its session file, project configuration, and default version in managed mode.vp env use pnpm@10.20.0now sets onlyVP_PNPM_VERSION, following the existingVP_NODE_VERSIONmodel. Switching Yarn preserves the pnpm override. Scoped--unset pnpmclears only pnpm, while--unset pmclears all four package-manager overrides. These operations neither set nor clearVP_PACKAGE_MANAGER, which continues to select the manager and version for commands such asvp install.vp env exec --npmand--package-manageralso pass explicit versions through the corresponding family variable, so child shims retain the requested version after a PATH reset.Without a shell wrapper, versions are stored in separate
.session-<manager>-versionfiles. The old.session-package-managerfile is no longer read or migrated; rerunningvp env usecreates the new session state. Concrete-family environment queries use the shim resolution and report its source, whilevp env current pmreports the manager selected for vp commands. Integrity suffixes are preserved.The existing
vp-use.cmdwrapper executes the newset VP_*_VERSION=...output without template changes. Native Windows end-to-end execution has not been verified locally.🤖 Generated with Codex