feat(env): separate system-first shims from the main bin directory - #2758
Conversation
Registry bridge build (
|
| Package | Version |
|---|---|
vite-plus |
0.0.0-commit.476943db76d2601af83fb907cb015347d039004e |
@voidzero-dev/vite-plus-core |
0.0.0-commit.476943db76d2601af83fb907cb015347d039004e |
Install the Vite+ CLI built from this commit, then migrate a project:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/liangmiQwQ/vite-plus/476943db76d2601af83fb907cb015347d039004e/packages/cli/install.sh | VP_PR_VERSION=2758 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/liangmiQwQ/vite-plus/476943db76d2601af83fb907cb015347d039004e/packages/cli/install-legacy.sh bash# Windows (PowerShell)
$env:VP_PR_VERSION="2758"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/liangmiQwQ/vite-plus/476943db76d2601af83fb907cb015347d039004e/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/liangmiQwQ/vite-plus/476943db76d2601af83fb907cb015347d039004e/packages/cli/install.ps1 | iexOr download the standalone Windows installer built from this commit:
| Architecture | Installer |
|---|---|
| x64 | vp-setup-x86_64-pc-windows-msvc.exe |
| Arm64 | vp-setup-aarch64-pc-windows-msvc.exe |
GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:
.\vp-setup.exe --version "0.0.0-commit.476943db76d2601af83fb907cb015347d039004e" --registry "https://registry-bridge.viteplus.dev/"After installing, upgrade the current project's vite-plus to this test build with:
vp migrateOr point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:
| Package manager | Registry config |
|---|---|
| npm / pnpm / Bun | .npmrc: registry=https://registry-bridge.viteplus.dev/ |
| Yarn (v2+) | .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/" |
Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):
{
"devDependencies": {
"vite-plus": "0.0.0-commit.476943db76d2601af83fb907cb015347d039004e",
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.476943db76d2601af83fb907cb015347d039004e"
}
}
Close #2746, Close #2728
This PR moves system-first shims to
<DATA>/fallback-binand puts that directory last in PATH. Managed shims stay in<BIN>alongsidevp,vpr,vpx, and global package commands. Node and each package-manager family keep independent preferences.A shared shim refresh function reconciles placement during
vp env setup --refresh, initial setup, and scopedenv on/offchanges. Upgrades reach it through the existing setup refresh hook. Shell setup deduplicates both directories, and Windows trampoline sidecars preserve the main bin directory when launched from the fallback directory.Invoking a shim selects its managed tool. Internal system-first calls inspect the first PATH match and use the managed resolver if that match is a Vite+ shim. This prevents delegation loops with external version managers while preserving explicit runtime overrides and inherited managed tool selections.
Existing shells need to reload the generated environment file to pick up the new PATH layout.
🤖 Generated with Codex