Skip to content

feat(env): separate system-first shims from the main bin directory - #2758

Merged
fengmk2 merged 17 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/system-first-shims
Sep 21, 2026
Merged

fengmk2 merged 17 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/system-first-shims

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Close #2746, Close #2728

This PR moves system-first shims to <DATA>/fallback-bin and puts that directory last in PATH. Managed shims stay in <BIN> alongside vp, 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 scoped env on/off changes. 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

Comment thread crates/vp_global_cli/src/shim/dispatch.rs
@liangmiQwQ
liangmiQwQ marked this pull request as ready for review September 20, 2026 14:49
@liangmiQwQ
liangmiQwQ requested a review from fengmk2 September 20, 2026 14:50
@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 20, 2026
@fengmk2 fengmk2 self-assigned this Sep 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Registry bridge build (476943d)

Warning

This build is from the fork liangmiQwQ/vite-plus and has not been reviewed.
Installing it runs that code on your machine. Build log

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

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 | iex

Or 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 migrate

Or 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"
  }
}

Comment thread crates/vp_global_cli/src/shim/dispatch.rs
@liangmiQwQ
liangmiQwQ requested a review from fengmk2 September 20, 2026 22:05
@fengmk2
fengmk2 merged commit 591f2b8 into voidzero-dev:main Sep 21, 2026
140 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test

Projects

None yet

2 participants