cli icon indicating copy to clipboard operation
cli copied to clipboard

Upgrade Metro dependencies to v0.73.0 in `cli-plugin-metro`

Open arushikesarwani94 opened this issue 1 year ago • 3 comments

Summary:

Updating the versions of Metro in the cli-plugin-metro to incorporate the new Metro Release v0.73.0. This release switches the default minifier to terser, raises the minimum Node version to ^14.17, and drops support for old Watchman versions. It also improves support for Apple Silicon and will enable the use of BigInt out of the box in React Native 0.71.

Per the release notes we shared (link below), I am suggesting that this is a breaking change for RN CLI.

Metro Release Notes: https://github.com/facebook/metro/releases/tag/v0.73.0 Full Changelog between v0.72.3 and v0.73.0: https://github.com/facebook/metro/compare/v0.72.3...v0.73.0

Reminder : When React Native updates the CLI to a version that depends on metro 0.73.0, it must also update metro-runtime etc to 0.73.0 in the same commit

Test Plan:

  • Updated dependencies with yarn.
  • ✅ Ran yarn test.

arushikesarwani94 avatar Oct 04 '22 19:10 arushikesarwani94

@thymikee Can I get a review of this PR. This is the debut of the new Metro release process.

arushikesarwani94 avatar Oct 12 '22 10:10 arushikesarwani94

https://github.com/react-native-community/cli/pull/1700 recently removed the checks for watchman versions.

I notice this PR says:

...drops support for old Watchman versions

Does that mean a check needs to be reintroduced?

liamjones avatar Oct 14 '22 12:10 liamjones

Does that mean a check needs to be reintroduced?

Good question. My TLDR suggestion would be "no, leave this to Metro".

Checking Watchman versions isn't trivial, both because new version strings are semi-opaque (see commit comment https://github.com/facebook/metro/commit/d83140095c0495112634d92f0b1319c716eab9ab), and because versions don't actually tell the whole story - for a given version Watchman may be built with different capabilities.

Metro safely falls back to non-Watchman if the installed Watchman doesn't meet requirements, but it's still pretty conservative - in practice any release after 4.9.0 (2017) will work.

robhogan avatar Oct 14 '22 14:10 robhogan