Skip to content

Remove react-native/jest-preset subpath - #57481

Closed
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D111035221
Closed

Remove react-native/jest-preset subpath#57481
huntie wants to merge 1 commit into
react:mainfrom
huntie:export-D111035221

Conversation

@huntie

@huntiehuntie commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary:
It's been two releases since we separated @react-native/jest-preset in 0.85 and this has been updated in the template.

Clean up by removing internal redirect module, public export, and peer dependency.

Changelog:
[General][Breaking] - react-native/jest-preset is removed — all projects must now migrate to @react-native/jest-preset (package)

Reviewed By: rubennorte

Differential Revision: D111035221

Summary:
It's been two releases since we separated `react-native/jest-preset` in 0.85 and this has been updated in the template.
Clean up by removing internal redirect module, public export, and peer dependency.
Changelog:
[General][Breaking] - `react-native/jest-preset` is removed — all projects must now migrate to `react-native/jest-preset` (package)
Reviewed By: rubennorte
Differential Revision: D111035221
@meta-clameta-claBot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 8, 2026
@meta-codesync

Copy link
Copy Markdown

@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111035221.

huntie added a commit to huntie/react-native that referenced this pull request Jul 8, 2026
Summary:
It's been two releases since we separated `react-native/jest-preset` in 0.85 and this has been updated in the template.
Clean up by removing internal redirect module, public export, and peer dependency.
Changelog:
[General][Breaking] - `react-native/jest-preset` is removed — all projects must now migrate to `react-native/jest-preset` (package)
Reviewed By: rubennorte
Differential Revision: D111035221
@meta-codesyncmeta-codesyncBot added the Merged This PR has been merged. label Jul 8, 2026
@meta-codesync

Copy link
Copy Markdown

This pull request has been merged in 9ee21dd.

@huntie
huntie deleted the export-D111035221 branch July 8, 2026 13:36
meta-codesyncBot pushed a commit that referenced this pull request Jul 9, 2026
…7491)
Summary:
#57481 removed the `react-native/jest-preset.js` redirect module (and the `react-native/jest-preset` public export), but the in-repo `private/helloworld` app still referenced `preset: 'react-native'` in its Jest config. This breaks `yarn test` in the `test_ios_helloworld` CI job (which cascade-cancels the rest of the iOS matrix and turns the e2e retry `report` jobs red):
```
● Validation Error:
Module react-native should have "jest-preset.js" or "jest-preset.json" file at the root.
```
This migrates HelloWorld to the standalone `react-native/jest-preset` package — the documented migration path (see `packages/jest-preset/README.md`).
## Changes
- `private/helloworld/jest.config.js`: `preset: 'react-native'` → `preset: 'react-native/jest-preset'`
- `private/helloworld/package.json`: add `react-native/jest-preset` devDependency (`0.87.0-main`, matching the sibling `react-native/*` packages)
## Changelog:
[Internal] [Fixed] - Fix HelloWorld Jest preset after `react-native/jest-preset` removal
Pull Request resolved: #57491
Test Plan:
- `cd private/helloworld && yarn test` resolves the preset and runs (previously failed with the validation error above).
- CI `test_ios_helloworld` job.
Reviewed By: cortinico
Differential Revision: D111215532
Pulled By: cipolleschi
fbshipit-source-id: 2d60de619060e384b4a5b662a6f588ea3e368433
zeyap pushed a commit that referenced this pull request Jul 13, 2026
Summary:
Pull Request resolved: #57481
It's been two releases since we separated `react-native/jest-preset` in 0.85 and this has been updated in the template.
Clean up by removing internal redirect module, public export, and peer dependency.
Changelog:
[General][Breaking] - `react-native/jest-preset` is removed — all projects must now migrate to `react-native/jest-preset` (package)
Reviewed By: rubennorte
Differential Revision: D111035221
fbshipit-source-id: d66fed9218c801201c1e965f8163f048934d4200
zeyap added a commit that referenced this pull request Jul 14, 2026
…oval (#57539)
Summary:
#57481 removed the `react-native/jest-preset` subpath redirect, but the
in-repo `private/helloworld` template still referenced `preset: 'react-native'`,
which Jest resolves to the now-deleted `react-native/jest-preset.js`. This broke
all `test_ios_helloworld*` CI jobs on 0.87-stable at the `yarn test` step:
Validation Error: Module react-native should have "jest-preset.js" or
"jest-preset.json" file at the root.
Since `private/helloworld` is excluded from the yarn workspace and installed
standalone, it also needs `@react-native/jest-preset` as an explicit
devDependency for the preset to resolve.
- Point jest.config.js preset at `@react-native/jest-preset`.
- Add `@react-native/jest-preset` to devDependencies.
Changelog: [Internal]
Test Plan:
CI: `test_ios_helloworld*` jobs pass (previously failing at `yarn test`).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@huntie