Repository navigation
Bump Metro to 0.88.0 - #59831
Merged
Merged
Bump Metro to 0.88.0#59831
Conversation
## Summary: Bump Metro to 0.88.0, a breaking release: https://github.com/react/metro/releases/tag/v0.88.0 The changes React Native projects are most likely to notice: - Packages' `"exports"` are read from the package root, and `"browser"` redirections apply after them, so some subpath imports resolve to a different build. `resolver.unstable_resolveExportsFromPackageRoot` and `resolver.unstable_applyBrowserSpecAfterExports` turn either off. - `resolver.emptyModulePath` defaults to `metro:runtime/modules/empty-module`. Custom resolvers already have to delegate `metro:` specifiers they don't handle, for `metro:babel-runtime`, but code that reads the option as a file path breaks. - Lazy bundle URLs keep the file extension (`/src/Foo.js.bundle`). Old URLs still work. This also removes the defaults that Metro now has itself (`transformer.asyncRequireModulePath`, `transformer.allowOptionalDependencies` and `watchFolders: []`), and two Flow suppressions for transformer options that Metro's types now declare. Finally, `@react-native/metro-babel-transformer` passes `supportsInlineModules` to Babel in the caller, as `metro-babel-transformer` does, so that presets and plugins can tell whether `metro:inline` specifiers (react/metro#2037) will resolve. ## Changelog: [General] [Changed] - Bump Metro to 0.88.0 [General] [Added] - `@react-native/metro-babel-transformer` passes Metro's `supportsInlineModules` to Babel presets and plugins ## Test Plan: ``` yarn install --frozen-lockfile --ignore-scripts yarn flow-check yarn test packages/metro-config packages/react-native-babel-transformer packages/community-cli-plugin ``` New unit test for `supportsInlineModules`, which fails for `true` and `false` without the change. `getDefaultConfig()` returns the same values for every option with and without the removed defaults. Metro 0.88.0 was tested end to end in a React Native 0.89.0-rc.0 template app before release (react/metro#2192).
robhogan
requested review from
cipolleschi,
cortinico,
huntie and
vzaidman
and removed request for
huntie
November 6, 2026 18:41
huntie
approved these changes
Nov 6, 2026
vzaidman
approved these changes
Nov 6, 2026
This was referenced Nov 9, 2026
|
@cortinico has imported this pull request. If you are a Meta employee, you can view this in D130252821. |
cortinico
enabled auto-merge (squash)
November 9, 2026 13:45
meta-codesync Bot
pushed a commit
to react/metro
that referenced
this pull request
Nov 9, 2026
Summary: Bump Metro to 0.88.0, a breaking release: https://github.com/react/metro/releases/tag/v0.88.0 Almost all of the breaking changes are integrator-facing, the others are resolver spec alignment. Users are most likely to notice: - Packages' `"exports"` are read from the package root, and `"browser"` redirections apply after them, so some subpath imports resolve to a different build. `resolver.unstable_resolveExportsFromPackageRoot` and `resolver.unstable_applyBrowserSpecAfterExports` turn either off. - `resolver.emptyModulePath` defaults to `metro:runtime/modules/empty-module`. Custom resolvers already have to delegate `metro:` specifiers they don't handle, for `metro:babel-runtime`, but code that reads the option as a file path breaks. **NOTE: *I intend to pick this to 0.89.0-rc.1*** ### Other changes in this PR - Removes the config defaults that now match Metro's core defaults (`transformer.asyncRequireModulePath`, `transformer.allowOptionalDependencies` and `watchFolders: []`) - Remove two Flow suppressions for transformer options that Metro's types now declare. - `react-native/metro-babel-transformer` passes `supportsInlineModules` to Babel in the caller, as `metro-babel-transformer` does, so that presets and plugins can tell whether `metro:inline` specifiers (#2037) will resolve. ## Changelog [General] [Changed] - Bump Metro to 0.88.0 [General] [Added] - `react-native/metro-babel-transformer` passes Metro's `supportsInlineModules` to Babel presets and plugins X-link: react/react-native#59831 Test Plan: ``` yarn install --frozen-lockfile --ignore-scripts yarn flow-check yarn test packages/metro-config packages/react-native-babel-transformer packages/community-cli-plugin ``` New unit test for `supportsInlineModules`, which fails for `true` and `false` without the change. `getDefaultConfig()` returns the same values for every option with and without the removed defaults. Metro 0.88.0 was tested end to end in a React Native 0.89.0-rc.0 template app before release (#2192). Reviewed By: vzaidman Differential Revision: D130252821 Pulled By: cortinico
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
Bump Metro to 0.88.0, a breaking release: https://github.com/react/metro/releases/tag/v0.88.0
Almost all of the breaking changes are integrator-facing, the others are resolver spec alignment. Users are most likely to notice:
"exports"are read from the package root, and"browser"redirections apply after them, so some subpath imports resolve to a different build.resolver.unstable_resolveExportsFromPackageRootandresolver.unstable_applyBrowserSpecAfterExportsturn either off.resolver.emptyModulePathdefaults tometro:runtime/modules/empty-module. Custom resolvers already have to delegatemetro:specifiers they don't handle, formetro:babel-runtime, but code that reads the option as a file path breaks.NOTE: I intend to pick this to 0.89.0-rc.1
Other changes in this PR
transformer.asyncRequireModulePath,transformer.allowOptionalDependenciesandwatchFolders: [])@react-native/metro-babel-transformerpassessupportsInlineModulesto Babel in the caller, asmetro-babel-transformerdoes, so that presets and plugins can tell whethermetro:inlinespecifiers (Resolver: Add metro:inline specifiers for importer-anchored inline modules metro#2037) will resolve.Changelog
[General] [Changed] - Bump Metro to 0.88.0
[General] [Added] -
@react-native/metro-babel-transformerpasses Metro'ssupportsInlineModulesto Babel presets and pluginsTest Plan
New unit test for
supportsInlineModules, which fails fortrueandfalsewithout the change.getDefaultConfig()returns the same values for every option with and without the removed defaults.Metro 0.88.0 was tested end to end in a React Native 0.89.0-rc.0 template app before release (react/metro#2192).