85 Commits
Author SHA1 Message Date
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
Alex Hunt 24e370096e Integrate app menu with DevTools features, add icons (#57421)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57421

UX polish: Refine RNDT desktop app with new menu items mapping to key features inside the DevTools UI, and add menu item icons (macOS 26+).

**New/changed menu items**

- **[New] File > Reload App** - Unify cmd+R logic — explicitly bound to "Reload App".
- **[New] File > Reload DevTools** - opt+R — reinstates above
    - Note: Reloading and force-reloading the debugger-frontend's UI can also be done with cmd+R and cmd+shift+R *from a DevTools-on-DevTools window*.
- **[New] File > QuickOpen…**
- **[New] View > Command Palette…**
- **[Changed] View > Toggle Developer Tools** - Shown in debug builds only. Delete Reload and Force Reload items here (per above).
- **[New] Help > Keyboard Shortcuts**
- Simplify Edit menu options.

**Notes**

- Icons are configured on macOS 26+ only, and we've left the `{role: '<name>'}` icon templates alone (should be managed upstream in Electron, although today these icons are missing in some cases).

See https://github.com/electron/electron/issues/50609, https://github.com/electron/electron/issues/48909.

Changelog:
[General][Changed] - **React Native DevTools**: Expose new options in the app menu

Reviewed By: motiz88

Differential Revision: D94527813

fbshipit-source-id: e56a83c620efd2a2b41e3e7645a0fe987148de46
2026-07-06 04:00:25 -07:00
Alex Hunt 7d7bcbe640 Bump Electron to 43.0.0 (#57422)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57422

Upgrade from Electron 39.0.0 → 43.0.0.

Changelog: [Internal]

**Breaking changes from Electron 39.0.0 → 43.0.0:**

**Electron 40.0.0**
- Deprecated `clipboard` API access from renderer processes (use `contextBridge` from a preload script)
- macOS dSYM debug symbols now compressed with `tar.xz` (`dsym.zip` → `dsym.tar.xz`)

**Electron 41.0.0**
- PDFs no longer create a separate `WebContents` (now render in same WebContents via OOPIFs — use frame tree to detect)
- Cookie `'changed'` event has new causes: `inserted`, `inserted-no-change-overwrite`, `inserted-no-value-change-overwrite`
- Deprecated `showHiddenFiles` in dialogs on Linux (GTK removed the API)

**Electron 42.0.0**
- macOS notifications migrated from `NSUserNotification` to `UNNotification` API (requires code-signed app, else emits `failed` event)
- Offscreen rendering defaults to `1.0` device scale factor (use `webPreferences.offscreen.deviceScaleFactor` to override)
- `electron` npm package no longer downloads via `postinstall` (binary fetched on first `bin` run; `ELECTRON_SKIP_BINARY_DOWNLOAD` removed, use `ELECTRON_INSTALL_PLATFORM` / `ELECTRON_INSTALL_ARCH`)
- Removed `quotas` object from `Session.clearStorageData(options)`

**Electron 43.0.0-alpha.3**
- File downloads will open by default in the user's Downloads folder (or Home directory if Downloads doesn't exist)

Command run:

```
js1 upgrade electron --version 43.0.0-alpha.3
```

Reviewed By: robhogan

Differential Revision: D105587351

fbshipit-source-id: 80de51d5100dbbcd093a0aadcdd9d31591b4bb9f
2026-07-06 04:00:25 -07:00
Alex Hunt fa371d156d Add macOS 26 icon for RNDT (#57310)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57310

Add `AppIcon.icon` file (Icon Composer) for macOS 26 Tahoe. Also rename previous `.icns` file for consistency.

`electron/packager` is updated to `^20.0.0` (`.icon` support was added in `18.4.0`).

**Notes**

- This change ensures the Icon Composer source is part of the codebase (following above Electron packager support which came in March).

Changelog:
[General][Changed] - **React Native DevTools**: Add macOS 26/27 app icon

Reviewed By: robhogan

Differential Revision: D97292364

fbshipit-source-id: ba1c34175a95da8c2860142d9db0c4d98d3f6de0
2026-06-29 03:08:17 -07:00
Alex Hunt 83719830d6 Bump Electron to 39.8.10 (#57338)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57338

Contains security updates (T266889893).

Changelog: [Internal]

Command run:

```
DEV=1 js1 upgrade electron --version 39.8.10 --no-ephemeral
```

Reviewed By: rubennorte

Differential Revision: D109705549

fbshipit-source-id: 3292ada446e9a995f43e14a84424b39953e62953
2026-06-26 06:04:16 -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
Alex Hunt 6aa7e35ec3 Remove --version spawn from debugger shell preparation (#56706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56706

Addresses an issue where on macOS, we briefly flashed the RNDT app icon in the Dock. (This has been raised to us recently by Expo.)

**More info**

The `unstable_prepareDebuggerShell` health check was spawning the Electron binary with `--version` after a successful `dotslash fetch`. Invoking the native binary causes the app icon flash.

- I couldn't find an Electron-side way to eliminate this (e.g. headless).
- DotSlash already performs mandatory verification of every fetched artifact. The additional `--version` spawn was therefore redundant/overkill.

Changelog:
[General][Fixed] - React Native DevTools will no longer briefly flash in the system dock/taskbar when starting Metro

Reviewed By: cortinico

Differential Revision: D104061238

fbshipit-source-id: 5baafbc9a452438bb6ddcfb584975cae12618e0c
2026-05-22 08:24:13 -07:00
generatedunixname1395667395051502 630e3768c4 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D105737606

fbshipit-source-id: ad3b79923633b59a2ebd277f7197017e1abdc2e2
2026-05-21 07:36:14 -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
generatedunixname1395667395051502 ddccf61022 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D104244225

fbshipit-source-id: 5f98f5d3c7f376327cae1aee1668a5cfd5414dd1
2026-05-12 03:41:19 -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
generatedunixname1395667395051502 277d6f3a62 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D98585986

fbshipit-source-id: ec66c408ed67c80791ff9e99e3d8ab58d1c49de9
2026-03-28 05:43:31 -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
generatedunixname1395667395051502 3a2d5a276c Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D96462360

fbshipit-source-id: 72ccccab44130adbd739e7aa03bfa2164995b88e
2026-03-13 09:06:37 -07:00
Alex Hunt af62dfa754 Set minimum dimensions for debugger-shell windows (#56081)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56081

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D96391528

fbshipit-source-id: 45057e8113cec08a422e2be93d02cad5a4318345
2026-03-13 03:50:39 -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
generatedunixname1395667395051502 db45c280e2 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D93426145

fbshipit-source-id: c217a316212f5b105ac72c8fc11a39b9ec683c63
2026-02-16 10:53:48 -08:00
Alex Hunt 34b3c108bc Enable native tabbed window merging (macOS) (#55396)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55396

Changelog:
[General][Changed] - **React Native DevTools**: Enable native macOS window merging

Reviewed By: motiz88

Differential Revision: D92154327

fbshipit-source-id: 1592f459584afc511167c1e7bc91be59a3b5c249
2026-02-04 12:57:28 -08:00
Alex Hunt 96c97e08b1 Bump Electron to 39.0.0 (#55395)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55395

Upgrade from Electron 37.x → 39.x , which includes compiling for macOS 26.

Changelog: [Internal]

**Breaking changes from Electron 37.2.6 → 39.0.0:**

**Electron 38.0.0**
- Removed `ELECTRON_OZONE_PLATFORM_HINT` env var
- Removed `ORIGINAL_XDG_CURRENT_DESKTOP` env var
- Removed macOS 11 support (minimum now macOS 12)
- Removed `plugin-crashed` event from webContents
- Deprecated `webFrame.routingId` (use `frameToken`)
- Deprecated `webFrame.findFrameByRoutingId()` (use `findFrameByToken()`)
- Linux now defaults to Wayland (force X11 with `--ozone-platform=x11`)

**Electron 39.0.0**
- Deprecated `--host-rules` flag (use `--host-resolver-rules`)
- `window.open` popups now always resizable (WHATWG spec)
- Shared texture OSR `paint` event structure changed

Reviewed By: motiz88

Differential Revision: D92154326

fbshipit-source-id: 4e7399107bfcaf5592f6d873a36d09369804f605
2026-02-04 11:46:28 -08:00
Rob Hogan 2e9b7fb2ad Align Flow lib defs for Node.js child_process with v24 (#55186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55186

This is an AI-assisted change to align the Flow definitions for the `child_process` module with the Node.js docs as at v24.

**New v18+ Features:**

1. **AbortSignal Support** (v18.0.0) - Process cancellation
   - Added `signal?: AbortSignal` option to all async functions (exec, execFile, fork, spawn)
   - Enables cancellation of child processes using `AbortController`
   - Example: `const controller = new AbortController(); spawn('cmd', [], {signal: controller.signal}); controller.abort();`
   - https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback

2. **Enhanced Process Properties** (v20.x)
   - `spawnargs: Array<string>` - Full command-line arguments used to launch the process
   - `spawnfile: string` - Executable file name of the child process
   - `signalCode: string | null` - Signal that terminated the child process
   - https://nodejs.org/api/child_process.html#subprocessspawnargs

**ChildProcess Class Updates:**

3. **Improved Property Types**
   - `stdio` is now a properly typed tuple array with readonly modifier
   - `channel` changed from `Object` to `mixed` for better type safety

4. **Enhanced Method Signatures**
   - `kill(signal?: string | number): boolean` - Now returns boolean and accepts numeric signals
   - `send()` overloads properly typed with `child_process$Serializable` messages
   - `send()` accepts `keepOpen` option: `Readonly<{keepOpen?: boolean}>`
   - https://nodejs.org/api/child_process.html#subprocesskillsignal

**Option Type Improvements:**

6. **Modern Readonly Syntax** - All input options use `Readonly<{...}>`
   - `execOpts`, `execFileOpts`, `forkOpts`, `spawnOpts`, `spawnSyncOpts`, etc.
   - Allows passing readonly types safely

7. **Enhanced Environment Variables**
   - Changed `env?: Object` to `env?: {[key: string]: string | void}`
   - More precise typing for environment variable dictionaries

8. **New Fork Options** (IPC enhancements)
   - `serialization?: 'json' | 'advanced'` - IPC serialization format
   - `killSignal` and `timeout` options added to fork
   - https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options

9. **Enhanced Spawn Options**
   - Added `killSignal`, `timeout`, `serialization` to `spawnOpts`
   - Better consistency across all spawn functions

**Return Type Fixes:**

10. **spawnRet/spawnSyncRet** - Made fields properly nullable:
    - `status: number | null` - null if process never exited
    - `signal: string | null` - null if not terminated by signal
    - `error: Error | void` - void if no error occurred
    - Removed spread operator for exact types

**Helper Types:**

11. **`child_process$Serializable`** - Union type for IPC messages:
    - `string | number | boolean | bigint | {...} | Array<mixed>`
    - Used in send() method signatures

12. **`child_process$SendHandle`** - Type for handle passing:
    - `net$Server | net$Socket`
    - Used for passing server/socket handles to child processes

**References:**
- Node.js child_process module docs: https://nodejs.org/api/child_process.html
- AbortSignal integration: https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback

Changelog: [Internal]
 ---
> Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Confucius Session](https://www.internalfb.com/confucius?host=devvm45708.cln0.facebook.com&port=8086&tab=Chat&session_id=1a3aa26e-e5a9-11f0-8d47-71a4a90f0494&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=1a3aa26e-e5a9-11f0-8d47-71a4a90f0494&tab=Trace)

Reviewed By: vzaidman

Differential Revision: D89944331

fbshipit-source-id: 744ae04051c2214d97269c48c115060f5f30fb1f
2026-01-18 12:52:52 -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
Tommy Nguyen 5c43ed2348 fix(debugger-shell): add missing debug dependency (#55145)
Summary:
Use of `debug` was added in https://github.com/facebook/react-native/issues/54978 but never declared. This causes `react-native config` to fail in pnpm setups.

## Changelog:

[GENERAL] [FIXED] - Fixed missing dependency breaking `react-native config` in pnpm setups

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

Test Plan: `yarn` in `xplat/js` didn't change any files

Reviewed By: cortinico

Differential Revision: D90589051

Pulled By: vzaidman

fbshipit-source-id: b53a46a9b034d385e64a72f85d29e63da02522d7
2026-01-13 07:27:49 -08:00
Vitali Zaidman b45c8202e5 Fix tests and reland "[debugger-shell] add debug statements to debugger shell launching path" (#54978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54978

There's a bug in Node.JS: https://github.com/nodejs/node/issues/51018 where spawning a process on Windows with detached mode and unref will not actually inherit stdio. You need to manually pipe these to get to see stdout and stderr. It works well on MacOS though.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D89765226

fbshipit-source-id: c330df6ed0dbb27b13df89cd2c544a821077dd3f
2026-01-12 10:51:42 -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
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
Pierre Moulon 6587beab88 Fixing typos (#55047)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55047

Changelog: [Internal]

Fixed typos found through comprehensive recursive scan of the react-native-github directory.

**Fixed typos:**
1. "accomodate" → "accommodate" in CHANGELOG-0.6x.md
2. "occured" → "occurred" in LaunchUtils.js
3. "compatability" → "compatibility" in 7 Renderer files
4. "recieved" → "received" in PointerEvent test files (6 instances)
5. "seperated" → "separated" in ImageExample.js

**Total: 16 typo instances fixed across 10 files**

All typos were found by scanning ~3000 text files (excluding dist/third-party/node_modules) using pattern matching for common misspellings.

Reviewed By: javache

Differential Revision: D89799362

fbshipit-source-id: 73e9123dc0bae3c1ce8e374f4752404ab7345347
2026-01-06 03:23:09 -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
Riccardo Cipolleschi 17cba6e1af Back out "add debug statements to debugger shell launching path" (#54977)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54977

## Changelog:
[Internal] - Revert of [add debug statements to debugger shell launching path](https://github.com/facebook/react-native/commit/c00173fdb4bd9f852e8ca1908af46cec500887aa). This is making js tests fail in the OSS CI.

Original Phabricator diff: D88955169

Reviewed By: vzaidman

Differential Revision: D89764623

fbshipit-source-id: 168295c563b0b506a14bc126e2d8249b11cb4b2e
2025-12-24 09:03:00 -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
Vitali Zaidman c00173fdb4 add debug statements to debugger shell launching path (#54929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54929

There's a bug in Node.JS: https://github.com/nodejs/node/issues/51018 where spawning a process on Windows with detached mode and unref will not actually inherit stdio. You need to manually pipe these to get to see stdout and stderr. It works well on MacOS though.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D88955169

fbshipit-source-id: cba661b13d8636d4d52122fe024f876300d4af1f
2025-12-22 08:05:37 -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 18ebab60bc remove ELECTRON_RUN_AS_NODE instead of setting it to empty string (#54853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54853

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D88951056

fbshipit-source-id: 07138ace1a02e3d5ea8ed36736e4288002773378
2025-12-11 12:20:20 -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
Vitali Zaidman 5e81ac92ba make the default debugger-shell spawn command unset ELECTRON_RUN_AS_NODE (#54654)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54654

make the default debugger-shell spawn command unset ELECTRON_RUN_AS_NODE

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D86673603

fbshipit-source-id: 0233468ac516031c0fd5c7ee568962345dc31829
2025-12-10 01:49:36 -08:00
Alex Hunt 064a385273 Fix gitignore paths for debugger-frontend (#54756)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54756

Move blanket `packages/**/dist/` rule added in D77591742 into scoped `.gitignore` for `debugger-shell`.

This was preventing new files added to `packages/debugger-frontend/dist/` from being staged.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D88172611

fbshipit-source-id: 428fffd46f5f76ddf422a41b57e7b47446c40e43
2025-12-02 11:13:53 -08:00
Alex Hunt a1e534a604 Bump packages for next release (#54452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54452

Follows the recent `0.83-stable` branch cut.

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

Reviewed By: cipolleschi

Differential Revision: D86534507

fbshipit-source-id: 47b88dce919857398f41516d03d60259730d2887
2025-11-12 04:22:19 -08:00
generatedunixname1395667395051502 8825ec7464 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83661214

fbshipit-source-id: f1de9dc96d30c46da986f52c6bdb623eeee469dc
2025-10-01 08:54:14 -07:00
Nicola Corti d9a582e949 Bump packages to 0.83.0-main (#54009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54009

Packages haven't been bumped on main ahead of 0.83. This takes care of it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi, huntie

Differential Revision: D83580515

fbshipit-source-id: 7471e77f74e3fb3b4ee6538a49369b5df1393098
2025-10-01 07:13:33 -07:00
generatedunixname1395667395051502 5735bb5955 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83233752

fbshipit-source-id: 4f87b05e552d728314d3c7be1d28267d58b8f19c
2025-09-25 06:17:47 -07:00
Moti Zilberman f599e2a613 Fix custom prebuilt binary handling in unstable_prepareDebuggerShell (#53927)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53927

Changelog: [Internal]

Fixes a bug that broke `unstable_prepareDebuggerShell` (and therefore the RNDT shell) in OSS.

Reviewed By: vzaidman

Differential Revision: D83178777

fbshipit-source-id: cfd93b14e2a94e36d8a3ee9f4605036a4279ef8c
2025-09-25 02:29:11 -07:00
Alex Hunt 88f05b219c Fix build for debugger-shell (#53924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53924

Fix failing `yarn build` runs following D83070252.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83161092

fbshipit-source-id: 3e9e984699750add82794281a387eac0534da60d
2025-09-25 01:22:58 -07:00
Alex Hunt 8027067322 Implement saved window positioning per target (#53910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53910

NOTE: Resubmission of D82236159 — The `electron-store` dependency is now replaced with a local implementation.

As titled. A long awaited quality of life improvement that we can now deliver with our desktop shell.

Window arrangements are saved per [`windowKey`](https://github.com/facebook/react-native/blob/da7bf9c54567aae62ff355b79e66f511cb382065/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js#L193), mapping to each previously opened debugger target.

**Limitations**

- Does not save/restore macOS fullscreen app state.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83070252

fbshipit-source-id: a77f106b6db31571313acd0270b87703e4de049d
2025-09-24 04:59:43 -07:00
Moti Zilberman 18ba21149a Run prebuilt standalone shell directly from fbsource on laptops (#53878)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53878

Changelog: [Internal]

Adds the `prebuiltBinaryPath` option to `unstable_spawnDebuggerShellWithArgs` and `unstable_prepareDebuggerShell`, for advanced integrations that need to change how the React Native DevTools prebuilt binary is distributed.

Reviewed By: huntie

Differential Revision: D82956699

fbshipit-source-id: 30f9c461c7d8f22a553f278bbe42b86742c98da7
2025-09-24 00:22:32 -07:00
generatedunixname1395667395051502 8c2f9e47fa Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D83031681

fbshipit-source-id: 0290d423b758ce42cd9a9c8cccc0f2cf16ad992b
2025-09-23 01:46:27 -07:00
Sam Zhou 5c369aa34c Add annotations to fix future natural inference errors in xplat/js: 6/n (#53894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53894

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D83000736

fbshipit-source-id: 3ba5c59d9b2f7b967c0dccd24a73056430153bdc
2025-09-22 21:55:34 -07:00
generatedunixname1395667395051502 b821bc3aba Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D82813624

fbshipit-source-id: 51fe7a84af2d4f2da7027e1649ec038517f9d561
2025-09-19 04:53:33 -07:00
Moti Zilberman e16b6470e4 Backout D82236159: [RN][debugger-shell] Implement saved window positioning per target (#53816)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53816

Changelog: [Internal]

D82236159 introduced the first `node_modules` dependency in the Electron part of `react-native/debugger-shell`. This is not currently handled correctly by the build script, so this resulted in an instacrashing binary.

I'm temporarily backing out D82236159 until we have a proper fix for the build script.

Reviewed By: robhogan

Differential Revision: D82632937

fbshipit-source-id: 6c7c182e2a7c89e6ea2761096dcc426dbf2ae5cb
2025-09-19 02:38:00 -07:00
Moti Zilberman f4aef39563 Revert D82459089: Update React Native DevTools binaries
Differential Revision:
D82459089

Original commit changeset: 3ccf7a1f07da

Original Phabricator Diff: D82459089

fbshipit-source-id: 9ab8827bfb534e5236c37a8a47206f891741a8e0
2025-09-16 05:33:44 -07:00