feat(test): upgrade to Vitest v5 with migration support - #2551
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
8186f1e to
2d55279
Compare
5787285 to
0cc40f3
Compare
|
✅ Staging deployment successful! Preview: https://viteplus-staging.void.app/ |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
5a72e21 to
ac38d99
Compare
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
packages/cli/dist |
Directory total | 2.14 MiB | 2.25 MiB | +105.73 KiB (+4.81%) |
packages/core/dist |
Directory total | 3.94 MiB | 3.94 MiB | +1.86 KiB (+0.05%) |
| Combined package dist | Directory total | 6.09 MiB | 6.19 MiB | +107.59 KiB (+1.73%) |
vp (Linux x64) |
Binary | 11.16 MiB | 11.17 MiB | +8.00 KiB (+0.07%) |
vp (Linux x64) |
gzip -9 | 4.83 MiB | 4.83 MiB | +3.10 KiB (+0.06%) |
| NAPI (Linux x64) | Binary | 32.12 MiB | 32.16 MiB | +48.13 KiB (+0.15%) |
| NAPI (Linux x64) | gzip -9 | 12.71 MiB | 12.73 MiB | +20.25 KiB (+0.16%) |
vp (macOS ARM64) |
Binary | 8.32 MiB | 8.32 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
gzip -9 | 4.21 MiB | 4.21 MiB | +1.47 KiB (+0.03%) |
| NAPI (macOS ARM64) | Binary | 39.68 MiB | 39.71 MiB | +32.31 KiB (+0.08%) |
| NAPI (macOS ARM64) | gzip -9 | 17.00 MiB | 17.02 MiB | +19.44 KiB (+0.11%) |
vp (Windows x64) |
Binary | 9.04 MiB | 9.05 MiB | +7.00 KiB (+0.08%) |
vp (Windows x64) |
gzip -9 | 3.95 MiB | 3.95 MiB | +3.68 KiB (+0.09%) |
| NAPI (Windows x64) | Binary | 27.03 MiB | 27.07 MiB | +42.50 KiB (+0.15%) |
| NAPI (Windows x64) | gzip -9 | 10.80 MiB | 10.82 MiB | +17.68 KiB (+0.16%) |
| Trampoline (Windows x64) | Binary | 13.50 KiB | 13.50 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.03 KiB | 7.03 KiB | +1 B (+0.01%) |
| Installer (Windows x64) | Binary | 4.53 MiB | 4.53 MiB | 0 B (0.00%) |
| Installer (Windows x64) | gzip -9 | 2.12 MiB | 2.12 MiB | +1 B (+0.00%) |
cd650ad to
912a5b8
Compare
Registry bridge build (
|
| Package | Version |
|---|---|
vite-plus |
0.0.0-commit.912a5b8be5529da4a4a0c01174fc988205cd2c66 |
@voidzero-dev/vite-plus-core |
0.0.0-commit.912a5b8be5529da4a4a0c01174fc988205cd2c66 |
Install the Vite+ CLI built from this commit, then migrate a project:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/912a5b8be5529da4a4a0c01174fc988205cd2c66/packages/cli/install.sh | VP_PR_VERSION=2551 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/912a5b8be5529da4a4a0c01174fc988205cd2c66/packages/cli/install-legacy.sh bash# Windows (PowerShell)
$env:VP_PR_VERSION="2551"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/912a5b8be5529da4a4a0c01174fc988205cd2c66/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/912a5b8be5529da4a4a0c01174fc988205cd2c66/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.912a5b8be5529da4a4a0c01174fc988205cd2c66" --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.912a5b8be5529da4a4a0c01174fc988205cd2c66",
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.912a5b8be5529da4a4a0c01174fc988205cd2c66"
}
}
🐳 Docker preview imageBuilt from this PR's registry bridge build:
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2551 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2551Quick check: docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2551 vp --versionSee docs/guide/docker.md for usage. |
8e53e5b to
3f5d35d
Compare
Upgrade
vp testandvite-plus/test*tovitest@5.0.0. Preserve supported compatibility aliases. Require Node.js^22.18.0 || ^24.11.0 || >=26.0.0.Add a versioned
vp migratepass to preserve compatiblev4behavior and report changes that need manual review. Reuse nativeoxcparsing and scope analysis. Remove the Babel dependencies frompackages/cli/package.json. Leave Flow files unchanged with a review diagnostic.Keep the Vitest pin during
pnpm tool sync-remote. Align vendored Vite dependencies. Leave Rolldown's test dependencies unchanged.Add a temporary backport of vitest-dev/vitest#11198 for browser
definevalues. Restrict the backport tovitest@5.0.0at build time and runtime. Remove it after upgrading to a release with the upstream fix.Update the
vue-miniandyaakrevisions to use supported Node.js runtimes. Apply a temporary CI runtime override fordecoders. Remove that override after upstream drops its20.xCI entry.Keep this PR as a draft. Preview locator clicks with real timers and the Node/browser
@testing-library/jest-domdeclaration conflict remain open.See
rfcs/vitest-v5-upgrade.mdfor the design and release requirements. This work supports #2405.