From 43a9e3723f276a826a4ada083564a1e1426eb431 Mon Sep 17 00:00:00 2001 From: Rob Hogan Date: Thu, 5 May 2022 06:28:10 -0700 Subject: [PATCH] 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 --- packages/metro-runtime/package.json | 3 +++ yarn.lock | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/metro-runtime/package.json b/packages/metro-runtime/package.json index 751d24b50a..06750dee27 100644 --- a/packages/metro-runtime/package.json +++ b/packages/metro-runtime/package.json @@ -12,6 +12,9 @@ "cleanup-release": "test ! -e build && mv src build && mv src.real src" }, "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.0.0" + }, "devDependencies": { "@babel/core": "^7.14.0" } diff --git a/yarn.lock b/yarn.lock index c6f10ea770..12afbcd8f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -858,10 +858,10 @@ core-js-pure "^3.19.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.0.tgz#e27b977f2e2088ba24748bf99b5e1dece64e4f0b" - integrity sha512-Nht8L0O8YCktmsDV6FqFue7vQLRx3Hb0B37lS5y0jDRqRxlBG4wIJHnf9/bgSE2UyipKFA01YtS+npRdTWBUyw== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" + integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== dependencies: regenerator-runtime "^0.13.4"