Skip to content

feat(env)!: manage package manager environments - #2398

Draft
liangmiQwQ wants to merge 7 commits into
voidzero-dev:mainfrom
liangmiQwQ:feat-breaking/extend-vp-env-to-manage-pm
Draft

feat(env)!: manage package manager environments#2398
liangmiQwQ wants to merge 7 commits into
voidzero-dev:mainfrom
liangmiQwQ:feat-breaking/extend-vp-env-to-manage-pm

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

This PR extends vp env to manage Node.js and package managers as peer environment components.

It adds package-manager defaults, session overrides, project pins, installation lifecycle, diagnostics, listings, and scoped environment commands. Package-manager selection keeps project declarations and lockfile detection in the resolution order, while unconfigured named shims use a cached latest release.

Command Behavior
vp env Shows the unified environment help.
vp env current [scope] Shows the resolved Node.js runtime and selected package manager, including source, installation state, tool paths, and mode. Supports --json.
vp env print [scope] Prints a shell snippet that prepends the resolved Node.js and package-manager bin directories to PATH.
vp env default [specs] Shows both global defaults with no arguments. Bare versions set Node.js; qualified specs such as pnpm@10 set the package-manager fallback. --unset clears selected defaults.
vp env on [scope] Enables managed mode for both components by default, or only Node.js/package managers when scoped.
vp env off [scope] Enables system-first mode for both components by default, or only Node.js/package managers when scoped.
vp env setup Creates or refreshes the Vite+ shell setup and shims for Node.js, npm, pnpm, Yarn, Bun, and their aliases.
vp env doctor [scope] Diagnoses configuration conflicts, missing installs, shim state, and environment selection.
vp env which <tool> Prints the executable path that the environment shim would select for a tool.
vp env pin [specs] Shows or writes project pins. Bare versions target Node.js; qualified specs target a package manager. Existing compatible fields are preserved, and versions are installed unless --no-install is used.
vp env unpin [scope] Removes effective project pins for both components by default, or only the requested component/source.
vp env list [scope] Lists locally installed Node.js and package-manager versions in component sections. Supports --json.
vp env list-remote [scope] [pattern] Lists registry versions for Node.js and package managers, with component filtering, LTS filtering, full history, sorting, and JSON output.
vp env exec [overrides] <command> Runs a command in the resolved full environment. --node and --package-manager override individual components; run remains an alias.
vp env install [requests] Installs the resolved full environment by default, a selected component, or explicit Node.js/package-manager specs.
vp env uninstall <specs> Removes explicitly selected installed Node.js or package-manager versions.
vp env clean [scope] Removes unused managed runtimes and package-manager installs while preserving active and configured-default versions.
vp env use [requests] Activates the resolved or explicit environment for the current shell session, auto-installing by default. --unset clears session overrides.

This is currently opened against main as a draft while the stacked diff is being organized.

🤖 Generated with Codex

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 2bcc166
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a7b35ab187c31000805d548

@liangmiQwQ
liangmiQwQ force-pushed the feat-breaking/extend-vp-env-to-manage-pm branch 12 times, most recently from c7a2623 to d010aac Compare August 11, 2026 11:48
@liangmiQwQ
liangmiQwQ force-pushed the feat-breaking/extend-vp-env-to-manage-pm branch from d010aac to 8cff8bb Compare August 11, 2026 13:34
@liangmiQwQ
liangmiQwQ force-pushed the feat-breaking/extend-vp-env-to-manage-pm branch from 8cff8bb to 2bcc166 Compare August 11, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant