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 @@ -49,7 +49,7 @@
"@lokalise/biome-config": "^2.0.0",
"@types/node": "^25.0.2",
"@types/tmp": "^0.2.6",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/coverage-v8": "^4.1.1",
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: Check peerDependencies of `@vitest/coverage-v8`@4.1.1 to verify vitest version requirements

# Fetch package metadata and extract peerDependencies
curl -s https://registry.npmjs.org/@vitest/coverage-v8/4.1.1 | jq '{
  version: .version,
  peerDependencies: .peerDependencies,
  engines: .engines
}'

Repository: lokalise/node-core

Length of output: 188


🌐 Web query:

vitest v4 coverage-v8 compatibility requirements with vitest v3

💡 Result:

  • @vitest/coverage-v8 is version-locked to Vitest (exact match), not just “compatible by major”.

    • @vitest/coverage-v8@3.0.8 declares peerDependencies: "vitest": "3.0.8" (and optional @vitest/browser: "3.0.8"). [1]
    • @vitest/coverage-v8@4.1.0 declares peerDependencies: "vitest": "4.1.0" (and optional @vitest/browser: "4.1.0"). [2]
      Implication: You generally can’t use a v4 coverage-v8 with Vitest v3 (or vice‑versa) without peer-dep conflicts; install the same version as your vitest.
  • If you upgrade from Vitest v3 → v4, expect coverage output changes (even with the same v8 provider). Vitest v4’s V8 coverage remapping logic changed and can affect reported results. [3]

  • Extra requirement when moving to Vitest v4: Vitest 4.0.0 requires Node ^20 || ^22 || >=24. [4]

Sources:
[1] @vitest/coverage-v8@3.0.8 package.json (peerDependencies) [1]
[2] @vitest/coverage-v8@4.1.0 package.json (peerDependencies) [2]
[3] Vitest Migration Guide (v4 V8 coverage changes) [3]
[4] vitest@4.0.0 package.json (engines.node) [4]


Resolve version incompatibility: @vitest/coverage-v8@4.1.1 requires vitest@4.1.1.

The coverage plugin @vitest/coverage-v8@4.1.1 (line 52) declares an exact peer dependency on vitest@4.1.1, but the main package (line 58) remains at vitest@3.2.4. This version mismatch will cause peer dependency conflicts and break test coverage functionality.

Upgrade vitest to ^4.1.1 to match the coverage plugin, or revert the coverage plugin to ^3.2.4.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 52, package.json currently lists
`@vitest/coverage-v8`@4.1.1 which requires vitest@4.1.1 while vitest is still
pinned to 3.2.4; update the dependency pair to be compatible by either bumping
"vitest" to "^4.1.1" to match "@vitest/coverage-v8" or downgrading
"@vitest/coverage-v8" to a 3.x release (e.g., "^3.2.4"); edit the
dependencies/devDependencies entries for "vitest" and "@vitest/coverage-v8" in
package.json so their major versions align, then run npm/yarn install and verify
tests run.

"auto-changelog": "^2.4.0",
"pino-test": "^2.0.0",
"tmp": "^0.2.4",
Expand Down
Loading