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
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
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52289
The old `devtools://devtools/...` URL is **unsupported** with our modern debugger backend.
This reference was something we'd been intentionally leaving in place to preserve the old experience in Flipper — we can now remove.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D77368319
fbshipit-source-id: 400183e9bc477a887d66d79b412277971cf425e5
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51788
Adds `flow` to the remaining files that are lacking it in the `packages/rn-tester` directory.
This also adds any necessary type annotations and fixes lint warnings.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75899307
fbshipit-source-id: 27a74ed0007b3b754446a45931c2c148312d5e3a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51687
Changelog: [Internal]
# Context
This is the first of several commits that aim to implement a **standalone shell for React Native DevTools**. This will be a lightweight desktop app designed to host the debugger frontend, in much the same way as we currently use Chrome or Edge. The launch flow will otherwise remain **very similar** to the one that exists today.
## What's changing for users?
1. With this commit, nothing; we're merely setting up an experiment flag (for stage 1 - Meta-internal testing) and will make separate plans for open source rollout, coordinated with our framework maintainer partners.
2. If the experiment is successful, we aim to *eventually* phase out the use of Chrome/Edge in React Native DevTools and ship the standalone shell as standard to all React Native developers. This is to enable further improvements that will rely on the standalone shell to work.
3. The first iteration of the standalone shell aims to solve some concrete pain points such as the "dead window problem" - the fact that opening DevTools multiple times for the same target will leave behind a now-dead window (that would ideally have been reused).
## This diff
We amend the `unstable_experiments` and `unstable_browserLauncher` APIs in `dev-middleware` to add basic support for launching a standalone shell based on a frontend URL and a *window key* - the latter being an opaque string that the shell process can match against previous launches in order to reuse and foreground existing windows.
We leave it up to `BrowserLauncher` implementers ( = frameworks) to provide a working implementation of `unstable_showFuseboxShell`, and do not provide one with `DefaultBrowserLauncher`. This will effectively allow us to dependency-inject the actual shell implementation at stage 1 so we don't increase the download size of React Native unnecessarily.
Reviewed By: rickhanlonii, robhogan
Differential Revision: D74904547
fbshipit-source-id: fbc6eac97923062bda8892bc130b39051845ea82
Summary:
Running with
```
DEBUG=Metro:InspectorProxy DEV=1 js1 run --no-tty-print
```
When a message larger than 100kb is send over the cdp, log it.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D75000887
fbshipit-source-id: 6f426ed4db7ac1996c4f26461a6e0d13c096e5cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51227
Standardize error messages thrown from inspector proxy when connection is closed to debugger and link to where they are used in `react-native-devtools-frontend`
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D74484316
fbshipit-source-id: 7885bc5ea41397539814f97d764c9a376ef50eaa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50964
Address/supress ESLint warnings across the codebase, currently flagged on every PR via GitHub's "Unchanged files with check annotations" check.
{F1977480883}
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D73778510
fbshipit-source-id: 91bed86877eae74fa3b9ebea71e26cdcaeee1761
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50436
Changelog: [Internal]
`is_idle` was a confusing concept that I didn't find useful when researching why disconnections happen. Instead, I'd like to know when the last communication with inspector proxy took place.
Reviewed By: hoxyq
Differential Revision: D72251072
fbshipit-source-id: 10f83bde6c8f3ed4b661bcfbef57f86f34039e5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50435
Changelog: [Internal] when reporting how many cdp messages passed inspector proxy, also report their total size
Reviewed By: hoxyq
Differential Revision: D72245498
fbshipit-source-id: 777274527b7e180c984b11414bec54d0e6f9d27b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50330
Changelog: [Internal]
Make the error reported when a debugger is created for a device that does not exist generic, and not including any specific details to make them easier to aggregate
Reviewed By: hoxyq
Differential Revision: D71979796
fbshipit-source-id: 88badc51043e35ff91d7db81c5966ed5ffce9109
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50288
Add hints about why devices running in the background might not report debuggable pages:
- Taking them from background might be enough
- Force killing them to restart them properly might be needed on Android.
Changelog:
[General][Internal]
Reviewed By: huntie
Differential Revision: D71888615
fbshipit-source-id: dda54b15daa7eebd1bc28a4d327a9b3d006397a4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49982
In D68708899, we removed dataURI inlining of sources and source maps into `Debugger.scriptParsed` CDP notifications.
After that, all message handling for which we need to preserve order is implemented completely synchronously, so there's no need for a promise queue to preserve order.
This removes the redundant queue.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71036230
fbshipit-source-id: d17fb7d06a038b379fe45b4e1c742dbf8ff12f78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50104
Changelog:
[General][Internal] raises an event report when an attempt to open the debugger for not supported apps is made
Reviewed By: robhogan
Differential Revision: D71398802
fbshipit-source-id: 66b90a0286ee0844ced4319381e3a0581ce540b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50071
Pull Request resolved: https://github.com/facebook/react-native/pull/50070
Changelog:
[General][Internal] Send code and close reasons when we close the connection to any websockets from the dev middleware
This should improve the debuggability of our code.
Reviewed By: robhogan
Differential Revision: D71314509
fbshipit-source-id: 1d6fc57a8601bcea78e95a87d423c7c46c51e799
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49922
Spamming the DB with "heartbeat" events with close to 0 ping didn't give us any useful information. Instead, report high ping situations.
Changelog:
[General][Internal] Remove reporting all device and debugger heartbeat events, only report heartbeats with high round trip latency
Reviewed By: GijsWeterings
Differential Revision: D70707457
fbshipit-source-id: 6bc8a55fd32dfa60fb4f7764ac00a6218417dcb5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49816
Previously, we had different versions of "debug" installed in different packages, mostly because of messed up `yarn.lock` entries.
Also, updated the package, receiving some performance improvements (no relevant breaking changes).
Changelog:
[General][Internal] update and dedupe the npm package "debug"
Reviewed By: huntie
Differential Revision: D70402368
fbshipit-source-id: 5e21bc6d92e0cb45ac1d862f100ef6dc0f21dbc1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49726
The `InspectorProxy` debug logging became incredibly spammy making it almost unuseful unless the output is manipulated so this commit batches all these cdp messages and only desplays how many were received in the span of 5s. If no messages are received, the throttle is not triggered.
To get the actual CDP messages logged, we still log these to `Metro:InspectorProxyCDPMessages`.
Changelog:
[General][Internal] batch debug logging for cdp messages
Reviewed By: robhogan
Differential Revision: D70324724
fbshipit-source-id: a269302f52e18af6c4be651758c042596abdbad8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49741
While the test delay `PAGES_POLLING_DELAY` is usually enough to be equal to `PAGES_POLLING_INTERVAL`, in some cases we need extra time to sync that with the polling in `Devices.js`.
Changelog:
[General][Internal] - fix test
Reviewed By: huntie
Differential Revision: D70384823
fbshipit-source-id: ccb18884d32dc27636dbbb3a9786412056f90830
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49714
Changelog: [internal]
This package was only needed for testing but it's actually not used.
Reviewed By: hoxyq
Differential Revision: D70318040
fbshipit-source-id: b57ec74932029368117520646972bfee83706017
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49635
Changelog:
[General][Internal] - report proxy idle state in heartbeat events
The proxy is considered Idle if it didn't receive any messages for 10 seconds.
Reviewed By: robhogan
Differential Revision: D70078637
fbshipit-source-id: 5b8d9a3a6e3e2568e40b3ada0a41e76b277fe66d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49618
Changelog:
[General][Internal] - create a heartbeat for device, and not only for debugger.
Introducing a heartbeat for the connection between the proxy and the device similarly to the one between the proxy and the debugger. This will allow us to:
* Most importantly I'd like to track the ping-pong roundtrip to the device as well, to see if we have any anomalies there
* Terminate the connection if it is abandoned for 60seconds- this might have a real effect in some case where the device runs remotely
* Also keep that connection alive if the other side disconnects after a period of inactivity. While a no-op in our case, this is an implementation detail. It is a no-op because the WebSocket on the Device is implemented by us and is not supposed to drop connections like the browser does.
Reviewed By: robhogan
Differential Revision: D69990715
fbshipit-source-id: 6bb3a2ed3eaffff9535aa2d0fc8cff0262af022f
Summary:
This package does not seem to be referenced by anything but the tests in `packages/dev-middleware`, so seems like a pretty straightforward change to drop it from `dependencies`.
It only seems to be referenced in `packages/dev-middleware/src/__tests__/ServerUtils.js`
## Changelog:
[INTERNAL] [CHANGED] - Remove selfsigned from dev-middleware dependencies
Pull Request resolved: https://github.com/facebook/react-native/pull/49556
Test Plan: - n/a
Reviewed By: cipolleschi
Differential Revision: D69925928
Pulled By: huntie
fbshipit-source-id: bba41f81dba054505ebf196ad37c7a718a6b16da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49552
Changelog:
[General][Internal] - expand debugger events to have DebuggerSessionIDs
Also moved the handling of these to a shared function
Reviewed By: huntie
Differential Revision: D69917817
fbshipit-source-id: 2374ac5b5dc0040b0e15028ab89fbe78026bc296
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49499
Changelog:
[General][Internal] - warn when user tries to open DevTools, when not in debug mode
Reviewed By: huntie
Differential Revision: D69784836
fbshipit-source-id: aa60762f08f5dea1f91f4fd1ffc86eeb7f94e2fc