Breaking: Use named exports in metro-babel-register#52564
Closed
robhogan wants to merge 2 commits into
Closed
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D78157559 |
…52561) Summary: The removed code comment is pretty clear that this workaround is in place for a specific bug, which was closed in a Node.js 8.x minor: nodejs/node#13391 A related issue descibed a problem that still existed in Node 10: nodejs/node#27363 Subsequent comments reporting problems with newer Node.js versions all seem to relate to mismatched configuration with load balancers, not directly relevant to Metro. Reproducers for the original bugs no longer repro on new Node.js (tested with 22.14), so I think it's safe to conclude this is fixed. Changelog: [Internal] Differential Revision: D78158427
Summary: Currently, `metro-babel-register` has a function as its default export, to which we've tagged on various properties. This tidies that up to a more idiomatic object of named exports, with `register` as a new one of them. This also serves to make it more compatible with automatic TypeScript generation. This is semver breaking, but `metro-babel-register` has very little usage outside Meta projects so isn't expected to be disruptive. Changelog: [Internal] Metro changelog: ``` - **[Breaking]**: Move metro-babel-register's main function to a named export `register` ``` Differential Revision: D78157559
0da6f90 to
7f54dd6
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D78157559 |
Contributor
|
This pull request has been merged in ec5bde6. |
facebook-github-bot
pushed a commit
to facebook/metro
that referenced
this pull request
Jul 11, 2025
Summary: X-link: facebook/react-native#52564 Currently, `metro-babel-register` has a function as its default export, to which we've tagged on various properties. This tidies that up to a more idiomatic object of named exports, with `register` as a new one of them. This also serves to make it more compatible with automatic TypeScript generation. This is semver breaking, but `metro-babel-register` has very little usage outside Meta projects so isn't expected to be disruptive. Changelog: [Internal] Metro changelog: ``` - **[Breaking]**: Move metro-babel-register's main function to a named export `register` ``` Reviewed By: huntie Differential Revision: D78157559 fbshipit-source-id: c59c9820e9895007345561fed9ccec2273b925c8
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:
Currently,
metro-babel-registerhas a function as its default export, to which we've tagged on various properties.This tidies that up to a more idiomatic object of named exports, with
registeras a new one of them.This also serves to make it more compatible with automatic TypeScript generation.
This is semver breaking, but
metro-babel-registerhas very little usage outside Meta projects so isn't expected to be disruptive.Changelog: [Internal]
Metro changelog:
Differential Revision: D78157559