Skip to content

feat(migrate): upgrade existing Vite+ projects across versions#1891

Draft
fengmk2 wants to merge 36 commits into
mainfrom
rfc/migrate-upgrade-path
Draft

feat(migrate): upgrade existing Vite+ projects across versions#1891
fengmk2 wants to merge 36 commits into
mainfrom
rfc/migrate-upgrade-path

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 19, 2026

Copy link
Copy Markdown
Member

RFC: rfcs/migrate-existing-projects.md

Problem

Running vp migrate on an existing v0.1.x Vite+ project did not upgrade cleanly: it delegated to the stale local CLI, left pnpm-workspace.yaml overrides pinning vite/vitest to old versions, and skewed coverage providers. The v0.2.1 release notes currently tell users not to run vp migrate yet.

What this does (verified)

  • Routing: when the local vite-plus is older than the global vp, run migrate from the global CLI.
  • Re-pin a behind vite-plus / vite->core spec so the lockfile moves off 0.1.x.
  • Fix the empty "pnpm": {} misrouting that left stale pnpm-workspace.yaml overrides.
  • Manage vitest by usage: removed in the common case (vite-plus provides it transitively), kept + ecosystem-aligned when the project uses it directly or via a range-peer integration.
  • Align the full @vitest/* ecosystem (coverage-v8/-istanbul, ui, web-worker) to the bundled version; exclude @vitest/eslint-plugin.

Verified: 248 migration + 728 CLI unit tests, tsc, vp lint, cargo check/clippy, the migration-vitest-peer-dep snap test, and the urllib 3-PM checks (node-modules/urllib #832-834).

Known gaps (draft, follow-ups)

  • The upgrade path does not yet handle vitest browser mode: a browser-test package (e.g. vibe-dashboard apps/dashboard) is left without @vitest/browser-playwright and a direct vitest, so browser tests break. The fresh-migration path handles this; the upgrade path must too.
  • Monorepo vitest localization: pin a concrete vitest in the package that needs it instead of the shared root catalog.
  • Collapse the direct-usage vitest pin into removal for official-@vitest/*-only projects.
  • Regenerate the migration-* snap suite and do the docs / npm deprecate rollout, then drop the "do not run vp migrate" disclaimer.

Manual pkg.pr.new migration testing

Use the repository helper to install an isolated pkg.pr.new global CLI and run the PR version of vp migrate against any local project:

./.github/scripts/test-pkg-pr-new-migrate.sh 1891 /path/to/project

The first argument accepts either a PR number or commit SHA. The helper keeps the normal ~/.vite-plus installation untouched, forces migration through the installed global preview CLI even when the project has a same-version local CLI, pins vite-plus and vite/core to the matching pkg.pr.new URLs, refuses dirty Git worktrees by default, and forwards additional options such as --no-interactive to vp migrate.

@fengmk2 fengmk2 self-assigned this Jun 19, 2026
@netlify

netlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit 670c987
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a3c9d23821f390008548c74
😎 Deploy Preview https://deploy-preview-1891--viteplus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@socket-security

socket-security Bot commented Jun 19, 2026

Copy link
Copy Markdown

@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 pkg.pr.new labels Jun 21, 2026
@fengmk2 fengmk2 force-pushed the rfc/migrate-upgrade-path branch from feb8068 to 5090afc Compare June 21, 2026 14:11
@pkg-pr-new

pkg-pr-new Bot commented Jun 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

vite-plus

npm i https://pkg.pr.new/voidzero-dev/vite-plus@1891

@voidzero-dev/vite-plus-core

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-core@1891

@voidzero-dev/vite-plus-prompts

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-prompts@1891

@voidzero-dev/vite-plus-cli-darwin-arm64

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-darwin-arm64@1891

@voidzero-dev/vite-plus-cli-darwin-x64

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-darwin-x64@1891

@voidzero-dev/vite-plus-cli-linux-arm64-gnu

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-linux-arm64-gnu@1891

@voidzero-dev/vite-plus-cli-linux-arm64-musl

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-linux-arm64-musl@1891

@voidzero-dev/vite-plus-cli-linux-x64-gnu

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-linux-x64-gnu@1891

@voidzero-dev/vite-plus-cli-linux-x64-musl

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-linux-x64-musl@1891

@voidzero-dev/vite-plus-cli-win32-arm64-msvc

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-win32-arm64-msvc@1891

@voidzero-dev/vite-plus-cli-win32-x64-msvc

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-cli-win32-x64-msvc@1891

@voidzero-dev/vite-plus-darwin-arm64

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-darwin-arm64@1891

@voidzero-dev/vite-plus-darwin-x64

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-darwin-x64@1891

@voidzero-dev/vite-plus-linux-arm64-gnu

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-linux-arm64-gnu@1891

@voidzero-dev/vite-plus-linux-arm64-musl

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-linux-arm64-musl@1891

@voidzero-dev/vite-plus-linux-x64-gnu

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-linux-x64-gnu@1891

@voidzero-dev/vite-plus-linux-x64-musl

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-linux-x64-musl@1891

@voidzero-dev/vite-plus-win32-arm64-msvc

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-win32-arm64-msvc@1891

@voidzero-dev/vite-plus-win32-x64-msvc

npm i https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-win32-x64-msvc@1891

commit: 670c987

@fengmk2 fengmk2 force-pushed the rfc/migrate-upgrade-path branch from 5090afc to 732edd6 Compare June 22, 2026 01:52
@fengmk2

fengmk2 commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 732edd6557

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengmk2 fengmk2 force-pushed the rfc/migrate-upgrade-path branch from 420f861 to 018f48c Compare June 25, 2026 03:11
@fengmk2

fengmk2 commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 670c987e40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg.pr.new 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