From 950612acf926d9e44b4f48c07f24d220bfe2b023 Mon Sep 17 00:00:00 2001 From: MK Date: Fri, 23 Oct 2026 11:24:59 +0900 Subject: [PATCH 1/6] chore(deps): upgrade Vitest to 5.1.0-beta.1 --- .../snapshots/command_tool_help.md | 4 +- .../packages/utils/identity.test.ts | 6 +- .../test_v5_browser_types/package.json | 2 +- .../fixtures/test_v5_coverage/package.json | 4 +- .../test_v5_install_managers/package.json | 2 +- .../test_v5_install_managers/snapshots.toml | 4 +- .../snapshots/npm_install_and_runtime.md | 4 +- .../test_v5_optional_packages/package.json | 2 +- .../fixtures/test_v5_preview/snapshots.toml | 2 +- .../snapshots/upstream_real_timers.md | 4 +- .../test_v5_webdriverio/pnpm-workspace.yaml | 8 +- docs/guide/migrate.md | 2 +- docs/guide/test.md | 2 +- docs/guide/vitest-v5.md | 4 +- packages/cli/src/help.ts | 11 +- packages/cli/src/utils/constants.ts | 2 +- .../src/__tests__/sync-remote-deps.spec.ts | 113 +++++----- packages/tools/src/sync-remote-deps.ts | 4 +- packages/tools/src/vendored-vitest.ts | 6 +- pnpm-lock.yaml | 213 +++++++++--------- pnpm-workspace.yaml | 20 +- 21 files changed, 224 insertions(+), 195 deletions(-) diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md index f5cc6bf2d6..6a3055c35d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md @@ -144,7 +144,7 @@ Options: --dir Base directory to scan for the test files --ui Enable UI --open Open UI automatically (default: !process.env.CI) - --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 63315 in browser mode. Use '--help --api' for more info. + --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 23315 in browser mode. Use '--help --api' for more info. --silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only. --hideSkippedTests Hide logs for skipped tests --reporter Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) @@ -169,6 +169,8 @@ Options: --dangerouslyIgnoreUnhandledErrors Ignore any unhandled errors that occur --shard Test suite shard to execute in a format of / --changed [since] Run tests that are affected by the changed files (default: false) + --since-last-run Run tests with dependencies modified since their last run, plus tests that failed (default: false) + --lastFailed Run only the tests that failed in the last run (default: false) --sequence Options for how tests should be sorted. Use '--help --sequence' for more info. --inspect [[host:]port] Enable Node.js inspector (default: 127.0.0.1:9229) --inspectBrk [[host:]port] Enable Node.js inspector and break before the test starts diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_pnpm_vite_identity/packages/utils/identity.test.ts b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_pnpm_vite_identity/packages/utils/identity.test.ts index d70d63f866..666714f958 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_pnpm_vite_identity/packages/utils/identity.test.ts +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/migration_pnpm_vite_identity/packages/utils/identity.test.ts @@ -2,7 +2,11 @@ import { expect, test } from 'vite-plus/test'; import { createServer, isRunnableDevEnvironment } from 'vite-plus'; test('the bundled server shares the public Vite API', async () => { - const server = await createServer({ configFile: false, server: { middlewareMode: true } }); + const server = await createServer({ + configFile: false, + // This API identity check does not need a shared WebSocket listening port. + server: { middlewareMode: true, ws: false }, + }); try { expect(isRunnableDevEnvironment(server.environments.ssr)).toBe(true); } finally { diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_browser_types/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_browser_types/package.json index d45309740f..d608ea797d 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_browser_types/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_browser_types/package.json @@ -5,7 +5,7 @@ "packageManager": "pnpm@11.24.0", "devDependencies": { "vite-plus": "latest", - "@vitest/browser-playwright": "5.0.5", + "@vitest/browser-playwright": "5.1.0-beta.1", "playwright": "1.57.0", "typescript": "7.0.2" } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_coverage/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_coverage/package.json index 650ac66266..ff8635a6a5 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_coverage/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_coverage/package.json @@ -4,7 +4,7 @@ "type": "module", "devDependencies": { "vite-plus": "latest", - "@vitest/coverage-v8": "5.0.5", - "@vitest/coverage-istanbul": "5.0.5" + "@vitest/coverage-v8": "5.1.0-beta.1", + "@vitest/coverage-istanbul": "5.1.0-beta.1" } } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/package.json index 1a77b0fe73..6756d2ba65 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/package.json @@ -2,5 +2,5 @@ "name": "test-v5-install-managers", "private": true, "type": "module", - "devDependencies": { "vite-plus": "latest", "vitest": "5.0.5" } + "devDependencies": { "vite-plus": "latest", "vitest": "5.1.0-beta.1" } } diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots.toml index 65035a131e..2a2388530b 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots.toml @@ -8,8 +8,8 @@ steps = [ { argv = ["vpt", "json-edit", "package.json", "packageManager", "npm@10.9.4"], snapshot = false }, # Match the bundled runner throughout npm's peer graph. Otherwise newer # Vitest patches reached through optional peers can crash npm 10's resolver. - { argv = ["vpt", "json-edit", "package.json", "overrides.vitest", "5.0.5"], snapshot = false }, - { argv = ["vpt", "json-edit", "package.json", "overrides.@vitest/browser", "5.0.5"], snapshot = false }, + { argv = ["vpt", "json-edit", "package.json", "overrides.vitest", "5.1.0-beta.1"], snapshot = false }, + { argv = ["vpt", "json-edit", "package.json", "overrides.@vitest/browser", "5.1.0-beta.1"], snapshot = false }, { argv = ["vp", "install", "--ignore-scripts", "--", "--no-audit", "--no-fund"], snapshot = false, timeout = 180000 }, ["vp", "test", "run"], ] diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots/npm_install_and_runtime.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots/npm_install_and_runtime.md index 4acc9c0ae6..6abf0608ec 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots/npm_install_and_runtime.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_install_managers/snapshots/npm_install_and_runtime.md @@ -3,10 +3,10 @@ ## `vpt json-edit package.json packageManager npm@10.9.4` -## `vpt json-edit package.json overrides.vitest 5.0.5` +## `vpt json-edit package.json overrides.vitest 5.1.0-beta.1` -## `vpt json-edit package.json overrides.@vitest/browser 5.0.5` +## `vpt json-edit package.json overrides.@vitest/browser 5.1.0-beta.1` ## `vp install --ignore-scripts -- --no-audit --no-fund` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_optional_packages/package.json b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_optional_packages/package.json index 52107bd051..128e3390f7 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_optional_packages/package.json +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_optional_packages/package.json @@ -4,7 +4,7 @@ "type": "module", "devDependencies": { "vite-plus": "latest", - "@vitest/ui": "5.0.5", + "@vitest/ui": "5.1.0-beta.1", "jsdom": "27.2.0", "happy-dom": "20.0.10", "temporal-polyfill": "1.0.4" diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots.toml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots.toml index 3768df0382..4049d7845c 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots.toml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots.toml @@ -8,7 +8,7 @@ steps = [{ argv = ["node", "verify.mjs"], timeout = 120000 }] name = "upstream_real_timers" vp = "local" env = { PLAYWRIGHT_BROWSERS_PATH = "0" } -comment = "Known upstream regression introduced in Vitest 4.1.1 and still present in 5.0.1, not a new v5 release blocker: Preview locator clicks advance fake timers while using real timers. Require success when upstream fixes it." +comment = "Known upstream regression introduced in Vitest 4.1.1 and still present in 5.1.0-beta.1, not a new v5 release blocker: Preview locator clicks advance fake timers while using real timers. Require success when upstream fixes it." steps = [{ argv = ["node", "verify.mjs", "--real-timers"], timeout = 120000 }] [[case]] diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots/upstream_real_timers.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots/upstream_real_timers.md index 46ee726c4e..78aeab819b 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots/upstream_real_timers.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_preview/snapshots/upstream_real_timers.md @@ -1,11 +1,11 @@ # upstream_real_timers -Known upstream regression introduced in Vitest 4.1.1 and still present in 5.0.1, not a new v5 release blocker: Preview locator clicks advance fake timers while using real timers. Require success when upstream fixes it. +Known upstream regression introduced in Vitest 4.1.1 and still present in 5.1.0-beta.1, not a new v5 release blocker: Preview locator clicks advance fake timers while using real timers. Require success when upstream fixes it. ## `node verify.mjs --real-timers` ``` Browser runner started at http://localhost:/__vitest_test__/?sessionId= -Known upstream regression since Vitest 4.1.1: Preview locator clicks fail with real timers in 5.0.5 +Known upstream regression since Vitest 4.1.1: Preview locator clicks fail with real timers in 5.1.0-beta.1 ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_webdriverio/pnpm-workspace.yaml b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_webdriverio/pnpm-workspace.yaml index e0f5ec8130..747ff6a6e9 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_webdriverio/pnpm-workspace.yaml +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_webdriverio/pnpm-workspace.yaml @@ -1,5 +1,5 @@ -# The community provider accepts newer @vitest/browser patches. Keep this -# fixture on the bundled runner's version when testing the packed package. +# Keep the community provider's @vitest/browser aligned with the bundled +# runner when testing the packed package, including prereleases. overrides: - '@vitest/browser': 5.0.5 - vitest: 5.0.5 + '@vitest/browser': 5.1.0-beta.1 + vitest: 5.1.0-beta.1 diff --git a/docs/guide/migrate.md b/docs/guide/migrate.md index fb2c37af05..8a47535cfc 100644 --- a/docs/guide/migrate.md +++ b/docs/guide/migrate.md @@ -151,7 +151,7 @@ View and copy this prompt into your coding agent to upgrade an existing Vite+ 0. ### Vitest -Vitest is automatically migrated through `vp migrate`. `vite-plus` re-exports upstream `vitest@5.0.5` under `vite-plus/test*`, so for node-mode tests a single `vite-plus` install is enough — you no longer need to install `vitest` directly. +Vitest is automatically migrated through `vp migrate`. `vite-plus` re-exports upstream `vitest@5.1.0-beta.1` under `vite-plus/test*`, so for node-mode tests a single `vite-plus` install is enough — you no longer need to install `vitest` directly. For browser mode, you can use the base browser runtime (`@vitest/browser`) and Preview provider (`@vitest/browser-preview`) included in `vite-plus`. To use Playwright or WebDriverIO, you also need the opt-in provider (`@vitest/browser-playwright` or `@vitest/browser-webdriverio`) and its framework peer (`playwright` or `webdriverio`). diff --git a/docs/guide/test.md b/docs/guide/test.md index 672a560dbf..d42b9530bb 100644 --- a/docs/guide/test.md +++ b/docs/guide/test.md @@ -2,7 +2,7 @@ `vp test` runs tests with [Vitest](https://vitest.dev). -Vite+ depends on Vitest `5.0.5`, which requires Node `^22.18.0 || ^24.11.0 || >=26.0.0`. For existing projects, follow [Upgrade to Vitest 5](./vitest-v5.md) before updating dependencies. +Vite+ depends on Vitest `5.1.0-beta.1`, which requires Node `^22.18.0 || ^24.11.0 || >=26.0.0`. For existing projects, follow [Upgrade to Vitest 5](./vitest-v5.md) before updating dependencies. `vp test` resolves Vitest from `vite-plus`'s dependencies first, then from your project. diff --git a/docs/guide/vitest-v5.md b/docs/guide/vitest-v5.md index 774f49ddac..0e10e32fae 100644 --- a/docs/guide/vitest-v5.md +++ b/docs/guide/vitest-v5.md @@ -1,6 +1,6 @@ # Upgrade to Vitest 5 -Vite+ bundles Vitest `5.0.5`. Use Node `^22.18.0 || ^24.11.0 || >=26.0.0` for the CLI and tests. +Vite+ bundles Vitest `5.1.0-beta.1`. Use Node `^22.18.0 || ^24.11.0 || >=26.0.0` for the CLI and tests. ## Before you migrate @@ -126,7 +126,7 @@ Review calls with benchmark options, imported or reassigned callbacks, callback ## Entry points and packages -Use `vite-plus/test` for assertions and supported runner APIs. Keep coverage providers and `@vitest/ui` at the bundled runner's exact version, `5.0.5`. Keep `@vitest/web-worker` aligned when your project uses it. +Use `vite-plus/test` for assertions and supported runner APIs. Keep coverage providers and `@vitest/ui` at the bundled runner's exact version, `5.1.0-beta.1`. Keep `@vitest/web-worker` aligned when your project uses it. | v4 import | v5 import or action | | ---------------------------------------- | --------------------------------------------------------------------------- | diff --git a/packages/cli/src/help.ts b/packages/cli/src/help.ts index 78add4e79b..0398ce9eae 100644 --- a/packages/cli/src/help.ts +++ b/packages/cli/src/help.ts @@ -213,7 +213,7 @@ const commandHelpDocs = { { label: '--api [port]', description: - "Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 63315 in browser mode. Use '--help --api' for more info.", + "Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 23315 in browser mode. Use '--help --api' for more info.", }, { label: '--silent [value]', @@ -311,6 +311,15 @@ const commandHelpDocs = { label: '--changed [since]', description: 'Run tests that are affected by the changed files (default: false)', }, + { + label: '--since-last-run', + description: + 'Run tests with dependencies modified since their last run, plus tests that failed (default: false)', + }, + { + label: '--lastFailed', + description: 'Run only the tests that failed in the last run (default: false)', + }, { label: '--sequence ', description: diff --git a/packages/cli/src/utils/constants.ts b/packages/cli/src/utils/constants.ts index 7db24a84dc..e3b79c4b58 100644 --- a/packages/cli/src/utils/constants.ts +++ b/packages/cli/src/utils/constants.ts @@ -15,7 +15,7 @@ export const VITE_CONFIG_FILES = [ 'vite.config.cts', ] as const; -export const VITEST_VERSION = '5.0.5'; +export const VITEST_VERSION = '5.1.0-beta.1'; // Exact action release used by generated workflows and the @v1 migration. // The Renovate custom manager keeps this value current. diff --git a/packages/tools/src/__tests__/sync-remote-deps.spec.ts b/packages/tools/src/__tests__/sync-remote-deps.spec.ts index d581a36a83..46504ad9e7 100644 --- a/packages/tools/src/__tests__/sync-remote-deps.spec.ts +++ b/packages/tools/src/__tests__/sync-remote-deps.spec.ts @@ -41,7 +41,7 @@ describe('vendored Vitest dependency alignment', () => { expect(workspace.catalog.vitest).toBe(VITEST_VERSION); }); - test.each(['4.1.10', '^5.0.0', '5.1.0-beta.1'])( + test.each(['4.1.10', '^5.0.0', '^5.1.0-beta.1', '6.0.0-beta.1', '5.1.0-beta..1', '5.1.0-beta_1'])( 'rejects an unsupported bootstrap runtime pin %s before changing manifests', (version) => { const root = mkdtempSync(join(tmpdir(), 'vp-vendored-vitest-bootstrap-')); @@ -56,14 +56,14 @@ describe('vendored Vitest dependency alignment', () => { copyFileSync(new URL('../vendored-vitest.ts', import.meta.url), script); const result = spawnSync(process.execPath, [script], { cwd: root, encoding: 'utf8' }); expect(result.status).not.toBe(0); - expect(result.stderr).toContain('VITEST_VERSION must declare an exact stable v5 version'); + expect(result.stderr).toContain('VITEST_VERSION must declare an exact v5 version'); } finally { rmSync(root, { recursive: true, force: true }); } }, ); - test.each(['5.0.0', '5.1.2'])( + test.each(['5.0.0', '5.1.2', '5.1.0-beta.1'])( 'runs before dependency installation with the selected %s runtime pin', (version) => { const root = mkdtempSync(join(tmpdir(), 'vp-vendored-vitest-bootstrap-')); @@ -120,64 +120,73 @@ describe('vendored Vitest dependency alignment', () => { }, ); - test('aligns official catalog entries to the selected runner and preserves the community provider', () => { - const merged = mergePnpmWorkspaces( - { - catalog: { - vitest: '5.1.2', - '@vitest/browser': '5.0.0', - '@vitest/browser-webdriverio': '5.0.0-rc.1', + test.each(['5.1.2', '5.1.0-beta.1'])( + 'aligns official catalog entries to %s and preserves the community provider', + (version) => { + const merged = mergePnpmWorkspaces( + { + catalog: { + vitest: version, + '@vitest/browser': '5.0.0', + '@vitest/browser-webdriverio': '5.0.0-rc.1', + }, }, - }, - { - catalog: { - vitest: '^4.1.6', - '@vitest/browser': '^5.2.0', - '@vitest/browser-webdriverio': '5.3.0', - '@vitest/utils': '4.1.11', - '@vitest/expect': '4.1.11', - '@vitest/runner': '4.1.11', - '@vitest/eslint-plugin': '^1.0.0', + { + catalog: { + vitest: '^4.1.6', + '@vitest/browser': '^5.2.0', + '@vitest/browser-webdriverio': '5.3.0', + '@vitest/utils': '4.1.11', + '@vitest/expect': '4.1.11', + '@vitest/runner': '4.1.11', + '@vitest/eslint-plugin': '^1.0.0', + }, }, - }, - { - catalog: { - '@vitest/coverage-v8': '4.1.11', - '@vitest/coverage-istanbul': '^4.1.11', - '@vitest/ui': '^5.2.0', - '@vitest/web-worker': '4.1.11', + { + catalog: { + '@vitest/coverage-v8': '4.1.11', + '@vitest/coverage-istanbul': '^4.1.11', + '@vitest/ui': '^5.2.0', + '@vitest/web-worker': '4.1.11', + }, }, - }, - VITE_PACKAGE, - verkit, - ); - expect(merged.catalog).toEqual({ - typescript: '~7.0.2', - vitest: '5.1.2', - '@vitest/browser': '5.1.2', - '@vitest/browser-webdriverio': '5.0.0-rc.1', - '@vitest/utils': '5.1.2', - '@vitest/coverage-v8': '5.1.2', - '@vitest/coverage-istanbul': '5.1.2', - '@vitest/ui': '5.1.2', - '@vitest/web-worker': '5.1.2', - '@vitest/eslint-plugin': '^1.0.0', - }); - }); - - test.each(['^5.0.0', '=5.0.0', '4.1.11', '6.0.0', '5.1.0-beta.1'])( - 'rejects an unreviewed root runner version %s', - (vitest) => { - expect(() => - mergePnpmWorkspaces({ catalog: { vitest } }, {}, {}, VITE_PACKAGE, verkit), - ).toThrow('The root Vitest catalog entry must be an exact stable v5 version'); + VITE_PACKAGE, + verkit, + ); + expect(merged.catalog).toEqual({ + typescript: '~7.0.2', + vitest: version, + '@vitest/browser': version, + '@vitest/browser-webdriverio': '5.0.0-rc.1', + '@vitest/utils': version, + '@vitest/coverage-v8': version, + '@vitest/coverage-istanbul': version, + '@vitest/ui': version, + '@vitest/web-worker': version, + '@vitest/eslint-plugin': '^1.0.0', + }); }, ); + test.each([ + '^5.0.0', + '=5.0.0', + '4.1.11', + '6.0.0', + '^5.1.0-beta.1', + '6.0.0-beta.1', + '5.1.0-beta..1', + '5.1.0-beta_1', + ])('rejects an unreviewed root runner version %s', (vitest) => { + expect(() => + mergePnpmWorkspaces({ catalog: { vitest } }, {}, {}, VITE_PACKAGE, verkit), + ).toThrow('The root Vitest catalog entry must be an exact v5 version'); + }); + test('does not infer a missing root pin from an upstream catalog', () => { expect(() => mergePnpmWorkspaces({}, { catalog: { vitest: '^4.1.6' } }, {}, VITE_PACKAGE, verkit), - ).toThrow('The root Vitest catalog entry must be an exact stable v5 version'); + ).toThrow('The root Vitest catalog entry must be an exact v5 version'); }); test('still resolves tinybench to the higher major version', () => { diff --git a/packages/tools/src/sync-remote-deps.ts b/packages/tools/src/sync-remote-deps.ts index 42efd9e378..851e8c0fdf 100755 --- a/packages/tools/src/sync-remote-deps.ts +++ b/packages/tools/src/sync-remote-deps.ts @@ -563,10 +563,10 @@ export function mergePnpmWorkspaces( if (VITEST_EXACT_VERSION_PACKAGES.has(pkg)) { if ( !vitestVersion || - !/^5\.\d+\.\d+$/.test(vitestVersion) || + !/^5\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/.test(vitestVersion) || verkit.normalize(vitestVersion) !== vitestVersion ) { - throw new Error('The root Vitest catalog entry must be an exact stable v5 version'); + throw new Error('The root Vitest catalog entry must be an exact v5 version'); } catalog[pkg] = vitestVersion; } else if (pkg === '@vitest/browser-webdriverio' && main.catalog?.[pkg]) { diff --git a/packages/tools/src/vendored-vitest.ts b/packages/tools/src/vendored-vitest.ts index 29223bb6b4..72e54b657f 100644 --- a/packages/tools/src/vendored-vitest.ts +++ b/packages/tools/src/vendored-vitest.ts @@ -78,9 +78,11 @@ if ( // upgrade-deps.ts keeps this exact runtime pin in sync with the root catalog. // Read the declaration without importing CLI code or an installed YAML parser. const constants = readFileSync(join(rootDir, 'packages/cli/src/utils/constants.ts'), 'utf8'); - const version = constants.match(/^export const VITEST_VERSION = '(5\.\d+\.\d+)';\r?$/m)?.[1]; + const version = constants.match( + /^export const VITEST_VERSION = '(5\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)';\r?$/m, + )?.[1]; if (!version) { - throw new Error('VITEST_VERSION must declare an exact stable v5 version'); + throw new Error('VITEST_VERSION must declare an exact v5 version'); } alignVendoredVitestDependencies(rootDir, version); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9b617f917..49542aabcb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -252,32 +252,32 @@ catalogs: specifier: 7.0.0-dev.20260707.2 version: 7.0.0-dev.20260707.2 '@vitest/browser': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@vitest/browser-playwright': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@vitest/browser-preview': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@vitest/browser-webdriverio': specifier: 5.0.0 version: 5.0.0 '@vitest/mocker': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@vitest/pretty-format': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@vitest/snapshot': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@vitest/spy': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@vitest/utils': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 bingo: specifier: ^0.13.2 version: 0.13.2 @@ -414,8 +414,8 @@ catalogs: specifier: ^0.5.0 version: 0.5.0 vitest: - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 vue: specifier: ^3.5.35 version: 3.5.40 @@ -430,6 +430,7 @@ catalogs: version: 4.6.5 overrides: + '@vitest/browser-webdriverio>@vitest/browser': 5.1.0-beta.1 rolldown: workspace:rolldown@* vite: workspace:@voidzero-dev/vite-plus-core@* vite-plus: workspace:vite-plus@* @@ -486,7 +487,7 @@ importers: version: link:packages/cli vitest: specifier: 'catalog:' - version: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + version: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) packages/cli: dependencies: @@ -501,25 +502,25 @@ importers: version: 1.89.0 '@vitest/browser': specifier: 'catalog:' - version: 5.0.5(vite@packages+core)(vitest@5.0.5) + version: 5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1) '@vitest/browser-preview': specifier: 'catalog:' - version: 5.0.5(vite@packages+core)(vitest@5.0.5) + version: 5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1) '@vitest/mocker': specifier: 'catalog:' - version: 5.0.5(vite@packages+core) + version: 5.1.0-beta.1(vite@packages+core) '@vitest/pretty-format': specifier: 'catalog:' - version: 5.0.5 + version: 5.1.0-beta.1 '@vitest/snapshot': specifier: 'catalog:' - version: 5.0.5 + version: 5.1.0-beta.1 '@vitest/spy': specifier: 'catalog:' - version: 5.0.5 + version: 5.1.0-beta.1 '@vitest/utils': specifier: 'catalog:' - version: 5.0.5 + version: 5.1.0-beta.1 oxfmt: specifier: 'catalog:' version: 0.74.0(vite-plus@packages+cli) @@ -537,7 +538,7 @@ importers: version: link:../core vitest: specifier: 'catalog:' - version: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + version: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) devDependencies: '@emnapi/core': specifier: 'catalog:' @@ -559,10 +560,10 @@ importers: version: 4.0.2 '@vitest/browser-playwright': specifier: 'catalog:' - version: 5.0.5(playwright@1.62.1)(vite@packages+core)(vitest@5.0.5) + version: 5.1.0-beta.1(playwright@1.62.1)(vite@packages+core)(vitest@5.1.0-beta.1) '@vitest/browser-webdriverio': specifier: 'catalog:' - version: 5.0.0(vite@packages+core)(vitest@5.0.5)(webdriverio@9.20.1(supports-color@8.1.1)) + version: 5.0.0(vite@packages+core)(vitest@5.1.0-beta.1)(webdriverio@9.20.1(supports-color@8.1.1)) '@voidzero-dev/vite-plus-prompts': specifier: workspace:* version: link:../prompts @@ -817,7 +818,7 @@ importers: version: 0.5.0 vitest: specifier: 'catalog:' - version: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + version: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) yaml: specifier: 'catalog:' version: 2.9.1 @@ -1128,8 +1129,8 @@ importers: specifier: workspace:@voidzero-dev/vite-plus-core@* version: link:../packages/core vitest: - specifier: 5.0.5 - version: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.19.2)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.19.2)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) vite/packages/create-vite: devDependencies: @@ -1280,8 +1281,8 @@ importers: specifier: ^0.8.0 version: 0.8.0(crossws@0.4.12(srvx@1.0.6))(srvx@1.0.6)(vite@packages+core) '@vitest/utils': - specifier: 5.0.5 - version: 5.0.5 + specifier: 5.1.0-beta.1 + version: 5.1.0-beta.1 '@voidzero-dev/vite-task-client': specifier: ^0.2.0 version: 0.2.0 @@ -4309,8 +4310,8 @@ packages: resolution: {integrity: sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==} engines: {node: '>=18'} - '@testing-library/user-event@14.6.7': - resolution: {integrity: sha512-MPCpX8bxe8zS+JmmTwLp8jd0dy1rAm60Te/SL8JrQM3qvQJcBOs1d7IefJMyZzqM3EWBrDn/LWDt1BCGu4ASfg==} + '@testing-library/user-event@14.6.8': + resolution: {integrity: sha512-vgSSqnANMnkcYR/vUNDbwS7aM3OErRLNUG8vCVVlj4oc6cKffUrccX7UAS5AmJQQNZTSibi9z5GvvRZ0aYgUCQ==} engines: {node: '>=12', npm: '>=6'} peerDependencies: '@testing-library/dom': '>=7.21.4' @@ -4655,16 +4656,16 @@ packages: '@vitejs/release-scripts@1.10.0': resolution: {integrity: sha512-1vPdK4Jm2vxCFpaf4D7Nwam677OUoXqUU0WqhLjYec38qiK/XXkzuWK6QnFkn9ty63F+slN13pNUCwEHPOLRuQ==} - '@vitest/browser-playwright@5.0.5': - resolution: {integrity: sha512-lcdThFUUcMV9mGGV1SUiZXPxfjgW4CssA7o3STxzh8WK0tT2r526kc12tZIBRZfoLMwkhxjLmMXkWXONzdsDQw==} + '@vitest/browser-playwright@5.1.0-beta.1': + resolution: {integrity: sha512-Wljw4AgDIOsxR5kM1Dc8S74jz8RYDYKid7JakRQoAETOsEO4jJHpTrfzOGOLW1ZyXFxHuRLK+399Vevgbs4Vjw==} peerDependencies: playwright: '*' - vitest: 5.0.5 + vitest: 5.1.0-beta.1 - '@vitest/browser-preview@5.0.5': - resolution: {integrity: sha512-ViNg4UlomGSJHtnnr7Txm+55P7/aAMMoS+1WYnWjp5w5tzf7YEUAICcs2sb1uMovEnC8el/8zUfkWZ8+7fPCKA==} + '@vitest/browser-preview@5.1.0-beta.1': + resolution: {integrity: sha512-zWDR3SQgCt8QsVnsyMfja926xiWmIXHI16Yxk4h8lMhA0Pbp80vwwPKYwCDtjBo3UCpTl3mqMsotOvzuUN5fBw==} peerDependencies: - vitest: 5.0.5 + vitest: 5.1.0-beta.1 '@vitest/browser-webdriverio@5.0.0': resolution: {integrity: sha512-faotr4XiQrpK7yK+GTSWTA2pYSPFMZZA+fXx0rtKh9mvAjCMBM0Q2UJ5NIv6o5Oqkn2CASIrKnePaC/37judJA==} @@ -4673,13 +4674,13 @@ packages: vitest: ^5.0.0 webdriverio: '*' - '@vitest/browser@5.0.5': - resolution: {integrity: sha512-IDMoZX/iZ8rkilw7weaSgN8tJ7iZ9hUv0wYoKXyiyjWjWFwLSWAY707DcVTgxTYOudWC1E3HA9LYn7kVa9a7uQ==} + '@vitest/browser@5.1.0-beta.1': + resolution: {integrity: sha512-9RWOwH2FF5Dje0DRfZnxjqXA0e5gV9As/FIheSpbrH2mkB4dYEJWKqfLasPFoaqwK2qb9CJtrsIj0dq0DSL46A==} peerDependencies: - vitest: 5.0.5 + vitest: 5.1.0-beta.1 - '@vitest/mocker@5.0.5': - resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + '@vitest/mocker@5.1.0-beta.1': + resolution: {integrity: sha512-emN9iaT+Ed05ol/lVM00oQSReDyL+Lw5ddjNfkFBslBlGKECuNn+AwCvxvlRDcppqWvWNlOh8rNGf6PvLq6wIQ==} peerDependencies: msw: ^2.4.9 || ^3.0.0 vite: workspace:@voidzero-dev/vite-plus-core@* @@ -4689,22 +4690,22 @@ packages: vite: optional: true - '@vitest/pretty-format@5.0.5': - resolution: {integrity: sha512-24sSdIlMA9DVPXnYiB9siwU0bTd887Y9jX3+vabztCSsvHwo7ipvJ/a2L3Rljw8+2rK1f5fCj3h5U9I/Jsqgbw==} + '@vitest/pretty-format@5.1.0-beta.1': + resolution: {integrity: sha512-6YguKYGb54HT6idl4VbmQFkhkku3LfO2jMEkDFfOzeKaiHqeOJYXD7k4ZVtkgPVBG/I0ndAxQOU2K/HIaH9hEg==} - '@vitest/snapshot@5.0.5': - resolution: {integrity: sha512-dHyFElWMQy0wFBGrIaPPeUWfJFh+jAUrv46ImIJGd8CADdKV3mlrAu3FyD0wesdxELFCs9M807e040Kba/XKtA==} + '@vitest/snapshot@5.1.0-beta.1': + resolution: {integrity: sha512-VyDi3FQo6MNnmHUVDuFYcrZ/GTVJXunh1y+r7TpnhK5G7bCwmxJw3OQTl8fEZ3kVeaGmWenq1914dg3qR35uRQ==} - '@vitest/spy@5.0.5': - resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + '@vitest/spy@5.1.0-beta.1': + resolution: {integrity: sha512-tYFOA39Od42YYDC6d8Cl3KsS8WJeG8u0tVaJTqOTBocFO2g318MsDW/FSkxlGy32jgtk3/TYGANawBd0Sc17bA==} - '@vitest/ui@5.0.5': - resolution: {integrity: sha512-dCoGUOdgmCaSB2g+WQ/spPCBkytAWdNUkFSXY4z+eYp2d8JEOY8v0uDRaJTG9qf/kTlTVZ4CuYMYMz/f1HS/qQ==} + '@vitest/ui@5.1.0-beta.1': + resolution: {integrity: sha512-pu3KYwFJ10QH8/u04rFct2Bz/s0telNMnqRjLNbiPYDGubWiQWg49iPcacCE8nnh21ILiFQudtwjARzJ5+dGng==} peerDependencies: - vitest: 5.0.5 + vitest: 5.1.0-beta.1 - '@vitest/utils@5.0.5': - resolution: {integrity: sha512-/rBu7gzLDQI/SC79Tn98b5DwOgaHU/Gt4I9OVeP3YofzNaYtbImRCOJQmT1S6vOJg9gEIlWC+r3QxKkjuSa1nQ==} + '@vitest/utils@5.1.0-beta.1': + resolution: {integrity: sha512-52uU8NOn5QNj4oQEJMRMnwIMhOvpB2fblpjXt7xmPo1r3KbCY/NFb1slgMqcvK+WgkJmVDorhX+gfNpXiiC/Pw==} '@voidzero-dev/vite-task-client@0.2.0': resolution: {integrity: sha512-y932hw4I0qrdlqbDhOC4VS7mtLad+MtXToSVJIZ79Cd7Ib6p4bRuoTRrx6OeedhdPm2yf9+r8ndlhJjn8LbsxQ==} @@ -7830,20 +7831,20 @@ packages: resolution: {integrity: sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==} engines: {node: '>=18.12.0'} - vitest@5.0.5: - resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + vitest@5.1.0-beta.1: + resolution: {integrity: sha512-g4cv3ArA2XJhO8B6GnyCZdRV5zihlw+Od2u8YdVKDlGvv8CHIBWLTr47+8eXM93tyvgcEsp5mMxfEkCHpb9YPQ==} engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 5.0.5 - '@vitest/browser-preview': 5.0.5 + '@vitest/browser-playwright': 5.1.0-beta.1 + '@vitest/browser-preview': 5.1.0-beta.1 '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 - '@vitest/coverage-istanbul': 5.0.5 - '@vitest/coverage-v8': 5.0.5 - '@vitest/ui': 5.0.5 + '@vitest/coverage-istanbul': 5.1.0-beta.1 + '@vitest/coverage-v8': 5.1.0-beta.1 + '@vitest/ui': 5.1.0-beta.1 happy-dom: '*' jsdom: '*' vite: workspace:@voidzero-dev/vite-plus-core@* @@ -10679,7 +10680,7 @@ snapshots: picocolors: 1.1.1 pretty-format: 27.5.1 - '@testing-library/user-event@14.6.7(@testing-library/dom@10.4.2)': + '@testing-library/user-event@14.6.8(@testing-library/dom@10.4.2)': dependencies: '@testing-library/dom': 10.4.2 @@ -10975,35 +10976,35 @@ snapshots: semver: 7.8.5 tinyexec: 1.3.1 - '@vitest/browser-playwright@5.0.5(playwright@1.62.1)(vite@packages+core)(vitest@5.0.5)': + '@vitest/browser-playwright@5.1.0-beta.1(playwright@1.62.1)(vite@packages+core)(vitest@5.1.0-beta.1)': dependencies: - '@vitest/browser': 5.0.5(vite@packages+core)(vitest@5.0.5) - '@vitest/mocker': 5.0.5(vite@packages+core) + '@vitest/browser': 5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1) + '@vitest/mocker': 5.1.0-beta.1(vite@packages+core) playwright: 1.62.1 tinyrainbow: 3.2.0 - vitest: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + vitest: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser-preview@5.0.5(vite@packages+core)(vitest@5.0.5)': + '@vitest/browser-preview@5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1)': dependencies: '@testing-library/dom': 10.4.2 - '@testing-library/user-event': 14.6.7(@testing-library/dom@10.4.2) - '@vitest/browser': 5.0.5(vite@packages+core)(vitest@5.0.5) - vitest: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + '@testing-library/user-event': 14.6.8(@testing-library/dom@10.4.2) + '@vitest/browser': 5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1) + vitest: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser-webdriverio@5.0.0(vite@packages+core)(vitest@5.0.5)(webdriverio@9.20.1(supports-color@8.1.1))': + '@vitest/browser-webdriverio@5.0.0(vite@packages+core)(vitest@5.1.0-beta.1)(webdriverio@9.20.1(supports-color@8.1.1))': dependencies: - '@vitest/browser': 5.0.5(vite@packages+core)(vitest@5.0.5) - vitest: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + '@vitest/browser': 5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1) + vitest: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) webdriverio: 9.20.1(supports-color@8.1.1) transitivePeerDependencies: - bufferutil @@ -11011,17 +11012,17 @@ snapshots: - utf-8-validate - vite - '@vitest/browser@5.0.5(vite@packages+core)(vitest@5.0.5)': + '@vitest/browser@5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1)': dependencies: '@blazediff/core': 1.10.0 - '@vitest/mocker': 5.0.5(vite@packages+core) - '@vitest/ui': 5.0.5(vitest@5.0.5) - '@vitest/utils': 5.0.5 + '@vitest/mocker': 5.1.0-beta.1(vite@packages+core) + '@vitest/ui': 5.1.0-beta.1(vitest@5.1.0-beta.1) + '@vitest/utils': 5.1.0-beta.1 magic-string: 1.4.3 pngjs: 7.0.0 sirv: 3.0.2(patch_hash=c07c56eb72faea34341d465cde2314e89db472106ed378181e3447893af6bf95) tinyrainbow: 3.2.0 - vitest: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + vitest: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) ws: 8.22.0 transitivePeerDependencies: - bufferutil @@ -11029,41 +11030,41 @@ snapshots: - utf-8-validate - vite - '@vitest/mocker@5.0.5(vite@packages+core)': + '@vitest/mocker@5.1.0-beta.1(vite@packages+core)': dependencies: '@jridgewell/trace-mapping': 0.3.31 - '@vitest/spy': 5.0.5 + '@vitest/spy': 5.1.0-beta.1 estree-walker: 3.0.3 magic-string: 1.4.3 optionalDependencies: vite: link:packages/core - '@vitest/pretty-format@5.0.5': + '@vitest/pretty-format@5.1.0-beta.1': dependencies: tinyrainbow: 3.2.0 - '@vitest/snapshot@5.0.5': + '@vitest/snapshot@5.1.0-beta.1': dependencies: - '@vitest/pretty-format': 5.0.5 - '@vitest/utils': 5.0.5 + '@vitest/pretty-format': 5.1.0-beta.1 + '@vitest/utils': 5.1.0-beta.1 magic-string: 1.4.3 pathe: 2.0.3 - '@vitest/spy@5.0.5': {} + '@vitest/spy@5.1.0-beta.1': {} - '@vitest/ui@5.0.5(vitest@5.0.5)': + '@vitest/ui@5.1.0-beta.1(vitest@5.1.0-beta.1)': dependencies: - '@vitest/utils': 5.0.5 + '@vitest/utils': 5.1.0-beta.1 fflate: 0.8.3 flatted: 3.4.4 pathe: 2.0.3 sirv: 3.0.2(patch_hash=c07c56eb72faea34341d465cde2314e89db472106ed378181e3447893af6bf95) tinyrainbow: 3.2.0 - vitest: 5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) + vitest: 5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core) - '@vitest/utils@5.0.5': + '@vitest/utils@5.1.0-beta.1': dependencies: - '@vitest/pretty-format': 5.0.5 + '@vitest/pretty-format': 5.1.0-beta.1 convert-source-map: 2.0.0 tinyrainbow: 3.2.0 @@ -14254,10 +14255,10 @@ snapshots: verkit@0.5.0: {} - vitest@5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core): + vitest@5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.10.3)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core): dependencies: '@types/chai': 5.2.3 - '@vitest/mocker': 5.0.5(vite@packages+core) + '@vitest/mocker': 5.1.0-beta.1(vite@packages+core) chai: 6.3.0 es-module-lexer: 2.3.2 expect-type: 1.4.0 @@ -14274,19 +14275,19 @@ snapshots: '@edge-runtime/vm': 5.0.0 '@opentelemetry/api': 1.9.0 '@types/node': 24.10.3 - '@vitest/browser-playwright': 5.0.5(playwright@1.62.1)(vite@packages+core)(vitest@5.0.5) - '@vitest/browser-preview': 5.0.5(vite@packages+core)(vitest@5.0.5) - '@vitest/browser-webdriverio': 5.0.0(vite@packages+core)(vitest@5.0.5)(webdriverio@9.20.1(supports-color@8.1.1)) - '@vitest/ui': 5.0.5(vitest@5.0.5) + '@vitest/browser-playwright': 5.1.0-beta.1(playwright@1.62.1)(vite@packages+core)(vitest@5.1.0-beta.1) + '@vitest/browser-preview': 5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1) + '@vitest/browser-webdriverio': 5.0.0(vite@packages+core)(vitest@5.1.0-beta.1)(webdriverio@9.20.1(supports-color@8.1.1)) + '@vitest/ui': 5.1.0-beta.1(vitest@5.1.0-beta.1) happy-dom: 20.0.10 jsdom: 27.2.0(supports-color@8.1.1) transitivePeerDependencies: - msw - vitest@5.0.5(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.19.2)(@vitest/browser-playwright@5.0.5)(@vitest/browser-preview@5.0.5)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.0.5)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core): + vitest@5.1.0-beta.1(@edge-runtime/vm@5.0.0)(@opentelemetry/api@1.9.0)(@types/node@24.19.2)(@vitest/browser-playwright@5.1.0-beta.1)(@vitest/browser-preview@5.1.0-beta.1)(@vitest/browser-webdriverio@5.0.0)(@vitest/ui@5.1.0-beta.1)(happy-dom@20.0.10)(jsdom@27.2.0(supports-color@8.1.1))(vite@packages+core): dependencies: '@types/chai': 5.2.3 - '@vitest/mocker': 5.0.5(vite@packages+core) + '@vitest/mocker': 5.1.0-beta.1(vite@packages+core) chai: 6.3.0 es-module-lexer: 2.3.2 expect-type: 1.4.0 @@ -14303,10 +14304,10 @@ snapshots: '@edge-runtime/vm': 5.0.0 '@opentelemetry/api': 1.9.0 '@types/node': 24.19.2 - '@vitest/browser-playwright': 5.0.5(playwright@1.62.1)(vite@packages+core)(vitest@5.0.5) - '@vitest/browser-preview': 5.0.5(vite@packages+core)(vitest@5.0.5) - '@vitest/browser-webdriverio': 5.0.0(vite@packages+core)(vitest@5.0.5)(webdriverio@9.20.1(supports-color@8.1.1)) - '@vitest/ui': 5.0.5(vitest@5.0.5) + '@vitest/browser-playwright': 5.1.0-beta.1(playwright@1.62.1)(vite@packages+core)(vitest@5.1.0-beta.1) + '@vitest/browser-preview': 5.1.0-beta.1(vite@packages+core)(vitest@5.1.0-beta.1) + '@vitest/browser-webdriverio': 5.0.0(vite@packages+core)(vitest@5.1.0-beta.1)(webdriverio@9.20.1(supports-color@8.1.1)) + '@vitest/ui': 5.1.0-beta.1(vitest@5.1.0-beta.1) happy-dom: 20.0.10 jsdom: 27.2.0(supports-color@8.1.1) transitivePeerDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 96f145ba1c..59b3ed1f0a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -47,15 +47,15 @@ catalog: '@types/validate-npm-package-name': ^4.0.2 '@types/ws': ^8.18.0 '@typescript/native-preview': 7.0.0-dev.20260707.2 - '@vitest/browser': 5.0.5 - '@vitest/browser-playwright': 5.0.5 - '@vitest/browser-preview': 5.0.5 + '@vitest/browser': 5.1.0-beta.1 + '@vitest/browser-playwright': 5.1.0-beta.1 + '@vitest/browser-preview': 5.1.0-beta.1 '@vitest/browser-webdriverio': 5.0.0 - '@vitest/mocker': 5.0.5 - '@vitest/pretty-format': 5.0.5 - '@vitest/snapshot': 5.0.5 - '@vitest/spy': 5.0.5 - '@vitest/utils': 5.0.5 + '@vitest/mocker': 5.1.0-beta.1 + '@vitest/pretty-format': 5.1.0-beta.1 + '@vitest/snapshot': 5.1.0-beta.1 + '@vitest/spy': 5.1.0-beta.1 + '@vitest/utils': 5.1.0-beta.1 '@voidzero-dev/vitepress-theme': 5.0.7 acorn: ^8.17.0 acorn-import-assertions: ^1.9.0 @@ -130,7 +130,7 @@ catalog: vitepress-plugin-group-icons: ^1.7.1 vitepress-plugin-llms: ^1.1.0 vitepress-plugin-og: ^0.0.5 - vitest: 5.0.5 + vitest: 5.1.0-beta.1 vue: ^3.5.35 web-tree-sitter: ^0.27.0 ws: ^8.22.0 @@ -203,6 +203,8 @@ minimumReleaseAgeExclude: - '@vitejs/devtools-*' - resolve.exports@2.0.4 overrides: + # The community provider's stable range excludes the selected Vitest prerelease. + '@vitest/browser-webdriverio>@vitest/browser': 'catalog:' rolldown: workspace:rolldown@* vite: workspace:@voidzero-dev/vite-plus-core@* vite-plus: workspace:vite-plus@* From e8b80263393cde404299fef86c7caa6e975390e1 Mon Sep 17 00:00:00 2001 From: MK Date: Fri, 23 Oct 2026 12:38:59 +0900 Subject: [PATCH 2/6] test: refresh Vitest help snapshots --- .../fixtures/command_helper/snapshots/command_helper.md | 4 +++- .../global_cli_fallback/snapshots/global_cli_fallback.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md index dabe9a3dd9..089495c3a2 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md @@ -311,7 +311,7 @@ Options: --dir Base directory to scan for the test files --ui Enable UI --open Open UI automatically (default: !process.env.CI) - --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 63315 in browser mode. Use '--help --api' for more info. + --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 23315 in browser mode. Use '--help --api' for more info. --silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only. --hideSkippedTests Hide logs for skipped tests --reporter Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) @@ -336,6 +336,8 @@ Options: --dangerouslyIgnoreUnhandledErrors Ignore any unhandled errors that occur --shard Test suite shard to execute in a format of / --changed [since] Run tests that are affected by the changed files (default: false) + --since-last-run Run tests with dependencies modified since their last run, plus tests that failed (default: false) + --lastFailed Run only the tests that failed in the last run (default: false) --sequence Options for how tests should be sorted. Use '--help --sequence' for more info. --inspect [[host:]port] Enable Node.js inspector (default: 127.0.0.1:9229) --inspectBrk [[host:]port] Enable Node.js inspector and break before the test starts diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md index 10b23cd05e..1bc4aafcb1 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md @@ -114,7 +114,7 @@ Options: --dir Base directory to scan for the test files --ui Enable UI --open Open UI automatically (default: !process.env.CI) - --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 63315 in browser mode. Use '--help --api' for more info. + --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 23315 in browser mode. Use '--help --api' for more info. --silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only. --hideSkippedTests Hide logs for skipped tests --reporter Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) @@ -139,6 +139,8 @@ Options: --dangerouslyIgnoreUnhandledErrors Ignore any unhandled errors that occur --shard Test suite shard to execute in a format of / --changed [since] Run tests that are affected by the changed files (default: false) + --since-last-run Run tests with dependencies modified since their last run, plus tests that failed (default: false) + --lastFailed Run only the tests that failed in the last run (default: false) --sequence Options for how tests should be sorted. Use '--help --sequence' for more info. --inspect [[host:]port] Enable Node.js inspector (default: 127.0.0.1:9229) --inspectBrk [[host:]port] Enable Node.js inspector and break before the test starts From d7747b7b765623593d6c9f49d4796364e1642033 Mon Sep 17 00:00:00 2001 From: MK Date: Fri, 23 Oct 2026 16:46:59 +0900 Subject: [PATCH 3/6] test: fix ecosystem compatibility with Vitest beta --- ecosystem-ci/npmx.ts | 10 ++++++++-- ecosystem-ci/patch-project.ts | 12 ++++++++++-- packages/tools/src/__tests__/ecosystem-npmx.spec.ts | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ecosystem-ci/npmx.ts b/ecosystem-ci/npmx.ts index 10b8c6a68d..2cceda59e3 100644 --- a/ecosystem-ci/npmx.ts +++ b/ecosystem-ci/npmx.ts @@ -1,6 +1,6 @@ export function patchNpmxVitestConfig(config: string): string { // The pinned Nuxt project uses liveDollarFetch to avoid capturing a stale - // $fetch during browser tests. Keep it when adding our optimizer workaround. + // $fetch during browser tests. Keep it when adding our Vitest workarounds. const nuxtProject = /defineVitestProject\(\{\s*plugins:\s*\[\s*liveDollarFetch\(\)\s*,?\s*\],\s*test:\s*\{/g; if ([...config.matchAll(nuxtProject)].length !== 1) { @@ -10,10 +10,16 @@ export function patchNpmxVitestConfig(config: string): string { nuxtProject, `defineVitestProject({ plugins: [liveDollarFetch(), { + name: 'npmx:test:vitest-compat', + config() { + // Nuxt imports app modules before per-file vi.mock calls run. + // Use request interception so those modules can still be mocked. + // https://vitest.dev/config/browser/importmapmocks + return { test: { browser: { importMapMocks: false } } } + }, // Temporary Vitest 5 workaround: preserve Nuxt's optimizer exclusions. // Remove when upstream preserves these exclusions after the merge. // https://github.com/why-reproductions-are-required/vitest-browser-optimizer-config-order - name: 'npmx:test:preserve-optimizer-exclusions', configureServer(server) { for (const options of [ server.config.optimizeDeps, diff --git a/ecosystem-ci/patch-project.ts b/ecosystem-ci/patch-project.ts index 6c0ef7786b..5d74978758 100644 --- a/ecosystem-ci/patch-project.ts +++ b/ecosystem-ci/patch-project.ts @@ -265,8 +265,14 @@ const forceFreshMigration = 'forceFreshMigration' in repoConfig && repoConfig.fo // runner+provider pair, exactly as a user who followed the guard's advice would. const vitestOverrides = { vitest: VITEST_VERSION, - '@vitest/coverage-v8': VITEST_VERSION, - '@vitest/coverage-istanbul': VITEST_VERSION, + // This fixture has no coverage provider. Forcing beta coverage peers makes + // npm loop while resolving optional peers of stable Vitest, until it OOMs. + ...(project === 'vite-plus-jest-dom-repro' + ? {} + : { + '@vitest/coverage-v8': VITEST_VERSION, + '@vitest/coverage-istanbul': VITEST_VERSION, + }), }; // E2E intentionally installs just-published toolchain packages (e.g. @@ -361,6 +367,8 @@ ${registration}`, } if (project === 'npmx.dev') { + // Nuxt loads app modules before per-file mocks; use request interception. + // https://vitest.dev/config/browser/importmapmocks // Vitest 5 adds browser optimizer dependencies after Nuxt's config hook has // filtered its exclusions. Reapply that filter only in the Nuxt test project. // Remove when an upstream fix preserves those exclusions after the merge. diff --git a/packages/tools/src/__tests__/ecosystem-npmx.spec.ts b/packages/tools/src/__tests__/ecosystem-npmx.spec.ts index 6676a17be1..69adfbaa6d 100644 --- a/packages/tools/src/__tests__/ecosystem-npmx.spec.ts +++ b/packages/tools/src/__tests__/ecosystem-npmx.spec.ts @@ -29,13 +29,20 @@ describe('patchNpmxVitestConfig', () => { defineVitestProject: (project: unknown) => project, liveDollarFetch: () => liveDollarFetch, }) as { - plugins: { name: string; configureServer?: (server: TestServer) => void }[]; + plugins: { + name: string; + config?: () => { test: { browser: { importMapMocks: boolean } } }; + configureServer?: (server: TestServer) => void; + }[]; test: { name: string; browser: { enabled: boolean } }; }; expect(patched.plugins).toHaveLength(2); expect(patched.plugins[0]).toBe(liveDollarFetch); - expect(patched.plugins[1].name).toBe('npmx:test:preserve-optimizer-exclusions'); + expect(patched.plugins[1].name).toBe('npmx:test:vitest-compat'); + expect(patched.plugins[1].config?.()).toEqual({ + test: { browser: { importMapMocks: false } }, + }); expect(patched.test).toEqual({ name: 'nuxt', browser: { enabled: true } }); const server: TestServer = { From ba977819a650db73c4eeb6d419ea0ca495123c13 Mon Sep 17 00:00:00 2001 From: MK Date: Fri, 23 Oct 2026 17:23:16 +0900 Subject: [PATCH 4/6] test: update npmx ecosystem fixture and remove optimizer workaround --- ecosystem-ci/npmx.ts | 20 ++--------- ecosystem-ci/patch-project.ts | 13 +++++--- ecosystem-ci/repo.json | 2 +- .../src/__tests__/ecosystem-npmx.spec.ts | 33 +++---------------- 4 files changed, 18 insertions(+), 50 deletions(-) diff --git a/ecosystem-ci/npmx.ts b/ecosystem-ci/npmx.ts index 2cceda59e3..abe903229a 100644 --- a/ecosystem-ci/npmx.ts +++ b/ecosystem-ci/npmx.ts @@ -1,8 +1,7 @@ export function patchNpmxVitestConfig(config: string): string { // The pinned Nuxt project uses liveDollarFetch to avoid capturing a stale - // $fetch during browser tests. Keep it when adding our Vitest workarounds. - const nuxtProject = - /defineVitestProject\(\{\s*plugins:\s*\[\s*liveDollarFetch\(\)\s*,?\s*\],\s*test:\s*\{/g; + // $fetch during browser tests. Keep it and the upstream Vue compiler alias. + const nuxtProject = /defineVitestProject\(\{\s*plugins:\s*\[\s*liveDollarFetch\(\)\s*,?\s*\]/g; if ([...config.matchAll(nuxtProject)].length !== 1) { throw new Error('npmx.dev patch: expected the pinned Nuxt test project configuration'); } @@ -17,19 +16,6 @@ export function patchNpmxVitestConfig(config: string): string { // https://vitest.dev/config/browser/importmapmocks return { test: { browser: { importMapMocks: false } } } }, - // Temporary Vitest 5 workaround: preserve Nuxt's optimizer exclusions. - // Remove when upstream preserves these exclusions after the merge. - // https://github.com/why-reproductions-are-required/vitest-browser-optimizer-config-order - configureServer(server) { - for (const options of [ - server.config.optimizeDeps, - server.environments.client.config.optimizeDeps, - ]) { - const excluded = new Set(options.exclude ?? []) - options.include = options.include?.filter(dep => !excluded.has(dep)) - } - }, - }], - test: {`, + }]`, ); } diff --git a/ecosystem-ci/patch-project.ts b/ecosystem-ci/patch-project.ts index 5d74978758..85cc7c21fa 100644 --- a/ecosystem-ci/patch-project.ts +++ b/ecosystem-ci/patch-project.ts @@ -88,6 +88,15 @@ if (process.env.GITHUB_ENV) { await prepareWebdriverioProject(project, repoRoot, cli); +if (project === 'npmx.dev') { + // The pinned workspace enables strict peer checks. Supply devframe's optional + // cac peer explicitly so migration satisfies its ^7.0.0 requirement. + const packagePath = join(repoRoot, 'package.json'); + const pkg = JSON.parse(await readFile(packagePath, 'utf-8')); + pkg.devDependencies.cac = '7.0.0'; + await writeFile(packagePath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf-8'); +} + if (project === 'rollipop') { const oxfmtrc = await readFile(join(repoRoot, '.oxfmtrc.json'), 'utf-8'); await writeFile( @@ -369,10 +378,6 @@ ${registration}`, if (project === 'npmx.dev') { // Nuxt loads app modules before per-file mocks; use request interception. // https://vitest.dev/config/browser/importmapmocks - // Vitest 5 adds browser optimizer dependencies after Nuxt's config hook has - // filtered its exclusions. Reapply that filter only in the Nuxt test project. - // Remove when an upstream fix preserves those exclusions after the merge. - // https://github.com/why-reproductions-are-required/vitest-browser-optimizer-config-order const viteConfigPath = join(repoRoot, 'vite.config.ts'); const viteConfig = await readFile(viteConfigPath, 'utf-8'); await writeFile(viteConfigPath, patchNpmxVitestConfig(viteConfig), 'utf-8'); diff --git a/ecosystem-ci/repo.json b/ecosystem-ci/repo.json index 1e2ae01307..82f582d492 100644 --- a/ecosystem-ci/repo.json +++ b/ecosystem-ci/repo.json @@ -104,7 +104,7 @@ "npmx.dev": { "repository": "https://github.com/npmx-dev/npmx.dev.git", "branch": "main", - "hash": "0e44738831077879c7ab00469fc50f5dbcf18650", + "hash": "3472596fa5e63dea39bd6c5f3fb561371d2f6034", "forceFreshMigration": true, "playwright": true }, diff --git a/packages/tools/src/__tests__/ecosystem-npmx.spec.ts b/packages/tools/src/__tests__/ecosystem-npmx.spec.ts index 69adfbaa6d..b1f5b87877 100644 --- a/packages/tools/src/__tests__/ecosystem-npmx.spec.ts +++ b/packages/tools/src/__tests__/ecosystem-npmx.spec.ts @@ -6,24 +6,15 @@ import { patchNpmxVitestConfig } from '../../../../ecosystem-ci/npmx.ts'; const nuxtProject = `defineVitestProject({ plugins: [liveDollarFetch()], + resolve: { alias: { '@vue/compiler-dom': 'compiler-dom.esm-browser.js' } }, test: { name: 'nuxt', browser: { enabled: true } }, })`; -interface OptimizerOptions { - include?: string[]; - exclude?: string[]; -} - -interface TestServer { - config: { optimizeDeps: OptimizerOptions }; - environments: { client: { config: { optimizeDeps: OptimizerOptions } } }; -} - describe('patchNpmxVitestConfig', () => { test.each([ nuxtProject, nuxtProject.replace('[liveDollarFetch()]', '[\n liveDollarFetch(),\n ]'), - ])('preserves the existing plugin and test settings', (config) => { + ])('preserves the existing plugin, aliases, and test settings', (config) => { const liveDollarFetch = { name: 'live-dollar-fetch' }; const patched = runInNewContext(patchNpmxVitestConfig(config), { defineVitestProject: (project: unknown) => project, @@ -32,8 +23,8 @@ describe('patchNpmxVitestConfig', () => { plugins: { name: string; config?: () => { test: { browser: { importMapMocks: boolean } } }; - configureServer?: (server: TestServer) => void; }[]; + resolve: { alias: Record }; test: { name: string; browser: { enabled: boolean } }; }; @@ -44,22 +35,8 @@ describe('patchNpmxVitestConfig', () => { test: { browser: { importMapMocks: false } }, }); expect(patched.test).toEqual({ name: 'nuxt', browser: { enabled: true } }); - - const server: TestServer = { - config: { optimizeDeps: { include: ['keep', 'excluded'], exclude: ['excluded'] } }, - environments: { - client: { - config: { - optimizeDeps: { include: ['browser', 'excluded'], exclude: ['excluded'] }, - }, - }, - }, - }; - patched.plugins[1].configureServer?.(server); - expect(server.config.optimizeDeps).toEqual({ include: ['keep'], exclude: ['excluded'] }); - expect(server.environments.client.config.optimizeDeps).toEqual({ - include: ['browser'], - exclude: ['excluded'], + expect(patched.resolve.alias).toEqual({ + '@vue/compiler-dom': 'compiler-dom.esm-browser.js', }); }); From b42e2af7dbb5b71ba16b77a5801fed46690fdc3d Mon Sep 17 00:00:00 2001 From: MK Date: Fri, 23 Oct 2026 17:49:53 +0900 Subject: [PATCH 5/6] test: use upstream npm fix for jest-dom ecosystem fixture --- ecosystem-ci/patch-project.ts | 10 ++-------- ecosystem-ci/repo.json | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/ecosystem-ci/patch-project.ts b/ecosystem-ci/patch-project.ts index 85cc7c21fa..671aaf2d6e 100644 --- a/ecosystem-ci/patch-project.ts +++ b/ecosystem-ci/patch-project.ts @@ -274,14 +274,8 @@ const forceFreshMigration = 'forceFreshMigration' in repoConfig && repoConfig.fo // runner+provider pair, exactly as a user who followed the guard's advice would. const vitestOverrides = { vitest: VITEST_VERSION, - // This fixture has no coverage provider. Forcing beta coverage peers makes - // npm loop while resolving optional peers of stable Vitest, until it OOMs. - ...(project === 'vite-plus-jest-dom-repro' - ? {} - : { - '@vitest/coverage-v8': VITEST_VERSION, - '@vitest/coverage-istanbul': VITEST_VERSION, - }), + '@vitest/coverage-v8': VITEST_VERSION, + '@vitest/coverage-istanbul': VITEST_VERSION, }; // E2E intentionally installs just-published toolchain packages (e.g. diff --git a/ecosystem-ci/repo.json b/ecosystem-ci/repo.json index 82f582d492..498a63d676 100644 --- a/ecosystem-ci/repo.json +++ b/ecosystem-ci/repo.json @@ -117,7 +117,7 @@ "vite-plus-jest-dom-repro": { "repository": "https://github.com/why-reproductions-are-required/vite-plus-jest-dom-repro.git", "branch": "master", - "hash": "01bd9ce1ac66ee3c21ed8a7f14311317d87fb999", + "hash": "5669ec0670d0a58133823797f9074f6f5f2a1904", "forceFreshMigration": true }, "bun-vite-template": { From 78ed9a2a01f8c5c898e7c7bb9e086ca136ad7ec9 Mon Sep 17 00:00:00 2001 From: MK Date: Fri, 23 Oct 2026 17:52:15 +0900 Subject: [PATCH 6/6] test: pin merged jest-dom fixture fix --- ecosystem-ci/repo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem-ci/repo.json b/ecosystem-ci/repo.json index 498a63d676..85d537ef42 100644 --- a/ecosystem-ci/repo.json +++ b/ecosystem-ci/repo.json @@ -117,7 +117,7 @@ "vite-plus-jest-dom-repro": { "repository": "https://github.com/why-reproductions-are-required/vite-plus-jest-dom-repro.git", "branch": "master", - "hash": "5669ec0670d0a58133823797f9074f6f5f2a1904", + "hash": "7b37379a257da03fc06658863ed3b61685ba63c7", "forceFreshMigration": true }, "bun-vite-template": {