Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"rimraf": "^5.0.5",
"typescript": "^5.4.5",
"vite": "^5.2.10",
"vitest": "^1.5.3",
"vitest": "^4.1.9",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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 -100

Repository: lokalise/zod-extras

Length of output: 137


🏁 Script executed:

cat -n package.json | head -70

Repository: lokalise/zod-extras

Length of output: 2203


🏁 Script executed:

find . -name "vitest.config.*" -o -name "*.test.*" -o -name "*.spec.*" | head -20

Repository: 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:


🏁 Script executed:

cat -n vitest.config.mts

Repository: lokalise/zod-extras

Length of output: 760


🏁 Script executed:

head -30 src/utils/numberSplitFactory.test.ts

Repository: 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:

  1. Vite incompatibility: Current vite ^5.2.10 does not satisfy vitest 4.0+ requirement of vite ≥ 6.0. Bump vite to ^6.x.

  2. @vitest/coverage-v8 version mismatch: Current ^1.5.3 is incompatible with vitest ^4.1.9. Update to ^4.1.9 to match.

  3. 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.

"zod": "^3.22.4"
}
}
Loading