Skip to content

Commit 0301cb2

Browse files
motiz88facebook-github-bot
authored andcommitted
Stop publishing jest/preprocessor.js to npm
Summary: Changelog: [Breaking][General] Remove jest/preprocessor from the react-native package Using `react-native/jest/preprocessor` outside of the React Native repo has been deprecated since D34820086 (facebook@c1e9aa9). Here, we make this file private and stop publishing it to npm. The supported method of using Jest in React Native projects is using the [Jest preset](https://jestjs.io/docs/tutorial-react-native) shipped as part of the `react-native` package. NOTE: We could probably make some of the other files under `jest/` private as well, but we should go through a separate deprecation cycle with those, in case they are also being used externally by some projects. I'm leaving that for future followup at the moment. Reviewed By: GijsWeterings Differential Revision: D36132939 fbshipit-source-id: 300ffa6cf16232573cd3a79a34c14daaafd7aa43
1 parent 9d3d5e1 commit 0301cb2

File tree

4 files changed

+5
-44
lines changed

4 files changed

+5
-44
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
transform: {
1414
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$':
1515
'<rootDir>/jest/assetFileTransformer.js',
16-
'.*': './jest/preprocessor_DO_NOT_USE.js',
16+
'.*': './jest/private/preprocessor.js',
1717
},
1818
setupFiles: ['./jest/setup.js'],
1919
timers: 'fake',

jest/preprocessor.js

Lines changed: 0 additions & 40 deletions
This file was deleted.
File renamed without changes.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
"outputName": "js-test-results.xml"
1515
},
1616
"files": [
17-
"!template/node_modules",
18-
"!template/package-lock.json",
19-
"!template/yarn.lock",
2017
"android",
2118
"cli.js",
2219
"flow",
@@ -25,6 +22,7 @@
2522
"interface.js",
2623
"jest-preset.js",
2724
"jest",
25+
"!jest/private",
2826
"Libraries",
2927
"LICENSE",
3028
"local-cli",
@@ -60,6 +58,9 @@
6058
"sdks/hermes-engine.podspec",
6159
"template.config.js",
6260
"template",
61+
"!template/node_modules",
62+
"!template/package-lock.json",
63+
"!template/yarn.lock",
6364
"third-party-podspecs"
6465
],
6566
"scripts": {

0 commit comments

Comments
 (0)