Skip to content

fix(cli): recover from stale Vitest aliases - #2605

Draft
fengmk2 wants to merge 1 commit into
mainfrom
fix/stale-vitest-alias
Draft

fix(cli): recover from stale Vitest aliases#2605
fengmk2 wants to merge 1 commit into
mainfrom
fix/stale-vitest-alias

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 4, 2026

Copy link
Copy Markdown
Member

A stale vitest alias can point to the removed @voidzero-dev/vite-plus-test package. The alias can load an old Vite+ core before command dispatch.

The CLI now loads Vite config support only for commands that need it. This change lets vp migrate repair the alias. During vp install, the vp config prepare script reports the stale alias and tells the user to run vp migrate.

The regression test supplies a Vitest module that fails if command dispatch loads it. It confirms that migration starts and removes the old dependency, catalog entry, and override.

@netlify

netlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 4, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
ef2debd 2026-09-04T16:47:38.204Z View logs ↗
  • Build: Failed ❌

View logs ↗
0fb75aa 2026-09-04T14:58:32.419Z View logs ↗
  • Build: Failed ❌

View logs ↗
57c86cc 2026-09-04T02:04:17.161Z View logs ↗

@fengmk2
fengmk2 force-pushed the fix/stale-vitest-alias branch from 57c86cc to 0fb75aa Compare September 4, 2026 14:57
@fengmk2
fengmk2 force-pushed the fix/stale-vitest-alias branch from 0fb75aa to ef2debd Compare September 4, 2026 16:47
@fengmk2 fengmk2 self-assigned this Sep 4, 2026
@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 test: sfw preview-build Publish this PR's commits to the registry bridge as preview builds labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Registry bridge build (ef2debd)

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.ef2debd37eeec42502180b128dcacc9eebdae5fb
@voidzero-dev/vite-plus-core 0.0.0-commit.ef2debd37eeec42502180b128dcacc9eebdae5fb

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/ef2debd37eeec42502180b128dcacc9eebdae5fb/packages/cli/install.sh | VP_PR_VERSION=2605 bash
# Windows (PowerShell)
$env:VP_PR_VERSION="2605"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/ef2debd37eeec42502180b128dcacc9eebdae5fb/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.ef2debd37eeec42502180b128dcacc9eebdae5fb" --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.ef2debd37eeec42502180b128dcacc9eebdae5fb",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.ef2debd37eeec42502180b128dcacc9eebdae5fb"
  }
}

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🐳 Docker preview image

Built from this PR's registry bridge build:

Image Compressed size
ghcr.io/voidzero-dev/vite-plus:pr-2605 236MB
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2605 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2605

Quick check:

docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2605 vp --version

See docs/guide/docker.md for usage.

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 test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant