- [Security]: Fix CVE on micromatch/braces by removing the dependency (#2000 by @robhogan)
- [Feature]: Add a built-in
metro:runtime/*specifier, resolvable from any importer (#2083 by @robhogan) - [Feature]: Pass Metro's own
@babel/runtimeand its version to Babel presets whentransformer.enableBabelRuntimeistrue(#1957 by @robhogan) - [Fix]: Resolver: Fix stale resolutions after adding a nearer
package.jsonor retargeting a symlinked directory (#1948 by @robhogan) - [Fix]: Resolver: Resolve packages and directories named with an asset extension (eg
lodash.zip) as modules (#2055 by @robhogan) - [Fix]: Resolver: Fall through to parent conditions when a nested
"exports"or"imports"condition has no match (#2074 by @maximilliangrand) - [Fix]: Resolver: Don't resolve an exact
"exports"or"imports"subpath with anulltarget through a pattern (#1987 by @kwy404) - [Fix]: Resolve Metro's own runtime and
@babel/runtimeeven when they're outsideprojectRootandwatchFolders(#2065, #2083 by @robhogan) - [Fix]: Ambiguous module resolution errors list the conflicting files instead of an empty list, in the terminal and in the app (#2102 by @kwy404)
- [Fix]: Use
[metro-watchFolders]/N/URLs for assets outsideprojectRoot, which also moves them in release builds (#1892 by @robhogan) - [Fix]: Fix
[metro-project]and[metro-watchFolders]bundle serving on Windows (#2015 by @motiz88) - [Fix]: Fix an HMR crash on
[metro-project]and[metro-watchFolders]URLs (#2017 by @motiz88) - [Fix]: Don't resolve
[metro-project]and[metro-watchFolders]prefixes in API and CLI entry points (#2030 by @motiz88) - [Fix]: Fix backslashes in async bundle paths on Windows (#1938 by @robhogan)
- [Fix]: Fix stale modules when files change during an in-flight or failed build (#2007 by @YevheniiKotyrlo)
- [Fix]: Fix files changed during startup being missed until restart (#2054 by @cpruijsen)
- [Fix]: Fix changes made immediately after startup sometimes being missed on macOS (#2003 by @robhogan)
- [Fix]: Fix watch mode losing files when a directory replaces a file or symlink, eg unlinking a package (#2009 by @robhogan)
- [Fix]:
FallbackWatcher: Fix a hang on stop, and missed changes after a watch error or on Windows (#1967 by @robhogan) - [Fix]:
FallbackWatcher: Close watch handles under a deleted directory (#2004 by @YevheniiKotyrlo) - [Fix]:
metro-file-map: Don't change the active mock when a duplicate is removed (#1756 by @durvesh1992) - [Fix]: Create
fileMapCacheDirectoryif it doesn't exist, rather than failing to persist the file map cache (#2096 by @shubh73) - [Fix]: Include Metro's dependency collection modules in the transform cache key (#1749 by @fallintoplace)
- [Fix]: Inline requires: Don't partially inline requires referenced in type annotations or
export {...}specifiers (#2092 by @robhogan) - [Fix]: Propagate transformer initialisation errors from
Bundler(#1854 by @Boulea7) - [Fix]: Release workers and watchers when Metro fails to initialise (#1963 by @robhogan)
- [Fix]: Ignore attributes like
stroke-widthwhen reading SVG dimensions (#1972 by @GabrielDumbrava) - [Fix]: Fix generated positions in indexed source maps (#1976 by @kwy404)
- [Fix]: Fix source maps losing lines after very large unmapped gaps (#1983 by @robhogan)
- [Fix]:
metro-symbolicate: Don't fail on frames with no source position, eg[native code](#1891 by @robhogan) - [Fix]:
metro-symbolicate: Parse frames with Windows absolute paths (#1939 by @robhogan) - [Performance]: Inline destructured CommonJS requires (
const {foo} = require('foo')) underinlineRequires(#2087 by @robhogan) - [Performance]: ~3x faster
composeSourceMaps, with ~15% less memory (#1978, #1979, #1980, #1983 by @robhogan) - [Performance]: ~35% faster first-pass resolution (#1945, #1946, #1948 by @robhogan)
- [Performance]: ~33% faster non-Watchman crawl on startup (#1677 by @kitten)
- [Deprecated]: String values of
transformer.enableBabelRuntime- usetrue(#1957 by @robhogan) - [Types]: Add TypeScript definitions for
metro-runtime(#1996 by @robhogan) - [Types]: Declarations use
IteratorObject, which needs TypeScript 5.6+ unlessskipLibCheckis set (df2e7581bcf4)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: Add
server.unstable_middlewareandserver.unstable_priorityMiddleware, to add middleware after or before Metro's own (#2031 by @vzaidman) - [Experimental]: Add
server.unstable_onServerCreated, called with Metro's server before it listens (#2031 by @vzaidman) - [Experimental]:
runServer'sunstable_extraMiddlewareis deprecated - useunstable_priorityMiddleware(#2031 by @vzaidman) - [Experimental]: Fix mismatched asset paths in builds under
unstable_serverRoot(#1917 by @robhogan) - [Experimental]:
metro-file-map: Changes to the plugin andFileSystemAPIs (#1944, #1951, #2071 by @robhogan), andcrawlerFactorycrawlers must report symlink targets as1or a pre-resolved path (#1687 by @kitten)
Full Changelog: v0.87.1...v0.87.2