Skip to content

Commit 43a9e37

Browse files
committed
Add explicit dependency on @babel/runtime to metro-runtime
Summary: Previously, `babel/runtime` was a transitive dependency of RN projects via `metro-react-native-babel-preset` -> `babel/plugin-transform-regenerator`. `babel/runtime` is a dependency of injected babel helpers, so we need it to be a transitive dependency of an RN project under `react-native`. Removing the previous implicit dependency broke RN builds, this adds the dependency to `metro-runtime` to make it explicit. I've created a 0.70.x branch for Metro from 0.70.2 and will cherry pick this up as a hotfix 0.70.3 release. Reviewed By: motiz88 Differential Revision: D36165366 fbshipit-source-id: d7e13cf337acb88e9d9733f8caf332aa4303ab97
1 parent 30fa603 commit 43a9e37

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/metro-runtime/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"cleanup-release": "test ! -e build && mv src build && mv src.real src"
1313
},
1414
"license": "MIT",
15+
"dependencies": {
16+
"@babel/runtime": "^7.0.0"
17+
},
1518
"devDependencies": {
1619
"@babel/core": "^7.14.0"
1720
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,10 @@
858858
core-js-pure "^3.19.0"
859859
regenerator-runtime "^0.13.4"
860860

861-
"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2":
862-
version "7.16.0"
863-
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.0.tgz#e27b977f2e2088ba24748bf99b5e1dece64e4f0b"
864-
integrity sha512-Nht8L0O8YCktmsDV6FqFue7vQLRx3Hb0B37lS5y0jDRqRxlBG4wIJHnf9/bgSE2UyipKFA01YtS+npRdTWBUyw==
861+
"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2":
862+
version "7.17.9"
863+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72"
864+
integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==
865865
dependencies:
866866
regenerator-runtime "^0.13.4"
867867

0 commit comments

Comments
 (0)