Repository navigation
chore(deps): update vitest monorepo to v4 - #1396
renovate[bot] wants to merge 1 commit into
Conversation
❌ Deploy Preview for stranske-trip-planner failed.
|
📝 WalkthroughWalkthroughThe Changesvitest Version Upgrade
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
81d3d36 to
1a8b8e8
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/package.json`:
- Line 29: The vitest dependency version ^4.0.0 is incompatible with the pinned
vite version 5.4.19 because Vitest v4 requires Vite >= 6 and Node.js >= 20.
Either downgrade vitest to a v3.x version that is compatible with Vite 5.4.19,
or upgrade vite to version 6 or higher along with updating Node.js requirements.
Given the constraints, downgrading vitest to the latest v3.x version is the
recommended approach to maintain compatibility with the current frontend
toolchain.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2fc8e277-43f8-4ad5-94cc-8f741afd5dda
⛔ Files ignored due to path filters (1)
frontend/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
frontend/package.json
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
stranske/Workflows(auto-detected)
📜 Review details
🧰 Additional context used
🪛 GitHub Actions: Cross-Repo Smoke / 0_cross-repo-full-product.txt
frontend/package.json
[error] 1-1: Command failed: npm --prefix frontend ci (process completed with exit code 1).
1a8b8e8 to
c3a59ce
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/package.json`:
- Line 29: The vite dependency in frontend package.json is specified as ^5.4.19,
but Vitest 4 (which is being upgraded to ^4.0.0) requires Vite >=6.4.0 for
compatibility. Update the vite version constraint in the dependencies section of
frontend package.json from ^5.4.19 to ^6.4.0 to ensure Vitest 4 works correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 9a94c91a-3514-4ab6-9d7b-9a0549c274e4
⛔ Files ignored due to path filters (1)
frontend/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
frontend/package.json
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
stranske/Workflows(auto-detected)
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Cross-Repo Smoke / cross-repo-full-product
- GitHub Check: cross-repo-full-product
🔇 Additional comments (1)
frontend/package.json (1)
25-25:@vitejs/plugin-react4.7.0 already supports Vite 6 and does not require upgrading.The current
@vitejs/plugin-react@^4.7.0declares Vite 6 compatibility in its peer dependencies (vite: '^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0'), so no version bump is needed for this package when upgrading Vite.> Likely an incorrect or invalid review comment.
| "typescript": "^5.9.3", | ||
| "vite": "^5.4.19", | ||
| "vitest": "^2.1.9" | ||
| "vitest": "^4.0.0" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for vitest configuration files and check Node.js version constraints
echo "=== Vitest configuration files ==="
fd -t f 'vitest.config' frontend/
echo -e "\n=== Node.js version constraints ==="
cat .nvmrc 2>/dev/null || echo "No .nvmrc found"
cat .node-version 2>/dev/null || echo "No .node-version found"
# Check package.json engines field in both root and frontend
echo -e "\n=== Root package.json engines ==="
jq -r '.engines // "No engines field"' package.json 2>/dev/null || echo "No root package.json"
echo -e "\n=== Frontend package.json engines ==="
jq -r '.engines // "No engines field"' frontend/package.jsonRepository: stranske/trip-planner
Length of output: 288
🏁 Script executed:
#!/bin/bash
# More thorough search for vitest config and test setup
echo "=== Vitest config files (all locations) ==="
fd -t f 'vitest\.config' . 2>/dev/null || echo "None found"
echo -e "\n=== Package.json structure (frontend) ==="
cat frontend/package.json | head -50
echo -e "\n=== Test files in frontend ==="
fd -t f '\.(test|spec)\.(ts|tsx|js|jsx)$' frontend/ 2>/dev/null | head -20
echo -e "\n=== Node.js version in use ==="
node --version 2>/dev/null || echo "Node not available in sandbox"Repository: stranske/trip-planner
Length of output: 1881
🌐 Web query:
Vitest 4 breaking changes Node.js requirements deprecated APIs
💡 Result:
As of June 17, 2026, the current stable version of Vitest is 4.1.9 [1][2][3]. Major changes introduced in the Vitest 4 release cycle, particularly regarding Node.js requirements and API deprecations, are detailed below. Node.js and Vite Requirements Vitest 4 introduced updated environment requirements. While Vitest 4.0 initially required Node.js 20.0.0 or higher and Vite 6.0.0 or higher [4], subsequent updates have raised these requirements. As of mid-2026, Vitest now requires Node.js 22.0.0 and Vite 6.4.0 or higher [5]. Using older versions is not supported and may lead to unexpected errors [4]. Deprecated and Removed APIs Vitest 4 marked a significant cleanup of deprecated features. Key removals and changes include: Entrypoints and Modules - Several legacy entrypoints have been removed or redirected: - vitest/reporters: Use vitest/node instead [4]. - vitest/environments and vitest/snapshot: Use vitest/runtime instead [4]. - vitest/runners: Use TestRunner from vitest instead [4]. - vitest/mocker: Removed in favor of using the @vitest/mocker package directly [4]. - Node types are no longer exported from the main entry point; use vitest/node instead [4][6][7]. Configuration Options - Deprecated config options removed include: - poolMatchGlobs and environmentMatchGlobs: Use projects instead [4][7]. - deps.external, deps.inline, and deps.fallbackCJS: Use server.deps.external, server.deps.inline, or server.deps.fallbackCJS instead [4]. - minWorkers: Removed; only maxWorkers now affects test execution [4]. - workspace: Use projects instead [7]. Testing and Reporting APIs - The third argument (options object) for test and describe blocks is no longer supported; options must be passed as the second argument [4]. - The basic reporter was removed; the default reporter with summary: false should be used instead [8][7]. - Browser mode requirements changed: A provider factory must be used instead of a string, and custom provider packages (e.g., @vitest/browser-playwright) are now required [8][7]. For a complete list of breaking changes, users are advised to consult the official Vitest migration guide [4][8].
Citations:
- 1: https://www.npmjs.com/package/vitest
- 2: https://github.com/vitest-dev/vitest/releases/tag/v4.1.9
- 3: https://registry.npmjs.org/vitest
- 4: https://github.com/vitest-dev/vitest/blob/main/docs/guide/migration.md
- 5: feat!: require Node.js 22 and Vite 6.4 vitest-dev/vitest#10178
- 6: https://github.com/vitest-dev/vitest/releases/tag/v4.0.0
- 7: https://newreleases.io/project/npm/vitest/release/4.0.0
- 8: https://vitest.dev/blog/vitest-4
🏁 Script executed:
#!/bin/bash
# Check for deprecated Vitest imports and API patterns
echo "=== Checking for deprecated Vitest imports ==="
rg 'from ["\']vitest/(reporters|environments|snapshot|runners|mocker)["\']' frontend/src/ || echo "No deprecated imports found"
echo -e "\n=== Checking for `@vitest/mocker` usage ==="
rg '`@vitest/mocker`' frontend/ || echo "Not found"
echo -e "\n=== Sample test file to check API patterns ==="
head -30 frontend/src/api/health.test.ts
echo -e "\n=== Checking describe/test with 3-arg pattern ==="
rg 'describe\([^,]+,[^,]+,[^)]+\)|test\([^,]+,[^,]+,[^)]+\)' frontend/src/ || echo "No 3-arg patterns found"
echo -e "\n=== Checking for Node types import ==="
rg 'import.*from ["\']vitest/node["\']' frontend/src/ || echo "Not explicitly imported"
echo -e "\n=== Vite version in frontend ==="
jq '.devDependencies.vite' frontend/package.jsonRepository: stranske/trip-planner
Length of output: 345
🏁 Script executed:
#!/bin/bash
# Check for deprecated Vitest imports and API patterns
echo "=== Checking for deprecated Vitest imports ==="
rg "vitest/(reporters|environments|snapshot|runners|mocker)" frontend/src/ || echo "No deprecated imports found"
echo -e "\n=== Checking for `@vitest/mocker` usage ==="
rg "`@vitest/mocker`" frontend/ || echo "Not found"
echo -e "\n=== Sample test file to check API patterns ==="
head -30 frontend/src/api/health.test.ts
echo -e "\n=== Checking test/describe callback arguments ==="
rg "test\(.*,.*,.*\)" frontend/src/ | head -10 || echo "No matches"
rg "describe\(.*,.*,.*\)" frontend/src/ | head -10 || echo "No matches"
echo -e "\n=== Vite version requirement ==="
jq '.devDependencies.vite' frontend/package.json
echo -e "\n=== Check if vitest.config exists at root ==="
ls -la vitest.config.* 2>/dev/null || echo "No vitest.config at root"Repository: stranske/trip-planner
Length of output: 1447
🌐 Web query:
Vitest 4 Vite version requirement 6.4.0 compatibility
💡 Result:
Vitest 4 requires a minimum of Vite 6.4.0 [1][2]. While early versions of Vitest 4 initially stated a requirement of Vite >= 6.0.0 [3][4], subsequent updates to the Vitest codebase increased this requirement to Node.js 22 and Vite 6.4 [1][2]. It is recommended to ensure your environment meets these updated version prerequisites to avoid unexpected errors or compatibility issues [3].
Citations:
- 1: feat!: require Node.js 22 and Vite 6.4 vitest-dev/vitest#10178
- 2: https://npmx.dev/package-changelog/vitest/v/4.1.4
- 3: https://vitest.dev/guide/migration.html
- 4: Migration documentation doesn't specify Vite version required. vitest-dev/vitest#9646
Update Vite to ^6.4.0 for Vitest 4 compatibility.
Vitest 4 requires Vite >=6.4.0, but the project currently specifies vite: ^5.4.19. This version constraint will prevent Vitest 4 from working correctly. Update the frontend package.json to use Vite 6.4.0 or higher (e.g., ^6.4.0).
Additionally, Vitest 4 requires Node.js >=22.0.0 (not >=20 as often cited). The current environment meets this requirement. Test files do not use deprecated APIs, and no configuration migration is needed since the project does not maintain a vitest.config file.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@frontend/package.json` at line 29, The vite dependency in frontend
package.json is specified as ^5.4.19, but Vitest 4 (which is being upgraded to
^4.0.0) requires Vite >=6.4.0 for compatibility. Update the vite version
constraint in the dependencies section of frontend package.json from ^5.4.19 to
^6.4.0 to ensure Vitest 4 works correctly.
|
Closed as superseded by #1395, which merged the coupled Vite 8 / @vitejs/plugin-react 6 / Vitest 4 update together with the regenerated lockfile and TypeScript/Vitest config compatibility fixes. |
This PR contains the following updates:
^2.1.9→^4.0.0Release Notes
vitest-dev/vitest (vitest)
v4.1.9Compare Source
🐞 Bug Fixes
importOriginalwith optimizer and query import [backport to v4] - by Hiroshi Ogawa, David Harris, Codexand Vladimir in #10546 (a5180)View changes on GitHub
v4.1.8Compare Source
🐞 Bug Fixes
cdpAPI whenallowWrite/allowExec: false[backport to v4] - by @hi-ogawa and Codex in #10450 (e4067)View changes on GitHub
v4.1.7Compare Source
🐞 Bug Fixes
View changes on GitHub
v4.1.6Compare Source
🐞 Bug Fixes
ToMatchScreenshotResolvePath- by @macarie and @sheremet-va in #10138 (31882)sequence.concurrent: truewith top-leveltest(..., { concurrent: false })+ depreactesequentialtest API and options - by @hi-ogawa, Codex and @sheremet-va in #10196 (2847d)🏎 Performance
View changes on GitHub
v4.1.5Compare Source
🚀 Experimental Features
instrumenteroption - by @BartWaardenburg and @AriPerkkio in #10119 (0e0ff)🐞 Bug Fixes
vi.defineHelpercalled as object method - by @hi-ogawa in #10163 (122c2)agentreporter tominimal- by @sheremet-va in #10157 (663b9)View changes on GitHub
v4.1.4Compare Source
🚀 Features
skipFullif agent detected - by @hi-ogawa in #10018 (53757)assertionas a public field - by @sheremet-va in #10095 (a120e)🐞 Bug Fixes
expect(..., message)consistent as error message prefix - by @hi-ogawa and Codex in #10068 (a1b5f)View changes on GitHub
v4.1.3Compare Source
🚀 Experimental Features
experimental.preParseflag - by @sheremet-va in #10070 (78273)browser.locators.exactoption - by @sheremet-va in #10013 (48799)TestAttachment.bodyEncoding- by @hi-ogawa in #9969 (89ca0)🐞 Bug Fixes
expect.pollinterval - by @hi-ogawa and Claude Sonnet 4.6 in #10022 (3f5bf)@vitest/coverage-v8and@vitest/coverage-istanbulas optional dependency - by @alan-agius4 in #10025 (146d4)defineHelperfor webkit async stack trace + update playwright 1.59.0 - by @hi-ogawa in #10036 (5a5fa)JestExtendError.contextfrom verbose error reporting - by @hi-ogawa in #9983 (66751)vitest- by @hi-ogawa and Codex in #10042 (691d3)View changes on GitHub
v4.1.2Compare Source
This release bumps Vitest's
flattedversion and removes version pinning to resolveflatted's CVE related issues (#9975).🐞 Bug Fixes
setupFilesfrom parent directory - by @hi-ogawa in #9960 (7aa93)toMatchScreenshotcan't capture a stable screenshot - by @macarie in #9847 (faace)coverageConfigDefaultsvalues and types - by @Arthie in #9940 (b3c99)View changes on GitHub
v4.1.1Compare Source
🚀 Features
matchesTagsFilterto test if the current filter matches tags - by @sheremet-va in #9913 (eec53)experimental.vcsProvider- by @sheremet-va in #9928 (56115)🐞 Bug Fixes
TestProject.testFilesListinternal properly - by @sapphi-red in #9867 (54f26)use- by @oilater in #9831 and #9861 (633ae)vi.advanceTimersto the preview provider - by @sheremet-va in #9891 (1bc3e)--standalonemode without running tests - by @sheremet-va in #9911 (e78ad)body- by @sheremet-va in #9912 (6fdb2)retry.conditionRegExp serialization issue - by @nstepien and @hi-ogawa in #9942 (7b605)testreturn as tests - by @sheremet-va in #9871 (141e7)View changes on GitHub
v4.1.0Compare Source
Vitest 4.1 is out!
This release page lists all changes made to the project during the 4.1 beta. To get a review of all the new features, read our blog post.
🚀 Features
setTickModeto timer controls - by @atscott and @sheremet-va in #8726 (4b480)toTestSpecificationto reported tasks - by @sheremet-va in #9464 (1a470)vi.mockorvi.hoistedare declared outside of top level of the module - by @sheremet-va in #9387 (5db54)aroundEachandaroundAllhooks - by @sheremet-va in #9450 (2a8cb)neworallin--updateflag - by @sheremet-va in #9543 (a5acf)metain test options - by @sheremet-va in #9535 (7d622)test.extendsyntax - by @sheremet-va in #9550 (e5385)vitest listto statically collect tests instead of running files to collect them - by @sheremet-va in #9630 (7a8e7)--detect-async-leaks- by @AriPerkkio in #9528 (c594d)mockThrowandmockThrowOnce- by @thor-juhasz and @sheremet-va in #9512 (61917)update: "none"and add docs about snapshots behavior on CI - by @hi-ogawa in #9700 (05f18)launchOptionswithconnectOptions- by @hi-ogawa in #9702 (f0ff1)page/locator.markAPI to enhance playwright trace - by @hi-ogawa in #9652 (d0ee5)testinexperimental_parseSpecification- by @jgillick and Jeremy Gillick in #9235 (2f367)createSpecification- by @sheremet-va in #9336 (c8e6c)runTestFilesas alternative torunTestSpecifications- by @sheremet-va in #9443 (43d76)allowWriteandallowExecoptions toapi- by @sheremet-va in #9350 (20e00)toTestSpecification- by @sheremet-va in #9627 (6f17d)userEvent.wheelAPI - by @macarie in #9188 (66080)filterNodeoption to prettyDOM for filtering browser assertion error output - by @Copilot, sheremet-va and @sheremet-va in #9475 (d3220)detailsPanelPositionoption and button - by @shairez in #9525 (c8a31)findElementand enable strict mode in webdriverio and preview - by @sheremet-va in #9677 (c3f37)ignore start/stopignore hints - by @AriPerkkio in #9204 (e59c9)coverage.changedoption to report only changed files - by @kykim00 and @AriPerkkio in #9521 (1d939)onModuleRunnerhook toworker.init- by @sheremet-va in #9286 (e977f)importDurations: { limit, print }options - by @hi-ogawa, Claude Opus 4.6 and @sheremet-va in #9401 (7e10f)importDurations- by @hi-ogawa and Claude Opus 4.6 in #9533 (3f7a5)beforeAll/afterAll- by @sheremet-va in #9572 (c8339)agentreporter to reduce ai agent token usage - by @cpojer in #9779 (3e9e0)retryoptions - by @MazenSamehR, Matan Shavit, @AriPerkkio and @sheremet-va in #9370 (9e4cf)🐞 Bug Fixes
meta.urlincreateRequire- by @sheremet-va in #9441 (e3422)external/noExternalduringconfigEnvironmenthook - by @hi-ogawa and Claude Opus 4.6 in #9508 (59ea2)browser.isolateis used - by @sheremet-va in #9410 (3d48e)vi.mock({ spy: true })node v8 coverage - by @hi-ogawa, hi-ogawa and Claude Opus 4.6 in #9541 (687b6).namefrom statically collected test - by @sheremet-va in #9596 (b66ff)expect.soft- by @iumehara, @hi-ogawa and Claude Opus 4.6 in #9231 (3eb2c)sequence.shuffle.testsis enabled - by @kaigritun, Kai Gritun and @sheremet-va in #9576 (8182b)expect/src/utilsfromvitest- by @hi-ogawa in #9616 (48739)--detect-async-leaks- by @AriPerkkio in #9638 (9fd4c)aroundEach/Allwhen inneraroundEach/Allthrows - by @hi-ogawa in #9657 (4ec6c)aroundEach/Allsetup timed out - by @hi-ogawa in #9670 (bb013)VitestRunnerConfigoptional fields withSerializedConfig- by @hi-ogawa in #9661 (79520)toBe*spy assertions in favor oftoHaveBeen*(andtoThrowError) - by @sheremet-va in #9665 (4d390)aroundEach/Allerrors but aggregate them on runner - by @hi-ogawa in #9673 (b6365)resolves/rejectschained assertion error - by @hi-ogawa in #9679 (c6151)maxConcurrency- by @hi-ogawa in #9653 (16d13)resolve.conditionsfor externals - by @hi-ogawa in #9717 (1d498)mockObjectchange backwards compatible - by @sheremet-va in #9744 (84c69)URL.nameon jsdom - by @hi-ogawa in #9767 (031f3)vi.importActual()for virtual modules - by @hi-ogawa and Claude Opus 4.6 in #9772 (1e89e)FixtureAccessErrorif suite hook accesses undefined fixture - by @sheremet-va in #9786 (fc2ce)loadortransformoriginal module - by @hi-ogawa and Claude Opus 4.6 in #9774 (a8216)hideSkippedTestsshould not hidetest.todo- by @oilater in #9562 and #9781 (8181e)beforeEachhooks - by @hi-ogawa and Claude Opus 4.6 in #9826 (99e52)performance.nowto measure test timeout duration - by @hi-ogawa and **Claude Opus 4.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.