Skip to content
Open
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 @@ -71,7 +71,7 @@
"@lokalise/tsconfig": "^3.0.0",
"@types/newrelic": "^9.14.8",
"@types/node": "^24.7.0",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/coverage-v8": "^4.1.2",
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 vitest v4 compatibility requirements and configuration

echo "=== Checking vitest config for deprecated v3 options ==="
rg -n -A2 -B2 'reporter:' vitest.config.mts

echo -e "\n=== Checking if vitest package needs to be updated ==="
cat package.json | jq -r '.devDependencies.vitest, .devDependencies."@vitest/coverage-v8"'

Repository: lokalise/fastify-extras

Length of output: 402


🌐 Web query:

vitest v4 coverage-v8 compatibility requirements and breaking changes

💡 Result:

Vitest v4 compatibility requirements for coverage-v8: Requires Vite >=6.0.0 and Node.js >=20.0.0. Install @vitest/coverage-v8 and set coverage.provider: 'v8' (default provider). Breaking changes in v4 for coverage-v8: - Switched to new AST-based remapping (from v8-to-istanbul), providing more accurate coverage matching Istanbul; expect changes in reports, fewer false positives. - coverage.ignoreEmptyLines removed (empty lines without runtime code excluded by default). - coverage.experimentalAstAwareRemapping removed (now always on). - coverage.all and coverage.extensions removed; default to including only files loaded during tests. Explicitly set coverage.include (e.g., ['packages//src/.{js,ts}']) for uncovered files. - Updated ignore hints to Istanbul-compatible: use /* v8 ignore next /, / v8 ignore start / ... / v8 ignore stop /, often with -- @preserve (/ v8 ignore next -- @preserve /). See docs for full syntax. - coverage.ignoreClassMethods now supported. - V8-specific: Requires V8 runtime (Node.js, Chrome); no pre-instrumentation, but minor V8 limitations apply. Config example: export default defineConfig({ test: { coverage: { provider: 'v8', include: ['src//.{js,ts}'], exclude: ['src//.test.ts'], }, }, }); Run with npx vitest --coverage. V8 remains default and recommended for speed + accuracy.

Citations:


Critical: Version mismatch between @vitest/coverage-v8 (v4.1.2) and vitest core (v3.2.4).

The @vitest/coverage-v8 package is updated to v4.1.2, but vitest itself (line 86) remains at v3.2.4. This major version mismatch will break coverage functionality. Additionally, the vitest.config.mts uses all: true (line 23), which was removed in v4 as part of breaking changes that require explicit coverage.include configuration instead.

Update vitest to ^4.1.2 to match the coverage plugin version, and audit the coverage configuration for v4 breaking changes including removal of coverage.all and requirement for explicit coverage.include.

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

In `@package.json` at line 74, package.json currently has a major version
mismatch: `@vitest/coverage-v8` is ^4.1.2 while vitest is still 3.2.4; update
vitest to ^4.1.2 to match the coverage plugin and then update vitest.config.mts
to remove the deprecated all: true setting and replace it with explicit
coverage.include/glob patterns per Vitest v4 breaking changes (verify any other
v4 config keys). Ensure package.json dependency "vitest" version and
"@vitest/coverage-v8" align and that vitest.config.mts no longer uses all: true
but defines coverage.include appropriately.

"auto-changelog": "^2.4.0",
"bullmq": "^5.67.1",
"dd-trace": "^5.85.0",
Expand Down
Loading