Releases: react/metro
v0.82.0
- [Breaking/Feature]: Enable support for
package.json#exportsresolution by default. (#1448 by @robhogan) - [Breaking]: Integrators consuming
metro/src/DeltaBundler/Transformermust now pass an options object withgetOrComputeSha1(#1451 by @robhogan) - [Breaking]:
metro/src/node-haste/DependencyGraph.getSha1has been removed, prefergetOrComputeSha1(#1451 by @robhogan) - [Performance]: Enable lazy file hashing by default, disable with
watcher.unstable_lazySha1: false(#1451 by @robhogan)
Full Changelog: v0.81.3...v0.82.0
v0.81.3
- [Feature]: Add support for
package.json#imports(#1302 by @jameslawson) - [Feature]: Add
isESMImporttoResolutionContextto distinguish resolution based on whether the dependency is arequire()or static/asyncimport(#1376 by @robhogan)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: With
unstable_enablePackageExports, assert exactly one of the conditionsimport/requireaccording to source syntax. (https://github.com/facebook/metro/pull/1477 by @robhogan) - [Experimental]: Fix global package resolution with
unstable_lazySha1(42ec821 by @robhogan)
Full Changelog: v0.81.2...v0.81.3
v0.81.2
- [Feature]: Expose modules and polyfills within
metro-runtimevia new publicpackage.json#exportspaths. (f390cdf by @robhogan) - [Fix]: Replace top-level
thiswithglobalThisin runtime prelude for service worker compatibility. (#1438 by @exzos28) - [Fix]:
get-dependenciescommand: gracefully shutdown on errors. (b8e9e64 by @yungsters) - [Performance]: Don't start an excessive number of workers for hashing files during startup. (15bc295 by @robhogan)
- [Deprecated]: Deprecate deep
srcimports e.g.metro/src/x.jsacross allmetro*packages, pending removal from the stable API. (#1441 by @robhogan)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: Auto-save file cache via
config.watcher.unstable_autoSaveCache. (#1434 by @robhogan) - [Experimental]: Add
watcher.unstable_lazySha1to defer SHA1 calculation until files are needed by the transformer. (#1435 by @robhogan) - [Experimental]: Expose deep imports of Metro packages (
metro/src/x.jsasmetro/private/x) as explicitly private (non-semver). (#1441 by @robhogan)
Full Changelog: v0.81.1...v0.81.2
v0.81.1
- [Feature]: Always include source file content sources in HMR source maps. Fixes react/react-native#49069 (breakpoints are inconsistent after fast refresh) (cd7a935 by @vzaidman)
- [Fix]: Fix edge case where files may appear missing during bundling/resolution while being modified. (2a0b548 by @robhogan)
- [Fix]: Import-exports-plugin: Rename
module/require/exports/globaldeclarations to avoid conflicts with injected args or generated code. (#1385 by @robhogan) - [Fix]: Don't use console.log directly in bundle builds. (91d74d0 by @robhogan)
- [Fix]: Haste conflicts created after startup could cause inconsistent filesystem state. (#1399 by @robhogan)
- [Fix]: Don't enter zombie state on startup Haste collisions. (0fc8e45 by @robhogan)
- [Performance]: Exclude React Compiler runtime from inline requires. (#1390 by @gaearon)
- [Performance]: Optimize the number of workers to use for parallel processing to use
os.availableParallelisminstead ofos.cpus. (#1378 by @screetBloom) - [Performance]: Don't stat ignored files in fsevents watcher. (a1c9cdb by @robhogan)
- [Performance]: Don't walk project on startup when using fsevents watcher on macOS. (122bdbd by @robhogan)
- [Performance]: Use fast, recursive watch on macOS regardless of optional dependency installation. (#1420 by @robhogan)
Full Changelog: v0.81.0...v0.81.1
v0.81.0
- [Breaking]: Drop support for Node.js < 18.18. (#1351 by @vzaidman)
- [Breaking]: Custom resolvers must now return absolute, real paths for any successful resolution. (3b3e0aa by @robhogan)
- [Breaking]: Don't call
context.redirectModulePathfrom default resolver, use a fixed browser field spec implementation. (5e96d17 by @robhogan) - [Breaking] Resolver: Reserve import specifiers beginning '#' exclusively for future subpath imports support. (c1c80c7 by @robhogan)
- [Breaking]: Disallow Haste modules with separators and Haste packages with invalid package names. (4e9cc4b by @robhogan)
- [Feature]: Expose
ResolutionContext.fileSystemLookupfor performing file and directory existence checks and resolving real paths. (3b3e0aa by @robhogan) - [Feature]: Add
onCloseoption toMetro.runServerconfiguration to provide a callback called when Metro is fully torn down. (b3f141f by @vzaidman) - [Fix]: Potential "hub is undefined" error during transform due to Babel cache pollution. (#1340 by @vzaidman)
- [Fix]: Fix #1347, symlinked packages not respecting package.json redirections. (#1349 by @robhogan)
- [Fix]:
metro-memory-fs: RespectforceinrmSync. (a792d85 by @robhogan) - [Fix]: Don't eagerly create empty cache directories during
getDefaultConfig. (bfd9473 by @robhogan) - [Fix]: Invalidate transform cache on changes to inline-requires implementation. (7d02e17 by @robhogan)
- [Fix]: Resolver: Treat absolute path specifiers on Windows with the same strictness as posix, and allow absolute paths without drive letters. (8f7e000 by @robhogan)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: Remove redundant
unstable_enableSymlinks- symlink support is stable and always-on. (e52b5ff by @robhogan) - [Experimental]: Implement
transformer.unstable_memoizeInlineRequiresto optimise inlined access. (#1346 by @robhogan). - [Experimental]: Add
unstable_server_log,unstable_server_menu_updated, andunstable_server_menu_clearedreporter events (616f437 by @huntie)
Full Changelog: v0.80.11...v0.81.0
v0.80.12
v0.80.11
- [Fix]: Resolver: Only consider directory candidates when resolving path specifiers ending in a
/(1e1dfe1 by @robhogan) - [Performance]: Various resolver performance improvements (#1318, #1287, #1333, #1334, #1335 by @robhogan)
NOTE: Experimental features are not covered by semver and can change at any time.
-
[Experimental]: Resolution: Replace
context.unstable_getRealPathwithcontext.unstable_fileSystemLookup(9fc9bf0 by @robhogan)Full Changelog: v0.80.10...v0.80.11
v0.80.10
- [Deprecation]: JsonReporter: Deprecate printing
messageandstackas top-level properties when a reportable event has anerrorproperty (95a6063) - [Feature]: Serve source files at
/[metro-project]/and/[metro-watchFolders]/{index}/(273481c by @motiz88) - [Feature]: Emit URL paths in source maps if passed the
sourcePaths=url-serverbundle parameter (788ff0d by @motiz88) - [Feature]: Add
server_listeningreporter event, exposing bound port, address and family (#1274 by @robhogan) - [Feature]: JsonReporter: Print
message,stack,cause, anderrors(where present) undererrorwhen a reportable event has anerrorproperty (95a6063 by @robhogan) - [Fix]: Fix some paths being unresolvable when traversing a symlink that points to an ancestor of the project root (#1280 by @robhogan)
- [Fix]: Improve dev server insensitivity to percent encoding on source requests (6e71699 by @robhogan)
- [Fix]: Correctly format logs when saving bundle (#1300 by @szymonrybczak)
- [Fix]: Generate the same transform cache keys on Windows and Posix for remote cache portability (e3aaa0b by @robhogan)
- [Performance]: Make server more responsive during source map serialization (34148e6 by @motiz88)
NOTE: Experimental features are not covered by semver and can change at any time.
-
[Experimental]: Fix subtrees of the project root missed from
require.contextwhen using an ancestor of the project root as context root (#1281 by @robhogan) -
[Experimental]: Add
require.unstable_importMaybeSync(#1296 by @rubennorte)Full Changelog: v0.80.9...v0.80.10
v0.80.9
- [Feature]: Allow configuring
HttpStore's read and write paths separately. (3e647a6 by @GijsWeterings) - [Feature]: Add
additionalSuccessStatusesoption toHttpStore. (f8f7d55 by @motiz88) - [Fix]: Prevent cache write errors from killing the server, log them to
reporterinstead. (15815d0 by @motiz88) - [Fix]: Node crawler (non-Watchman) returns non-deterministic partial results on silent directory read errors. (105e222 by @robhogan)
- [Fix]: Dedupe Watchman crawl warnings correctly. (#1260 by @EvanBacon)
- [Fix]: Improve error message for invalid asset paths. (#1267 by @fredrikburmester)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: Add
unstable_renameRequiretransformer option. (#1230 by @EvanBacon)
Full Changelog: v0.80.8...v0.80.9
v0.80.8
- [Fix]: Guard against invalid symbolication in Chrome DevTools by terminating each module's source map with a null mapping (96c6b89 by @motiz88)
NOTE: Experimental features are not covered by semver and can change at any time.
- [Experimental]: Package exports resolution: Fix implicit default condition to be null for subpath patterns (edge case) (#1239 by @jbroma)
Full Changelog: v0.80.7...v0.80.8