v0.87.3
Added 4
- Experimental resolver.unstable_allowVirtualModules option allows custom resolvers to return virtual modules
- Experimental metro:inline;base64,<source> specifiers resolve to a virtual module owned by the importer
- Experimental resolver.unstable_applyBrowserSpecAfterExports option applies "browser" redirections after "exports"
- Experimental resolver.unstable_resolveExportsFromPackageRoot option reads "exports" from the package root
Changed 2
- Cold builds are about 4-7% faster with about 6-8% less CPU by skipping input AST cloning in the transform worker
- Cold minified builds use about 2% less CPU, with faster source map handling when minifying
Fixed 7
- Resolver now resolves conditional and nested array fallbacks in "exports" and "imports"
- serializer.processModuleFilter is now applied to inline source maps
- metro-file-map keeps files under other watch roots when the project root is recrawled
- Zero-filled FileStore cache files are treated as misses
- Terminal no longer erases output printed outside of Terminal
- Terminal.log() keeps output in order with other output
- Experimental transformer.unstable_workerThreads no longer exposes JEST_WORKER_ID to transformers
Deprecated 2
- MinifierResult.map is deprecated; custom minifiers should return decodedMap inferred, marked in the notes below
- metro-source-map toBabelSegments, toSegmentTuple and tuplesFromBabelDecodedMap are deprecated inferred, marked in the notes below
2 changes to check, marked in the notes below
From metro
- [Fix]: Resolver: Resolve conditional and nested array fallbacks in
"exports"and"imports"(https://github.com/react/metro/pull/2089 by @maximilliangrand) - [Fix]: Apply
serializer.processModuleFilterto inline source maps (https://github.com/react/metro/pull/2124 by @kwy404) - [Fix]:
metro-file-map: Keep files under other watch roots when the project root is recrawled (https://github.com/react/metro/pull/2123 by @YevheniiKotyrlo) - [Fix]: Treat zero-filled
FileStorecache files as misses (https://github.com/react/metro/pull/2122 by @maximilliangrand) - [Fix]:
Terminal: Don't erase output printed outside ofTerminal(https://github.com/react/metro/pull/2130 by @vzaidman) - [Fix]:
Terminal: KeepTerminal.log()in order with other output (https://github.com/react/metro/pull/2162 by @vzaidman) - [Performance]: ~4-7% faster cold builds, with ~6-8% less CPU, by skipping input AST cloning in the transform worker (https://github.com/react/metro/pull/2033, https://github.com/react/metro/pull/2132 by @vzaidman)
- [Performance]: ~2% less CPU on cold minified builds, with faster source map handling when minifying (https://github.com/react/metro/pull/1984 by @robhogan)
- [Deprecated]:
MinifierResult.map- custom minifiers should returndecodedMap(https://github.com/react/metro/pull/1984 by @robhogan) deprecated · inferred - [Deprecated]:
metro-source-map:toBabelSegments,toSegmentTupleandtuplesFromBabelDecodedMap(https://github.com/react/metro/pull/1984 by @robhogan) deprecated · inferred
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: Add
resolver.unstable_allowVirtualModules, allowing custom resolvers to return virtual modules (https://github.com/react/metro/pull/2056, https://github.com/react/metro/pull/2036 by @robhogan) - [Experimental]: Add
metro:inline;base64,<source>specifiers, resolving to a virtual module owned by the importer (https://github.com/react/metro/pull/2037 by @robhogan) - [Experimental]: Add
resolver.unstable_applyBrowserSpecAfterExportsto apply"browser"redirections after"exports"(https://github.com/react/metro/pull/2134 by @mozzius) - [Experimental]: Add
resolver.unstable_resolveExportsFromPackageRootto read"exports"from the package root (https://github.com/react/metro/pull/2160 by @robhogan) - [Experimental]: Fix
transformer.unstable_workerThreadsexposingJEST_WORKER_IDto transformers (https://github.com/react/metro/pull/2152 by @robhogan)
Full Changelog: https://github.com/react/metro/compare/v0.87.2...v0.87.3