Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: react/metro
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.82.5
Choose a base ref
...
head repository: react/metro
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.83.0
Choose a head ref
  • 14 commits
  • 76 files changed
  • 1 contributor

Commits on Jul 7, 2025

  1. Clean up eslint warnings

    Summary:
    Clean up some longstanding lint warnings in Metro core.
    
    Changelog: Internal
    
    Reviewed By: vzaidman
    
    Differential Revision: D77833786
    
    fbshipit-source-id: ea9cf1907def74092978535ab8e19db94d83a588
    robhogan authored and facebook-github-bot committed Jul 7, 2025
    Configuration menu
    Copy the full SHA
    5e3a6bb View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2025

  1. Add private-deep-imports lint (disallow metro*/src/...) (#1528)

    Summary:
    Pull Request resolved: #1528
    
    Lint against `metro*/src/`-style deep imports, as a step towards disallowing them.
    
    Deep imports will still be allowed, but will be required to use `metro*/private` and hence explicitly come without semver stability guarantees.
    
    Changelog: Internal
    
    Reviewed By: vzaidman
    
    Differential Revision: D77832800
    
    fbshipit-source-id: ed06fe77716e15d01a430c968d2f536c9690e1dd
    robhogan authored and facebook-github-bot committed Jul 9, 2025
    Configuration menu
    Copy the full SHA
    2d926dd View commit details
    Browse the repository at this point in the history
  2. Prefer /private/ deep imports when importing from other Metro packages

    Summary:
    Migrate Metro OSS to use explicitly-private deep imports between Metro packages, in preparation for disallowing `/src/` imports.
    
    Changelog: Internal
    
    Reviewed By: vzaidman
    
    Differential Revision: D77939836
    
    fbshipit-source-id: e37fa1cf3ee31f3e43a64b90cfd7ffad89ad9449
    robhogan authored and facebook-github-bot committed Jul 9, 2025
    Configuration menu
    Copy the full SHA
    0001207 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2025

  1. Fix lint issues in TS files

    Summary:
    Fix lint issues in TypeScript declarations - both existing warnings, and new errors we'd encounter after updating `typescript-eslint`.
    
    Changelog: Internal
    
    Reviewed By: vzaidman
    
    Differential Revision: D78091041
    
    fbshipit-source-id: 2428faa793593cec0e77f3715df3cc29cf718fc7
    robhogan authored and facebook-github-bot committed Jul 10, 2025
    Configuration menu
    Copy the full SHA
    d337806 View commit details
    Browse the repository at this point in the history
  2. Update @typescript-eslint

    Summary:
    X-link: react/react-native#52532
    
    Since we updated TypeScript in react/react-native#51831, ESLint has printed a warning that `typescript/eslint` doesn't support our TS version.
    
    This updates it to fix the warning.
    
    Changelog: [Internal]
    
    Reviewed By: vzaidman
    
    Differential Revision: D77833826
    
    fbshipit-source-id: 29a5179c4f223a8cc0ab2c8071f0a5efa09e5edc
    robhogan authored and facebook-github-bot committed Jul 10, 2025
    Configuration menu
    Copy the full SHA
    7072a0d View commit details
    Browse the repository at this point in the history
  3. Breaking: Update minimum Node.js version to 22.14.0 (#1531)

    Summary:
    Pull Request resolved: #1531
    
    Update Metro's minimum Node.js version to align with the React Native bump for RN 0.81: react/react-native#51840
    
    This is in preparation for the next Metro major (0.83), which we'll bump to for the RN 0.81 release.
    
    Changelog:
    ```
     - **[Breaking]**: Require Node.js >= 22.14.0
    ```
    
    Reviewed By: vzaidman
    
    Differential Revision: D78027408
    
    fbshipit-source-id: 72fe12f33ce56fad23c967d65d99a615c438c082
    robhogan authored and facebook-github-bot committed Jul 10, 2025
    Configuration menu
    Copy the full SHA
    a3df451 View commit details
    Browse the repository at this point in the history
  4. Breaking: Remove config.transformer.workerPath

    Summary:
    Remove the undocumented and unused `transformer.workerPath` configuration, to simplify things a bit, and make the worker <-> farm API private.
    
    From a quick GitHub search, this isn't used by major integrators (Expo, RNCLI, rnx-kit).
    
    It used to be used at Meta, but not for some years.
    
    Changelog:
    ```
     - **[Breaking]**: Remove undocumented `transformer.workerPath` config.
    ```
    
    Reviewed By: vzaidman
    
    Differential Revision: D78027031
    
    fbshipit-source-id: e35d5b5405149ee9875f52150488805abaa657d9
    robhogan authored and facebook-github-bot committed Jul 10, 2025
    Configuration menu
    Copy the full SHA
    49f7aac View commit details
    Browse the repository at this point in the history
  5. Breaking: Disallow deep imports under /src/ for all Metro packages …

    …except `metro-runtime` (#1530)
    
    Summary:
    Pull Request resolved: #1530
    
    In #1441 (Metro 0.81.2 onwards) we added `package.json#exports` maps to Metro packages, and introduced an alternative `metro*/private/...` format for deep imports from Metro packages, deprecating importing from `metro*/src/`.
    
    This follows up with the removal of support for importing from `metro*/src`, which were implicitly part of the public API.
    
    Integrators may (at their own risk!) import from `/private/` subpaths, with no semver guarantees. Please open an issue with your use case so we can help to expose the right stable APIs.
    
    For now, all public APIs are accessed via package roots.
    
    `metro-runtime` support is preserved because it's subpaths are resolved by Metro itself, and we allow opting out of `package.json#exports` support.
    
    Changelog:
    
    ```javascript
     - **[Breaking]**: Prevent importing from `/src/`, make all non-root exports semver-private
    ```
    
    Reviewed By: vzaidman
    
    Differential Revision: D70038623
    
    fbshipit-source-id: 65f6328915571b1f025f2a56368b2dc241a5aa1c
    robhogan authored and facebook-github-bot committed Jul 10, 2025
    Configuration menu
    Copy the full SHA
    ae6f423 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2025

  1. Breaking: Return an object containing httpServer from runServer API

    Summary:
    Currently the `runServer` API simply returns the Node.js `HttpServer` (or `HttpsServer`) instance it creates.
    
    Because that's not a type we control, we can't extend this API - for example, it can't expose an imperative `end()`, or anything about the Metro server. We've come up against this limitation with this specific API in the past.
    
    Since we're about to release a major version with other breaking changes, this takes the opportunity to change the return type to `Promise<{httpServer: HttpServer | HttpsServer}>`, thereby making it extensible in subsequent non-breaking changes.
    
    Changelog:
    ```
     - **[Breaking]**: Metro.runServer - return an object containing `httpServer` rather than the server instance directly
    
    Reviewed By: huntie
    
    Differential Revision: D78099715
    
    fbshipit-source-id: 1aae46cc73a4b9901ef1b9cbffdab66b6d04fd72
    robhogan authored and facebook-github-bot committed Jul 11, 2025
    Configuration menu
    Copy the full SHA
    95867ce View commit details
    Browse the repository at this point in the history
  2. Breaking: Use named exports in metro-babel-register

    Summary:
    X-link: react/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
    robhogan authored and facebook-github-bot committed Jul 11, 2025
    Configuration menu
    Copy the full SHA
    f225bf1 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2025

  1. Breaking: Use named export in buck-worker-tool

    Summary:
    Switch `buck-worker-tool` from a function-typed `module.exports` to a named `buckWorker` export.
    
    This will help convert the module to ESM syntax with generated TS types without any issues with `default` export interop. It's also more IDE-friendly.
    
    Changelog:
    ```
     - **[Breaking]**: buck-worker-tool: Use a named `buckWorker` export in place of default function export
    ```
    
    Reviewed By: vzaidman
    
    Differential Revision: D78159208
    
    fbshipit-source-id: 3f6e66e099f6a5bb92a564fd36ceea4c60957b2a
    robhogan authored and facebook-github-bot committed Jul 12, 2025
    Configuration menu
    Copy the full SHA
    69bde93 View commit details
    Browse the repository at this point in the history
  2. Breaking: use named export in metro-cache-key

    Summary:
    Switch `metro-cache-key` from a function-typed `module.exports` to a named `getCacheKey` export.
    
    This will help convert the module to ESM syntax with generated TS types without any issues with `default` export interop. It's also more IDE-friendly.
    
    Changelog:
    ```
     - **[Breaking]**: metro-cache-key: Use a named `getCacheKey` export in place of default function export
    ```
    
    Reviewed By: vzaidman
    
    Differential Revision: D78157825
    
    fbshipit-source-id: 30f12fc905d4cb46dce20898ef8246377b30661b
    robhogan authored and facebook-github-bot committed Jul 12, 2025
    Configuration menu
    Copy the full SHA
    3430036 View commit details
    Browse the repository at this point in the history
  3. Stop publishing metro-memory-fs

    Summary:
    `metro-memory-fs` is a general-purpose in-memory mock Node.js file system for use in testing - it doesn't really have anything to do with Metro.
    
    When it was created, we probably didn't have many alternatives. But `memfs` (for example) is widely used and well maintained.
    
    `metro-memory-fs` is used pretty extensively in Metro's own tests and some Meta-internal tests, so we can't just delete it, but this moves it out of the way of OSS publishing tooling so we don't have to worry about supporting it for OSS use cases.
    
    Folks can of course continue to use the last published version 0.82.5, but won't receive updates.
    
    Changelog:
    ```
     - **[Removed]**: `metro-memory-fs` will no longer be published
    ```
    
    Reviewed By: vzaidman
    
    Differential Revision: D78167490
    
    fbshipit-source-id: 7c112c177acb1fee92276f644457903b1c5c6965
    robhogan authored and facebook-github-bot committed Jul 12, 2025
    Configuration menu
    Copy the full SHA
    02104f8 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2025

  1. Publish 0.83.0 (#1532)

    Summary:
    Pull Request resolved: #1532
    
    Publish Metro 0.83.0
    
    Reviewed By: vzaidman
    
    Differential Revision: D78161607
    
    fbshipit-source-id: defbf6e15e83d951bf4e7e2590eb077e43d0bb20
    robhogan authored and facebook-github-bot committed Jul 13, 2025
    Configuration menu
    Copy the full SHA
    3eeba3d View commit details
    Browse the repository at this point in the history
Loading