-
-
Notifications
You must be signed in to change notification settings - Fork 440
Update vitest to v4 #5791
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: next-minor
Are you sure you want to change the base?
Update vitest to v4 #5791
Conversation
🦋 Changeset detectedLatest commit: 77e1fd6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Tests are failing even on main branch on my laptop, so I'm checking on CI if there is any failures |
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.
Pull request overview
This PR updates Vitest from v3 to v4, modernizing the test infrastructure and aligning with the latest Vitest APIs and configuration patterns.
Key Changes:
- Vitest and all related packages updated from v3.2.4 to v4.0.12
- Configuration migrated from deprecated
vitest.workspace.tstoprojectsoption invitest.config.ts - Package
@vitest/runneradded as new peer dependency for type definitions - Test utilities updated to use Vitest v4's assert API
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vitest.workspace.ts | Removed in favor of inline projects configuration |
| vitest.shared.ts | Simplified by moving most config to main vitest.config.ts |
| vitest.config.ts | New centralized config file with projects array for workspace support |
| pnpm-lock.yaml | Updated all vitest-related dependencies from v3.2.4 to v4.0.12 |
| packages/vitest/src/utils.ts | Updated to use Vitest v4's assert API, removed node:assert dependency |
| packages/vitest/src/index.ts | Added @vitest/runner types import, simplified TestCollectorCallable interface |
| packages/vitest/package.json | Updated peer dependencies to vitest ^4.0.0 and added @vitest/runner ^4.0.0 |
| package.json | Updated root devDependencies for all @vitest/* packages to ^4.0.12 |
| .changeset/tiny-windows-ring.md | Documents the vitest v4 support as a minor change |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Type
Description
Update and support Vitest v4
Related