Skip to content

Commit

Permalink
Add missing babel-jest dependency to react-native package (#46462)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #46462

While adding D62583337, I noticed that `react-native` doesn't specify `babel-jest` as a dependency, despite referencing it in the included `jest-preset.js` — instead this would need to be installed by the template/project.

If we want to change this in future, we should consider a separate `react-native/jest-preset` package. However, I strongly believe this is the right location for this dependency: installing `react-native` = all parts of it work.

(Note that in the React Native monorepo, we are using `dependencies` for both dev and runtime deps in packages.)

Changelog: [Internal]

allow-executable-binary

## allow-executable-binary: Bypassed as this is a managed JavaScript dependency that is pre-existing in other parts of the codebase

Reviewed By: robhogan

Differential Revision: D62583665

fbshipit-source-id: 8bbcc8736e2740e45793d7b7e225ccfd1ca7f898
  • Loading branch information
huntie authored and facebook-github-bot committed Sep 16, 2024
1 parent 38a4905 commit 8f1c227
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@react-native/core-cli-utils": "0.77.0-main",
"@react-native/eslint-config": "0.77.0-main",
"@react-native/metro-config": "0.77.0-main",
"babel-jest": "^29.6.3",
"chalk": "^4.1.2",
"commander": "^12.0.0",
"eslint": "^8.19.0",
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"ansi-regex": "^5.0.0",
"babel-jest": "^29.7.0",
"babel-plugin-syntax-hermes-parser": "^0.23.1",
"base64-js": "^1.5.1",
"chalk": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2730,7 +2730,7 @@ babel-helper-remove-or-void@^0.4.3:
resolved "https://registry.yarnpkg.com/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.4.3.tgz#a4f03b40077a0ffe88e45d07010dee241ff5ae60"
integrity sha512-eYNceYtcGKpifHDir62gHJadVXdg9fAhuZEXiRQnJJ4Yi4oUTpqpNY//1pM4nVyjjDMPYaC2xSf0I+9IqVzwdA==

babel-jest@^29.6.3, babel-jest@^29.7.0:
babel-jest@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5"
integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==
Expand Down

0 comments on commit 8f1c227

Please sign in to comment.