Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 27, 2025

Bumps the vitest group with 2 updates: @vitest/coverage-v8 and vitest.

Updates @vitest/coverage-v8 from 3.2.4 to 4.0.3

Release notes

Sourced from @​vitest/coverage-v8's releases.

v4.0.3

   🐞 Bug Fixes

    View changes on GitHub

v4.0.2

   🐞 Bug Fixes

    View changes on GitHub

v4.0.1

   🐞 Bug Fixes

    View changes on GitHub

v4.0.0

Vitest 4.0 is out!

To stay updated, read our blog post and check the migration guide.

   🚨 Breaking Changes

... (truncated)

Commits
  • ca1766f chore: release v4.0.3
  • 07bc56a chore: release v4.0.2
  • 4a28faa chore: release v4.0.1
  • da7ce17 chore: release v4.0.0
  • 3e4b6b7 chore: release v4.0.0-beta.19
  • 35816fe fix(coverage): v8 to ignore Vite's generated cjs import helpers (#8718)
  • bc7c20d chore: release v4.0.0-beta.18
  • 4783137 chore: release v4.0.0-beta.17
  • 6fc7890 chore: release v4.0.0-beta.16
  • d677c0b chore: release v4.0.0-beta.15
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for @​vitest/coverage-v8 since your current version.


Updates vitest from 3.2.4 to 4.0.3

Release notes

Sourced from vitest's releases.

v4.0.3

   🐞 Bug Fixes

    View changes on GitHub

v4.0.2

   🐞 Bug Fixes

    View changes on GitHub

v4.0.1

   🐞 Bug Fixes

    View changes on GitHub

v4.0.0

Vitest 4.0 is out!

To stay updated, read our blog post and check the migration guide.

   🚨 Breaking Changes

... (truncated)

Commits
  • ca1766f chore: release v4.0.3
  • 155521a fix: preserve reporter options from config when CLI reporters override them (...
  • abc046f fix(init): use correct jsx/tsx extension (#8792)
  • 0fb74bd fix(happy-dom): support fetch globals (#8791)
  • 07bc56a chore: release v4.0.2
  • 2eedbce fix(spy): reset spies if both restoreMocks and mockReset is set in the co...
  • 26ce88d fix(pool): assign envs before running tests to keep in sync with process.env ...
  • 4a28faa chore: release v4.0.1
  • 3fae73e fix(pool): don't teardown the communication channel too soon if something is ...
  • 8100063 fix: move the getBuiltins check (#8765)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for vitest since your current version.


You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Summary by CodeRabbit

  • Chores
    • Upgraded development/test tooling (Vitest and coverage tooling) from v3.x to v4.0.14 across multiple application packages.
    • Development-only change — no runtime, public API, or user-facing behavior modifications.

✏️ Tip: You can customize this high-level summary in your review settings.

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot requested review from a team, CarlosGamero, dariacm and kibertoad as code owners October 27, 2025 15:20
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vitest-0717ef0daf branch 2 times, most recently from 48b9635 to 1649022 Compare October 30, 2025 12:30
@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'tools'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

Bumps devDependencies vitest and @vitest/coverage-v8 from various 3.x versions to ^4.0.14 across multiple packages/app/*/package.json manifests; no source code, runtime logic, or exported APIs were changed.

Changes

Cohort / File(s) Summary
DevDependency updates
packages/app/api-common/package.json, packages/app/api-contracts/package.json, packages/app/auth/package.json, packages/app/aws-config/package.json, packages/app/backend-http-client/package.json, packages/app/background-jobs-common/package.json, packages/app/context-fastify-plugins/package.json, packages/app/error-utils/package.json, packages/app/fastify-api-contracts/package.json, packages/app/fastify-bullboard-plugin/package.json, packages/app/frontend-http-client/package.json, packages/app/healthcheck-utils/package.json, packages/app/id-utils/package.json, packages/app/metrics-utils/package.json, packages/app/non-translatable-markup/package.json, packages/app/prisma-utils/package.json, packages/app/script-utils/package.json, packages/app/supported-languages/package.json, packages/app/universal-testing-utils/package.json, packages/app/universal-ts-utils/package.json, packages/app/websockets-common/package.json, packages/app/zod-extras/package.json
Updated devDependencies: vitest and/or @vitest/coverage-v8 bumped from 3.x → ^4.0.14 in each manifest. No other dependency, script, source code, or public API changes detected.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Homogeneous manifest edits across many packages.
  • Pay attention to:
    • Test suites for Vitest v4 breaking changes (API, hooks, mocking).
    • Coverage reporter and CI integration for @vitest/coverage-v8 v4.
    • Any package-level Vitest configuration files or custom test scripts that might need adjustment.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lacks the required structure from the template. It is missing the 'Changes' section describing what was modified, and the checklist is not completed or present. Add a 'Changes' section summarizing the modifications, and complete the checklist by selecting appropriate labels and confirming documentation and testing updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: bumping vitest and related packages to newer versions across multiple package manifests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dependabot/npm_and_yarn/vitest-0717ef0daf

Comment @coderabbitai help to get the list of available commands and usage tips.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vitest-0717ef0daf branch 2 times, most recently from 18ea32f to ed95d14 Compare November 3, 2025 12:12
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vitest-0717ef0daf branch 3 times, most recently from 2941c7e to 6b5eb7e Compare November 14, 2025 11:17
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 17, 2025

Dependabot tried to update this pull request, but something went wrong. We're looking into it, but in the meantime you can retry the update by commenting @dependabot recreate.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vitest-0717ef0daf branch 2 times, most recently from 0f73a9e to 4f6dd24 Compare November 18, 2025 16:35
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/app/api-common/package.json (1)

32-32: Confirm Zod 4.x breaking changes are handled in validation schemas.

The devDependency for zod is bumped to ^4.0.17 (line 42), which includes breaking changes like unified error customization and stricter number/string validation. The peerDependency constraint on line 32 (>=3.25.76) is compatible but should be clarified: either tighten to >=4.0.17 if this package requires Zod 4 features, or verify that the exported APIs remain compatible with Zod 3.x consumers.

Per the provided library documentation, Zod 4 changes include:

  • Stricter number validation (no infinite values, only safe integers for .int())
  • Breaking .default() behavior (now short-circuits on undefined)
  • Unified error customization via error parameter

Ensure any validation schemas exported by this package are tested against both Zod 3 and 4 semantics, or explicitly require Zod 4.

Consider tightening the peerDependency if Zod 4 features are used:

"peerDependencies": {
  "zod": "^4.0.0"
}

Or maintain backward compatibility by verifying schemas work with both Zod 3 and 4 via testing.

Also applies to: 42-42

📜 Review details

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0f73a9e and 4f6dd24.

📒 Files selected for processing (22)
  • packages/app/api-common/package.json (1 hunks)
  • packages/app/api-contracts/package.json (1 hunks)
  • packages/app/auth/package.json (1 hunks)
  • packages/app/aws-config/package.json (1 hunks)
  • packages/app/backend-http-client/package.json (1 hunks)
  • packages/app/background-jobs-common/package.json (1 hunks)
  • packages/app/context-fastify-plugins/package.json (1 hunks)
  • packages/app/error-utils/package.json (1 hunks)
  • packages/app/fastify-api-contracts/package.json (1 hunks)
  • packages/app/fastify-bullboard-plugin/package.json (2 hunks)
  • packages/app/frontend-http-client/package.json (1 hunks)
  • packages/app/healthcheck-utils/package.json (1 hunks)
  • packages/app/id-utils/package.json (1 hunks)
  • packages/app/metrics-utils/package.json (1 hunks)
  • packages/app/non-translatable-markup/package.json (1 hunks)
  • packages/app/prisma-utils/package.json (1 hunks)
  • packages/app/script-utils/package.json (1 hunks)
  • packages/app/supported-languages/package.json (1 hunks)
  • packages/app/universal-testing-utils/package.json (1 hunks)
  • packages/app/universal-ts-utils/package.json (1 hunks)
  • packages/app/websockets-common/package.json (1 hunks)
  • packages/app/zod-extras/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
  • packages/app/id-utils/package.json
  • packages/app/healthcheck-utils/package.json
  • packages/app/context-fastify-plugins/package.json
  • packages/app/universal-ts-utils/package.json
  • packages/app/aws-config/package.json
  • packages/app/metrics-utils/package.json
  • packages/app/api-contracts/package.json
  • packages/app/prisma-utils/package.json
  • packages/app/non-translatable-markup/package.json
  • packages/app/websockets-common/package.json
  • packages/app/auth/package.json
  • packages/app/error-utils/package.json
  • packages/app/zod-extras/package.json
  • packages/app/frontend-http-client/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build (24.x)
  • GitHub Check: build (20.x)
🔇 Additional comments (7)
packages/app/backend-http-client/package.json (1)

56-56: Configuration is compatible with Vitest 4.0.10; manual test execution verification required.

The vitest.config.ts appears compatible with v4.0.10:

  • No deprecated config options used (poolMatchGlobs, environmentMatchGlobs, etc. not present)
  • Test files use correct 2-argument syntax for describe() and it()
  • Coverage configuration is standard and valid

However, verify these items manually:

  1. Run the test suite to confirm all tests pass with Vitest 4.0.10
  2. Review coverage reports; the new AST-based remapper may produce different output
  3. If tests use automocks: verify behavior with restoreMocks: true, as v4.0.0 changed how vi.restoreAllMocks() works (no longer resets automocks)
packages/app/api-common/package.json (1)

38-38: api-common has been properly migrated to Vitest 4.0.10; no compatibility issues found.

Verification confirms that packages/app/api-common/ has successfully adopted Vitest 4.0.10:

  • vitest.config.ts uses v4-compatible configuration: pool: 'threads', globals: true, and coverage.provider: 'v8'
  • Test files import modern v4 APIs: describe, expect, it from vitest
  • No deprecated v3 patterns detected
  • Coverage configuration properly configured with v8 provider

The package.json changes at lines 38 and 41 are correct and complete.

packages/app/background-jobs-common/package.json (1)

58-58: Vitest 4.x configuration is properly migrated.

The vitest.config.ts is correctly configured for v4, using the modern API (defineConfig from 'vitest/config') and no deprecated options. The configuration includes:

  • pool: 'threads' (v4 syntax)
  • poolOptions.threads configuration (v4 feature)
  • coverage.provider: 'v8' (correctly set)
  • ✓ No deprecated options (poolMatchGlobs, environmentMatchGlobs, minWorkers all absent)

However, note a version discrepancy: the PR objectives mention bumping to 4.0.3, but the actual versions are ^4.0.10 for both vitest and @vitest/coverage-v8. Confirm this is intentional (patch version difference is acceptable within the caret range).

To ensure full compatibility, verify that test files and ./test/setup.ts do not use any deprecated Vitest v3 APIs before merging. Run the test suite locally to confirm no breaking changes affect your tests.

packages/app/script-utils/package.json (1)

40-40: Code inspection confirms v4 compatibility; runtime test verification still needed.

Based on code analysis:

  • vitest.config.ts is v4-compatible (correct pool syntax, no removed options)
  • Test files use proper v4 API signatures (2-arg describe/it/afterEach)
  • No deprecated patterns detected (poolMatchGlobs, environmentMatchGlobs, minWorkers, ignoreEmptyLines)
  • Coverage configuration is v4-compliant (v8 provider, no ignoreEmptyLines)
  • Pattern consistent across multiple packages in this migration

However, actual test execution must be verified before merge to confirm runtime compatibility with v4.0.10.

packages/app/supported-languages/package.json (1)

42-42: Tests must pass with Vitest 4—verify coverage thresholds remain achievable.

The vitest configuration is compatible with Vitest 4: it uses no deprecated options like poolMatchGlobs, minWorkers, or the removed 'basic' reporter. However, Vitest 4 changes V8 coverage remapping (new AST-based) and coverage reports may differ. Since this package enforces strict 100% coverage thresholds across all metrics (lines, functions, branches, statements), coverage calculations may change slightly in v4 and potentially cause test failures.

Action: Run npm run test:ci to confirm the test suite passes with the new versions and coverage thresholds are still met.

packages/app/fastify-bullboard-plugin/package.json (1)

45-45: Verify test suite execution with vitest 4.0.10 to confirm compatibility.

The vitest.config.ts file is syntactically compatible with vitest 4.0.0 and contains no deprecated configuration keys. However, two vitest 4.0 breaking changes pose potential risks:

  1. Mocking behavior changes: vi.restoreAllMocks no longer resets automocks (only restores spies created with vi.spyOn); mock.settledResults populated immediately with an "incomplete" result on invocation. The config enables restoreMocks: true, which may interact differently with the test suite.

  2. Coverage remapping: V8 coverage remapping is now AST‑aware with coverage.ignoreEmptyLines and coverage.experimentalAstAwareRemapping now default. This may affect coverage percentages relative to thresholds (lines: 78, functions: 75, branches: 86, statements: 78).

Action required: Run the test suite locally with the new versions to verify:

  • All three test files (basicAuth.spec.ts, bullBoard.spec.ts, errorReporterPlugin.spec.ts) pass
  • Coverage thresholds are still met
  • No test failures due to mocking behavior changes
packages/app/fastify-api-contracts/package.json (1)

56-56: Verify compatibility with Vitest v4 breaking changes.

The bump from Vitest v3 to v4 introduces breaking changes. Ensure that:

  • Test files and syntax are compatible with Vitest v4
  • The vitest.config.ts (if present) is updated for v4 configuration API changes
  • The @vitest/coverage-v8 tool integration still works as expected
  • All existing tests pass without modification

Please run the following commands to verify test compatibility:

Additionally, confirm that there are no deprecation warnings or configuration errors when running the test suite. If you encounter breaking changes, please refer to the Vitest v4 migration guide for required updates.

Also applies to: 60-60

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vitest-0717ef0daf branch 2 times, most recently from 6edb763 to 8be5db0 Compare November 26, 2025 08:28
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
packages/app/frontend-http-client/package.json (1)

53-53: Vitest v4 compatibility blockers apply to this package as well.

This package's vitest upgrade is subject to the same critical compatibility blockers flagged in the prior review comment on packages/app/universal-testing-utils/package.json. The resolution status of those blockers must be confirmed before this package's update can be merged.

Also applies to: 59-59

packages/app/error-utils/package.json (1)

42-42: Vitest v4 compatibility blockers apply to this package as well.

This package's vitest upgrade is subject to the same critical compatibility blockers flagged in the prior review comment on packages/app/universal-testing-utils/package.json. The resolution status of those blockers must be confirmed before this package's update can be merged.

Also applies to: 45-45

📜 Review details

Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6edb763 and 8be5db0.

📒 Files selected for processing (22)
  • packages/app/api-common/package.json (1 hunks)
  • packages/app/api-contracts/package.json (1 hunks)
  • packages/app/auth/package.json (1 hunks)
  • packages/app/aws-config/package.json (1 hunks)
  • packages/app/backend-http-client/package.json (1 hunks)
  • packages/app/background-jobs-common/package.json (1 hunks)
  • packages/app/context-fastify-plugins/package.json (1 hunks)
  • packages/app/error-utils/package.json (1 hunks)
  • packages/app/fastify-api-contracts/package.json (1 hunks)
  • packages/app/fastify-bullboard-plugin/package.json (2 hunks)
  • packages/app/frontend-http-client/package.json (1 hunks)
  • packages/app/healthcheck-utils/package.json (1 hunks)
  • packages/app/id-utils/package.json (1 hunks)
  • packages/app/metrics-utils/package.json (1 hunks)
  • packages/app/non-translatable-markup/package.json (1 hunks)
  • packages/app/prisma-utils/package.json (1 hunks)
  • packages/app/script-utils/package.json (1 hunks)
  • packages/app/supported-languages/package.json (1 hunks)
  • packages/app/universal-testing-utils/package.json (1 hunks)
  • packages/app/universal-ts-utils/package.json (1 hunks)
  • packages/app/websockets-common/package.json (1 hunks)
  • packages/app/zod-extras/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
  • packages/app/non-translatable-markup/package.json
  • packages/app/universal-ts-utils/package.json
  • packages/app/auth/package.json
  • packages/app/healthcheck-utils/package.json
  • packages/app/aws-config/package.json
  • packages/app/background-jobs-common/package.json
  • packages/app/fastify-api-contracts/package.json
  • packages/app/prisma-utils/package.json
  • packages/app/api-contracts/package.json
  • packages/app/api-common/package.json
  • packages/app/websockets-common/package.json
🔇 Additional comments (8)
packages/app/id-utils/package.json (1)

41-41: I'll verify the vitest 4.0 compatibility concern by checking for configuration files and understanding the breaking changes.
<function_calls>


#!/bin/bash

Search for vitest or vite config files in packages/app/id-utils

find packages/app/id-utils -maxdepth 2 ( -name "vitest.config." -o -name "vite.config." ) 2>/dev/null

Also check the package.json structure

echo "=== Package.json content ==="
wc -l packages/app/id-utils/package.json


</function_calls>

Now let me search for test files and examine the package.json more closely:
<function_calls>


#!/bin/bash

Check for test files in the package

find packages/app/id-utils -type f ( -name ".test." -o -name ".spec." ) 2>/dev/null | head -20

Extract the relevant lines from package.json

echo "=== Vitest-related dependencies ==="
sed -n '41,44p' packages/app/id-utils/package.json

Check if there's a vitest configuration in root

find . -maxdepth 2 -name "vitest.config." -o -name "vite.config." 2>/dev/null | grep -v node_modules


</function_calls>

Let me also check the broader context of the package.json and look for vitest breaking changes:
<function_calls>


#!/bin/bash

Check full package.json to understand test setup

echo "=== Full package.json ==="
cat packages/app/id-utils/package.json


</function_calls>

Now let me search for information about vitest 4.0 breaking changes:
<function_calls>

vitest 4.0.0 breaking changes migration guide

</function_calls>

<function_calls>

vitest 4.0 coverage-v8 compatibility issues

</function_calls>

packages/app/backend-http-client/package.json (1)

56-56: The snapshot update script remains compatible with vitest v4.0.

Web documentation confirms that vitest v4.0 still fully supports the -u / --update CLI flag for snapshot updates. The major version bump does not introduce breaking changes to snapshot functionality or the CLI interface used by the test:update-snapshots script. This is a routine dependency upgrade with no action required.

packages/app/context-fastify-plugins/package.json (1)

61-61: vitest 4.0 compatibility is confirmed; no action required.

The vitest.config.ts already follows v4 best practices with coverage.include properly configured and no usage of deprecated coverage.all or coverage.extensions options. The npm run test -- --coverage invocation pattern is fully supported in vitest 4.0.14, and the coverage provider v8 functions correctly with the current setup.

packages/app/script-utils/package.json (1)

40-40: Based on my verification, I can now provide the rewritten review comment. The original concern about a shared vite config is unfounded (the package has its own vitest.config.ts and no shared vite config exists), but there are real vitest 4.0 compatibility considerations.

Verify vitest 4.0 test and coverage behavior changes after upgrade.

The config is compatible with vitest v4.0.14 syntax, but vitest 4.0 introduces breaking changes that require validation:

  • V8 coverage provider now uses AST-based remapping; expect different coverage results
  • Mock naming: vi.fn() no longer defaults to "spy" name, which may affect snapshots
  • restoreMocks behavior: Interaction with vi.restoreAllMocks changed in v4.0

Run tests locally and in CI to validate snapshot diffs and coverage metrics remain acceptable.

Also applies to: 43-43

packages/app/supported-languages/package.json (1)

42-42: Based on my verification, I can now provide the rewritten review comment.

Verify vitest 4.0 coverage provider behavior change—AST-based remapping may affect coverage thresholds.

vitest v3→v4 includes a breaking change: the v8 coverage provider now uses AST-based remapping instead of line-based, which can produce different coverage results. This package enforces 100% coverage thresholds (lines, functions, branches, statements). Confirm that test coverage still meets these strict thresholds under v4's new remapping behavior. The config is otherwise v4-compatible (uses modern pool: 'threads' syntax, no deprecated APIs detected in test files).

packages/app/metrics-utils/package.json (1)

40-40: Based on my research, the original review comment's concern about vitest 4.0 compatibility is valid and justified. Vitest 4.0 introduces significant breaking changes that require configuration and code updates.

Verified breaking changes in vitest 4.0 that apply to this package:

  • Configuration migrations required: poolMatchGlobs/environmentMatchGlobs removed, deps config moved under server.deps, minWorkers removed, 'basic' reporter removed
  • Coverage changes: V8 coverage remapping logic changed (AST-based), coverage.ignoreEmptyLines option removed—expect different coverage results
  • Test API changes: Test options syntax changed from 3rd argument to 2nd argument form (e.g., test('name', { retry: 2 }, fn))
  • Mock API changes: vi.fn() mock names, vi.restoreAllMocks behavior, and spy semantics altered
  • @vitest/coverage-v8 pairing: Must maintain matching major versions (4.x with 4.x vitest)

However, the generic concern cannot be fully resolved without verifying: (1) whether a vitest.config.* file exists and contains deprecated options, (2) whether test code uses the old test options syntax, and (3) whether custom reporters exist using removed hooks.


Verify vitest 4.0 compatibility after major version upgrade.

Major version bump of vitest/coverage-v8 to 4.0.14 introduces significant breaking changes. Confirm:

  • vitest.config file is updated (removed poolMatchGlobs/environmentMatchGlobs, moved deps config to server.deps, updated reporter config)
  • Test code uses new test options syntax: test('name', { option }, fn) not test('name', fn, { option })
  • Coverage baseline updated for new V8 remapper behavior
  • Custom reporters (if any) migrated to new Reporters API
packages/app/zod-extras/package.json (1)

50-50: No compatibility issues detected. The zod-extras package is compatible with vitest 4.0.14.

The vitest configuration uses only standard, non-deprecated APIs (globals, environment, restoreMocks, coverage). Test files follow the correct v4.0 API patterns (two-argument it() calls). No removed config options (poolMatchGlobs, environmentMatchGlobs, minWorkers, etc.) are in use. The v4.0 V8 coverage provider changes may affect coverage report values, but the 100% thresholds remain valid and will be validated during test execution.

packages/app/universal-testing-utils/package.json (1)

58-58: Verify critical vitest v4 compatibility blockers have been resolved before merging.

A prior review flagged critical blockers for this major version bump:

  1. Version mismatch in monorepo: Root workspace vitest remained at 3.2.4 while this package was updated to 4.0.10, causing peer dependency resolution failures and workspace package resolution issues.
  2. Coverage provider crash: The v4 upgrade introduced a fatal error in V8CoverageProvider (TypeError: this.getUntestedFiles is not a function), completely breaking coverage reporting in npm run test:ci.
  3. Test execution blocked: Test suites could not run due to missing workspace package resolutions (@lokalise/frontend-http-client, @lokalise/api-contracts).

The current PR updates this package to ^4.0.14 but doesn't show whether the root workspace package.json has also been updated to vitest v4 to resolve the version mismatch.

Before merging, confirm:

  • Root workspace package.json (at the repository root) has been updated to vitest ^4.0.14
  • npm install or pnpm install succeeds without ERESOLVE peer dependency warnings
  • npm run test executes successfully across all test suites in this package
  • npm run test:ci (with coverage) runs without the V8CoverageProvider fatal error
  • All workspace packages resolve correctly (no missing peer dependencies)

If these issues persist, the PR cannot merge until the root workspace is aligned and vitest v4 is fully compatible across the monorepo.

Also applies to: 63-63

"@lokalise/biome-config": "^3.1.0",
"@types/node": "^24.0.12",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/coverage-v8": "^4.0.14",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Script executed:

#!/bin/bash

# Check for vitest/vite config files in the fastify-bullboard-plugin package
echo "=== Searching for vitest/vite config files ==="
find packages/app/fastify-bullboard-plugin -maxdepth 2 \( -name "vitest.config.*" -o -name "vite.config.*" \)

# Also check if there are any config files at root level that might apply
echo ""
echo "=== Checking root level config files ==="
find . -maxdepth 1 \( -name "vitest.config.*" -o -name "vite.config.*" \) 2>/dev/null

# Show the full package.json to see test scripts and any vitest config
echo ""
echo "=== Full package.json content ==="
cat -n packages/app/fastify-bullboard-plugin/package.json

Repository: lokalise/shared-ts-libs


<shell_result>
Repository: lokalise/shared-ts-libs
Exit code: 0

stdout:

=== Searching for vitest/vite config files ===
packages/app/fastify-bullboard-plugin/vitest.config.ts

=== Checking root level config files ===

=== Full package.json content ===
     1	{
     2	    "name": "@lokalise/fastify-bullboard-plugin",
     3	    "version": "2.1.0",
     4	    "type": "module",
     5	    "files": [
     6	        "dist",
     7	        "README.md",
     8	        "LICENSE.md"
     9	    ],
    10	    "engines": {
    11	        "node": ">=20.13.0"
    12	    },
    13	    "license": "Apache-2.0",
    14	    "main": "./dist/index.js",
    15	    "module": "./dist/index.js",
    16	    "types": "./dist/index.d.ts",
    17	    "exports": {
    18	        ".": "./dist/index.js",
    19	        "./package.json": "./package.json"
    20	    },
    21	    "scripts": {
    22	        "build": "rimraf dist && tsc --project tsconfig.build.json",
    23	        "lint": "biome check . && tsc",
    24	        "lint:fix": "biome check --write",
    25	        "test": "vitest run",
    26	        "test:ci": "vitest run --coverage",
    27	        "prepublishOnly": "npm run build",
    28	        "package-version": "echo $npm_package_version",
    29	        "postversion": "biome check --write package.json"
    30	    },
    31	    "dependencies": {
    32	        "@bull-board/api": "^6.14.0",
    33	        "@bull-board/fastify": "^6.14.0",
    34	        "@fastify/auth": "^5.0.3",
    35	        "@fastify/basic-auth": "^6.2.0"
    36	    },
    37	    "peerDependencies": {
    38	        "@lokalise/background-jobs-common": ">=12.6.0"
    39	    },
    40	    "devDependencies": {
    41	        "@biomejs/biome": "^2.3.7",
    42	        "@lokalise/background-jobs-common": "^14.0.0",
    43	        "@lokalise/biome-config": "^3.1.0",
    44	        "@types/node": "^24.0.12",
    45	        "@vitest/coverage-v8": "^4.0.14",
    46	        "@fastify/awilix": "^8.0.0",
    47	        "@fastify/schedule": "^6.0.0",
    48	        "@lokalise/fastify-extras": "^30.0.0",
    49	        "@lokalise/node-core": "^14.1.0",
    50	        "awilix": "^12.0.5",
    51	        "awilix-manager": "^6.1.0",
    52	        "bullmq": "^5.56.8",
    53	        "cross-env": "^10.0.0",
    54	        "fastify": "^5.4.0",
    55	        "fastify-graceful-shutdown": "^4.0.1",
    56	        "fastify-metrics": "^12.1.0",
    57	        "fastify-plugin": "^5.0.1",
    58	        "ioredis": "^5.6.1",
    59	        "pino": "^10.1.0",
    60	        "toad-scheduler": "^3.0.1",
    61	        "ts-deepmerge": "^7.0.3",
    62	        "pino-pretty": "^13.0.0",
    63	        "typescript": "5.9.3",
    64	        "vitest": "^4.0.14"
    65	    },
    66	    "keywords": [
    67	        "fastify",
    68	        "bullboard",
    69	        "bull",
    70	        "dashboard",
    71	        "plugin"
    72	    ],
    73	    "homepage": "https://github.com/lokalise/shared-ts-libs",
    74	    "repository": {
    75	        "type": "git",
    76	        "url": "git://github.com/lokalise/shared-ts-libs.git"
    77	    },
    78	    "publishConfig": {
    79	        "access": "public"
    80	    }
    81	}

</shell_result>


Script executed:

#!/bin/bash

echo "=== vitest.config.ts content ==="
cat -n packages/app/fastify-bullboard-plugin/vitest.config.ts

Repository: lokalise/shared-ts-libs


<shell_result>
Repository: lokalise/shared-ts-libs
Exit code: 0

stdout:

=== vitest.config.ts content ===
     1	import { defineConfig } from 'vitest/config'
     2	
     3	// biome-ignore lint/style/noDefaultExport: vite expects default export
     4	export default defineConfig({
     5	  test: {
     6	    globals: true,
     7	    watch: false,
     8	    restoreMocks: true,
     9	    pool: 'threads',
    10	    coverage: {
    11	      provider: 'v8',
    12	      include: ['src/**/*.ts'],
    13	      exclude: ['src/index.ts'],
    14	      thresholds: {
    15	        lines: 78,
    16	        functions: 75,
    17	        branches: 86,
    18	        statements: 78,
    19	      },
    20	    },
    21	  },
    22	})

</shell_result>


vitest 4.0 breaking changes migration guide from 3.x


<web_search_result>
Here are the main breaking changes and migration notes when upgrading from Vitest 3.x → 4.0 (concise summary; see linked official migration docs for full details):

  • V8 coverage remapping changed — new AST‑based remapping; expect coverage report differences. coverage.ignoreEmptyLines removed; coverage ignore hints updated. [1][2]
  • Mocking changes:
    • vi.fn().getMockName() now returns vi.fn() (not "spy") by default (may affect snapshots).
    • vi.restoreAllMocks no longer resets automocks — it only restores spies created with vi.spyOn (restoreMocks config affected). .mockRestore still clears state.
    • vi.spyOn on an already mocked function returns the same mock.
    • mock.settledResults populated immediately with 'incomplete' on invocation. [1][2]
  • Browser mode / providers:
    • Browser provider config now accepts an object (and providers are separate packages). @vitest/browser is no longer required; import paths changed (use vitest/browser). preview is not a default. Update any /// usages. [1][2]
  • Removed / renamed config options and deprecated APIs:
    • Removed: poolMatchGlobs, environmentMatchGlobs — use projects.
    • Removed reporter APIs: onCollected, onSpecsCollected, onPathsCollected, onTaskUpdate, onFinished — use new Reporters API.
    • deps.external, deps.inline, deps.fallbackCJS moved to server.deps.*.
    • browser.testerScripts → use browser.testerHtmlPath.
    • minWorkers removed (only maxWorkers matters).
    • reporters: 'basic' removed (equivalent config shown in migration doc).
    • Passing test/describe options as 3rd arg removed — use second-arg options object instead (timeout number as last arg still allowed). [1][2][3]
  • Deprecated types removed (fixes accidental @types/node pull-in). [1][2]
  • V8 vs Istanbul coverage provider behavior and ignore hints changed — update CI/coverage expectations and config where necessary. [1][2]

Primary references / migration docs:

  • Vitest blog & announcement (4.0): [1]
  • Official Migration Guide / Docs (detailed list & examples): [2][3]

If you want, I can:

  • produce a diff-style checklist for your repo (config, imports, mocks, reporters) based on your package.json and vitest config, or
  • extract the exact code changes for each item (examples) from the migration doc. Which would you prefer?
    </web_search_result>

Script executed:

#!/bin/bash

echo "=== Checking for deprecated vitest 4.0 options in config ==="
grep -n "ignoreEmptyLines\|poolMatchGlobs\|environmentMatchGlobs\|minWorkers" packages/app/fastify-bullboard-plugin/vitest.config.ts || echo "No deprecated options found in config"

echo ""
echo "=== Checking test files for potential mock/spy issues ==="
find packages/app/fastify-bullboard-plugin/src -name "*.test.ts" -o -name "*.spec.ts" | head -5

Repository: lokalise/shared-ts-libs


<shell_result>
Repository: lokalise/shared-ts-libs
Exit code: 0

stdout:

=== Checking for deprecated vitest 4.0 options in config ===
No deprecated options found in config

=== Checking test files for potential mock/spy issues ===
packages/app/fastify-bullboard-plugin/src/basicAuth.spec.ts
packages/app/fastify-bullboard-plugin/src/bullBoard.spec.ts
packages/app/fastify-bullboard-plugin/src/errorReporterPlugin.spec.ts

</shell_result>


Based on my verification, I can now provide a rewritten review comment:


Verify restoreMocks behavior and v8 coverage reporting after vitest 4.0 upgrade.

This file upgrades vitest and @vitest/coverage-v8 from 3.2.4 to 4.0.14. While the config file exists and uses no deprecated options, vitest 4.0 introduces breaking changes affecting this package:

  1. restoreMocks behavior changed: The restoreMocks: true setting (line 8 of vitest.config.ts) now only restores spies created with vi.spyOn, no longer resetting automocks. Review test files to ensure mock behavior remains correct.

  2. v8 coverage remapping changed: The AST-based remapping in v8 provider may produce different coverage reports than 3.2.4. Monitor CI coverage metrics for unexpected threshold changes.

Also applies to: 64-64

🤖 Prompt for AI Agents
In packages/app/fastify-bullboard-plugin/package.json around line 45, vitest and
@vitest/coverage-v8 were upgraded to 4.0.14 which changes restoreMocks behavior
and v8 coverage remapping; update the test suite and CI accordingly by (1)
auditing tests that rely on automatic mock restoration and either change them to
use vi.spyOn where appropriate or call vi.restoreAllMocks()/vi.resetAllMocks()
in afterEach hooks (or change vitest.config.ts restoreMocks to false and use
explicit restores), and (2) run CI locally to compare coverage reports and, if
thresholds shift due to v8 remapping, adjust coverage thresholds or investigate
source-mapping differences to ensure expected coverage metrics remain correct.

Bumps the vitest group with 2 updates: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/coverage-v8` from 3.2.4 to 4.0.3
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.3/packages/coverage-v8)

Updates `vitest` from 3.2.4 to 4.0.3
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.3/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 4.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/vitest-0717ef0daf branch from 8be5db0 to c25c813 Compare December 1, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant