Repository navigation
Conversation
Resolves the @vitest/mocker path traversal / arbitrary file read advisory
(affects >=2.1.0 <4.1.11).
- Replace the react-native-testing-mocks/vitest plugin with an inline
config and a local test environment: the plugin's CJS environment is not
unwrapped by Vitest 4 ("environment.setup is not a function") and relies
on the removed `transformMode` option.
- Move `poolOptions.forks.execArgv` to `test.execArgv` (`poolOptions` was
removed in Vitest 4).
- Drop Node 21 and 23 from the CI matrix; Vitest 4 / Vite 8 require
Node ^20.19 || >=22.12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GioDavid
marked this pull request as draft
October 2, 2026 21:02
GioDavid
marked this pull request as ready for review
October 2, 2026 21:32
suany0805
reviewed
Oct 2, 2026
suany0805
reviewed
Oct 2, 2026
Node 21 is end-of-life. It was the only matrix version that needed Vite 7: Vite 8's bundler (Rolldown) calls util.styleText() with an array of styles, which Node 21 does not support. With Node 21 gone, remove the `vite` resolution so Vitest uses Vite 8 again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Node 20 reached end-of-life on 2026-04-30 and Node 23 in June 2025. Vitest 5 already requires Node ^22.12 || ^24 || >=26, so keeping Node 20 would block the next Vitest upgrade. Node 26 will be added separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrading Vitest to 4.1.11: full summary
The problem
GitHub flagged a vulnerability in @vitest/mocker, a package that Vitest installs:
Advisory: "Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock"
Affected versions: >=2.1.0 <4.1.11
The repo had: vitest@3.2.7, which installs @vitest/mocker@3.2.7. That version is vulnerable.
No 3.x release fixes it, so the only fix is upgrading to Vitest 4.1.11, a new major version.
Vitest is only a dev dependency of package/, used to run the tests. It isn't part of the published library, so people who install react-native-spotlight-tour were never affected. The alert concerns the development environment and CI.