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
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49122
This change updates the Release testing and the release scripts by removing any reference to CircleCI
## Changelog:
[Internal] - Remove CircleCI references from Release and Release testing scripts
Reviewed By: cortinico, huntie
Differential Revision: D69047479
fbshipit-source-id: 14a394b879c03cd81a8d043036c43839a38602c7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48691
We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D68206014
fbshipit-source-id: f05eeae3997d52df1127852e03437a387a01f5ad
Summary:
With the recent changes to the CI, we need to update the test-e2e-local to work with the new artifacts
## Changelog:
[Internal] - Update local-e2e-test to run with the new Android Artifacts
Pull Request resolved: https://github.com/facebook/react-native/pull/45499
Test Plan: Tested locally.
Reviewed By: blakef
Differential Revision: D59902087
Pulled By: cipolleschi
fbshipit-source-id: 84ef78e8dba222bf8a9e3620632fb2a9d286d42b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45184
This is a follow-up to D59055522.
> NOTE:This diff will be followed up by a merge of the set-rn-version script into set-version. (I had considered a rename to version-rn-artifacts, intentionally keeping this script separate and distinct from a future [lerna version + this script] setup — however the current UX and confusion with this naming would be too confusing. It can move into a util 👍🏻.)
- Rename `set-rn-version` to `set-rn-artifacts-version` (more accurate).
- Mark this script as deprecated.
- For now, there are too many references to this script in CI test jobs to refactor away this entry point, so I am avoiding this — these should later be standardised to `set-version`.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D59058085
fbshipit-source-id: 4123ac73b5c7a2e07a1d1b6da61e0ad94fc31f84
Summary:
With the migration to GHA, we are updating the testing scripts to work with the new CI.
There are a bit of shenanigans due to:
* How GHA archives artifacts => they are all `.zip` files, so I had to play around with unzipping them
* GHA seems to create a different commit, like if it is forking the repo instead of using it. I think that it is how the checkout action works. *Note:* this might be a problem for the `Create React Native Release` workflow because it has to commit on the stable branch!
* Android is building only the simulator architecture when running from regular CI. The app is not configured to run only on that, so the RNTestProject was a failing because it was trying to build all the available architectures. It is an easy fix in the user project space when release testing.
## Changelog:
[Internal] - Update the testing script to work with the new CI
Pull Request resolved: https://github.com/facebook/react-native/pull/44923
Test Plan:
Tested locally.
* [iOS] RNTester - Hermes ✅
* [iOS] RNTester - JSC ✅
* [Android] RNTester - Hermes ✅
* [Android] RNTester - JSC ✅
* [iOS] RNTestProject - Hermes ✅ (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [iOS] RNTestProject - JSC ✅ (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [Android] RNTester - Hermes ✅ (Needed to build only the simulator architecture)
* [Android] RNTester - JSC ✅ (Needed to build only the simulator architecture)
Reviewed By: andrewdacenko
Differential Revision: D58528432
Pulled By: cipolleschi
fbshipit-source-id: 733065de4c532b13d8e95e2217f9aafd5a2ef8a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44088
This is a power user option for Release Crew members when testing locally — a flag to bypass being blocked on the latest in-progress CircleCI job and instead fetch build artifacts from the most recent successful pipeline (typically `HEAD~1`).
Example use cases where the latest pushed commit isn't impactful:
- An iOS-only fix, meaning Android can be tested now.
- A trivial fix that applies to CI only (e.g. RNTester Podfile.lock update).
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D56138727
fbshipit-source-id: f9884bdb289a92486807e8e033b756466fcec559