Skip to content

[Snyk] Security upgrade vitest from 3.2.3 to 4.1.11 - #13220

Open
sestinj wants to merge 1 commit into
mainfrom
snyk-fix-e7ccc2a72bdc9debe133f0eef5fa0734
Open

[Snyk] Security upgrade vitest from 3.2.3 to 4.1.11#13220
sestinj wants to merge 1 commit into
mainfrom
snyk-fix-e7ccc2a72bdc9debe133f0eef5fa0734

Conversation

@sestinj

@sestinj sestinj commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • extensions/vscode/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Directory Traversal
SNYK-JS-VITESTMOCKER-19497933
  696  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Directory Traversal

@sestinj
sestinj requested a review from a team as a code owner September 4, 2026 10:36
@sestinj

sestinj commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merge Risk: High

This major version upgrade from vitest v3 to v4 introduces significant breaking changes that require configuration and dependency updates. The risk is high due to mandatory modifications needed for tests to run correctly.

Key Breaking Changes:

  • Node.js Prerequisite: Vitest v4 requires Node.js version 20 or higher.
  • Configuration Rework (vitest.config.ts):
    • workspace to projects: The vitest.workspace.ts file and defineWorkspace are removed. Monorepo setups must migrate to the test.projects property within the main config file.
    • Pool Options: maxThreads and maxForks are replaced by maxWorkers. singleThread is replaced by setting maxWorkers: 1 and isolate: false.
    • Dependency Options: deps.* options have been moved under the server namespace (e.g., server.deps.inline).
  • Coverage Reporting:
    • The coverage.all option has been removed. Coverage reports now only include files that are actually tested.
    • To include untested files in the report (the previous default behavior), you must now explicitly define coverage.include with glob patterns.
  • Browser Mode:
    • Browser mode is now stable. It requires installing separate provider packages (e.g., @vitest/browser-playwright).
    • The configuration for browser mode has been reworked to use a provider property.
  • Removed APIs: Several deprecated APIs have been removed, including the boolean argument for vi.mocked(module, true).

Recommendation: Developers must carefully review the official migration guide to update their vitest.config.ts, adjust coverage settings, and handle API changes. This is a significant update that will likely require a dedicated effort to migrate.

Source: Vitest v4 Migration Guide

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants