Skip to content

Commit 74ba7dd

Browse files
committed
Remove react-native/jest-preset subpath (#57481)
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
1 parent babb002 commit 74ba7dd

3 files changed

Lines changed: 0 additions & 38 deletions

File tree

packages/jest-preset/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,3 @@ module.exports = {
3636
```
3737

3838
You can further customize your Jest configuration by specifying other options. See [Jest's `jest.config.js` documentation](https://jestjs.io/docs/configuration) to learn more.
39-
40-
### Migration Note
41-
42-
This Jest preset used to be part of the core `react-native` package and accessible at `react-native/jest-preset.js`. As long as `@react-native/jest-preset` is installed, `react-native/jest-preset.js` will be aliased to this package and continue to work but is deprecated.
43-
44-
Follow the installation instructions above to migrate to `@react-native/jest-preset` and change `preset: 'react-native'` to `preset: '@react-native/jest-preset` to migrate.

packages/react-native/jest-preset.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/react-native/package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"types": null,
5353
"default": "./src/asset-registry.js"
5454
},
55-
"./jest-preset": "./jest-preset.js",
5655
"./rn-get-polyfills": "./rn-get-polyfills.js",
5756
"./src/fb_internal/*": "./src/fb_internal/*",
5857
"./package.json": "./package.json"
@@ -69,7 +68,6 @@
6968
"gradle/libs.versions.toml",
7069
"index.js",
7170
"index.js.flow",
72-
"jest-preset.js",
7371
"Libraries",
7472
"LICENSE",
7573
"React-Core.podspec",
@@ -136,16 +134,12 @@
136134
"featureflags": "node ./scripts/featureflags/index.js"
137135
},
138136
"peerDependencies": {
139-
"@react-native/jest-preset": "0.87.0-rc.0",
140137
"@types/react": "^19.1.1",
141138
"react": "^19.2.3"
142139
},
143140
"peerDependenciesMeta": {
144141
"@types/react": {
145142
"optional": true
146-
},
147-
"@react-native/jest-preset": {
148-
"optional": true
149143
}
150144
},
151145
"dependencies": {

0 commit comments

Comments
 (0)