274 Commits
Author SHA1 Message Date
Sam Zhou d2a6ce5f7f Adopt lib.dom.d.ts in xplat (#58582)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58582

X-link: https://github.com/react/metro/pull/1943

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D120546333

fbshipit-source-id: b64a0f3557fab2c9d67bc381fdbe8b0f089c13a7
2026-09-17 17:29:31 -07:00
Sam Zhou fdcce4f673 Turn on experimental.new_this_typing in xplat (#58293)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58293

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D118513884

fbshipit-source-id: a33a81eab930ac29663410cf04163aebb87062ad
2026-09-02 13:03:29 -07:00
Alex Hunt 9efcdfc2b4 Drop chrome-launcher dependency (#57630)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57630

**Motivation**

- Flagged as a papercut by Expo: `chrome-launcher` (and `chromium-edge-launcher`) constitute duplicate code (vs Expo's vendored version), and we can lighten our core package by dropping these dependencies.
- `launchDebuggerAppWindow` is now a fallback (since the rollout of the RNDT desktop shell), and we can reasonably delegate more rigorous browser detection to frameworks.

**This diff**

Remove both `chrome-launcher` dependencies and their usages in the `launchDebuggerAppWindow` code path. In their place, use `open` (bumped to 8.x)'s `openApp` API for Chrome only.

Changelog:
[General][Changed] - **React Native DevTools**: When using the fallback flow for launching DevTools (desktop app fails to launch), Microsoft Edge will not be attempted. DevTools will open as a standard window in the default browser.

Reviewed By: robhogan

Differential Revision: D113055240

fbshipit-source-id: e3dfb7df58160eae0ec13ae7403d3d7c7dc2a84b
2026-07-22 10:08:13 -07:00
Alex Hunt 527698f2e5 Drop stale $FlowFixMe suppressions for node: imports (#57612)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57612

Cleanup — these types are already declared in `react-native-github/flow-typed/environment/node.js` and resolve under Flow. The `$FlowFixMe[cannot-resolve-module]` suppressions on these imports are therefore stale.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D112803683

fbshipit-source-id: e7d248527809748bbee5864d0a0fe83e45fdcc23
2026-07-21 09:01:41 -07:00
Alex Hunt 89300acb9c Migrate Node.js builtin imports to node: scheme (#57611)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57611

Directly follows D112733139 (Metro).

**Motivation**

- New Node builtins are *only* available under the prefix (e.g. `node:sqlite`), as this allows Node to introduce them without ecosystem-breaking changes, so this is the direction of travel and the only choice that'll allow consistency.
- Encouraging them and grouping them separately makes it easier to reason about a module's 3rd party dependencies.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D112803684

fbshipit-source-id: 40668d746a7151b3aa4800ff8af997902a18d198
2026-07-21 09:01:41 -07:00
Sam Zhou a016e94b59 Redo D111190630: Stop using prettier-plugin-hermes-parser for formatting (#57537)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57537

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D111829105

fbshipit-source-id: 3309a22e737f68aca2d8d19f49e56bad955e5377
2026-07-13 17:48:27 -07:00
generatedunixname89002005232357 65af886291 Revert D111190630: Stop using prettier-plugin-hermes-parser for formatting
Differential Revision:
D111190630

Original commit changeset: e7ed7ee6f057

Original Phabricator Diff: D111190630

fbshipit-source-id: 49e33587fa084c181d64d35ac6bcf6ab73edfa5f
2026-07-13 16:42:37 -07:00
Sam Zhou 2235b8ec3f Stop using prettier-plugin-hermes-parser for formatting (#57505)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57505

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D111190630

fbshipit-source-id: e7ed7ee6f05701fbdaad1c8fad58c47f48344487
2026-07-13 15:57:35 -07:00
Alex Hunt ffe3f79495 Standardize secondary package READMEs (#57273)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57273

**Motivation**

A README is the first thing an npm visitor sees on each package; internal-repo boilerplate like the "Testing" sections and the "We're using yarn…" note doesn't belong on a published package page.

**Changes**

- Standardize every README: a `# react-native/<name>` heading, a user-facing description, and a blue version badge plus a green monthly-downloads badge.
- Keep the "internal dependency" prelude only on `community-cli-plugin`, `virtualized-lists`, and `js-polyfills`.
- Drop the monorepo-template "Testing" sections and yarn note.
- Rework `metro-config` around the Configuring Metro guide; add missing READMEs for `metro-babel-transformer` and `popup-menu-android`.

Changelog: [Internal]

Reviewed By: emily8rown

Differential Revision: D109017270

fbshipit-source-id: 6208294c4ad2e6235a6605ae54f22d730f0476e7
2026-06-18 07:04:44 -07:00
Rob Hogan dcbd8608a6 Update package.json references to GitHub org "facebook" -> "react" (#57258)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57258

Reflecting the move to https://github.com/react/react-native , update references in first-party `package.json`s

The `repository.url` field in particular is load-bearing for Trusted Publish.

Changelog: [Internal]

___

Reviewed By: fabriziocucci

Differential Revision: D108986410

fbshipit-source-id: 78513ffefc32ddf417dc1479a4834ebc44240080
2026-06-18 02:00:52 -07:00
Sam Zhou e0ed406590 Redo modern syntax rollout in react-native (#57034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/57034

With D107165685, it should work this time.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D107111468

fbshipit-source-id: 326b2911088d7c87c3564a578125eeaab9d0b8cc
2026-06-03 07:21:54 -07:00
Rubén Norte 833144fcec Revert recent Flow syntax codemods in react-native-github (#56998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56998

Reverts the recent Flow syntax codemods applied across `packages/`, `private/`, and `scripts/` in react-native-github. Specifically restores the previous form for:

- `+T` / `+Instance` style variance annotations on generic type parameters that had been converted to the newer `out T` / `in T` keyword form.
- `+field:` covariant object/interface properties that had been converted to the `readonly field:` modifier form.
- `+[K in keyof T]:` mapped-type covariance that had been converted to `readonly [K in keyof T]:`.

These are purely Flow type-annotation changes with no runtime behavior impact, restoring the form that the rest of the toolchain (in particular Fantom) already supports.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D106813102

fbshipit-source-id: 6bf915d530e130eba9c9d96a2b6c3dc8853594d1
2026-05-29 14:09:58 -07:00
SJLIM 5b16cdff9d Generated from a GitHub Pull Request. Run 'jf sync' on this diff to load the correct commit data. (#56985)
Summary:
Remove duplicated words from comments in a release script, a dev middleware test helper, the Gradle plugin JDK utility, and the virtual view render state.

## Changelog:
[INTERNAL] [FIXED] - Fix duplicated words in source comments.

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

Test Plan: Comments.

Reviewed By: cortinico

Differential Revision: D106615714

Pulled By: fabriziocucci

fbshipit-source-id: cbb08abc5c0e6fbcfe2299c00aa05e67901b9f4c
2026-05-29 12:47:25 -07:00
Marco Wang 88857d22f9 manually fix a few more files (#56983)
Summary:
X-link: https://github.com/facebook/metro/pull/1719

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

X-link: https://github.com/facebook/relay/pull/5300

skipped by codemod. Fixing them manually

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D106557702

fbshipit-source-id: 9228e5f8f855a362f72249117770d33d97bd4191
2026-05-28 17:37:32 -07:00
Marco Wang 5fce2de800 Transform readonly in xplatjs (#56973)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56973

```
js1 flow-runner codemod flow/transformAllVariance --variance readonly --format-files=false @
```

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D106410842

fbshipit-source-id: 58982a572f941fa32aeeaa50857b1e3b8968665e
2026-05-27 00:36:12 -07:00
Alex Hunt a0d39e7a9c Bump minimum Node.js version to 22 (#56887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56887

Drop support for Node.js 20. The minimum supported version is now `^22.13.0 || ^24.3.0 || >= 26.0.0`.

Node.js 20 reached end-of-life in April 2026 and is no longer actively maintained. This aligns React Native with the upcoming Metro requirement.

Changelog:
[General][Breaking] - Require Node.js >= 22.13.0

Reviewed By: christophpurrer, cortinico

Differential Revision: D105685641

fbshipit-source-id: f490e5a13e4289daba98c4d56dd8fdd341aef0db
2026-05-19 11:53:54 -07:00
Rob Hogan 783f45746e Bump packages to 0.87.0-main following 0.86 cut (#56716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56716

Now that we've cut 0.86, bump all versions on `main` ready for the 0.87 cut.

Changelog: [Internal]

Reviewed By: cortinico, fabriziocucci

Differential Revision: D104219534

fbshipit-source-id: 86f2ebe5b44f67608a7a9495bf9840f2cdd52e5b
2026-05-07 07:23:06 -07:00
Sam Zhou 82bffce573 Cleanup legacy flow types in react-native (#56300)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56300

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D99004126

fbshipit-source-id: dfedc13c867cb768777e2ba65256a2c40ffb1d08
2026-03-31 19:25:25 -07:00
Sam Zhou d0a1efbec3 Change all remaining flow legacy casting syntax to modern one (#56259)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56259

Change all remaining flow legacy casting syntax to modern one.

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D98565441

fbshipit-source-id: 39b64397689d1ce05647d6a029b7c903fff1a1f6
2026-03-27 17:58:15 -07:00
Alan Lee bbaabe6a16 Bump packages for next release (#55946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55946

Follows the recent `0.85-stable` branch cut.

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

Reviewed By: cortinico

Differential Revision: D95410323

fbshipit-source-id: dacfee00f1111dbf57ef2e608963a4bffa669884
2026-03-10 00:35:59 -07:00
Marco Wang f596bb3d1a transformTypeParamBound codemod 8/9 (#55949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55949

js1 flow-runner codemod flow/transformTypeParamBound --format-files=false xplat/js

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D95429359

fbshipit-source-id: fc5bfa68cd5267ec5e74358592eace97c9a6f662
2026-03-06 11:24:12 -08:00
Fabrizio Duroni e5d720d98d Added missing tests for Standalone fusebox shell (#55460)
Summary:
This PR adds the missing test coverage for the standalone Fusebox debugger shell in `StandaloneFuseboxShell-test`.
First, I added some missing expectation for the success case (`enableStandaloneFuseboxShell=true` and no errors) already present:

- the assertion that `unstable_prepareFuseboxShell` is called just one time during middleware initialization
- the assertion that `launchDebuggerAppWindow` is never called when the standalone shell is available

Then, I added the missing test for the case when `unstable_prepareFuseboxShell` returns one of the error code like eg. `platform_not_supported` (as reported also in the TODO that I removed).
In this way now the test is verifying the full behaviour for the new standalone mode for debugger/dev tools.

## Changelog:

[GENERAL] [CHANGED] - Added missing tests for Standalone fusebox shell

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

Test Plan:
- Ran `StandaloneFuseboxShell-test` and verify all tests cases passed
- Ran the full React Native test suite to ensure all tests pass.
- Verified test correctness by intentionally breaking production code:
  - removing the calls to the `DefaultBrowserLauncher` in `openDebuggerMiddleware` to verify that the tests were correctly failing

Reviewed By: Abbondanzo

Differential Revision: D93157076

Pulled By: huntie

fbshipit-source-id: 51c12ad67dd929035f779b53add9163a6619cf41
2026-02-27 07:22:16 -08:00
Alex Hunt 703fe8b222 Add module mock for DefaultToolLauncher and apply in tests (#55728)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55728

Fixes unwanted side effect launches of the debugger shell in tests (likely introduced in D88161573!).

Also adds error guard on `DefaultAppLauncher` to ensure that the implementation is always mocked.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D94230761

fbshipit-source-id: 966f6f09c38aa55594091bd7d34a5c78dc6eee93
2026-02-26 12:12:16 -08:00
Alex Hunt 4206c12180 Rename BrowserLauncher interface and implementations
Summary:
Renames the **"BrowserLauncher"** concept (`unstable_browserLauncher`) to **"DevToolLauncher"** (`unstable_toolLauncher`), since the scope is now widened to open the desktop debugger shell by default.

Also rename and remove `unstable_` prefixes for `launchDebuggerShell` and `prepareDebuggerShell` methods (APIs remain unstable on the root option key).

**Why not `DebuggerLauncher`?**

This naming remains wide enough to cover other host process delegation in future (e.g. opening other secondary tools, or opening a generic URL in the browser). Debugger launching methods remain specifically named to match their intent.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D94218654

fbshipit-source-id: e59d5465f200666cd0f1a189414f2223f5e46f69
2026-02-26 12:12:16 -08:00
Vitali Zaidman 8915d81a5b make metro accept tls server config (#55701)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55701

X-link: https://github.com/facebook/metro/pull/1657

Changelog: [Feature] `config.server.tls` now sets Metro to be exposed as an https server

Reviewed By: robhogan, huntie

Differential Revision: D93857257

fbshipit-source-id: 56ff661c4ddf9cd5d4bb32756b9cb600bb032a1c
2026-02-24 00:57:54 -08:00
Alex Hunt 8250db6ae9 Remove prefersFuseboxFrontend from event reporter (#55549)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55549

**Context**

Clean up the legacy `rn_inspector.html` entry point. React Native DevTools has been the default since 0.76, and we have now removed all internal dependencies at Meta.

**This diff**

- Remove `prefersFuseboxFrontend` metadata from `unstable_eventReporter` API.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D93247602

fbshipit-source-id: 278f847433259c98deb121562e34a12ff59058a2
2026-02-23 09:39:22 -08:00
Alex Hunt 755895e167 Remove legacy debugger entry point selection (#55548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55548

**Context**

Clean up the legacy `rn_inspector.html` entry point. React Native DevTools has been the default since 0.76, and we have now removed all internal dependencies at Meta.

We've verified that Reanimated (`react-native-worklets`) also do not depend on this workflow, and documents `chrome://inspect` instead.

**This diff**

- Launching the debugger will no longer check for the `prefersFuseboxFrontend` capability flag (internal contract with the debugger server).
- The modern `rn_fusebox.html` entry point will always be used.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D93247604

fbshipit-source-id: 1c7b6838d9105c9206ffc0030374dc1ee559a6dd
2026-02-23 09:39:22 -08:00
Phillip Pan 4dfefd1a21 upgrade undici from 5.29.0 to 6.23.0 (#55574)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55574

Upgrade the undici devDependency in react-native/dev-middleware from ^5.29.0 to ^6.23.0 to address security vulnerabilities. undici v6 drops the fastify/busboy dependency and requires Node.js >= 18, which is already satisfied by the engine requirements. The API surface used (Agent, request) remains compatible.

this is low risk, because it's only used in a test.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D93298172

fbshipit-source-id: be623702ebec1bd494c862f9c7990580f6b3cc4d
2026-02-17 09:14:50 -08:00
Emily Brown 10709f427d Refactor serverBaseUrl from string to URL object (#55285)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55285

Changelog: [GENERAL] [CHANGED] - `createDevMiddleware` now accepts `string | URL` for `serverBaseUrl`

Replaces the serverBaseUrl string type with a native URL object across the Metro CLI and Gateway packages.

This change improves type safety and makes URL manipulation more robust by leveraging the built-in URL API instead of string concatenation.

The public createDevMiddleware API has been updated to accept either a string or URL for the serverBaseUrl option.
Internally within the dev-middleware package, the internal APIs (InspectorProxy, openDebuggerMiddleware, getDevToolsFrontendUrl) use URL objects instead of strings.
https://www.npmjs.com/package/react-native/dev-middleware

Reviewed By: vzaidman

Differential Revision: D90987090

fbshipit-source-id: ec5b8faa4ed5c24b489c3d63f7b6030073be5403
2026-02-06 07:08:58 -08:00
Moti Zilberman f04659972c Add multi-session support to Device.js (#55237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55237

Adds multi-session support to the Node side of the inspector-proxy protocol implementation. The protocol now has an explicit `sessionId` property in all relevant messages.

Multi-session support is fully backwards compatible:

* An app that does not report itself as multi-session capable will get the old proxy behaviour.
* If the `enableStandaloneFuseboxShell` experiment flag is disabled by the integrator/framework, we automatically disable multi-session support, too. This is to guarantee that we continue to have at most one active RNDT window/tab open per app. (The standalone shell guarantees this independently of the proxy, while the old browser-based flow requires the proxy to keep enforcing the single-session UX.)

Changelog: [General][Added] Support multiple CDP connections to one React Native Host (diff 2 of 2)

Reviewed By: robhogan

Differential Revision: D90174643

fbshipit-source-id: b277cf2777d2018c44252dc4eae7b197e51cfb79
2026-01-26 01:42:44 -08:00
Moti Zilberman 534c06f3c8 Add multi-session support to InspectorPackagerConnection (#55238)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55238

Adds multi-session support to the inspector-proxy protocol, specifically to the C++ `InspectorPackagerConnection` class that implements the "device" side of the protocol.

Changelog: [General][Added] Support multiple CDP connections to one React Native Host (diff 1 of 2)

Reviewed By: hoxyq

Differential Revision: D90174642

fbshipit-source-id: b22946aaa5a6f3d2d4a81cbfe81d371ea2bc0632
2026-01-23 05:09:17 -08:00
Vitali Zaidman 3c7b4881dd RN: Allow WS debugger connection to origin from debugger url (#55268)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55268

Allow WS debugger connection to origin from debugger url.

Also notify the user on Metro if a connection is rejected.

Changelog: [General][Fixed] - Reaching Metro from Debugger on urls other than localhost:8081 and 127.0.0.1:8081.

Reviewed By: robhogan, yungsters

Differential Revision: D91130956

fbshipit-source-id: 107dbc78aa60b888325f5c6dca68cc28f4e6af52
2026-01-22 04:21:17 -08:00
Rob Hogan 1bbb9ee0d1 Replace deprecated url.parse in dev-middleware (#55235)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55235

Use of Node's `url.parse` is deprecated and emits a runtime warning (when used in 1P code) from Node 24.

This wouldn't directly affect RN users, but does create noise running from monorepo source.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D90992431

fbshipit-source-id: d53e2837cd13bba3fbb24302c5916038ae0e5a50
2026-01-21 14:10:33 -08:00
Moti Zilberman 211e007522 Add inspector-proxy protocol docs (#55055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55055

TSIA.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D90174644

fbshipit-source-id: c61eedc70eb2169e14112bd6d48327f5979d8125
2026-01-20 00:22:46 -08:00
Marco Wang cd3a9c55c1 Transform all remaining utility types (#55178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55178

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.

drop-conflicts

Command:

`js1 flow-runner codemod flow/transformUtilityType --format-files=false --legacy-type='ALL'`

Reviewed By: SamChou19815

Differential Revision: D90728908

fbshipit-source-id: a8a1a06eb274cc32b12e893679aa92034eb962c4
2026-01-15 16:02:51 -08:00
Alex Hunt f1bedfb92b Bump packages for next release (#55172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55172

Follows the recent `0.84-stable` branch cut.

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

Reviewed By: vzaidman

Differential Revision: D90698490

fbshipit-source-id: b81b840bfd66e631f160a11c4c64baa6850e3393
2026-01-14 12:17:16 -08:00
Rob Hogan c9c601d61a Node.js: Drop support for Node.js versions released before 20.19.4, and EOL v21,v23 (#55114)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55114

Our official [docs](https://reactnative.dev/docs/set-up-your-environment#node--watchman) require:

> Node 20.19.4 or newer

Currently, our `package.json#engines` fields express this as `"node": ">= 20.19.4"`

This is a bit imprecise because of Node's overlapping release lines - e.g. v24.0.0 is actually older than v20.19.4 (2025-07-15), and the whole v21 line was already EOL before v20.19.4.

The release *date* is relevant because Node.js frequently backports the most important updates - notably, `require(esm)` is already stable in Node 20.19 but is not unflagged in v22 until v22.12.

This makes the `package.json#engines` requirement truer to the documented requirement, dropping some old minors and EOL majors that prevent us using features included in v20.19.

Notably, `require(esm)` is stable and unflagged on all versions supported from this diff.

 - v21 and v23 are EOL, so are dropped.
 - v22.13 pre-dates 20.19.4 and is the first to have unflagged silent `require(esm)`
 - v24.3.0 pre-dates 20.19.4 and is the first to unflag TS-stripping
 - Support v25 and newer.

Changelog:
[General][Breaking] Drop support for EOL Node.js lines and old minors.

Reviewed By: cortinico, huntie

Differential Revision: D90467358

fbshipit-source-id: a5fdfb1b93a9d6cffe78eb6811ff7420ab906f44
2026-01-14 10:49:05 -08:00
Marco Wang 7051a07c63 Transform $ReadOnlyArray to ReadonlyArray 17/n (#55109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55109

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.

drop-conflicts

Command:

`js1 flow-runner codemod flow/transformUtilityType --legacy-type='$ReadOnlyArray'`

Reviewed By: SamChou19815

Differential Revision: D90402950

fbshipit-source-id: d338ad7997728d40457b1199c3bd5dcd245a39c3
2026-01-13 20:33:09 -08:00
Marco Wang ea6884cc55 Transform $ReadOnlyMap to ReadonlyMap (#55110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55110

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.

drop-conflicts

Command:

`js1 flow-runner codemod flow/transformUtilityType --format-files=false --legacy-type='$ReadOnlyMap'`

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D90425806

fbshipit-source-id: e725c86053879a571b36aaeae1154d779571b362
2026-01-12 19:15:05 -08:00
Rob Hogan 0cda10b00a Revert: Bump minimum Node.js version to v22.11 (prev LTS) (#55113)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55113

Reverts https://github.com/facebook/react-native/pull/55038

Dropping v20 (still in LTS) causes friction with Expo's LTS policy, so we're restoring support for v20.19.

Changelog: [General][Added] Revert https://github.com/facebook/react-native/pull/55038

Reviewed By: shwanton

Differential Revision: D90467161

fbshipit-source-id: d876cf7869f11e04058f88239f553704e0706514
2026-01-11 14:30:40 -08:00
Tim Yung f34b8702db RN: Verify Debugger Connection Origins (#55101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55101

Introduces origin verification for requests to establish debugger connections.

Changelog:
[General][Fixed] - Changed debugger proxy to only permit connections from localhost.

Reviewed By: robhogan

Differential Revision: D90348550

fbshipit-source-id: 71589a340d16b831bdb87660963677d7e0890078
2026-01-08 17:29:06 -08:00
Phil Pluckthun 1f2312687b Bump chromium-edge-launcher to drop rimraf (#54711)
Summary:
Related to https://github.com/facebook/react-native/issues/54669

This version bump drops `rimraf`.

This has been raised at a sync before, but it'd be great to instead drop or replace this entirly. I also noticed that it pulls in `types/node@*`, which isn't necessary for it to function as well, and generally, it'd be nice if we had an alternative here.

cc huntie

## Changelog:

[GENERAL] [SECURITY] - Bump to `chromium-edge-launcher@^0.3.0` to drop `rimraf`

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

Test Plan: - Package hasn't changed except for `rimraf` having been dropped

Reviewed By: huntie, cortinico

Differential Revision: D87978681

Pulled By: robhogan

fbshipit-source-id: b761493f677f9cd4008d3fda584dd04de40c0845
2026-01-07 11:21:59 -08:00
Alex Hunt 4bd62a1d41 Remove "JavaScript logs have moved!" notice (#55075)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55075

It's been >1y since we introduced this notice (and introduced the `--client-logs` flag) — clean up.

Changelog:
[General][Changed] - Remove "JavaScript logs have moved!" notice from dev server CLI

Reviewed By: hoxyq

Differential Revision: D90247471

fbshipit-source-id: dc13c90476c65c301bdb3a51db91f0e5fe0b326b
2026-01-07 06:51:02 -08:00
Marco Wang 1cc30dc1ad Transform $ReadOnly to Readonly 37/n (#55066)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55066

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.

drop-conflicts

Command:

`js1 flow-runner codemod flow/transformUtilityType --legacy-type='$ReadOnly'`

Changelog:[internal]

Differential Revision: D90146145

fbshipit-source-id: 4b71784a36f8286f3be620969ea408cf8a0aac80
2026-01-06 18:57:56 -08:00
Rob Hogan 8f10b339d4 Breaking: Bump minimum Node.js version to v22.11 (prev LTS) (#55038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55038

Bump the minimum to Node.js v22.11, which is the previous LTS now that v24 is in LTS. Drop support for Node v20.

https://nodejs.org/en/blog/release/v22.11.0
https://nodejs.org/en/about/previous-releases

Changelog: [General][Breaking] Bump minimum Node.js version to v22.11

Reviewed By: cortinico, huntie

Differential Revision: D90109056

fbshipit-source-id: 178f29d3131f21fccf956decc9ac94365a2bfe53
2026-01-05 06:21:25 -08:00
Vitali Zaidman 89ac112791 removed unstable functions tracking the existance of connected devices (#55008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55008

Changelog: [Internal] removed an unstable function briefly added in #54447

This was previously added in https://github.com/facebook/react-native/pull/54447, but not needed anymore as we found a different way to get this information without exposing a special API for that.

Reviewed By: robhogan

Differential Revision: D89962175

fbshipit-source-id: 3636ef8815678781ee39ef8211f00bde69b5ce63
2026-01-04 12:16:58 -08:00
Marco Wang 2624e2f52e Transform mixed to unknown in xplat/js (#54955)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54955

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.
drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D89581584

fbshipit-source-id: cc5953ffea6cf1060f69efc714508e8ba93a040c
2025-12-22 12:25:44 -08:00
Marco Wang f41f3bf41f Transform all Flow legacy utility types ($NonMaybeType) to TypeScript-style types in xplat/js (#54935)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54935

We are transforming the following utility types to be more consistent with typescript and better AI integration:

* `$NonMaybeType` -> `NonNullable`
* `$ReadOnly` -> `Readonly`
* `$ReadOnlyArray` -> `ReadonlyArray`
* `$ReadOnlyMap` -> `ReadonlyMap`
* `$ReadOnlySet` -> `ReadonlySet`
* `$Keys` -> `keyof`
* `$Values` -> `Values`
* `mixed` -> `unknown`

See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/.

drop-conflicts

Reviewed By: gkz

Differential Revision: D89494075

fbshipit-source-id: 1bc3e0039dfb5bf04f1860d5098e024fb8491647
2025-12-19 01:35:12 -08:00
Alex Hunt cc9164c337 Move JavaScript exports rewrites to publishConfig/prepack (#54857)
Summary:
### Motivation

Updates the shared JavaScript build setup to use the modern `publishConfig` convention.

This:

- Simplifies the build script.
- Makes the production values for `"exports"` more understandable in place (especially by separating from exports conditions).
- Prevents us from creating a dirty file state when running `yarn build`.

### Changes

- Add `publishConfig` to each `package.json` listing production `"exports"` targets.
- Add `scripts/build/prepack.js` script to action `publishConfig` (now on `npm pack`, `npm publish` exclusively).
- Remove `"exports"` rewriting (and un-rewriting safeguards) from build script.

**Note on `"prepack"`**

Slightly unfortunately, `publishConfig` doesn't work consistently between package managers currently, including npm — so this does not work implicitly (but may in future).

We're instead following `publishConfig` as a convention, and explicitly implementing a full copy (theoretically forking us towards pnpm and Yarn v4's approach).

However, I believe this is:

- Worthwhile, for the motivations above — and in particular being able to understand the final shape of `"exports"` (independent from the dimension of conditional exports, which may come into play later).
- Completely inspectable/maintainable as an explicit implementation (`scripts/build/prepack.js`).

Changelog: [Internal]

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

Test Plan:
### CI

✅ GitHub Actions

### End-to-end release test script

(Note: Rebased on `0.83-stable` when tested)

```
yarn test-release-local -t "RNTestProject" -p "iOS" -c $GITHUB_TOKEN
```

{F1984106139}

✅ Test script runs `npm publish` on packages to a local proxy.

{F1984106146}

✅ Installed packages have `publishConfig` `"exports"` values applied

NOTE: ⬆️ This is **exactly** the same output as before.

 {F1984106148}

✅ `/tmp/RNTestProject` runs using built + proxy-published + proxy-installed packages

Reviewed By: cipolleschi

Differential Revision: D88963450

Pulled By: huntie

fbshipit-source-id: f328252cf93a1f1039b79d7f369d1e6e7e5b4b52
2025-12-12 04:08:59 -08:00
Vitali Zaidman 1c282d7ef1 move default React Native DevTools launching params downstream (#54528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54528

Changelog: [Internal]

Currently, `DefaultBrowserLauncher.js` holds arguments configuring how the debugger shell is launched. Instead, move some of them downstream, and make `DefaultBrowserLauncher.js` use the defaults.

Reviewed By: motiz88

Differential Revision: D86772692

fbshipit-source-id: 826bb6236dc3cba3c4b0d455aebf3f81c4e8ed6f
2025-12-10 01:49:36 -08:00