Releases: facebook/metro
v0.80.2
- [Fix]: Fast Refresh breaks on encountering a garbage cycle with async/weak dependencies (e223a2e by @robhogan)
- [Fix]: Destroy HTTP cache connections on timeout instead of hanging (6001f86 by @motiz88)
- [Fix] Respond with HTTP 404 when a bundle entry point cannot be resolved (cbfb96d by @motiz88)
- [Fix]: Support
serverRoot
with HMR serializer chunks (#1137 by @EvanBacon) - [Fix]: Update hermes-parser and related packages to 0.18.0 (9cbf1b7)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: When enabled, the
"exports"
field is now considered for Haste packages (which could include local monorepo packages) (#1136 by @kraenhansen)
Full Changelog: v0.80.1...v0.80.2
v0.80.1
- [Fix]: Add React JSX runtime to default exceptions for inline requires.(#1126 by @gaearon)
- [Fix]: Always exempt Babel runtime helpers from inline (lazy) requires. (#1127 by @gaearon)
- [Fix]: Include protocol scheme in sourceMapURL when building bundles for
windows
/macos
. (#763 by @acoates-ms)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: Add
unstable_workerThreads
options totransformer
andwatcher
configuration. (20df4ec by @robhogan)
Full Changelog: v0.80.0...v0.80.1
v0.80.0
- [Breaking]: Remove
metro-runtime/src/modules/fast-refresh
andreact-refresh
dependency - now owned by RN's Babel preset. (8557968 by @robhogan) - [Breaking]:
metro-babel-register
: Switch to Hermes parser, only apply Flow transforms to.js
. (ca0f89c by @pieterv) - [Feature]:
metro-babel-register
: Support export-namespace-from and Flow enums. (ca0f89c by @pieterv) - [Fix]: Removing an async/lazy import may incorrectly free its target. (5f446f3 by @robhogan)
NB: metro-react-native-interop-tools
has been removed and will receive no further updates. (c084066 by @GijsWeterings)
Full Changelog: v0.79.1...v0.80.0
v0.79.1
- [Fix]:
metro-babel-register
: prevent arbitrary transformation of Babel plugins during registration. (e8f468d by @robhogan) - [Fix]: Fix "unexpected null" crash when handling a batch of file changes. (#1083 by @robhogan)
- [Fix]: Symlinks with indirections may not be resolvable. (#1084 by @robhogan)
Full Changelog: v0.79.0...v0.79.1
v0.79.0
- [Breaking]: Disable global package resolution (
resolver.enableGlobalPackages
) by default (0df1541 by @robhogan) - [Feature]: Add option to configure Metro's support for global package resolution (aka "Haste packages") (8b80efb by @motiz88)
- [Feature]: Enable resolution through symlinks (previously experimental
unstable_enableSymlinks
) (9e7cec1 by @robhogan) - [Feature]: Passing custom
customTransformOptions
andcustomResolverOptions
tobundle_build_started log event
so as to refine the bundling message (#1061 by @EvanBacon)
v0.78.1
- [Feature]: Return promise from
metro-cache
'sCache.set
to allow handling underlying async store errors (2845160 by @robhogan) - [Feature] Add base URL string overload to
InspectorProxy.createWebSocketListeners
(8522db1 by @huntie)
Note
v0.78.1 will be the final release of metro-inspector-proxy
, which is being relocated into the React Native repo. In Metro v0.78.0, we removed builtin Inspector Proxy creation as a breaking change.
- For React Native integrators: The
@react-native/dev-middleware
package will provide a batteries-included integration point replacingmetro-inspector-proxy
. We're working closely with Expo on the API for this which should be ready within the next two weeks βΒ usage will be documented in the package README. - Please reach out to @huntie (https://twitter.com/alxhnt) if you need support around this change.
v0.78.0
- [Breaking] Update default server port to 8081. (891fe96 by @huntie)
- [Breaking] Remove
metro-react-native-babel-transformer
andmetro-react-native-babel-preset
, which will be published as@react-native/metro-babel-transformer
and@react-native/babel-preset
going forward. (799aa0a by @dmytrorykun) - [Breaking] Remove
runInspectorProxy
option from server. (2b0b15d by @huntie)- This is a significant breaking change βΒ Metro will no longer start a built-in Inspector Proxy.
- To migrate today, integrators should create an
InspectorProxy
instance externally, and provide the relevant handlers toMetro.runServer()
. For reference:inspectorProxy.processRequest
toServerOptions.unstable_extraMiddleware
.inspectorProxy.createWebSocketListeners
toServerOptions.websocketEndpoints
.
- Recommended: In the very near future, we will be encapsulating this functionality in the
@react-native/dev-middleware
package, which will provide a batteries-included integration point for the above. - Please reach out to @huntie if you need support with this feature.
- [Breaking]:
DependencyGraph.resolveDependency
now takes a dependency object instead of a string. (fbdd295 by @motiz88) - [Breaking]: Stop passing
inlineRequires
andnonInlinedRequires
to Babel transformers. (e339c8f by @motiz88) - [Feature] Widen config search paths to include
metro.config.cjs
. (6922933 by @huntie) - [Feature]: Custom resolvers may access the original dependency descriptor for diagnostic purposes. (fbdd295 by @motiz88)
- [Fix]:
asserted-states
is not iterable when using older Watchman versions. (3ef5fc8 by @robhogan) - [Fix]: Avoid resolving
.native
as a standalone file extension. (#1045 by @EvanBacon) - [Fix]: Resolution errors now show accurate source locations. (a398f34 by @motiz88)
- [Performance]: Parallelise Haste construction to improve startup on large Haste systems. (2e0f69a by @robhogan)
v0.76.8
v0.77.0
- [Breaking]: Increase minimum Node version from 16 to 18. (ebaf27a by @arushikesarwani94)
- [Breaking]: Use Terser's default for comments. (#972 by @tido64)
- [Breaking]: Remove
metro-minify-uglify
frommetro
dependencies. (7a8fcd5 by @robhogan) - [Fix]: Fixed a bug in the handling of path separators in
blockList
on Windows. (2eecfc7 by @motiz88) - [Fix]: Protect against unsafe merging of
blockList
patterns with inconsistent regex flags. (c80904b by @motiz88) - [Fix]: Incorrect worker resolution when multiple
metro
versions are installed. (6d46078 by @robhogan) - [Performance]: Improve resolution performance for files outside the project root. (dc3cddf by @robhogan)
- [Performance]: Improved startup speed via a new file map cache format. (166477e by @robhogan)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]:
metro-file-map
: Normalize root-relative paths for cross-platform cache compatibility. (d282a08 by @motiz88) - [Experimental]: Fix crash when
require.context
is used on a directory with infinite path expansions. (14d652f by @robhogan)
Full Changelog: v0.76.7...v0.77.0
v0.76.7
- [Feature]:
metro-babel-transformer
andmetro-react-native-babel-transformer
will returnmetadata
from Babel transform results. (42fdbc2 by @robhogan) - [Feature]: Expose
TerminalReporter
for Reporter implementations. (417e6f2 by @colinta) - [Feature]: Allow client-side device identifiers in inspector proxy. (c6a94bc by @byCedric)
- [Fix]: EPERM file watching errors on Windows. (4b22efb by @robhogan)
Full Changelog: v0.76.6...v0.76.7