You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately the most recent CLI release was auto-consumed in React Native's CI, exposing a blocker where we could not consume the (repo-)circular dependency react-native → @react-native-community/cli-plugin-metro → @react-native/metro-config — I 100% jumped the gun on this setup(!).
While this is now mitigated by the new CLI release process, and possible in practice, we're opting to remove this circular setup as it would introduce maintenance headaches while we are working across two repos.
Changelog: Internal
This is an architectural simplification targeting React Native main (0.73). However it is also worth cherry picking this commit to RN CLI 10.x (targeting RN 0.72), so that we can once again bump all local Metro dependencies here (and replicate those bumps in both 11.x and 10.x). cc @robhogan@cipolleschi
Ideally, we will only keep these values in this repo for the next 1-2 versions of React Native. Once removed, we will still have the throw-descriptive-error fallback for unmigrated projects.
Note: An alternative approach for this is peerDependencies, but given the recent issues and how this might affect strict internal and open source CI, I'm opting for the absolutely bulletproof solution.
Deviates from @react-native/metro-config, which references the standalone package @react-native/js-polyfills (technically, this was/is the first circular dep edge case!). These are equivalent, but allows this repo to not reference the RN-hosted package (see removal in yarn.lock).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
React Native Metro config → React Native repo (react/react-native#36502)
This is a follow up to #1896.
Unfortunately the most recent CLI release was auto-consumed in React Native's CI, exposing a blocker where we could not consume the (repo-)circular dependency
react-native→@react-native-community/cli-plugin-metro→@react-native/metro-config— I 100% jumped the gun on this setup(!).While this is now mitigated by the new CLI release process, and possible in practice, we're opting to remove this circular setup as it would introduce maintenance headaches while we are working across two repos.
Changelog: Internal
This is an architectural simplification targeting React Native
main(0.73). However it is also worth cherry picking this commit to RN CLI10.x(targeting RN 0.72), so that we can once again bump all local Metro dependencies here (and replicate those bumps in both11.xand10.x). cc @robhogan@cipolleschiOpen as #1901.
Changes
@react-native/metro-configdependency fromcli-plugin-metro.@react-native/metro-configdefault config withincli-plugin-metro(to be used in the fallback case only).Note: An alternative approach for this is
peerDependencies, but given the recent issues and how this might affect strict internal and open source CI, I'm opting for the absolutely bulletproof solution.Test Plan
(Repeats test plan instructions from #1896).
@react-native/metro-config)@react-native/metro-config)✅ Identical configs are produced
(With only path changes from
yarn link)