diff --git a/.github/scripts/__tests__/upgrade-deps-utils.spec.ts b/.github/scripts/__tests__/upgrade-deps-utils.spec.ts index b8b6b1f4a8..671ff1d069 100644 --- a/.github/scripts/__tests__/upgrade-deps-utils.spec.ts +++ b/.github/scripts/__tests__/upgrade-deps-utils.spec.ts @@ -16,3 +16,9 @@ test('selects the highest stable version from the supported major', () => { test('returns undefined when the supported major has no stable release', () => { expect(findLatestStableVersionForMajor(['4.2.0-beta.1', '5.0.0'], 4)).toBeUndefined(); }); + +test('keeps Vitest upgrades on v5 after the migration', () => { + expect( + findLatestStableVersionForMajor(['4.1.11', '5.0.0', '5.1.0', '5.2.0-beta.1', '6.0.0'], 5), + ).toBe('5.1.0'); +}); diff --git a/.github/scripts/upgrade-deps.ts b/.github/scripts/upgrade-deps.ts index acc5a6e633..b895b6f2d0 100644 --- a/.github/scripts/upgrade-deps.ts +++ b/.github/scripts/upgrade-deps.ts @@ -72,7 +72,7 @@ type PnpmWorkspaceEntry = { const STABLE_SEMVER_TAG_RE = /^v?\d+\.\d+\.\d+$/; // Vitest major upgrades can change the bundled API, export shims, and CLI // behavior. Advance this only after Vite+ has adapted to the new major. -const SUPPORTED_VITEST_MAJOR = 4; +const SUPPORTED_VITEST_MAJOR = 5; const isFullSha = (s: string): boolean => /^[0-9a-f]{40}$/.test(s); @@ -211,18 +211,15 @@ async function updatePnpmWorkspace(versions: PnpmWorkspaceVersions): Promise: ^X vs ^Y`. The merger refuses to auto-resolve cross-major conflicts for packages outside its synced list - (oxc-*, vitest deps). For passthrough deps that vp does NOT import + (oxc-* and tinybench). For passthrough deps that vp does NOT import directly (e.g. `diff`, `acorn`, `astring`, anything only present in `rolldown/scripts/package.json` or vite's internals), bump vp's `pnpm-workspace.yaml` catalog entry to match the rolldown/vite version, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md index 327af269cb..6f3bf09aaa 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md @@ -5,7 +5,7 @@ Help requests with additional arguments delegate to the underlying tool. ## `vp test --help --coverage` ``` -vitest/4.1.11 +vitest/5.0.0 Usage: $ vitest [...filters] @@ -17,6 +17,7 @@ Commands: dev [...filters] bench [...filters] init + doctor [...filters] list [...filters] [...filters] complete [shell] @@ -28,6 +29,7 @@ For more info, run any command with the `--help` flag: $ vitest dev --help $ vitest bench --help $ vitest init --help + $ vitest doctor --help $ vitest list --help $ vitest --help $ vitest complete --help @@ -47,7 +49,7 @@ Options: --coverage.allowExternal Collect coverage of files outside the project root (default: false) --coverage.skipFull Do not show files with 100% statement, branch, and function coverage (default: false) --coverage.thresholds.100 Shortcut to set all coverage thresholds to 100 (default: false) - --coverage.thresholds.perFile Check thresholds per file. See --coverage.thresholds.lines, --coverage.thresholds.functions, --coverage.thresholds.branches and --coverage.thresholds.statements for the actual thresholds (default: false) + --coverage.thresholds.perFile Check thresholds per file. See --coverage.thresholds.lines, --coverage.thresholds.functions, --coverage.thresholds.branches and --coverage.thresholds.statements for the actual thresholds (default: false). Object form is available in config files only. --coverage.thresholds.autoUpdate Update threshold values: "lines", "functions", "branches" and "statements" to configuration file when current coverage is above the configured thresholds (default: false) --coverage.thresholds.lines Threshold for lines. Visit https://github.com/istanbuljs/nyc#coverage-thresholds for more information. This option is not available for custom providers --coverage.thresholds.functions Threshold for functions. Visit https://github.com/istanbuljs/nyc#coverage-thresholds for more information. This option is not available for custom providers @@ -63,4 +65,5 @@ Options: --coverage.changed Collect coverage only for files changed since a specified commit or branch (e.g., origin/main or HEAD~1). Inherits value from --changed by default. --coverage.excludeAfterRemap Apply exclusions again after coverage has been remapped to original sources. (default: false) --coverage.htmlDir Directory of HTML coverage output to be served in UI mode and HTML reporter. + --coverage.autoAttachSubprocess Track coverage of the node:child_process and node:worker_threads spawned during test run. Supported only by v8 provider. (default: false) ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_migrate_pnpm11/snapshots/create_approve_builds_migrate_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_migrate_pnpm11/snapshots/create_approve_builds_migrate_pnpm11.md index 51d6f4d597..79610e972d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_migrate_pnpm11/snapshots/create_approve_builds_migrate_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_migrate_pnpm11/snapshots/create_approve_builds_migrate_pnpm11.md @@ -73,6 +73,8 @@ peerDependencyRules: the guidance's `vp pm approve-builds` command approves the gated build ``` +✓ Lockfile passes supply-chain policies (verified ago) +Already up to date node_modules/.pnpm/core-js@3.39.0/node_modules/core-js: Running postinstall script, done in ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_pnpm11/snapshots/create_approve_builds_pnpm11.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_pnpm11/snapshots/create_approve_builds_pnpm11.md index 02d8568dde..3f4588cd04 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_pnpm11/snapshots/create_approve_builds_pnpm11.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/create_approve_builds_pnpm11/snapshots/create_approve_builds_pnpm11.md @@ -69,6 +69,8 @@ peerDependencyRules: the guidance's `vp pm approve-builds` command approves the gated build ``` +✓ Lockfile passes supply-chain policies (verified ago) +Already up to date node_modules/.pnpm/core-js@3.39.0/node_modules/core-js: Running postinstall script, done in ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/package.json index abe4023cd1..9e1c18d988 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/package.json @@ -1,6 +1,6 @@ { "name": "migration-agent-claude", "dependencies": { - "vitest": "^3.0.0" + "vitest": "^4.1.0" } } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/snapshots/migration_agent_claude.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/snapshots/migration_agent_claude.md index d49e12e6ef..7c5658547c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/snapshots/migration_agent_claude.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_agent_claude/snapshots/migration_agent_claude.md @@ -7,6 +7,10 @@ migration with --agent claude should write CLAUDE.md ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_inline_array/snapshots/migration_bunfig_inline_array.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_inline_array/snapshots/migration_bunfig_inline_array.md index 2bf7d20796..acb7be696e 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_inline_array/snapshots/migration_bunfig_inline_array.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_inline_array/snapshots/migration_bunfig_inline_array.md @@ -7,6 +7,10 @@ migration preserves inline arrays in an existing bunfig.toml ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node bun • 2 config updates applied diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_missing/snapshots/migration_bunfig_missing.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_missing/snapshots/migration_bunfig_missing.md index 0494111c9a..4175f7d200 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_missing/snapshots/migration_bunfig_missing.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_missing/snapshots/migration_bunfig_missing.md @@ -7,6 +7,10 @@ migration does not create bunfig.toml ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node bun • 2 config updates applied diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_no_install_section/snapshots/migration_bunfig_no_install_section.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_no_install_section/snapshots/migration_bunfig_no_install_section.md index 0948892875..c307849e14 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_no_install_section/snapshots/migration_bunfig_no_install_section.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_bunfig_no_install_section/snapshots/migration_bunfig_no_install_section.md @@ -7,6 +7,10 @@ migration preserves bunfig.toml without an install section ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node bun • 2 config updates applied diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_config/snapshots/migration_from_vitest_config.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_config/snapshots/migration_from_vitest_config.md index ca978ebabc..3c06ad5c93 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_config/snapshots/migration_from_vitest_config.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_config/snapshots/migration_from_vitest_config.md @@ -30,8 +30,10 @@ import { defineConfig } from 'vite-plus'; export default defineConfig({ plugins: [foo()], test: { + clearMocks: false, dir: join(import.meta.dirname, 'test'), browser: { + locators: { exact: false }, enabled: true, provider: playwright(), headless: true, @@ -86,7 +88,7 @@ catalog: vite: npm:@voidzero-dev/vite-plus-core@ vitest: vite-plus: - '@vitest/browser-webdriverio': + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 '@vitest/browser-playwright': '@vitest/coverage-v8': allowBuilds: diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_files/snapshots/migration_from_vitest_files.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_files/snapshots/migration_from_vitest_files.md index 839948754a..b293b96c0d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_files/snapshots/migration_from_vitest_files.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_from_vitest_files/snapshots/migration_from_vitest_files.md @@ -7,6 +7,10 @@ migration should rewrite imports to vite-plus ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default and uses exact browser locators. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_merge_vite_config_ts/snapshots/migration_merge_vite_config_ts.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_merge_vite_config_ts/snapshots/migration_merge_vite_config_ts.md index 93c54c83f6..706b01f853 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_merge_vite_config_ts/snapshots/migration_merge_vite_config_ts.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_merge_vite_config_ts/snapshots/migration_merge_vite_config_ts.md @@ -53,8 +53,10 @@ export default defineConfig({ }, plugins: lazyPlugins(() => [react()]), test: { + clearMocks: false, dir: join(import.meta.dirname, 'test'), browser: { + locators: { exact: false }, enabled: true, provider: playwright(), headless: true, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_bun/snapshots/migration_monorepo_bun.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_bun/snapshots/migration_monorepo_bun.md index 7a02ce2eb8..86a27c35d1 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_bun/snapshots/migration_monorepo_bun.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_bun/snapshots/migration_monorepo_bun.md @@ -7,11 +7,27 @@ migration should work with bun object-form workspaces ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 2 review items + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/utils/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + ✔ Merged .oxlintrc.json into vite.config.ts ◇ Migrated . to Vite+ • Node bun • 2 config updates applied, 1 file had imports rewritten • Inline Vite plugins wrapped with lazyPlugins for check/lint/fmt +! Warnings: + - Vitest v5: 2 review items + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/utils/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file vite.config.ts` @@ -43,6 +59,7 @@ export default defineConfig({ } ] }, + test: { clearMocks: false }, plugins: lazyPlugins(() => [react()]), }); ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_pnpm/snapshots/migration_monorepo_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_pnpm/snapshots/migration_monorepo_pnpm.md index ffbf239a39..b06c487ba4 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_pnpm/snapshots/migration_monorepo_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_pnpm/snapshots/migration_monorepo_pnpm.md @@ -7,6 +7,14 @@ migration should merge vite.config.ts and remove oxlintrc and oxfmtrc ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 2 review items + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/utils/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + ✔ Merged .oxlintrc.json into vite.config.ts ✔ Merged .oxfmtrc.json into vite.config.ts @@ -14,6 +22,14 @@ VITE+ - The Unified Toolchain for the Web • Node pnpm • 4 config updates applied, 1 file had imports rewritten • Inline Vite plugins wrapped with lazyPlugins for check/lint/fmt +! Warnings: + - Vitest v5: 2 review items + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/utils/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file vite.config.ts` @@ -51,6 +67,7 @@ export default defineConfig({ } ] }, + test: { clearMocks: false }, plugins: lazyPlugins(() => [react()]), }); ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots.toml index 6277bbdcf3..ef55410659 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_monorepo_root_vitest_adjacent" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "root with a vitest-adjacent dep but no direct vitest still gets a direct vitest pin", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "vitest pinned at the root even though vite-plus is injected first", continue-on-failure = true }, ] diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots/migration_monorepo_root_vitest_adjacent.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots/migration_monorepo_root_vitest_adjacent.md index 568c949547..3d026b9f9f 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots/migration_monorepo_root_vitest_adjacent.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_root_vitest_adjacent/snapshots/migration_monorepo_root_vitest_adjacent.md @@ -1,5 +1,10 @@ # migration_monorepo_root_vitest_adjacent +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` root with a vitest-adjacent dep but no direct vitest still gets a direct vitest pin @@ -7,6 +12,10 @@ root with a vitest-adjacent dep but no direct vitest still gets a direct vitest ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default and uses exact browser locators. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots.toml index 3551495224..ad2c569fca 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_monorepo_skip_vite_peer_dependency" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "migration should preserve vite peer contracts in workspace packages", continue-on-failure = true }, { argv = ["vpt", "print-file", "packages/vite-plugin/src/index.ts"], comment = "vite-plugin has vite in peerDeps: vite imports stay public, vitest rewrites", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "check root package.json (no peerDependencies)", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots/migration_monorepo_skip_vite_peer_dependency.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots/migration_monorepo_skip_vite_peer_dependency.md index aa2b4ee2d9..2b8cee65bb 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots/migration_monorepo_skip_vite_peer_dependency.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_skip_vite_peer_dependency/snapshots/migration_monorepo_skip_vite_peer_dependency.md @@ -1,5 +1,10 @@ # migration_monorepo_skip_vite_peer_dependency +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` migration should preserve vite peer contracts in workspace packages @@ -7,9 +12,18 @@ migration should preserve vite peer contracts in workspace packages ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +packages/vite-plugin/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten +! Warnings: + - Vitest v5: 1 review item + +packages/vite-plugin/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file packages/vite-plugin/src/index.ts` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots.toml index b24d023fbc..024fe3aebb 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_monorepo_yarn4" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "migration should merge vite.config.ts and remove oxlintrc", continue-on-failure = true }, { argv = ["vpt", "print-file", "vite.config.ts"], comment = "check vite.config.ts", continue-on-failure = true }, { argv = ["vpt", "stat-file", ".oxlintrc.json", "--assert-not", "file"], comment = "check .oxlintrc.json is removed", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots/migration_monorepo_yarn4.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots/migration_monorepo_yarn4.md index 2427b17e57..8a476e4520 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots/migration_monorepo_yarn4.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_monorepo_yarn4/snapshots/migration_monorepo_yarn4.md @@ -1,5 +1,10 @@ # migration_monorepo_yarn4 +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` migration should merge vite.config.ts and remove oxlintrc @@ -7,6 +12,14 @@ migration should merge vite.config.ts and remove oxlintrc ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 2 review items + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/utils/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + ⚠ Vite+ does not currently support Yarn Plug'n'Play (PnP). ✔ Switched Yarn to node-modules mode @@ -17,6 +30,14 @@ VITE+ - The Unified Toolchain for the Web • 2 config updates applied, 1 file had imports rewritten • Inline Vite plugins wrapped with lazyPlugins for check/lint/fmt • Package manager settings configured +! Warnings: + - Vitest v5: 2 review items + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/utils/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file vite.config.ts` @@ -48,6 +69,7 @@ export default defineConfig({ } ] }, + test: { clearMocks: false }, plugins: lazyPlugins(() => [react()]), }); ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/package.json index 58151f5f0a..a810147949 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/package.json @@ -1,6 +1,6 @@ { "name": "migration-no-agent", "dependencies": { - "vitest": "^3.0.0" + "vitest": "^4.1.0" } } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/snapshots/migration_no_agent.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/snapshots/migration_no_agent.md index c9b1704fc3..32ca1b5637 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/snapshots/migration_no_agent.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_no_agent/snapshots/migration_no_agent.md @@ -7,6 +7,10 @@ migration with --no-agent should skip agent instructions ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_not_supported_vitest3/snapshots/migration_not_supported_vitest3.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_not_supported_vitest3/snapshots/migration_not_supported_vitest3.md index 13e484183e..940ce39c89 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_not_supported_vitest3/snapshots/migration_not_supported_vitest3.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_not_supported_vitest3/snapshots/migration_not_supported_vitest3.md @@ -14,10 +14,12 @@ migration should fail because vitest version is not supported ``` VITE+ - The Unified Toolchain for the Web -✘ vitest@3.2.4 in package.json is not supported by auto migration +Vitest v5: 2 review items (1 block dependency updates) -Please upgrade vitest to version >=4.0.0 first -Vite+ cannot automatically migrate this project yet. +package.json + 1:1 BLOCK [source-version] Upgrade the original project to Vitest 4 before running this migration. + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. +Resolve the blocking Vitest v5 findings, then re-run `vp migrate`. No project files were changed. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_npmx_dev/snapshots/migration_npmx_dev.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_npmx_dev/snapshots/migration_npmx_dev.md index 47b7ab55d9..614ea32428 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_npmx_dev/snapshots/migration_npmx_dev.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_npmx_dev/snapshots/migration_npmx_dev.md @@ -7,6 +7,10 @@ npmx.dev shape: existing Vite+ upgrade, concrete @vitest/* should move into the ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default and uses exact browser locators. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: @@ -16,6 +20,11 @@ VITE+ - The Unified Toolchain for the Web @vitest/browser-playwright 4.1.10 → @vitest/coverage-v8 4.1.10 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default and uses exact browser locators. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/.nvmrc b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/.nvmrc index d7fd7cd552..c519bf5baa 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/.nvmrc +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/.nvmrc @@ -1 +1 @@ -v25.8.2 +v24.11.0 diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/snapshots/migration_nvmrc.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/snapshots/migration_nvmrc.md index 52016a7ea3..a45814eb79 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/snapshots/migration_nvmrc.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc/snapshots/migration_nvmrc.md @@ -18,7 +18,7 @@ VITE+ - The Unified Toolchain for the Web check .node-version is created with v prefix stripped ``` -25.8.2 +24.11.0 ``` ## `vpt stat-file .nvmrc --assert-not file` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_lts/snapshots/migration_nvmrc_lts.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_lts/snapshots/migration_nvmrc_lts.md index 980c299d10..e2dd4c857a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_lts/snapshots/migration_nvmrc_lts.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_lts/snapshots/migration_nvmrc_lts.md @@ -7,10 +7,19 @@ migration should detect .nvmrc with lts alias and auto-migrate ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +.nvmrc + 1:1 REVIEW [node-runtime] Resolve .nvmrc (lts/iron) and select Node ^22.18.0 || ^24.11.0 || >=26.0.0. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied • Node version manager file migrated to .node-version +! Warnings: + - Vitest v5: 1 review item + +.node-version + 1:1 REVIEW [node-runtime] Resolve .node-version (lts/iron) and select Node ^22.18.0 || ^24.11.0 || >=26.0.0. ``` ## `vpt print-file .node-version` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_node_alias/snapshots/migration_nvmrc_node_alias.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_node_alias/snapshots/migration_nvmrc_node_alias.md index 9fda9150d8..7792d6378c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_node_alias/snapshots/migration_nvmrc_node_alias.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_nvmrc_node_alias/snapshots/migration_nvmrc_node_alias.md @@ -7,11 +7,21 @@ ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +.nvmrc + 1:1 REVIEW [node-runtime] Resolve .nvmrc (node) and select Node ^22.18.0 || ^24.11.0 || >=26.0.0. + "node" in .nvmrc is not a specific version; automatically mapping to "lts/*" ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied • Node version manager file migrated to .node-version +! Warnings: + - Vitest v5: 1 review item + +.node-version + 1:1 REVIEW [node-runtime] Resolve .node-version (lts/*) and select Node ^22.18.0 || ^24.11.0 || >=26.0.0. ``` ## `vpt print-file .node-version` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots.toml index 697fa1ae73..d65afb29f7 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots.toml @@ -2,8 +2,10 @@ name = "migration_preserve_below_policy_node_pins" vp = "global" steps = [ - { argv = ["vp", "migrate", "--no-interactive"], comment = "existing Vite+ project: a Node pin below the supported range is preserved, not raised (native binding supports Node >=20)", continue-on-failure = true }, + { argv = ["vp", "migrate", "--no-interactive"], comment = "reject a Node pin below the new CLI engine before modifying the project; never raise it silently", continue-on-failure = true }, { argv = ["vpt", "print-file", ".node-version"], comment = "stays 24.3.0", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "engines.node stays 24.x and devEngines.runtime node stays ^24 (preserved, not raised)", continue-on-failure = true }, - { argv = ["vpt", "print-file", "pnpm-workspace.yaml"], comment = "vite-stack catalog updated to the migration target", continue-on-failure = true }, + { argv = ["vpt", "print-file", "pnpm-workspace.yaml"], comment = "catalog remains unchanged after failed preflight", continue-on-failure = true }, + { argv = ["vpt", "write-file", ".node-version", "24.11.0\n"], comment = "the user explicitly selects a supported runtime", snapshot = false }, + { argv = ["vp", "migrate", "--no-interactive"], comment = "migration can proceed without changing the public engine contract", continue-on-failure = true }, ] diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots/migration_preserve_below_policy_node_pins.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots/migration_preserve_below_policy_node_pins.md index 12d3b03dcb..59f6075606 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots/migration_preserve_below_policy_node_pins.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_preserve_below_policy_node_pins/snapshots/migration_preserve_below_policy_node_pins.md @@ -2,17 +2,21 @@ ## `vp migrate --no-interactive` -existing Vite+ project: a Node pin below the supported range is preserved, not raised (native binding supports Node >=20) +reject a Node pin below the new CLI engine before modifying the project; never raise it silently + +**Exit code:** 1 ``` VITE+ - The Unified Toolchain for the Web -◇ Updated . to Vite+ -• Node pnpm -• Dependencies: - vite-plus 0.1.21 → - vite → -• Package manager settings configured +Vitest v5: 2 review items (1 block dependency updates) + +.node-version + 1:1 BLOCK [node-runtime] .node-version (24.3.0) cannot run Vite+ with Vitest v5. Select Node ^22.18.0 || ^24.11.0 || >=26.0.0; use vp env pin 22 --force for a runtime pin. Do not widen a library's engines.node contract automatically. + +package.json + 1:1 REVIEW [node-runtime] engines.node (24.x) includes unsupported test runtimes. Pin the test/CI runtime to Node ^22.18.0 || ^24.11.0 || >=26.0.0; keep the library's public engine contract separate. +Resolve the blocking Vitest v5 findings, then re-run `vp migrate`. No project files were changed. ``` ## `vpt print-file .node-version` @@ -55,7 +59,7 @@ engines.node stays 24.x and devEngines.runtime node stays ^24 (preserved, not ra ## `vpt print-file pnpm-workspace.yaml` -vite-stack catalog updated to the migration target +catalog remains unchanged after failed preflight ``` packages: @@ -64,12 +68,36 @@ packages: catalogs: vite-stack: vite: npm:@voidzero-dev/vite-plus-core@ + vitest: npm:@voidzero-dev/vite-plus-test@0.1.21 vite-plus: -overrides: - vite@*: catalog:vite-stack -peerDependencyRules: - allowAny: - - vite - allowedVersions: - vite: '*' +``` + +## `vpt write-file .node-version '24.11.0 +'` + +the user explicitly selects a supported runtime + + +## `vp migrate --no-interactive` + +migration can proceed without changing the public engine contract + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [node-runtime] engines.node (24.x) includes unsupported test runtimes. Pin the test/CI runtime to Node ^22.18.0 || ^24.11.0 || >=26.0.0; keep the library's public engine contract separate. +◇ Updated . to Vite+ +• Node pnpm +• Dependencies: + vite-plus 0.1.21 → + vite → +• Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [node-runtime] engines.node (24.x) includes unsupported test runtimes. Pin the test/CI runtime to Node ^22.18.0 || ^24.11.0 || >=26.0.0; keep the library's public engine contract separate. ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots.toml index 6925688aca..702fe11fcd 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_rewrite_declare_module" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "retained vitest augmentations should keep a package-local vitest", continue-on-failure = true }, { argv = ["vpt", "print-file", "src/index.ts"], comment = "declare module 'vite'/'vitest' outside config files are preserved: through the core alias a 'vite' augmentation reaches the UserConfig that types vite-plus defineConfig, while vite-plus exports no UserConfig symbol to merge a rewritten augmentation with", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "check package.json", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots/migration_rewrite_declare_module.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots/migration_rewrite_declare_module.md index f3c4113b66..db7fc0b9a2 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots/migration_rewrite_declare_module.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_declare_module/snapshots/migration_rewrite_declare_module.md @@ -1,5 +1,10 @@ # migration_rewrite_declare_module +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` retained vitest augmentations should keep a package-local vitest @@ -7,6 +12,10 @@ retained vitest augmentations should keep a package-local vitest ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/package.json index bacbc28e4e..5f6c39340a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/package.json @@ -2,6 +2,6 @@ "name": "migration-rewrite-reference-types", "devDependencies": { "vite": "^6.0.0", - "vitest": "^3.0.0" + "vitest": "^4.1.0" } } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/snapshots/migration_rewrite_reference_types.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/snapshots/migration_rewrite_reference_types.md index b38abf818e..7b1a8db528 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/snapshots/migration_rewrite_reference_types.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_rewrite_reference_types/snapshots/migration_rewrite_reference_types.md @@ -7,6 +7,10 @@ vitest/tsdown reference types are rewritten; vite references are preserved (issu ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default and uses exact browser locators. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots.toml index 57e698ea19..ff9c166fb5 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_skip_vite_dependency" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "migration should skip rewriting vite imports when vite is in dependencies", continue-on-failure = true }, { argv = ["vpt", "print-file", "src/index.ts"], comment = "vite imports should NOT be rewritten, vitest imports SHOULD be rewritten", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "check package.json", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots/migration_skip_vite_dependency.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots/migration_skip_vite_dependency.md index 9663a94770..97d90891a5 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots/migration_skip_vite_dependency.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_dependency/snapshots/migration_skip_vite_dependency.md @@ -1,5 +1,10 @@ # migration_skip_vite_dependency +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` migration should skip rewriting vite imports when vite is in dependencies @@ -7,6 +12,10 @@ migration should skip rewriting vite imports when vite is in dependencies ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots.toml index 45f4bd7dda..a8d3af4afc 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_skip_vite_peer_dependency" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "migration should preserve vite peer contracts", continue-on-failure = true }, { argv = ["vpt", "print-file", "src/index.ts"], comment = "vite imports stay public, vitest imports rewrite", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "vite peer range is preserved", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots/migration_skip_vite_peer_dependency.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots/migration_skip_vite_peer_dependency.md index 8ace240699..d51c0aabe5 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots/migration_skip_vite_peer_dependency.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_skip_vite_peer_dependency/snapshots/migration_skip_vite_peer_dependency.md @@ -1,5 +1,10 @@ # migration_skip_vite_peer_dependency +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` migration should preserve vite peer contracts @@ -7,6 +12,10 @@ migration should preserve vite peer contracts ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_npm/snapshots/migration_standalone_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_npm/snapshots/migration_standalone_npm.md index 05a6fe8589..017d2d446a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_npm/snapshots/migration_standalone_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_npm/snapshots/migration_standalone_npm.md @@ -7,6 +7,11 @@ migration should work with npm, add overrides, and update lockfile ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + Formatting code... Code formatted diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_pnpm/snapshots/migration_standalone_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_pnpm/snapshots/migration_standalone_pnpm.md index 08aa2e4839..d4b4405aaf 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_pnpm/snapshots/migration_standalone_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_pnpm/snapshots/migration_standalone_pnpm.md @@ -7,6 +7,11 @@ migration should work with pnpm, write overrides and peerDependencyRules to pnpm ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + Formatting code... Code formatted diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn4_idempotent/snapshots/migration_standalone_yarn4_idempotent.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn4_idempotent/snapshots/migration_standalone_yarn4_idempotent.md index a721c83007..582a2f8b84 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn4_idempotent/snapshots/migration_standalone_yarn4_idempotent.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn4_idempotent/snapshots/migration_standalone_yarn4_idempotent.md @@ -7,6 +7,11 @@ implicit Yarn Berry PnP converts before the first pass ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + ⚠ Vite+ does not currently support Yarn Plug'n'Play (PnP). ✔ Switched Yarn to node-modules mode diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn_below_catalog/snapshots/migration_standalone_yarn_below_catalog.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn_below_catalog/snapshots/migration_standalone_yarn_below_catalog.md index f533720f40..1c8e88df7a 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn_below_catalog/snapshots/migration_standalone_yarn_below_catalog.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_standalone_yarn_below_catalog/snapshots/migration_standalone_yarn_below_catalog.md @@ -7,6 +7,11 @@ Yarn < 4.10.0 cannot resolve `catalog:`, so managed specs stay concrete ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + ⚠ Vite+ does not currently support Yarn Plug'n'Play (PnP). ✔ Switched Yarn to node-modules mode diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_peer_only_pnpm/snapshots/migration_upgrade_browser_peer_only_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_peer_only_pnpm/snapshots/migration_upgrade_browser_peer_only_pnpm.md index caddc39162..f7584dcd56 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_peer_only_pnpm/snapshots/migration_upgrade_browser_peer_only_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_peer_only_pnpm/snapshots/migration_upgrade_browser_peer_only_pnpm.md @@ -71,5 +71,13 @@ repaired project should no longer be pending ``` VITE+ - The Unified Toolchain for the Web -This project is already using Vite+! Happy coding! +◇ Updated . to Vite+ +• Node pnpm +• Dependencies: + vite → +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default and uses exact browser locators. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots.toml index 5fcc933381..a5b5034a56 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_upgrade_browser_source_only_pnpm" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "source-only browser provider should be restored", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "provider, framework peer, and local vitest should be present", continue-on-failure = true }, { argv = ["vpt", "print-file", "pnpm-workspace.yaml"], comment = "shared vitest catalog and override should be present", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots/migration_upgrade_browser_source_only_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots/migration_upgrade_browser_source_only_pnpm.md index 9f857f2cc1..cde2d633da 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots/migration_upgrade_browser_source_only_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_source_only_pnpm/snapshots/migration_upgrade_browser_source_only_pnpm.md @@ -1,5 +1,10 @@ # migration_upgrade_browser_source_only_pnpm +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` source-only browser provider should be restored diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots.toml index ae1ea23cc3..4300fcd93c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_upgrade_browser_webdriverio_pnpm" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "source-only WebdriverIO provider should be restored", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "provider, webdriverio, and local vitest should be present", continue-on-failure = true }, { argv = ["vpt", "print-file", "pnpm-workspace.yaml"], comment = "driver builds and shared vitest should be enabled", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots/migration_upgrade_browser_webdriverio_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots/migration_upgrade_browser_webdriverio_pnpm.md index fdf43408bc..5ffaab714e 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots/migration_upgrade_browser_webdriverio_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_browser_webdriverio_pnpm/snapshots/migration_upgrade_browser_webdriverio_pnpm.md @@ -1,5 +1,10 @@ # migration_upgrade_browser_webdriverio_pnpm +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` source-only WebdriverIO provider should be restored @@ -48,7 +53,7 @@ catalog: vite: npm:@voidzero-dev/vite-plus-core@ vite-plus: vitest: - '@vitest/browser-webdriverio': + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 overrides: vite@*: 'catalog:' vitest@*: 'catalog:' diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_bun_catalog/snapshots/migration_upgrade_bun_catalog.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_bun_catalog/snapshots/migration_upgrade_bun_catalog.md index b694a66f21..786beda9ca 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_bun_catalog/snapshots/migration_upgrade_bun_catalog.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_bun_catalog/snapshots/migration_upgrade_bun_catalog.md @@ -7,12 +7,21 @@ existing bun Vite+ catalog WORKSPACE gains a direct vite edge for bun#8406 (bun ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node bun • Dependencies: vite-plus 0.1.20 → vite → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_deprecated_coverage_c8_npm/snapshots/migration_upgrade_deprecated_coverage_c8_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_deprecated_coverage_c8_npm/snapshots/migration_upgrade_deprecated_coverage_c8_npm.md index 1559bb6fe7..0d791d9cc9 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_deprecated_coverage_c8_npm/snapshots/migration_upgrade_deprecated_coverage_c8_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_deprecated_coverage_c8_npm/snapshots/migration_upgrade_deprecated_coverage_c8_npm.md @@ -7,6 +7,10 @@ deprecated coverage-c8 has an independent version line ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node npm • Dependencies: @@ -14,6 +18,11 @@ VITE+ - The Unified Toolchain for the Web vite → vitest 4.1.8 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/.nvmrc b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/.nvmrc index 5bd6811705..0a492611a0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/.nvmrc +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/.nvmrc @@ -1 +1 @@ -20.19.0 +24.11.0 diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/snapshots/migration_upgrade_hooks_flag_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/snapshots/migration_upgrade_hooks_flag_pnpm.md index 9686b0da9e..bd0ef42a13 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/snapshots/migration_upgrade_hooks_flag_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_hooks_flag_pnpm/snapshots/migration_upgrade_hooks_flag_pnpm.md @@ -10,6 +10,10 @@ existing Vite+ project: upgrade plus only the git hooks action ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_monorepo_vitest_localized_pnpm/snapshots/migration_upgrade_monorepo_vitest_localized_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_monorepo_vitest_localized_pnpm/snapshots/migration_upgrade_monorepo_vitest_localized_pnpm.md index c5969a996a..aa0ca72bed 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_monorepo_vitest_localized_pnpm/snapshots/migration_upgrade_monorepo_vitest_localized_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_monorepo_vitest_localized_pnpm/snapshots/migration_upgrade_monorepo_vitest_localized_pnpm.md @@ -7,12 +7,21 @@ existing Vite+ workspace packages should be reconciled ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: vite-plus latest → vite → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +packages/app/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_nuxt_test_utils_monorepo/snapshots/migration_upgrade_nuxt_test_utils_monorepo.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_nuxt_test_utils_monorepo/snapshots/migration_upgrade_nuxt_test_utils_monorepo.md index 465554a573..b35590d70e 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_nuxt_test_utils_monorepo/snapshots/migration_upgrade_nuxt_test_utils_monorepo.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_nuxt_test_utils_monorepo/snapshots/migration_upgrade_nuxt_test_utils_monorepo.md @@ -7,6 +7,13 @@ preserve upstream Vitest package-wide and localize it to the affected workspace ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 2 review items + +packages/nuxt/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/unit/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: @@ -15,6 +22,14 @@ VITE+ - The Unified Toolchain for the Web • 1 file had imports rewritten • Kept upstream `vitest` imports in 2 files for @nuxt/test-utils compatibility • Package manager settings configured +! Warnings: + - Vitest v5: 2 review items + +packages/nuxt/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/unit/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file packages/nuxt/package.json` @@ -112,5 +127,12 @@ workspace result is idempotent ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 2 review items + +packages/nuxt/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. + +packages/unit/package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. This project is already using Vite+! Happy coding! ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_peer_vitest_catalog_pnpm/snapshots/migration_upgrade_peer_vitest_catalog_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_peer_vitest_catalog_pnpm/snapshots/migration_upgrade_peer_vitest_catalog_pnpm.md index 9c3d0f07fa..46a6337a93 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_peer_vitest_catalog_pnpm/snapshots/migration_upgrade_peer_vitest_catalog_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_peer_vitest_catalog_pnpm/snapshots/migration_upgrade_peer_vitest_catalog_pnpm.md @@ -7,12 +7,21 @@ peer catalog must resolve before managed Vitest catalogs are pruned ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: vite-plus latest → vite → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` @@ -65,5 +74,9 @@ repaired project should no longer be pending ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. This project is already using Vite+! Happy coding! ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots.toml index 2cac60d5fb..bcbbc6553f 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots.toml @@ -1,7 +1,7 @@ [[case]] name = "migration_upgrade_pkg_pr_new_npm" vp = "global" -env = { VP_OVERRIDE_PACKAGES = "{\"vite\":\"npm:@voidzero-dev/vite-plus-core@0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617\",\"vitest\":\"4.1.10\"}", VP_VERSION = "0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617" } +env = { VP_OVERRIDE_PACKAGES = "{\"vite\":\"npm:@voidzero-dev/vite-plus-core@0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617\",\"vitest\":\"5.0.0\"}", VP_VERSION = "0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617" } steps = [ { argv = ["vp", "migrate", "--no-interactive"], comment = "bridge commit builds replace every stale managed spec", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "direct dependencies and npm overrides use the same immutable commit version", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots/migration_upgrade_pkg_pr_new_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots/migration_upgrade_pkg_pr_new_npm.md index 3af614f730..8c2a658107 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots/migration_upgrade_pkg_pr_new_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_npm/snapshots/migration_upgrade_pkg_pr_new_npm.md @@ -7,12 +7,21 @@ bridge commit builds replace every stale managed spec ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node npm • Dependencies: vite-plus 0.1.20 → vite → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` @@ -40,6 +49,10 @@ bridge commit migration is idempotent ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. This project is already using Vite+! Happy coding! ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots.toml index 195da5bf86..9c44fb93df 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots.toml @@ -1,7 +1,7 @@ [[case]] name = "migration_upgrade_pkg_pr_new_pnpm" vp = "global" -env = { VP_OVERRIDE_PACKAGES = "{\"vite\":\"npm:@voidzero-dev/vite-plus-core@0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617\",\"vitest\":\"4.1.10\"}", VP_VERSION = "0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617" } +env = { VP_OVERRIDE_PACKAGES = "{\"vite\":\"npm:@voidzero-dev/vite-plus-core@0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617\",\"vitest\":\"5.0.0\"}", VP_VERSION = "0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617" } steps = [ { argv = ["vp", "migrate", "--no-interactive"], comment = "bridge commit builds upgrade like an ordinary npm version", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "direct dependencies use catalogs aligned to the bridge build", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots/migration_upgrade_pkg_pr_new_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots/migration_upgrade_pkg_pr_new_pnpm.md index 59094af3ff..ed7eace139 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots/migration_upgrade_pkg_pr_new_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pkg_pr_new_pnpm/snapshots/migration_upgrade_pkg_pr_new_pnpm.md @@ -7,6 +7,10 @@ bridge commit builds upgrade like an ordinary npm version ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: @@ -15,6 +19,11 @@ VITE+ - The Unified Toolchain for the Web vitest 0.1.20 → @vitest/coverage-v8 4.1.6 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` @@ -70,6 +79,10 @@ bridge commit migration is idempotent ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. This project is already using Vite+! Happy coding! ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots.toml index 2dd891519b..f936f856c5 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots.toml @@ -1,7 +1,7 @@ [[case]] name = "migration_upgrade_pnpm9_overrides" vp = "global" -env = { VP_OVERRIDE_PACKAGES = "{\"vite\":\"npm:@voidzero-dev/vite-plus-core@0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617\",\"vitest\":\"4.1.10\"}", VP_VERSION = "0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617" } +env = { VP_OVERRIDE_PACKAGES = "{\"vite\":\"npm:@voidzero-dev/vite-plus-core@0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617\",\"vitest\":\"5.0.0\"}", VP_VERSION = "0.0.0-commit.0c515e3fbf5c140db35280d700df0bd600838617" } steps = [ { argv = ["vp", "migrate", "--no-interactive"], comment = "pnpm 9.5-10.6.1: settings stay in package.json, catalog is still rewritten off the wrappers", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "pnpm.overrides stay catalog: (not inlined to a version)", continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots/migration_upgrade_pnpm9_overrides.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots/migration_upgrade_pnpm9_overrides.md index 79bec01712..1fd1d3c898 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots/migration_upgrade_pnpm9_overrides.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_pnpm9_overrides/snapshots/migration_upgrade_pnpm9_overrides.md @@ -7,6 +7,10 @@ pnpm 9.5-10.6.1: settings stay in package.json, catalog is still rewritten off t ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: @@ -15,6 +19,11 @@ VITE+ - The Unified Toolchain for the Web vitest 0.1.20 → @vitest/coverage-v8 4.1.6 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_required_vitest_peer_metadata_npm/snapshots/migration_upgrade_required_vitest_peer_metadata_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_required_vitest_peer_metadata_npm/snapshots/migration_upgrade_required_vitest_peer_metadata_npm.md index 0df8aa080f..c37ca047b0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_required_vitest_peer_metadata_npm/snapshots/migration_upgrade_required_vitest_peer_metadata_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_required_vitest_peer_metadata_npm/snapshots/migration_upgrade_required_vitest_peer_metadata_npm.md @@ -7,6 +7,10 @@ clean checkout conservatively preserves existing Vitest ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node npm • Dependencies: @@ -14,6 +18,11 @@ VITE+ - The Unified Toolchain for the Web vite → vitest 4.1.8 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` @@ -57,5 +66,9 @@ metadata confirms the unnamed required Vitest peer ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. This project is already using Vite+! Happy coding! ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/.nvmrc b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/.nvmrc index 5bd6811705..0a492611a0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/.nvmrc +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/.nvmrc @@ -1 +1 @@ -20.19.0 +24.11.0 diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/snapshots/migration_upgrade_setup_full_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/snapshots/migration_upgrade_setup_full_pnpm.md index 1ff640f201..649f56e446 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/snapshots/migration_upgrade_setup_full_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_full_pnpm/snapshots/migration_upgrade_setup_full_pnpm.md @@ -14,6 +14,10 @@ existing Vite+ project: upgrade plus the full setup ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: @@ -53,7 +57,7 @@ vite-plus version upgrade is applied .nvmrc is migrated to .node-version by the full setup ``` -20.19.0 +24.11.0 ``` ## `vpt stat-file .nvmrc --assert-not file` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/.nvmrc b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/.nvmrc index 5bd6811705..0a492611a0 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/.nvmrc +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/.nvmrc @@ -1 +1 @@ -20.19.0 +24.11.0 diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/snapshots/migration_upgrade_setup_skipped_default_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/snapshots/migration_upgrade_setup_skipped_default_pnpm.md index dced98c173..89362e455e 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/snapshots/migration_upgrade_setup_skipped_default_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_setup_skipped_default_pnpm/snapshots/migration_upgrade_setup_skipped_default_pnpm.md @@ -7,6 +7,10 @@ existing Vite+ project: upgrade the toolchain version only, skip the full setup ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: @@ -14,6 +18,11 @@ VITE+ - The Unified Toolchain for the Web vite → • Package manager settings configured • Skipped editor, hooks, and lint setup. Run `vp migrate --full` to apply them. +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_stale_local_pnpm/snapshots/migration_upgrade_stale_local_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_stale_local_pnpm/snapshots/migration_upgrade_stale_local_pnpm.md index e02b10c9fb..595b32294f 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_stale_local_pnpm/snapshots/migration_upgrade_stale_local_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_stale_local_pnpm/snapshots/migration_upgrade_stale_local_pnpm.md @@ -10,12 +10,21 @@ newer global CLI must bypass the installed stale local CLI ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: vite-plus 0.1.24 → vite → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/pnpm-workspace.yaml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/pnpm-workspace.yaml index 9e76cdd806..ce4cfd2128 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/pnpm-workspace.yaml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/pnpm-workspace.yaml @@ -4,5 +4,5 @@ packages: catalog: vite-plus: 0.1.21 vite: npm:@voidzero-dev/vite-plus-core@0.1.21 - vitest: 3.2.4 - '@vitest/coverage-v8': 3.2.4 + vitest: 4.1.8 + '@vitest/coverage-v8': 4.1.8 diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/snapshots/migration_upgrade_version_table_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/snapshots/migration_upgrade_version_table_pnpm.md index 6f4a2ff727..d829b8b8cc 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/snapshots/migration_upgrade_version_table_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_version_table_pnpm/snapshots/migration_upgrade_version_table_pnpm.md @@ -12,12 +12,21 @@ existing-Vite+ upgrade shows the toolchain version-change table with the raw vit ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node pnpm • Dependencies: vite-plus 0.1.21 → vite 8.0.0 → - vitest 3.2.4 → - @vitest/coverage-v8 3.2.4 → + vitest 4.1.8 → + @vitest/coverage-v8 4.1.8 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vite_plus_protocol_pin_npm/snapshots/migration_upgrade_vite_plus_protocol_pin_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vite_plus_protocol_pin_npm/snapshots/migration_upgrade_vite_plus_protocol_pin_npm.md index 5837313658..4d480b3630 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vite_plus_protocol_pin_npm/snapshots/migration_upgrade_vite_plus_protocol_pin_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vite_plus_protocol_pin_npm/snapshots/migration_upgrade_vite_plus_protocol_pin_npm.md @@ -7,11 +7,20 @@ deliberate vite-plus protocol pin must survive bootstrap ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node npm • Dependencies: vite → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_exact_peer_npm/snapshots/migration_upgrade_vitest_exact_peer_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_exact_peer_npm/snapshots/migration_upgrade_vitest_exact_peer_npm.md index e70c98d085..64b032b8cd 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_exact_peer_npm/snapshots/migration_upgrade_vitest_exact_peer_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_exact_peer_npm/snapshots/migration_upgrade_vitest_exact_peer_npm.md @@ -7,6 +7,10 @@ exact @vitest peers require a package-local vitest ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node npm • Dependencies: @@ -18,6 +22,11 @@ VITE+ - The Unified Toolchain for the Web @vitest/utils 4.1.8 → @vitest/web-worker 4.1.8 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_non_runtime_only_npm/snapshots/migration_upgrade_vitest_non_runtime_only_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_non_runtime_only_npm/snapshots/migration_upgrade_vitest_non_runtime_only_npm.md index 77366f0439..f4ef069a69 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_non_runtime_only_npm/snapshots/migration_upgrade_vitest_non_runtime_only_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_non_runtime_only_npm/snapshots/migration_upgrade_vitest_non_runtime_only_npm.md @@ -7,14 +7,24 @@ non-runtime @vitest packages must not keep a vitest pin ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 2 review items + +package.json + 1:1 REVIEW [legacy-dependency] Review the direct @vitest/ws-client dependency after migrating its imports; it is no longer part of the bundled Vitest graph. + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node npm • Dependencies: - vite-plus latest → - vite → - @vitest/utils 4.1.8 → - @vitest/ws-client 4.1.8 → + vite-plus latest → + vite → + @vitest/utils 4.1.8 → • Package manager settings configured +! Warnings: + - Vitest v5: 2 review items + +package.json + 1:1 REVIEW [legacy-dependency] Review the direct @vitest/ws-client dependency after migrating its imports; it is no longer part of the bundled Vitest graph. + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` @@ -27,7 +37,7 @@ internal packages align, eslint plugin stays independent, vitest is removed "devDependencies": { "@vitest/eslint-plugin": "^1.6.0", "@vitest/utils": "", - "@vitest/ws-client": "", + "@vitest/ws-client": "^4.1.8", "vite-plus": "" }, "overrides": { diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_reference_whitespace_pnpm/snapshots/migration_upgrade_vitest_reference_whitespace_pnpm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_reference_whitespace_pnpm/snapshots/migration_upgrade_vitest_reference_whitespace_pnpm.md index 3ace8f239c..f90da7940c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_reference_whitespace_pnpm/snapshots/migration_upgrade_vitest_reference_whitespace_pnpm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_reference_whitespace_pnpm/snapshots/migration_upgrade_vitest_reference_whitespace_pnpm.md @@ -7,6 +7,10 @@ TypeScript whitespace in a Vitest type directive is valid ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_retained_references_npm/snapshots/migration_upgrade_vitest_retained_references_npm.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_retained_references_npm/snapshots/migration_upgrade_vitest_retained_references_npm.md index ed98a9fea3..965fecdf78 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_retained_references_npm/snapshots/migration_upgrade_vitest_retained_references_npm.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_upgrade_vitest_retained_references_npm/snapshots/migration_upgrade_vitest_retained_references_npm.md @@ -7,6 +7,10 @@ retained upstream references require package-local Vitest ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Updated . to Vite+ • Node npm • Dependencies: @@ -14,6 +18,11 @@ VITE+ - The Unified Toolchain for the Web vite → vitest 4.1.8 → • Package manager settings configured +! Warnings: + - Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ``` ## `vpt print-file package.json` @@ -90,5 +99,9 @@ retained references remain stable on rerun ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. This project is already using Vite+! Happy coding! ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_import_only/snapshots/migration_vitest_import_only.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_import_only/snapshots/migration_vitest_import_only.md index c31bf9f0dc..54f0c0c0c9 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_import_only/snapshots/migration_vitest_import_only.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_import_only/snapshots/migration_vitest_import_only.md @@ -7,6 +7,10 @@ ordinary vitest imports should migrate without retaining direct vitest ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied, 1 file had imports rewritten diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots.toml index 4b4ca5ffeb..16de4053ab 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots.toml @@ -2,6 +2,7 @@ name = "migration_vitest_peer_dep" vp = "global" steps = [ + { argv = ["vpt", "write-file", "node_modules/vitest/package.json", "{\"name\":\"vitest\",\"version\":\"4.1.11\"}"], comment = "record the original runner version without adding a direct dependency", snapshot = false }, { argv = ["vp", "migrate", "--no-interactive"], comment = "vitest should be added to devDeps when vitest-browser-svelte is present", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "vitest should be in devDependencies", continue-on-failure = true }, { argv = ["vpt", "print-file", "pnpm-workspace.yaml"], continue-on-failure = true }, diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots/migration_vitest_peer_dep.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots/migration_vitest_peer_dep.md index 17f735d8f0..dedf529414 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots/migration_vitest_peer_dep.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_peer_dep/snapshots/migration_vitest_peer_dep.md @@ -1,5 +1,10 @@ # migration_vitest_peer_dep +## `vpt write-file node_modules/vitest/package.json '{"name":"vitest","version":"4.1.11"}'` + +record the original runner version without adding a direct dependency + + ## `vp migrate --no-interactive` vitest should be added to devDeps when vitest-browser-svelte is present @@ -7,6 +12,10 @@ vitest should be added to devDeps when vitest-browser-svelte is present ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default and uses exact browser locators. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_unmanaged_override/snapshots/migration_vitest_unmanaged_override.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_unmanaged_override/snapshots/migration_vitest_unmanaged_override.md index 8278e5fb88..ee88facaf2 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_unmanaged_override/snapshots/migration_vitest_unmanaged_override.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_unmanaged_override/snapshots/migration_vitest_unmanaged_override.md @@ -7,6 +7,10 @@ vitest omitted from managed overrides must remain user-owned ``` VITE+ - The Unified Toolchain for the Web +Vitest v5: 1 review item + +package.json + 1:1 REVIEW [configless-defaults] No test config exists. Vitest v5 clears mocks by default. A separate confirmed action can create compatibility config, but a new config can change config discovery and project structure. ◇ Migrated . to Vite+ • Node pnpm • 2 config updates applied diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/example.test.ts b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/example.test.ts new file mode 100644 index 0000000000..853beb85e1 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/example.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from 'vitest'; + +test.sequential('compatibility', () => { + expect(Promise.resolve(42)).resolves.toBe(42); + expect(() => { throw new Error(''); }).toThrow(''); +}); diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/package.json new file mode 100644 index 0000000000..59c0e1da8b --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/package.json @@ -0,0 +1,13 @@ +{ + "name": "migration-vitest-v5", + "private": true, + "type": "module", + "packageManager": "pnpm@11.24.0", + "scripts": { + "test": "vitest list" + }, + "devDependencies": { + "vite": "^8.0.0", + "vitest": "4.1.11" + } +} diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots.toml new file mode 100644 index 0000000000..194387c3cc --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots.toml @@ -0,0 +1,94 @@ +[[case]] +name = "compatibility" +vp = "global" +steps = [ + ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], + ["vpt", "print-file", "vite.config.ts"], + ["vpt", "print-file", "example.test.ts"], + ["vpt", "print-file", "package.json"], + ["vpt", "print-file", ".vite-plus/migrations.json"], + ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], +] + +[[case]] +name = "node_preflight" +vp = "global" +steps = [ + { argv = ["vpt", "write-file", ".node-version", "20.19.0\n"], snapshot = false }, + { argv = ["vp", "migrate", "--no-interactive"], continue-on-failure = true }, + ["vpt", "print-file", "package.json"], + ["vpt", "print-file", "example.test.ts"], +] + +[[case]] +name = "node_container_scope" +vp = "global" +comment = "Check the runtime image and feature option, not source properties or Dev Container feature tags." +steps = [ + { argv = ["vpt", "write-file", "worker.js", "export const options = { node:2 };\n"], snapshot = false }, + { argv = ["vpt", "write-file", ".devcontainer/devcontainer.json", "{\"features\":{\"ghcr.io/devcontainers/features/node:1\":{\"version\":\"lts\"}}}\n"], snapshot = false }, + { argv = ["vpt", "write-file", "Dockerfile", "# FROM node:20\nFROM node:20-alpine AS build\nRUN echo node:2\n"], snapshot = false }, + { argv = ["vp", "migrate", "--no-interactive"], continue-on-failure = true }, + ["vpt", "print-file", "package.json"], + { argv = ["vpt", "write-file", "Dockerfile", "# FROM node:20\nFROM node:24.11.0-alpine AS build\nRUN echo node:2\n"], snapshot = false }, + ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], + ["vpt", "print-file", "worker.js"], + ["vpt", "print-file", ".devcontainer/devcontainer.json"], +] + +[[case]] +name = "mixed_project_assertions" +vp = "global" +comment = "Keep Node DOM matchers, migrate browser matchers, and retain review findings for shared transform inputs across repeated migrations." +steps = [ + { argv = ["vpt", "write-file", "vite.config.ts", "export default { test: { projects: [{ test: { name: 'node', include: ['node.test.ts', 'shared.test.ts'] } }, { test: { name: 'browser', browser: { enabled: true }, include: ['browser.test.ts', 'shared.test.ts'] } }] } };\n"], snapshot = false }, + { argv = ["vpt", "write-file", "node.test.ts", "import { expect } from 'vitest';\nexpect(element).toHaveTextContent('partial');\n"], snapshot = false }, + { argv = ["vpt", "write-file", "browser.test.ts", "import { expect } from 'vitest';\nawait expect.element(element)['toHaveTextContent']('partial');\n"], snapshot = false }, + { argv = ["vpt", "write-file", "shared.test.ts", "import { expect } from 'vitest';\nexpect(element).toHaveTextContent('partial');\n"], snapshot = false }, + ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], + ["vpt", "print-file", "node.test.ts"], + ["vpt", "print-file", "browser.test.ts"], + ["vpt", "print-file", "shared.test.ts"], + ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], +] + +[[case]] +name = "plugin_projects_and_dom_types" +vp = "global" +comment = "Do not scan plugin project paths as Vitest configs; report the Jest-only DOM type entry without changing a mixed test contract." +steps = [ + { argv = ["vpt", "write-file", "vite.config.ts", "import { defineConfig } from 'vitest/config';\nconst config = defineConfig({ plugins: [{ name: 'paths', projects: ['./tsconfig.json', './plugin-options.ts'] }], test: {} });\nexport default config;\n"], snapshot = false }, + { argv = ["vpt", "write-file", "tsconfig.json", "{\"compilerOptions\":{\"types\":[\"@testing-library/jest-dom\",\"vitest/globals\"]}}\n"], snapshot = false }, + { argv = ["vpt", "write-file", "plugin-options.ts", "export default { test: {} };\n"], snapshot = false }, + ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], + ["vpt", "print-file", "plugin-options.ts"], + ["vpt", "print-file", "tsconfig.json"], +] + +[[case]] +name = "removed_api_preflight" +vp = "global" +steps = [ + { argv = ["vpt", "write-file", "custom-runner.ts", "import { startTests } from '@vitest/runner';\nstartTests([]);\n"], snapshot = false }, + { argv = ["vp", "migrate", "--no-interactive"], continue-on-failure = true }, + ["vpt", "print-file", "package.json"], +] + +[[case]] +name = "api_conflict_preflight" +vp = "global" +steps = [ + { argv = ["vpt", "write-file", "vite.config.ts", "export default { test: { api: { port: 1 }, browser: { api: { port: 2 } } } };\n"], snapshot = false }, + { argv = ["vp", "migrate", "--no-interactive"], continue-on-failure = true }, + ["vpt", "print-file", "package.json"], +] + +[[case]] +name = "benchmark_preflight" +vp = "global" +steps = [ + { argv = ["vpt", "write-file", "example.bench.ts", "import { bench } from 'vitest';\nbench('old benchmark', () => 20 + 22);\n"], snapshot = false }, + { argv = ["vp", "migrate", "--no-interactive"], continue-on-failure = true }, + ["vpt", "print-file", "package.json"], + ["vpt", "print-file", "example.bench.ts"], +] diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/api_conflict_preflight.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/api_conflict_preflight.md new file mode 100644 index 0000000000..72023e2592 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/api_conflict_preflight.md @@ -0,0 +1,37 @@ +# api_conflict_preflight + +## `vpt write-file vite.config.ts 'export default { test: { api: { port: 1 }, browser: { api: { port: 2 } } } }; +'` + + +## `vp migrate --no-interactive` + +**Exit code:** 1 + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item (1 block dependency updates) + +vite.config.ts + 1:55 BLOCK [api-conflict] Resolve conflicting test.api and test.browser.api values before upgrading. +Resolve the blocking Vitest v5 findings, then re-run `vp migrate`. No project files were changed. +``` + +## `vpt print-file package.json` + +``` +{ + "name": "migration-vitest-v5", + "private": true, + "type": "module", + "packageManager": "pnpm@11.24.0", + "scripts": { + "test": "vitest list" + }, + "devDependencies": { + "vite": "^8.0.0", + "vitest": "" + } +} +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/benchmark_preflight.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/benchmark_preflight.md new file mode 100644 index 0000000000..dbfbc7c8e5 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/benchmark_preflight.md @@ -0,0 +1,45 @@ +# benchmark_preflight + +## `vpt write-file example.bench.ts 'import { bench } from '\''vitest'\''; +bench('\''old benchmark'\'', () => 20 + 22); +'` + + +## `vp migrate --no-interactive` + +**Exit code:** 1 + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item (1 block dependency updates) + +example.bench.ts + 1:10 BLOCK [benchmark-api] Replace the removed top-level bench import with the bench test-context fixture. +Resolve the blocking Vitest v5 findings, then re-run `vp migrate`. No project files were changed. +``` + +## `vpt print-file package.json` + +``` +{ + "name": "migration-vitest-v5", + "private": true, + "type": "module", + "packageManager": "pnpm@11.24.0", + "scripts": { + "test": "vitest list" + }, + "devDependencies": { + "vite": "^8.0.0", + "vitest": "" + } +} +``` + +## `vpt print-file example.bench.ts` + +``` +import { bench } from 'vitest'; +bench('old benchmark', () => 20 + 22); +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/compatibility.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/compatibility.md new file mode 100644 index 0000000000..1d3b3bbc25 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/compatibility.md @@ -0,0 +1,79 @@ +# compatibility + +## `vp migrate --no-interactive --no-hooks --no-agent --no-editor` + +``` +VITE+ - The Unified Toolchain for the Web + +◇ Migrated . to Vite+ +• Node pnpm +• 2 files had imports rewritten +``` + +## `vpt print-file vite.config.ts` + +``` +import { defineConfig } from 'vite-plus'; + +export default defineConfig({ + fmt: {}, + lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}}, + test: { + clearMocks: false, + sharedViteServer: false, + reporters: [['json', { stdout: true }], ['junit', { stdout: true }]], + projects: [{ extends: false, test: { clearMocks: false, name: 'unit' } }, { extends: true, test: { name: 'inherited' } }], + }, +}); +``` + +## `vpt print-file example.test.ts` + +``` +import { expect, test } from 'vite-plus/test'; + +test('compatibility', { concurrent: false }, async () => { + await expect(Promise.resolve(42)).resolves.toBe(42); + expect(() => { throw new Error(''); }).toThrow(/^$/); +}); +``` + +## `vpt print-file package.json` + +``` +{ + "name": "migration-vitest-v5", + "private": true, + "type": "module", + "packageManager": "pnpm@11.24.0", + "scripts": { + "test": "vp test list --no-static-parse" + }, + "devDependencies": { + "vite": "catalog:", + "vite-plus": "catalog:" + } +} +``` + +## `vpt print-file .vite-plus/migrations.json` + +``` +{ + "version": 1, + "vitest5": { + ".": { + "sourceVersion": "4.1.11", + "configless": false + } + } +} +``` + +## `vp migrate --no-interactive --no-hooks --no-agent --no-editor` + +``` +VITE+ - The Unified Toolchain for the Web + +This project is already using Vite+! Happy coding! +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/mixed_project_assertions.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/mixed_project_assertions.md new file mode 100644 index 0000000000..5a4f5a51a9 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/mixed_project_assertions.md @@ -0,0 +1,74 @@ +# mixed_project_assertions + +Keep Node DOM matchers, migrate browser matchers, and retain review findings for shared transform inputs across repeated migrations. + +## `vpt write-file vite.config.ts 'export default { test: { projects: [{ test: { name: '\''node'\'', include: ['\''node.test.ts'\'', '\''shared.test.ts'\''] } }, { test: { name: '\''browser'\'', browser: { enabled: true }, include: ['\''browser.test.ts'\'', '\''shared.test.ts'\''] } }] } }; +'` + + +## `vpt write-file node.test.ts 'import { expect } from '\''vitest'\''; +expect(element).toHaveTextContent('\''partial'\''); +'` + + +## `vpt write-file browser.test.ts 'import { expect } from '\''vitest'\''; +await expect.element(element)['\''toHaveTextContent'\'']('\''partial'\''); +'` + + +## `vpt write-file shared.test.ts 'import { expect } from '\''vitest'\''; +expect(element).toHaveTextContent('\''partial'\''); +'` + + +## `vp migrate --no-interactive --no-hooks --no-agent --no-editor` + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item + +shared.test.ts + 2:1 REVIEW [text-content-project] Resolve this assertion's test project: browser assertions need toMatchTextContent for v4 partial matching; keep Node jest-dom assertions unchanged. +◇ Migrated . to Vite+ +• Node pnpm +• 4 files had imports rewritten +! Warnings: + - Vitest v5: 1 review item + +shared.test.ts + 2:1 REVIEW [text-content-project] Resolve this assertion's test project: browser assertions need toMatchTextContent for v4 partial matching; keep Node jest-dom assertions unchanged. +``` + +## `vpt print-file node.test.ts` + +``` +import { expect } from 'vite-plus/test'; +expect(element).toHaveTextContent('partial'); +``` + +## `vpt print-file browser.test.ts` + +``` +import { expect } from 'vite-plus/test'; +await expect.element(element)["toMatchTextContent"]('partial'); +``` + +## `vpt print-file shared.test.ts` + +``` +import { expect } from 'vite-plus/test'; +expect(element).toHaveTextContent('partial'); +``` + +## `vp migrate --no-interactive --no-hooks --no-agent --no-editor` + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item + +shared.test.ts + 2:1 REVIEW [text-content-project] Resolve this assertion's test project: browser assertions need toMatchTextContent for v4 partial matching; keep Node jest-dom assertions unchanged. +This project is already using Vite+! Happy coding! +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/node_container_scope.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/node_container_scope.md new file mode 100644 index 0000000000..9866ad5bc7 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/node_container_scope.md @@ -0,0 +1,89 @@ +# node_container_scope + +Check the runtime image and feature option, not source properties or Dev Container feature tags. + +## `vpt write-file worker.js 'export const options = { node:2 }; +'` + + +## `vpt write-file .devcontainer/devcontainer.json '{"features":{"ghcr.io/devcontainers/features/node:1":{"version":"lts"}}} +'` + + +## `vpt write-file Dockerfile '# FROM node:20 +FROM node:20-alpine AS build +RUN echo node:2 +'` + + +## `vp migrate --no-interactive` + +**Exit code:** 1 + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 2 review items (1 block dependency updates) + +.devcontainer/devcontainer.json + 1:1 REVIEW [node-runtime] Resolve Dev Container Node feature (lts) and select Node ^22.18.0 || ^24.11.0 || >=26.0.0. + +Dockerfile + 2:1 BLOCK [node-runtime] Node container image (20) cannot run Vite+ with Vitest v5. Select Node ^22.18.0 || ^24.11.0 || >=26.0.0; use vp env pin 22 --force for a runtime pin. Do not widen a library's engines.node contract automatically. +Resolve the blocking Vitest v5 findings, then re-run `vp migrate`. No project files were changed. +``` + +## `vpt print-file package.json` + +``` +{ + "name": "migration-vitest-v5", + "private": true, + "type": "module", + "packageManager": "pnpm@11.24.0", + "scripts": { + "test": "vitest list" + }, + "devDependencies": { + "vite": "^8.0.0", + "vitest": "" + } +} +``` + +## `vpt write-file Dockerfile '# FROM node:20 +FROM node:24.11.0-alpine AS build +RUN echo node:2 +'` + + +## `vp migrate --no-interactive --no-hooks --no-agent --no-editor` + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item + +.devcontainer/devcontainer.json + 1:1 REVIEW [node-runtime] Resolve Dev Container Node feature (lts) and select Node ^22.18.0 || ^24.11.0 || >=26.0.0. +◇ Migrated . to Vite+ +• Node pnpm +• 2 files had imports rewritten +! Warnings: + - Vitest v5: 1 review item + +.devcontainer/devcontainer.json + 1:1 REVIEW [node-runtime] Resolve Dev Container Node feature (lts) and select Node ^22.18.0 || ^24.11.0 || >=26.0.0. +``` + +## `vpt print-file worker.js` + +``` +export const options = { node:2 }; +``` + +## `vpt print-file .devcontainer/devcontainer.json` + +``` +{"features":{"ghcr.io/devcontainers/features/node:1":{"version":"lts"}}} +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/node_preflight.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/node_preflight.md new file mode 100644 index 0000000000..19c25fdf2f --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/node_preflight.md @@ -0,0 +1,48 @@ +# node_preflight + +## `vpt write-file .node-version '20.19.0 +'` + + +## `vp migrate --no-interactive` + +**Exit code:** 1 + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item (1 block dependency updates) + +.node-version + 1:1 BLOCK [node-runtime] .node-version (20.19.0) cannot run Vite+ with Vitest v5. Select Node ^22.18.0 || ^24.11.0 || >=26.0.0; use vp env pin 22 --force for a runtime pin. Do not widen a library's engines.node contract automatically. +Resolve the blocking Vitest v5 findings, then re-run `vp migrate`. No project files were changed. +``` + +## `vpt print-file package.json` + +``` +{ + "name": "migration-vitest-v5", + "private": true, + "type": "module", + "packageManager": "pnpm@11.24.0", + "scripts": { + "test": "vitest list" + }, + "devDependencies": { + "vite": "^8.0.0", + "vitest": "" + } +} +``` + +## `vpt print-file example.test.ts` + +``` +import { expect, test } from 'vitest'; + +test.sequential('compatibility', () => { + expect(Promise.resolve(42)).resolves.toBe(42); + expect(() => { throw new Error(''); }).toThrow(''); +}); +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/plugin_projects_and_dom_types.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/plugin_projects_and_dom_types.md new file mode 100644 index 0000000000..22675f10dc --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/plugin_projects_and_dom_types.md @@ -0,0 +1,55 @@ +# plugin_projects_and_dom_types + +Do not scan plugin project paths as Vitest configs; report the Jest-only DOM type entry without changing a mixed test contract. + +## `vpt write-file vite.config.ts 'import { defineConfig } from '\''vitest/config'\''; +const config = defineConfig({ plugins: [{ name: '\''paths'\'', projects: ['\''./tsconfig.json'\'', '\''./plugin-options.ts'\''] }], test: {} }); +export default config; +'` + + +## `vpt write-file tsconfig.json '{"compilerOptions":{"types":["@testing-library/jest-dom","vitest/globals"]}} +'` + + +## `vpt write-file plugin-options.ts 'export default { test: {} }; +'` + + +## `vp migrate --no-interactive --no-hooks --no-agent --no-editor` + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 2 review items + +tsconfig.json + 1:1 REVIEW [jest-dom-types] If this config checks Vitest tests, load @testing-library/jest-dom/vitest in compilerOptions.types or an included TypeScript setup file. The root jest-dom type entry augments Jest, not Vitest v5. + +vite.config.ts + 3:1 REVIEW [dynamic-config] Review the effective exported test config and its v4 defaults. +◇ Migrated . to Vite+ +• Node pnpm +• 1 config update applied, 2 files had imports rewritten +• Inline Vite plugins wrapped with lazyPlugins for check/lint/fmt +! Warnings: + - Vitest v5: 2 review items + +tsconfig.json + 1:1 REVIEW [jest-dom-types] If this config checks Vitest tests, load @testing-library/jest-dom/vitest in compilerOptions.types or an included TypeScript setup file. The root jest-dom type entry augments Jest, not Vitest v5. + +vite.config.ts + 7:1 REVIEW [dynamic-config] Review the effective exported test config and its v4 defaults. +``` + +## `vpt print-file plugin-options.ts` + +``` +export default { test: {} }; +``` + +## `vpt print-file tsconfig.json` + +``` +{"compilerOptions":{"types":["@testing-library/jest-dom","vitest/globals"]}} +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/removed_api_preflight.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/removed_api_preflight.md new file mode 100644 index 0000000000..2b277372fd --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/snapshots/removed_api_preflight.md @@ -0,0 +1,38 @@ +# removed_api_preflight + +## `vpt write-file custom-runner.ts 'import { startTests } from '\''@vitest/runner'\''; +startTests([]); +'` + + +## `vp migrate --no-interactive` + +**Exit code:** 1 + +``` +VITE+ - The Unified Toolchain for the Web + +Vitest v5: 1 review item (1 block dependency updates) + +custom-runner.ts + 1:10 BLOCK [removed-api] Migrate startTests from @vitest/runner manually; no reviewed root v5 replacement exists. +Resolve the blocking Vitest v5 findings, then re-run `vp migrate`. No project files were changed. +``` + +## `vpt print-file package.json` + +``` +{ + "name": "migration-vitest-v5", + "private": true, + "type": "module", + "packageManager": "pnpm@11.24.0", + "scripts": { + "test": "vitest list" + }, + "devDependencies": { + "vite": "^8.0.0", + "vitest": "" + } +} +``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/vite.config.ts b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/vite.config.ts new file mode 100644 index 0000000000..0c35ccb6e7 --- /dev/null +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_vitest_v5/vite.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + reporters: ['json', ['junit', {}]], + projects: [{ test: { name: 'unit' } }, { extends: true, test: { name: 'inherited' } }], + }, +}); diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/package.json index 2b9893f340..05a285f697 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/package.json @@ -4,7 +4,7 @@ "vite": "^7.0.0" }, "volta": { - "node": "20.19.0", + "node": "24.11.0", "npm": "10.2.5" } } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/snapshots/migration_volta.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/snapshots/migration_volta.md index 2b17219a50..85227f734c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/snapshots/migration_volta.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta/snapshots/migration_volta.md @@ -20,7 +20,7 @@ VITE+ - The Unified Toolchain for the Web check .node-version is created from volta.node ``` -20.19.0 +24.11.0 ``` ## `vpt print-file package.json` @@ -35,7 +35,7 @@ volta field is preserved in package.json (not removed) "vite-plus": "catalog:" }, "volta": { - "node": "20.19.0", + "node": "24.11.0", "npm": "10.2.5" }, "devEngines": { diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/.nvmrc b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/.nvmrc index 5f53e875de..c519bf5baa 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/.nvmrc +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/.nvmrc @@ -1 +1 @@ -v20.19.0 +v24.11.0 diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots.toml index e2a1e969b6..4c41cf96b4 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots.toml @@ -3,7 +3,7 @@ name = "migration_volta_with_nvmrc" vp = "global" steps = [ { argv = ["vp", "migrate", "--no-interactive"], comment = ".nvmrc should take priority over volta.node", continue-on-failure = true }, - { argv = ["vpt", "print-file", ".node-version"], comment = "check .node-version comes from .nvmrc (v20.19.0), not volta.node (18.0.0)", continue-on-failure = true }, + { argv = ["vpt", "print-file", ".node-version"], comment = "check .node-version comes from .nvmrc (v24.11.0), not volta.node (18.0.0)", continue-on-failure = true }, { argv = ["vpt", "stat-file", ".nvmrc", "--assert-not", "file"], comment = "check .nvmrc is removed", continue-on-failure = true }, { argv = ["vpt", "print-file", "package.json"], comment = "volta field must remain intact", continue-on-failure = true }, ] diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots/migration_volta_with_nvmrc.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots/migration_volta_with_nvmrc.md index 9cb0ddf50f..cb3c2e856c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots/migration_volta_with_nvmrc.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_volta_with_nvmrc/snapshots/migration_volta_with_nvmrc.md @@ -17,10 +17,10 @@ VITE+ - The Unified Toolchain for the Web ## `vpt print-file .node-version` -check .node-version comes from .nvmrc (v20.19.0), not volta.node (18.0.0) +check .node-version comes from .nvmrc (v24.11.0), not volta.node (18.0.0) ``` -20.19.0 +24.11.0 ``` ## `vpt stat-file .nvmrc --assert-not file` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md index 871bcffef7..f5be99adbd 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md @@ -16,7 +16,7 @@ write inline snapshot via --update (regression test for #1553) Test Files 1 passed (1) Tests 1 passed (1) Start at