-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
chore: upgrade vitest from v3 to v4 #14045
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
Draft
fengmk2
wants to merge
1
commit into
toeverything:canary
Choose a base branch
from
fengmk2:vitest-v4
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,7 +73,7 @@ | |
| "!dist/__tests__" | ||
| ], | ||
| "devDependencies": { | ||
| "vitest": "3.1.3" | ||
| "vitest": "4.0.15" | ||
| }, | ||
| "version": "0.25.5" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ | |
| "zod": "^3.23.8" | ||
| }, | ||
| "devDependencies": { | ||
| "vitest": "3.1.3" | ||
| "vitest": "4.0.15" | ||
| }, | ||
| "version": "0.25.5" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,9 +64,9 @@ | |
| "@types/node": "^22.0.0", | ||
| "@typescript-eslint/parser": "^8.18.0", | ||
| "@vanilla-extract/vite-plugin": "^5.0.0", | ||
| "@vitest/browser": "3.1.3", | ||
| "@vitest/coverage-istanbul": "3.1.3", | ||
| "@vitest/ui": "3.1.3", | ||
| "@vitest/browser": "4.0.15", | ||
| "@vitest/coverage-istanbul": "4.0.15", | ||
| "@vitest/ui": "4.0.15", | ||
| "cross-env": "^7.0.3", | ||
| "electron": "^36.0.0", | ||
| "eslint": "^9.16.0", | ||
|
|
@@ -90,7 +90,7 @@ | |
| "typescript-eslint": "^8.18.0", | ||
| "unplugin-swc": "^1.5.1", | ||
| "vite": "^7.0.0", | ||
| "vitest": "3.1.3" | ||
| "vitest": "4.0.15" | ||
| }, | ||
| "packageManager": "[email protected]", | ||
| "resolutions": { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,6 @@ | |
| "graphql": "^16.9.0" | ||
| }, | ||
| "devDependencies": { | ||
| "vitest": "3.1.3" | ||
| "vitest": "4.0.15" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
packages/frontend/core/src/modules/navigation/__tests__/utils.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,11 @@ | ||
| import { defineWorkspace } from 'vitest/config'; | ||
| import { defineConfig } from 'vitest/config'; | ||
|
|
||
| export default defineWorkspace([ | ||
| '.', | ||
| './packages/frontend/apps/electron', | ||
| './blocksuite/**/*/vitest.config.ts', | ||
| ]); | ||
| export default defineConfig({ | ||
| test: { | ||
| projects: [ | ||
| '.', | ||
| './packages/frontend/apps/electron', | ||
| './blocksuite/**/*/vitest.config.ts', | ||
| ], | ||
| }, | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
🌐 Web query:
Vitest 4.0.15 release version npm registry💡 Result:
I couldn't find [email protected] on the npm registry. The latest 4.x release I can find is 4.0.14 (per Snyk's package info). [1][2]
Sources:
🌐 Web query:
Vitest latest version 2025💡 Result:
The latest stable Vitest release is 4.0.6 (released Oct 31, 2025). [1][2]
Sources:
[1] Vitest blog — "Vitest 4.0 is out!" (Oct 22, 2025).
[2] Package release info listing vitest 4.0.6 (published Oct 31, 2025).
🌐 Web query:
Vitest 4.0.15 security vulnerabilities advisories💡 Result:
Short answer: There are no security advisories that specifically report a vulnerability in vitest v4.0.15. Two public advisories (CVE-2025-24964 and CVE-2025-24963) were disclosed in Feb 2025 that affected older major versions and were patched in the 1.x/2.x/3.x line — those issues do not list 4.x as vulnerable.
Details and sources:
If you want, I can:
Sources:
[1] GitHub advisory GHSA-9crc-q9x8-hgqq (CVE-2025-24964).
[2] NVD entry CVE-2025-24964.
[3] GitHub advisory GHSA-8gvc-j273-4wm5 (CVE-2025-24963).
[4] GitLab advisory / CVE-2025-24963 summary.
Update Vitest packages to a valid version—4.0.15 does not exist.
Vitest 4.0.15 is not a valid release. The latest 4.0.x version is 4.0.14 (per Snyk), and the latest stable Vitest release overall is 4.0.6. Update the three packages (
@vitest/browser,@vitest/coverage-istanbul,@vitest/ui) at lines 67-69 and 93 to an existing version, preferably 4.0.6 or higher (up to 4.0.14).No security advisories affect Vitest 4.x versions; two historical CVEs (CVE-2025-24964 and CVE-2025-24963) were patched in the 1.x/2.x/3.x lines only.
🤖 Prompt for AI Agents