Skip to content

[Snyk] Security upgrade vitest from 2.1.8 to 3.0.0#12

Open
TricentisDevOps wants to merge 1 commit into
masterfrom
snyk-fix-f6393fd07cfccbf5f6b72370ceeb4079
Open

[Snyk] Security upgrade vitest from 2.1.8 to 3.0.0#12
TricentisDevOps wants to merge 1 commit into
masterfrom
snyk-fix-f6393fd07cfccbf5f6b72370ceeb4079

Conversation

@TricentisDevOps

Copy link
Copy Markdown

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):

  • emitter/package.json
  • emitter/package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
medium severity Directory Traversal
SNYK-JS-VITE-15922213
  62  

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

@TricentisDevOps

Copy link
Copy Markdown
Author

Merge Risk: High

This major upgrade from Vitest v2 to v3 introduces several breaking changes that will likely require code and configuration adjustments.

Key Breaking Changes:

  • Reporter API Redesign: The public API for custom reporters has been completely redesigned. Several hooks like onTaskUpdate and onFinished have been removed and replaced with a new lifecycle API. Custom reporters must be updated to conform to the new structure. [1, 5]
  • Fake Timers Behavior: The default behavior for fake timers has changed. Previously, only a specific list of timers was faked. In v3, all timing APIs are faked by default. This may require removing or adjusting fakeTimers configurations in your vitest.config.js to prevent test failures. [9]
  • Spy Behavior Changes: The behavior of spies has been modified. spy.mockReset() now restores the original implementation, and vi.spyOn() will reuse an existing mock if a method has already been spied on. [3, 8]
  • Vite Version Support: Vitest v3 adds support for Vite 6 and requires a newer version of Vite (likely v5+). [3, 9]

Recommendation:
This upgrade requires careful review. Developers should consult the official migration guide, paying close attention to the sections on reporters, fake timers, and spies. Thoroughly test your suite after upgrading to catch any regressions caused by these behavioral changes.

Source: Vitest 3.0 Release Announcement, Migration Guide

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

@TricentisDevOps

TricentisDevOps commented Apr 7, 2026

Copy link
Copy Markdown
Author

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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