Commit Graph

38536 Commits

Author SHA1 Message Date
Alex Hunt 89cb7ea600 Replace remaining uses of chalk (#51906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51906

Replaces `chalk` with Node's `util.styleText` in all remaining files, removing this dependency from our repo.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76273414

fbshipit-source-id: 401f338e55c6f7abb38ee72d45b921f686440663
2025-06-09 18:21:18 -07:00
Alex Hunt 62bf92c896 Replace chalk in packages (#51905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51905

Replaces `chalk` with Node's `util.styleText` in `packages/`.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76273412

fbshipit-source-id: edaea5896751be1252056e0858daae46e97acc46
2025-06-09 18:21:18 -07:00
Alex Hunt 26c042724c Replace chalk in build scripts (#51904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51904

Replaces `chalk` with Node's `util.styleText` in `scripts/build/` and `scripts/build-types/`.

Will follow up with replacing across the entire repo at a later point.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76037191

fbshipit-source-id: c28352853f22d455a709f4b752f566626e6fb3fe
2025-06-09 18:21:18 -07:00
Sam Zhou e4619a41d1 Add annotations or make things readonly to prepare for object literal soundness fix in xplat/js: 1/n (#51912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51912

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D76292113

fbshipit-source-id: facaf3e503b69ba41df7842b0e92b7094c271874
2025-06-09 17:01:49 -07:00
Arushi Kesarwani 6104ccdc6e Correct the excludePlatforms logic in combining schema step of Codegen (#51910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51910

**Changelog:**
[Android] [Fixed] - Fix combining schema in Codegen process to exclude platforms correctly

Discovered an issue with how we are excluding platforms in processing codegen schema.

`excludedPlatforms` is a field on `OptionsShape` part of `ComponentShape` not Module

https://www.internalfb.com/code/fbsource/[153d78d4cd5d0fa652e5a0919bcdb26f32d0945e]/xplat/js/react-native-github/packages/react-native-codegen/src/CodegenSchema.js?lines=112

Hence for components modifying the script to iterate over component and for then exclude accordingly based on `platform`.

Reviewed By: cipolleschi

Differential Revision: D76158851

fbshipit-source-id: 791ec12d068794e36f34da7419082887483ce6c5
2025-06-09 16:13:46 -07:00
Samuel Susla 84f9e48331 Fix a crash in View Culling coming from unflattening/flattening algorith (#51907)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51907

changelog: [internal]

fixes a crash that is described by the two tests. The two tests cover both changes made to Differentiator.cpp. If you revert either of the change, a test will crash.

Reviewed By: christophpurrer

Differential Revision: D76231984

fbshipit-source-id: c32ab1851844121095f1dec953befb2e77c83fd4
2025-06-09 14:26:42 -07:00
David Vacca 38a4b62211 Raise loglevel for assertion of LegacyArchitecture classes (#51875)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51875

This diff raises the logLevel of assertion LegacyArchitecture classes when minimizing of legacy architecture is enabled

Reviewed By: rshest

Differential Revision: D76080325

fbshipit-source-id: 75c92ba7fc54cfbc76bbc2fa3c3dc6a72a376c8f
2025-06-09 12:21:36 -07:00
David Vacca 0d1cde7f36 Raise logLevel of LegacyArchitecture classes when minimizing of legacy architecture is enabled (#51876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51876

This diff raises the logLevel of LegacyArchitecture classes when minimizing of legacy architecture is enabled

Reviewed By: cortinico

Differential Revision: D76080324

fbshipit-source-id: 3764c0657b912db81e0dc46b6eb57cbb02b335ba
2025-06-09 12:21:36 -07:00
Andrew Datsenko 6da3b18487 Add third-party deps (#51897)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51897

Changelog: [Internal]
Add third-party deps for fantom_tester build.

Reviewed By: christophpurrer

Differential Revision: D76259630

fbshipit-source-id: 600c05887d4a1055a676ec6a379efe33b65171e2
2025-06-09 10:19:02 -07:00
Ritesh Shukla a889e1d083 Fix Nightly Builds (#51901)
Summary:
I noticed on discord that the nightlies build are failing. I saw that it is due to node mismatch.
https://github.com/facebook/react-native/actions/runs/15526730404/job/43707812613
## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL][FIXED] Add Setup node on Nightly pipelines

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

Test Plan:
I would rely on CI here. Tested on my fork .
Without my change:- https://github.com/riteshshukla04/react-native/actions/runs/15538071698/job/43741907499
With My change :- https://github.com/riteshshukla04/react-native/actions/runs/15538160788/job/43742194561

Reviewed By: cipolleschi

Differential Revision: D76270096

Pulled By: cortinico

fbshipit-source-id: 666c2cc22e243927eb61b77cfe802222835718b3
2025-06-09 09:43:39 -07:00
Mateo Guzmán 8d76670cd5 Migrate ReactPackageTurboModuleManagerDelegate to Kotlin (#51855)
Summary:
Migrate com.facebook.react.ReactPackageTurboModuleManagerDelegate to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.ReactPackageTurboModuleManagerDelegate to Kotlin

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: fabriziocucci

Differential Revision: D76116517

Pulled By: cortinico

fbshipit-source-id: 76dc4f7e16736a54be2bbfc1e2fa2e64b1433739
2025-06-09 09:13:20 -07:00
Nicola Corti f33fdca876 Convert and internalize MountingManager (#51872)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51872

This converts to Kotlin and internaline MountingManager.

The only usage in OSS is react-natve-live-markdown:
https://github.com/Expensify/react-native-live-markdown/issues/693
They're using reflection to access Mounting Manager, which they shouldn't.

Other than them, I wasn't able to find meaningful usages of `MountingManager`

Changelog:
[Android] [Breaking] - Convert to Kotlin and internalize MountingManager

Reviewed By: rshest

Differential Revision: D76126338

fbshipit-source-id: 5ab491f86d697a82b8e5b02b031877020dfa3e9e
2025-06-09 08:44:02 -07:00
Christoph Purrer a67d2c5e44 Remove unused LegacyModuleProviderDelegate from TurboModuleManager.h (#51882)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51882

changelog: [internal]

Reviewed By: javache

Differential Revision: D76159770

fbshipit-source-id: dd64a7bb7c1fa3ded0e293985f5c087ba7d78dff
2025-06-09 08:30:20 -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
Pieter De Baets 85498ad46f Remove unnecessary receiveCommand overrides (#51844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51844

These just redefine the existing `receiveCommand` from the ViewManagerDelegate which already has this codegen'ed

Changelog: [Internal]

Reviewed By: cortinico, rshest

Differential Revision: D75869325

fbshipit-source-id: c8ba482075c2586caf33f46a871b5b5e16fda213
2025-06-09 05:49:45 -07:00
Samuel Susla 5d76fe662a preventing future build failures (#51890)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51890

changelog: [internal]

Fixing possible build failures when targets are built in different context:
- Adding includes to used std functions.
- Using explicit jsi namespace.
- Declaring dependency.

Reviewed By: javache

Differential Revision: D74878821

fbshipit-source-id: 9dfd7ba94651280331be6c9fe6948fce50955589
2025-06-09 03:43:13 -07:00
Pratyush Kongalla 90b64a4d50 Updated description of Maestro E2E Android (#51887)
Summary:
Minor Typo correction.

## Changelog:
[INTERNAL][FIXED] updated description of Maestro E2E Android.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan: NA

Reviewed By: cipolleschi

Differential Revision: D76253803

Pulled By: cortinico

fbshipit-source-id: 16e8b793de4f7bb4eba03f20e09c3cf3d05115b9
2025-06-09 03:32:53 -07:00
Kacper Kafara 65aa819811 Fix new codegen API disabling behaviour of the old one (#51867)
Summary:
Hey, I'm bumping `react-native-screens` to 0.80.0-rc.4 right now & noticed that codegen does not work as expected. It crawls whole library, file by file (when working on a library it also includes nodemodules etc), despite `componentProvider` field being defined in `codegenConfig` in `package.json`.

Namely https://github.com/facebook/react-native/issues/49941 introduced a regression for libraries that stick to the old codegen config format due to compatibility reasons. Take a look at [this code](https://github.com/facebook/react-native/blob/78caa07ff867255724e4b0ce3557ff5793b6ce1b/packages/react-native/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js#L60-L103). We first do a pass for "old API", [removing libraries with `componentProvider` in their codegen config from `librariesToCrawl`](https://github.com/facebook/react-native/blob/78caa07ff867255724e4b0ce3557ff5793b6ce1b/packages/react-native/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js#L66-L75), just to later [add **ALL** libraries](https://github.com/facebook/react-native/blob/78caa07ff867255724e4b0ce3557ff5793b6ce1b/packages/react-native/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js#L86-L89) that do not support new codegen config format back again to `librariesToCrawl`.

This PR improves the filtering condition, to parse codegen annotations only for libraries that have defined any of the fields from the new config format (opted in for new system).

I want to emphasise that this is a significant regression, because it ruins experience of library maintenance, vastly increasing pods installation time.

## Changelog:

[IOS] [FIXED] - Fix codegen crawling all library code with `componentProvider` defined in config

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan:
1. Setup an application with any third party library, that uses "old" codegen config format, e.g. `react-native-screens@4.11.1`
2. `cd ios && bundle exec pod install`
3. Observe the codegen logs - it crawles the library instead of using provided information.

Reviewed By: cortinico

Differential Revision: D76126649

Pulled By: cipolleschi

fbshipit-source-id: 6f9c9dffcdca7204a78b4b55db10249240146141
2025-06-09 02:36:06 -07:00
Pieter De Baets 198c6fc81c Make receiveCommand args non-nullable (#51806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51806

Correct the type of args, which is always non-null. This is backwards-compatible as subclasses can override this method with a more permissive nullable type and still be substitutable.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75869317

fbshipit-source-id: 8f6c9119140794447eca55be24483a35450d7bb6
2025-06-06 22:07:09 -07:00
Christoph Purrer 2c32bfa758 ReactCxxPlatform > apply clang tidy settings (#51828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51828

changelog: [internal]

Reviewed By: rshest

Differential Revision: D75990891

fbshipit-source-id: ea86ebd90c7b44d26d2d0287eeca8b27aec0aff5
2025-06-06 20:13:08 -07:00
Samuel Susla c7cc125563 fix props merging for Android (#51877)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51877

changelog: [internal]

handle rawProps manually until props 2.0 is finished.

Reviewed By: rubennorte, zeyap

Differential Revision: D76127899

fbshipit-source-id: 42b18bb7eec401ca1289ed042c06839fd09c184d
2025-06-06 13:17:43 -07:00
generatedunixname89002005287564 a8db9c2f2e Fix CQS signal modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager (#51879)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51879

Reviewed By: dtolnay

Differential Revision: D76127542

fbshipit-source-id: 332c936dcd26c1659762069f503ec2e835073ea5
2025-06-06 13:14:12 -07:00
Alex Hunt ae40886a0d Fix misaligned Node versions in CI (#51874)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51874

Follows D76037015 (and replaces D76129390, accidentally in the Metro repo 😅). Unfortunately, didn't seem to be caught in PR signals.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D76133641

fbshipit-source-id: c5e6204dc6ea8d317dc94395430c6b07cf660a0b
2025-06-06 10:39:27 -07:00
Luna Wei c5b6716311 Reland IntersectionObserver root with fixes (#51818)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51818

Changelog: [General][Added] - Reland IntersectionObserver support for `root` with fixes for viewport offsets

Reviewed By: rubennorte, mdvacca

Differential Revision: D75641008

fbshipit-source-id: 9f4b2576a443fddfec976835627e4228f82d1935
2025-06-06 09:58:30 -07:00
Luna Wei b5c62f52d1 Support root offsets for Fantom and getBoundingClientRect (#51817)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51817

Changelog:
[General][Fixed] - Support viewport offsets for Fantom root and fix `getBoundingClientRect` to respect viewport offsets

Reviewed By: rubennorte

Differential Revision: D75632540

fbshipit-source-id: a3989f1470156dd6be83ad7b03de8cb4de1a56ac
2025-06-06 09:58:30 -07:00
Riccardo Cipolleschi ac8d677cb4 Fix E2E tests for Android (both ci and release testing) (#51873)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51873

After [51865](https://github.com/facebook/react-native/pull/51865), the path were the apk are generated changed. That broke the e2E tests in ci and the local script to test E2E, because the artefacts were not uploaded to CI properly.

This change should fix it

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76133191

fbshipit-source-id: 70d8567dee8dc2a8bcc656cca7e94ad19101fe28
2025-06-06 08:55:11 -07:00
Nicola Corti 829b719526 Back out "Override updateRuntimeShadowNodeReferencesOnCommit for OSS" (#51839)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51839

Original commit changeset: 4394a2370d9e

Original Phabricator Diff: D73771648

Changelog:
[Internal] -

Reviewed By: lenaic, sammy-SC

Differential Revision: D76038710

fbshipit-source-id: b4d61bef476e8b903432511939cce65e881689c5
2025-06-06 06:58:11 -07:00
Riccardo Cipolleschi 08f16eef67 Integrate the cli script with the compose-xcframework task (#51850)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51850

This change refactors the last compose-xcframework step to intgrate with the cli.js script to coordinate the build process.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046443

fbshipit-source-id: 4740bb0869c688611a03d5085771aa6222132e7e
2025-06-06 06:43:33 -07:00
Riccardo Cipolleschi bd2855b056 Integrate the cli script with the build script (#51845)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51845

This change refactors the build step of SwiftPM to use the cli.js script to coordinate it.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046444

fbshipit-source-id: 7aa4ba55e46c2e4502687f035ba1e7bf772b3079
2025-06-06 06:43:33 -07:00
Riccardo Cipolleschi 6435dec161 Extract setup in a separate file (#51848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51848

This change refactors the script by moving the step to setup the repo properly in a separate `setup.js` file.

This allows to simplify the main script by using the cli task.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046441

fbshipit-source-id: 1da6f8dabf75640e455fcb2f543164c6a242abe0
2025-06-06 06:43:33 -07:00
Riccardo Cipolleschi 818c3d1b58 Improve logging for reactNativeDependencies (#51849)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51849

This simple change refactors the code of reactNativeDependencies to have more accurate logging when the step fails in CI

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046440

fbshipit-source-id: 2a1105285b0b1d5208a99c30d6ec2859bb8a0187
2025-06-06 06:43:33 -07:00
Riccardo Cipolleschi b2ec9b2056 Add cli script to properly hande input params to build with SPM (#51846)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51846

This change introduces a cli script to simplify handling of tasks when building React Native with Swift PM

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76045574

fbshipit-source-id: 334d0502e781710f3744d9a3585ccfe7f2fa0038
2025-06-06 06:43:33 -07:00
Riccardo Cipolleschi 6b287c0f2f Add Types to simplify the SPM build process (#51847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51847

This change introduces a types.js to add some useful flow types to build React Native with Swift PM.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76045454

fbshipit-source-id: 352e9f1a2845106c49461c3ac66188f49b520eb3
2025-06-06 06:43:33 -07:00
Christian Falch 55534f518a build xcframeworks from prebuild script (#51596)
Summary:
This commit adds support for building XCFrameworks from the prebuild-script

- Added build script to help build xcframeworks
- Added full header file structure
- Added calling the build script from the main prebuild script

TODO: We need to add resources / privacy bundles

## Changelog:

[IOS] [ADDED] - Added building XCFframework from the prebuild script

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

Test Plan: Run prebuild script and verify that XCFrameworks are successfully built.

Reviewed By: cortinico

Differential Revision: D75869879

Pulled By: cipolleschi

fbshipit-source-id: 7da1dfe2bea34966b88bdb0c31bf7c6ada420c57
2025-06-06 06:43:33 -07:00
Christian Falch 3c01b1b6f0 build swift package from prebuild script (#51595)
Summary:
This commit adds building the swift package from the prebuild script:

- Added swiftpackage.js for building the swift package
- Added calling building from the main script
- Added configurable build type from the main script.
- Removed params in jsdoc from the link method

## Changelog:

[IOS] [ADDED] - Added building swift package from the prebuild script

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

Test Plan:
Run prebuild script and verify that the Swift package is successfully built.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D75865275

Pulled By: cipolleschi

fbshipit-source-id: d4d9f26c817eb15c16f6be52ffa4b9f060e789da
2025-06-06 06:43:33 -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
Nicola Corti 0d4c326dd3 Remove reactnative_unittest target and setup (#51866)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51866

We're not really running those tests in OSS. They would require an emulator in OSS CI which
is costly and flaky. I'd rather remove the build logic for them and rely on Fantom for those kind
of tests in the future.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D76050039

fbshipit-source-id: 29789a9c7db5c7108c4536db620d83640819874f
2025-06-06 05:10:04 -07:00
Nicola Corti be113b4406 Stop building JSC inside RN-Tester (#51865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51865

As in 0.81 we're stopping 1st party support for JSC, we can now cleanup the RNTester
flavor for JSC and simplify the setup here.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D76051319

fbshipit-source-id: 79b01cc64af2466a0be47ceaa0cd211cb6b02f53
2025-06-06 04:54:44 -07:00
Nicola Corti 4f9090bc57 Bump AGP to 8.10.x (#51854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51854

AGP 8.10.x comes with a source breaking change:
https://issuetracker.google.com/issues/416890061

This shoudl fix it and unblock us for the 0.81 release.

Changelog:
[Android] [Changed] - Bump AGP to 8.10.x

Reviewed By: huntie

Differential Revision: D76053989

fbshipit-source-id: b0fe19544c79d65002127176f2722cdfd85f0a3c
2025-06-06 04:48:02 -07:00
Jakub Piasecki 17466a07a5 Rename local symbols exported by default before generating the snapshot (#51864)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51864

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76109534

fbshipit-source-id: d1b5d6016d16dab36c1872e85e8a1efcb2c89c7c
2025-06-06 03:54:43 -07:00
Leevi Aattola 7681036537 fix: exclusion of selectively disabled libraries from codegen generation (#51838)
Summary:
PR https://github.com/facebook/react-native/issues/51078 Implemented finding disabled libraries but the code (below) didn't actually filter any libraries out because destructured name is `undefined`. This pr adds the name to codegenEnabledLibraries so filtering would work.

```js
const libraries = codegenEnabledLibraries.filter(
  ({name}) => !disabledLibraries.includes(name),
);
```

## Changelog:

[IOS] [FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js

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

Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (for example: react-native-safe-area-context and react-native-screens or see [reproducer](https://github.com/aattola/rn-codegen-exclude))
2. Exclude library with react-native.config.js
3. install pods / run codegen
4. Check that codegen actually excluded the specified dependencies from: `ios/build/generated/ios/RCTThirdPartyComponentsProvider.mm`

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76044622

Pulled By: cipolleschi

fbshipit-source-id: 9e70c2a263c750edb1ea95305c9e5e178e2ce8d8
2025-06-06 03:32:19 -07:00
Douglas Lowder 1ab8117bcb build (Android): allow for additional sdkmanager paths (#51829)
Summary:
When building Android in cloud environments, it turns out that in some of the environments, `sdkmanager` is not in any of the paths checked in `packages/react-native/ReactAndroid/hermes-engine/build.gradle.kts`, so the build fails.

I have added the path for the Linux cloud build environments I have been using (EAS).

I have also added the ability to insert a custom value for the path, in case this problem occurs again in future.

## Changelog:

[Internal][Fixed] - Allow more sdkmanager paths in hermes-engine Android build.

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

Test Plan: Tested the changes in CI builds in EAS.

Reviewed By: rshest

Differential Revision: D76117000

Pulled By: cortinico

fbshipit-source-id: 2c8aff1ba4f03dbe77935992a774ed71f85264a3
2025-06-06 03:24:06 -07:00
Jakub Piasecki 4dcf76afe6 Update how native specs are reexported (#51799)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51799

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75945486

fbshipit-source-id: 9477898fa4a31bfcf2f022e73cfaed9d55b4b090
2025-06-06 03:19:30 -07:00
Jakub Romanczyk a9007ea586 feat: process HMR registerBundle calls from same origin only (#51821)
Summary:
Part of https://github.com/facebook/metro/issues/1480

This PR adds a check in `HMRClient.js` that prevents processing `registerBundle` calls coming from different origin than the one declared in HMR `setup()`.

This is useful in a Module Federation setup, where we have multiple HMRClients present in runtime - when Host loads external remote, the requestURL will have different origin, but it will be processed by the HMRClient from the Host which in turn causes a runtime error.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL] [ADDED] - Process HMR registerBundle calls from the same origin only

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

Test Plan: TBD

Reviewed By: christophpurrer

Differential Revision: D76044353

Pulled By: huntie

fbshipit-source-id: 3928347b1e9a90355d02b87b07fde812479bcb67
2025-06-06 02:54:04 -07:00
Alex Hunt e17eab4947 Add docs for build-types (#51852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51852

- Add README for `yarn build-types`.
- Populate command `--help` output.

Changelog: [Internal]

Reviewed By: coado

Differential Revision: D72168391

fbshipit-source-id: d822333d6013bd2ada244e45589f6424191a69d5
2025-06-06 01:14:43 -07:00
Alex Hunt 9616a83c8b Rename --validate arg on yarn build (#51834)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51834

Aligning with incoming flag on `yarn build-types`.

Changelog: [Internal]

Reviewed By: coado

Differential Revision: D76034414

fbshipit-source-id: 726858145811227efe23bc2f8344dceeb69944b2
2025-06-06 01:14:43 -07:00
Jakub Piasecki 78caa07ff8 WIP [RN][JS Stable API] Verify built types in Github CI (#51808)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51808

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

## This diff
Generates types via `yarn build-types` and verifies them on the basis of react-native/types/__typetests.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71902007

fbshipit-source-id: 43cb2321e9feea11b0caa4362140c86b1847db85
2025-06-06 00:29:36 -07:00
Jakub Piasecki 8d1bcd8aeb Update Typescript version (#51831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51831

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76018604

fbshipit-source-id: b16be849d155d608306a8778cea540f0096a66b0
2025-06-06 00:29:36 -07:00
Tim Yung 79d2e2a365 RN: Fix Lint for FocusEventsExample.android.js (#51857)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51857

Fixes lint warnings for `FocusEventsExample.android.js`.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D76074712

fbshipit-source-id: 10af22f75f03462af35a4fe5e592f8bc8bdc0ca8
2025-06-05 16:18:35 -07:00
Tim Yung 0411c43b3a RN: Patch enableEagerAlternateStateNodeCleanup into Renderers (OSS) (#51856)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51856

Enables the `enableEagerAlternateStateNodeCleanup` feature flag in the open source React Native renderers that are currently targeting React 19.1, by manually patching them in the React Native repository.

This feature flag has been found to significantly improve memory management of parent alternate fibers in persistent modes (i.e. Fabric), and we want this to be available to open source users of React Native before the next scheduled public version release of React.

For more details about the fix, see: https://github.com/facebook/react/pull/33161

Changelog:
[General][Changed] - Reduces memory usage, by improving memory management of parent alternate fibers. (Previously, a parent fiber might retain memory associated with shadow nodes from a previous commit.)

Reviewed By: rickhanlonii

Differential Revision: D76073900

fbshipit-source-id: 6779ea0862d4a1e25354b12ef3d1363dc12d26cc
2025-06-05 15:19:06 -07:00