-
Notifications
You must be signed in to change notification settings - Fork 11.4k
chore: upgrade Vitest to 4.0.16 and Vite to 6.4.1 #26351
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
volnei
wants to merge
32
commits into
main
Choose a base branch
from
devin/upgrade-vitest-4-1767197115
base: main
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
+2,131
−1,412
Conversation
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
- Update vitest from 2.1.9 to 4.0.16 - Update @vitest/ui from 2.1.9 to 4.0.16 - Update vitest-fetch-mock from 0.3.0 to 0.4.5 - Update vitest-mock-extended from 2.0.2 to 3.1.0 - Update vite from 4.5.14/5.4.21 to 6.4.1 across all packages - Update @vitejs/plugin-react to 5.1.2 - Update @vitejs/plugin-react-swc to 4.2.2 - Update @vitejs/plugin-basic-ssl to 2.1.0 - Update vite-plugin-dts to 4.5.4 - Rename vitest.config.ts to vitest.config.mts for ESM compatibility - Add globals: true to vitest config Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Convert arrow function mockImplementation patterns to regular functions (Vitest 4.0 breaking change: arrow functions can't be constructor mocks) - Fix CSS imports with ?inline suffix for Vite 6 compatibility - Add biome override to disable useArrowFunction rule for test files - Fix syntax errors in test files introduced by regex replacements Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Contributor
E2E results are ready! |
… spec files Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…t 4.0 Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…t 4.0 - Fix CrmService.integration.test.ts jsforce.Connection mock - Fix RetellSDKClient.test.ts Retell mock - Fix RetellAIService.test.ts CreditService mocks - Fix GoogleCalendarSubscriptionAdapter.test.ts CalendarAuth mock Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…r Vitest 4.0 - Fix googleapis.ts Calendar, OAuth2Client, and JWT mocks - Fix utils.ts JWT mock - Fix OAuthManager.ts defaultMockOAuthManager mock Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…cks for Vitest 4.0 Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
… Vitest 4.0 Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…s for Vitest 4.0 Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…Vitest 4.0 Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…unction for Vitest 4.0 Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…er.devin.ai/proxy/github.com/calcom/cal.com into devin/upgrade-vitest-4-1767197115
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
- Fix Response constructor 204 status code issue in testUtils.ts - Fix FeaturesRepository mock persistence in handleNotificationWhenNoSlots.test.ts - Add @vitest-environment node directive to formSubmissionUtils.test.ts - Fix document.querySelector mock in embed.test.ts Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
…or Vitest 4.0 Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
- Fix booking-validations.test.ts: convert UserRepository mock to regular function - Fix route.test.ts: update 500 error test to mock ImageResponse instead of fetch - Fix users-public-view.test.tsx: add missing mocks for getOrgFullOrigin and useRouterQuery - Add @calcom/web path alias to vitest config Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
- Add svg-hashes.json mock for route.test.ts - Add tailwind.generated.css mock for embed.test.ts - Update vitest config to use mock files Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
- Use array format for aliases to ensure proper ordering - Add @calcom/platform-constants alias to resolve from source - Add @calcom/embed-react alias to resolve from source - Ensure svg-hashes.json mock alias is matched before @calcom/web Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Upgrades Vitest from 2.1.9 to 4.0.16 and Vite from 4.5.14/5.4.21 to 6.4.1 across the monorepo, including all necessary breaking change fixes.
Package updates:
vitest: 2.1.9 → 4.0.16@vitest/ui: 2.1.9 → 4.0.16vitest-fetch-mock: 0.3.0 → 0.4.5vitest-mock-extended: 2.0.2 → 3.1.0vite: 4.5.14/5.4.21 → 6.4.1 (across embed-core, embed-react, embed-snippet, atoms, libraries)@vitejs/plugin-basic-ssl: 1.1.0 → 2.1.0@vitejs/plugin-react: 2.2.0 → 5.1.2@vitejs/plugin-react-swc: 3.7.0 → 4.2.2vite-plugin-dts: 3.7.3 → 4.5.4Config changes:
vitest.config.tstovitest.config.mtsfor ESM compatibility with Vitest 4.0globals: trueto vitest config to maintaindescribe/it/expectglobal availabilityexcludepattern forapps/api/v2/**/*.spec.ts(these files use Jest, not Vitest)Breaking change fixes:
mockImplementation(() => ...)patterns to regular functionsmockImplementation(function() { return ...; })(Vitest 4.0 breaking change: arrow functions can no longer be used as constructor mocks)?inlinesuffix to CSS imports in embed-core for Vite 6 compatibilityuseArrowFunctionlint rule for test files to prevent lint conflicts with the Vitest 4.0 requirementUpdates since last revision:
VerificationTokenServicemock inpaymentCallback.test.tsto properly mock the staticcreatemethodRoutingFormResponseRepositoryconstructor mock inqueued-response.test.tsEventTypeRepositoryconstructor mock induplicate.handler.test.tsPermissionCheckServiceconstructor mocks ininviteMemberUtils.test.tsCreditServiceconstructor mocks inCallService.test.ts*.spec.tsfiles from Vitest (they use Jest globals)Known issue (pre-existing, not caused by this upgrade):
duplicate.handler.test.tsexpectsBAD_REQUESTbut the handler now returnsCONFLICTfor P2002 errors - this test expectation is outdated and should be fixed separatelyRequested by: Volnei Munhoz (@volnei)
Link to Devin run: https://app.devin.ai/sessions/49389474d1244630988cb37954dcd10f
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
yarn installto update dependenciesyarn workspace @calcom/embed-core buildto verify embed packages build with Vite 6TZ=UTC yarn testto verify tests pass with Vitest 4.0.16yarn type-check:ci --forceto verify no type errorsChecklist
Human Review Checklist
function() { return ...; }patterns)?inlinechanges*.spec.tsexclusion is appropriate (these files use Jest, not Vitest)duplicate.handler.test.tstest expectation should be updated separately (expects BAD_REQUEST but handler returns CONFLICT)