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 @@ -83,7 +83,7 @@
"pino-pretty": "^13.1.1",
"rimraf": "^6.0.1",
"typescript": "^5.9.3",
"vitest": "^3.2.4",
"vitest": "^4.1.0",
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 | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json, urllib.request

def get_pkg(name, version):
    url = f"https://registry.npmjs.org/{name}/{version}"
    with urllib.request.urlopen(url) as r:
        return json.load(r)

cov = get_pkg("@vitest/coverage-v8", "3.2.4")
vit = get_pkg("vitest", "4.1.0")

print("@vitest/coverage-v8@3.2.4 peerDependencies:")
print(json.dumps(cov.get("peerDependencies", {}), indent=2))
print("\nvitest@4.1.0 version:", vit.get("version"))
PY

Repository: lokalise/fastify-extras

Length of output: 2685


🏁 Script executed:

cat -n package.json | sed -n '70,90p'

Repository: lokalise/fastify-extras

Length of output: 861


🌐 Web query:

vitest 4.1.0 @vitest/coverage-v8 compatibility peer dependencies

💡 Result:

For Vitest 4.1.0, the @vitest/coverage-v8 package you should use is @vitest/coverage-v8@4.1.0, because it declares exact-version peer deps:

  • @vitest/coverage-v8@4.1.0 peerDependencies:
    • vitest: 4.1.0
    • @vitest/browser: 4.1.0 (optional)[1]

So the compatible pairing is:

  • vitest@4.1.0 + @vitest/coverage-v8@4.1.0[1][2]

Install:

npm i -D vitest@4.1.0 `@vitest/coverage-v8`@4.1.0

Upgrade @vitest/coverage-v8 to major version 4 to match Vitest 4.

Line 86 upgrades vitest to ^4.1.0, but Line 74 keeps @vitest/coverage-v8 at ^3.2.4. The coverage plugin has exact peer dependency on vitest@4.1.0, making this combination incompatible and breaking coverage runs.

Suggested fix
-        "@vitest/coverage-v8": "^3.2.4",
+        "@vitest/coverage-v8": "^4.1.0",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 86, The package.json currently upgrades vitest to
^4.1.0 but leaves `@vitest/coverage-v8` at ^3.2.4; update the `@vitest/coverage-v8`
devDependency to a v4-compatible version (e.g. ^4.0.0 or the latest 4.x) so it
matches Vitest 4's peer dependency, then reinstall dependencies (npm/yarn/pnpm)
and run your test coverage command to verify coverage runs; target the
"@vitest/coverage-v8" entry in package.json and ensure the version string is
updated to a 4.x range.

"zod": "^4.1.12"
},
"engines": {
Expand Down
Loading