Commit Graph

67 Commits

Author SHA1 Message Date
Rob Hogan 840fd6c83f Bump Metro to ^0.83.1, lower minimum Node.js version to 20.19
Summary:
Metro release notes: https://github.com/facebook/metro/releases/tag/v0.83.1

The only public-facing change is a lowering of the minimum Node.js version from 22.14 to 20.19.

This will need picking to RN `0.81-stable`

Changelog: [General][Changed] Metro to ^0.83.1

Reviewed By: huntie

Differential Revision: D78895160

fbshipit-source-id: b9ccffe972249b73897f51c14873861e57a97161
2025-07-24 12:10:18 -07:00
Nicola Corti 9f0903780b Bump monorepo packages to 0.82.0-main (#52706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52706

This just prepares the repo for the next branch cut.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D78558445

fbshipit-source-id: 2132d560dad447b3685874438387a519587f8554
2025-07-18 09:23:10 -07:00
Alex Hunt e247be793c Lower minimum Node.js version to 20.19.4 (#52678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52678

From partner feedback, there's still appetite to support Node 20.x for the next <1y of life. Lower min version to `20.19.4` (Jul 2025) and widen test matrix in CI.

Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 20 (Overrides #51840)

Reviewed By: cortinico

Differential Revision: D78494491

fbshipit-source-id: c8d9dc6250cb11f8a12ca7e761b65f4a8dae9265
2025-07-18 03:32:13 -07:00
Rob Hogan cf45aa9dbc Bump Metro to 0.83.0 (#52576)
Summary:
Bump Metro to 0.83.0.

This release contains some breaking changes for integrators, and a minimum Node.js version of 22.14.

Full release notes: https://github.com/facebook/metro/releases/tag/v0.83.0

Changelog: [General][Changed] Bump Metro to ^0.83.0

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

Rollback Plan:

Differential Revision: D78171925

Pulled By: robhogan

fbshipit-source-id: 7ea5e04d285632a14dd71ba00da872d60f283840
2025-07-13 15:39:46 -07:00
Alex Hunt fc5e33b582 Reorganise shared script utils (#52473)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52473

Shared utils that were located in the root of `scripts/` are now colocated closer to their dependencies or moved to `scripts/shared/` — simplifying the root directory layout.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D77873875

fbshipit-source-id: e04dba41a1ef811d32793931033fdfa93afad0cd
2025-07-08 06:10:36 -07:00
Rob Hogan 083644647e Update to Metro ^0.82.5 (#52454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52454

Bump Metro minimum from 0.82.4 to 0.82.5

Release notes: https://github.com/facebook/metro/releases/tag/v0.82.5

Changelog: [General][Changed] Bump Metro to ^0.82.5

Reviewed By: huntie

Differential Revision: D77450102

fbshipit-source-id: 7b0fdcbeb63d8021996ca82f98773145179c8a50
2025-07-06 04:30:38 -07:00
Nicola Corti b578a70bd5 Bump packages for next release (#52359)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52359

This is needed ahead of the 81 branch cut.

Changelog:
[Internal] - Bump all packages to 0.81.0-main

Reviewed By: huntie

Differential Revision: D77602196

fbshipit-source-id: 1b52a7d1577783d72aba8d20f98032f29ffcc7df
2025-07-02 03:53:34 -07:00
Sam Zhou 505588b9aa Add annotations or make things readonly to prepare for object literal soundness fix in react-native (#52305)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52305

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77386425

fbshipit-source-id: d69184abb1c8f7c516229aafe24dd418b5dd887e
2025-06-26 13:24:24 -07:00
Rob Hogan fe2bcbf4ba Community CLI: Don't clobber user config of Metro resolver/serializer, expose CLI config to user as defaults (#51836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51836

Currently, `community-cli-plugin` loads the user config and then overrides parts of it - specifically `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule`, making it impossible for a user to modify this config.

Instead, treat the CLI's resolver and serializer customisations as "Framework defaults", layered on top of `react-native/metro-config` defaults but beneath a user's `metro.config.js`.

This allows the user to obtain (via `react-native/metro-config`'s `getDefaultConfig`) and extend or override them, if they need to.

This is technically breaking because users who currently have a custom `resolveRequest` or `getModulesRunBeforeMainModule` in their `metro.config.js` will have that config respected from this change, whereas currently they won't have any effect.

Changelog:
[General][Breaking] Community CLI users: user-defined `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule` Metro config now takes precedence over CLI defaults

Reviewed By: huntie

Differential Revision: D74811395

fbshipit-source-id: c250caf798fdaedb0822bea3d6e65c0c3ae4d691
2025-06-09 07:44:02 -07:00
Alex Hunt df39eadc03 Bump minimum Node.js version to 22.14.0 (#51840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51840

Bumps the minimum version of Node.js in React Native to the current active LTS release (22.x, upgraded from 18.x which is now out of support).

- CI configurations are reduced from `[22, 20, 18]` to `[24, 22]`.

{F1978909878}

See https://nodejs.org/en/about/previous-releases.

Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 22

Reviewed By: yungsters, cortinico

Differential Revision: D76037015

fbshipit-source-id: b6e4b3ee279a9a93d716a13297420bba73f45250
2025-06-06 05:21:39 -07:00
Rob Hogan fa79fd8f96 Bump Metro to 0.82.4 (#51567)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51567

Bump Metro minimum from 0.82.3 to 0.82.4

Release notes: https://github.com/facebook/metro/releases/tag/v0.82.4

Changelog: [General][Changed] Bump Metro to ^0.82.4

Reviewed By: vzaidman

Differential Revision: D75294674

fbshipit-source-id: 750e83db2fb5cd9a6bf4b1971cb701ac23dfa961
2025-05-23 10:53:17 -07:00
Tim Yung 84de8a075e RN: Delete @oncall Annotations (#51416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51416

Deletes `oncall` annotations from the `facebook/react-native` repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74902524

fbshipit-source-id: 32a6a5b2ff27281792d572f151e2b094d9a79029
2025-05-17 16:18:05 -07:00
Rob Hogan db0fa9200e Update Metro to ^0.82.3 (#51122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51122

Update Metro to 0.82.2 => 0.82.3, containing important bug fixes for `package.json#exports` support.

Changelog: [General][Changed] Metro to ^0.82.3

Reviewed By: huntie

Differential Revision: D74181990

fbshipit-source-id: 8320a0cf4aa671d9e7f2976c36d260934807a179
2025-05-06 09:29:30 -07:00
Alex Hunt 46ddb604d9 Update Metro dependencies to 0.82.2 (#50977)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50977

Updates all `metro*` dependencies to the latest `^0.82.2`.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D73841705

fbshipit-source-id: dc550abfecddce933ed148f094aaf8629ffe549b
2025-04-29 06:25:22 -07:00
Rubén Norte 0173839f42 Remove dependency on event-target-shim (#50494)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50494

Changelog: [internal]

Removes the dependency on the `event-target-shim` npm package now that we're using a custom implementation within `react-native`.

Reviewed By: yungsters

Differential Revision: D67828636

fbshipit-source-id: 8727f8caa2bd4badd7162eb7b993dcc768e74b85
2025-04-07 05:15:37 -07:00
Alex Hunt e70961e05c Bump packages for next release (#49972)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49972

Follows the recent `0.79-stable` branch cut.

Changelog: [Internal] - Bump all packages to `0.80.0-main`

Reviewed By: cortinico

Differential Revision: D70976555

fbshipit-source-id: e81e4c45c6a510e114d02853c5bb90a715b7df8b
2025-03-12 05:11:16 -07:00
Rob Hogan 0ad192003e Update Metro dependencies to 0.82.0 (#49885)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49885

Updates all `metro*` dependencies to the latest `^0.82.0`.

The breaking changes in this release apply only to frameworks and integrators.

This update brings `package.json#exports` resolution enabled by default, and lazy hashing for much faster Metro startup.

Release notes:
https://github.com/facebook/metro/releases/tag/v0.82.0

Changelog:
[General][Changed] Update Metro to ^0.82.0

Reviewed By: vzaidman

Differential Revision: D70778791

fbshipit-source-id: ffb55ed384d721205aa4d7f528c63c0b0a38abc5
2025-03-07 10:09:22 -08:00
Rob Hogan 035142e62d metro-config: Don't always assert import/require with unstable_enablePackageExports (#49780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49780

Now that we're using a minimum Metro version of 0.81.3, Metro will dynamically assert `import` or `require` based on the style of the import at source.

Asserting both is likely to cause issues with `babel/runtime` and potentially other packages - see https://github.com/facebook/metro/pull/1447.

Changelog:
[Internal] metro-config: Assert import/require dynamically when using `unstable_enablePackageExports` with Metro.

Reviewed By: hoxyq

Differential Revision: D70473577

fbshipit-source-id: b3e6fbd78e2b6fc0f9a16ec3db2c19698848e6d1
2025-03-03 07:58:20 -08:00
Rob Hogan 6606a1da84 Update Metro ^0.81.0 -> ^0.81.3 || ^0.82.0 (#49779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49779

Changelog:
[General][Changed] Bump minimum Metro from 0.81.0 to ^0.81.3 || ^0.82.0

Reviewed By: hoxyq

Differential Revision: D70473389

fbshipit-source-id: aee3cb073fef420fd7bc1efedb0b48411b038c44
2025-03-03 07:58:20 -08:00
Alex Hunt e1575857dd Relocate babel-register script (#49102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49102

Moves this script one level up. In the next diff, will be used to support execution of scripts themselves, as well as `packages/`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D68960279

fbshipit-source-id: 7b62420c269dc1c1366ac9a827db078d34cb86c5
2025-02-03 03:49:23 -08:00
Alex Hunt 45a2d9c5a8 Delete deprecated YellowBox API (#49061)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49061

Changelog:
[General][Breaking] - Remove deprecated `YellowBox` and `console.ignoredYellowBox` APIs. Use `LogBox`.

Reviewed By: cortinico, hezi

Differential Revision: D68893550

fbshipit-source-id: 5030a20a2d1a60ca37eaf928339b8dd5d5abaa27
2025-01-30 06:49:13 -08:00
Riccardo Cipolleschi e77fe5c471 Bump React Native monorepo packages (#48975)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48975

After cutting 0.78-stable, we need to bump the monorepo packages to `0.79.0-main`

## Changelog:
[Internal] - Bump monorepo packages to `0.79.0-main`

Reviewed By: cortinico, huntie

Differential Revision: D68715005

fbshipit-source-id: cb5abbf05e8638683687be8d61d66b3037111572
2025-01-27 11:01:34 -08:00
Rob Hogan 398b3b3be4 metro-config: Revert setting hermesParser: true in default Metro config (#47670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47670

Now that we have `babel-plugin-syntax-hermes-parser` in `react-native/babel-preset` (since D63535216), it's no longer necessary to use `hermes-parser` directly in Metro in order to use newer Flow syntax.

Babel with `babel-plugin-syntax-hermes-parser` is generally preferable, because it intelligently falls back to parsing with Babel for any non-`flow` files.

See https://github.com/facebook/hermes/issues/1549 for context.

Changelog:
[General][Fixed] metro-config: Don't use `hermes-parser` by default, prefer `babel-plugin-syntax-hermes-parser`, which supports other syntax plugins.

Reviewed By: huntie

Differential Revision: D66002056

fbshipit-source-id: cf48acec347e2c0791872f8ca4b53f5f8af1c783
2024-11-19 02:43:03 -08:00
Tim Yung c9ea05552f RN: Fix lint/sort-imports Errors (#47109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47109

Fixes the `lint/sort-imports` errors that are now surfaced after fixing the lint configuration.

For a couple files, I added lint suppressions instead because the unsorted import ordering is important due to interleaved calls with side effects.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D64569485

fbshipit-source-id: 26415d792e2b9efe08c05d1436f723faae549882
2024-10-18 04:07:02 -07:00
Rob Hogan 0902b0af75 Update Metro to 0.81.0 (#47012)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47012

Update Metro from `0.81.0-alpha.2` to `0.81.0`.

This is also intended to be the final, stable release for RN 0.76.

Changelog:
[General][Changed]: Update Metro to 0.81.0

Reviewed By: blakef

Differential Revision: D64329574

fbshipit-source-id: e12bed356b46e4ed68c75b397b7f9e2228c377be
2024-10-14 10:08:36 -07:00
Tomasz Żelawski cc6d1eb844 feat: Expose MetroConfig type directly from @react-native/metro-config (#46602)
Summary:
React Native [app template provided by the CLI](https://github.com/react-native-community/template) currently uses [`metro-config` directly for `MetroConfig` type](https://github.com/react-native-community/template/blob/main/template/metro.config.js#L7).
However, it doesn't have `metro-config` as neither a dependency or dev dependency, which can lead to version mismatches.

While this is obviously a mistake on the template repo side, `metro-config` versions aren't matched with `react-native` versions. Therefore, getting the correct version of `metro-config` from `react-native/metro-config` would require reflecting on `react-native/metro-config`'s package.json etc. which is far from ideal. In my opinion it's would be much better to expose `MetroConfig` type from `react-native/metro-config` directly.

Version mismatching can happen in a monorepo setup. Say we have the monorepo structure using Yarn Modern:

```tree
.
├── RN75-app (workspace)
├── RN76-app (workspace)
│   ├── metro.config.js
│   └── node_modules
│       └── react-native
│           └── metro-config (0.76)
│               └── node_modules
│                   └── metro-config (version for 0.76)
└── node_modules
    ├── react-native
    │   └── metro-config (0.75)
    └── metro-config (version for 0.75)
```

`react-native@0.75` gets hoisted to the monorepo root while `react-native@0.76` sits in an RN 0.76 app workspace.

Say we have the following `RN76-app/metro.config.js` contents:

```js
const {getDefaultConfig, mergeConfig} = require('react-native/metro-config');

/**
 * Metro configuration
 * https://reactnative.dev/docs/metro
 *
 * type {import('metro-config').MetroConfig}
 */
const config = {};

module.exports = mergeConfig(getDefaultConfig(__dirname), config);
```

In this case, `require('react-native/metro-config')` would resolve to `RN76-app/node_modules/react-native/node_modules/metro-config` since `react-native/metro-config` is a (dev) dependency of the App.

However `import('metro-config).MetroConfig` would resolve to `node_modules/metro-config` since it's not a direct dependency.

This is how we have a mismatch - imported functions come from different packages than imported type.

## Changelog:

[GENERAL] [ADDED] - Expose `MetroConfig` type directly from `react-native/metro-config`.

Pull Request resolved: https://github.com/facebook/react-native/pull/46602

Test Plan:
`yarn build` to generate dist for `react-native/metro-config`, see it has the export of `MetroConfig`.

## Notes

If this PR gets approved, I'll submit relevant one to the CLI template.

Reviewed By: huntie

Differential Revision: D63258881

Pulled By: robhogan

fbshipit-source-id: e6f3c880eb4a0aa902c62932d58f243c38b07c2e
2024-10-07 06:35:01 -07:00
Alex Hunt 7c2a7de162 Bump Metro to 0.81.0-alpha.2 (#46703)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46703

Updates us in line with the release branch and unblocks https://github.com/facebook/react-native/pull/46627.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D63544047

fbshipit-source-id: 4c093e6c2fc389888f12063df013db7023761859
2024-10-01 11:27:41 -07:00
Riccardo Cipolleschi 120558c0cd Bump main to 0.77
Summary:
This change bumps the React Native version in main to 0.77

bypass-github-export-checks

## Changelog:
[General][Changed] - Bump main to 0.77-main

## Facebook:
generated by running `js1 publish react-native 0.77.0-main`

Reviewed By: cortinico

Differential Revision: D62575939

fbshipit-source-id: 6d239fca2eed6cfe51f8c37f78d8dc8730c18b8c
2024-09-12 09:23:23 -07:00
Rob Hogan 40f98b5eee Bump Metro to 0.81.0-alpha.0 (#46398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46398

Bump Metro packages to the version stablising for RN 0.76

Changelog:
[General][Changed] - Bump Metro dependencies to 0.81.0-alpha.0

Reviewed By: cortinico

Differential Revision: D62377929

fbshipit-source-id: 0808b11ad534e6a649c28f32b19f95f691645be4
2024-09-09 08:20:52 -07:00
Tim Yung 320963c7cb RN: Enable Hermes Parser in Default Metro Config (#46318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46318

Configures the Metro by default to use the Hermes parser so that React Native can fully leverage all modern Flow language syntax.

NOTE: This does not affect `*.ts` and `*.tsx` files which will continue to use Babel. Metro has logic to enforce this regardless of the transform options.

Changelog:
[General][Changed] - Changed Metro default config to use Hermes parser, enabling the use of advanced Flow syntax in React Native.

Reviewed By: robhogan

Differential Revision: D62161923

fbshipit-source-id: 0f4c069d429517be16abcc6a2187cd23c6bd52d4
2024-09-04 11:04:32 -07:00
Vitali Zaidman 5cdfec9843 update metro version in react-native (#46264)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46264

React-native was not in sync with metro changes that RN relies on

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D61982240

fbshipit-source-id: 63b1f53174ab0ec663a537569a032c62c431eb83
2024-08-30 05:26:34 -07:00
Moti Zilberman 730885863d Collapse stack frames in new renderer error handling file (#45982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45982

Changelog: [Internal]

Recently `src/private/renderer/errorhandling/ErrorHandlers.js` started showing up in some error stack traces, making LogBox less readable. This diff ensures we collapse these extra stack frames by default (as well as hide them in Fusebox, etc).

Reviewed By: hoxyq

Differential Revision: D61128294

fbshipit-source-id: 2ebcb47265aaf3281b669ed022c29978167f3e81
2024-08-14 06:56:51 -07:00
Alex Hunt ebf1a7b79b Bump packages for next major release (#45015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45015

Set package versions to `0.76.0-main` (`0.75-stable` branch was cut).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D58687399

fbshipit-source-id: 27ed987e4557705845d57d64e7547cddbd982a03
2024-06-26 07:59:49 -07:00
Moti Zilberman de1d605253 Add Flow to @react-native/polyfills entry point (#44477)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44477

Changelog: [Internal]

TSIA

Reviewed By: huntie

Differential Revision: D57091620

fbshipit-source-id: 54fd105069ba0a34b9ab5bd12295e4e9641492a3
2024-05-08 06:46:15 -07:00
Moti Zilberman 8d0046a5e1 Make INTERNAL_CALLSITES_REGEX work with Windows paths (#44469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44469

Changelog: [General][Fixed] LogBox and Chrome DevTools stack frame collapsing patterns are now compatible with Windows file paths.

Reviewed By: GijsWeterings

Differential Revision: D57091214

fbshipit-source-id: f62d9fe7f3d4f91ed8ea07521b174989c2dd1c81
2024-05-08 03:52:44 -07:00
Blake Friedman 3ddf509924 Back out "conditional Babel registration no longer necessary"
Summary:
Original commit changeset: 6bec706c639f

Original Phabricator Diff: D56839521

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D57052476

fbshipit-source-id: 7c598f43b23959f1accf555be38abc95e4ef35fd
2024-05-07 08:36:04 -07:00
Blake Friedman 47848ad15f conditional Babel registration no longer necessary (#44362)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44362

Packages that are built and directly run in the monorepo no longer need to worry about
conditionally registering themselves to transpile Flow -> JS at runtime. Our build step
strips this file now.

Changelog: [Internal] changes in published packages no longer require conditional calls to Babel register.

Reviewed By: huntie

Differential Revision: D56839521

fbshipit-source-id: 6bec706c639f1ab4138e0b790be8a07654333046
2024-05-07 03:16:00 -07:00
Blake Friedman b38f80aeb6 update shared build to strip Babel wrapper (#44339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44339

We require the wrapper code for in repository calls to these packages directly from node (i.e. using CommonJS).  This wrapper code typically sits at the entrypoint of the build packages (i.e. `index.js`).

NOTE: This unblocks an issue preventing me from landing further work on the `helloworld` cli replacing the community template.

## Problem:
The [flow-api-translator](https://www.npmjs.com/package/flow-api-translator) library doesn't allow CommonJS `module.exports` when generating TypeScript Type Defintions.

## Change
1. At the built time, this strips out our wrapper code and sets up the dist/ folder appropriately for npm distribution.
2. Updated the `package.json` files to consistently share Flow types

Changelog: [Internal] refactor build packages output to remove wrapper.

NOTE: Added better error messages when users deviated from the current pattern:
{F1501571608}

Reviewed By: huntie

Differential Revision: D56762162

fbshipit-source-id: f110b31e4ad780998dbc81a2482891ac8d8c6458
2024-05-02 04:00:21 -07:00
Moti Zilberman 4cc3ed8b2c Update INTERNAL_CALLSITES_REGEX (#43604)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43604

Changelog: [Internal]

Syncs the internal and OSS versions of `INTERNAL_CALLSITES_REGEX` in the default RN Metro config.

Reviewed By: robhogan

Differential Revision: D55237394

fbshipit-source-id: 8986a69f8beeafccbab3548d8a2137c0bf19e0b3
2024-03-25 07:12:18 -07:00
Moti Zilberman c6bc0b090f Add internal call sites to x_google_ignoreList (#43605)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43605

Changelog: [Internal]

Leverages https://developer.chrome.com/docs/devtools/x-google-ignore-list to mark more internal files as "third party", thus collapsing them by default in stack traces in modern versions of Chrome DevTools. The list of modules to collapse is the same one used by LogBox.

This likely only affects Meta usage, since Metro's default for [`isThirdPartyModule`](https://metrobundler.dev/docs/configuration/#isthirdpartymodule) already excludes all `node_modules`, but I'm making this change across Meta and OSS for consistency and to signal intent.

Reviewed By: huntie

Differential Revision: D55236653

fbshipit-source-id: d777ea31fb3d65608a487247924885c887ebbd94
2024-03-25 07:12:18 -07:00
Blake Friedman a380ea55fb Summary: minor fix found in nightly logs from Publish NPM job (#43519)
Summary:
Minor fix to package.json which newer version of npm warn about when publishing, after running `npm pkg fix -ws` on the workspace.

{F1470070110}

## Changelog: [Internal] npm pkg fix -ws

Pull Request resolved: https://github.com/facebook/react-native/pull/43519

Test Plan: eyescloseddog

Reviewed By: cortinico

Differential Revision: D55012872

Pulled By: blakef

fbshipit-source-id: ff3c63a3eefaf56d369219a3d4b32d44d6d842c9
2024-03-18 08:29:10 -07:00
Alex Hunt f57be12977 Bump packages for next major release (#43132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43132

Command run:

```
node scripts/releases/set-version 0.75.0-main --skip-react-native-version
```

Changelog: [Internal]

Reviewed By: lunaleaps, cipolleschi

Differential Revision: D54006327

fbshipit-source-id: 7afe9e7ca3020faf399fdba2221fab8a102c56c7
2024-03-04 07:54:37 -08:00
Alex Hunt b41a33ede9 Move metro-config package into monorepo build, enable TS generation (#41836)
Summary:
This adds `react-native/metro-config` to the monorepo build tool and emits the missing typescript declarations.

Right now, we do have typescript declarations on `metro-config`, but not `react-native/metro-config`. Which makes everything a bit harder extend from "[the default React Native metro config](https://github.com/facebook/react-native/pull/36502)" in Expo.

> Note, I also added the same `exports` block from `react-native/dev-middleware` for conformity.

One open question here is, why aren't we exporting _all_ helper functions from `metro-config`? To me, its a bit weird that we need both `metro-config` _and_ `react-native/metro-config` as `loadConfig` isn't exported.

## Changelog:

[INTERNAL] [FIXED] - Emit typescript declaration files for `react-native/metro-config`

Pull Request resolved: https://github.com/facebook/react-native/pull/41836

Test Plan:
Run the build tool, and check if the typescript declarations are emitted for `react-native/metro-config`.

```
yarn build metro-config
```

Reviewed By: hoxyq

Differential Revision: D51943453

Pulled By: huntie

fbshipit-source-id: cfaffe5660053fc9a9fcbe3dacf7f6ccc2bde01b
2024-02-12 05:20:38 -08:00
Saad Najmi 6d77d7b895 Format package.json files in the monorepo (#42256)
Summary:
Over in React Native macOS land, I opened https://github.com/microsoft/react-native-macos/pull/2030 to update our mono repo to use Yarn 4. As a side effect, all the `package.json` files are formatted as a side effect of running `yarn install`. So that React Native macOS doesn't maintain this diff (and because they should only be good / no harm), let's upstream the formatting changes.

## Changelog:

[INTERNAL] [CHANGED] - Format package.json files in the monorepo

Pull Request resolved: https://github.com/facebook/react-native/pull/42256

Test Plan: This change should be a no-op, CI should pass.

Reviewed By: cortinico

Differential Revision: D52727623

Pulled By: huntie

fbshipit-source-id: 67862b16d576b0903abd91e016d7add4c19853dc
2024-01-22 07:15:05 -08:00
Alex Hunt 16dff523b0 Bump Metro to ^0.80.3 (#42139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42139

Bump to the latest Metro release.

Metro release notes: https://github.com/facebook/metro/releases/tag/v0.80.3

Changelog:
[General][Changed] - Bump Metro to ^v0.80.3

Reviewed By: GijsWeterings

Differential Revision: D52520542

fbshipit-source-id: 3c089e3f033a4d0597e9adb50d3377f1ad822743
2024-01-05 03:06:03 -08:00
Luna Wei 6e5bc33b3c Remove caret from monorepo dependencies (#42086)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42086

Changelog: [General][Changed] - Update monorepo dependency versions to remove ^

This change will remove the caret for now as we already perform an "align" step everytime we bump a monorepo library. This prevents monorepo library updates to affect existing releases.

The "align" step updates all monorepo libraries to use the updated bumped version: https://fburl.com/code/xfistiph

Reviewed By: huntie

Differential Revision: D52440454

fbshipit-source-id: ff071032f04bc554903dde153c594991163dfe2f
2024-01-02 13:02:29 -08:00
Rob Hogan 7853b06929 Update Metro to ^0.80.0 - don't pin to exact version (#41219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41219

Bump to the latest Metro release. This includes minor breaking changes to Metro subpackages that should *not* be visible to RN users.

Metro release notes: https://github.com/facebook/metro/releases/tag/v0.80.0

## Moving to unpinned versioning
Metro is a multi-package project, and not pinning to an exact version means multiple versions of `metro*` packages may appear in an RN project.

This isn't unusual in the NPM ecosystem and *shouldn't* be a problem, but historically has caused issues (eg https://github.com/facebook/react-native/issues/34714, https://github.com/facebook/metro/issues/1017). The root cause of all of these issues, as far as we know, was fixed in https://github.com/facebook/metro/commit/6d46078e74ae9a43aa90bed46dbd6610e2696cd0, a bug where Node hierarchical resolution was effectively sidestepped via a relative worker path, resulting in a mismatch between transformer and host process.

In addition, the fact that `react-refresh`, `metro-react-native-babel-transformer` and `metro-react-native-babel-preset` are now fully moved into the `react-native/` scope and versioned with React Native means there are no circular dependencies between React Native and Metro, explicit or implicit, and we're much more clearly decoupled.

So, we're moving to caret versioning to allow React Native users to pick up Metro fixes and features without requiring React Native releases and user upgrades.

Changelog:
[General][Changed] - Update Metro to ^v0.80.0, stop pinning to an exact version

Reviewed By: GijsWeterings

Differential Revision: D50731999

fbshipit-source-id: 57b07bf73c0b31f392c4d36376ca48b48a8bd598
2023-10-27 10:42:46 -07:00
Alex Hunt f40bb9331c Bump package versions for next major (#39764)
Summary:
#publish-packages-to-npm

Bump all package versions to `0.74.0` (next major release) for `main`, following instructions at https://reactnative.dev/contributing/release-branch-cut-and-rc0#12-bump-minor-version-of-all-monorepo-packages-in-main.

```sh
yarn bump-all-updated-packages --release-branch-cutoff
```

Changelog: [Internal]

Pull Request resolved: https://github.com/facebook/react-native/pull/39764

Test Plan: —

Reviewed By: robhogan

Differential Revision: D49871039

Pulled By: huntie

fbshipit-source-id: f4df6efeae4d8a9209e7aae7b9e6fea3d15793b5
2023-10-11 08:36:23 -07:00
Arushi Kesarwani 982f6f99d4 Upgrade Metro to 0.79.1 in RN (#39273)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39273

Upgrade Metro dependencies to 0.79.1 in `react-native`

This includes Metro breaking changes for disabling global package resolution by default and adds features like: Haste packages, enable resolution through symlinks and passing custom customTransformOptions and customResolverOptions to bundle_build_started log event so as to refine the bundling message. It also fixes arbitrary transformation of Babel plugins during registration in `metro-babel-register` and fixes "unexpected null" crash when handling a batch of file changes and symlinks with indirections.

**Full Metro Changelog:** https://github.com/facebook/metro/releases/tag/v0.79.1
https://github.com/facebook/metro/releases/tag/v0.79.0

Changelog:
[General][Changed] Upgraded Metro to 0.79.1

Reviewed By: motiz88, mdvacca

Differential Revision: D48922815

fbshipit-source-id: 37aea6194fe587e0d094c96ceec1122c588f0fbb
2023-09-19 21:42:33 -07:00
Alex Hunt fdcb94ad13 Upgrade CLI and Metro, update status check refs (#38988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38988

- Upgrade to RN CLI `12.0.0-alpha.9`, including Metro bump to `0.78.0`.
- Update test scripts, since this CLI release made a breaking change to the `/status` response.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D48311214

fbshipit-source-id: bb0be3c32edb629355b9fbbd754b28f9878f47ef
2023-08-15 02:33:22 -07:00