Bump vitest from 1.6.1 to 4.1.9#88
Conversation
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 1.6.1 to 4.1.9. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.9/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-version: 4.1.9 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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 `@package.json`:
- Line 57: The vitest v4.1.9 upgrade introduces three critical incompatibilities
that must be resolved: first, update the vite dependency in package.json from
^5.2.10 to ^6.x to satisfy vitest 4.0+ requirements; second, update the
`@vitest/coverage-v8` dependency in package.json from ^1.5.3 to ^4.1.9 to match
the vitest version; third, in vitest.config.mts remove the deprecated
coverage.all: true option (currently on line 15) as this configuration was
removed in vitest 4.0 and will cause test failures if left in place.
🪄 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: Repository: lokalise/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0f2c6648-2aa0-490f-a597-4e405298ec6c
📒 Files selected for processing (1)
package.json
| "typescript": "^5.4.5", | ||
| "vite": "^5.2.10", | ||
| "vitest": "^1.5.3", | ||
| "vitest": "^4.1.9", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify that vitest 4.1.9 is compatible by running the test suite
# Expected: All tests pass without errors related to vitest API changes
npm test 2>&1 | head -100Repository: lokalise/zod-extras
Length of output: 137
🏁 Script executed:
cat -n package.json | head -70Repository: lokalise/zod-extras
Length of output: 2203
🏁 Script executed:
find . -name "vitest.config.*" -o -name "*.test.*" -o -name "*.spec.*" | head -20Repository: lokalise/zod-extras
Length of output: 364
🌐 Web query:
vitest v4 breaking changes from v1 migration guide
💡 Result:
Vitest 4.0, released in October 2025, introduced several breaking changes and mandatory environment upgrades [1][2]. Before migrating from v1, you must ensure your environment meets the minimum requirements: Vitest 4.0 requires Vite 6.0.0 or higher and Node.js 20.0.0 or higher [3]. Key breaking changes in Vitest 4.0 include: Environment and Configuration - Minimum Version Requirements: Upgraded to Vite >= 6.0 and Node.js >= 20.0 [3]. - Workspace Renamed: The configuration option workspace was replaced by projects [1][4]. - Vite Integration: Support for Vite 5 was removed [1]. Coverage - Removal of coverage.all: This option was removed; Vitest now defaults to including only covered files, which helps prevent performance issues with large file sets [3]. - Simplified exclude: Vitest now only excludes tests from node_modules and.git folders by default, rather than the previous broader set of exclusions [3]. - Coverage Option Cleanup: Removed coverage.ignoreEmptyLines and coverage.experimentalAstAwareRemapping (the latter is now enabled by default) [3]. Browser and Pool - Browser Mode: The experimental tag was removed [2]. Browser providers (like Playwright or WebdriverIO) must now be installed as separate packages (e.g., @vitest/browser-playwright) [2]. The browser provider configuration now accepts an object instead of a string [3]. - Pool Rework: The Tinypool dependency was removed and the pool implementation was rewritten [4]. Reporters and APIs - Reporter Changes: The basic reporter was removed; users are encouraged to use the default reporter with summary: false [2]. - Module Runner: Replaced vite-node with the new Module Runner [1][4]. - Deprecated APIs: Various deprecated types, environmentMatchGlobs, poolMatchGlobs, and other legacy APIs were removed [1]. Migration Recommendation For a successful migration from v1, it is strongly recommended to review the official Vitest Migration Guide [3] and the v4.0.0 release notes [1], as they provide detailed instructions on handling the transition of your specific test configuration and infrastructure. Top Results: [3], [1], [2], [4]
Citations:
- 1: https://github.com/vitest-dev/vitest/releases/tag/v4.0.0
- 2: https://vitest.dev/blog/vitest-4
- 3: https://vitest.dev/guide/migration.html
- 4: https://github.com/vitest-dev/vitest/blob/1a4705da/docs/guide/migration.md
🏁 Script executed:
cat -n vitest.config.mtsRepository: lokalise/zod-extras
Length of output: 760
🏁 Script executed:
head -30 src/utils/numberSplitFactory.test.tsRepository: lokalise/zod-extras
Length of output: 969
Critical incompatibilities with vitest v4.1.9 upgrade—multiple fixes required before merge.
Updating vitest to ^4.1.9 introduces breaking changes that affect three separate areas:
-
Vite incompatibility: Current vite ^5.2.10 does not satisfy vitest 4.0+ requirement of vite ≥ 6.0. Bump vite to ^6.x.
-
@vitest/coverage-v8version mismatch: Current ^1.5.3 is incompatible with vitest ^4.1.9. Update to ^4.1.9 to match. -
Deprecated config option: vitest.config.mts uses
coverage.all: true(line 15), which was removed in vitest 4.0. Remove this line.
Without these changes, the test suite will fail.
🤖 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 `@package.json` at line 57, The vitest v4.1.9 upgrade introduces three critical
incompatibilities that must be resolved: first, update the vite dependency in
package.json from ^5.2.10 to ^6.x to satisfy vitest 4.0+ requirements; second,
update the `@vitest/coverage-v8` dependency in package.json from ^1.5.3 to ^4.1.9
to match the vitest version; third, in vitest.config.mts remove the deprecated
coverage.all: true option (currently on line 15) as this configuration was
removed in vitest 4.0 and will cause test failures if left in place.
Bumps vitest from 1.6.1 to 4.1.9.
Release notes
Sourced from vitest's releases.
... (truncated)
Commits
a7a61e7chore: release v4.1.9 (#10598)934b0f5fix(pool): prevent test run hang on worker crash (#10543) [backport to v4] (#...7fb2965fix(browser): wait for orchestrator readiness before resolving browser sessio...a518019fix: fiximportOriginalwith optimizer and query import [backport to v4] (#...e61f2ddchore: release v4.1.8e4067b3fix(browser): disable clientcdpAPI whenallowWrite/allowExec: false[ba...a09d472chore: release v4.1.7a8fd24cchore: release v4.1.618af98cfix(browser): simplify orchestrator otel carrier (#10285)3188260feat(browser): provide project reference inToMatchScreenshotResolvePath(#...Maintainer changes
This version was pushed to npm by GitHub Actions, a new releaser for vitest since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)