-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Upgrade to Vitest v4 #9862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Upgrade to Vitest v4 #9862
Changes from all commits
d878c7e
15dfb63
d09cc95
d926606
f086b6d
fd0e0e7
9947e8b
88866d8
7ec3458
dacd333
1efa68d
aeefc4c
91591aa
ef010b8
ab4c572
894d111
43372ab
7000d41
ed0ad73
69ff823
b691135
0d3aaef
0f0413d
b748a95
fe6e2be
6818607
71dfd88
f013619
8ab8f92
b565b7f
f3bb2e4
9966a6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,6 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@vitejs/plugin-react": "^4.3.4", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import './.next/types/routes.d.ts' | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,6 @@ | |
| "svelte": "^5.39.3", | ||
| "svelte-check": "^4.3.1", | ||
| "typescript": "5.8.3", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,6 @@ | |
| "svelte": "^5.39.3", | ||
| "svelte-check": "^4.3.1", | ||
| "typescript": "5.8.3", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,6 @@ | |
| "svelte": "^5.39.3", | ||
| "svelte-check": "^4.3.1", | ||
| "typescript": "5.8.3", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,6 @@ | |
| "svelte": "^5.39.3", | ||
| "svelte-check": "^4.3.1", | ||
| "typescript": "5.8.3", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,6 @@ | |
| "svelte": "^5.39.3", | ||
| "svelte-check": "^4.3.1", | ||
| "typescript": "5.8.3", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,6 @@ | |
| "svelte": "^5.39.3", | ||
| "svelte-check": "^4.3.1", | ||
| "typescript": "5.8.3", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,6 @@ | |
| "svelte": "^5.39.3", | ||
| "svelte-check": "^4.3.1", | ||
| "typescript": "5.8.3", | ||
| "vite": "^6.3.6" | ||
| "vite": "^6.4.1" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: There are no breaking changes listed for Vite v6.4.1. See the Vite Releases/Changes and the package changelog. [1][2] Sources: 🌐 Web query:
💡 Result: Short answer: Not officially—SvelteKit 2.x (including 2.42) requires/targets Vite 5 as the minimum supported Vite, while Vite 6 is a new major release that framework/plugin authors must opt in to. Vite 6 aims for backward compatibility, but SvelteKit (and What to do:
Sources:
🌐 Web query:
💡 Result: Short answer: Yes — Sources:
Revert Vite to 5.x for SvelteKit 2.42 compatibility. SvelteKit 2.42 targets Vite 5.x and does not officially support Vite 6. While 🤖 Prompt for AI Agents |
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: TanStack/query
Length of output: 172
🌐 Web query:
Vite 6.4.1 release notes breaking changes💡 Result:
Short answer: Vite 6.4.1 is a patch release with bug fixes — there are no listed breaking changes for v6.4.1. Notable fixes include preview: use host URL to open browser, HMR handler sequencing, addWatchFile/base fix, and a pluginFilter refactor. [1][2]
Sources:
🌐 Web query:
@vitejs/plugin-react 4.3.4 Vite 6 compatibility💡 Result:
Short answer: 4.3.4 is not the recommended release for Vite 6 — upgrade to
@vitejs/plugin-reactv5+ for full Vite 6 / rolldown + Oxc support.Why:
@vitejs/plugin-reactv4.3.4 was released in Nov 2024 and predates Vite 6. Vite 6 introduces the rolldown/Oxc architecture, and the plugin’s v5+ line incorporates Oxc-based React refresh and related changes to target that new runtime; using v4.x may work via the compatibility layer but isn’t the intended/optimal combination. Recommend upgrading to@vitejs/plugin-reactv5+ when moving to Vite 6. [1][2][3]Sources:
@vitejs/plugin-reactreleases (4.3.4 date). [1]@vitejs/plugin-reactv5.0.0+ uses Oxc (migration/compatibility details). [3]🌐 Web query:
Vitest v4 Vite version requirements💡 Result:
Short answer: Vitest v4 expects Vite 6+ (official compatibility targets Vite 6 and Vite 7). Some
@vitestpackages also list broader peer ranges in practice (e.g. ^5 || ^6 || ^7), but the documented Vitest v4 package targets Vite 6/7. [1][2]Sources:
@vitestpackages (peer: ^5.0.0 || ^6.0.0 || ^7.0.0-0). [2]Upgrade
@vitejs/plugin-reactto v5+ for Vite 6.4.1 compatibility.@vitejs/plugin-reactv4.3.4 predates Vite 6 and is not the recommended version for this stack. Vite 6 introduces rolldown/Oxc architecture, and@vitejs/plugin-reactv5+ incorporates the necessary Oxc-based changes to pair with it. While v4.3.4 may work via a compatibility layer, upgrade to v5+ for optimal support. Vitest v4 is compatible with Vite 6.🤖 Prompt for AI Agents