chore(repo): Migrate to Vitest 5 - #9664
Conversation
🦋 Changeset detectedLatest commit: 05b47aa The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (1)
Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughVitest and Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This updates the repository’s Vitest tooling and related test typings and global stubs for Vitest 5 compatibility. No concrete merge-blocking behavior or production risk remains identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Linked repositories: Your configuration references 7 linked repositories, but your current plan allows 5. Analyzed Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
| declare module 'vitest' { | ||
| // eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
| interface Assertion<T = any> extends CustomMatchers<T> {} | ||
| interface Assertion<R, T> extends CustomMatchers<R> {} |
There was a problem hiding this comment.
Updated to the new two-parameter Assertion interface for custom matcher augmentations https://vitest.dev/guide/migration/#assertion-types-expose-return-and-received-types
| vi.stubGlobal('window', mockWindow); | ||
| vi.stubGlobal('getComputedStyle', mockGetComputedStyle); | ||
| vi.stubGlobal('document', { |
There was a problem hiding this comment.
global assignments in DOM environments now propagate to the window https://vitest.dev/guide/migration/#dom-environment-global-assignments-now-update-the-underlying-window
this is the documented way to override globals
| @@ -1,3 +0,0 @@ | |||
| import { defineWorkspace } from 'vitest/config'; | |||
|
|
|||
| export default defineWorkspace(['./packages/*/vitest.config.{mts,mjs,js,ts}', './scripts/vitest.config.mjs']); | |||
There was a problem hiding this comment.
🪓 defineWorkspace no longer exists in Vitest 5 and nothingr eferenced this file, turbo runs vitest per package
If we ever need a root runner, the equivalent is test.projects
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
Description
Migrates the monorepo to Vitest 5 https://vitest.dev/blog/vitest-5.html
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change