Compare commits

...
Author SHA1 Message Date
Christian Falch bf2b0fde64 [ios][precompile] Use correct version of jsi.cpp
When building the xcframeworks on iOS we're including the file `jsi/jsi.cpp` in the Swift Package. This file is also included in Hermes and React Native should use the hermes version of these symbols. This is even described (but overlooked) in the React-jsi podspec file.

This causes the error seen in the bug addressed by this commit.

The fix is to exclude the `jsi/jsi.cpp` file from the jsi target in our swift package.

#Fixes 53257
2025-08-14 11:14:36 +02:00
Vitali ZaidmanandFacebook GitHub Bot 856f52a6f0 Update debugger-frontend from 9215667...e87564a (#53256)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53256

Changelog: [Internal] - Update `react-native/debugger-frontend` from 9215667...e87564a

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/921566790e9e16d0ecace6e49b3cfaace205958c...e87564a24cf233c60aaebee8c418ec85724f7214).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [e87564a24](https://github.com/facebook/react-native-devtools-frontend/commit/e87564a24) | Vitali Zaidman (vzaidman@gmail.com) | 2025-08-06T12:11:08+01:00 | [prevent stack trace entries in console UI from being inline so a new line is always added between them and other printed elements (#198)](https://github.com/facebook/react-native-devtools-frontend/commit/e87564a24) |

Reviewed By: robhogan

Differential Revision: D80181542

fbshipit-source-id: 517425504251441703b9b96fdeb6956f4db7d53b
2025-08-14 01:44:22 -07:00
Devan BuggayandFacebook GitHub Bot 22a4f79224 Fix LogBox dealloc crashing Mac Catalyst (#53259)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53259

delegate.window is not supported in Mac Catalyst, causing a crash in various scenarios such as Metro refresh.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D80189486

fbshipit-source-id: d0e8156f8f95769c114b497f53731876478fb1f4
2025-08-13 21:56:03 -07:00
Sam ZhouandFacebook GitHub Bot 94d260ee6a Unbreak RN CI (#53261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53261

Replace type annotation with comment syntax

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D80231004

fbshipit-source-id: a863091bec8b5521bc998b57ef08d892823238e6
2025-08-13 20:53:12 -07:00
Sam ZhouandFacebook GitHub Bot 35bee1a857 Add annotations to fix future natural inference errors in xplat/js
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D80207164

fbshipit-source-id: e9a786c83f89a97db8b383812767978c47d9536c
2025-08-13 18:15:27 -07:00
Zeya PengandFacebook GitHub Bot dd0008fee9 test all props FlatList inherited from ScrollView & are propagated to mounting layer (#53187)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53187

## Changelog:

[Internal] [Changed] - test all props FlatList inherited from ScrollView & are propagated to mounting layer

Reviewed By: rshest

Differential Revision: D79917024

fbshipit-source-id: c248f629f27b224e70a588cfb491cd17618594de
2025-08-13 17:36:06 -07:00
Zeya PengandFacebook GitHub Bot 81abd306bb test FlatList props: data, renderItem, horizontal, inverted, scrollEnabled (#53186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53186

## Changelog:

[Internal] [Changed] - test FlatList props: data, renderItem, horizontal, inverted, scrollEnabled

uncovered one bug in `getDebugProps()`

Reviewed By: rshest

Differential Revision: D79895309

fbshipit-source-id: 0644cf9877620a7787ee085a8e934f462e5de3ef
2025-08-13 17:36:06 -07:00
Mateo GuzmánandFacebook GitHub Bot 4340dcbae8 Migrate YogaValue to Kotlin
Summary:
Migrate com.facebook.yoga.YogaValue to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1838

Reviewed By: rshest

Differential Revision: D79897668

Pulled By: cortinico

fbshipit-source-id: dffe2b29087c35e4797f46dea756c51f841590d8
2025-08-13 16:45:06 -07:00
Luna WeiandFacebook GitHub Bot 3d12d81126 VirtualViewExperimental - opt out of update if no rect changes (#53255)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53255

Avoid updates to VirtualViewContainer if the rect dimensions haven't changed.

This is an attempt to simulate what ReactVirtualView does with `checkRectChange`.

Changelog:
[Internal]

Reviewed By: yungsters

Differential Revision: D80182750

fbshipit-source-id: f0f45ac508c1f93e6dbb64ea11c0b44b80d6c3b3
2025-08-13 15:45:52 -07:00
Christoph PurrerandFacebook GitHub Bot b75031f3dd Add WebSocketClient implementation for ReactCxxPlatform (#53233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53233

Changelog: [Internal]

This is needed for RN Fantom

Reviewed By: rshest

Differential Revision: D80115098

fbshipit-source-id: 03036dda311527ac27d12656d9b92c609e0b9ee2
2025-08-13 14:43:43 -07:00
Rubén NorteandFacebook GitHub Bot d009a02c6c Add benchmark to compare rendering times for View and ViewNativeComponent (#53248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53248

Changelog: [internal]

This adds a new benchmark that compares the rendering time (only rendering, not committing, mounting, effects, etc.) of `<View>` and `<ViewNativeComponent>`.

Baseline:

| (index) | Task name                                | Latency avg (ns)  | Latency med (ns)   | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | ---------------------------------------- | ----------------- | ------------------ | ---------------------- | ---------------------- | ------- |
| 0       | 'render 100 views (Noop)'                | '333036 ± 0.39%'  | '328452 ± 2393.0'  | '3019 ± 0.18%'         | '3045 ± 22'            | 3003    |
| 1       | 'render 100 views (ViewNativeComponent)' | '1335974 ± 3.45%' | '1228468 ± 7541.5' | '797 ± 0.71%'          | '814 ± 5'              | 1000    |
| 2       | 'render 100 views (View)'                | '2296988 ± 1.60%' | '2170821 ± 12374'  | '449 ± 0.74%'          | '461 ± 3'              | 1000    |

This shows that **`<View>` currently has an overhead of 75% in rendering time**.

I've also tested a modification of `View` such as:

```
component View(...props: ViewProps) {
  return {
    // This tag allows us to uniquely identify this as a React Element
    $$typeof: REACT_ELEMENT_TYPE,
    // Built-in properties that belong on the element
    type: ViewNativeComponent,
    key: undefined,
    // $FlowExpectedError[prop-missing]
    ref: props.ref,
    props,
  };
}
```

This makes `View` basically a no-op component, and the benchmark after this looks like:

| (index) | Task name                                | Latency avg (ns)  | Latency med (ns)  | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | ---------------------------------------- | ----------------- | ----------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'render 100 views (View)'                | '1743010 ± 2.25%' | '1630816 ± 10616' | '600 ± 0.74%'          | '613 ± 4'              | 1000    |
| 1       | 'render 100 views (ViewNativeComponent)' | '1370699 ± 4.04%' | '1242284 ± 14172' | '789 ± 0.74%'          | '805 ± 9'              | 1000    |

This shows that `View`, just for existing as a wrapper component, has an overhead of 31% in rendering time, which means that **the opportunities to reduce the overhead beyond what we already did are limited**.

Reviewed By: rshest

Differential Revision: D80169514

fbshipit-source-id: aa2a1fc3f9d0ee3a60c03dd32555802fa7265251
2025-08-13 10:14:21 -07:00
Rubén NorteandFacebook GitHub Bot e8bf982bac Support overriddenDuration in Fantom benchmarks (#53250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53250

Changelog: [internal]

This updates the types for Fantom benchmarks to support the new `overriddenDuration` option from `tinybench`.

It also exposes a new method in the benchmark namespace to access the same timestamp used in benchmarks.

Reviewed By: rshest

Differential Revision: D80169515

fbshipit-source-id: 59af197eababbf5b8544ee9f1862b206756dc87d
2025-08-13 10:14:21 -07:00
Rubén NorteandFacebook GitHub Bot c17267ec87 Upgrade tinybench to v4.1.0 (#53249)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53249

Changelog: [internal]

This just upgrades tinybench (used in Fantom benchmarks) to v4.1.0, which contains a feature we need to customize test durations.

Reviewed By: rshest

Differential Revision: D80169516

fbshipit-source-id: 5813b3050843b52d604619a44a5e097e26f54432
2025-08-13 10:14:21 -07:00
SimekandFacebook GitHub Bot 50d5316b1b Workspace: align eslint-plugin-jest with Jest version (#53246)
Summary:
While verifying the lock deduplication changes, I have spotted that `eslint-plugin-jest` package does not match Jest version used within the workspace.

## Changelog:

[INTERNAL][CHANGED] - update `eslint-plugin-jest` package in workspace to align with Jest version used

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

Test Plan: Running `yarn test`, `yarn lint-ci` and `test-typescript` checks does not yield any errors.

Reviewed By: rshest, cortinico

Differential Revision: D80170591

Pulled By: robhogan

fbshipit-source-id: f3ac58bc26cf2d3a34899f8558f872b3df85942d
2025-08-13 09:36:21 -07:00
Mateo GuzmánandFacebook GitHub Bot bc54a06fcb Migrate YogaNative to Kotlin
Summary:
Migrate com.facebook.yoga.YogaNative to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1839

Reviewed By: rshest

Differential Revision: D79897725

Pulled By: cortinico

fbshipit-source-id: 6fc98565368d831b8698464fe26ad47f8fff6a74
2025-08-13 08:56:03 -07:00
riteshshukla04andFacebook GitHub Bot c5956da8c0 Fix: Setting maxLength to 0 in TextInput still allows typing on iOS (#52890)
Summary:
Trying to fix https://github.com/facebook/react-native/issues/52860
## 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
-->
[IOS][FIXED] Setting maxLength to 0 in TextInput still allows typing on iOS

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

Test Plan:
https://github.com/user-attachments/assets/56549e0f-6bbf-461e-815c-794abdee2018

Tested on Android too

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D80095701

Pulled By: cipolleschi

fbshipit-source-id: 5e76f88798e32097e6a619c44ff6240b4f01fc6f
2025-08-13 07:23:30 -07:00
Samuel SuslaandFacebook GitHub Bot 568f59e5b1 use trace section in C++ Animated instead of perfetto (#53223)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53223

changelog: [internal]

remove dependency on perfetto and use TraceSection like we do elsewhere.

Reviewed By: zeyap, rubennorte

Differential Revision: D80087082

fbshipit-source-id: 08d3434985443db9a83189a4dfabc65d6eda8166
2025-08-13 06:52:16 -07:00
Mateo GuzmánandFacebook GitHub Bot 33ca53d9db Migrate YogaConfigFactory to Kotlin
Summary:
Migrate com.facebook.yoga.YogaConfigFactory to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1833

Reviewed By: rshest

Differential Revision: D79897762

Pulled By: cortinico

fbshipit-source-id: 9457b307204f2066a02690f96a88fce6755f915e
2025-08-13 06:46:48 -07:00
Philip HeinserandFacebook GitHub Bot 91e69b5d4c fix crashes on non-UTF8 Info.plist files under local frameworks (#52336)
Summary:
fix: https://github.com/facebook/react-native/issues/52279

## Changelog:

[iOS] [FIXED] - non-UTF8 crashes Info.plist local frameworks

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

Test Plan:
after this change pods install and are working with the new warning:
[!] Failed to read Info.plist at /Users/user/apps/test/ios/promiflash/Frameworks/YouTubeEmbeddedPlayerFramework.framework/Info.plist: invalid byte sequence in UTF-8

Reviewed By: cortinico

Differential Revision: D80096932

Pulled By: cipolleschi

fbshipit-source-id: f60cd67cb99a581d6fbab92422c1adf7b50066eb
2025-08-13 02:51:10 -07:00
Christoph PurrerandFacebook GitHub Bot 9f0d24bb05 Enforce void return type for void return type in JS C++ TM spec (#53214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53214

Changelog: [General] [Fixed] Enforce void return type for void return type in JS C++ TM spec

Example if you have this spec
```
export interface Spec extends TurboModule {
  +foo: (bar: string) => void;
}
```
We must enforce in C++ that the return type is `void` as e.g.
```
  void foo(jsi::Runtime& rt, const std::string& bar);
```
Right now you can return any type in C++ such as `std::string` which does not make sense

Reviewed By: lenaic

Differential Revision: D79980538

fbshipit-source-id: 9b99ea6b1ac97d1e46cdb9952e83c445ec5503b7
2025-08-12 23:13:16 -07:00
Zeya PengandFacebook GitHub Bot 9f77d421bb make sure to only disable js sync & animate layout when disableFabricCommitInCXXAnimated==false (#53230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53230

## Changelog:

[Internal] [Changed] - make sure to only disable js sync & animate layout when disableFabricCommitInCXXAnimated==false

Reviewed By: sammy-SC

Differential Revision: D80002015

fbshipit-source-id: 5e6ee4b5908fe8d2ee52b77ca3b78164debc4d59
2025-08-12 14:57:41 -07:00
Alan LeeandFacebook GitHub Bot 1c7925abb0 edit RN change log (#53232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53232

Remove entry that was reverted for 0.81 release

Changelog: [Internal]

Reviewed By: shwanton, cortinico

Differential Revision: D80108112

fbshipit-source-id: 3176e7e26407ad8c71434b5576c722dc28021d08
2025-08-12 13:41:39 -07:00
Samuel SuslaandFacebook GitHub Bot b44e1839ca fix crash in adjustForMaintainVisibleContentPosition (#53208)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53208

changelog: [internal]

When Fabric View Culling is enabled together with immediate state update, it may lead to a crash inside of `[RCTScrollViewComponentView _adjustForMaintainVisibleContentPosition]`.
When doing immediate state update, we can avoid calling `[RCTScrollViewComponentView _adjustForMaintainVisibleContentPosition]` altogether to avoid the crash.

Reviewed By: lenaic

Differential Revision: D80000362

fbshipit-source-id: 123b70aa31edb14a99bb968648eb8b8aac84afb6
2025-08-12 13:25:16 -07:00
Rubén NorteandFacebook GitHub Bot 4ee326f52c Add documentation for JS memory profiler in Fantom (#53226)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53226

Changelog: [internal]

This adds documentation about how to take JS memory heap snapshots in Fantom.

Reviewed By: lenaic

Differential Revision: D80090283

fbshipit-source-id: 04f66a62aa756d1020b8d8ef6fc0ea7e68341710
2025-08-12 11:08:08 -07:00
Rubén NorteandFacebook GitHub Bot 90804fd088 Add documentation for JS sampling profiler in Fantom (#53227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53227

Changelog: [internal]

This adds docs for the new JS sampling profiler in Fantom

Reviewed By: lenaic

Differential Revision: D80090284

fbshipit-source-id: 0f7fa498cf141a51ac6fda331522945d42fc494d
2025-08-12 11:08:08 -07:00
Rubén NorteandFacebook GitHub Bot e2035379b6 Add documentation for debugging in Fantom (#53228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53228

Changelog: [internal]

This adds some documentation about how to debug Fantom tests (C++ and JS).

Reviewed By: lenaic

Differential Revision: D80090286

fbshipit-source-id: 435d2079abfe72e93de0c297347b15dc39b25a89
2025-08-12 11:08:08 -07:00
Rubén NorteandFacebook GitHub Bot 0bf7721862 Use Jest naming for test regex in Fantom docs (#53229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53229

Changelog: [internal]

Tiny change to align with how Jest refers to this argument in its docs: https://jestjs.io/docs/cli#jest-regexfortestfiles

Reviewed By: lenaic

Differential Revision: D80090285

fbshipit-source-id: 86a4ad75078eb9b7575fca9659cc1a2e678f7a0a
2025-08-12 11:08:08 -07:00
Mateo GuzmánandFacebook GitHub Bot 35d8086881 Migrate DoNotStrip to Kotlin
Summary:
Migrate com.facebook.yoga.annotations.DoNotStrip to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1840

Reviewed By: rshest

Differential Revision: D79897758

Pulled By: cortinico

fbshipit-source-id: 79585e6ab793bd72e04440581d866f7721667db3
2025-08-12 10:54:27 -07:00
Samuel SuslaandFacebook GitHub Bot 65b5a5b25d make glog android only include + declare the dependency on glog (#53224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53224

changelog: [internal]

glog is only used on Android.

Reviewed By: christophpurrer

Differential Revision: D80085730

fbshipit-source-id: 0dbec7929551f7c16719846c1868b0509b1d519a
2025-08-12 10:30:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 27217e8bd6 Initialize props for RCTPullToRefreshViewComponentView (#53231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53231

The RCTPullToRefreshViewComponentView props are not initialized when the component view is created. this could lead to undefined behaviors and crashes.

This change fixes it.

## Changelog:
[iOS][Fixed] - Properly initialize the RCTPullToRefreshViewComponentView

Reviewed By: sammy-SC

Differential Revision: D80093141

fbshipit-source-id: dac98d56c749b9f5d85338279c8da2a7e5ddb4a3
2025-08-12 10:16:19 -07:00
Mateo GuzmánandFacebook GitHub Bot 7e461003c6 Migrate YogaLayoutType to Kotlin
Summary:
Migrate com.facebook.yoga.YogaLayoutType to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1837

Reviewed By: rshest

Differential Revision: D79897708

Pulled By: cortinico

fbshipit-source-id: e3c8a3cc60f806d151d2be956b26dd98963254a6
2025-08-12 09:49:31 -07:00
Samuel SuslaandFacebook GitHub Bot bd287e8e2c move some C++ Animated headers into internal folder (#52991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52991

changelog: [internal]

move internal files only to internal folder in C++ Animated

Reviewed By: rshest

Differential Revision: D79436926

fbshipit-source-id: fb8badefdbf7b54a351e57e457f2b6aaf36dc2a6
2025-08-12 09:32:43 -07:00
Mateo GuzmánandFacebook GitHub Bot db2a9c089c Migrate LayoutPassReason to Kotlin
Summary:
Migrate com.facebook.yoga.LayoutPassReason to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1836

Reviewed By: rshest

Differential Revision: D79897685

Pulled By: cortinico

fbshipit-source-id: 87d2e4b95fbdbfe48d84019e9ffb50deb9286d8c
2025-08-12 09:10:30 -07:00
Mateo GuzmánandFacebook GitHub Bot 40afa75a7c Migrate YogaNodeFactory to Kotlin
Summary:
Migrate com.facebook.yoga.YogaNodeFactory to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1832

Reviewed By: zielinskimz

Differential Revision: D79897733

Pulled By: cortinico

fbshipit-source-id: 3ea4f5635eb8c910719c13d3087356b96b6f0746
2025-08-12 08:57:43 -07:00
Mateo GuzmánandFacebook GitHub Bot 453508ada8 Migrate YogaMeasureOutput to Kotlin
Summary:
Migrate com.facebook.yoga.YogaMeasureOutput to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1842

Reviewed By: rshest

Differential Revision: D79897681

Pulled By: cortinico

fbshipit-source-id: 63280b6aed9bbeeb1e71458a1793c9647dcf0726
2025-08-12 07:55:41 -07:00
Mateo GuzmánandFacebook GitHub Bot 05eddd354e Migrate YogaMeasureFunction to Kotlin
Summary:
Migrate com.facebook.yoga.YogaMeasureFunction to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1835

Reviewed By: mdvacca

Differential Revision: D79897728

Pulled By: cortinico

fbshipit-source-id: 959ae976622838147685cf6088674dce25f5cc99
2025-08-12 07:40:31 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 641a79dc51 Improve benchmark comparison printout ("slower"->"faster") (#53221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53221

# Changelog:
[Internal] -

This changes the benchmark test results comparison print the results slightly differently, in particular it now uses the slowest result as a baseline and prints how much faster the other ones are (as opposed to printing "slower" previously).

This arguably brings a more positive vibe when looking into the benchmark results :)

Reviewed By: andrewdacenko

Differential Revision: D80082134

fbshipit-source-id: 7dc9c7c520afe08270d4f5da9031db02261690ba
2025-08-12 06:56:14 -07:00
Nicola CortiandFacebook GitHub Bot f1d014adbb Simplify RNTester Autolinking (#53095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53095

This change simplifies the RNTesterApplication so that it's looking closer to the template MainApplication file.
In order to do so, I had to create 2 files inside the `metainternal/` folder as those files are
generated as part of the CLI Autolinking

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79722917

fbshipit-source-id: 06852c72ae1e1abed9952b1637515123977bc7b4
2025-08-12 05:49:49 -07:00
Vitali ZaidmanandFacebook GitHub Bot 7bfec89a97 temporary disable perf monitor to fix tests (#53209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53209

Changelog: Internal

Reviewed By: sammy-SC

Differential Revision: D80000286

fbshipit-source-id: 899cd5e6b193957579e61af65cf8177cd1666473
2025-08-12 05:47:11 -07:00
Rubén NorteandFacebook GitHub Bot 65974e938c Add support for JS debugging in Fantom (#53215)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53215

Changelog: [internal]

This adds a new environment variable to Fantom that allows debugging the JS code in tests.

Usage:

```
FANTOM_DEBUG_JS=1 yarn fantom <test>
```

**Does NOT work in OSS yet**. We need to include a third-party library to send HTTP and WebSocket requests and implement a wrapper on top of it.

Reviewed By: christophpurrer

Differential Revision: D79883372

fbshipit-source-id: d077c373a036033344e61d58274d5cd14028bda4
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 9c201c0f8f Automatically inject debugger statements in tests in preparation for debug mode (#53205)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53205

Changelog: [internal]

This injects a custom Babel transform for Fantom tests that automatically injects `debugger` statements in the generated code. This simplifies debugging by providing a default interruption point in the test setup for the test author to decide what to debug.

This has no effect unless the debugger is opened, which isn't happening yet.

Reviewed By: rshest

Differential Revision: D79996000

fbshipit-source-id: 6153587264d293a067e359edba4f64f41898c506
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 4978385067 Allow custom factories for HTTP and WebSocket clients for DevTools (#53200)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53200

Changelog: [internal]

TSIA. This is necessary for Fantom to use real HTTP and WebSocket connections for DevTools, while still providing stubs for the runtime (the networking and websockets native modules provided to clients).

If there are no specific factories for DevTools provided, we fall back to regular ones (keeping backwards compatibility).

Reviewed By: rshest

Differential Revision: D79806934

fbshipit-source-id: 6d16fa44e11f3c8e304c3c3d31fe952d0ba5811a
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 42db2f8405 Split ReactInstanceConfig.enableDebugging into enableInspector and enableDevMode (#53201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53201

Changelog: [internal]

This splits the `ReactHost` option `enableDebugging` into more granular options:
- `enableInspector` which enables the connection with the inspector/debugger.
- `enableDevMode` which enables the use of bundles from Metro, reloads, etc.

This allows us to enable the inspector in Fantom without consuming bundles from Metro.

This should be backwards compatible with existing apps.

In the future, we should be able to inject custom `DevSupportManager` instances into the `ReactHost` so we can customize all options with any level of granularity (the same way we do on Android, for example).

Reviewed By: rshest

Differential Revision: D79804006

fbshipit-source-id: c28e788e5006cdbeb1a373d44b4e5aec1acec702
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot c2c2e6b7c2 Connect debugger before loading bundle (#53203)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53203

Changelog: [internal]

This makes ReactHost connect the inspector immediately after creating the instance, aligned with how we do it on Android, instead of doing it as part of loading a bundle.

Reviewed By: rshest

Differential Revision: D79804004

fbshipit-source-id: b165520b0feb089fdfaa323413d697939c7ac794
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot e0b22e1ebf Rename global variable with Metro server for Fantom (#53202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53202

Changelog: [internal]

Just a minor refactor to follow the convention of prefixing Fantom-related globals and environment variables.

Reviewed By: rshest

Differential Revision: D79804007

fbshipit-source-id: 0c9a57c1b08ae18ae03cd66d1a6ef9690e0dea42
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 6fb0072f01 Refactor logic to find available port for Metro in Fantom (#53204)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53204

Changelog: [internal]

This changes the logic to find an available port for Metro on Fantom to do this outside Metro. Before, we'd set `0` as the port for Metro to find an available port, but in a following change we'll need to know the port before calling into Metro. This allows that.

Reviewed By: rshest

Differential Revision: D79804005

fbshipit-source-id: 5c2e2f4acbba3a79771586799b65653d46b8fe72
2025-08-12 05:41:11 -07:00
RakaDoankandFacebook GitHub Bot 739dfd2141 Help Codegen to find library's package.json after failure of importing library's package.json due to missing of ./package.json subpath (#53220)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53220

This is fix for some React Native libraries can't be found by Codegen, and will make the libraries unusable in new architecture (Turbo Modules)

Internally in the Codegen script, it will try to import library's package.json file with the `require.resolve`, but for some React Native libraries will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code due to using the `exports` field in their package.json file while not exposing the package.json file itself. As an example
```json
{
  "exports": {
    ".": {
      "import": {
        "types": "./lib/typescript/module/index.d.ts",
        "default": "./lib/module/index.js"
      },
      "require": {
        "types": "./lib/typescript/commonjs/index.d.ts",
        "default": "./lib/commonjs/index.js"
      }
    },
    "./package.json": "./package.json" <-- here some libraries missed this
  },
  "codegenConfig": {}
}
```

Personally feel weird that library author has to expose their package.json only for the sake of Codegen and i believe library author shouldn't, even the library consumer don't need it.

## Changelog:

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

Pick one each for the category and type tags:

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

[GENERAL] [FIXED] - Help Codegen find library's package.json if some libraries using `exports` field in their package.json file and the `./package.json` subpath is not explicitly defined

bypass-github-export-checks

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

Test Plan:
`require.resolve('library/package.json')` [here](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/codegen/generate-artifacts-executor/utils.js#L203) will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code by Node.js. So if it does, help Codegen retry to find closest library's package.json with [`require.main.paths`](https://nodejs.org/api/modules.html#requiremain) search paths

You can init new app React Native CLI app with my sample react native library here [`ping-react-native`](https://github.com/RakaDoank/ping-react-native) v1.2.2.
Due to missing of the `package.json` subpath, before this change, it's autolinked but unusable due to missing of the spec header file. After this change, it works normally.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D80080243

Pulled By: cipolleschi

fbshipit-source-id: d33bf9eeb385ccf0c076e4d800a0d2840bd91b68
2025-08-12 04:45:07 -07:00
Mateo GuzmánandFacebook GitHub Bot 001736000f Migrate YogaStyleInputs to Kotlin
Summary:
Migrate com.facebook.yoga.YogaStyleInputs to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1830

Reviewed By: rshest

Differential Revision: D79897662

Pulled By: cortinico

fbshipit-source-id: a4063a8c0f608050162cd3707834040e35f9ebf7
2025-08-12 03:34:21 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 841866c354 Add accessibility props test to the <Text/> component (#53218)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53218

# Changelog:
[Internal] -

Uses the existing generalized accessibility props test suite, recently created by andrewdacenko, to test the corresponding props in the <Text/> component.

Reviewed By: andrewdacenko

Differential Revision: D80000693

fbshipit-source-id: ebbceef8db7b56dc5e4ba1ac7c027a5952b680a7
2025-08-12 00:11:06 -07:00
generatedunixname89002005232357andFacebook GitHub Bot 677ee671d0 Revert D79993649 (#53217)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53217
Changelog: [Internal]
Fix rn-tester jobs

This diff reverts D79993649
(The context such as a Sandcastle job, Task, SEV, etc. was not provided.)

Depends on D79993649

Reviewed By: cortinico

Differential Revision: D80030502

fbshipit-source-id: 1feee2e2ae6a1edbeb755687aecb2a25d9759a90
2025-08-11 15:39:00 -07:00
Nick LefeverandFacebook GitHub Bot cc71f9c550 Create tryDispatchMountItems runnable only when needed (#53196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53196

In the FabricUIManager, the runnable created for scheduled mounts is only used if currently running on the UI thread.

With this diff the runnable only gets created when needed.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D79969412

fbshipit-source-id: ee78890322af8580357389aad8357f7c0d18490f
2025-08-11 14:45:36 -07:00
Andrew DatsenkoandFacebook GitHub Bot 6738dbcc7e Generalize accessibility testing (#53182)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53182

Changelog: [Internal]
Move accessibility tests into reusable test suite.

Reviewed By: rshest

Differential Revision: D79897200

fbshipit-source-id: d98ebc7d16e7fd5c3c81086df4eec07dfdcb2fb0
2025-08-11 13:59:43 -07:00
Andrew DatsenkoandFacebook GitHub Bot 1feb364f72 Add accessibilityState (#53179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53179

Changelog: [Internal]
Add accessibilityState debug prop

Reviewed By: zeyap

Differential Revision: D79894111

fbshipit-source-id: b9914965b053c239c7f954130a32240b15070b17
2025-08-11 13:59:43 -07:00
Mateo GuzmánandFacebook GitHub Bot a2eb3b299d Migrate YogaBaselineFunction to Kotlin
Summary:
Migrate com.facebook.yoga.YogaBaselineFunction to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1831

Reviewed By: joevilches, mdvacca

Differential Revision: D79897676

Pulled By: cortinico

fbshipit-source-id: 2f175bf60a871c4635d1575faec1096f9c970f48
2025-08-11 10:51:55 -07:00
Vitali ZaidmanandFacebook GitHub Bot 8d998ce96c consolidated all 0.81 rcs entries in the changelog into 0.81 (#53212)
Summary:
Changelog: [Internal]

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

Reviewed By: cortinico

Differential Revision: D80005041

Pulled By: vzaidman

fbshipit-source-id: 93f570d9ddccdf8d4febc9d9f7702646ad7a6b56
2025-08-11 10:22:45 -07:00
RakaDoankandFacebook GitHub Bot 8dcb18d2b3 Help Codegen to find library's package.json after failure of importing library's package.json due to missing of ./package.json subpath (#53195)
Summary:
This is fix for some React Native libraries can't be found by Codegen, and will make the libraries unusable in new architecture (Turbo Modules)

Internally in the Codegen script, it will try to import library's package.json file with the `require.resolve`, but for some React Native libraries will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code due to using the `exports` field in their package.json file while not exposing the package.json file itself. As an example
```json
{
  "exports": {
    ".": {
      "import": {
        "types": "./lib/typescript/module/index.d.ts",
        "default": "./lib/module/index.js"
      },
      "require": {
        "types": "./lib/typescript/commonjs/index.d.ts",
        "default": "./lib/commonjs/index.js"
      }
    },
    "./package.json": "./package.json" <-- here some libraries missed this
  },
  "codegenConfig": {}
}
```

Personally feel weird that library author has to expose their package.json only for the sake of Codegen and i believe library author shouldn't, even the library consumer don't need it.

## Changelog:

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

Pick one each for the category and type tags:

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

[GENERAL] [FIXED] - Help Codegen find library's package.json if some libraries using `exports` field in their package.json file and the `./package.json` subpath is not explicitly defined

bypass-github-export-checks

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

Test Plan:
`require.resolve('library/package.json')` [here](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/codegen/generate-artifacts-executor/utils.js#L203) will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code by Node.js. So if it does, help Codegen retry to find closest library's package.json with [`require.main.paths`](https://nodejs.org/api/modules.html#requiremain) search paths

You can init new app React Native CLI app with my sample react native library here [`ping-react-native`](https://github.com/RakaDoank/ping-react-native) v1.2.2.
Due to missing of the `package.json` subpath, before this change, it's autolinked but unusable due to missing of the spec header file. After this change, it works normally.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D79993649

Pulled By: cipolleschi

fbshipit-source-id: fa2bbd6178f5e5fef19a14e67f09ee8a727d01de
2025-08-11 10:10:04 -07:00
Andrew DatsenkoandFacebook GitHub Bot 4fa3c00324 Add base test for TouchableWithoutFeedback (#53178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53178

Changelog: [Internal]
Add base integration test for TouchableWithoutFeedback

Reviewed By: zeyap

Differential Revision: D79889935

fbshipit-source-id: a72a85c647e371e6a6b330cd6eb2c3cc7c71b2f5
2025-08-11 10:03:28 -07:00
Michał PierzchałaandFacebook GitHub Bot fc6d7d4f0f Update RNC CLI in RNTester to v20.0.0 (#53206)
Summary:
Bump CLI to stable v20 for RNTester

## Changelog:

[INTERNAL] [CHANGED] - Update RNC CLI in RNTester to v20.0.0

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

Pick one each for the category and type tags:

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

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

Reviewed By: cortinico

Differential Revision: D79997077

Pulled By: rshest

fbshipit-source-id: 7264d942967fbfbc7fa5704f1089c0e7dbd3eb4b
2025-08-11 09:37:54 -07:00
Richard BarnesandFacebook GitHub Bot 9eb90f8911 Remove unused exception parameter from hermes/unittests/API/CDPAgentTest.cpp (#53213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53213

`-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it.

This:
```
try {
    ...
} catch (exception& e) {
    // no use of e
}
```
should instead be written as
```
} catch (exception&) {
```

If the code compiles, this is safe to land.

Reviewed By: dtolnay

Differential Revision: D79968851

fbshipit-source-id: 18f2e6861f099915b1aad6aba58217ba94eb10c8
2025-08-11 09:35:31 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 85b47afb48 Check delegate for getModuleForClass and getModuleInstanceFromClass (#53207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53207

When restructuring the RCTReactNativeFactory, we forgot to add a couple of methods to check whether the delegate was implementing the RCTTurboModuleManager delegate methods.

This has been reported [here](https://github.com/react-native-community/discussions-and-proposals/issues/916)

This change fixes it.

## Changelog:
[iOS][Fixed] - Ask the delegate for `getModuleForClass` and `getModuleInstanceFromClass`

Reviewed By: cortinico

Differential Revision: D79998104

fbshipit-source-id: 68069a9f93182d4fa416b5799bf4eec4d107552b
2025-08-11 08:51:01 -07:00
Mateo GuzmánandFacebook GitHub Bot 9c9a39b58e Migrate YogaLogger to Kotlin
Summary:
Migrate com.facebook.yoga.YogaLogger to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1834

Reviewed By: rshest

Differential Revision: D79897742

Pulled By: cortinico

fbshipit-source-id: 79b926a7abadce9038fc55ad0f608e92bc77a55a
2025-08-11 08:47:34 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 0af4a1c71f Set up Switch Fantom test (#53134)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53134

This change sets up the Fanto test for the Switch component

## Changelog:
[Internal] -

Reviewed By: rubennorte

Differential Revision: D79719683

fbshipit-source-id: d8a5d127296e3448faf5f841baa98bc34f4f43cb
2025-08-11 08:17:48 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 749dbe0840 Add test for Text.adjustsFontSizeToFit (#53210)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53210

# Changelog:
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D80001500

fbshipit-source-id: ab5564b0e9ab728f0825aec9da24539c9e2c5290
2025-08-11 08:14:15 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 1c33774990 Remove setup-xcode-build-cache action (#53177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53177

This action is used only when running tests for RNTester. Now that we are using prebuilds, this is a liability, because Cocoapods and Xcode would not update the binary if a new one is provided.

With prebuild, this caching does not provide a lot of benefits, so we can remove it.

## Changelog
[Internal] -

Reviewed By: cortinico

Differential Revision: D79893870

fbshipit-source-id: 0773f910f418cf9ebd5d557d563160993084e83a
2025-08-11 08:07:43 -07:00
Peter AbbondanzoandFacebook GitHub Bot 07835d3d67 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java (#53116)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53116

Converts ReactAccessibilityDelegate to Kotlin

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D79749812

fbshipit-source-id: bdfbd61f61339d8332a4fa3f5cc4ccd4b4355323
2025-08-11 07:54:09 -07:00
Vojtech NovakandFacebook GitHub Bot 4c570b5d31 fix cp command in ReactNativeDependencies.podspec (#53136)
Summary:
When running `RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 pod install` I'm getting an error: `cp: framework/packages/react-native/..: File exists`

This is not seen consistently by everyone but I've seen in reported one more time at Expo. Could be related to running MacOS 26.

Somehow, apparently, the `..` is being treated as a literal directory name and cp is trying to create a directory named `..` inside `framework/packages/react-native/` which is not what we want. Using `/.` avoids that.

 ---
What also seemed to work(around) was to change `mkdir -p framework/packages/react-native` to `mkdir -p framework/packages/` and then `cp` can create the `framework/packages/react-native/..` folder. But this is definitely more confusing.

## Changelog:

Pick one each for the category and type tags:

[IOS] [FIXED] - fix "file exists" error in `ReactNativeDependencies.podspec`

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

Test Plan: tested locally, and in CI on older macOS: https://github.com/expo/expo/pull/38631 (the ios build succeeds)

Reviewed By: rshest

Differential Revision: D79990895

Pulled By: cipolleschi

fbshipit-source-id: 44ff9034800d3acd4e55ec39aabfb326382372cb
2025-08-11 06:36:15 -07:00
generatedunixname537391475639613andFacebook GitHub Bot fd600a24af xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.cpp (#53198)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53198

Reviewed By: rshest

Differential Revision: D79874231

fbshipit-source-id: 15b2a0c2330e6237b92db68094ce97f3e708f9a6
2025-08-11 06:31:16 -07:00
Rubén NorteandFacebook GitHub Bot 6b05a59a0d Extend PerformanceEventTiming with taskEndTime (#53199)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53199

Changelog: [internal]

This adds a new `taskEndTime` field in the internal C++ representation of `PerformanceEventTiming` so we can distinguish events that waited for mount (because they triggered changes) and events that didn't, so report INP correctly.

Reviewed By: rshest

Differential Revision: D79894702

fbshipit-source-id: f7472bfaecaa69f2126719d0dc3d3b251e3a8f68
2025-08-11 05:26:56 -07:00
Phil PluckthunandFacebook GitHub Bot 94623ca8ec Fix missing path escape patterns in Xcode scripts for projects with spaces (#53194)
Summary:
When running a project in a path that contains any spaces, the scripts have several escape patterns that don't handle this path correctly. For example, `"/absolute/path/with spaces"` may be rendered as `/absolute/path/with spaces` and this shows as an output error such as `No such file or directory /absolute/path/with`

This was likely a longstanding issue, but is unexpected for some beginners that first try out React Native. While it's not recommended to create a path like this, it's certainly not hard to make this mistake.

## Changelog:

[IOS] [FIXED] - fix scripts for paths containing whitespaces

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

Test Plan: tested locally; create a React Native or Expo project in a folder containing a space (e.g. `/my/path/with spaces/new-app` and build the project. With changes applied, the build should succeed. (There's related failures in `expo/expo` that need fixing too)

Reviewed By: robhogan

Differential Revision: D79993537

Pulled By: cipolleschi

fbshipit-source-id: b32697ce2405c403c410b3ceaed7e161e4a48537
2025-08-11 05:12:43 -07:00
David VaccaandFacebook GitHub Bot d3bbbd893a Deprecate com/facebook/react Legacy Architecture classes (#53104)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53104

Deprecate com/facebook/react Legacy Architecture classes

changelog: [Android][Changed] Depreacate CoreModulesPackage and NativeModuleRegistryBuilder legacy architecture classes, these classes unused in the new architecture and will be deleted in the future

Reviewed By: shwanton

Differential Revision: D79676942

fbshipit-source-id: a2c447bee251fdac79d3dc81a17851eaf5271413
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot da74d5da2c Deprecate Legacy Architecture ViewManagers (#53107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53107

Deprecate Legacy Architecture ViewManagers, these classes are not used as part of the new architecture and will be deleted in the future

changelog: [Android][Changed] Deprecate Legacy Architecture ViewManagers, these classes are not used as part of the new architecture and will be deleted in the future

Reviewed By: shwanton

Differential Revision: D79676585

fbshipit-source-id: 72cb6fe0bbe666cfa317cf28d6aec475f1c38c35
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 07091a9ae8 Deprecate custom ShadowNode classes included in React Native (#53192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53192

In this diff I'm deprecating ShadowNode classes included in React Native library

These classes are part of the legacy architecture and will be deleted in the future

changelog: [Android][Changed] Deprecate LegacyArchitecture ShadowNode classes included in React Native

Reviewed By: mlord93

Differential Revision: D79676584

fbshipit-source-id: a39267e6e430fcf4f6a73c96cd28d02eafc88a32
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot c1f7c5e321 Depreacte remaining LegacyArchitecture classes from the bridge package (#53191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53191

Depreacte remaining LegacyArchitecture classes from the bridge package

changelog: [Android][Changed] Depreacte all LegacyArchitecture classes from the bridge package

Reviewed By: mlord93

Differential Revision: D79674635

fbshipit-source-id: 6a873d05157e17ef0434821e1c8a77959d7f079a
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot b29b86f275 Deprecate LegacyArchitecture class UIManagerProvider (#53190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53190

Deprecate LegacyArchitecture class UIManagerProvider

changelog: [Android][Changed] Deprecate LegacyArchitecture class UIManagerProvider

Reviewed By: mlord93

Differential Revision: D79674639

fbshipit-source-id: 6802a35c4bd643f138a54b4f22f3804743f89249
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 25c011eb4d Deprecate BridgeDevSupportManager and JSInstance (#53108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53108

Deprecate BridgeDevSupportManager and JSInstance

changelog: [Android][Changed] Deprecate BridgeDevSupportManager and JSInstance

Reviewed By: mlord93

Differential Revision: D79674636

fbshipit-source-id: c34c4ed386ab6c130fc12e03659fe2d15b42658d
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 3306cdbbe9 Update deprecation message for BridgeReactContext class (#53110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53110

Update deprecation message for BridgeReactContext class

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D79674637

fbshipit-source-id: 0942b0c8479cd1eba8e29bd9dcfc4547790910f1
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 22e4c25211 Deprecate NativeModuleRegistry Legacy Architecture class (#53123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53123

Deprecate NativeModuleRegistry Legacy Architecture class

changelog: [Android][Changed] Deprecate NativeModuleRegistry Legacy Architecture class

Reviewed By: mlord93

Differential Revision: D79674638

fbshipit-source-id: 7791ceb53545aa456e92f051ed4c1f070305b5fc
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 78a3ff81eb Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge (#53106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53106

Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge

changelog: [Android][Changed] Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge

Reviewed By: mlord93

Differential Revision: D79674640

fbshipit-source-id: 58b8fde8bed739fd04272215e399cfbed7a0188a
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 25f466cc4d Deprecate FrescoBasedReactTextInlineImageShadowNode (#53121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53121

Deprecate FrescoBasedReactTextInlineImageShadowNode

changelog: [Android][Changed] Deprecate LegacyArchitecture class FrescoBasedReactTextInlineImageShadowNode

Reviewed By: mlord93

Differential Revision: D79672291

fbshipit-source-id: 482939981b735e7f96d7cde874430e2895c0d10c
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 718126fcf0 Deprecate Legacy Architecture class CallbackImpl (#53105)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53105

Deprecate Legacy Architecture class CallbackImpl

changelog: [Android][Changed] Deprecate Legacy Architecture class CallbackImpl

Reviewed By: mlord93

Differential Revision: D79672292

fbshipit-source-id: d35ae53093f464f2bb088a8247dbbde8591572c6
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 19a99dd088 Deprecate JavaMethodWrapper (#53124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53124

Deprecate LegacyArchitecture class JavaMethodWrapperchagelog:

changelog: [Android][Changed] Deprecate LegacyArchitecture class JavaMethodWrapper

Reviewed By: mlord93

Differential Revision: D79672296

fbshipit-source-id: 05432263c4452294c667226cb8e062c50f036931
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot c4715886a9 Deprecate Legacy Architecture ShadowNode classes
Summary:
Deprecate Legacy Architecture ShadowNode classes

Changelog: [Android][Changed] Deprecate Legacy Architecture ShadowNode classes

Reviewed By: mlord93

Differential Revision: D79672295

fbshipit-source-id: e510debd3718e6bc9e42c9b61d6a63858970077d
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 1a85185cfc Deprecate ShadowNodes on the codegen (#53184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53184

Deprecate ShadowNodes on the codegen

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D79911692

fbshipit-source-id: ad24488d186fd5b82c3953a75f52be03e4770cc2
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot d2912e7997 EZ fix naming in kotlin file (#53109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53109

EZ fix naming in kotlin file

changelog: [internal] internal

Reviewed By: cortinico, shwanton, mlord93

Differential Revision: D79735705

fbshipit-source-id: b1061a9aa0f245de29efb1b0f3d6c9ada9c43660
2025-08-08 16:43:31 -07:00
Ramanpreet NaraandFacebook GitHub Bot 7d6d0a7735 native modules: Show message in redundant rejection redbox (#53152)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53152

When a redundant reject is called, show the rejection message in the redbox. This can help us pin down the error we need to elminiate in production.

Changelog: [Internal]

Reviewed By: sanjay-io

Differential Revision: D79837541

fbshipit-source-id: 879b5dc42980867051cfab6ccb575304a4a9c4c6
2025-08-08 14:39:42 -07:00
Ramanpreet NaraandFacebook GitHub Bot dc879950d1 native modules: Guard against concurrent resolve/reject calls (#53151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53151

If the native module calls the resolve/reject, resolve/resolve, reject/resolve, reject/reject concurrently, the turbomodule infra could run into a null pointer exception. This diff mitigates that problem.

Changelog: [iOS][Fixed] - Fix concurrent calls into resolve/reject inside native modules

Reviewed By: sanjay-io

Differential Revision: D79824319

fbshipit-source-id: 675264781f303d12fc1eb9649ecdc78601b7720b
2025-08-08 14:39:42 -07:00
Calix TangandFacebook GitHub Bot e0ea781908 Basic Fantom Tests for Pressable (#53181)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53181

Adds basic Fantom tests for the <Pressable> React Native component.

Following T233710053, adds tests for some of the listed props and refs.

Covered props:
* children
* disabled
* onPress
* style

Ref:
* Pressable is a Native Component and has the correct tag

I did not cover the rest of the listed props due to Fantom not having suitable events to trigger to test them and/or inease of implementing functionality to do so.

## Changelog:

[Internal]

Reviewed By: andrewdacenko

Differential Revision: D79745215

fbshipit-source-id: 26caaabf72ea7ffff3e652616dfd9f0cf7fc2020
2025-08-08 12:56:58 -07:00
Luna WeiandFacebook GitHub Bot b3f397f343 VirtualViewExperimental on iOS (#52852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52852

Changelog: [Internal] - Implementation of ScrollView-managed VirtualViews for iOS

In previous diffs we've introduced a "VirtualViewExperimental" which is a clone of VirtualView. This diff updates the experimental version to move interection logic (whether something is visible, in prerender-space, etc.) to the ScrollView so there are less listeners. We now use 1 scroll listener vs. N

Reviewed By: philIip

Differential Revision: D78825701

fbshipit-source-id: d515e3cb2dae53d779b5d3f4c317a2c7a6b25857
2025-08-08 11:12:12 -07:00
Zeya PengandFacebook GitHub Bot 5517c046ab Cache result when RenderOutput::render() is called (#53112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53112

## Changelog:

[Internal] [Changed] - Cache result when RenderOutput::render() is called

Rreviously, root.getRenderedOutput in fantom doesn't really reflect the result of direct manipulation from native animated (see the test case added here). This stack is enabling it.

* make RenderOutput an instance owned by TestMountingManager that can cache render result
  * why is this needed - native animation's direct manipulation should modify the render result (analog to directly manipulating host views on a platform) instead of props on a StubView
* here i also make sure that `RenderOutput::render()` will only re calculate the render result for a tree after StubViewTree::mutate is called

Reviewed By: andrewdacenko

Differential Revision: D79737991

fbshipit-source-id: ee2193b708e319c1519b06bc672054c4f7105da1
2025-08-08 10:54:05 -07:00
Mateo GuzmánandFacebook GitHub Bot 8ccfff9a46 Migrate ReactBaseTextShadowNode to Kotlin (#52449)
Summary:
Migrate com.facebook.react.views.text.ReactBaseTextShadowNode to Kotlin.

## Changelog:

[Android][Changed] - Migrated ReactBaseTextShadowNode to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation.

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

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

Reviewed By: mdvacca

Differential Revision: D79341403

Pulled By: cortinico

fbshipit-source-id: ff5dd7a8c3e0220812dd3a214d8d680ccd83f4d8
2025-08-08 10:36:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 0aeb26bdfc e2e test for Text.role (#53176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53176

# Changelog:
[Internal] -

As in the title

Reviewed By: andrewdacenko

Differential Revision: D79891116

fbshipit-source-id: 13042a9b82373b8e0073c8421e532e6e463d60f8
2025-08-08 10:02:57 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 3d37d2d2ce Add test for Text.maxFontSizeMultiplier (#53171)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53171

# Changelog:
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D79888839

fbshipit-source-id: 52964ce9484c51dc5ff1065343ef9d2f829425c9
2025-08-08 10:02:57 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 5a38948034 e2e test for Text.id/nativeID (#53170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53170

# Changelog:
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D79887689

fbshipit-source-id: a8a6a16a0fbf3f1481758a2d91c7813d51a4d9d1
2025-08-08 10:02:57 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 1a58fdf172 Add tests for Modal.animiated prop (#53174)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53174

Add Fantom tests for Modal.animiated prop

Notice that animated is deprecated and ignored when rendering.

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79888036

fbshipit-source-id: aa9003d376f356e9934a61a7cfc958b44d9892eb
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 618254d8e9 Add tests for Modal.allowSwipeDismissal prop (#53173)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53173

Add Fantom tests for Modal.allowSwipeDismissal prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79885004

fbshipit-source-id: 9db4bc38c739223a36180d09397bad09ecc67d86
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 01e3f8d75e Add tests for Modal.visible prop (#53172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53172

Add Fantom tests for Modal.visible prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79884676

fbshipit-source-id: 7c3ca4e16596022096a634a7232b616cf15c79c4
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2812e20ecc Add tests for Modal.hardwareAccelerated prop (#53162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53162

Add Fantom tests for Modal.hardwareAccelerated prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79881565

fbshipit-source-id: 80aaeb0659883d536c37996e86231c9d1d9eff49
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 674fd79eaf Add tests for Modal.navigationBarTranslucent prop (#53157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53157

Add Fantom tests for Modal.navigationBarTranslucent prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79881358

fbshipit-source-id: 75816bf9bb18dc2115477965953fcd88a65d5be5
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot de76f3436c Add tests for Modal.statusBarTranslucent prop (#53158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53158

Add Fantom tests for Modal.statusBarTranslucent prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79881104

fbshipit-source-id: 9ee9edbff67059eeb815be2a7a095eac91ec7420
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 99ae977345 Add tests for Modal.transparent prop (#53159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53159

Add Fantom tests for Modal.transparent prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79880909

fbshipit-source-id: f597decb29f578433d6c7ac594327b6130945a8e
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot fee81401d7 Add tests for Modal.presentationStyle prop (#53160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53160

Add Fantom tests for Modal.presentationStyle prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79880310

fbshipit-source-id: fda68a481b85e58e5f94d012c71a55cf51b9c8df
2025-08-08 08:52:46 -07:00
Nicola CortiandFacebook GitHub Bot ec9f62865c Update firebase DB url. (#53166)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53166

Our DB doesn't have that suffix, so I'm removing it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79883740

fbshipit-source-id: a52ab275129807cbb6e066baefccd71a8ac7398d
2025-08-08 08:05:54 -07:00
Nicola CortiandFacebook GitHub Bot e16def43c9 Reland: Add tests for DisplayMetricsHolder (#53165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53165

This is a re-land of D78981753
Those tests were OOM-ing because we were using a old version of robolectric.
I've bumped it and this should fix it.

Changelog:
[Internal] [Changed] -

Reviewed By: lenaic

Differential Revision: D79883742

fbshipit-source-id: 4c2c640d6b601ec07d0a4a12cd7b86a879740a41
2025-08-08 07:09:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot afb6294335 Add Fantom test for Text.selectable (#53168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53168

# Changelog:
[Internal]-
Adds Fantom test for `Text.selectable` prop.

Reviewed By: andrewdacenko

Differential Revision: D79885301

fbshipit-source-id: d66895397ee0bbcfedc3f744ae8138d2741b2b1e
2025-08-08 06:49:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 5b9063ed70 E2E test for numberOfLines prop in Text (#53167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53167

# Changelog
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D79884649

fbshipit-source-id: fa2d0be9d455449d5a806b06c0480dcefdaaae3e
2025-08-08 06:49:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 404c975ff2 Prop test for Text.allowFontScaling
Summary:
# Changelog:
[Internal] -

Adds Fantom test for `Text.allowFontScaling`.

Reviewed By: andrewdacenko

Differential Revision: D79882955

fbshipit-source-id: b1426c1e7f2667c2db017d749710320ec1e6aadd
2025-08-08 06:49:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 91f9ff042d Create e2e test for Text.ellipsizeMode prop (#53163)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53163

# Changelog:
[Internal] -

Adds a Fantom test that tests the `Text.ellipsizeMode` prop.

It also adds a test for the `<Text/>` component without any props

Reviewed By: andrewdacenko

Differential Revision: D79882336

fbshipit-source-id: f938c85092325374f562d610432781e2d412b88e
2025-08-08 06:49:05 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 20c91f2bd4 Add tests for Modal.animationStyle prop (#53141)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53141

Add Fantom tests for Modal.animationStyle prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko, rubennorte

Differential Revision: D79808162

fbshipit-source-id: 36ba61bf741dc7cfa7a736fd83a824285304d5b2
2025-08-08 06:47:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7035391b04 Add basic test for Modal (#53140)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53140

As per title, this change adds the boilerplate code for a Fantom test on Modal

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79805808

fbshipit-source-id: c8c77e576a09b346cf29b290d68c75e540d5f146
2025-08-08 06:47:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e547f466ee Improve codegen to add getDebugProps to components (#53135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53135

Our Codegenerated components are not generating code for `getDebugProps`. This change modifies Codegen to add those functions for all the codegen components.

## Changelog:
[General][Added] - Added getDebugProps to codegen

## Facebook:
`getDebugProps` are required by Fantom to write tests. However, we can't generate these function for third party components, because codegen can generate arbitrary structs and we don't have a generic `toString()` method that can be used or automatically generated by C++.

By generating this function only for Core Components, we can ensure that we can write Fantom tests without breaking all the users of React Native.

Reviewed By: rubennorte

Differential Revision: D79805145

fbshipit-source-id: 0e41c65fc30eaa886a05557ca233fb0a9cb18a71
2025-08-08 06:47:23 -07:00
Andrew DatsenkoandFacebook GitHub Bot 8363a4c515 Add static methods tests (#53087)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53087

Changelog: [Internal]
As title

Reviewed By: lenaic

Differential Revision: D79665922

fbshipit-source-id: 024c10960a59e1332aacf2411a68ca85c17142db
2025-08-08 06:00:58 -07:00
generatedunixname89002005287564andFacebook GitHub Bot ec3d9c60f1 Fix CQS signal readability-container-size-empty in xplat/js/react-native-github/packages (#53155)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53155

Reviewed By: rshest

Differential Revision: D79788547

fbshipit-source-id: a18465d5c16ab1822c4e9f6302767505fe6f5ee5
2025-08-08 04:24:03 -07:00
Rubén NorteandFacebook GitHub Bot 2f33eece41 Fix retry logic in Fantom when requesting bundles from Metro (#53161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53161

Changelog: [internal]

This fixes a bug in the retry logic in Fantom when requesting bundles from Metro, where we cache the error from a previous attempt and use it to determine we didn't succeed after the attemps.

Reviewed By: rshest

Differential Revision: D79881488

fbshipit-source-id: 566b2d700db2f9653b9ea9acd577d7eb03770b76
2025-08-08 04:22:16 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 81fdb9dd93 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D79836825

fbshipit-source-id: 82484ab99d7813b79bfb75a6c3ad3bd9863f8856
2025-08-08 04:11:28 -07:00
Andrew DatsenkoandFacebook GitHub Bot d4ea32493e Revert resizeMode to Stretch as unset (#53144)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53144

Changelog: [Internal]
This is a fix to "unset" prop value for Image.
In my previous diff D79600137 I have changed this behaviour to have Cover as a default, but it is not "default" value, but rather "unset" value.

Reviewed By: rshest

Differential Revision: D79813759

fbshipit-source-id: cc6d43742e51fb2087d6023bd0ff50a3d54eed49
2025-08-08 03:43:06 -07:00
Nicola CortiandFacebook GitHub Bot ba518bbb30 RNGP - Make sure the newArchEnabled is set to true for all the libs (#53138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53138

Without this patch, library could break if the user removes the `newArchEnabled=`
property from the `gradle.properties` file.

With this patch instead we hardcode the property to true, so all the libraries can consume
it if they wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79805857

fbshipit-source-id: 88dda707a0d80ac79e96c955ded2ef0823f3d3ff
2025-08-08 03:42:35 -07:00
David VaccaandFacebook GitHub Bot 85610c8b43 Deprecate Legacy Architecture UIManagerModules class (#53122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53122

Deprecate LegacyArchitecture UIManagerModules class

changelog: [Android][Changed] Deprecate LegacyArchitecture UIManagerModules class

Reviewed By: mlord93

Differential Revision: D79672294

fbshipit-source-id: 8a22df4a4341a2ab501fc003ee213fb0047847fc
2025-08-08 02:52:36 -07:00
David VaccaandFacebook GitHub Bot 7f5b2b8f84 Deprecate Legacy Architecture classes belonging to com/facebook/react/uimanager (#53102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53102

Deprecate large subset of Legacy Architecture classes belonging to com/facebook/react/uimanager

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from com/facebook/react/uimanager

Reviewed By: mlord93

Differential Revision: D79672293

fbshipit-source-id: 2d32eb885af3ec2928510608330740229abf93db
2025-08-08 02:52:36 -07:00
David VaccaandFacebook GitHub Bot 39d24bade3 Deprecate LegacyArchitecture classes from package com.facebook.react.uimanager (#53120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53120

Deprecate com.facebook.react.uimanager classes

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from package com.facebook.react.uimanager

Reviewed By: mlord93

Differential Revision: D79660036

fbshipit-source-id: 981f7938e54e40f810caec72fa485cc4a00029f6
2025-08-08 02:52:36 -07:00
David VaccaandFacebook GitHub Bot 9831b03860 Rename BridgeSoLoader -> ReactNativeJNISoLoader (#53153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53153

In this diff I'm renaming BridgeSoLoader -> ReactNativeJNISoLoader and removing LegacyArchitecture becuase this class loads jni classes that are required in new architecture

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D79827295

fbshipit-source-id: 2d02fa1de49b2e4ee838f14e976ae3ab2ca98aef
2025-08-08 01:20:42 -07:00
Alan LeeandFacebook GitHub Bot f21a89078c Revert D79571226: replace getWindowDisplayMetrics with getScreenDisplayMetrics
Differential Revision:
D79571226

Original commit changeset: d90fca36c119

Original Phabricator Diff: D79571226

fbshipit-source-id: 670ae66f9db758d29673134adbac44780569771b
2025-08-08 00:48:14 -07:00
Alan LeeandFacebook GitHub Bot 352e440459 Back out "Fix Dimensions window values on Android < 15" (#53149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53149

Reverting PR https://github.com/facebook/react-native/pull/52738

Changelog: [Internal]
reverting D78738516

Original commit changeset: fdb22f3cc76b

Original Phabricator Diff: D78738516

Reviewed By: mdvacca, lenaic, Abbondanzo

Differential Revision: D79835424

fbshipit-source-id: 44b5ee34b4df6752e5a6f959a54e104eef20ffca
2025-08-08 00:40:42 -07:00
David VaccaandFacebook GitHub Bot aaf471278c Back out "Add tests for DisplayMetricsHolder" (#53148)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53148

Reverting D78981753 because it's causing tests to OOM
https://github.com/facebook/react-native/commit/384677f58ea0af498f548a043be86e6876af58b1

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D79828375

fbshipit-source-id: 3de01dca3d9a9fc4530c84855049eb4ec132a485
2025-08-07 14:33:33 -07:00
Nicola CortiandFacebook GitHub Bot 384677f58e Add tests for DisplayMetricsHolder (#52946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52946

This just add a set of unit tests for `DisplayMetricsHolder` as I'm working on this class recently.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest, mdvacca

Differential Revision: D78981753

fbshipit-source-id: 5800d44d3131a58770a0049eb2d08306874b7183
2025-08-07 11:01:37 -07:00
Nicola CortiandFacebook GitHub Bot 2e76fc8e8e Correctly create the first modal state (#52835)
Summary:
There is currently a bug with Modals with New Architecture where the first frame is rendered incorrectly, specifically not accounting for all the vertical insets (only the status bar). This fixes it.

Specifically:
1. I've removed the caching of the statusbar height from `ReactModalHostView` as that was not working correctly. Sometimes the value returned `0` meaning that it was not yet computed when Fabric was asking for it. In the updated implementation we now query `FabricUIManager` given the `surfaceId` of the modal.
2. I've modified the logic to account for all the vertical insets, not just the status bar.

## Changelog:

[ANDROID] [FIXED] - Correctly account for insets on first render of Modals on New Arch

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

Test Plan:
Tested on Marketplace Location Picker and the picker is still working correctly:

 https://pxl.cl/7NjtJ

Reviewed By: mdvacca

Differential Revision: D78975126

Pulled By: cortinico

fbshipit-source-id: d7afb4fa5d2f43a7e33da3860432fa6dfe0dc8d7
2025-08-07 11:01:37 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 5fc23d7c62 Add type-safe API for passing around benchmark results (#53143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53143

# Changelog:
[Internal] -

This refactors the way Fantom benchmark test results are passed to the top level, making it type safe and more maintainable.

Reviewed By: andrewdacenko

Differential Revision: D79812707

fbshipit-source-id: d8bfef7e1b0c11b277a08f5e4c810f8c1efd7f89
2025-08-07 10:46:26 -07:00
Nicola CortiandFacebook GitHub Bot e92da16a9b Migrate ClipboardModuleTest to use BridgelessReactContext (#53131)
Summary:
This test was still using the old `BridgeReactContext`, I'm migrating it to `BridgelessReactContext`.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: mdvacca

Differential Revision: D79801564

Pulled By: cortinico

fbshipit-source-id: 9bb96185505703a773597aeadfeeaeeb194532de
2025-08-07 10:42:26 -07:00
Ruslan LesiutinandFacebook GitHub Bot ae5df7ee35 Bump Electron to 37.2.4 (#53145)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53145

# Changelog: [Internal]

See attached tasks.

Reviewed By: motiz88

Differential Revision: D79563948

fbshipit-source-id: a95b4e63d3a7d0d456c89ec7361e58fea0f5fb66
2025-08-07 10:40:57 -07:00
Sharif MahmoudandFacebook GitHub Bot dacd8f26fd Fix HEADER_SEARCH_PATHS for RuntimeExecutor when USE_FRAMEWORKS is enabled (#53099)
Summary:
`#include <ReactCommon/RuntimeExecutor.h>` stopped working in react-native 0.81 when using frameworks because it is not part of ReactCommon anymore when the split happened for iOS.

to fix this I am including RuntimeExecutor in search headers same way we include ReactCommon.

## Changelog:

[IOS] [FIXED] - Fix import RuntimeExecutor.h with USE_FRAMEWORKS

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

Test Plan:
You can enable USE_FRAMEWORKS and do `#include <react/renderer/uimanager/UIManager.h>` (which react-native-reanimated is doing).
Build will fail complaining that it can't find ReactCommon/RuntimeExecutor.h which is included in UIManager.h
Add my patch, it will work and build successfully

Reviewed By: cortinico

Differential Revision: D79796637

Pulled By: cipolleschi

fbshipit-source-id: f8bb669cfb9f4414653655ed98d2cc6bb431a3e5
2025-08-07 10:12:51 -07:00
Nicola CortiandFacebook GitHub Bot ede037ade7 Cleanup heightOfTallestInlineImage field (#52978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52978

This field is never written anywhere (neither in the internal codebase, nor in OSS).
I'm cleaning this us and simplifying the logic:
- Deprecating `effectiveLineHeight`
- Replacing all the usage of `effectiveLineHeight` with just `lineHeight`

Changelog:
[Android] [Changed] - Deprecate the field `TextAttributeProps.effectiveLineHeight`. This field was public but never used in OSS.

Reviewed By: mdvacca

Differential Revision: D79442393

fbshipit-source-id: c424a6def0257264cd160a2d7be48c2d0f47135e
2025-08-07 09:49:46 -07:00
Mateo GuzmánandFacebook GitHub Bot fa921b3c7b Migrate TextAttributeProps to Kotlin (#52452)
Summary:
Migrate com.facebook.react.views.text.TextAttributeProps to Kotlin.

## Changelog:

[Android][Changed] - Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation.

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

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

Reviewed By: rshest

Differential Revision: D79341238

Pulled By: cortinico

fbshipit-source-id: 455c7b48f47a0cf240aaf330e1fa3674798e7237
2025-08-07 09:49:46 -07:00
generatedunixname499836121andFacebook GitHub Bot bf13ecba7f Apply fixup patch to fbsource
Summary:
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react on GitHub. Please land this patch as soon as possible, as the difference
reflected on here is already on GitHub and future changes may depend on these
changes!

<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge
diff-train-source-id: 7da6014535999d256d2846aadbb7fc1373d76253

Generated by: https://www.internalfb.com/intern/sandcastle/job/18014400563434324/

GitHub Repo: facebook/react

Changelog: [Internal]

Reviewed By: jackpope

Differential Revision: D79754431

fbshipit-source-id: 027428142f36683b07cb66112335f75ecfb5dd12
2025-08-07 09:27:23 -07:00
Andrew DatsenkoandFacebook GitHub Bot 5f8807acc2 Add public API test (#53096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53096

Changelog: [Internal]
As title

Reviewed By: rshest

Differential Revision: D79726634

fbshipit-source-id: 1474cbfb635250e06f4f898338ef0874bc488ed1
2025-08-07 09:04:25 -07:00
Nicola CortiandFacebook GitHub Bot 026e22bb8d Deprecate the DefaultDevSupportManagerFactory.create() method used for Old Arch (#53137)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53137

One of those 2 methods can be deprecated as it was used only for old architecture.
We'll be removing it at some point in the future.

Changelog:
[Android] [Deprecated] - DefaultDevSupportManagerFactory.create() method used for Old Arch

Reviewed By: rshest

Differential Revision: D79806116

fbshipit-source-id: ad2d5515f93bb85e3b7c495b369078f4c66d143b
2025-08-07 08:56:26 -07:00
Mateo GuzmánandFacebook GitHub Bot f1894393ca Initial Kotlin setup and migrate YogaConstants (#53133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53133

# Changelog:
[Internal] -

As part of the ongoing effort to migrate the React Native codebase to Kotlin, this PR introduces the initial setup required for Kotlin support in Yoga.

- Added initial basic Kotlin configuration to the project.
- Migrated `YogaConstants` as an initial file to try out the first migration steps.

X-link: https://github.com/facebook/yoga/pull/1829

Test Plan:
- Tested the migrated class directly against facebook/react-native, see the PR [here](https://github.com/facebook/react-native/pull/52998).
- Run: `./gradlew :yoga:assembleDebug` & `./gradlew :yoga:compileDebugSources`

I am not able to run the Java tests in this repo (even before the initial Kotlin setup) – not sure if I am missing something there but any pointers are welcome – it seems like there is some missing configuration. Currently trying with `./gradlew :yoga:test`

Reviewed By: cortinico

Differential Revision: D79545992

Pulled By: rshest

fbshipit-source-id: 8257ff53e6b6f2436980be98b6c94e1ac526b207
2025-08-07 08:17:56 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 77ee24ddce Print benchmark comparison results in a tabular format (#53097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53097

# Changelog:
[Internal] -

This makes the benchmark results comparison printout, added in https://github.com/facebook/react-native/pull/52925, be done in a tabular form, so it's easier to read and copy/paste around.

Reviewed By: lenaic

Differential Revision: D79728695

fbshipit-source-id: 4dfc999ad4a9a8c2d67efdfce11aff75383cf645
2025-08-07 08:11:32 -07:00
Eliot FallonandFacebook GitHub Bot 327057fad5 fix: fix a typo in the react_native_pods.rb file (#53129)
Summary:
- Switches fmt_config to fast_float_config so it matches what is used in the method

When trying to use a forked version of the Pod it is not possible to set a new repo for Fast Float. This was caused by a typo in the method used to update the configuration of where to find the Pod.

## Changelog:

[IOS] [FIXED] - Fixed variable naming error in set_fast_float_config method in react_native_pods.rb

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

Test Plan: Add the line `set_fast_float_config({:git => 'some-git-repo'})` to an application's Podfile

Reviewed By: cortinico

Differential Revision: D79805939

Pulled By: cipolleschi

fbshipit-source-id: 9705e1f63e21b788362ca94b74e32bce0177a729
2025-08-07 07:48:07 -07:00
Nicola CortiandFacebook GitHub Bot cd71c9620c Do not die on collect-results after printing to Discord. (#53132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53132

This will prevent the Firebase script from running at all. I'm removing it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79801691

fbshipit-source-id: 2705dff93fc9dbbcfaf97a1ba29b69d4d0a8143c
2025-08-07 07:07:10 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 9bb53c02dd xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.cpp (#53126)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53126

Reviewed By: rshest

Differential Revision: D79710434

fbshipit-source-id: da72999b76c0eff73eb62ef47dcf5ec0ed6c9e09
2025-08-07 05:47:35 -07:00
David VaccaandFacebook GitHub Bot f67078df07 Deprecate all LegacyArchitecture classes on LayoutAnimation package (#53101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53101

Deprecate all LegacyArchitecture classes on LayoutAnimation package

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from LayoutAnimation package

Reviewed By: alanleedev

Differential Revision: D79658935

fbshipit-source-id: 34ab2f674868dbee459f2018e82a7d50d0d7333a
2025-08-07 05:11:31 -07:00
Mathieu ActhernoeneandFacebook GitHub Bot 3b185e4bce Fix Dimensions window values on Android < 15 (#52738)
Summary:
This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled.

Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15):

<img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" />

Using `WindowMetricsCalculator` from AndroidX:

<img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" />

Fixes https://github.com/facebook/react-native/issues/47080

## Changelog:

[Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled

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

Test Plan:
Run the example app on an Android < 15 device.

Rollback Plan:

Reviewed By: cipolleschi, Abbondanzo

Differential Revision: D78738516

Pulled By: alanleedev

fbshipit-source-id: fdb22f3cc76b0bda987db426cb015124bcacdc84
2025-08-07 02:17:14 -07:00
Alan LeeandFacebook GitHub Bot 8b2e309479 replace getWindowDisplayMetrics with getScreenDisplayMetrics (#53041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53041

update `DisplayMetricsHolder.getWindowDisplayMetrics()` to `getScreenDisplayMetrics()`.

Where window width and height is not needed, prefer to use `screenDisplayMetrics` as with upcoming diff `windowDisplayMetrics` initialization only happen using UiContext and have potential to cause more issues if used unnecessarily.

Changelog: [Internal] Update `DisplayMetricsHolder.getWindowDisplayMetrics()` to use `.getScreenDisplayMetrics()`

Reviewed By: mlord93

Differential Revision: D79571226

fbshipit-source-id: d90fca36c119318e7a2dfa6953fc2148b35e83d4
2025-08-07 02:17:14 -07:00
David VaccaandFacebook GitHub Bot d4bf644e47 Update deprecation message for ReactNativeHost class (#53118)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53118

Update deprecation message for ReactNativeHost class

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D79677829

fbshipit-source-id: 5013e0988a1ffbfea49a261fd23ac71af76c3313
2025-08-06 23:58:34 -07:00
Devan BuggayandFacebook GitHub Bot 2697e8aaab Remove mode from metro client-log data (#53117)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53117

Sending the mode is no longer needed as you can't opt out of legacy arch any longer, and was only used for printing a (NOBRIDGE) prefix.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D79762592

fbshipit-source-id: 845aabf2a8365c88808990ea481503b23597a8a0
2025-08-06 23:56:45 -07:00
Tim YungandFacebook GitHub Bot c861804325 VirtualView: Simplify Window Focus Detection
Summary:
Refactors the window focus detection feature flag logic in `VirtualView` (Android) to eliminate one instance property and instead utilize the existence of the focus listener to determine whether window focus detection is enabled.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D79743782

fbshipit-source-id: d12e70d8e52b72d546ff097c3b1bcfbd29fb9129
2025-08-06 20:49:05 -07:00
Alex HuntandFacebook GitHub Bot 2768c84445 Implement local connection for perf metrics in HostTarget (#52838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52838

**Context**

Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.

**This diff**

Wires up a client/subscriber for the `"__chromium_devtools_metrics_reporter"` runtime binding (to which we emit live metrics events since D78904748). This will be used to unpack these performance updates to send to the host platform.

- Creates a new `HostRuntimeBinding` helper, which establishes a local/private CDP session.
- Conditionally installs our perf metrics runtime binding in `HostTarget` when `perfMonitorV2Enabled` is set.
- Wires up a new `onPerfMonitorUpdate` event on `HostTargetDelegate` (unimplemented until the next diff).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D78904766

fbshipit-source-id: 991f17a4cc69f574917750053a5da31bbc6dc0d5
2025-08-06 16:05:28 -07:00
Zeya PengandFacebook GitHub Bot be6f3c6f77 Add NativeAnimated jest test to verify node creation behavior at update (#53115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53115

## Changelog:

[Internal] [Added] - Add NativeAnimated jest test to verify node creation behavior at update

Reviewed By: yungsters

Differential Revision: D79729178

fbshipit-source-id: 1c24c6a19ee994ee4ea7a916c47f227e151d65b4
2025-08-06 15:17:33 -07:00
David VaccaandFacebook GitHub Bot 54770cecc4 Mark JSInstance as InteropLegacyArchitecture (#53100)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53100

Mark JSInstance as InteropLegacyArchitecture

changelog: [internal] internal

Reviewed By: mlord93, cortinico

Differential Revision: D79732414

fbshipit-source-id: fc66d6cfef34b4ac66af724bf4336f4f4c38f447
2025-08-06 14:13:32 -07:00
Andrew DatsenkoandFacebook GitHub Bot 457190cc4b Add test for width, style, testID and tintColor (#53088)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53088

Changelog: [Internal]
As title

Reviewed By: rshest

Differential Revision: D79642765

fbshipit-source-id: 92862934fc72cfca2ce35c365fa7369d878d58d9
2025-08-06 09:38:29 -07:00
Maciej JastrzębskiandFacebook GitHub Bot 6965d57e75 fix(a11y): TextInput aria-label handling (#53051)
Summary:
The `aria-label` prop was ignored on `TextInput` component. Which resulted in screen reader not able to read it.

This PR forwards `aria-label` to `accessibilityLabel` in a manner similar to e.g. `View` and `Text`

## 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] - a11y: fix `aria-label` on `TextInput`

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

Test Plan:
Run RNTester => TextInput => Accessibility section under Accessibility Inspector or screen reader.

iOS fixed:
https://github.com/user-attachments/assets/68c3a2ef-7dfe-479c-97fc-cbe72108c45c

iOS baseline:
https://github.com/user-attachments/assets/2e8372ba-10dc-47d2-b6b1-9f664000de7d

Reviewed By: andrewdacenko

Differential Revision: D79635413

Pulled By: rshest

fbshipit-source-id: dd2f583d67c6c6c6393e02c5fe534308e1e2f921
2025-08-06 09:36:35 -07:00
Tommy NguyenandFacebook GitHub Bot bf2c3af93b fix(codegen): fix missing dependencies (#52884)
Summary:
`react-native/codegen` uses `babel/parser` and `babel/core` but does not declare dependency on them. Depending on how packages are hoisted (and especially in pnpm setups), this causes crashes during codegen.

Resolves https://github.com/facebook/react-native/issues/52883

## Changelog:

[GENERAL] [FIXED] - Add missing Babel dependencies

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

Test Plan: See https://github.com/facebook/react-native/issues/52883

Reviewed By: cortinico, christophpurrer

Differential Revision: D79103092

Pulled By: robhogan

fbshipit-source-id: ecaf690f994393a652ea7f0d4f30bbabeb23a434
2025-08-06 08:19:47 -07:00
generatedunixname537391475639613andFacebook GitHub Bot a4b958099c xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp (#53093)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53093

Reviewed By: rshest

Differential Revision: D79709943

fbshipit-source-id: b8d75b6e3b790c94dd3250654459afd782315d9f
2025-08-06 08:18:43 -07:00
Alex HuntandFacebook GitHub Bot b4164cd97c Move JInspectorNetworkReporter, add missing SoLoader call (#53055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53055

Moves the C++ part of `InspectorNetworkReporter.kt` into the `react_devsupportjni` JNI library, and adds missing `SoLoader.loadLibrary` call.

Replaces D79568759 / https://github.com/facebook/react-native/pull/53036.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D79638331

fbshipit-source-id: 5df450ad80e4532d6ada1e4dab51a1de6418a4e0
2025-08-06 08:14:31 -07:00
Andrew DatsenkoandFacebook GitHub Bot f526e91fda Add tests for src and srcSet (#53062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53062

Changelog: [Internal]
As title

Reviewed By: rshest

Differential Revision: D79642287

fbshipit-source-id: 59d7dbf7f2562ca550ac48eb9067469e6128e7c6
2025-08-06 08:08:44 -07:00
Andrew DatsenkoandFacebook GitHub Bot bb5d0df0e3 Add source tests (#53074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53074

Changelog: [Internal]
Add tests for source prop of Image.

Reviewed By: rshest

Differential Revision: D79605165

fbshipit-source-id: 400cb37f59966634a2ced3c95425be4dcb1fd1a3
2025-08-06 08:08:44 -07:00
Andrew DatsenkoandFacebook GitHub Bot a6ef65e06b Add resizeMode tests (#53061)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53061

Changelog: [Internal]
Add tests for resizeMode prop

Reviewed By: rshest

Differential Revision: D79600137

fbshipit-source-id: d802fb375f2f57f38a51d918d2045763dd79c440
2025-08-06 08:08:44 -07:00
Andrew DatsenkoandFacebook GitHub Bot 93694e3f5d Add referrerPolicy tests (#53073)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53073

Changelog: [Internal]
Add referrerPolicty for cross origin requests.

Reviewed By: rshest

Differential Revision: D79598735

fbshipit-source-id: 96a5b092a278993ac728a9413c1a9376bfe7a69a
2025-08-06 08:08:44 -07:00
Andrew DatsenkoandFacebook GitHub Bot 96ebf5e969 Add on<Event> props (#53060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53060

Changelog: [Internal]
Add tests for Image props that notify of image loading progress.

Reviewed By: rshest

Differential Revision: D79596580

fbshipit-source-id: 124ee1b4ac70710c4efa9b6e11a168b61fe29aed
2025-08-06 08:08:44 -07:00
Andrew DatsenkoandFacebook GitHub Bot 7bd1254eda Add tests for defaultSource and height (#53058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53058

Changelog: [Internal]
As title

Reviewed By: rshest

Differential Revision: D79566292

fbshipit-source-id: cd0d39d914d4e17ee6472be766ba18b0c3866d95
2025-08-06 08:08:44 -07:00
Sophie LandFacebook GitHub Bot 4b8dbe7642 fix: turn off build IDs for reproducibility (#53089)
Summary:
these cause issues for apps that want to be "reproducible" (i.e. the same code leads to the same output, which can be helpful for detemining if there's been any tampering or similar). see also https://gitlab.com/IzzyOnDroid/repo/-/wikis/Reproducible-Builds/RB-Hints-for-Developers#no-funny-build-time-generated-ids

I'm not exactly sure why this was set. it seems to have been introduced in https://github.com/facebook/react-native/commit/e3830ddffd9260fe071e0c9f9df40b379d54cf26 without any (public) explanation as to why it was needed?

## Changelog:

[ANDROID] [FIXED] - Turned off build IDs for native libraries, fixing issues with reproducibility

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

Test Plan: I've successfully used similar patches in my own app for a while.

Reviewed By: cipolleschi

Differential Revision: D79718924

Pulled By: cortinico

fbshipit-source-id: 7c609fa0b5b305cb759586fb1c7f332589ca9cc7
2025-08-06 08:07:14 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 99f1c30409 Don't populate props with default values for Text component (#53059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53059

# Changelog:
[Internal] -

This is a re-submit of the partially reverted https://github.com/facebook/react-native/pull/52905, which should work fine now on top of the changes stack that support the RN feature flags being safely used on the modules' top level.

Reviewed By: rubennorte

Differential Revision: D79640965

fbshipit-source-id: d8bda0dba662930d1343ea9d5155791a686b653b
2025-08-06 07:54:26 -07:00
Samuel SuslaandFacebook GitHub Bot 288f6d9f48 Back out "Make sure props default value is restored when disconnected from animated" (#53084)
Summary:
changelog: [internal]

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

This is causing glitches

Reviewed By: rozele

Differential Revision: D79705318

fbshipit-source-id: 0e25909837f0db9812af7835ea88f60390c6ae70
2025-08-06 06:13:14 -07:00
Ruslan LesiutinandFacebook GitHub Bot 421a0c7077 fix: reset maxDuration only after recording TracingStartedInPage event (#53080)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53080

# Changelog: [Internal]

We were accidentally resetting this before calculating the timestampf for the TracingStartedInPage event, which is the left boundary for the timeline window.

Reviewed By: sbuggay

Differential Revision: D79670865

fbshipit-source-id: c6b5f869e185d6d3c80cb7153891c72283c82418
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot 593bdc6762 Keep tracingMode on TraceRecordingState (#53077)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53077

# Changelog: [Internal]

Stores the tracing::Mode on a TraceRecordingState and updates the logic for:
- InstanceTracingAgent to enable PerformanceTracer with a specified window size
- RuntimeTracingAgent to only enable sampling profiler for CDP-initiated sessions

Reviewed By: sbuggay

Differential Revision: D79670864

fbshipit-source-id: 2c4eacb29666b59acbc508848a0a3d859f21a403
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot b358404f44 Override background Trace Recording if user initiated a new one (#53039)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53039

# Changelog: [Internal]

We can now distinguish these 2 different modes.

Reviewed By: sbuggay

Differential Revision: D79565934

fbshipit-source-id: 780678d1f50d4c1d73d55ebc95da0ea328fa2cb3
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot f66ef53962 Create TracingMode (#53035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53035

# Changelog: [Internal]

This adds an ability to distinguish different trace recordings, based on mode

Reviewed By: sbuggay

Differential Revision: D79557790

fbshipit-source-id: cbb216df86fa1a4692e1b82c8a14a6049b5c45ec
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot 989579c533 Stop potentially running trace recording if CDP session is destroyed (#52960)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52960

# Changelog: [Internal]

We never call `stopTracing()` on a HostTarget, if the Agent was destroyed.

This could only happen if the session was destroyed. There could me multiple sessions, so we have to keep the source of truth for recording status in a session state.

Reviewed By: sbuggay

Differential Revision: D79435494

fbshipit-source-id: db72ffdf6856974e980afa78d59dec4bf45df289
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot 8e97de473e Cleanup legacy tracing endpoints from Agents (#52965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52965

# Changelog: [Internal]

Reviewed By: sbuggay

Differential Revision: D79434656

fbshipit-source-id: 8c6b690ac6c22df8376651d14b940f74cf23dca3
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot f618ca4872 Use new endpoints in CDP TracingAgent (#52961)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52961

# Changelog: [Internal]

Now that we've implemented all required serializers and TraceRecordedState has everything needed, we can migrate TracingAgent to use this new infra.

Reviewed By: sbuggay

Differential Revision: D79433497

fbshipit-source-id: 8c63f0faa50844786b7af8860c22fc006dd38414
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot b764966c9a Expose start and stop tracing endpoints for HostTargetController (#52962)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52962

# Changelog: [Internal]

CDP Agents should interact with Targets by using Controllers:
https://www.internalfb.com/code/fbsource/[0b20b752c43f]/xplat/js/react-native-github/packages/react-native/ReactCommon/jsinspector-modern/HostTarget.h?lines=300-303

This diff adds public endpoinst for controlling the trace recording on a `HostTargetController` that will be used by `TracingAgent` later.

Reviewed By: sbuggay

Differential Revision: D79433500

fbshipit-source-id: 8ff45b1e2380206f0b72f8ba8b879543cf6b9933
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot b954fbf8b7 Implement serializer for TraceRecordingState (#52964)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52964

# Changelog: [Internal]

Now TraceRecordingState should capture everything we need in order to display a trace on a timeline.

We just need to serialize it properly into collection of serialized Trace Events that would be sent via `Tracing.dataCollected` CDP events.

This is what this serializer is doing.

Reviewed By: sbuggay

Differential Revision: D79434655

fbshipit-source-id: 6b6858db23077eb7305781b9b0d98af8dedd68ca
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot c8f260658d Record startTime on TraceRecordingState (#52967)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52967

# Changelog: [Internal]

We would need this to correctly serialize Runtime Sampling Profiles.

In case of recording the trace in the background, this might not be the value we would want to use, we would probably add another field or calculate it dynamically, depending on the tracing mode.

This is not the case for now, will be solved separately on top of the stack.

Reviewed By: sbuggay

Differential Revision: D79433502

fbshipit-source-id: 172ff19985d325585590794fb2523a24a6860221
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot fa9b195661 Record processId on TraceRecordingState (#52969)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52969

# Changelog: [Internal]

We would need this to correctly serialize Runtime Sampling Profiles.

Reviewed By: sbuggay

Differential Revision: D79433501

fbshipit-source-id: 43d10037351669a87623ffccf2b6da60961c0157
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3c637b09e6 Record InstanceTracing profile on TraceRecordingState (#52963)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52963

# Changelog: [Internal]

We are deprecating previous `InstanceTarcingProfile` struct, but not removing yet, since this is still used and we will migrate in one of the diffs at the top of the stack.

The `InstanceTracingProfile` will consist only of Trace Events that were captured by PerformanceTracer, and will not store Runtime Sampling Profiles.

There are multiple reasons for this:
1. As of right now, Runtime Sampling Profiles are completely independant from Instance Profiles and do not require anythings from Instance as a Target to be represented on a timeline.
2. Although PerformanceTracer is a singleton, it should be this way. It captures events for something that can only be dispatched if there is an allocated React Instance, so in the future PerformanceTracer could become a data-member of InstanceTarget.

Reviewed By: sbuggay

Differential Revision: D79433498

fbshipit-source-id: 0fdf09517488bc5c6c8eb604aee66535cdc19ffb
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot 5144062937 Record RuntimeSamplingProfile on TraceRecordingState (#52968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52968

# Changelog: [Internal]

Now that we've defined all actors and relationship between Agents, we can start recording profiles and store them on a recording state.

Reviewed By: sbuggay

Differential Revision: D79415396

fbshipit-source-id: 9639e59d619268d970b895da2e19dfd92c963a32
2025-08-06 05:48:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot a9da64fbf7 Create a local session for Tracing (#52966)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52966

# Changelog: [Internal]

The current design for Tracing is flawed. Right now the logic is mostly scattered around CDP Agents, lifetime of which is tied to CDP session.

This diff introduces a new approach:
- The HostTarget will be the only Target that has public entrypoints to startTracing as part of the jsinspector backend.
- It will create and own TraceRecording that acts as a local session. We won't use wording session here, because it is already reserved for CDP case.
- Every Target will implement TracingAgent, lifetime of which will be limited by lifetime of either Target or TraceRecording.
- All these TracingAgent will have a reference to TraceRecordingState, which they can mutate

This approach unblocks:
- Recording traces without active CDP sessions, for example in a background.
- Recording full instance reloads and multiple profiles for Instances and Runtimes.

{F1980838032}

Reviewed By: sbuggay

Differential Revision: D79371359

fbshipit-source-id: 034e984fd7e977457bd41a980e5feb049db3339d
2025-08-06 05:48:35 -07:00
generatedunixname537391475639613andFacebook GitHub Bot fce9f68f29 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.cpp (#53090)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53090

Reviewed By: rshest

Differential Revision: D79627030

fbshipit-source-id: fe36f901b2573689821ec3eacecc1f364d3c9183
2025-08-06 05:44:42 -07:00
Rubén NorteandFacebook GitHub Bot 0090333296 Add test to ensure baseline memory usage (#53072)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53072

Changelog: [internal]

This creates a test to make sure there are no changes in React Native dramatically increasing memory usage in simple scenarios.

Reviewed By: rshest

Differential Revision: D79646758

fbshipit-source-id: d7a863468adabb75de7ceb123d96131564bd0959
2025-08-06 05:40:02 -07:00
Rubén NorteandFacebook GitHub Bot 789fc57254 Improve API to take JS heap snapshots in Fantom (#53071)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53071

Changelog: [internal]

The current API to take JS heap snapshots has some problems:
1. Ergonomics: it requires you to input the filepath where you want to store the snapshot. This isn't aligned with the behavior we have for JS traces where the output path is provided to you.
2. It doesn't work in optimized builds, as it requires a specific option in Hermes.

For 1), this replaces `Fantom.saveJSMemoryHeapSnapshot(filePath)` with `Fantom.takeJSMemoryHeapSnapshot()` that outputs the snapshot in a predefined path and prints it to the console.

For 2), this adds a new environment variable to force building Hermes with memory instrumentation (`FANTOM_ENABLE_JS_MEMORY_INSTRUMENTATION`). This is exposed as an option and not set by default because it has a performance overhead at runtime that we don't want to pay (especially in benchmarks).

This option only works when using Buck in development, because we want to generate this new binary type on demand when necessary, instead of making it part of the prebuilts we do before running tests in OSS and CI.

Reviewed By: lenaic

Differential Revision: D79642314

fbshipit-source-id: a2980616a495bd6dca29c0709a9581db6fb3f2cc
2025-08-06 05:40:02 -07:00
Rubén NorteandFacebook GitHub Bot 2187f653f6 Improve filenames of JS sampling profiler traces (#53069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53069

Changelog: [internal]

This changes the names of the JS traces from Fantom from using a unix timestamp in the file name to using the ISO date:

- From: `View-itest.js-1754406329686.cpuprofile`
- To: `View-itest.js-2025-08-05T15:05:29.686Z.cpuprofile`

Reviewed By: rshest

Differential Revision: D79646760

fbshipit-source-id: d8a654724c1abc2d3e285ee658c2d390d3241d82
2025-08-06 05:40:02 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 743db63570 Fix logspam when there is no benchmarking results (#53091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53091

# Changelog:
[Internal] -
This fixes some excessive printing from the benchmarking results, which happened even if there was no benchmarks ran.

Reviewed By: rubennorte

Differential Revision: D79719026

fbshipit-source-id: 0e75d97ae9c762cab25007bfab5ca8a6dc43e148
2025-08-06 05:32:11 -07:00
Vitali ZaidmanandFacebook GitHub Bot 93a052c611 Changelog for 0.81.0-rc.5 (#53086)
Summary:
Add changelog entry for 0.81.0-rc.5

## Changelog:

[INTERNAL] Changelog for 0.81.0-rc.5

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D79717506

Pulled By: vzaidman

fbshipit-source-id: 6086894bc5609e5e250939bcc2008a01350c2afe
2025-08-06 05:13:03 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7d0bef2f25 Add warning if RCT_NEW_ARCH_ENABLED is set to 0 (#53070)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53070

As per title, this change adds a warning if you call `pod install` with `RCT_NEW_ARCH_ENABLED` set to 0.

## Changelog:
[iOS][Added] -  Add warning if RCT_NEW_ARCH_ENABLED is set to 0

Reviewed By: mdvacca

Differential Revision: D79655716

fbshipit-source-id: 516cc02f9b2dbddaae99c2d74bba249970641d1d
2025-08-06 04:56:19 -07:00
Ruslan LesiutinandFacebook GitHub Bot aa25ad22a2 Update debugger-frontend from 7dcbddd...9215667 (#53082)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53082

Changelog: [Internal] - Update `react-native/debugger-frontend` from 7dcbddd...9215667

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/7dcbddd636137a9604d69a99cc69221216cd4be6...921566790e9e16d0ecace6e49b3cfaace205958c).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [921566790](https://github.com/facebook/react-native-devtools-frontend/commit/921566790) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-08-05T18:09:32+01:00 | [feat: add React Native-only event for pre-enabling multiple layers of Tracing (#199)](https://github.com/facebook/react-native-devtools-frontend/commit/921566790) |

Reviewed By: sbuggay

Differential Revision: D79661411

fbshipit-source-id: 63c13de4c6f24bd669aed6397e6d08f00510237c
2025-08-06 03:41:09 -07:00
Nicola CortiandFacebook GitHub Bot 00175bd096 Compare nightly results up to 7 days in the back (#53065)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53065

Instead of checking results from the previous day, allow to go back up to 7
days in the past to check for previous runs.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79568067

fbshipit-source-id: 5d6fac6a06b4e26e52de6fbf6187ec8f8e44e10e
2025-08-06 03:04:02 -07:00
Nicola CortiandFacebook GitHub Bot f806851875 Store nightly outcome and compute daily broken/recovered from Firebase (#53066)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53066

This diff introduces the mechanism for us to store the result of nightly 3p
library integration on Firebase.
Having the result store, we can now query the result from the previous day and
report if the build is newly broken or recovered overnight.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79565536

fbshipit-source-id: ba839b2950462a7ca6186a163f93f062719304fb
2025-08-06 03:04:02 -07:00
Riccardo CipolleschiandFacebook GitHub Bot aa4555eaf1 Fix dynamic framework build (#53075)
Summary:
Pure cocoapods build with dyn frameworks was broken due to some missing dependencies with the new performance metrics of cdp

## Changelog:
[iOS][Fixed] - Fix pure cocoapods dynamic framework build

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

Test Plan:
Tested locally in RNTester with
```
USE_FRAMEWORKS=dynamic bundle exec pod install
```
and then building from Xcode

Reviewed By: cortinico

Differential Revision: D79676186

Pulled By: cipolleschi

fbshipit-source-id: ae6b81138fcae66c67bedadb1e1ad9cd6c4b6c35
2025-08-06 03:02:22 -07:00
nishan (o^▽^o)andFacebook GitHub Bot 138d0eb01d Add filter to native animated allowlist (#52920)
Summary:
Add filter to native animated allowlist.

## Changelog:

[GENERAL] [ADDED] - Allow filter usage with native animated driver.

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

Pick one each for the category and type tags:

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

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

Test Plan: Tested on RNTester

Reviewed By: joevilches

Differential Revision: D79473929

Pulled By: lunaleaps

fbshipit-source-id: de6fcc0f18a1d656688dce513d2cf48a3c9d4f09
2025-08-05 20:27:16 -07:00
Peter AbbondanzoandFacebook GitHub Bot 4503068117 Make ReactAccessibilityDelegate nullsafe (#53068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53068

Adds some assertion annotations and small null checks to `ReactAccessibilityDelegate` to comply with FB's Nullsafe annotation

Changelog: [Internal]

Reviewed By: arushikesarwani94

Differential Revision: D79645332

fbshipit-source-id: 707e4e6d4a5f09232af168c2f7c57c2fdbb1f08d
2025-08-05 16:11:34 -07:00
Sam ZhouandFacebook GitHub Bot af1bcb6d44 Mass replace $FlowIgnore with $FlowFixMe in react-native (#53076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53076

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D79672242

fbshipit-source-id: 560f057d8658ed602cf7241e584bade70d8f3a99
2025-08-05 15:44:41 -07:00
Rubén NorteandFacebook GitHub Bot 5936f29d6a Add test to ensure setUpDefaultReactNativeEnvironment does not access feature flags (#53057)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53057

Changelog: [internal]

This adds a Fantom test to ensure that `setUpDefaultReactNativeEnvironment` doesn't read any feature flags. This prevents catching this as a runtime issue when the feature flag system complains that feature flags were accessed before being overridden, which always would happen if this module read any flags (as it runs before any product code that sets overrides).

Reviewed By: rshest

Differential Revision: D79639890

fbshipit-source-id: 6997609b7bf84947a6da53b58e68f9edd5654912
2025-08-05 13:58:32 -07:00
Rubén NorteandFacebook GitHub Bot 527e308a90 Add private function in feature flags to reset internal JS state for testing (#53056)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53056

Changelog: [internal]

This exposes a utility method in `ReactNativeFeatureFlagsBase` to reset its internal state for testing purposes.

This is intentionally not exposed through `ReactNativeFeatureFlags` to avoid it being used at runtime.

Reviewed By: rshest

Differential Revision: D79639889

fbshipit-source-id: adfb6125d991994c9706d5952d309915fec8f815
2025-08-05 13:58:32 -07:00
Zeya PengandFacebook GitHub Bot 1f9667effa Make sure props default value is restored when disconnected from animated (#53043)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53043

## Changelog:

[Internal] [Changed] - Make sure props default value is restored when disconnected from animated

Reviewed By: sammy-SC

Differential Revision: D79566216

fbshipit-source-id: b23b10101dfac5027cd6d0f0926f6e41b39715ba
2025-08-05 13:28:17 -07:00
Andrew DatsenkoandFacebook GitHub Bot a0f93ea879 Add tests for crossOrigin (#53045)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53045

Changelog: [Internal]
Add tests for cross origin headers.

Reviewed By: rubennorte

Differential Revision: D79562333

fbshipit-source-id: ff8705b4e59c89bc48be29767bbdefbba9328534
2025-08-05 12:06:14 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 83e6eaf693 Prevent users from opting-out of the New Architecture (#53026)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53026

This change prevents users from opting out of the New Architecure.

The change is non breaking with respect to building an app: all the functions are still there, even if they are unreachable, in case users will still call them explicitly.
We hardcoded all the values to enable the New Architecture, so there is no way to disable it.

This is a behavioral breaking change, though.

## Changelog:
[iOS][Removed] - Removed the opt-out from the New Architecture.

Reviewed By: cortinico

Differential Revision: D79090048

fbshipit-source-id: 9779bfedf50748d7adbef5f7ef038f469e30efc2
2025-08-05 11:37:24 -07:00
Sam ZhouandFacebook GitHub Bot 01d5eebdb7 Remove random variants of suppress_types that have been fully cleaned up
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D79652708

fbshipit-source-id: 8027082b0566cca5700d40860272b7683082b275
2025-08-05 11:02:53 -07:00
Alex HuntandFacebook GitHub Bot 141c95697a Validate max requestable IO.read size (#53063)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53063

Update `IO.read` CDP method handler to validate the received `size` parameter.

This now accepts a max value of 10MB — adding a layer of safety in front of our current Android implementation, which fails at around ~15MB due to OkHttp limits.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D79646155

fbshipit-source-id: c777802105dc31cdcc7e9e960c880e689540fddd
2025-08-05 10:09:19 -07:00
Peter AbbondanzoandFacebook GitHub Bot 0f0a3cfce2 Provide ReactContext to experimental JSTouchDispatcher method (#53003)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53003

The new `onChildStartedNativeGesture` method accepts a nullable `ReactContext` value for the purpose of flushing active touch events. This change updates all callsites of that method to pass a `ReactContext`

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D79258727

fbshipit-source-id: 7b2950f514295dbe26822442c98079b8121cb3bf
2025-08-05 09:42:36 -07:00
Devan BuggayandFacebook GitHub Bot 551af31871 Update debugger-frontend from a7e4f59...7dcbddd (#53047)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53047

Changelog: [Internal] - Update `react-native/debugger-frontend` from a7e4f59...7dcbddd

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/a7e4f59675edbda995b0cb0d40f277a59a3baebf...7dcbddd636137a9604d69a99cc69221216cd4be6).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [7dcbddd63](https://github.com/facebook/react-native-devtools-frontend/commit/7dcbddd63) | sbuggay (sbuggay@gmail.com) | 2025-08-04T13:54:27-07:00 | [Add landingView query param enabling view focus on launch (#197)](https://github.com/facebook/react-native-devtools-frontend/commit/7dcbddd63) |

Reviewed By: huntie

Differential Revision: D79590789

fbshipit-source-id: 1868506dd401361a9843f24e67ffce9c6a5ffb64
2025-08-05 08:36:40 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 8ef39b491c Implement benchmark comparison of different feture flag configurations (#52925)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52925

# Changelog:
[Internal] -

This adds an extra "ranking" report when running Fantom benchmark vs different React Feature flag configurations.

It can be very useful when implementing some particular optimization, to streamline the before/after comparison wit this optimization enabled/disabled.

Reviewed By: andrewdacenko

Differential Revision: D79269601

fbshipit-source-id: f29e761e313d6857e5b3ac65faf2a387a84be9df
2025-08-05 08:34:35 -07:00
Rubén NorteandFacebook GitHub Bot 664f7c0dcf Add test to verify that components like View and Text are not loaded as a side-effect of environment initialization (#53053)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53053

Changelog: [internal]

This adds a Fantom test to ensure that setting up the RN environment doesn't trigger the initialization for React components like View and Text, which should be lazy loaded when necessary.

Reviewed By: rshest

Differential Revision: D79636160

fbshipit-source-id: ef1fbd6cd531eb7082dce000ba74a5eed451e259
2025-08-05 07:06:24 -07:00
Rubén NorteandFacebook GitHub Bot 14c869cee6 Reduce side-effects of AppRegistry (#53054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53054

Changelog: [internal]

We eagerly require `AppRegistry` from environment initialization (`InitializeCore`) because it has some side-effects that are necessary for error reporting (see https://github.com/facebook/react-native/issues/34649 and https://github.com/facebook/react-native/pull/34650), but this change makes a lot of modules to be eagerly initialized.

This reduces that to avoid loading modules that not necessary for environment setup, which allows us to do things like setting up feature flags before modules like `View` and `Text` have been initialized.

Reviewed By: rshest

Differential Revision: D79636159

fbshipit-source-id: a3f1e0db3dd69112ceef3ea339167694e2457454
2025-08-05 07:06:24 -07:00
Andrew DatsenkoandFacebook GitHub Bot dc322d91d2 Add ImageSource debug convertions (#53042)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53042

Changelog: [Internal]
Add debug convertions for ImageSource.

Reviewed By: rubennorte

Differential Revision: D79561513

fbshipit-source-id: f48d640d78b34a6e72d120f41f1f32ab963d1069
2025-08-05 07:05:54 -07:00
Andrew DatsenkoandFacebook GitHub Bot e9fdb23ed2 Test blurRadius (#53037)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53037

Changelog: [Internal]
Add `blurRadius` test.

Reviewed By: rshest

Differential Revision: D79552155

fbshipit-source-id: 710b2f328857a32ecb0db00c36f3eedabe74a249
2025-08-05 07:05:54 -07:00
Andrew DatsenkoandFacebook GitHub Bot d58601b59f Add base public API tests (#53040)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53040

Changelog: [Internal]

Add base public API integration tests for Image component.

Reviewed By: rubennorte

Differential Revision: D79551685

fbshipit-source-id: 467d3573102675f4ad1e3757894795b0ad9a8413
2025-08-05 07:05:54 -07:00
Rubén NorteandFacebook GitHub Bot b903ed7940 Add support for JS sampling profiler (#52827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52827

Changelog: [internal]

This adds **support for creating Hermes/JS sampling profiler traces in Fantom**, which is especially useful when running benchmarks.

Usage:
```
FANTOM_PROFILE_JS=1 yarn fantom Animated-benchmark
```

Output:

 {F1980642216}

After this, the trace is fully symbolicated.

Can be opened directly in Google Chrome:
{F1980642229}

Or in the built-in viewer in VSCode:

 {F1980642242} {F1980642240} {F1980642241}

When collapsing frames in the Flame Chart viewer in VSCode, we can quickly identify opportunities for optimizations.

This also supports multi-config environments. In that case, trace file names are created using a short representation of the configuration.

User guide for benchmarks in Fantom, including how to use this, will be done in a future diff.

NOTE: This still doesn't work in OSS because we don't support optimized mode there. In dev mode, there's a segmentation fault coming from this line: `hermesRuntime->sampledTraceToStreamInDevToolsFormat(fileStream)`

Reviewed By: sammy-SC

Differential Revision: D78905646

fbshipit-source-id: 382ddd5034db601309bd118cedde2fe0d57fde98
2025-08-05 05:36:26 -07:00
Rubén NorteandFacebook GitHub Bot 064750daa8 Improve type safety of constants passed from runner to runtime (#53034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53034

Changelog: [internal]

This is just a refactor to make sure that the constants we pass from the Fantom runner to its runtime are correct by using Flow to typecheck it.

Reviewed By: andrewdacenko

Differential Revision: D79565574

fbshipit-source-id: cbbab9cdec5ef5b3c82b929b8939c76c0ef41823
2025-08-05 05:36:26 -07:00
Nicola CortiandFacebook GitHub Bot 36bdd7b9cb Remove unused ReactSafeAreaViewShadowNode (#52985)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52985

This class is essentially a wrapper of LayoutShadowNode with no extra logic added.
Let's remove it.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D79450688

fbshipit-source-id: 943e10e602cb9a5b77fca81e11d2333828b27813
2025-08-05 05:16:57 -07:00
Nicola CortiandFacebook GitHub Bot d5d21d0614 Remove possibility to newArchEnabled=false in 0.82 (#53025)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53025

It's now time to say goodbye to the Legacy Architecture :')

This change hardcodes the `newArchEnabled` property to true, and warns the users
if they're attempting to set it to false.

Changelog:
[Android] [Breaking] - Remove possibility to newArchEnabled=false in 0.82

Reviewed By: cipolleschi

Differential Revision: D78560296

fbshipit-source-id: ccfc45d2f7f21cc20e063cb901d76be3d41458d6
2025-08-05 05:11:12 -07:00
Rubén NorteandFacebook GitHub Bot de5093c887 Add test for MemoryInfo (#53052)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53052

Changelog: [internal]

Adds a test for `performance.memory`.

Reviewed By: hoxyq

Differential Revision: D79633246

fbshipit-source-id: 8f9df0219de6c04c8be75af4c9d03576a8164ea9
2025-08-05 03:46:35 -07:00
Sam ZhouandFacebook GitHub Bot 6b354155ed Replace $FlowFixMe(Props|State|Empty) with just $FlowFixMe (#53002)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53002

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D79524515

fbshipit-source-id: 18b96538a62c7ae5912b1e89d2b50c1420c7eaf5
2025-08-04 11:43:00 -07:00
Rubén NorteandFacebook GitHub Bot 21bccda26c Remove PerformanceEntryReporter::getCurrentTimeStamp (#53030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53030

Changelog: [internal]

Removes `PerformanceEntryReporter::getCurrentTimeStamp` in favor of `HighResTimeStamp::now`, to make the source of truth more explicit.

Reviewed By: hoxyq

Differential Revision: D79560370

fbshipit-source-id: 0ccf2bf511781d3c47c6ddb4dd7f2061aab152b5
2025-08-04 11:21:03 -07:00
Rubén NorteandFacebook GitHub Bot 7c1c833ee9 Remove redundant methods to mock timers from PerformanceEntryReporter and NativePerformance (#53028)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53028

Changelog: [internal]

Now that we have mocking at a more fundamental level (`HighResTimeStamp` API) we can replace other timing mocks with that one.

This does it for `PerformanceEntryReporter` and the `NativePerformance` module.

Reviewed By: hoxyq

Differential Revision: D79557640

fbshipit-source-id: 86579b8bb586190ab7cc8721f30e60b3ef789798
2025-08-04 11:21:03 -07:00
Rubén NorteandFacebook GitHub Bot 2658e21a62 Make test for LongTasks API deterministic and re-enable on Github (#53018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53018

Changelog: [internal]

This makes the test for LongTasks API use the new API for mocking timers in Fantom to make it deterministic, and re-enables it on Github.

Reviewed By: rshest

Differential Revision: D79554724

fbshipit-source-id: 984c66ecd7c20eb972ba1e6b19944532acb82246
2025-08-04 11:21:03 -07:00
Rubén NorteandFacebook GitHub Bot f2e72c3859 Implement HighResTimeStamp mocking in Fantom (#53019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53019

Changelog: [internal]

This adds support for mocking `HighResTimeStamp` values in Fantom tests via a new `Fantom.installHighResTimeStampMock` function.

See new tests for more details on how it works.

Reviewed By: rshest

Differential Revision: D79554723

fbshipit-source-id: 8b0fb292948be118c7616fde1a8a84014af82de8
2025-08-04 11:21:03 -07:00
Rubén NorteandFacebook GitHub Bot f1cf4894ff Allow mocking HighResTimeStamp in debug builds (#53020)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53020

Changelog: [internal]

This adds a new feature to `HighResTimeStamp` to set a custom timestamp provider for "now" that can be useful for testing, only in debug builds to avoid potentially regressing performance.

Reviewed By: hoxyq, rshest

Differential Revision: D79554725

fbshipit-source-id: c325d05999b9e2d69f769b61f15c763446777a0a
2025-08-04 11:21:03 -07:00
Rubén NorteandFacebook GitHub Bot 8dc162a56a Small refactor of HighResTimeStamp (#53021)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53021

Changelog: [internal]

Moving the logic to set the default value for `HighResTimeStamp` to a shared function, to simplify further changes.

Reviewed By: rshest

Differential Revision: D79554726

fbshipit-source-id: cd0d4567ef63d386d28e0325203169323e97b207
2025-08-04 11:21:03 -07:00
Fabrizio CucciandFacebook GitHub Bot 893730633c Use buttonState to distinguish ACTION_DOWN and ACTION_HOVER_EXIT (#53033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53033

This diff replaces the logic introduced in D72078450 to prevent `onPointerEnter`/`onPointerLeave` from firing when a button is pressed. The new approach trades off some complexity for reliability: instead of deferring `ACTION_HOVER_EXIT` handling to the next frame, we now suppress it immediately if any button is pressed (`buttonState != 0`). This simpler logic appears to work reliably on Quest devices, though it may behave differently on the Android emulator (something we’ll monitor).

The main reason for this change is that deferring ACTION_HOVER_EXIT introduces problems in newer Spatial React use cases, particularly when a single component hierarchy spans multiple roots. For example, when hovering between ReactSurfaceRoot and another root like VolumetricWindow, deferring ACTION_HOVER_EXIT can lead to incorrect enter/exit ordering:

* Cursor starts hovering over `ReactSurfaceRoot`
* Cursor moves to `VolumetricWindow`
* `ACTION_HOVER_EXIT` (`ReactSurfaceRoot`) — deferred
* `ACTION_HOVER_ENTER` (`VolumetricWindow`) — processed
* `ACTION_HOVER_EXIT` (`ReactSurfaceRoot`) — processed (too late)

This results in inconsistent hover state updates across roots, which this diff resolves by handling `ACTION_HOVER_EXIT` immediately when appropriate.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D79504775

fbshipit-source-id: ea97bff48ddf4d3d09caf56ca29057c202b12409
2025-08-04 11:10:10 -07:00
Mateo GuzmánandFacebook GitHub Bot d547d9e56e Kotlin: redundant unit return type [1/2] (#52993)
Summary:
Fixing some warnings from static code analysis regarding [redundant unit return type](https://www.jetbrains.com/help/inspectopedia/RedundantUnitReturnType.html).

## Changelog:

[INTERNAL] - Kotlin: redundant unit return type [1/2]

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

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

Reviewed By: cortinico

Differential Revision: D79546007

Pulled By: rshest

fbshipit-source-id: 017cb3b70333fe652ecb1bdca751fa4f56f737fd
2025-08-04 11:04:51 -07:00
Alex HuntandFacebook GitHub Bot e39fd8f79c Fix mimeType parsing for CDP responses (#53027)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53027

Tweaks MIME type parsing in CDP Network messages, now matching Chrome.

This fixes response preview behaviour by the frontend for text response previews that are `base64Encoded` 🙌🏻 (we were observing these for JSON `fetch` calls on iOS).

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D79559495

fbshipit-source-id: 2565af7587fc6fbdd3ef6fcbb10c558341ddfbdc
2025-08-04 10:29:37 -07:00
Alex HuntandFacebook GitHub Bot fa66e314b2 Implement Network.loadingFailed (#53023)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53023

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D79555222

fbshipit-source-id: bfbe36edc867b1fc7a44d8e998489ef1d8896331
2025-08-04 10:04:02 -07:00
Alex HuntandFacebook GitHub Bot ea50245e1e Update InspectorNetworkReporter to avoid overhead for CDP-only methods (#53022)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53022

Following D77799617, D77927896, updates `InspectorNetworkReporter.kt` to check `isDebuggingEnabled` internally and avoid work/communication over the JNI layer — to minimise impact on the Android Network stack.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D78004462

fbshipit-source-id: 2bea2ee0592d68d1cb330ac82e8b3b227b54a675
2025-08-04 10:04:02 -07:00
Nolan O'BrienandFacebook GitHub Bot 323fe3a5d4 Fix exhaustive switches (#53032)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53032

## Changelog:

[General][Fixed] - Add default cases to switch statements in headers

Differential Revision: D79148595

fbshipit-source-id: e7260b5e9356b60b238b9f75ab1809fbbbbbeaf4
2025-08-04 09:42:15 -07:00
Samuel SuslaandFacebook GitHub Bot 0f912f8312 make ivars in NativeAnimatedNodesManager const (#53015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53015

changelog: [internal]

marking a few fields as const to prevent accidental change.

Reviewed By: rshest

Differential Revision: D79443448

fbshipit-source-id: 32a44f7f0c43c240879c77058ef6672885488191
2025-08-04 08:57:06 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot d03151f561 Mitigate "Feature flags were accessed before being overridden" error (#53031)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53031

# Changelog:
[Internal] -

This partially reverts https://github.com/facebook/react-native/pull/52905, as in some configurations we don't appear to be able to use RN feature flags on the module level.

The usage is removed for now to unbreak the builds, with a follow up to resolve it in an adequate manner.

Reviewed By: hoxyq

Differential Revision: D79562056

fbshipit-source-id: 45bd896d572ff926a4c2dfa98334bf998718d86b
2025-08-04 08:47:18 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 75e04b8c41 Add documentation for updating the issue triage oncall
Summary:
This Diff simply adds some docs on how the secret must be formatted, and removes a print that would expose the triager IDs is anyone would look at the logs (not a big deal given that the ids are public on Discord, though).

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D79556988

fbshipit-source-id: 23d6e72141dff4e91242cc1d9f5b95ebaf5ca858
2025-08-04 08:28:48 -07:00
Peter AbbondanzoandFacebook GitHub Bot 1828c53f85 Emit scroll end events when fling animator completes (#52989)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52989

Adds a call to `NativeAnimatedModule`'s `userDrivenScrollEnded` method whenever a scroll event completes a smooth scroll animation. This is necessary in cases where Animated events control any layout properties of children and we need to force the shadow tree to resync with the native tree. For example, if a scroll view's child transforms its scale based on the scrollX or scrollY properties and the user triggers a `scrollToOffset` or `scrollToIndex` call, we don't update the layout of that child until the next state change.

Changelog: [Android][Fixed] - Fixed an issue where shadow tree and native tree layouts mismatch at the end of a scroll event

Reviewed By: sammy-SC

Differential Revision: D79464176

fbshipit-source-id: fee5f1c522714dbcddf8836de291c05d10e6e90e
2025-08-04 08:19:16 -07:00
Nicola CortiandFacebook GitHub Bot ea1aff455a Make ReactCxxErrorHandler internal (#53024)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53024

This class is Legacy Arch and is not used in OSS. Let's make it internal.

Changelog:
[Internal] [Changed] -

Reviewed By: RSNara

Differential Revision: D79556615

fbshipit-source-id: d157fe8f04784038d64657c6d240b0c51e41d82d
2025-08-04 07:51:30 -07:00
Ruslan LesiutinandFacebook GitHub Bot dd7ab0f833 forward fix tests after changes to PerformanceTracer (#53016)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53016

# Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D79554532

fbshipit-source-id: 83e68f714974083238f97e2ef1affa6dee3b116f
2025-08-04 06:34:45 -07:00
Ruslan LesiutinandFacebook GitHub Bot bfd6c6d8fc fix: removed constexpr from now() (#53014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53014

# Changelog: [Internal]

This doesn't make sense, I've probably overlooked it while applying this to other methods.

Reviewed By: rubennorte

Differential Revision: D79552990

fbshipit-source-id: a7dc428dfcc86a08a9e52655f9878795b8e58c1c
2025-08-04 06:03:41 -07:00
Rubén NorteandFacebook GitHub Bot 2016118aeb Centralize path definitions for Fantom builds and move to .out (#52829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52829

Changelog: [internal]

Just a small refactor to move the definitions of output paths to a specific module. We'll add more to this in a latter diff.

Reviewed By: sammy-SC

Differential Revision: D78905645

fbshipit-source-id: 011e6cec13396301dad8e76400b6f2b9e13568f0
2025-08-04 05:56:51 -07:00
Rubén NorteandFacebook GitHub Bot 6760383470 Create source maps for Fantom lazily (#52786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52786

Changelog: [internal]

It takes around 300ms to generate each source map file, and we really only need them if tests throw errors. Requesting source maps also increases contention to access the Metro server from each test worker.

This refactors the code so we only generate them in that case, which could save up to 20s in test execution time.

Reviewed By: rshest

Differential Revision: D78807672

fbshipit-source-id: af9f0f0377ddcf05014b5aca0b28db938dfb4ce2
2025-08-04 05:56:51 -07:00
Rubén NorteandFacebook GitHub Bot 5c2b9eda69 Refactor runner to use a single instance of Metro for each run (#52777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52777

Changelog: [internal]

This significantly speeds up test execution in Fantom (around 2x in OSS and 6x at Meta) by starting a Metro server before all tests runs and reusing it across all tests to build test bundles, instead of spinning up a new Metro instance every time we run each test.

The architecture change (also considering the previous change in buck prebuilds) looks like this:
{F1980689532}

This is how is impacts execution times (compared to the baseline):
* OSS
  * Before: 62s {F1980564286}
  * After: 30s (**2x faster**) {F1980564265}

Reviewed By: andrewdacenko

Differential Revision: D78741903

fbshipit-source-id: b209f88925e49cc2a2067e8df9b7fa9a29b4c8d2
2025-08-04 05:56:51 -07:00
Rubén NorteandFacebook GitHub Bot 3ecd48fa91 Refactor Fantom runner to decouple compilation from execution to speed up test execution (#52758)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52758

Changelog: [internal]

This is a change to how Fantom tests run in Meta infra via Buck.

After this, the biggest opportunity will be optimizing how we generate bundles with Metro.

Reviewed By: christophpurrer

Differential Revision: D78672863

fbshipit-source-id: 1152907f3ba60e7d2e48bcc588f3c07aef7bb393
2025-08-04 05:56:51 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot f047c9b42b Remove props that set by default for Text component on JS side (#52905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52905

Similarly to [this PR](https://github.com/facebook/react-native/pull/51225), we do it for the Text component now: we don't set any non-default value props (most prominently, the accessibility ones) before passing this to native.

This saves bandwidth and potentially improves the prop parsing time, which existing Fantom benchmarks do confirm.

This is implemented behind a feature flag, which is false by default (will use it to run an experiment before rolling out).

**NOTE:** This implementation forks the whole text component, as suggested by rubennorte, in order to isolate the changes and with the ultimate goal of removing the old version once the experiment is concluded.

## Changelog:
[Internal] - Text no longer sets any default accessibility props, which should not result in visible changes in behaviour but may affect snapshot tests.

Reviewed By: rubennorte

Differential Revision: D79177652

fbshipit-source-id: a39430464fd5edec953b4c91be7ef9620ebd75ac
2025-08-04 05:29:19 -07:00
Nicola CortiandFacebook GitHub Bot c37f3ed8c6 Remove unnecessary ReactNoCrashBridgeNotAllowedSoftException (#52987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52987

This class is unnecessary. Is also public for no real reason.
Instead we should use `ReactNoCrashSoftException` directly.

I'm not marking this as breaking as users hsould not be catching this class.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D79451567

fbshipit-source-id: 4d6f45b3006c79969fcf141002d34a72bf88901a
2025-08-04 04:50:59 -07:00
lukmccallandFacebook GitHub Bot 2f46a49b8d Fix ReactHostImpl.nativeModules always returning an empty list (#52986)
Summary:
During the Expo QA process, we discovered that `ReactContext.reactApplicationContext.nativeModules` always returns an empty list (https://github.com/expo/expo/blob/4e2bbb23edda74d0e24756fd1735b8763e38f7a7/packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/ReactExtensions.kt#L12). This happens because, during object creation, the `reactInstance` is always null.

## Changelog:

[ANDROID] [FIXED] - Fix `ReactHostImpl.nativeModules` always returning an empty list

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

Test Plan: - RN tester compiles 

Reviewed By: mdvacca

Differential Revision: D79451613

Pulled By: cortinico

fbshipit-source-id: d5341bcc1193eb948db4e99f16ba32a63073a6db
2025-08-04 04:46:56 -07:00
Mateo GuzmánandFacebook GitHub Bot f273c63d37 Kotlin: obvious explicit type (#52990)
Summary:
Fixing some warnings from static code analysis regarding [obvious explicit type](https://www.jetbrains.com/help/inspectopedia/RedundantExplicitType.html#locating-this-inspection).

## Changelog:

[INTERNAL] - Kotlin: obvious explicit type

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

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

Reviewed By: cortinico

Differential Revision: D79546014

Pulled By: rshest

fbshipit-source-id: 1b66edde3185911b137e2c77673779cc613fae74
2025-08-04 04:28:50 -07:00
Rubén NorteandFacebook GitHub Bot b708d2da61 Disable LongTasksAPI on Github CI (#53009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53009

Changelog: [internal]

This disables the test for LongTasks API on Github CI as the execution speed there is unreliable and makes the current tests flaky.

This happens because the test is timing dependent, but the alternative would be to mock some core behaviors that I think might be even worse.

Reviewed By: cortinico

Differential Revision: D79510480

fbshipit-source-id: 277e42e36aa6dfebf4745d094541a667f58a0996
2025-08-04 03:54:58 -07:00
Rubén NorteandFacebook GitHub Bot 4289cff268 Add isOSS to Fantom constants (#53010)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53010

Changelog: [internal]

Exposing this value so we can disable some tests in some scenarios in a following this.

Reviewed By: cipolleschi

Differential Revision: D79510481

fbshipit-source-id: 632d9a008943ed40c24878b5561065b6ede1d689
2025-08-04 03:54:58 -07:00
Nicola CortiandFacebook GitHub Bot 691d4744b3 Mark NotThreadSafeBridgeIdleDebugListener as LegacyArchitecture (#52988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52988

This class should be marked as `LegacyArchitecture` while it was not.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D79451041

fbshipit-source-id: 62c5d35821e354ea851eaccac909bf6bd9157f09
2025-08-04 03:51:08 -07:00
Alex HuntandFacebook GitHub Bot bbcafbbffe Pin Node.js version in GitHub Actions to 24.4.1 (#53013)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53013

Quick fix to restore CI on `main`. `actions/setup-node` is now pulling Node.js `24.5.0`, which introduces a bug affecting `packages/dev-middleware/src/__tests__/` Jest tests.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D79551277

fbshipit-source-id: 51951ad8ffe376a478da268b50aa54ac2d9bba03
2025-08-04 03:33:14 -07:00
Rubén NorteandFacebook GitHub Bot c535e7c1c9 Make TextInput test follow convention and add tests for all methods (#53011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53011

Changelog: [internal]

This restructures the test for `TextInput` to follow the convention:

```
describe('<TextInput>', () => {
  describe('props', () => {
    /* ... */
  });

  describe('ref', () => {
    /* ... */
  });
});
```

It also adds tests for all methods.

Reviewed By: sammy-SC

Differential Revision: D79511032

fbshipit-source-id: 118198bdb1a86c2a9e0f41ff0b81bcd62b535d9f
2025-08-04 03:17:11 -07:00
Nicola CortiandFacebook GitHub Bot 742ef3d661 AGP to 8.12.0 (#52973)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52973

This bumps AGP to the latest stable version.

Changelog:
[Android] [Changed] - AGP to 8.12.0

Reviewed By: rshest

Differential Revision: D79436778

fbshipit-source-id: 3071c0108af064573c087aaf7b92d0b10c1adc6a
2025-08-04 02:55:55 -07:00
Nicola CortiandFacebook GitHub Bot d42335007b Update debugger_bug_report.yml (#52981)
Summary:
This label was renamed at some point and it broke the issue template. This fixes it.

## Changelog:

[INTERNAL] -

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

Test Plan: N/A

Reviewed By: mdvacca

Differential Revision: D79448155

Pulled By: cortinico

fbshipit-source-id: 2312fc5a0a82a65ca908af58dc74348141c16ca2
2025-08-04 02:30:24 -07:00
Peter AbbondanzoandFacebook GitHub Bot 87749470cc Ensure active touches are swept before accepting a child native gesture (#52995)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52995

Fabric retains views by ID when `JSTouchDispatcher` receives a touch event, but does not sweep these same views if a child native gesture is started between the `ACTION_DOWN` and `ACTION_UP` actions of the touch. As a result, we never end up calling into that view's manager's `onDropViewInstance` method and can't perform reliable teardown of the view since it's stuck in this "touched" state.

This is change adds a new condition to check if `JSTouchDispatcher` should sweep active touches when a child native gesture is started, and only applies the check to `ReactSurfaceView` to start. The check is also only enabled if the `sweepActiveTouchOnChildNativeGesturesAndroid` flag is set.

Changelog: [Internal]

Reviewed By: jehartzog

Differential Revision: D79230277

fbshipit-source-id: c15b888ec932319f1bda05b8ef5eec39e5d08710
2025-08-03 18:04:43 -07:00
Peter AbbondanzoandFacebook GitHub Bot f2964e17cd Add feature flag to perform gesture sweep in JSTouchDispatcher (#52972)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52972

Fabric retains views by ID when `JSTouchDispatcher` receives a touch event, but does not sweep these same views if a child native gesture is started between the `ACTION_DOWN` and `ACTION_UP` actions of the touch. As a result, we never end up calling into that view's manager's `onDropViewInstance` method and can't perform reliable teardown of the view since it's stuck in this "touched" state.

This is the first of a few changes to add a new feature flag `sweepActiveTouchOnChildNativeGesturesAndroid` to allow the `JSTouchDispatcher` to sweep active touches when a child native gesture is started. Running experiments internally to confirm that there are no unintended side effects from flushing the active touch.

Changelog: [Internal]

Reviewed By: jehartzog

Differential Revision: D79257465

fbshipit-source-id: 1ca79e77b21d8086c4df6753b16b1d8d922cd8d5
2025-08-03 18:04:43 -07:00
Sam ZhouandFacebook GitHub Bot 1b62d55ffb Unbreak react-native CI (#52997)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52997

Quick followup of D79481936

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D79495826

fbshipit-source-id: e133cf31800455eb4f4968d6995525fa8a843a77
2025-08-01 22:31:37 -07:00
Sam ZhouandFacebook GitHub Bot 16fa3d5da4 Update prettier-plugin-hermes-parser in fbsource to 0.31.1 (#52996)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52996

Bump prettier-plugin-hermes-parser to 0.31.1.

Changelog: [internal]

Reviewed By: pieterv

Differential Revision: D79481936

fbshipit-source-id: 4decd5c92722f935a6a03b6d2205bc31b864fb5d
2025-08-01 20:18:36 -07:00
Pieter VanderwerffandFacebook GitHub Bot 4c7d7a903e Deploy 0.278.0 to xplat (#52994)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52994

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D79463433

fbshipit-source-id: c6f24199c7899dd618e807b2cd65b0b3673c92ce
2025-08-01 16:51:38 -07:00
Samuel SuslaandFacebook GitHub Bot 597fe66a75 avoid excessive logs in C++ Animated (#52992)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52992

changelog: [internal]

do not log on every frame to make logs more readable. The callbacks are only set during construction and there is no value in logging on every commit props.

Reviewed By: rshest

Differential Revision: D79436988

fbshipit-source-id: 26c6cbadd5ae0efa8575c7f85e4c0d90e2ef6215
2025-08-01 16:07:33 -07:00
Ramanpreet NaraandFacebook GitHub Bot 9c8a4c2297 core: Remove legacy components (#52118)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52118

This diff aims to remove all legacy components from react native core.

Reviewed By: mdvacca

Differential Revision: D72733503

fbshipit-source-id: 3ed28c252c79b5a1ead794d758d1cf5bc265f265
2025-08-01 15:43:55 -07:00
Rubén NorteandFacebook GitHub Bot c5fb371061 Add test for View refs (#52982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52982

Changelog: [internal]

Just adding a few tests for `View` refs, to show as an example of what a test for a public component should have.

Reviewed By: rshest

Differential Revision: D79447449

fbshipit-source-id: 75b9dbb45824d927bcf63472da25c7c5a52c7eb6
2025-08-01 10:33:01 -07:00
Rubén NorteandFacebook GitHub Bot 68e5a24ef7 Restructure Fantom test for View to follow convention (#52983)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52983

Changelog: [internal]

Just moving some tests that were defined under `<View>` that were related to styles, to under `<View> > props > style`.

Reviewed By: rshest

Differential Revision: D79447450

fbshipit-source-id: e97cc4e058ffc8170b7fa74176cc8dc27e26cfde
2025-08-01 10:33:01 -07:00
Rubén NorteandFacebook GitHub Bot c28a601d80 Add tests for refs in Text (#52980)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52980

Changelog: [internal]

Adds Fantom tests for the behavior of `refs` in `Text` components.

Reviewed By: rshest

Differential Revision: D79436148

fbshipit-source-id: 6d357740303f4868d176af7b4559891af77b79f8
2025-08-01 10:33:01 -07:00
Artem KholodnyiandFacebook GitHub Bot e8c6a5397b Fix react-native build
Summary:
bypass-github-export-checks

Changelog: [internal]

Reviewed By: Abbondanzo

Differential Revision: D79441010

fbshipit-source-id: 249912a6cf3350b98af6cf910151fc5a95edce2d
2025-08-01 10:17:47 -07:00
Samuel SuslaandFacebook GitHub Bot 310bd4e5bb Back out "move C++ Animated to ReactCommon" (#52984)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52984

changelog: [internal]

breaks Github CI, let's back it out for now.

Original commit changeset: 141f0ce7b993

Original Phabricator Diff: D79184118

Reviewed By: rubennorte

Differential Revision: D79444246

fbshipit-source-id: 8aa35ed450804c77389601a4ea820b1dd552ad98
2025-08-01 10:10:10 -07:00
Rubén NorteandFacebook GitHub Bot f497259901 Remove flakiness in LongTasksAPI test (#52974)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52974

Changelog: [internal]

The test for LongTasks is flaky on Github and I made a change to figure out why (D79366370 / https://github.com/facebook/react-native/pull/52948). It seems that the long task happens before the artificial task we're using for testing, so we can update the test to filter those out.

Reviewed By: cortinico

Differential Revision: D79441987

fbshipit-source-id: 99296d704cfec2e61ca29d06878df171231f4e78
2025-08-01 07:54:28 -07:00
Sam ZhouandFacebook GitHub Bot c43a39925f Replace $FlowIssue with $FlowFixMe (#52976)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52976

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D79400163

fbshipit-source-id: b0c4f10b18b99550bdf95be620187f011b62f2f7
2025-08-01 07:50:00 -07:00
generatedunixname537391475639613andFacebook GitHub Bot e1f6a19d38 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp (#52956)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52956

Reviewed By: rshest

Differential Revision: D79335606

fbshipit-source-id: c6aca07f135aab62e0dbda352d4bdc4e81bdc59e
2025-08-01 06:13:34 -07:00
Artem KholodnyiandFacebook GitHub Bot f70c39d836 Fix obfuscated scale type names (#52958)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52958

Changelog: [Internal]

Reviewed By: kartavya-ramnani, oprisnik, rshest

Differential Revision: D79354202

fbshipit-source-id: d4e84749324ff75a283c940631ac1199694bc92e
2025-08-01 06:07:14 -07:00
Samuel SuslaandFacebook GitHub Bot 8c305a0b64 move C++ Animated to ReactCommon (#52944)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52944

changelog: [internal]

this should be in ReactCommon, not in cxx platform as it is not platform specific.

Reviewed By: rubennorte, christophpurrer

Differential Revision: D79184118

fbshipit-source-id: 141f0ce7b993d229c5d832d22c54471d32681173
2025-08-01 04:56:48 -07:00
Mateo GuzmánandFacebook GitHub Bot 77be1a3dc4 Kotlin: accessor call can be replaced with property access syntax (#52950)
Summary:
Fixing a few warnings from static code analysis regarding the [accessor call can be replaced with property access](https://www.jetbrains.com/help/inspectopedia/UsePropertyAccessSyntax.html) rule

## Changelog:

[INTERNAL] - Kotlin: accessor call can be replaced with property access syntax

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

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

Reviewed By: cortinico

Differential Revision: D79431292

Pulled By: rshest

fbshipit-source-id: 09ad40c09512def9ab33eaeb70da057f742ae4a1
2025-08-01 04:33:29 -07:00
Zeya PengandFacebook GitHub Bot 504cf3e933 cleanup TODOs in fantom tests around cxxNativeAnimatedRemoveJsSync (#52949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52949

## Changelog:

[Internal] [Changed] - cleanup TODOs in fantom tests around cxxNativeAnimatedRemoveJsSync

Previous attempt to remove js sync so far is working expectedly since https://github.com/facebook/react-native/pull/52904 / D79080739

Reviewed By: sammy-SC

Differential Revision: D79373130

fbshipit-source-id: e310b9250ba5da2e55435468f46b75977e46f111
2025-07-31 15:20:54 -07:00
Rubén NorteandFacebook GitHub Bot 707a8631ca Implement maxDuration option for PerformanceTracer (#52935)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52935

Changelog: [internal]

This implements a new option for `PerformanceTracer::startTracing` to specify a maximum duration for the recording, keeping only the last record events.

This will allow us to implement an "always-on" profiling mode for RN with a low overhead. In the future, we can extend this with a `maxBufferSize` option.

See the comment in `PerformanceTracer.cpp` for implementation details.

Reviewed By: hoxyq

Differential Revision: D79340014

fbshipit-source-id: 3260724a775a574fe5e52d47358a3a5abd0d2ee7
2025-07-31 14:29:24 -07:00
Rubén NorteandFacebook GitHub Bot 30e2b35d2d Extract logic to enqueue trace event to its own method (#52938)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52938

Changelog: [internal]

Minor refactor to simplify changing the logic for how events are buffered.

Reviewed By: hoxyq

Differential Revision: D79340013

fbshipit-source-id: efd295b1583929580fbe7441ec7eb06e828ca514
2025-07-31 14:29:24 -07:00
Rubén NorteandFacebook GitHub Bot 00debea508 Log synthetic events for trace start/end when the trace finishes (#52937)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52937

Changelog: [internal]

Minor refactor to log the synthetic events for trace start when the trace finishes. This is to simplify future work to implement a sliding window for trace events.

Reviewed By: hoxyq

Differential Revision: D79271692

fbshipit-source-id: 9e923ac36fff850a3aeede7304fb2d721bb9f16c
2025-07-31 14:29:24 -07:00
Rubén NorteandFacebook GitHub Bot 9f6440d8c8 Simplify PerformanceTracer API and move processing to TracingAgent (#52934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52934

Changelog: [internal]

Right now, the `PerformanceTracer` API has a method to stop the trace and a separate one to collect serialized events. This refactors the API to return the collected events when calling `stopTracing` instead.

The caller (in this case `TracingAgent`) is responsible for serializing and sending the events in chunks through CDP.

Reviewed By: hoxyq

Differential Revision: D79271690

fbshipit-source-id: bdb48c80be4fd07d96e381e6bb4d099cae91f8de
2025-07-31 14:29:24 -07:00
Rubén NorteandFacebook GitHub Bot f7185715df Remove unnecessary collectEvents method from PerformanceTracer (#52936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52936

Changelog: [internal]

This method is unused and we're no longer planning to use it.

Reviewed By: hoxyq

Differential Revision: D79271691

fbshipit-source-id: 1a0be464928a199cfe4a57cb5c44255b127264c2
2025-07-31 14:29:24 -07:00
Rubén NorteandFacebook GitHub Bot 384fc5447d Make observer go through Fanton.runTask in LongTasksAPI test (#52948)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52948

Changelog: [internal]

Not sure why this test is flaky, but this tries to add some more assertions to see where the problem comes from.

Reviewed By: hoxyq

Differential Revision: D79366370

fbshipit-source-id: d66b30e502dbc80d3e972ed93a91bb7f703de9c4
2025-07-31 11:28:57 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 9d6d8a6e65 Add Text benchmark clause for elements without props (#52942)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52942

# Changelog:
[Internal] -

Adds another test clause to the Text benchmark test, to test the case when the component doesn't have any props altogether, which can be useful to establish a baseline.

Reviewed By: rubennorte

Differential Revision: D79352849

fbshipit-source-id: fbfeb53d3ede59631548eb2fe76a4debd5927900
2025-07-31 10:50:31 -07:00
Wandji Emmanuel juniorandFacebook GitHub Bot 626568f9a3 fix(android): Stabilize custom accessibility action IDs for TalkBack (#52724)
Summary:
This pull request resolves a critical accessibility bug on Android where custom `accessibilityActions` fail to execute when activated via TalkBack's swipe gestures.

**The Problem:**
- When a user focuses a component with custom `accessibilityActions` (like a `TouchableOpacity`), TalkBack correctly announces the action labels as the user swipes up or down.
- However, when the user double-taps to activate the selected action, TalkBack reports an "incompatible action," and the `onAccessibilityAction` event is never triggered.

**The Root Cause:**
The investigation revealed that the `ReactAccessibilityDelegate` was generating **new, unstable IDs** for custom actions on every UI update. This instability prevents the Android accessibility service from reliably tracking and invoking the selected action.

**The Solution:**
This change introduces a static, thread-safe cache (`ConcurrentHashMap`) within `ReactAccessibilityDelegate`. This ensures that each unique action name is mapped to a single, stable ID for the entire lifecycle of the application. This provides the consistency required by TalkBack to function correctly.

This addresses the issue described in https://github.com/facebook/react-native/issues/47268.

 ---

## Changelog:

[Android] [Fixed] - Stabilize custom accessibility action IDs to prevent "incompatible action" errors in TalkBack.
 ---

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

Test Plan:
The fix was validated extensively using the RNTester app on a physical Android device and an Android emulator.

### Steps to Reproduce (Before Fix)

1.  Enable TalkBack on an Android device.
2.  Navigate to a `TouchableOpacity` component with several custom `accessibilityActions`.
3.  Swipe up or down to cycle through the actions. TalkBack correctly announces them (e.g., "add to cart").
4.  Double-tap to execute the selected action.
5.  **Result (Bug):** TalkBack announces *"incompatible action"*, and the `onAccessibilityAction` event is not triggered.

### Validation Steps (After Fix)

1.  Follow the same steps as above on the patched version.
2.  **Result (Fixed):** After double-tapping, the `onAccessibilityAction` event is **correctly triggered** with the appropriate action name. The "incompatible action" issue is fully resolved.

*A screen recording demonstrating the successful fix can be provided if needed.*

Uploading fixed bugs view problems (1).mp4…

Fixes https://github.com/facebook/react-native/issues/47268

Reviewed By: jorge-cab

Differential Revision: D78737471

Pulled By: cipolleschi

fbshipit-source-id: 877b196597472ac6a4f6df81a05a43956fb34629
2025-07-31 10:28:28 -07:00
Ruslan LesiutinandFacebook GitHub Bot 2c540ac35a Add a method for transfering an ownership of captured TraceEvents (#52940)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52940

# Changelog: [Internal]

This is required for storing these Trace Events somewhere outside of PerformanceTracer, in case these events will be dispatched later.

Reviewed By: rubennorte

Differential Revision: D78741192

fbshipit-source-id: 3cc2eacd922855231fafb93c32d326b150b3c19b
2025-07-31 07:43:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot b58c2ffd72 refactor RuntimeSamplingProfile serializer (#52916)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52916

# Changelog: [Internal]

Align with other serializers in `jsinspector-modern` to have just static public method.

Reviewed By: rubennorte

Differential Revision: D79131985

fbshipit-source-id: 3f1f08641bb96a9fbd067992b8ce294af9d27688
2025-07-31 07:43:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot a8f6c96bc2 Static generators for Profile Trace Events (#52915)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52915

# Changelog: [Internal]

This removes the use of `PerformanceTracer` instance in a serialization logic.

Reviewed By: rubennorte

Differential Revision: D78919220

fbshipit-source-id: 5c663ea77eb36eb7664623c1595308a9450f7825
2025-07-31 07:43:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3ed6def874 Create aliases for ProcessId, ThreadId, RuntimeProfileId (#52917)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52917

# Changelog: [Internal]

Just an aliases for referencing these ids, instead of raw uint64_t.

Reviewed By: rubennorte

Differential Revision: D78741191

fbshipit-source-id: 1ee403ff19ed95361366c76c1fb52e70ec67f16e
2025-07-31 07:43:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot f1e5c84ea7 Remove methods for capturing Processes and Threads (#52914)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52914

# Changelog: [Internal]

We can't rely on RuntimeExecutor to actually tell us what JavaScript thread number is. Although this would work correct in most of the cases, this is not the solution we should go with.

Instead, we should fetch a map <id, name> of threads from the Host. This is what we will lazily call at the start of the Trace. I will add later on top of the stack.

Reviewed By: rubennorte

Differential Revision: D78990872

fbshipit-source-id: e41ebd35273c6741ebbc3fe3b851018c9f3275dc
2025-07-31 07:43:31 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 5f3eccb04f Fix CQS signal readability-redundant-control-flow in xplat/js/react-native-github/packages (#52931)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52931

Reviewed By: dtolnay

Differential Revision: D79327593

fbshipit-source-id: 39e2b3e54f156199fc12b9633ffafeeef8343caa
2025-07-31 05:29:11 -07:00
Devan BuggayandFacebook GitHub Bot 15373218ec Add granular control with pragma modes (#52894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52894

Adds the following boolean pragma modes for more granular control:

```
fantom_native_opt true|false
fantom_js_opt true|false
fantom_js_bytecode true|false
```

Previously these were all set together with `fantom_mode`. These modes are mutually exclusive with `fantom_mode`.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D79151687

fbshipit-source-id: 59c3f20bccb570c0293ffd037609946a1a9bbb8f
2025-07-30 14:22:22 -07:00
Devan BuggayandFacebook GitHub Bot 6d51bce9ed Refactor native/js modes (#52822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52822

Refactors underlying modes by adding `isNativeOpt`, `isJsOpt`, and `isJsBytecode` to allow for more granular control in a future diff.

### View ###

| (index) | Task name                                                 | Latency average (ns)   | Latency median (ns)       | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------------- | ------------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'render 100 uncollapsable views'                          | '23005778.16 ± 0.53%'  | '22877194.50 ± 11607.50'  | '43 ± 0.50%'               | '44'                      | 64      |
| 1       | 'render 1000 uncollapsable views'                         | '271276451.70 ± 0.61%' | '268378201.00 ± 9925.00'  | '4 ± 0.59%'                | '4'                       | 64      |
| 2       | 'render 100 views with large amount of props and styles'  | '47580650.91 ± 1.21%'  | '47212012.00 ± 2979.00'   | '21 ± 0.89%'               | '21'                      | 64      |
| 3       | 'render 1000 views with large amount of props and styles' | '521237370.22 ± 1.09%' | '516142815.00 ± 41682.00' | '2 ± 0.84%'                | '2'                       | 64      |
| 4       | 'render 1500 views with large amount of props and styles' | '828143691.48 ± 0.94%' | '824723257.50 ± 11331.50' | '1 ± 0.73%'                | '1'                       | 64      |

### View (mode 🚀, jsMode 🚀, bytecode) ###

| (index) | Task name                                                 | Latency average (ns)   | Latency median (ns)        | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------------- | -------------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'render 100 uncollapsable views'                          | '4051033.45 ± 2.01%'   | '3876618.00'               | '251 ± 1.29%'              | '258'                     | 247     |
| 1       | 'render 1000 uncollapsable views'                         | '86134420.23 ± 1.38%'  | '85815369.50 ± 281477.50'  | '12 ± 1.38%'               | '12'                      | 64      |
| 2       | 'render 100 views with large amount of props and styles'  | '13921817.92 ± 2.57%'  | '13474963.50 ± 4977.50'    | '72 ± 1.62%'               | '74'                      | 72      |
| 3       | 'render 1000 views with large amount of props and styles' | '182664526.31 ± 0.74%' | '181872565.00 ± 10281.00'  | '5 ± 0.73%'                | '5'                       | 64      |
| 4       | 'render 1500 views with large amount of props and styles' | '313110386.45 ± 1.13%' | '307934163.50 ± 156920.50' | '3 ± 1.07%'                | '3'                       | 64      |

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D78912257

fbshipit-source-id: 16fd0301af98159dbb9818cb8092bd4416ef2559
2025-07-30 14:22:22 -07:00
Devan BuggayandFacebook GitHub Bot 807f0b6882 Isolate NativeDevSettings load (#52821)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52821

Hardens RN to running in mismatched opt/dev modes.

While adding an opt native/dev js mode to fantom, LogBox was trying to load NativeDevSettings when it didn't exist because of mode mismatch.

This is the only location it's happening, so this just moves the NativeDevSettings load into the one function that needs it.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D78952284

fbshipit-source-id: e68667cb28fae7cb6f985305e8885f271ef5d3af
2025-07-30 14:22:22 -07:00
Alex HuntandFacebook GitHub Bot 364e71b159 Fix CMake dependency error (#52923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52923

Follow-up to D78904748, where CI was broken on `main` for the `run_fantom_tests` job. It turns out this Android build uniquely included the new `react_performance_cdpmetrics` dependency, and this had an incorrect dep.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D79263124

fbshipit-source-id: 3e38e0cebe53520ea50e6d11a571e01c52e34874
2025-07-30 10:30:08 -07:00
Zeya PengandFacebook GitHub Bot 5b38bb4745 Avoid unnecessary copy of view props map in UIManager::updateShadowTree (#52908)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52908

## Changelog:

[General] [Changed] - Avoid unnecessary copy of view props map in UIManager::updateShadowTree

Reviewed By: christophpurrer

Differential Revision: D79193215

fbshipit-source-id: 6a55dc2bf3bcf95eebeeddf2d747fe11ae56bf78
2025-07-30 08:58:11 -07:00
Alex HuntandFacebook GitHub Bot 2dd72f956b Align InteractionEntry payload to match Chrome (#52840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52840

**Context**

Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.

**This diff**

Completes populating a full `InteractionEntry` Live Event payload by implementing remaining fields sufficient to be rendered by Chrome DevTools.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D78904747

fbshipit-source-id: 7473602f6f1efe3ac71e07a2b88e6ad7020dcbbf
2025-07-30 07:13:58 -07:00
Alex HuntandFacebook GitHub Bot a3bf989450 Implement reporting InteractionEntry live metrics to runtime (#52839)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52839

**Context**

Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.

**This diff**

Adds and configures a `CdpMetricsReporter` class to report `InteractionEntry` live metrics over CDP via the `"__chromium_devtools_metrics_reporter"` runtime binding.

**Notes**

- Introduces a new `react/performance/cdpmetrics` package, and a listener API on `PerformanceEntryReporter` (both to avoid a `jni` dependency in `react/performance/timeline`).

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D78904748

fbshipit-source-id: c75971aba43d9929912b3d1dba7576c2a2342214
2025-07-30 07:13:58 -07:00
Samuel SuslaandFacebook GitHub Bot f711d1776c Micro-optimise JavaScript part of Animated (#52906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52906

changelog: [internal]

Micro-optimise JavaScript part of Animated by avoiding JS syntax for private variable/method - #foo. Instead, use double underscores. Benchmarks indicate ~10% improvement.

# Before
### Animated (mode 🚀) ###

| (index) | Task name                                                                    | Latency average (ns)  | Latency median (ns)      | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | ---------------------------------------------------------------------------- | --------------------- | ------------------------ | -------------------------- | ------------------------- | ------- |
| 0       | 'render 1 views'                                                             | '84990.06 ± 1.49%'    | '80691.00'               | '12164 ± 0.14%'            | '12393'                   | 11767   |
| 1       | 'render 10 views'                                                            | '373372.50 ± 1.00%'   | '363786.00'              | '2727 ± 0.26%'             | '2749'                    | 2679    |
| 2       | 'render 100 views'                                                           | '3099588.37 ± 0.92%'  | '3017559.00'             | '324 ± 0.74%'              | '331'                     | 323     |
| 3       | 'render 1 animated views (without animations set up)'                        | '174636.87 ± 0.67%'   | '168783.00'              | '5808 ± 0.17%'             | '5925'                    | 5727    |
| 4       | 'render 10 animated views (without animations set up)'                       | '1054481.51 ± 0.61%'  | '1036686.00'             | '953 ± 0.37%'              | '965'                     | 949     |
| 5       | 'render 100 animated views (without animations set up)'                      | '9176283.60 ± 1.12%'  | '8932316.00'             | '109 ± 0.95%'              | '112'                     | 109     |
| 6       | 'render 1 animated views (with a single animation set up - JS driven)'       | '204383.77 ± 0.52%'   | '199109.00'              | '4943 ± 0.17%'             | '5022'                    | 4893    |
| 7       | 'render 10 animated views (with a single animation set up - JS driven)'      | '1315894.97 ± 0.36%'  | '1300562.00 ± 40.00'     | '762 ± 0.30%'              | '769'                     | 760     |
| 8       | 'render 100 animated views (with a single animation set up - JS driven)'     | '11924031.45 ± 1.36%' | '11753334.50 ± 30040.50' | '84 ± 1.18%'               | '85'                      | 84      |
| 9       | 'render 1 animated views (with a single animation set up - native driven)'   | '318103.70 ± 0.37%'   | '311657.50 ± 0.50'       | '3162 ± 0.20%'             | '3209'                    | 3144    |
| 10      | 'render 10 animated views (with a single animation set up - native driven)'  | '2230305.96 ± 0.51%'  | '2191890.00'             | '449 ± 0.41%'              | '456'                     | 449     |
| 11      | 'render 100 animated views (with a single animation set up - native driven)' | '21983695.16 ± 0.75%' | '21945687.00 ± 17186.00' | '46 ± 0.74%'               | '46'                      | 64      |

# After

### Animated (mode 🚀) ###

| (index) | Task name                                                                    | Latency average (ns)  | Latency median (ns)     | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | ---------------------------------------------------------------------------- | --------------------- | ----------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'render 1 views'                                                             | '82684.75 ± 1.11%'    | '80231.00'              | '12331 ± 0.08%'            | '12464'                   | 12095   |
| 1       | 'render 10 views'                                                            | '378798.65 ± 1.16%'   | '365378.50 ± 9.50'      | '2703 ± 0.31%'             | '2737'                    | 2640    |
| 2       | 'render 100 views'                                                           | '3124253.51 ± 0.95%'  | '3039842.00'            | '322 ± 0.76%'              | '329'                     | 321     |
| 3       | 'render 1 animated views (without animations set up)'                        | '165580.70 ± 0.73%'   | '161562.00'             | '6131 ± 0.14%'             | '6190'                    | 6040    |
| 4       | 'render 10 animated views (without animations set up)'                       | '979127.10 ± 0.60%'   | '962509.50 ± 5.50'      | '1027 ± 0.36%'             | '1039'                    | 1022    |
| 5       | 'render 100 animated views (without animations set up)'                      | '8487740.98 ± 1.32%'  | '8235139.50 ± 3244.50'  | '118 ± 1.05%'              | '121'                     | 118     |
| 6       | 'render 1 animated views (with a single animation set up - JS driven)'       | '185333.93 ± 0.52%'   | '181582.00'             | '5451 ± 0.15%'             | '5507'                    | 5396    |
| 7       | 'render 10 animated views (with a single animation set up - JS driven)'      | '1145679.81 ± 0.37%'  | '1131668.00'            | '875 ± 0.29%'              | '884'                     | 873     |
| 8       | 'render 100 animated views (with a single animation set up - JS driven)'     | '10451056.69 ± 1.60%' | '10064069.50 ± 826.50'  | '96 ± 1.39%'               | '99'                      | 96      |
| 9       | 'render 1 animated views (with a single animation set up - native driven)'   | '292243.89 ± 0.40%'   | '286740.00'             | '3447 ± 0.21%'             | '3487'                    | 3422    |
| 10      | 'render 10 animated views (with a single animation set up - native driven)'  | '1993053.78 ± 0.47%'  | '1958960.00 ± 20.00'    | '503 ± 0.39%'              | '510'                     | 502     |
| 11      | 'render 100 animated views (with a single animation set up - native driven)' | '19528221.48 ± 0.95%' | '19383511.00 ± 7431.00' | '51 ± 0.92%'               | '52'                      | 64      |

Reviewed By: rubennorte

Differential Revision: D79179369

fbshipit-source-id: e641be0e8ec313b58bcae8330f127e707cd4fffc
2025-07-30 02:49:37 -07:00
David VaccaandFacebook GitHub Bot 0d3791ca0a Throw Exception if ReactApplication.reactNativeHost is not overriden (#52912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52912

This diff throws an Exception if ReactApplication.reactNativeHost is not overriden. This field is deprecated and it will be deleted in the near future.
The goal of this diff is to be able to remove usages of reactNativeHost for classes that implement ReactApplication

changelog: [Android][Breaking] Throw Exception if ReactApplication.reactNativeHost is not overriden

Reviewed By: mlord93

Differential Revision: D79186336

fbshipit-source-id: 9f8f34739c0f04056ff3d795bda45bc0dbca7624
2025-07-29 18:22:53 -07:00
Samuel SuslaandFacebook GitHub Bot 4614a0bc17 move fabric sync in C++ Animated to JS thread (#52904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52904

changelog: [internal]

There is a race condition in `FabricUIManagerBinding::schedulerDidFinishTransaction`. Until it is addressed properly, let's do synchronisation Fabric commits through JavaScript thread.

It can have pretty serious consequences: a crash in better case and undefined behaviour in worse case.

The race is between acquiring two mutexes:
1. One inside of `MountingCoordinator::pullTransaction`
2. Second one inside of `FabricMountingManager::executeMount`

The logic inside of `FabricUIManagerBinding::schedulerDidFinishTransaction` depends on the fact that whichever thread acquires mutex number 1, will acquire mutex number 2 without interruption. But that is not always the case as threads may be interrupted.

Reviewed By: zeyap

Differential Revision: D79080739

fbshipit-source-id: c86885aba25825030dc44b60144beb3e3ba18306
2025-07-29 14:26:09 -07:00
React Native BotandFacebook GitHub Bot 170ed501f0 Add changelog for v0.81.0-rc.3 (#52907)
Summary:
Add Changelog for 0.81.0-rc.3

## Changelog:
[Internal] - Add Changelog for 0.81.0-rc.3

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

Test Plan: N/A

Reviewed By: christophpurrer

Differential Revision: D79186289

Pulled By: lunaleaps

fbshipit-source-id: eae000134c294b47be906f5803c618fb997e1011
2025-07-29 13:10:31 -07:00
Samuel SuslaandFacebook GitHub Bot 7afb8ab305 disable subview clipping traversal when view culling is enabled (#52903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52903

changelog: [internal]

disable subview clipping traversal when view culling is enabled.
Subview clipping is already disabled by preventing prop from being set to true: https://fburl.com/code/bynvtwfs but we found a crash where the traversal leads to memory corruption with view culling enabled.

Reviewed By: lenaic

Differential Revision: D79168116

fbshipit-source-id: 9dcb624ca12bc2d94b265681795604ee0ac3fe00
2025-07-29 09:43:44 -07:00
Samuel SuslaandFacebook GitHub Bot 4b07edd6ea make instance variables const in RCTComponentViewDescriptor (#52902)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52902

changelog: [internal]

These values must not change during view's life cycle.

Reviewed By: rshest

Differential Revision: D79165823

fbshipit-source-id: dff85d369e4f79ba88740b0f3a23b71af5ec0c5e
2025-07-29 09:19:16 -07:00
Nicola CortiandFacebook GitHub Bot 04ae15d99b Remove the com.facebook.react.bridge.JSONArguments class (#52901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52901

I'm removing this class as we should not expose it publicly.
It's not used at all inside react-native and can potentally be moved internally.

The only usage I've found in OSS is patched with this PR:
- https://github.com/fabOnReact/react-native-wear-connectivity/pull/46

Changelog:
[Android] [Removed] - Remove the `com.facebook.react.bridge.JSONArguments` class

Reviewed By: javache, mdvacca

Differential Revision: D78265165

fbshipit-source-id: 704575e7b9cfd6d40980511d6064d39991b3eb48
2025-07-29 08:54:10 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ec5a98b1f5 Sync React 19.1.1 into React Native (#52887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52887

Syncs Reac 19.1.1 into React Native.

This commit should contains the fix for:
- React owner stack in React Native
- An issue with React holding shadow node for longer than it needed
- An issue that made `startTransition` not working with React Native.

## Changelog:
[General][Changed] - Bumped React to 19.1.1

bypass-github-export-checks

Reviewed By: cortinico

Differential Revision: D79096406

fbshipit-source-id: cbb2f846b1f08ba5ff482cfed5aaddc16df075cc
2025-07-29 08:05:38 -07:00
Rubén NorteandFacebook GitHub Bot 3bff471738 Reduce flakiness of LongTasksAPI Fantom test (#52898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52898

Changelog: [internal]

This test is flaky on Github and I haven't been able to reproduce it locally to debug exactly why, but I think it might be because there might be cross-tests pollution.

This tries to reduce that making sure we clean up everything between tests.

Reviewed By: cortinico

Differential Revision: D79163809

fbshipit-source-id: fe59315373ab74ccedd7e031816a84f0566b4aa0
2025-07-29 03:50:32 -07:00
Nicola CortiandFacebook GitHub Bot dde4d34a02 Add more tests for MatrixMathHelper (#52885)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52885

Since we recently touched the `MatrixMathHelper` class, as we're looking into moving more matrix operations from Kotlin to C++,
I'm going to add more tests to make sure that those matrix math function are behaving correctly.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D79094323

fbshipit-source-id: 34967b42dc92338724dd20fb7f70a68734f6db28
2025-07-29 02:35:27 -07:00
x-duneandFacebook GitHub Bot 6337cbfd77 docs: fix changelog links and remove versions without corresponding changelogs (#52849)
Summary:
- The  changelog docs has broken links for the pre v0.80 markdowns due to missing extension
- There are links without corresponding changelogs

## Changelog:

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

Pick one each for the category and type tags:

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

[INTERNAL] [FIXED] - fix changelog links and remove versions without corresponding changelogs

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

Test Plan: Click on each link to see if it opens the corresponding page at the specific section

Reviewed By: christophpurrer, cortinico

Differential Revision: D79097825

Pulled By: cipolleschi

fbshipit-source-id: a92e709ccbb45a042175bd198326132bfbf37c65
2025-07-29 02:34:18 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dd00c9055a Fix react-native vulnerabilities in package.json (#52876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52876

Our tooling detected a couple of vulnerabilities in our package.json.
- undici
- on-headers

This change fixes these vulnerabilities.
For the on-headers vulnerabilitiy specifically, it comes from the following dependency chain:
- rn-tester > react-native-community/cli > compression > on-headers.

To fix it, we have to force the resolution to both on-headers and compression.

## Changelog:
[General][Fixed] - Fixed vulnerability on undici and on-headers

Reviewed By: cortinico

Differential Revision: D79086335

fbshipit-source-id: 44f14403196165f5f823030304102dbd0facd0ce
2025-07-29 00:45:24 -07:00
Danny SuandFacebook GitHub Bot fb0e4ee6d1 Enable regenerator for Hermes dev mode transform profile (#52651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52651

Changelog: [Internal]

Last year the `hermes-canary` profile was used to enable certain apps to use Static Hermes by enabling regenerator because debugger support for generator wasn't finished yet. However, we actually could have just keyed off of `options.dev` and still kept using `hermes-stable`.

The `hermes-canary` profile is actually meant to be used to run experiments. We should free up this profile to return it to the original intended purpose.

This diff makes all hermes profiles' dev mode use regenerator. Existing SH apps using `hermes-canary` should be unaffected. And apps using Hermes will change to use regenerator in dev mode, but that should be ok.

Reviewed By: robhogan

Differential Revision: D78450695

fbshipit-source-id: eb6a87fbc1f0e08d490fd0d1baa3611248f95764
2025-07-28 21:44:45 -07:00
Joe VilchesandFacebook GitHub Bot e17e3e3f38 Decouple ReactAndroidHWInputDeviceHelper from ReactRootView (#52891)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52891

Right now these are tightly coupled for no reason. The device helper just asks the root view to send the event out, which it uses ReactContext for. We can just have that be passed in and accomplish the same task.

Changelog: [Internal]

Reviewed By: Abbondanzo, rozele

Differential Revision: D79007328

fbshipit-source-id: ef0a5ac4ec0acb52fc7c2a26010811767e3c1e67
2025-07-28 19:31:02 -07:00
Aakash PatelandFacebook GitHub Bot b4a10f01fb Use == instead of EXPECT_EQ in testlib
Summary:
The `EXPECT_EQ` was leading to potentially ambiguous use of `<<` when
gtest tries to print information.

Changelog: [Internal]

Reviewed By: tsaichien

Differential Revision: D78823354

fbshipit-source-id: d26de07f02eb8bb53a4dec34b5fb302681bfbef8
2025-07-28 19:14:54 -07:00
David VaccaandFacebook GitHub Bot 8c1d191f1a EZ cleanup of unnecessary variable (#52892)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52892

 EZ cleanup of unnecessary variable

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D79119092

fbshipit-source-id: 10b8675763dd203a832648ef3c99520dcdaa08da
2025-07-28 18:16:05 -07:00
Christoph PurrerandFacebook GitHub Bot daeb6e99ab Bring back ContextContainer::Shared (#52889)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52889

This brings back ContextContainer::Shared (but marks it as deprecated which was removed in https://github.com/facebook/react-native/pull/52750

Changelog: [General][Fixed] Bring back ContextContainer::Shared = std::shared_ptr<const ContextContainer> alias

Reviewed By: lenaic

Differential Revision: D79112609

fbshipit-source-id: 1cb9114b98d745b846d5ddc56a01786527049e50
2025-07-28 17:21:34 -07:00
Nicola CortiandFacebook GitHub Bot 48bf59c85e Use by lazy(LazyThreadSafetyMode.NONE) for RNTester (#52886)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52886

RNTester was using just a plain `by lazy{}` which gets flagged by our internal linter over and over.
This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D79094496

fbshipit-source-id: 856864bf8b5e4ec1254d1793dba9e97377696408
2025-07-28 15:11:35 -07:00
Christoph PurrerandFacebook GitHub Bot 4718b35259 Bring back SharedImageManager = std::shared_ptr<ImageManager> alias to allow gradual API migration (#52888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52888

This brings back the type erased in  https://github.com/facebook/react-native/pull/52747 to fix build breaks in consuming libraries as: `react-native-svg`

https://github.com/facebook/react-native/actions/runs/16560124464/job/46828273956?fbclid=IwY2xjawL0f1dleHRuA2FlbQIxMQBicmlkETFXVnFJUkhXMDNkSlJhY1c1AR6vMc_wUFxgfUN-JsCFMzl4L2V2JaSfX37gKIoUu8U9WGGmb0JBG1LNl0Ogjg_aem_aM4XSISUjhqE7S8_QA2KfA

Changelog: [General][Fixed] Bring back SharedImageManager = std::shared_ptr<ImageManager> alias

Reviewed By: cipolleschi

Differential Revision: D79097253

fbshipit-source-id: afec0b4dd706fac91ba296d2bf2a50fb27200597
2025-07-28 11:42:19 -07:00
Artur KalachandFacebook GitHub Bot eb08f54594 Update RCTTextInputComponentView to recycle and properly clean the inputAccessoryView dependency. (#52825)
Summary:
Update `RCTTextInputComponentView` to recycle and properly clean its `inputAccessoryView` dependency. Currently, `RCTTextInputComponentView` does not clean up this dependency during recycling, which can result in the `inputAccessoryView` being incorrectly applied to `TextInput` components that do not use an accessory view."

Related issue: https://github.com/facebook/react-native/issues/52824
Snack of the issue: https://snack.expo.dev/arturkalach/privileged-blue-soda

https://github.com/user-attachments/assets/46a1f172-a75c-4e88-beee-059d4d2e1d0c

## Changelog:
[IOS][FIXED] Update recycling logic to clean up the `inputAccessoryView` dependency.
<!-- 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/52825

Test Plan:
```
1. Render more than eight TextInput components on the screen, each with an AccessoryView.
2. Unmount the TextInput components using conditional rendering.
3. Open a Modal that contains a KeyboardAvoidingView and a TextInput.
4. Focus on the TextInput inside the Modal.
```

https://github.com/user-attachments/assets/8be1fdef-e8ab-4030-a2c5-e952c22ef743

Reviewed By: christophpurrer

Differential Revision: D78966221

Pulled By: cipolleschi

fbshipit-source-id: 35b6748cc44c41056051b2eecd626d61c4641cdf
2025-07-28 10:33:48 -07:00
Riccardo CipolleschiandFacebook GitHub Bot cda32c3119 Fix vulnerabilities in HelloWorld's Gemfile (#52873)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52873

Our tooling detected a vulnerability in HelloWorld's Gemfile. This change fixes them.

bypass-github-export-checks

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D79084217

fbshipit-source-id: 7a0c85a0b2e79792c43226f43a19f27414cfee2a
2025-07-28 10:32:44 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 9d4f6cd6b5 Fix path to react-native for Metro (#52877)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52877

We moved the HelloWorld package from `packages`to `private` but we didn't update the path to React Native that is consumed by metro.

This change fixes this.

## Changelog:
[Internal] -

Reviewed By: huntie

Differential Revision: D78493478

fbshipit-source-id: 8795c2963dec036693a73a16c18be381f19e11c4
2025-07-28 10:32:44 -07:00
Rubén NorteandFacebook GitHub Bot d2fa1cd900 Create basic benchmark for Animated (#52874)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52874

Changelog: [internal]

This creates a basic benchmark for the Animated API, which shows that **using Animated**, even without setting up animations, **makes rendering 3x slower** (similar when setting up a JS driven animation), but **6x slower when it sets up a native animation.**

Baseline:
### Animated (mode 🚀) ###

| (index) | Task name                                                                    | Latency average (ns)  | Latency median (ns)     | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | ---------------------------------------------------------------------------- | --------------------- | ----------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'render 1 views'                                                             | '85320.76 ± 1.27%'    | '82484.00'              | '11994 ± 0.09%'            | '12124'                   | 11721   |
| 1       | 'render 10 views'                                                            | '399462.22 ± 1.03%'   | '387702.00'             | '2552 ± 0.29%'             | '2579'                    | 2505    |
| 2       | 'render 100 views'                                                           | '3317795.78 ± 0.90%'  | '3232351.00 ± 70.00'    | '303 ± 0.74%'              | '309'                     | 302     |
| 3       | 'render 1 animated views (without no animations set up)'                     | '172534.31 ± 0.67%'   | '168423.00'             | '5874 ± 0.14%'             | '5937'                    | 5796    |
| 4       | 'render 10 animated views (without no animations set up)'                    | '1050582.87 ± 0.63%'  | '1031899.00 ± 20.00'    | '957 ± 0.37%'              | '969'                     | 952     |
| 5       | 'render 100 animated views (without no animations set up)'                   | '9255133.10 ± 1.06%'  | '8990333.00'            | '108 ± 0.94%'              | '111'                     | 109     |
| 6       | 'render 1 animated views (with a single animation set up - JS driven)'       | '203422.03 ± 0.50%'   | '198478.00'             | '4966 ± 0.17%'             | '5038'                    | 4916    |
| 7       | 'render 10 animated views (with a single animation set up - JS driven)'      | '1305600.39 ± 0.37%'  | '1288088.00 ± 15.00'    | '768 ± 0.30%'              | '776'                     | 766     |
| 8       | 'render 100 animated views (with a single animation set up - JS driven)'     | '12084658.14 ± 1.51%' | '11854181.00 ± 8493.00' | '83 ± 1.27%'               | '84'                      | 84      |
| 9       | 'render 1 animated views (with a single animation set up - native driven)'   | '313494.69 ± 0.32%'   | '308673.00'             | '3206 ± 0.19%'             | '3240'                    | 3190    |
| 10      | 'render 10 animated views (with a single animation set up - native driven)'  | '2223507.22 ± 0.50%'  | '2184839.00 ± 70.00'    | '451 ± 0.41%'              | '458'                     | 450     |
| 11      | 'render 100 animated views (with a single animation set up - native driven)' | '21352575.02 ± 0.71%' | '21239136.00 ± 2824.00' | '47 ± 0.69%'               | '47'                      | 64      |

Reviewed By: christophpurrer

Differential Revision: D79085920

fbshipit-source-id: 1dc13208da49cc325995f3455eaf86c4eb1e4d47
2025-07-28 10:02:25 -07:00
Rubén NorteandFacebook GitHub Bot 797d14da9e Expose types for benchmark options (#52875)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52875

Changelog: [internal]

This simplifies typing tests.

Reviewed By: christophpurrer

Differential Revision: D79086359

fbshipit-source-id: 683a713e0182f18c9b26e515921d17cf7873aa06
2025-07-28 10:02:25 -07:00
Zeya PengandFacebook GitHub Bot 6e4d23ded2 Allow setting blockNativeResponder on Pressable (#52819)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52819

## Changelog:

[General] [Added] - Allow setting blockNativeResponder on Pressable

To expose the same prop on Pressability https://github.com/facebook/react-native/blob/b2d9f5f28045fd89bba2dca41274c7cd7abe2ecc/packages/react-native/Libraries/Pressability/Pressability.js#L137

Reviewed By: christophpurrer

Differential Revision: D78896178

fbshipit-source-id: 36637842ac15c54de325975d416efce1448e8ab7
2025-07-28 08:34:04 -07:00
Sam ZhouandFacebook GitHub Bot 209e124340 Apply fix of https://github.com/facebook/react-native/pull/52787 to an inner prettier config (#52881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52881

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D79089990

fbshipit-source-id: 12d5a7defabf877c62113e72099c965351896cf7
2025-07-28 07:28:05 -07:00
Ruslan LesiutinandFacebook GitHub Bot 253249611c Extract serializers for ProfileChunk (#52870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52870

# Changelog: [Internal]

Defines a set of static serializers for parts of the "Profile" and "ProfileChunk" Trace Events.

Mainly for 2 reasons:
1. To follow the same pattern of static serializers for Tracing.
2. To save on string copying, since ProfileChunk could contain hundreds of unique frames, all of them could have unique function names. The previous approach would copy the strings and populate a new `folly::dynamic` object.

Reviewed By: huntie

Differential Revision: D78919218

fbshipit-source-id: 303a4fc259d6b1720ce982e144037ee56cd47e9b
2025-07-28 07:12:17 -07:00
Ruslan LesiutinandFacebook GitHub Bot 7488097872 Extract TraceEvent serialization logic (#52869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52869

# Changelog: [Internal]

We are exctracting a logic for serialization of TraceEvent into a dedicated serializer class.

Conceptually:
- PerformanceTracer would be a local TraceEvent engine that is responsible for constructing and buffering TraceEvents.
- TraceEventSerializer will have a single responsibility: transforming from local structs to serialized json objects that are ready to be dispatched over CDP Tracing domain.

This would help avoid scenarios, where we are passing around `folly:dynamic` between internal subsystems: serialization should only happen right before emtting a CDP message.

Reviewed By: huntie

Differential Revision: D78738370

fbshipit-source-id: a8e33e857192a02dc048d504abe072679ef8ce82
2025-07-28 07:12:17 -07:00
Ruslan LesiutinandFacebook GitHub Bot 75d6cb1138 Avoid copies when dispatching TraceEvent chunks (#52868)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52868

# Changelog: [Internal]

Mainly, 2 changes:
- Callback that emits `Tracing.dataCollected` events will receive chunks as rvalues refs (`&&`), instead of `const &`.
- The RuntimeSamplingProfile will be passed to the serializer as rvalue ref.

Reviewed By: huntie

Differential Revision: D78919223

fbshipit-source-id: 7f65e0627c8839d507e6b2d088fdb0b560906b6a
2025-07-28 07:12:17 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3cf11a3113 Flatten struct (#52867)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52867

# Changelog: [Internal]

There are currently no reasons for these struct not to be plain, plus this would allow us avoiding potentially expensive copying, when returning `const &`.

Reviewed By: huntie

Differential Revision: D78919222

fbshipit-source-id: 7b39d754c05b25915f07202d7e4839b10a08a47c
2025-07-28 07:12:17 -07:00
Ruslan LesiutinandFacebook GitHub Bot 4023800b39 Flatten Sample and Profile structs (#52866)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52866

# Changelog: [Internal]

There are currently no reasons for these struct not to be plain, plus this would allow us avoiding potentially expensive copying, when returning `const &`.

Reviewed By: huntie

Differential Revision: D78919221

fbshipit-source-id: 7d3628bb213fdecadbdafa9b2b5c42472ebd77be
2025-07-28 07:12:17 -07:00
Ruslan LesiutinandFacebook GitHub Bot 7d17a3f61f Flatten SampleCallStackFrame and use designated serializers (#52865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52865

# Changelog: [Internal]

These doesn't have any custom internal logic, so can be flattened for simplicity.

Reviewed By: huntie

Differential Revision: D76986727

fbshipit-source-id: cf23adf43eefda92674a46217a7269399cf81f0a
2025-07-28 07:12:17 -07:00
Nicola CortiandFacebook GitHub Bot fd12f77018 Also test node 20.19.4 in the test_js matrix (#52878)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52878

Now that Metro is bumped to also support node >= 20.19.4
we should be able to run test_js on `main` against 20.19.4

Changelog:
[Internal] [Changed] -

Reviewed By: robhogan, motiz88

Differential Revision: D79087608

fbshipit-source-id: 2161a893ab2fd88dc7eb1b35aa385704962018e8
2025-07-28 07:11:12 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 0c06ccc78f Add benchmark Fantom test for Image component (#52871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52871

## Changelog:
[Internal] -

As in the title, this adds a basic Fantom benchmark test for the Image component.

Reviewed By: rubennorte

Differential Revision: D79085957

fbshipit-source-id: 4098415353c8a04992c39e39d9a1dd20270f20d7
2025-07-28 06:49:32 -07:00
Rubén NorteandFacebook GitHub Bot 082db1e0a7 Remove static_hermes_staging variant for Fantom tests (#52861)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52861

Changelog: [internal]

We added this mode recently to support all local Hermes variants, but this doubles the number of build type combinations which regresses test execution time and give us little benefit, so we're removing it.

Reviewed By: rshest

Differential Revision: D79080370

fbshipit-source-id: e1b536427acb98ec01edfd44829e2fef9be9b18d
2025-07-28 06:35:49 -07:00
Rubén NorteandFacebook GitHub Bot 20fc2618d0 Force every output to have a different filename in the same run (#52863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52863

Changelog: [internal]

We're seeing some issues in stress runs for Fantom tests in optimized mode, failing when compiling the bytecode with Hermes. The specific error in the Hermes compiler isn't clear, but this started failing when we changed the folders for output. It's possible that it's due to race conditions in stress runs, where multiple workers are attempting to compile in the same locations.

This forces every output in every runner to be in a different file to prevent these possible collisions.

Reviewed By: rshest

Differential Revision: D79084242

fbshipit-source-id: b4540e2e6c5378c7fc8630ac2fea674e0ef78a14
2025-07-28 06:35:49 -07:00
Sam ZhouandFacebook GitHub Bot 869a976a5d Bump to prettier v3 across xplat (#52844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52844

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78787920

fbshipit-source-id: fc2582001ee6775f53b452dd3659e37521ea6387
2025-07-27 18:50:47 -07:00
Nick LefeverandFacebook GitHub Bot 7fe3b2c902 Add dataDetectorType paragraph prop (#52848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52848

This diff declares the `DataDetectorType` enum and defined the `dataDetectorType` property on the Android Paragraph props.

The conversions.h file holding the state conversion to MapBuffer was renamed to stateConversions.h so that it wouldn't clash with the Android conversions.h file.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D79025294

fbshipit-source-id: 52dc519ea51191f28745d91fe31e36eaba29a731
2025-07-27 17:20:44 -07:00
Nick LefeverandFacebook GitHub Bot 94d2e0a39b Add selectionColor paragraph prop (#52847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52847

Adding the missing Android Text selectionColor prop to the `ParagraphProps` to correctly support the prop with Props 2.0

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D79023868

fbshipit-source-id: 10e04d438d9d118e6b80e8d8854e0bbb76b430ee
2025-07-27 17:20:44 -07:00
Nick LefeverandFacebook GitHub Bot 5e80759994 Add disabled paragraph prop (#52846)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52846

Adding the Paragraph `disabled` property for RN Android.

This diff also adds a new Text example to RNTester for disabled text.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D78990840

fbshipit-source-id: dd25b890597bc9f728f929b38c2f680631b7f476
2025-07-27 17:20:44 -07:00
Nick LefeverandFacebook GitHub Bot d390f3b847 Use host platform specific text props (#52845)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52845

With Android having its own props for the Paragraph component, we need to create a Host Platform specific version for the `ParagraphProps` to hold those platform specific properties.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D78990838

fbshipit-source-id: 722777a338f960fcc54846d8e8f106f51cac162c
2025-07-27 17:20:44 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot df3f0967ba Always avoid setting default props on View component (remove reduceDefaultPropsInView feature flag) (#52837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52837

# Changelog
[Internal] -

This feature has been enabled by default for a while, and has been proven to both not cause correctness issues, and also provide tangible performance improvements.

We can remove the corresponding feature flag to improve code maintainability.

Reviewed By: rubennorte

Differential Revision: D78978302

fbshipit-source-id: 45cb865321f6e0eb449427845772fc522221514a
2025-07-26 12:49:40 -07:00
Sam ZhouandFacebook GitHub Bot 01eaa6db97 Mock prettier import through actual require to prepare for prettier v3 (#52843)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52843

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78993226

fbshipit-source-id: 03f43c61fe9e6edaf38f895daf4f0c146df931b8
2025-07-25 13:52:59 -07:00
Andrew DatsenkoandFacebook GitHub Bot 627136ee76 Add basic steps in CI (#52225)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52225

## Changelog:
[Internal] - Fantom in RN CLI
This diff prepares the RN CI to build and run Fantom Tests

Reviewed By: cortinico

Differential Revision: D70097944

fbshipit-source-id: 163cb3f5204f7e5491f94f2fbebe11b514919cdf
2025-07-25 13:46:35 -07:00
Marco WangandFacebook GitHub Bot d041e8b7e0 Pre-suppression errors for functionT in xplat js (#52820)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52820

Reviewed By: SamChou19815

Differential Revision: D78941100

fbshipit-source-id: 66d462670471212d23e8682bd5bf1ebd79ef4582
2025-07-25 13:46:08 -07:00
Zeya PengandFacebook GitHub Bot 8e2b33f979 keep track of last direct manipulation props (#52842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52842

## Changelog:

[Internal] [Fixed] - keep track of last direct manipulation props

* so that at next time there's a ShadowTree commit (regardless of which thread), they're merged into the update mutation
* the props will stay until the view is disconnected from props node via Animated API or the view is removed/deleted. This should be expected behavior, because in RN we expect that once Animated changes a prop, subsequent react commits should not change the value.

Reviewed By: sammy-SC

Differential Revision: D78702843

fbshipit-source-id: b5e6e01a7a4f6caeea4cc1eeafaef9c3c7e51691
2025-07-25 13:03:59 -07:00
Sam ZhouandFacebook GitHub Bot f47da61e51 Bump hermes-parser related packages across fbsource (#52841)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52841

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D78949440

fbshipit-source-id: 5c5015f602b9fe591aa68f179163bd37dfb0dcff
2025-07-25 10:46:51 -07:00
Alex HuntandFacebook GitHub Bot a3e99264a2 Introduce V2 Perf Monitor feature flags (#52809)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52809

**Context**

Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.

**This diff**

Add two new feature flags:

- `fuseboxInteractionMetricsEnabled` — Will configure sending of interaction live metrics to CDP clients, independent of an active performance profiling session.
- `perfMonitorV2Enabled` — Will enable the backend + UI for the V2 Perf Monitor.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D78894857

fbshipit-source-id: 7605357b3cc9255d76f66bde605f9e520dda9750
2025-07-25 10:29:13 -07:00
Christoph PurrerandFacebook GitHub Bot c7c8ce0cad Update TurboModuleTestFixture to handle Promise types (#52801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52801

Changelog: [Internal]

This adds utility functions and sample test cases to verify AsyncPromises in GTests

Reviewed By: lenaic

Differential Revision: D78871865

fbshipit-source-id: 41a7bebee94f40ec2d1d84b3ceae561dc503b421
2025-07-25 09:56:37 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 6d52cf5662 Create Fantom benchmark test for Text component (#52836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52836

# Changelog
[Internal] -

This adds a basic benchmarking test for `Text` component creation, similarly to the one we already have for the e.g. `View`.

Reviewed By: rubennorte

Differential Revision: D78975332

fbshipit-source-id: e1b54e59a54e8c7f8f19738f2ffeaa02ca5c09ee
2025-07-25 08:53:45 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 012b78c0a5 Make View benchmark test use 'testWithArg' API (#52832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52832

# Changelog
[Internal] -

Make use of `Fantom.unstable_benchmark.testArg` API added in D78970312 for the existing View benchmark test - this makes it more succinct/maintainable.

Reviewed By: rubennorte

Differential Revision: D78970311

fbshipit-source-id: 2db35cb2edfa366311d62c4b1d141c3813a31e53
2025-07-25 08:53:45 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot c5bb31c46e Add 'testWithArg' to Fantom benchmarking API (#52831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52831

# Changelog
[Internal] -

The corresponding `testWithArg` API is similar to the existing `test` one for the Fantom benchmarks, except it would allow to run the same test several times in a parametrized manner, with the set of parameters specified as an array (for now, of numbers).

This allows to easily implement testing patterns such as we have in a View benchmark test, whereas we have a mostly duplicated test body doing a similar thing with 100, 1000, 1500 view component instances etc.

Reviewed By: rubennorte

Differential Revision: D78970312

fbshipit-source-id: 504b7aada648c7213ce698f088ac71d9fde8884b
2025-07-25 08:53:45 -07:00
Moti ZilbermanandFacebook GitHub Bot 3271e57c75 Handle Runtime.addBinding and Runtime.removeBinding before a RuntimeAgent is present (#52813)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52813

Changelog: [General][Changed] CDP backend now accepts addBinding and removeBinding methods earlier, before a Runtime exists.

Allows managing CDP binding subscriptions at any point in time, including at the very beginning of a session when a `RuntimeAgent` doesn't yet exist (due to `registerRuntime` not having been called yet).

"Adding" a binding with the `Runtime.addBinding` method is actually two actions in one:

1. Subscribing the current session to events from a particular binding name, from one or more Runtime(s) that may exist now or in the future (optionally targetable by execution context ID/name).
2. Installing a JSI function with the given `name` on the global object of the targeted Runtime(s), if they exist at the time of the method call.

NOTE: "Removing" a binding only involves managing the subscription and never causes the corresponding JSI function to be uninstalled - presumably because it may have been captured by user code anyway.

We currently do both (1) and (2) in `RuntimeAgent`, but this means subscriptions can't be managed before a `RuntimeTarget` has been created, which can cause problems if we want to set up certain bindings programmatically during React Native's initialisation. As this is an unnecessary restriction, here we move (1) to `HostAgent` and keep only (2) in `RuntimeAgent`.

Reviewed By: huntie

Differential Revision: D78739067

fbshipit-source-id: 9a39f4503d1b5e7c7a6e4c80dfbaabdd2549fb8d
2025-07-25 07:45:57 -07:00
Samuel SuslaandFacebook GitHub Bot dbdf39a8fe fix crash when view with event driven animation is unmounted (#52807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52807

changelog: [internal]

Fixes a crash that occurs when event driven animation is attached to a view that is unmounted.

Reviewed By: zeyap

Differential Revision: D78889689

fbshipit-source-id: 6bc534c3d80a7ed2fc5e0ac378e58343fef45430
2025-07-25 07:37:16 -07:00
Samuel SuslaandFacebook GitHub Bot 0d13474161 provide option to fabric commits in C++ Animated (#52834)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52834

changelog: [internal]

we have seen some problems with the fabric commit and believe there is a race condition in the implementation.

Here, we introduce an option to disable it.

Reviewed By: rozele

Differential Revision: D78972655

fbshipit-source-id: 99005c77dbe4dde3816b9e6a692f170cf287f7cd
2025-07-25 07:27:39 -07:00
Rubén NorteandFacebook GitHub Bot 54d5b74bbb Improve stack traces in benchmarks (#52828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52828

Changelog: [internal]

Just a small quality of life improvement. It forces the test functions in benchmarks to have the name of the test case if it's an anonymous function, so it shows better in stack traces.

Reviewed By: sammy-SC

Differential Revision: D78924769

fbshipit-source-id: 9b44a49feaae93ccfa90cc726274f0ea013654b1
2025-07-25 05:47:35 -07:00
Rubén NorteandFacebook GitHub Bot bfe31bad1f Small refactor of how Fantom configs are formatted (#52826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52826

Changelog: [internal]

This is just an intermediate change to simplify how we format Fantom configs, so we can extend it to use other formatting formats (e.g.: short format to use in file names).

Reviewed By: lenaic

Differential Revision: D78924771

fbshipit-source-id: 4886a800a6836dc6a66539b1df079adb6c9c52e1
2025-07-25 05:47:35 -07:00
Rubén NorteandFacebook GitHub Bot 0f7ba79166 Avoid creating too many unnecessary build directories for Fantom bundles (#52788)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52788

Changelog: [internal]

Minor change to just create a single output directory for generated JS code in Fantom per Jest run.

Reviewed By: lenaic

Differential Revision: D78808564

fbshipit-source-id: 70e1a60dfcdcc3fc6ee5f08ced1e9c8f8cab2782
2025-07-25 05:47:35 -07:00
Christoph PurrerandFacebook GitHub Bot 2c683c5787 Apply clang-tidy setting; RN Android (#52774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52774

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78634966

fbshipit-source-id: daee3ed21b6f2229049e6a09e2b9c48dfb7e0264
2025-07-24 17:50:27 -07:00
Alexey MedvedevandFacebook GitHub Bot 8ed2cee80e Make yoga/Yoga.h an umbrell header (#52817)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52817

X-link: https://github.com/facebook/yoga/pull/1828

X-link: https://github.com/facebook/litho/pull/1070

This diff makes the Yoga/Yoga.h header an umbrella header, which means that it includes all of Yoga's public headers. The code changes in each file include adding the IWYU pragma export to each header file, which is a way to tell the compiler to export the header file's symbols to other files that include it. This is necessary for the header file to be used as an umbrella header.

Changelog:
[General][Added] - Code quality fixes

Reviewed By: corporateshark

Differential Revision: D78692457

fbshipit-source-id: 7fcd53d2a6f268fa4377dbd5bd6ba6eebc94b5f8
2025-07-24 16:51:13 -07:00
Christoph PurrerandFacebook GitHub Bot 546e27684e Apply clang-tidy setting: jsinspectormodern (#52741)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52741

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D78634934

fbshipit-source-id: 03c4c8f5287452fb19fdce69e93686a04525eba5
2025-07-24 16:33:32 -07:00
Sam ZhouandFacebook GitHub Bot 70f7a50e2f Deploy 0.277.1 to xplat
Summary:
[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D78923286

fbshipit-source-id: fd0b20090a7cd5c5ff64c1dd976e6a8f5e2b59d7
2025-07-24 16:24:20 -07:00
Christoph PurrerandFacebook GitHub Bot 2d220624c7 Apply clang-tidy setting: react/nativemodule (#52740)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52740

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D78634926

fbshipit-source-id: f2218a3ac9b60550e0b71b8533a1fd5062f1d610
2025-07-24 14:50:54 -07:00
filip131311andFacebook GitHub Bot 5ef41068ed fix: View component does not have a displayName (#52688)
Summary:
Hello, I work on [Radon IDE](ide.swmansion.com) I encountered an issue while adding support for react native 81, this PR solves it:
In https://github.com/facebook/react-native/issues/51023 EvanBacon removed `displayName` filed from `View` component adding the following comment:
>Remove displayName in favor of component name. I'm not 100% sure this is a full fallback but it is valid according to react/display-name eslint rule—https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md

Unfortunately the Fabric renderer uses the `displayName` property to generate the name of the component for the inspector functionality and in absence of it generates a name that might be confusing to the end user:

<img width="351" height="283" alt="Screenshot 2025-07-17 at 21 27 37" src="https://github.com/user-attachments/assets/852246aa-6586-4684-b80e-5d70b9678c6e" />

Problem is not specific to Radon and happens in chrome devtools as well:

<img width="501" height="130" alt="Screenshot 2025-07-17 at 22 16 52" src="https://github.com/user-attachments/assets/3514dd02-59f7-473a-87b1-6ed325d2034c" />

This PR brings back the `displayName` property to fix that.

## Changelog:

[INTERNAL] [FIXED] - Bring back the displayName property to the View component

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

Test Plan:
- Run the application
- open chrome devtools and navigate to "components" tab
- before changes the View components would show up as `View_withRef` after they are named `View`

Rollback Plan:

Reviewed By: lunaleaps, cortinico

Differential Revision: D78512254

Pulled By: alanleedev

fbshipit-source-id: 46e4a224b09fe3fb938c055a675f687c86d7ddcb
2025-07-24 14:30:52 -07:00
Moti ZilbermanandFacebook GitHub Bot 3a833d3f2f Move all Tracing method handling to TracingAgent (#52814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52814

Changelog: [Internal]

The handling of `Tracing.start` was needlessly split between `HostAgent` and `TracingAgent` because `TracingAgent` did not have a reference to the session state (which, being an Agent, it's allowed to have). This diff cleans that up.

Reviewed By: huntie

Differential Revision: D78799899

fbshipit-source-id: b05e6dae2e9b287b8708debe756b19f81d5dae06
2025-07-24 13:24:12 -07:00
Rob HoganandFacebook GitHub Bot 840fd6c83f Bump Metro to ^0.83.1, lower minimum Node.js version to 20.19
Summary:
Metro release notes: https://github.com/facebook/metro/releases/tag/v0.83.1

The only public-facing change is a lowering of the minimum Node.js version from 22.14 to 20.19.

This will need picking to RN `0.81-stable`

Changelog: [General][Changed] Metro to ^0.83.1

Reviewed By: huntie

Differential Revision: D78895160

fbshipit-source-id: b9ccffe972249b73897f51c14873861e57a97161
2025-07-24 12:10:18 -07:00
Moti ZilbermanandFacebook GitHub Bot 25293d82e7 Refactor HostAgent control flow (#52815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52815

Changelog: [Internal]

Refactors `HostAgent::handleRequest` to make the control flow more explicit and the state (`isFinishedHandlingRequest`, `shouldSendOKResponse`) immutable.

Reviewed By: huntie

Differential Revision: D78799898

fbshipit-source-id: 0bcf6c364466a91ad3075b67e4f2ac9a4e7a69a7
2025-07-24 11:58:11 -07:00
Moti ZilbermanandFacebook GitHub Bot 81f3be15b4 Fix test build failures and ASAN violation (#52812)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52812

1. Fix forward from D76486572 (cc christophpurrer) - `#include <format>` is, for whatever reason, not available in fbcode (?) but `fmt` is an adequate, working substitute that is also used elsewhere RN (specifically in ReactCxxPlatform). Also removed the `folly/Format` include that had erroneously been left in, and the `fbobjc_ios_propagated_target_sdk_version` setting that was added purely to support `<format>`.
2. Fixes a dangling reference to an immediately-destroyed `MockHostTargetDelegate` in `ReactInstanceIntegrationTest`, caught by ASAN.
3. Adds a missing `#include <stdexcept>` to `Utf8.h`.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D78756286

fbshipit-source-id: d9428c54fc512f5ab33d31300aba9bf5c3e619b2
2025-07-24 11:58:11 -07:00
React Native BotandFacebook GitHub Bot d90c5c0fa1 Add changelog for v0.80.2 (#52816)
Summary:
Add Changelog for 0.80.2

## Changelog:
[Internal] - Add Changelog for 0.80.2

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

Test Plan:
N/A

Rollback Plan:

Reviewed By: christophpurrer

Differential Revision: D78900279

Pulled By: cipolleschi

fbshipit-source-id: 3063758759c7bcafe3a8b0cdff718288de879689
2025-07-24 10:39:31 -07:00
Andrew DatsenkoandFacebook GitHub Bot b2d9f5f280 Move some tests into fb verse (#52794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52794

Changelog: [Internal]
Failing oss tests due to different React

Reviewed By: rubennorte

Differential Revision: D78755895

fbshipit-source-id: 6a1c2f5baf8ecc0c9116dc739a8f767ba60fff8a
2025-07-24 07:23:28 -07:00
Andrew DatsenkoandFacebook GitHub Bot 273c2d842d skip bytecode support for hermes (#52767)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52767

Changelog: [Internal]
Currently tests that depend on hermes dev bytecode will fail because in OSS this case was not handled. We need to skip them for now before we integrate hermes compiler properly.

Reviewed By: christophpurrer, rubennorte

Differential Revision: D78750791

fbshipit-source-id: 5b55bc9acbd6ee5aad874ad57607325cb1373c2e
2025-07-24 07:23:28 -07:00
Nicola CortiandFacebook GitHub Bot 9013a9e666 RNGP - Fix a race condition with codegen libraries missing sources (#52803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52803

I've just realized that our build suffer from a race condition. Specifically
libraries codegen needs to be executed before the app starts the evaluating CMake files.
Otherwise this could lead to a lot of missing files or folders.

Changelog:
[Android] [Fixed] - **rngp:** Fix a race condition with codegen libraries missing sources

Reviewed By: huntie

Differential Revision: D78886347

fbshipit-source-id: f59c201d2eab651bc4a08cf5a795acd379d18186
2025-07-24 05:23:38 -07:00
Rob HoganandFacebook GitHub Bot 15ee3ed2b8 Changelog for 0.77.3 (#52733)
Summary:
Add changelog entry for the 0.77.3 release

## Changelog:

[INTERNAL] Changelog for 0.77.3

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D78659427

Pulled By: robhogan

fbshipit-source-id: 8c62c706a831ed51e362b17840e5a297d378d424
2025-07-24 01:24:17 -07:00
Luna WeiandFacebook GitHub Bot f41f52cf93 Move out enums VirtualViewMode and VirtualViewRenderState (#52798)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52798

Changelog: [Internal] - Move out VirtualViewMode and VirtualViewRenderState into separate files for experimental VirtualView

Reviewed By: mdvacca

Differential Revision: D78825700

fbshipit-source-id: ec21867688b69c4dc88be94a2f3454e07fe4c1bc
2025-07-23 20:23:31 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot e1ae619fce Implement accessibilityOrder by building the accessibilityTree through addChildrenForAccessibility (#52743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52743

We can build an accessibility tree for Talkback by overriding addChildrenForAccessibility of ViewGroup.

With this we just manually build a tree that contains the elements we care about in the order we want.

We also try to keep most of the tree intact so that coopting works properly
Changelog: [Internal]

EDITS: After backout, fixed the issue where we were incorrectly setting the `accessibility_order_parent` tag the ReactAxOrderHelper class instead of the actual view. Also, made the cast safe to prevent any unexpected issues.

Also refactored the ReactAxOrderHelper functions to not have the block scoped `traverse` functions in favor of just looping through the children of a view when calling them

Reviewed By: joevilches

Differential Revision: D78669715

fbshipit-source-id: e714367c28e722ce42895531cf18e6f2dc926556
2025-07-23 18:08:29 -07:00
Rubén NorteandFacebook GitHub Bot 2de4984970 Implement solution for ShadowTree commmit exhaustion using recursive locks (behind a flag) (#52795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52795

Changelog: [internal]

This is another attempt to fix https://github.com/facebook/react-native/issues/51870, inspired by https://github.com/facebook/react-native/pull/52314 but gated behind a feature flag until we've tested it carefully.

Reviewed By: sammy-SC

Differential Revision: D78817100

fbshipit-source-id: 45e6cae019b212528f2b2e74b9f52fe43d07f537
2025-07-23 15:06:12 -07:00
Rubén NorteandFacebook GitHub Bot c6c7c3720f Clean up feature flag preventShadowTreeCommitExhaustionWithLocking (#52791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52791

Changelog: [internal]

This cleans up this feature flag as it doesn't work as intended. We'll try another approach with a different flag instead.

Reviewed By: sammy-SC

Differential Revision: D78815892

fbshipit-source-id: 4c651a3a225de9cfb54d00346343c7f2e3bea1d5
2025-07-23 15:06:12 -07:00
Nick LefeverandFacebook GitHub Bot e57ae6b964 Remove recycled view from parent by default (#52792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52792

With view recyling enabled only on a subset of the components, a recyclabe view could still be attached to its parent if that parent is not recyclable. This diff removes any recycled view from its parent. This will allow the view to be attached to a new parent on mount.

This diff removes the assert checking for parents still set on views pushed on the recycle stack.

Changelog: [Internal]

Reviewed By: mdvacca, sammy-SC

Differential Revision: D78814943

fbshipit-source-id: bb754ce5f526acbf263f23646335228447278562
2025-07-23 12:16:28 -07:00
Ramanpreet NaraandFacebook GitHub Bot 729e61bfe1 Make ui manager proxy not depend on ui manager logic (#52763)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52763

The ui manager proxy shouldn't depend on the legacy ui manager.

We plan to compile out the legacy ui manager soon. But, the ui manager proxy is supposed to linger around for longer.

Changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D78697148

fbshipit-source-id: 249c63aae63daf653627e3e449b442b5ddaa5afe
2025-07-23 11:58:51 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c71c68121a Properly setup headers for FBReactNativeSpec in prebuilds (#52783)
Summary:
bypass-github-export-checks
Pull Request resolved: https://github.com/facebook/react-native/pull/52783

This change reverts D78158734 which was a patch to make the dynamic frameworks work properly because we were not exporting the FBReactNativeSpec headers in prebuilds correctly.

This change fixes this, by exposritng those headers correctly.

## Changelog:
[Internal] -

bypass-github-export-checks

Reviewed By: cortinico

Differential Revision: D78803425

fbshipit-source-id: 5613ed0c790455ea86668eeb436f7b78a0c80918
2025-07-23 10:44:21 -07:00
Vitali ZaidmanandFacebook GitHub Bot 9d93fb5e0a Update debugger-frontend from 8dc0d5b...a7e4f59 (#52793)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52793

Changelog: [Internal] - Update `react-native/debugger-frontend` from 8dc0d5b...a7e4f59

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/8dc0d5b365e6b4600b78e5a7381aa861d8c1c81e...a7e4f59675edbda995b0cb0d40f277a59a3baebf).

### Changelog

[General][Fixed] fixed stack trace parsing failure for certain frames that are special to Hermes that do not exist in V8.

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [a7e4f5967](https://github.com/facebook/react-native-devtools-frontend/commit/a7e4f5967) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-23T17:04:33+01:00 | [allow parsing special hermes eval stack trace frames (#196)](https://github.com/facebook/react-native-devtools-frontend/commit/a7e4f5967) |
| [12ae91ad4](https://github.com/facebook/react-native-devtools-frontend/commit/12ae91ad4) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-23T16:37:55+01:00 | [allow parsing stack traces that end with "skipping x frames" (#195)](https://github.com/facebook/react-native-devtools-frontend/commit/12ae91ad4) |
| [875a31a90](https://github.com/facebook/react-native-devtools-frontend/commit/875a31a90) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-15T13:45:16+01:00 | [fixed general contribution guide and added meta contribution guide in pr template (#194)](https://github.com/facebook/react-native-devtools-frontend/commit/875a31a90) |

Reviewed By: huntie

Differential Revision: D78817268

fbshipit-source-id: 7e266041b3df7ecbcded6e57cb51bd4647dc835d
2025-07-23 10:24:43 -07:00
Nicola CortiandFacebook GitHub Bot 971997c445 Rollout useNativeTransformHelperAndroid and useNativeEqualsInNativeReadableArrayAndroid as experimental (#52789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52789

I'm adding those 2 feature flags as enabled for the experimental channel of React Native so that partners
can report back to us and let us know if there are significant regressions.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D78810737

fbshipit-source-id: dc51106e2167aa92d4a275be78abb2c6984b7ffb
2025-07-23 09:37:46 -07:00
Christoph PurrerandFacebook GitHub Bot 39ded5eb2a Apply clang-tidy setting: cxxreact (#52730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52730

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D78459248

fbshipit-source-id: 1dcd15c5d0cf56f323cc15248c684c9940abdd19
2025-07-23 09:31:44 -07:00
Christoph PurrerandFacebook GitHub Bot 0f25a354ba Simply use a std::shared_ptr in TestCallInvoker (#52771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52771

Changelog: [Internal]

It seems we can simply use a std::shared_ptr here

(This was some initial over-engineering which isn't needed as it turns out)

Reviewed By: cipolleschi

Differential Revision: D78771904

fbshipit-source-id: 2925c424d2061ca727636c683ec783ed56e3f0c9
2025-07-23 08:52:41 -07:00
Alex HuntandFacebook GitHub Bot ec5638abd0 Expose ReactNativeVersion API (#52784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52784

Resolves https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-13860767.

**Changes**

- Formalises the design of `ReactNativeVersion` as a single object and adds a `getVersionString` accessor.
- Expose `ReactNativeVersion` as a root export on `index.js`.
- Update deep imports use in `NewAppScreen`.

**Notes**

- Subtly, we also have `Platform.constants.reactNativeVersion` in our public API already. **However**, this is the per-platform ***native-reported*** RN version, distinct from the JS version (this diff). See [`ReactNativeVersionCheck.js`](https://github.com/facebook/react-native/blob/54d733311d87e9ab4e18f947edf3f5c85f9a6275/packages/react-native/Libraries/Core/ReactNativeVersionCheck.js#L24).

Changelog:
[General][Added] - Expose `ReactNativeVersion` API as JavaScript root export

Reviewed By: cortinico

Differential Revision: D78806347

fbshipit-source-id: 974251fdaa9ab18fac8a584644fea894e4f6e083
2025-07-23 08:28:32 -07:00
Sam ZhouandFacebook GitHub Bot 99edc42242 Fork internal vs external prettier plugin resolution (#52787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52787

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D78808694

fbshipit-source-id: 15f6b390bd2674303334dc0615ddb63e96872d4c
2025-07-23 06:51:56 -07:00
generatedunixname537391475639613andFacebook GitHub Bot c7c11f6671 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/root/RootShadowNode.cpp (#52781)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52781

Reviewed By: rshest

Differential Revision: D78797400

fbshipit-source-id: ec6670fa4b80c3ad19f25e6908c71eef12f5f059
2025-07-23 05:54:44 -07:00
Rubén NorteandFacebook GitHub Bot 54d733311d Add validation for environment variables for Fantom (#52779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52779

Changelog: [internal]

Adds validation for Fantom environment variables at runtime, to catch typos or variables that no longer have an effect.

Reviewed By: rshest

Differential Revision: D78803045

fbshipit-source-id: efb28a4f3fd6a4be35fb525d91fb093a1e88f7e4
2025-07-23 04:41:42 -07:00
Rubén NorteandFacebook GitHub Bot 3c087fc81c Small refactor of Fantom global setup (#52766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52766

Changelog: [internal]

Just a minor refactor so adding more logic that should work both at Meta and in OSS is easier in the next diff

Reviewed By: christophpurrer

Differential Revision: D78741904

fbshipit-source-id: 3abda5d5b7be157bf381e26dad2fd4b064a0f556
2025-07-23 04:41:42 -07:00
Rubén NorteandFacebook GitHub Bot fec6a0adf1 Set displayName for Fantom configuration (#52778)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52778

Changelog: [internal]

Jest has an option to select a specific project when running tests:

```
jest --selectProjects fantom
```

But for this to work, a `displayName` option needs to be set in the project configuration. This adds that for Fantom tests (using `fantom`).

Reviewed By: rshest

Differential Revision: D78802516

fbshipit-source-id: 483e7c1450b1f97961e4e43c963fac3ce82cee58
2025-07-23 04:41:42 -07:00
Rubén NorteandFacebook GitHub Bot 130b46c117 Add new environment variables to force CI and debug C++ (#52776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52776

Changelog: [internal]

`FANTOM_FORCE_CI_MODE` is just an explicit way to indicate that we're on CI, so we'd run benchmarks in test mode, for example.

`FANTOM_DEBUG_CPP` is just an alias for `FANTOM_ENABLE_CPP_DEBUGGING` which is unnecessarily long.

Reviewed By: rshest

Differential Revision: D78801918

fbshipit-source-id: 8e60bdd911067c6b0b92be7e90553fd5209c9ca9
2025-07-23 04:41:42 -07:00
Rubén NorteandFacebook GitHub Bot 342b88d0d3 Create new environment variable to force running benchmarks in test mode (#52759)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52759

Changelog: [internal]

This introduces a new environment variable for Fantom to disable benchmarks (`FANTOM_FORCE_TEST_MODE`), without having to run in CI mode.

Reviewed By: rshest

Differential Revision: D78672864

fbshipit-source-id: ef445bd8b36703594658529da2436c75d5b87179
2025-07-23 04:41:42 -07:00
Rubén NorteandFacebook GitHub Bot af670c8319 Honor ignored frames in errors reported by Fantom (#52765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52765

Changelog: [internal]

Reported locations for errors in Fantom is wrong, because it seems it's not ignoring "infra" frames.

This was caused by the `stack` property in `ErrorWithCustomBlame` being set on the error objects and shadowing the getter that removes the necessary frames. This fixes that by forcing that property to be deleted.

Reviewed By: christophpurrer

Differential Revision: D78747119

fbshipit-source-id: 81d6ce74041382d7582e2066409e839d28d91052
2025-07-23 04:41:42 -07:00
generatedunixname537391475639613andFacebook GitHub Bot c97741da39 xplat/js/react-native-github/packages/react-native/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp (#52780)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52780

Reviewed By: rshest

Differential Revision: D78798597

fbshipit-source-id: 28cdd8b2fdd4c5d5889f527ee7574f87e18215a7
2025-07-23 04:31:56 -07:00
Dawid MałeckiandFacebook GitHub Bot fb4587780e Move ReactNativeFeatureFlags to src/private (#52610)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52610

This diff removes `ReactNativeFeatureFlags` from `react-native/Libraries/ReactNative` and migrates
`shouldPressibilityUseW3CPointerEventsForHover` to common `ReactNativeFeatureFlags` in `src/private/featureflags`. The `shouldEmitW3CPointerEvents is removed as it is used in `rn-tester` to hide some examples.

Changelog:
[General][Breaking] - Migrate `shouldPressibilityUseW3CPointerEventsForHover` to common private feature flags and remove `shouldEmitW3CPointerEvents` flag.

Reviewed By: robhogan

Differential Revision: D75448698

fbshipit-source-id: 03942c9504b855f2054c9a5948c0521ce17365b5
2025-07-23 01:43:05 -07:00
Christoph PurrerandFacebook GitHub Bot 730a0d5aef Apply clang-tidy setting: react/renderer|perflogger (#52739)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52739

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D78634924

fbshipit-source-id: c0ad2c6162e1d5929b2b097b884f5989d040d576
2025-07-22 22:06:34 -07:00
Christoph PurrerandFacebook GitHub Bot 14986a8dbf Unify ImageManager API (#52749)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52749

Changelog: [Internal]

The overloaded

```
  virtual ImageRequest requestImage(
      const ImageSource& imageSource,
      SurfaceId surfaceId) const;

  virtual ImageRequest requestImage(
      const ImageSource& imageSource,
      SurfaceId surfaceId,
      const ImageRequestParams& imageRequestParams,
      Tag tag) const;
```
can be expressed with default args in the header file
```
 virtual ImageRequest requestImage(
      const ImageSource& imageSource,
      SurfaceId surfaceId,
      const ImageRequestParams& imageRequestParams = {},
      Tag tag = {}) const;
```

Reviewed By: lenaic

Differential Revision: D78702755

fbshipit-source-id: b482a26136cd512232b86e4b86607d44ca49460e
2025-07-22 19:45:27 -07:00
Sam ZhouandFacebook GitHub Bot 174ea179cd Switch to prettier v3 in fbsource (#52773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52773

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78580177

fbshipit-source-id: ef0d4619c10fce62f17351b7691099ba6491ed63
2025-07-22 18:50:50 -07:00
David VaccaandFacebook GitHub Bot 52f2cbab41 Delete ReactYogaConfigProvider (#52772)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52772

ReactYogaConfigProvider is an internal legacy unused class, I'm just deleting it

There are no usages of this class

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D78516728

fbshipit-source-id: f694e9cd66ebe6cf97b343ce971b61fbd42f956f
2025-07-22 16:54:30 -07:00
David VaccaandFacebook GitHub Bot 65671108f6 Deprecate ReactPackageLogger (#52716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52716

ReactPackageLogger is not supported in the new architecture

changelog: [Android][Changed] ReactPackageLogger is not supported in the new architecture and being deprecated

Differential Revision: D78501563

fbshipit-source-id: 3fef9dc80b8fce4d5a2067cfe171abb8ea6e1aca
2025-07-22 16:54:30 -07:00
Sam ZhouandFacebook GitHub Bot f697b5ad5c Make functions async and add await to prepare for prettier v3 upgrade: 6/n (#52770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52770

Prettier v3 has an async API. This diff adds in async and await ahead of the upgrade to prepare for the API change.

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78752906

fbshipit-source-id: 2deeecfc283be30fd0840b2a089604f4e6804af5
2025-07-22 16:18:26 -07:00
Sam ZhouandFacebook GitHub Bot 6c8bcad054 Make functions async and add await to prepare for prettier v3 upgrade: 1/n (#52768)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52768

Prettier v3 has an async API. This diff adds in await ahead of the upgrade to prepare for the API change.

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78752354

fbshipit-source-id: c0d27a6c863747b71852e72a22687d1fe1d9f76f
2025-07-22 13:28:03 -07:00
Christoph PurrerandFacebook GitHub Bot 7b5307d181 Replace ContextContainer::Shared with std::shared_ptr<const ContextContainer> 2/2 (#52750)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52750

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D78704833

fbshipit-source-id: 4df0029f6de860c93864e12c479e387f3981f7b5
2025-07-22 12:40:27 -07:00
Christoph PurrerandFacebook GitHub Bot 5e1798ad7a Add Android image prefetching feature flag (#52748)
Summary:
Changelog: [Internal]

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

Reviewed By: rshest

Differential Revision: D78701936

fbshipit-source-id: 878eed13b39ff71487ca47fe7e4ea46459b85ba3
2025-07-22 12:30:57 -07:00
Christoph PurrerandFacebook GitHub Bot ae4ce02752 Replace SharedImageManager with std::shared_ptr<ImageManager> (#52747)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52747

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D78698231

fbshipit-source-id: 5da5c57237d1cc16dc3d120c7b58c44da6914d36
2025-07-22 09:36:32 -07:00
Christoph PurrerandFacebook GitHub Bot 52d8660964 Use default namespace in RNAndroid / imagemanager / conversion (#52751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52751

The only method use externally is
```
inline MapBuffer serializeImageRequest(
    const ImageSource& imageSource,
    const ImageRequestParams& imageRequestParams) {
```
all others can move to a private/anonymous namespace

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D78709009

fbshipit-source-id: 10c444c34641deddcfc3d2d4e95274f24fd38a4e
2025-07-22 09:29:50 -07:00
Riccardo CipolleschiandFacebook GitHub Bot bfc10ba90f Use prebuilds for nightlies (#52762)
Summary:
Use prebuilds for nightly checks. This should save a lot of time in CI.
An example job which used to take 18 min took less than 4 min.

## Changelog:
[Internal] -

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

Test Plan:
GHA
Sample job, 3' 23'': https://github.com/facebook/react-native/actions/runs/16447578916/job/46483698898?pr=52762
(Same job last night, 18' 27'': https://github.com/facebook/react-native/actions/runs/16434647827/job/46442342235)

Reviewed By: cortinico

Differential Revision: D78741195

Pulled By: cipolleschi

fbshipit-source-id: 6b9dad215af19c17ed4b2bcd8a835214e33d0267
2025-07-22 08:48:40 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3da74f0799 Add method for collecting all events in a single container (#52734)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52734

# Changelog: [Internal]

We are going to need it at the top of the stack, once we will capture the Trace Events as part of the Tracing Profile for the whole Host.

This is also would be used for always-on tracing.

Reviewed By: sbuggay

Differential Revision: D78660071

fbshipit-source-id: 4f876bed992b8a794e561940ad12405fef88cb62
2025-07-22 04:34:50 -07:00
Hanno J. GödeckeandFacebook GitHub Bot bbc0c0b6ef fix: remove redundant if checks in traceMark (#52756)
Summary:
There are some duplicated function calls in `PerformanceEntryReporter::reportMark()` . I know this is a micro optimization but I feel this way the code is cleaner.

This is called through `performance.mark` so there is potentially a tiny little performance improvement here?

## 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
-->

[INTERNAL] [FIXED] - Removed redundant checks in `PerformanceEntryReporter::reportMark()`

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

Test Plan: The existing testing infrastructure should cover these callsites i believe

Reviewed By: rubennorte

Differential Revision: D78731441

Pulled By: cortinico

fbshipit-source-id: e0de12c3c6f55e12eb454ea4b7081f3d6003126c
2025-07-22 04:14:48 -07:00
Maciej SynowskiandFacebook GitHub Bot f84514a88b Do not override (xc)framework's Info.plist files with RCTNewArchEnabled (#52520)
Summary:
`new_architecture.rb` script looks for `Info.plist` files in IOS directory, and adds RCTNewArchEnabled field to each one, except for those explicitly excluded. Framework files should remain unchanged, so I've extended the excluded_info_plist dict.

Modifying framework's Info.plist can break pod installation with errors like:

```
[!] An error occurred while processing the post-install hook of the Podfile.

invalid byte sequence in UTF-8
```

## 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
-->

[IOS] [FIXED] Fix overriding (xc)framework Info.plist files with RCTNewArchEnabled field

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

Test Plan: Add any .framework or .xcframework to the iOS directory, install pods. If *.(xc)framework/Info.plist remains unchanged it works as intended.

Reviewed By: cortinico

Differential Revision: D78731439

Pulled By: cipolleschi

fbshipit-source-id: a04dfc0e282294e3e16d8292281f2c3369008551
2025-07-22 03:55:13 -07:00
Nicola CortiandFacebook GitHub Bot 59101d6809 Remove unnecessary OSSLibraryExample (#52705)
Summary:
This module is currently unused, so we can clean it up.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D78555763

Pulled By: cortinico

fbshipit-source-id: 0a6152ab3d357cac0c6d7669f292680af7b87074
2025-07-22 03:16:48 -07:00
React Native BotandFacebook GitHub Bot c102f24522 Add changelog for v0.81.0-rc.2 (#52744)
Summary:
Add Changelog for 0.81.0-rc.2

## Changelog:
[Internal] - Add Changelog for 0.81.0-rc.2

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D78727514

Pulled By: rshest

fbshipit-source-id: 7bee2ec44705c7844c6fe03781f6031472d7b341
2025-07-22 02:54:17 -07:00
Christoph PurrerandFacebook GitHub Bot c0eeebbd9d Apply clang-tidy setting: fantorm/rntester (#52731)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52731

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D78634903

fbshipit-source-id: f4ad862061630a098e80a125e25ae3af17b9eb60
2025-07-22 00:48:40 -07:00
Sam ZhouandFacebook GitHub Bot 2c3a00b7b1 Use the prettier config at the root for react-native-codegen (#52746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52746

The config is needed for build, so I renamed it. In this way, the formatting of js code in react-native repo will be consistently controlled by the prettier config in the root. This change will make prettier v3 upgrade easier.

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78700564

fbshipit-source-id: 392ed490bf814870f285c8372ff68b454e228802
2025-07-21 19:45:34 -07:00
Sam ZhouandFacebook GitHub Bot 7970ee9998 Prepare react-native for prettier v3: 2/n (#52745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52745

Prettier v3 no longer loads plugin implicitly. This diff first configures the hermes-parser plugin explicitly to prepare for v3 rollout. D78590158 missed this config.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D78673890

fbshipit-source-id: 1931718ef2b3f011621bf4d64c8936a698506374
2025-07-21 15:22:17 -07:00
Sam ZhouandFacebook GitHub Bot 976055e52b Add annotations or make things readonly to prepare for array literal soundness fix
Summary: Changelog: [Internal]

Reviewed By: abhinayrathore, marcoww6

Differential Revision: D78689934

fbshipit-source-id: f749c4a0a6c34c80f09e4aaa05200ff282151838
2025-07-21 15:13:17 -07:00
Mateo GuzmánandFacebook GitHub Bot 2372c1c56a Fix ktfmt symbolic links issues (#52721)
Summary:
There are symbolic link issues with ktfmt after building the rn-tester. Putting back this patch to address that issue.

## Changelog:

[INTERNAL] - Fix ktfmt symbolic links issues

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

Test Plan:
1. Build the rn-tester:

```sh
yarn android
```

2. Unformat a file manually and then:

```sh
yarn lint-kotlin-check
yarn lint-kotlin
```

Reviewed By: cipolleschi

Differential Revision: D78647797

Pulled By: cortinico

fbshipit-source-id: b2f230741466be0a95c21a9b98f3d15b865c2b83
2025-07-21 09:11:29 -07:00
Nicola CortiandFacebook GitHub Bot 3ea2f62531 Bump ccache cache key on GHA (#52711)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52711

The ccache cache is not really working. That's because we don't have a way to
properly compute the cache.

I'm adding has `hashFiles` to collect all the C++ and CMake files that are used
by ccache to fix this.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D78560946

fbshipit-source-id: 8d521d01386b62d3cfbd485f8e6fcf5f66eba71b
2025-07-21 09:02:04 -07:00
Nicola CortiandFacebook GitHub Bot a7a51275b5 Do not setup-node twice in test_js (#52737)
Summary:
I've noticed that test_js (20) and test_js (24) are actually running on Node 22.
That's because the `yarn-install` action is invoking setup-node again with the default value (22).

This changes it. Also I'm cleaning up the workflows so that every `yarn-install` invocation is happening just after the `setup-node` invocation.

## Changelog:

[INTERNAL] -

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

Test Plan: CI which will most likely be red for test_js (20) so will need a follow-up

Reviewed By: cipolleschi

Differential Revision: D78664671

Pulled By: cortinico

fbshipit-source-id: c73390930d1511d1bf0f2d4ea92e83f50b10247f
2025-07-21 08:51:05 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 5c869fd0a5 Run E2E tests on each PR (#52197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52197

This Diff enables E2E tests to run on every PR.
We estimated that, now that we removed JSC and the legacy arch, the cost of running E2E tests on each PR should not be that high.

## Changelog:
[Internal] - Run E2E tests on each PR

Reviewed By: cortinico

Differential Revision: D77148473

fbshipit-source-id: 68191ff81c197d4c4ff9d6e71a41b7253971ddfb
2025-07-21 08:42:23 -07:00
Alex HuntandFacebook GitHub Bot 0068b9ee90 Restore flow dir in react-native package files (#52735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52735

Changelog: [Internal] (Follow up to keep #50784 non-breaking)

Reviewed By: cortinico

Differential Revision: D78662770

fbshipit-source-id: 03d931c904c0092481dbd03e8420244639305610
2025-07-21 08:35:59 -07:00
Riccardo CipolleschiandFacebook GitHub Bot aa27cdba9b Revert "Fix Dimensions window values on Android < 15 (#52481)" (#52732)
Summary:
Commit 86994a6e22 breaks Android for API level 24. Since it has landed last week, we had CI red. reverting this change while we found a valid fix forward.

## Changelog:
[Android][Changed] - Reverted fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled

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

Test Plan:
GHA is green.:
https://github.com/facebook/react-native/actions/runs/16414048087/job/46377878366?pr=52732
https://github.com/facebook/react-native/actions/runs/16414048087/job/46377878383?pr=52732

Reviewed By: cortinico, rshest

Differential Revision: D78657920

Pulled By: cipolleschi

fbshipit-source-id: 396a48c9aa7bde3109e25200fe2decc9977efda4
2025-07-21 05:31:43 -07:00
Mateo GuzmánandFacebook GitHub Bot 57b5d7bf6f Make UIManagerModuleListener internal (#52727)
Summary:
This class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.uimanager.UIManagerModuleListener).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.UIManagerModuleListener internal

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

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

Reviewed By: cortinico

Differential Revision: D78656919

Pulled By: rshest

fbshipit-source-id: cc9756bdd1c9e702f26cd87493c6f291792b7526
2025-07-21 05:12:22 -07:00
Nick LefeverandFacebook GitHub Bot 1f6eb884bf Fix modal crash on create with initial props (#52729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52729

The Modal view creation contains initial properties when using Props 2.0. This diff adds support for Modal view creations having initial properties by allowing the `updateProperties` fast path only if the dialog is already initialized.

Without the change, the fast path gets called before the dialog could be initialized which leads to throwing an exception when the dialog is being checked to see if it is initialized.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D78638902

fbshipit-source-id: 61ad007b82867fa8b35648e3d8c930ee0e86c80d
2025-07-21 05:02:18 -07:00
Christoph PurrerandFacebook GitHub Bot a0a77f7476 Make it explicit to specify HttpClientFactoryKey and WebSocketClientFactoryKey values (#52715)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52715

Changelog: [Internal]

Right now we rely on compile / link time magic to detect the implementation of
```
WebSocketClientFactory getWebSocketClientFactory();
HttpClientFactory getHttpClientFactory();
```
this actually works until it does not work anymore, see .e.g.:
```
ld.lld: error: undefined symbol: facebook::react::getHttpClientFactory()
>>> referenced by ReactHost.cpp:111 (xplat/js/react-native-github/packages/react-native/ReactCxxPlatform/react/runtime/ReactHost.cpp:111)
>>>               xplat/js/react-native-github/packages/react-native/ReactCxxPlatform/react/runtime/__runtimeAndroid__/__objects__/ReactHost.cpp.pic.o:(facebook::react::ReactHost::ReactHost(facebook::react::ReactInstanceConfig, std::__ndk1::shared_ptr<facebook::react::IMountingManager>, std::__ndk1::shared_ptr<facebook::react::RunLoopObserverManager>, std::__ndk1::shared_ptr<facebook::react::ContextContainer const>, std::__ndk1::function<void (facebook::jsi::Runtime&, facebook::react::JsErrorHandler::ProcessedError const&)>, std::__ndk1::function<void (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, unsigned int)>, std::__ndk1::shared_ptr<facebook::react::IDevUIDelegate>, std::__ndk1::vector<std::__ndk1::function<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::allocator<std::__ndk1::function<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>>>, std::__ndk1::shared_ptr<facebook::react::SurfaceDelegate>, std::__ndk1::shared_ptr<facebook::react::NativeAnimatedNodesManagerProvider>, std::__ndk1::function<void (facebook::jsi::Runtime&)>))

ld.lld: error: undefined symbol: facebook::react::getWebSocketClientFactory()
>>> referenced by ReactHost.cpp:117 (xplat/js/react-native-github/packages/react-native/ReactCxxPlatform/react/runtime/ReactHost.cpp:117)
>>>               xplat/js/react-native-github/packages/react-native/ReactCxxPlatform/react/runtime/__runtimeAndroid__/__objects__/ReactHost.cpp.pic.o:(facebook::react::ReactHost::ReactHost(facebook::react::ReactInstanceConfig, std::__ndk1::shared_ptr<facebook::react::IMountingManager>, std::__ndk1::shared_ptr<facebook::react::RunLoopObserverManager>, std::__ndk1::shared_ptr<facebook::react::ContextContainer const>, std::__ndk1::function<void (facebook::jsi::Runtime&, facebook::react::JsErrorHandler::ProcessedError const&)>, std::__ndk1::function<void (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, unsigned int)>, std::__ndk1::shared_ptr<facebook::react::IDevUIDelegate>, std::__ndk1::vector<std::__ndk1::function<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>, std::__ndk1::allocator<std::__ndk1::function<std::__ndk1::shared_ptr<facebook::react::TurboModule> (std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&)>>>, std::__ndk1::shared_ptr<facebook::react::SurfaceDelegate>, std::__ndk1::shared_ptr<facebook::react::NativeAnimatedNodesManagerProvider>, std::__ndk1::function<void (facebook::jsi::Runtime&)>))
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
The change here makes it explicit and mandatory to set the specific implementations of these interfaces

Reviewed By: lenaic

Differential Revision: D78529932

fbshipit-source-id: f26876683433a58e078d6720f169702c563ed92b
2025-07-20 23:08:03 -07:00
Vitali ZaidmanandFacebook GitHub Bot 794df48ad6 re-write console stack trace frame urls to be relative to debugger (#52704)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52704

Stack traces for console calls are passed to the debugger when they are relative to device. (e.g. 10.0.2.2 for Android emulator)

Changelog: [android][fixed] fix stack trace linkifying failing when using Android emulator and other situations where the device and debugger have different bundle urls

Reviewed By: motiz88

Differential Revision: D78553183

fbshipit-source-id: 91d7e7ccc99d12ec7d06f4201237ecf557a46c4f
2025-07-20 22:39:52 -07:00
Alex HuntandFacebook GitHub Bot 6d4ea946f8 Address lint warnings (#52702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52702

Quick pass over some of the main files in `jsinspector-modern` now that C++ lint warnings have become more prevalent / auto-fixable.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D78490415

fbshipit-source-id: 32debcf5f217e847d326498709d50f695902bb5c
2025-07-20 06:12:31 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 8488eaecea Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages [A] [B] [A] (#52718)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52718

Reviewed By: dtolnay

Differential Revision: D78562730

fbshipit-source-id: 24576557eb7a6ba8e655a92f1e7cfe027f99dac0
2025-07-19 12:46:58 -07:00
Marco WangandFacebook GitHub Bot 690cb00353 Deploy 0.276.0 to xplat (#52720)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52720

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D78605229

fbshipit-source-id: 59ae4a2f316cee8415f6ef2984ca74f906ae0377
2025-07-19 11:08:41 -07:00
Mateo GuzmánandFacebook GitHub Bot 2534aeaddb Migrate Arguments to Kotlin (#52457)
Summary:
Migrate com.facebook.react.bridge.Arguments to Kotlin.

## Changelog:

[Android][Changed] - Migrated com.facebook.react.bridge.Arguments to Kotlin.

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

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

Reviewed By: javache

Differential Revision: D78353290

Pulled By: cortinico

fbshipit-source-id: 3d42b44c00a60d34264cb1093991315f5e3c444e
2025-07-19 06:22:25 -07:00
Christoph PurrerandFacebook GitHub Bot ff85e2f6dd Add NativeCxxModuleExampleTests (#52653)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52653

Changelog: [Internal]

This adds an example of Unit Testing a C++ Turbo Module with Google GTest and also adds necessary and useful utility classes for testings

This is GTEST / C++ version of the same tests added in  https://github.com/facebook/react-native/pull/52477

Reviewed By: alanleedev

Differential Revision: D78250302

fbshipit-source-id: 278655779dd17550be9c579d84cc1f7b6e45230d
2025-07-18 22:46:21 -07:00
Christoph PurrerandFacebook GitHub Bot cb94e71845 Delete old location of CallbackWrapper / LongLivedObject (#52649)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52649

Changelog: [Internal]

RN-Windows has been updated > https://github.com/microsoft/react-native-windows/pull/14839

Reviewed By: rshest

Differential Revision: D78312252

fbshipit-source-id: 8e5bd561c4624064cef72395c1179cbe28c247f6
2025-07-18 22:01:44 -07:00
Christoph PurrerandFacebook GitHub Bot 087da29604 Add a TestCallInvoker (#52652)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52652

Changelog: [Internal]

This adds a TestCallInvoker, suitable for unit testing

Reviewed By: alanleedev

Differential Revision: D78453676

fbshipit-source-id: d35e604fedc8656a0430956a811b4a7a07c8ee16
2025-07-18 22:01:36 -07:00
Nicola CortiandFacebook GitHub Bot 34fb932f97 Use allVariants() when publishing ReactAndroid (#52719)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52719

This is really a nit. We don't need to list all the variants here,
we can instead use `allVariants()` which we also use for hermes-engine,
to publish every buildVariant from React Android.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D78561729

fbshipit-source-id: 35989051ce966ea07caf26a218eb43c1a2bcac2d
2025-07-18 20:09:48 -07:00
Sam ZhouandFacebook GitHub Bot 1ceba3b470 Prepare react-native for prettier v3 (#52717)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52717

Prettier v3 no longer loads plugin implicitly. This diff first configures the hermes-parser plugin explicitly to prepare for v3 rollout.

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D78590158

fbshipit-source-id: dba06f5a823488b72a30ae5b58e37e172f4e736f
2025-07-18 17:51:14 -07:00
Nick GerlemanandFacebook GitHub Bot b3d1d2a0a5 Disable Measure Cache When Also Using Prepared Text Layout (#52714)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52714

If we also have prepared text layout enabled, this cache will fill up with the last 1000 TextInput AttributedString, which isn't very useful. Let's assume we want to get rid of this cache, when we have the prepared layout cache as well.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D78534088

fbshipit-source-id: e9020ebfb7e1210f19e0b31f7423e7a9a90a89d1
2025-07-18 15:19:58 -07:00
Nick GerlemanandFacebook GitHub Bot ea394f6229 Fix incorrect hit testing on text when layout reused (#52692)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52692

D77341994 added a global cache for Facsimile layouts, where we will reuse an existing `android.text.Layout`, and `Spannable`, if one already existed for a same AttributedString, under same layout constraints. An error here, is that we consider a layout reusable, even when shadow views are different, which means there may be different react tags in the underlying AttributedString.

This leaks into the layout itself, and means that if a layout is reused, we can hit test against a stale/incorrect react tag.

The solution to allow reuse here, is to avoid embedding react tag directly into the `android.text.Layout` structure. Instead, we replace references to react tags, with a fragment index, and embed the list of fragment indices in each PreparedLayout. We can hide this "cleverness" within the boundary of `TextLayoutManager`, such that an invalid `PreparedLayout` is never allowed to escape.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D78516079

fbshipit-source-id: 2d9fe9d80f60e6d7e7e40080a0817a08b51c3153
2025-07-18 15:19:58 -07:00
Luna WeiandFacebook GitHub Bot 7ea0ef7a90 Implement windowFocus on ReactVirtualViewExperiment (#52690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52690

Changelog: [Internal] - Add the window focus experiment to ReactVirtualViewExperimental

Reviewed By: yungsters

Differential Revision: D78502991

fbshipit-source-id: 3e72561835925040e5b240e71734a088908957ed
2025-07-18 14:16:22 -07:00
Luna WeiandFacebook GitHub Bot 36fed563c4 Use experimental VirtualView in FlatListVirtualColumn (#52689)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52689

Changelog: [Internal] - Add support for experimental VirtualView in polyfill

Reviewed By: mdvacca

Differential Revision: D78450011

fbshipit-source-id: cc30394eb1a008cc8c023db2aaf0a6a6ffcd16df
2025-07-18 14:16:22 -07:00
Nicola CortiandFacebook GitHub Bot 391a6b87a0 Rollout preventShadowTreeCommitExhaustionWithLocking in experimental (#52709)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52709

We want to make user for folks in OSS to try
`preventShadowTreeCommitExhaustionWithLocking`. Therefore I'm updating the OSS
release channel for this flag to experimental.

Changelog:
[Internal] [Changed] - Rollout `preventShadowTreeCommitExhaustionWithLocking` in experimental

Reviewed By: rubennorte

Differential Revision: D78558655

fbshipit-source-id: 02a9d216c7b2f8f7bdc1340213f82b70c5692dc7
2025-07-18 10:20:19 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 81c2e798d7 Fix CQS signal readability-braces-around-statements in xplat/js/react-native-github/packages (#52700)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52700

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

Reviewed By: cipolleschi

Differential Revision: D78549834

fbshipit-source-id: a15a9faed579a1e650eabb6e028a48f9307ad22b
2025-07-18 09:30:15 -07:00
Nicola CortiandFacebook GitHub Bot 9f0903780b Bump monorepo packages to 0.82.0-main (#52706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52706

This just prepares the repo for the next branch cut.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D78558445

fbshipit-source-id: 2132d560dad447b3685874438387a519587f8554
2025-07-18 09:23:10 -07:00
generatedunixname89002005287564andFacebook GitHub Bot ae3b793de6 Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages [A] [A] (#52708)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52708

Reviewed By: rshest

Differential Revision: D78538428

fbshipit-source-id: 6195ead0fa36e5fc4632e9a57362508f55969380
2025-07-18 09:01:22 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 37a0517b3f Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D78413554

fbshipit-source-id: 5b0d64f886db4cf121f4a6761e6a3e7fe1ccceec
2025-07-18 08:54:36 -07:00
generatedunixname89002005287564andFacebook GitHub Bot e186f1bf17 Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages [B] (#52693)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52693

Reviewed By: dtolnay

Differential Revision: D78494711

fbshipit-source-id: 870e300b29e41aec488926cdf416f246de96514d
2025-07-18 08:28:34 -07:00
Nicola CortiandFacebook GitHub Bot eb2461c7c9 Create a debugOptimized buildType for Android (#52648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52648

This creates a `debugOptimized` build type for React Native Android, meaning that we can run C++ optimization on the debug build, while still having the debugger enabled. This is aimed at improving the developer experience for folks developing on low-end devices or emulators.

Users that intend to debug can still use the `debug` variant where the full debug symbols are shipped.

Changelog:

[ANDROID] [ADDED] - Create a debugOptimized buildType for Android

Reviewed By: cipolleschi

Differential Revision: D78425138

fbshipit-source-id: c1e9ea3608e7df10fb871a5584352f0747cf560b
2025-07-18 08:07:54 -07:00
Nicola CortiandFacebook GitHub Bot d89acc1596 Migrate helloworld to use {usesCleartextTraffic} manifest placeholder (#52647)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52647

This removes the need to specify 2 Manifests for apps and we can just use the `main` manifes to toggle if `usesCleartextTraffic` should be enabled or not.

This will have to be replicated in the template repository.

Changelog:
[Android] [Added] - Add support to specify a single Manifest rather than 2 (main/debug) by using the `usesCleartextTraffic` manifest placeholder which is autoconfigured by RNGP.

Reviewed By: cipolleschi

Differential Revision: D78425139

fbshipit-source-id: 9173a014b387d5aed5f7087fa69b7bd49c220f2c
2025-07-18 08:07:54 -07:00
Nicola CortiandFacebook GitHub Bot 5e3edafec6 Migrate RNTester to use {usesCleartextTraffic} Manifest Placeholder (#52620)
Summary:
This creates a `debugOptimized` build type for React Native Android, meaning that we can run C++ optimization on the debug build, while still having the debugger enabled. This is aimed at improving the developer experience for folks developing on low-end devices or emulators.

Users that intend to debug can still use the `debug` variant where the full debug symbols are shipped.

## Changelog:

[ANDROID] [ADDED] - Create a debugOptimized buildType for Android

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

Test Plan:
Tested locally with RNTester by doing:

```
./gradlew installDebugOptimized
```

This is the output of the 3 generated .aar. The size difference is a proof that we're correctly stripping out the C++ debug symbols:

<img width="193" height="54" alt="Screenshot 2025-07-15 at 17 49 50" src="https://github.com/user-attachments/assets/584a0e8d-2d17-40d4-ac29-da09049d6554" />
<img width="235" height="51" alt="Screenshot 2025-07-15 at 17 49 39" src="https://github.com/user-attachments/assets/eda8f9e7-3509-4334-8c16-990e55caa04d" />
<img width="184" height="52" alt="Screenshot 2025-07-15 at 17 49 32" src="https://github.com/user-attachments/assets/a5c94385-bc00-4484-b43e-088ee039827f" />

Rollback Plan:

Reviewed By: cipolleschi

Differential Revision: D78351347

Pulled By: cortinico

fbshipit-source-id: 568a484ba8d2ee6e089cabc95451938e853fbc54
2025-07-18 08:07:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot 5cda3065ce Update font scale on Android when recreating RootView (#52595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52595

Changelog: [ANDROID][FIXED] Update font scale when recreating `RootView`

At the moment `enableFontScaleChangesUpdatingLayout` flag only works when the activity is configured to handle font scale changes by itself (`configChanges="fontScale"` in the manifest).

When that configuration is missing, the OS handles the font scale changes by recreating the activity, but in this case the path responsible for updating internally kept font size isn't executed.

This diff updates the RootView, so that the display metrics are also updated when it's created. Alternative approach would be to do that on the Activity, but that assumes usage of `ReactActivity`.

Reviewed By: NickGerleman

Differential Revision: D78323174

fbshipit-source-id: e48583091767497b5dfd4f2d938329530de4068d
2025-07-18 06:50:29 -07:00
Rubén NorteandFacebook GitHub Bot 532b415960 Throw an error when using an unrecognized @fantom_ prefixed pragma (#52701)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52701

Changelog: [internal]

This adds validation for Fantom test file pragmas to avoid ignoring configurations accidentally when introducing typos.

Reviewed By: rshest

Differential Revision: D78550866

fbshipit-source-id: 7123bfb39573adbb1adf417c232cf7d4cae4cd25
2025-07-18 04:19:28 -07:00
Rubén NorteandFacebook GitHub Bot adef486333 Assume NativePerformance will be available if the Performance module is loaded (#52671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52671

Changelog: [internal]

When setting up the global `performance` value, we check if the native module exists to decide what version to setup: the legacy "barebones" version or the modern version that's mostly spec compliant.

As we do that check and we shouldn't be requiring the module from anywhere else, it should be safe to always assume the module will be defined if we load the `Performance` class, so we can avoid checks in all methods.

NOTE: I've kept some checks for a few methods that are still not fully propagated (new methods like `reportMark`, `reportMeasure` and `getMarkTime`).

This improves performance slightly for `performance` methods:

* Before

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1803.32 ± 0.71%'    | '1763.00'           | '563849 ± 0.01%'           | '567215'                  | 554908  |
| 1       | 'mark (with custom startTime)'                            | '1762.39 ± 1.67%'    | '1692.00'           | '587832 ± 0.01%'           | '591017'                  | 567414  |
| 2       | 'measure (default)'                                       | '1879.47 ± 1.44%'    | '1813.00'           | '548962 ± 0.01%'           | '551572'                  | 532064  |
| 3       | 'measure (with start and end timestamps)'                 | '1916.65 ± 0.84%'    | '1873.00'           | '531258 ± 0.01%'           | '533903'                  | 521743  |
| 4       | 'measure (with mark names)'                               | '2049.84 ± 0.44%'    | '2013.00'           | '492799 ± 0.01%'           | '496771'                  | 487844  |
| 5       | 'clearMarks'                                              | '719.87 ± 0.04%'     | '711.00'            | '1403602 ± 0.01%'          | '1406470'                 | 1389136 |
| 6       | 'clearMeasures'                                           | '710.04 ± 0.04%'     | '701.00'            | '1421610 ± 0.01%'          | '1426534'                 | 1408373 |
| 7       | 'mark + clearMarks'                                       | '2256.56 ± 1.10%'    | '2143.00'           | '460721 ± 0.02%'           | '466636'                  | 443152  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2345.44 ± 1.11%'    | '2244.00'           | '442395 ± 0.02%'           | '445633'                  | 426360  |
| 9       | 'measure + clearMeasures (with mark names)'               | '2349.55 ± 0.61%'    | '2283.00'           | '434370 ± 0.02%'           | '438020'                  | 425613  |

* After

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1791.47 ± 1.08%'    | '1732.00'           | '573787 ± 0.01%'           | '577367'                  | 558202  |
| 1       | 'mark (with custom startTime)'                            | '1699.41 ± 1.27%'    | '1642.00'           | '605188 ± 0.01%'           | '609013'                  | 588441  |
| 2       | 'measure (default)'                                       | '1820.92 ± 1.39%'    | '1763.00'           | '563437 ± 0.01%'           | '567215'                  | 549173  |
| 3       | 'measure (with start and end timestamps)'                 | '1923.57 ± 1.65%'    | '1852.00'           | '537112 ± 0.01%'           | '539957'                  | 519867  |
| 4       | 'measure (with mark names)'                               | '2036.09 ± 1.05%'    | '1983.00'           | '500406 ± 0.01%'           | '504286'                  | 491139  |
| 5       | 'clearMarks'                                              | '657.49 ± 0.07%'     | '641.00'            | '1543793 ± 0.01%'          | '1560062'                 | 1520939 |
| 6       | 'clearMeasures'                                           | '669.02 ± 0.09%'     | '651.00'            | '1520386 ± 0.01%'          | '1536098'                 | 1494730 |
| 7       | 'mark + clearMarks'                                       | '2213.09 ± 1.53%'    | '2103.00'           | '470008 ± 0.02%'           | '475511'                  | 451858  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2353.15 ± 1.27%'    | '2214.00'           | '448563 ± 0.02%'           | '451671'                  | 424962  |
| 9       | 'measure + clearMeasures (with mark names)'               | '2298.28 ± 0.62%'    | '2243.00'           | '441703 ± 0.02%'           | '445831'                  | 435108  |

Reviewed By: hoxyq

Differential Revision: D78412931

fbshipit-source-id: 07390722bb00a51847cb5625b2adb4e26f89e5d2
2025-07-18 03:44:21 -07:00
Rubén NorteandFacebook GitHub Bot c9367a8d86 Remove optionality for stable methods of the NativePerformance module (#52668)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52668

Changelog: [internal]

These methods have been available for months so no need to consider backwards compatibility with older binaries.

Reviewed By: huntie

Differential Revision: D78412932

fbshipit-source-id: 0f1d541c36c98a4cc8c847d1ee7a08a9d0f4b849
2025-07-18 03:44:21 -07:00
Alex HuntandFacebook GitHub Bot e247be793c Lower minimum Node.js version to 20.19.4 (#52678)
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
2025-07-18 03:32:13 -07:00
Nick GerlemanandFacebook GitHub Bot 3f9b19eb89 Fix build_android GHA Job (#52694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52694

build_android job is always failing, with this assertion. Seems like find/replace in D78484060 gone wrong?

Changelog: [Internal]

Reviewed By: sbuggay

Differential Revision: D78534334

fbshipit-source-id: 291bdd01b41fa6efea00ed63a0dee8bdb14cbc3a
2025-07-17 20:42:02 -07:00
Ramanpreet NaraandFacebook GitHub Bot 862e8c7049 IntersectionObserver: Clean up legacy observe/unobserve methods
Summary:
In this diff, we migrated IntersectionObserver to tokens: D74262804.

So that we wouldn't have to store shadow nodes on the javascript side.

Storing shadow nodes lead to a memory leak in the past.

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D78494075

fbshipit-source-id: 38923ca4b265de6ff81ea20e5649e0bd2e39afc9
2025-07-17 17:35:22 -07:00
Sam ZhouandFacebook GitHub Bot 23c8787fe2 Add annotations to fix future errors after fix for unsound array types (#52691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52691

Unannotated array literals are unsound in Flow right now. This diff adds in annotations and makes a few things readonly, to reduce future errors.

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D78519638

fbshipit-source-id: d98a7668ecf97bcc87dcb3fad25ade736d885d9a
2025-07-17 17:30:43 -07:00
Tim YungandFacebook GitHub Bot d78c242e4d RN: Enable enableVirtualViewRenderState by Default (#52686)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52686

Enables the `enableVirtualViewRenderState` feature flag by default.

Also, fixed classification for this and the `enableVirtualViewWindowFocusDetection` feature flags. (They were incorrect.)

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D78500846

fbshipit-source-id: 099adaa4ed0026c8bb7438df869564d76a999007
2025-07-17 12:59:13 -07:00
Tim YungandFacebook GitHub Bot 5d4d1ce84b RN: Cleanup scheduleAnimatedCleanupInMicrotask Flag (#52685)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52685

Cleans up the `scheduleAnimatedCleanupInMicrotask ` feature flag and deletes code paths that are now unreachable.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D78498600

fbshipit-source-id: 307562030373742e64968ae4c92d6bfbb48ddc71
2025-07-17 12:59:13 -07:00
Tim YungandFacebook GitHub Bot 5c7fdb252e RN: Cleanup disableInteractionManager Flag (#52684)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52684

Cleans up the `disableInteractionManager` feature flag and deletes code paths that are now unreachable.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D78498348

fbshipit-source-id: a3128c1e5ca9c5879080df54b7683a3c916cec13
2025-07-17 12:59:13 -07:00
Tim YungandFacebook GitHub Bot 1814418f12 RN: Cleanup avoidStateUpdateInAnimatedPropsMemo Flag (#52683)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52683

Cleans up the `avoidStateUpdateInAnimatedPropsMemo` feature flag and deletes code paths that are now unreachable.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D78497862

fbshipit-source-id: 26406e713ca5b7b194159638a20dcfca877ba380
2025-07-17 12:59:13 -07:00
Tim YungandFacebook GitHub Bot 0a3808d07c RN: Cleanup alwaysFlattenAnimatedStyles Flag (#52682)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52682

Cleans up the `alwaysFlattenAnimatedStyles` feature flag.

This was already unused starting with {D77314904}.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D78497554

fbshipit-source-id: 8bfbe6485812a675cdf3e78612347457f45ada90
2025-07-17 12:59:13 -07:00
Tim YungandFacebook GitHub Bot 0508eddfe6 RN: Default Hermes Parser to reactRuntimeTarget: "19" (#52625)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52625

Changes `react-native/babel-preset` so that by default, `hermes-parser` is configured with `reactRuntimeTarget: "19"`. This changes the compiled output of Component Syntax to not use `forwardRef` when a `ref` prop is present.

Additionally, this adds a new preset option property, `hermesParserOptions`. This object allows users of `react-native/babel-preset` to supply overrides for any `hermes-parser` options.

Changelog:
[General][Changed] - Configures `react-native/babel-preset` to target React 19 by default, meaning Component Syntax will not compile to `forwardRef` calls when a `ref` prop is present.
[General][Added] - Added support to `react-native/babel-preset` for a `hermesParserOptions` option, that expects an object that enables overriding `hermes-parser` options.

Reviewed By: SamChou19815

Differential Revision: D78383269

fbshipit-source-id: 1e6b66b9bfbeaf8a06fdc39031cb6de7e921765f
2025-07-17 12:53:36 -07:00
Rubén NorteandFacebook GitHub Bot 25c61123fb Fix incorrect locking and attempts check in ShadowTree experiment (#52681)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52681

Changelog: [internal]

In the original change I made in D78418504 / https://github.com/facebook/react-native/pull/52645 I made 2 mistakes:
1. Used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options.
2. The `attemps` variable wasn't incremented, so we never left the loop in case of exhaustion.

This propagates a flag to `tryCommit` to indicate we've already locked on the commitMutex_ so we don't need to lock again in that case and increases the counter, fixing the issue.

Reviewed By: cortinico

Differential Revision: D78497509

fbshipit-source-id: 546ccd0c84aed5416ce1aef47d79419b4fe06f66
2025-07-17 12:18:52 -07:00
Rubén NorteandFacebook GitHub Bot 9b30fe0c45 Back out "Add missing attempts++ in ShadowNode with MAX_COMMIT_ATTEMPTS_BEFORE_LOCKING" (#52680)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52680

Changelog: [internal]

Reverting to make the fix easier to pick. Will land again on top.

Original commit changeset: 91d7f5d88a90

Original Phabricator Diff: D78487202

Reviewed By: cortinico

Differential Revision: D78497511

fbshipit-source-id: 58379787786cadcbcbe354feb97bc400a24f9d58
2025-07-17 12:18:52 -07:00
Rubén NorteandFacebook GitHub Bot fef6e0f584 Back out "Fix incorrect locking in ShadowTree experiment" (#52679)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52679

Changelog: [internal]

Reverting to make the fix easier to pick. Will land again on top.

Original commit changeset: c18e967488de

Original Phabricator Diff: D78480136

Reviewed By: cortinico

Differential Revision: D78497510

fbshipit-source-id: 8037276cb70d27ff695c76cd9575b525568c4489
2025-07-17 12:18:52 -07:00
Luna WeiandFacebook GitHub Bot 4c9591c0ea Use experimental VirtualView (#52592)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52592

Changelog: [Internal] - Expose VirtualViewExperimental in JS, use in a test surface

Reviewed By: yungsters

Differential Revision: D78027899

fbshipit-source-id: d3d9808b8ba8e36c5fdb0c831c0855ed318d0a30
2025-07-17 12:15:57 -07:00
Luna WeiandFacebook GitHub Bot 937eac64e8 Move off of ReactScrollViewHelper.ScrollListener (#52591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52591

Changelog: [Internal] Stop using ReactScrollViewHelper.ScrollListener for layout, scroll events from ScrollView

Reviewed By: yungsters

Differential Revision: D78287689

fbshipit-source-id: 3fe944d90e0165d10953a603e5694ac7bbaeb9b8
2025-07-17 12:15:57 -07:00
Luna WeiandFacebook GitHub Bot 510bfd4101 Fix VirtualViewExperimental (#52590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52590

Changelog: [Internal] - Fix a couple of bugs with VirtualViewExperimental

1. `also` side-effect bug where we were accessing `scrollView` before it was assigned
2. Handling empty `rect`. Now, we don't add the virtualView until it has a non-empty rect layout

Reviewed By: yungsters

Differential Revision: D78287690

fbshipit-source-id: 1806b748a0117e51c7a201191396d79db3a8d205
2025-07-17 12:15:57 -07:00
Nicola CortiandFacebook GitHub Bot 847721dc9b Add missing attempts++ in ShadowNode with MAX_COMMIT_ATTEMPTS_BEFORE_LOCKING (#52673)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52673

We should be incrementing the `attempts` variable as otherwise this loop with never stop.

Created from CodeHub with https://fburl.com/edit-in-codehub

Changelog:
[Internal] -

Reviewed By: rubennorte

Differential Revision: D78487202

fbshipit-source-id: 91d7f5d88a90bdfa806195fd35897f2f51c1deb9
2025-07-17 09:02:19 -07:00
Rubén NorteandFacebook GitHub Bot 2a01eadcb8 Remove unnecessary $FlowFixMe after correct typing for console.timeStamp (#52633)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52633

Changelog: [internal]

Now that we have the correct type definition for `console.timeStamp` we can remove the unnecessary `$FlowFixMe` annotations we had to add to use the new arguments.

Reviewed By: hoxyq

Differential Revision: D78405312

fbshipit-source-id: 29378ee6fa5986e22d0dfdfb85b7e25375361dc9
2025-07-17 08:35:36 -07:00
Rubén NorteandFacebook GitHub Bot c247554342 Add correct typing for console (including console.timeStamp) (#52632)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52632

Changelog: [internal]

This improves the type definitions for methods in the global `console` object, most importantly:
- Removes use of `any`.
- Defines correct typing for `console.timeStamp`, including new parameters for the Chrome Extensibility API.

Reviewed By: hoxyq

Differential Revision: D78405314

fbshipit-source-id: 6f31cc3005ff708ef6aa155bcd150d53a845e66c
2025-07-17 08:35:36 -07:00
Rubén NorteandFacebook GitHub Bot 10ddec7aeb Add stubs for missing console methods (#52643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52643

Changelog: [internal]

Defines stubs for the following `console` methods:
* `time`
* `timeEnd`
* `count`
* `countReset`

Reviewed By: huntie

Differential Revision: D78418212

fbshipit-source-id: 8063f240f1e3fcfb3e36a2b43e61ca0e8cdf94db
2025-07-17 08:35:36 -07:00
Rubén NorteandFacebook GitHub Bot b9e1e37c87 Define typing for performance extensibility API (#52631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52631

Changelog: [internal]

Just a small improvement in the type definitions to serve as documentation for the expected arguments for custom tracks in RNDT.

Reviewed By: hoxyq

Differential Revision: D78405313

fbshipit-source-id: 75d250ea27f2e55e172aaf6e72399b85cecd43f4
2025-07-17 08:35:36 -07:00
Krystof WoldrichandFacebook GitHub Bot c4082c9ce2 surface uncaught promise rejections with ExceptionsManager.handleException instead of swallowing them (#51594)
Summary:
This PR fixes logging of rejections, which stopped working with the transition from using `LogBox` for warnings to directing users to use React Native Debugger, where warnings can be viewed in the `Console` tab.

Rejected promises before this PR used `LogBox.addLog` with the `level: warn` directly without `console.warn`, which notified users to open debugger to view a warning (after rejected promise) without actually printing any warnings to the console.

This PR uses `ExceptionsManager.handleException(error, false /* isFatal */);` for promise rejections that correctly raising an error to the console if needed.

### Rejected Promise in Chrome
Displaying the error as long as it's uncaught in the form:
`Uncaught (in promise) Error`
and if there's a message in that error:
`Uncaught (in promise) Error: ${message}`
once the error is handled, this error disappears:
{F1978806409}
This is done with `Runtime.exceptionThrown`, and  `Runtime.exceptionRevoked`:
{F1979815326}

## Changelog:
[General][Breaking] unhandled promises are now handled by ExceptionsManager.handleException, instead of being swallowed as Logbox Warnings.
----
This is a breaking change because we changed the wording for these errors and because some systems (like Sentry) might start monitoring a new set of errors when this code is adopted.

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

Test Plan:
Use `Promise.reject` and observe that the rejection is now shown symbolicated in LogBox and also printed in React Native Debugger Console.

```
<Button
  title="Uncaught Promise Rejection"
  onPress={() => {
    const err = new Error('test error');
    err.cause = new Error('cause');
    const promise = Promise.resolve().then(() => {
      throw err;
      // also test with throwing a string / object:
      // throw 'aa';
      // throw {test: 'object'};
      // return Promise.reject();
    });

    setTimeout(() => {
      promise.catch(e => {
        console.log('promise error caught', e);
      });
    }, 4000);
  }}
/>
```

### Before
There's no indication whatsoever there's an uncaught promise.

### After
An error is logged:
Error-
{F1979749366}
Text-
{F1979749350}
Object-
{F1979749351}
Promise.reject() or undefined-
 {F1979749826}

Reviewed By: hoxyq

Differential Revision: D75442651

Pulled By: vzaidman

fbshipit-source-id: bf6c56e643f03997f5a604b85c543aad62648a29
2025-07-17 07:55:50 -07:00
Christian FalchandFacebook GitHub Bot 4ee2b60a1e resolve xcframework paths from conf switch script (#52664)
Summary:
When switching between debug/release we run a small script to make sure to copy the correct version of the RNDeps xcframework.

This script was missing a resolve function that fixed up some path issues that we do when installing in the podspec.

## Changelog:

[IOS] [FIXED] - Fixed issue with RNDeps release/debug switch failing

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

Test Plan:
- Create new RN App
- Install pod with prebuilt deps
- Build (success)
- Switch to release
- Build (success)

Reviewed By: cortinico

Differential Revision: D78481590

Pulled By: cipolleschi

fbshipit-source-id: 2d02b0bc55e8aef6f3fafb4f7aa193c4cf00414e
2025-07-17 06:46:00 -07:00
Rubén NorteandFacebook GitHub Bot 2d4c43c267 Fix incorrect locking in ShadowTree experiment (#52662)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52662

Changelog: [internal]

In the original change I made in D78418504 / https://github.com/facebook/react-native/pull/52645 I made a mistake and used a lock that would try to re-lock on itself without it being recursive (which would cause a deadlock). I didn't see that because when testing I didn't hit the case where we'd exhaust the options.

This propagates a flag to `tryCommit` to indicate we've already locked on the `commitMutex_` so we don't need to lock again in that case, fixing the issue.

Reviewed By: sammy-SC

Differential Revision: D78480136

fbshipit-source-id: c18e967488de14e73e6abf6f6e82c16bc42a12c6
2025-07-17 05:37:07 -07:00
Christian FalchandFacebook GitHub Bot 2e55241a90 added missing script in package.json (#52663)
Summary:
When switching between release/debug we're running a script to copy the correct xcframework. This script for the React-Core prebuilts was not part of the package.json file.

This caused the build to fail after trying to switch from debug -> release.

## Changelog:
[IOS] [FIXED] - Fixed missing script for resolving prebuilt xcframework when switching between release/debug

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

Test Plan:
- Create new RN App
- Install pod with prebuilt deps and core
- Build (success)
- Switch to release
- Build (success)

Reviewed By: cortinico

Differential Revision: D78481302

Pulled By: cipolleschi

fbshipit-source-id: 1c7181e63219098ae140d77ff1cb2c0c9b9642e5
2025-07-17 05:26:07 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2c752af535 Fix Windows CI (#52666)
Summary:
As per [this issue](https://github.com/actions/runner-images/issues/12416), Windows machine doesn't have access to D: drive anymore

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: huntie

Differential Revision: D78484060

Pulled By: cipolleschi

fbshipit-source-id: 36d844f9d7d69f1d74a154b019307cc1e269ad66
2025-07-17 05:15:04 -07:00
Pieter De BaetsandFacebook GitHub Bot b6f4142bb2 Reduce legacy arch warning for OnLayoutEvent (#52665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52665

This API is being used by react-native-svg (https://github.com/software-mansion/react-native-svg/blob/main/android/src/main/java/com/horcrux/svg/VirtualView.java#L606) which is causing issues when enabling legacy arch minification.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D78478751

fbshipit-source-id: 7f48368c11ec855bbeb5e904628b082a5bc741ff
2025-07-17 04:39:41 -07:00
Nicola CortiandFacebook GitHub Bot 2f553ec7f6 Unbreak build_android due to missing dependency on rrc_view (#52661)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52661

The CI is currently red on main due to a missing dependency on `rrc_view`
from the recent TransformHelper.cpp addition.
This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D78479785

fbshipit-source-id: 3d2b698d9ce46cf22c15ad43005f621526590145
2025-07-17 04:09:25 -07:00
Nicola CortiandFacebook GitHub Bot 7ef57163cb Make accessors inside HeadlessJsTaskService open again (#52660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52660

The documentation for those methods mention that users should override them to
provide their own implementation.

However those vals are not `open` so users cannot really override them.
This fixes it.

See more context on https://github.com/facebook/react-native/pull/48800#issuecomment-3082665024

So this was practically a breaking change, that I'm attempting to mitigate.

Changelog:
[Android] [Fixed] - Make accessors inside HeadlessJsTaskService open again

Reviewed By: cipolleschi

Differential Revision: D78479162

fbshipit-source-id: eefc7332e2004198cd6bd64b60a66215f137ad4a
2025-07-17 04:05:47 -07:00
Moti ZilbermanandFacebook GitHub Bot bbda71f2c8 Fix argv handling for packaged mode (#52641)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52641

Changelog: [Internal]

TSIA, missed this in D77591742

bypass-github-export-checks

Reviewed By: huntie

Differential Revision: D78413090

fbshipit-source-id: a02d604def172b531a89021496208171373ddd8c
2025-07-17 03:13:26 -07:00
Moti ZilbermanandFacebook GitHub Bot 60efc757d9 Implement --version flag
Summary:
Changelog: [Internal]

Adds a basic `--version` command line flag to the RNDT shell. This will be used in code paths (including tests) that need to verify that the shell is executable, but do not need to actually display a window or hand over control to the main shell instance.

bypass-github-export-checks

Reviewed By: huntie

Differential Revision: D78351936

fbshipit-source-id: e8982cfea6435da0ac9ea5f50d57c7642a8e2edb
2025-07-17 03:13:26 -07:00
Moti ZilbermanandFacebook GitHub Bot 4a1884e5e5 Exclude unimportant files from Electron build
Summary:
TSIA

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: huntie

Differential Revision: D78351935

fbshipit-source-id: 7f71f3df3ecf8ce92891109b8d9f8e0a74361f21
2025-07-17 03:13:26 -07:00
David VaccaandFacebook GitHub Bot 20baf2a992 Delete ReactNativeNewArchitectureFeatureFlags.isNewArchitectureStrictModeEnabled() (#52650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52650

ReactNativeNewArchitectureFeatureFlags.isNewArchitectureStrictModeEnabled() is unused, let's delete it

changelog: [internal] internal

Reviewed By: arushikesarwani94

Differential Revision: D78438409

fbshipit-source-id: 8208ae0d3f59e6a3197643e4a7610db3116eb1c6
2025-07-16 18:06:29 -07:00
Rubén NorteandFacebook GitHub Bot 21cd09d4c0 Implement mechanism to prevent ShadowTree commit exhaustion (#52645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52645

Changelog: [internal]

This add a new feature flag to test a fix for https://github.com/facebook/react-native/issues/51870

Reviewed By: cortinico, sammy-SC

Differential Revision: D78418504

fbshipit-source-id: 2792026b6936393d196fd1e3162f8b2c61a38ed6
2025-07-16 12:02:07 -07:00
Joe VilchesandFacebook GitHub Bot d00de31aef Use setter for accessibilityElements (#52644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52644

There have been some hard to find crashes with iOS outlined in https://fb.workplace.com/groups/3615245781855602/permalink/23898365966450285/. Talking with lenaic this may be due to us not using the setter to set this property. Let's try that

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D78413954

fbshipit-source-id: a68b90a2276805283082ceaf1020e13bd8ef8eb6
2025-07-16 10:56:28 -07:00
generatedunixname89002005287564andFacebook GitHub Bot de67d6ec67 Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages (#52629)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52629

Reviewed By: javache

Differential Revision: D78404030

fbshipit-source-id: 553a9f26327c4b3439b773981c25b5e1d469d8f1
2025-07-16 10:23:13 -07:00
Nicola CortiandFacebook GitHub Bot 88bafeddab Add TransformHelper.cpp to reactnativejni_common (#52640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52640

Not having `TransformHelper.cpp` included in CMake is causing the C++ code to fail compiling.
This diff fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi, javache

Differential Revision: D78414015

fbshipit-source-id: 4900427a86eb38bfec10e5e385296d89c73e9051
2025-07-16 09:52:04 -07:00
Mathieu ActhernoeneandFacebook GitHub Bot 86994a6e22 Fix Dimensions window values on Android < 15 (#52481)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52481

This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled.

Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15):

<img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" />

Using `WindowMetricsCalculator` from AndroidX:

<img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" />

Fixes https://github.com/facebook/react-native/issues/47080

## Changelog:

[Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled

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

Test Plan:
Run the example app on an Android < 15 device.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D77906644

Pulled By: alanleedev

fbshipit-source-id: 121cd6bc4133973f06b28eb9e79c9387ac7070a1
2025-07-16 09:15:43 -07:00
Fabrizio CucciandFacebook GitHub Bot b795d61592 Add skipActivityIdentityAssertionOnHostPause feature flag (#52639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52639

Add feature flag in the attempt to address the pile of tasks reporting the following error in panelapps:

> Error: android_crash:java.lang.AssertionError:com.facebook.react.runtime.ReactHostImpl.onHostPause

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D78339196

fbshipit-source-id: 9ef748e7ea85f179d8f8c418a978bd5c99f70601
2025-07-16 08:42:41 -07:00
Samuel SuslaandFacebook GitHub Bot 0fd060f558 disable view culling when accessibility API is detected (#52612)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52612

changelog: [internal]

View Culling is purely performance optimisation but it must work correctly with accessibility features like VoiceOver and Switch Control.
In this diff, View Culling is lazily disabled whenever use of an accessibility feature is detected to make sure all views are present in the view hierarchy.

Reviewed By: NickGerleman, philIip

Differential Revision: D78336010

fbshipit-source-id: 7a201afc8e2ffd8b586d75ed4de2c03d7966750c
2025-07-16 08:16:49 -07:00
Samuel SuslaandFacebook GitHub Bot 9967908e89 introduce UpdateMode::unstable_Immediate (#52604)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52604

changelog: [internal]

For Fabric View Culling to work correctly, content offset changes must be applied synchronously to avoid UI flicker.

The flicker happens because content offset update happens asynchronously and the OS paints scroll position update before React Native has a chance to adjust view hierarchy for the new scroll position.

Reviewed By: lenaic

Differential Revision: D78334322

fbshipit-source-id: dc1f1b3f9db9f9547e5a588dc184fcf21cca2727
2025-07-16 08:16:49 -07:00
Pieter De BaetsandFacebook GitHub Bot a9ece0c302 Use native helpers to accelerate transform processing (#52603)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52603

Processing transforms is expensive in Java, as it requires bridging the entire ReadableNativeArray/Map. Instead, we can use the existing parser logic `resolveTransform` logic to perform this operation in C++.

Ideally, we actually re-use the existing parsed transform from Props, that could be something we revisit after Props 2.0.

As a follow-up, we should consider also moving the matrix decomposition logic from MatrixMathHelper here, and make that the only information we send back to Java.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78298588

fbshipit-source-id: a698ac8587ccfb2be04665747082398ccdde9294
2025-07-16 06:29:10 -07:00
Pieter De BaetsandFacebook GitHub Bot 5d3d23b32e Use native implementation of equals in ReadableNativeArray (#52611)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52611

We compare the current transform (represented as a ReadableArray) with the incoming one to know whether to invalidate. This can be expensive as it requires to materialize the entire transform data structure over JNI. Instead, we can delegate this comparison to native code, which can compare the underlying folly::dynamic directly.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D78340288

fbshipit-source-id: f44a054e234694c316fb080fe2dbc2017780123a
2025-07-16 06:29:10 -07:00
Rubén NorteandFacebook GitHub Bot bd198324d8 Add support for details field and custom tracks in performance.mark and performance.measure for DevTools (#52613)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52613

Changelog: [internal]

This adds first-class support for the `detail` field in `performance.mark` and `performance.measure`.

Now that we have access the JS entry in native, we can access the `detail` field to propagate it to DevTools (and use it to extract track names for Perfetto).

In order to avoid the performance overhead of always having to extract the `detail` field from the entry, this is done lazily only if we're actively profiling with DevTools or Perfetto.

Reviewed By: sbuggay

Differential Revision: D78340911

fbshipit-source-id: 383dd1cb6fcc8a04be9e65038503986f196e23c9
2025-07-16 05:55:03 -07:00
Rubén NorteandFacebook GitHub Bot 2f67285545 Remove support for specifying track names for Perfetto and RNDT using the "Track:" prefix (#52614)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52614

Changelog: [internal]

We're adding first-class support for custom tracks, so we can remove the legacy mechanism to specify tracks with the "Tracks:" prefix in the event names.

Reviewed By: sbuggay

Differential Revision: D78340910

fbshipit-source-id: cbbadd519baf7bb50072cb97d8cd1ccc87a8a35c
2025-07-16 05:55:03 -07:00
Rubén NorteandFacebook GitHub Bot 4edc33e4e1 Refactor implementation of performance.mark and performance.measure (#52586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52586

Changelog: [internal]

This fixes a "bug" (or spec-compliance issue) in the `performance.measure` method where `end` and `duration` couldn't be used together (only `start` and `duration`, and `start` and `end` could be used).

This also refactors the API to be "JS-first", preparing the native module methods to support passing instances of entries to fix other issues.

Verified performance impact: `mark` is slightly regressed (~7% slower) due to an additional JSI call to get the default start time and `measure` is significantly optimized (25/30% faster) due to simplified parameter handling in JSI calls.

* Before

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1621.03 ± 1.17%'    | '1562.00'           | '636986 ± 0.01%'           | '640205'                  | 616890  |
| 1       | 'mark (with custom startTime)'                            | '1756.88 ± 1.15%'    | '1693.00'           | '586826 ± 0.01%'           | '590667'                  | 569190  |
| 2       | 'measure (default)'                                       | '2424.66 ± 1.35%'    | '2333.00'           | '426122 ± 0.02%'           | '428633'                  | 412429  |
| 3       | 'measure (with start and end timestamps)'                 | '2679.96 ± 1.23%'    | '2574.00'           | '385266 ± 0.02%'           | '388500'                  | 373140  |
| 4       | 'measure (with mark names)'                               | '2713.49 ± 0.50%'    | '2644.00'           | '375383 ± 0.02%'           | '378215'                  | 368530  |
| 5       | 'clearMarks'                                              | '691.13 ± 0.07%'     | '681.00'            | '1467016 ± 0.01%'          | '1468429'                 | 1446900 |
| 6       | 'clearMeasures'                                           | '706.00 ± 0.05%'     | '691.00'            | '1431489 ± 0.01%'          | '1447178'                 | 1416435 |
| 7       | 'mark + clearMarks'                                       | '2083.21 ± 1.14%'    | '2003.00'           | '497974 ± 0.01%'           | '499251'                  | 480028  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '3085.14 ± 0.88%'    | '2974.00'           | '334337 ± 0.02%'           | '336247'                  | 324135  |
| 9       | 'measure + clearMeasures (with mark names)'               | '2949.45 ± 0.62%'    | '2884.00'           | '345335 ± 0.02%'           | '346741'                  | 339046  |

* After

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1740.06 ± 1.01%'    | '1692.00'           | '587400 ± 0.01%'           | '591017'                  | 574695  |
| 1       | 'mark (with custom startTime)'                            | '1661.64 ± 1.16%'    | '1612.00'           | '617453 ± 0.01%'           | '620347'                  | 601815  |
| 2       | 'measure (default)'                                       | '1808.71 ± 1.28%'    | '1753.00'           | '566516 ± 0.01%'           | '570451'                  | 552882  |
| 3       | 'measure (with start and end timestamps)'                 | '1869.21 ± 1.00%'    | '1823.00'           | '546571 ± 0.01%'           | '548546'                  | 534987  |
| 4       | 'measure (with mark names)'                               | '2016.40 ± 0.74%'    | '1983.00'           | '502987 ± 0.01%'           | '504286'                  | 496075  |
| 5       | 'clearMarks'                                              | '682.18 ± 0.03%'     | '671.00'            | '1476364 ± 0.01%'          | '1490313'                 | 1465899 |
| 6       | 'clearMeasures'                                           | '686.78 ± 0.03%'     | '681.00'            | '1467264 ± 0.01%'          | '1468429'                 | 1456081 |
| 7       | 'mark + clearMarks'                                       | '2148.90 ± 1.28%'    | '2073.00'           | '480925 ± 0.01%'           | '482393'                  | 465356  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2277.26 ± 1.10%'    | '2204.00'           | '451016 ± 0.01%'           | '453721'                  | 439125  |
| 9       | 'measure + clearMeasures (with mark names)'               | '2277.82 ± 0.51%'    | '2243.00'           | '443853 ± 0.01%'           | '445831'                  | 439016  |

Reviewed By: hoxyq

Differential Revision: D78193072

fbshipit-source-id: 03b52927a1999f19a2baf0d02335a959525d7add
2025-07-16 02:48:43 -07:00
Rubén NorteandFacebook GitHub Bot 1b7c9ea523 Add 2 tests demonstrating broken behavior in performance.measure (#52588)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52588

Changelog: [internal]

This adds tests to show how `performance.measure` isn't spec compliant when `end` and `duration` are used. This will be fixed in the following diff.

Reviewed By: javache

Differential Revision: D78193069

fbshipit-source-id: 30ba4874c4d2b4adb20608fc8d5ed61bfd6d92d8
2025-07-16 02:48:43 -07:00
Rubén NorteandFacebook GitHub Bot cb59eb2b57 Reorganize tests for PerformanceObserver and User Timing API (#52587)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52587

Changelog: [internal]

This just re-organizes the tests for the `Performance` API and `PerformanceObserver` as the previous organization didn't make much sense. Now it's a test for `PerformanceObserver` and another for the User Timing API.

Reviewed By: huntie

Differential Revision: D78193070

fbshipit-source-id: f15524bf07d2dc9edc155214279ce3af705cde67
2025-07-16 02:48:43 -07:00
Tim YungandFacebook GitHub Bot 5050d0a89e VirtualView: Fix Window Focus Detection Cleanup (#52621)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52621

In D77261958, I made a typo when implementing the cleanup of window focus detection in `onDetachedFromWindow`. This fixes it.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D78366506

fbshipit-source-id: 2a377cd7e8ec08f0c899dbd9cb3757bec580d30f
2025-07-15 20:03:17 -07:00
Andrew DatsenkoandFacebook GitHub Bot 46f3e32019 Add support for meta only code & oss only code (#52583)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52583
Changelog: [Internal]
OSS build is broken atm as there is rn-tester dep in Fantom, needed for Meta only purposes.
Platformizing code to allow for Meta only implementation here and also for OSS only. Using this approach over ifdef.

Reviewed By: christophpurrer

Differential Revision: D78275698

fbshipit-source-id: c3234bb61b4591c0a5045fdb84aa0316f6382ecc
2025-07-15 14:16:06 -07:00
Samuel SuslaandFacebook GitHub Bot 10bb2241fc delete feature flag enableSynchronousStateUpdates (#52607)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52607

changelog: [internal]

The current design of enableSynchronousStateUpdates is not correct and breaks <Modal /> on Android. let's delete it.

Reviewed By: philIip

Differential Revision: D78332201

fbshipit-source-id: 109909ebc706168372c565e8ff6e0c95d7565b10
2025-07-15 14:09:07 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6b550a279e Fix E2E test script when the ci flag is not specified (#52617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52617

The `test-release-local` script was failing to execute the npx rreact-native run-ios command for some issues with cocoapods.
That command tries to reinstall the pods so there might be some issues when testing.

As an alternative, we can avoid duplicated work by dropping the npx react-native command and, instead, build the app with xcodebuild and install it in the simulator with xcrun.

This is a backport of [this PR](https://github.com/facebook/react-native/pull/52609)

## Changelog:
[Internal] -

Reviewed By: vzaidman

Differential Revision: D78344397

fbshipit-source-id: cf2d9c032966a9be05670259e9532789829349f2
2025-07-15 12:04:20 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 339dc4979c Update atrifact names to the new ones (#52618)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52618

In 0.81 we dropped the JSC configuration in CI. That means that the artifacts we generate in CI have a slightly different name. The current e2e script failed to run with the ci flag because it was still using the old artifacts name and it was not finding them.

This change adress the problem by:

- using the right artifact names
- removing the --hermes parameter which controlled the Hermes vs JSC scenario.

It is also a port to main of [this PR](https://github.com/facebook/react-native/pull/52606)

## Changelog:
[Internal] -

Reviewed By: cortinico, vzaidman

Differential Revision: D78344244

fbshipit-source-id: a658ba161b867bbad773fe093df9679ea92579b3
2025-07-15 12:04:20 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 21b93d8d7d Fix RefreshControl recycling (#52584)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52584

The method `_initializeUIRefreshControl` creates a new instance of `UIRefreshControl` which has the default values for things like tint color.
However the props that we are keeping in the component are the `_props` before recycling. The actual state of the newly created UIRefreshControl is out of sync w.r.t the props the component thinks to have.

By introducing a `_recycled` state variable, we can force the first `updateProp` call to apply all the props to the newly created component.

## Changelog:
[iOS][Fixed] - Make sure that the recycled refresh control have the right props setup.

Reviewed By: sammy-SC

Differential Revision: D78278207

fbshipit-source-id: 4be20aa43f96eb87828b44a4deedd33a23d1d17f
2025-07-15 10:47:34 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 09daad27ea fix RefreshControl not refreshing on initial mount (#52615)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52615

The refresh control has some issues that this change addresses.

- Issue with zIndex not propagating to RefreshControl.
- Issue when RefreshControl being mounted as refreshing.
- Issue with color props not applied

## Changelog:
[iOS][Fixed] - Correctly propagate props to RefreshControl

Reviewed By: sammy-SC

Differential Revision: D76668478

fbshipit-source-id: c3a5ff04b1b2654d25c9053973c5cff0002a804a
2025-07-15 10:47:34 -07:00
Nicola CortiandFacebook GitHub Bot b4a57dd85f Polish the .editorconfig file
Summary:
We should use indent size 2 everywhere. While we were using 4 for some old reasons. This is causing editing of .kts files and BUCK files inside OSS Android Studio quite painful.

Changelog:
[Internal] -

Reviewed By: cipolleschi

Differential Revision: D78348532

fbshipit-source-id: 97e0e1f54fdc76c8a9cdc44e1f67684c9e97a08f
2025-07-15 10:10:35 -07:00
React Native BotandFacebook GitHub Bot f68e2b47fb Add changelog for v0.81.0-rc.1 (#52605)
Summary:
Add Changelog for 0.81.0-rc.1

## Changelog:
[Internal] - Add Changelog for 0.81.0-rc.1

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D78339154

Pulled By: motiz88

fbshipit-source-id: 9977e9dd6bed0fc62a91f469b28bdc1a41b65282
2025-07-15 09:34:31 -07:00
Nicola CortiandFacebook GitHub Bot 188caa04e7 Clarify the deprecation message for react-native-safe-area-context (#52589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52589

The correct url for react-native-safe-area-context is:
https://github.com/AppAndFlow/react-native-safe-area-context
the former would still work through a redirect but let's be explicit here.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D78272667

fbshipit-source-id: dd8c2d6bf7e8c97e18f260e669e305734d657a51
2025-07-15 08:56:06 -07:00
Nick LefeverandFacebook GitHub Bot eca6c1b965 Fix typo in NullValueStrategy doc comment (#52608)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52608

See title

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D78339009

fbshipit-source-id: 70d0e73a38826c2c6bc3425f0a863699b3ed50d3
2025-07-15 08:31:21 -07:00
Mateo GuzmánandFacebook GitHub Bot 42b8921d91 Kotlin: Set up ktfmt in OSS (#52064)
Summary:
This PR adds the basic `ktfmt` setup in OSS to lint Kotlin files before they're imported into the Meta codebase, making collaboration with external contributors smoother for Android related PRs.

I tried to put together certain rules that mimic the current code style and it seems to work well as I get no errors for properly formatted files but this still might need some input to have the correct configuration.

Added two scripts to the main package.json:
- To check the files format you can run: `yarn lint-kotlin-check`
- To apply formatting fixes, run: `yarn lint-kotlin`

## Changelog:

[INTERNAL] - Kotlin: Set up ktfmt in OSS

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

Test Plan:
Unformat any random Kotlin file inside ReactAndroid and then run:
```sh
yarn lint-kotlin-check
yarn lint-kotlin
```

Reviewed By: cipolleschi

Differential Revision: D78272876

Pulled By: cortinico

fbshipit-source-id: 0cf6b976968dfc5c6c478e88d17eb21c18961a34
2025-07-15 08:31:00 -07:00
Samuel SuslaandFacebook GitHub Bot f3b6eeb96e fix view culling in RTL languages (#52602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52602

changelog: [internal]

fixes RTL issue in View Culling where scroll view offset was not correctly adjusted for RTL. The example failing case is described in a test.

Reviewed By: lenaic

Differential Revision: D78322759

fbshipit-source-id: d60d98aa45d4d9b576b133990f64ef941e6618e8
2025-07-15 06:34:39 -07:00
Abhijeet JhaandFacebook GitHub Bot f004cd39bc Text: Fix isSelectable prop macro conversion (#52599)
Summary:
for IOS and React native windows we can observe that the macro conversion is incorrect in ParagraphProps particularly for selectable prop.

current conversion
```
case ([]() constexpr -> RawPropsPropNameHash {   return facebook::react::fnv1a("isSelectable");  }()): fromRawValue(context, value, isSelectable, defaults.isSelectable); return;
```
issue is that isSelectable is not the raw prop therefore JS to native flow for the prop is not correct .
(Note : this works for Android as ReactProp(name = "selectable"):  https://github.com/facebook/react-native/blob/bbc1e121c71d14803d29a931f642bf8ea6ee2023/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.kt#L97-L100 )

fix
```
RAW_SET_PROP_SWITCH_CASE(isSelectable, selectable)
```

Current implementation selectable prop is not working for IOS and React native windows as the macro conversion is incorrect in ParagraphProps particularly for selectable prop.

## Changelog:
Updated ParagraphProps macro conversion for isSelectable , keeping it backward compatible.

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

Pick one each for the category and type tags:
[IOS] [FIXED] - Fix selectable prop not working correctly
[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/52599

Test Plan:
Tested on react native windows playground

Sample code

```
export default class Bootstrap extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.header}>Selectable vs Non-Selectable Text</Text>

        <Text selectable={true} style={styles.text}>
           This text is selectable. You can long-press and copy it.
        </Text>

        <Text selectable={false} style={styles.text}>
           This text is not selectable. You cannot copy it.
        </Text>
      </View>
    );
  }
}

```
before fix debug output  , native unaware of selectable prop values from JS
```
ReactNative ['Samples\text'] (info): ''[Text.js] NativeText _selectable:', true'
ReactNative ['Samples\text'] (info): ''[Text.js] NativeText _selectable:', false'
[ParagraphComponentView] updateProps - old isSelectable: 0, new isSelectable: 0
[ParagraphComponentView] DrawText - isSelectable: 0
[ParagraphComponentView] DrawText - selection logic would be DISABLED here.
[ParagraphComponentView] updateProps - old isSelectable: 0, new isSelectable: 0
[ParagraphComponentView] DrawText - isSelectable: 0
[ParagraphComponentView] DrawText - selection logic would be DISABLED here.
[ParagraphComponentView] updateProps - old isSelectable: 0, new isSelectable: 0
[ParagraphComponentView] DrawText - isSelectable: 0
[ParagraphComponentView] DrawText - selection logic would be DISABLED here.

```

after fix debug output , native picks up selectable prop values from JS correctly
```
ReactNative ['Samples\text'] (info): ''[Text.js] NativeText _selectable:', true'
ReactNative ['Samples\text'] (info): ''[Text.js] NativeText _selectable:', false'
[ParagraphComponentView] updateProps - old selectable: 0, new selectable: 0
[ParagraphComponentView] DrawText - selectable: 0
[ParagraphComponentView] DrawText - selection logic would be DISABLED here.
[ParagraphComponentView] updateProps - old selectable: 0, new selectable: 1
[ParagraphComponentView] DrawText - selectable: 1
[ParagraphComponentView] DrawText - selection logic would be enabled here.
[ParagraphComponentView] updateProps - old selectable: 0, new selectable: 0
[ParagraphComponentView] DrawText - selectable: 0
[ParagraphComponentView] DrawText - selection logic would be DISABLED here.
```

Reviewed By: rozele

Differential Revision: D78333906

Pulled By: javache

fbshipit-source-id: 4d2f9ea591e991b1aed126e9fed72fdfe1a49ce9
2025-07-15 04:41:55 -07:00
Pieter De BaetsandFacebook GitHub Bot 0d2e0abc45 Do not define default transformOrigin (#52598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52598

Defining this as {50%, 50%} mean we do unnecessary work as part of every transform. Instead set it to undefined, which means we'll ignore it when determining the final transform.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D78298587

fbshipit-source-id: 9d3b7375fc3bd9ea04f0a6d7e314fbba0fba6949
2025-07-15 04:13:15 -07:00
Rubén NorteandFacebook GitHub Bot 7dc84491e9 Fix reporting of errors without stack traces (#52601)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52601

Changelog: [internal]

Fixes a bug in Fantom when throwing a value that's not an instance of `Error` in a test.

Reviewed By: javache

Differential Revision: D78332756

fbshipit-source-id: 350479dcb7bcea399070c6851aca76a1d1cc2629
2025-07-15 03:45:28 -07:00
Rob HoganandFacebook GitHub Bot 2a93767651 Add flow types for memfs (#52597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52597

Add a Flow lib def for `memfs`, for use in internal and subsequently Metro tests, now that `metro-memory-fs` is deprecated.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D78268713

fbshipit-source-id: f714000f2071f4bf45b4436cbd63fc6d74939f98
2025-07-15 02:46:44 -07:00
David VaccaandFacebook GitHub Bot c2f39cfdd8 Revert Refactor ViewManagerInterfaces codegen to generate kotlin classes (#52593)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52593

Revert Refactor ViewManagerInterfaces codegen to generate kotlin classes since commands are not respecting nullability

changelog: [internal] internal

Reviewed By: bvanderhoof

Differential Revision: D78308183

fbshipit-source-id: f3d8017d4bc6473deef0fd49c000543913905cd9
2025-07-14 21:22:21 -07:00
Nick GerlemanandFacebook GitHub Bot 7f224941bb Disable Android Workarounds for Attachment Metrics (#52446)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52446

The logic for retrieving metrics from a placeholder character is kind of insane, and has been around since inline views were added built into TextView in Paper.

One of the workarounds, for old versions of Android on Samsung phones (no more info to bound the versions) causes incorrect behavior, at least in the case where we have RTL text in LTR layout.

Another, explicitly mentions `singleLine` with RTL para, a deprecated TextView prop, that doesn't apply to us here (and also could never apply to BoringLayout, since RTL chars are not boring).

We don't have these workarounds anywhere else (though we have some other workarounds for bidi crash in old Android), including other frameworks I could find.

Let's bias to cleaning this old code up.

Changelog:
[Android][Fixed] - Fix incorrect positioning of inline view at the end of string when RTL text in LTR container

Reviewed By: javache

Differential Revision: D77703906

fbshipit-source-id: f25a5e2f05100f0288f3889132b658cdabf26f22
2025-07-14 19:43:12 -07:00
Nick GerlemanandFacebook GitHub Bot 7cd0b42ca0 Add text examples combining textAlign, attachments, script direction, and layout direction (#52445)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52445

This shows some broken stuff (TM), but also asserts current behaviors

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D77702743

fbshipit-source-id: a20d5b09e84d86a16e2443726ac82416b13796a8
2025-07-14 19:43:12 -07:00
Vitali ZaidmanandFacebook GitHub Bot fc535ef542 Update debugger-frontend from 844f225...8dc0d5b (#52585)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52585

Changelog: [Internal] - Update `react-native/debugger-frontend` from 844f225...8dc0d5b

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/844f225009e6445d088ed0e431d1fc430325ed95...8dc0d5b365e6b4600b78e5a7381aa861d8c1c81e).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [8dc0d5b36](https://github.com/facebook/react-native-devtools-frontend/commit/8dc0d5b36) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-14T18:03:52+01:00 | [improve current session id message selectivity (#192)](https://github.com/facebook/react-native-devtools-frontend/commit/8dc0d5b36) |
| [0a50c353c](https://github.com/facebook/react-native-devtools-frontend/commit/0a50c353c) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-14T16:33:55+01:00 | [Track Stack Trace Frames Succeed / Fail to Resolve URL (#191)](https://github.com/facebook/react-native-devtools-frontend/commit/0a50c353c) |
| [fc0a2e77e](https://github.com/facebook/react-native-devtools-frontend/commit/fc0a2e77e) | Alex Hunt (hello@alexhunt.dev) | 2025-07-14T12:41:58+01:00 | [Tweak wording for Network dogfooding banner (#193)](https://github.com/facebook/react-native-devtools-frontend/commit/fc0a2e77e) |
| [efa49bd7a](https://github.com/facebook/react-native-devtools-frontend/commit/efa49bd7a) | sbuggay (sbuggay@gmail.com) | 2025-07-11T06:17:05-07:00 | [Update README.md (#190)](https://github.com/facebook/react-native-devtools-frontend/commit/efa49bd7a) |

Reviewed By: huntie

Differential Revision: D78281338

fbshipit-source-id: 2cbc15e0e53919f7164fca009c0dcad93d333c72
2025-07-14 11:03:04 -07:00
Christoph PurrerandFacebook GitHub Bot 04b6735fa5 Apply clang-tidy settings (#52575)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52575

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D78223453

fbshipit-source-id: 1f472106324bbd7eb77609f5bc96a0a286eafe89
2025-07-14 09:29:54 -07:00
Christoph PurrerandFacebook GitHub Bot e93afbd407 Mark ReactHost functions noexcept (#52574)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52574

Changelog: [Internal]

The main change here is to catch *all* exceptions in:
- loadScriptFromDevServer
- loadScriptFromBundlePath

so that we can make the `loadScript(...` method `noexcept`

Other methods which only call into `noexcept` methods have been marked with `noexcept` as well

Reviewed By: lenaic

Differential Revision: D78222989

fbshipit-source-id: 174ac2420e88c913662f857c875fef996959c564
2025-07-14 09:22:36 -07:00
Alex HuntandFacebook GitHub Bot a5d61564a8 Support CDP response previews for chunked data (#52582)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52582

Continues integration of `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Updates the Android inputs to `NetworkReporter` to support incremental string data HTTP responses (`Transfer-Encoding: chunked`).

Implemented:

- Incremental response case for `Network.getResponseBody` (fetch response previews).
- `Network.dataReceived` (incremental response update event).

This means that incremental responses, such as Metro bundle requests, can be displayed as previews in React Native DevTools.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77927896

fbshipit-source-id: 6eff2e7b94d3f784bbc33b1fecdc20242f98b39f
2025-07-14 09:07:10 -07:00
Alex HuntandFacebook GitHub Bot 011425358a Support CDP response previews (#52487)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52487

Continues integration of `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Integrates `Network.storeRequestBody` on Android (CDP: [`Network.getResponseBody`](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody) CDP event) to populate the "Preview" and "Response" tabs in the React Native DevTools Network panel.

This is integrated with `NetworkingModule.kt` to support synchronously received `text` or `blob` data types, with incremental response support added next in D77927896.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77799617

fbshipit-source-id: 495baebbb3b447d1ea86705c1680578eed796d78
2025-07-14 09:07:10 -07:00
Pieter De BaetsandFacebook GitHub Bot 2321ae17ea Cleanup react-native-codegen DEFS [reland] (#52506)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52506

* Re-enable tests
* Simplify logic to avoid bypasses for arc focus

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D78000411

fbshipit-source-id: e2960a9848ce27385da00214018e7996d7c27561
2025-07-14 07:42:12 -07:00
generatedunixname89002005287564andFacebook GitHub Bot bb0c370ab7 Fix CQS signal performance-faster-string-find in xplat/js/react-native-github/packages (#52579)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52579

Reviewed By: javache

Differential Revision: D78252727

fbshipit-source-id: 97c746e6d57901f4995dd733c51e2b33e1f44a17
2025-07-14 07:22:53 -07:00
Nicola CortiandFacebook GitHub Bot 8524c13b5b Bump nexus-publish to 2.0.0 (#52566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52566

This bumps the plugin we use to publish to Maven Central from 1.3.0 to 2.0.0
as it has better support for the latest Gradle feature.

We're not affected by the breaking changes so we should be good to go (nightlies will tell).

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D78161579

fbshipit-source-id: de5178b2cc17885636f17eabdb0eea4e5b1515dd
2025-07-14 02:55:51 -07:00
Jakub PiaseckiandFacebook GitHub Bot 1d452b17bf Release cached images when image component gets recycled on iOS (#51493)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51493

Changelog: [IOS][FIXED] Don't retain cached images in state after `RCTImageComponentView` gets recycled

Fixes https://github.com/facebook/react-native/issues/51198

Crosspost from the task comment:
From what I've been able to figure out, it seems like the image shadow nodes (keeping the loaded image in state) are being kept in memory by shadow node reference wrappers. It doesn't seem strictly like a memory leak - manually triggering garbage collection causes those nodes to be deallocated, but since Hermes isn't aware of the memory they are retaining, I think, it doesn't trigger it automatically.

This diff releases the image data when the observers are notified and adds a new (`Consumed`) status to signify that.

Reviewed By: sammy-SC

Differential Revision: D75137263

fbshipit-source-id: 97eda7e6d1ef5cd633c4a5a4c37babc5e08968fb
2025-07-14 01:11:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot 6747f2b118 Add releaseImageDataWhenConsumed feature flag (#52527)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52527

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D78085001

fbshipit-source-id: 0786d5e6dcd4e41e23eef2dac1a6fec6fb800aef
2025-07-14 01:11:54 -07:00
David VaccaandFacebook GitHub Bot 79ca9036d3 Refactor ViewManagerInterfaces codegen to generate kotlin classes (#52545)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52545

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

This diff refactors the ViewManagerInterfaces codegen to generate kotlin classes,

As a consequence of this change, there are some ViewManagerInterfaces that have changed their APIs

## Changelog: [Android][Breaking] - Migrate ViewManagerInterfaces to kotlin. Some types in code generated ViewManagerInterfaces might differ. e.g. this will start enforcing nullability in parameters of viewManagerInterface methods (e.g. String commands parameters are not nullable, view params are not nullable in any method, etc)

Reviewed By: cortinico

Differential Revision: D78118738

fbshipit-source-id: cdd9e660e55397bd0936efce1c5aaf90c2946b7a
2025-07-13 19:18:26 -07:00
David VaccaandFacebook GitHub Bot e7d9e0d197 Fix names of view manager methods arguments (#52571)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52571

This diff fixes the following warning:

```
The corresponding parameter in the supertype 'XYZViewManager' is named 'value'. This may cause problems when calling this function with named arguments.
```

changelog: [Android][Changed] Changed method arguments names for Core ViewManagers to match the names of ViewManagerInterfaces

Reviewed By: cortinico

Differential Revision: D78170316

fbshipit-source-id: 29a2611eabb4e260bd6126aeca95516912ea4b4d
2025-07-13 19:18:26 -07:00
Alex HuntandFacebook GitHub Bot b18cd587dc Implement core Network CDP events on Android (#52485)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52485

Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.

- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71897099

fbshipit-source-id: 90972a5bfa34a095252b7e745e5f4afeb53b0ebe
2025-07-13 16:43:49 -07:00
Rob HoganandFacebook GitHub Bot cf45aa9dbc Bump Metro to 0.83.0 (#52576)
Summary:
Bump Metro to 0.83.0.

This release contains some breaking changes for integrators, and a minimum Node.js version of 22.14.

Full release notes: https://github.com/facebook/metro/releases/tag/v0.83.0

Changelog: [General][Changed] Bump Metro to ^0.83.0

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

Rollback Plan:

Differential Revision: D78171925

Pulled By: robhogan

fbshipit-source-id: 7ea5e04d285632a14dd71ba00da872d60f283840
2025-07-13 15:39:46 -07:00
Rob HoganandFacebook GitHub Bot 60b1b7a301 Replace metro-memory-fs dependency in tests with OSS memfs (#52572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52572

We'd like to stop supporting `metro-memory-fs` - there are better alternatives out there.

This replaces the one usage of `metro-memory-fs` in `react-native` with `memfs`, and swaps the dependency.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D78161921

fbshipit-source-id: 139233adac413a4f47a0d56d9e08ec841abaf47c
2025-07-12 00:32:14 -07:00
Ramanpreet NaraandFacebook GitHub Bot 42ea4bc594 feature-flags: Prefix "eager" to "main queue modules" flag (#52543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52543

Prefixing "eager" to the name makes it less confusing.  React native already has main queue modules: they're just lazy.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D78109287

fbshipit-source-id: 5fa6095d2dd8fcf74fdda64e05483eb487bc8f56
2025-07-11 22:47:07 -07:00
Ramanpreet NaraandFacebook GitHub Bot 24777bba07 Cleanup "disable main queue sync dispatch ios" infra (#52544)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52544

Let's remove these runtime errors for now. We can re-introduce this later, if needed.

Main queue coordinator will make "unsafe execute on main queue sync" not deadlock.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D78109286

fbshipit-source-id: 7c3acc2e560e341889d8ede4665bc70fefc2f058
2025-07-11 22:47:07 -07:00
Pieter De BaetsandFacebook GitHub Bot 8083cb4ab1 Remove LegacyArchitecture deprecation from JSONArguments (#52570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52570

JSONArguments is a set of utility methods that are not part of the legacy architecture, removing the annotation.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D78168536

fbshipit-source-id: 25fcc41441df6c71f9a96ec0ba82c42e8f6af80c
2025-07-11 15:05:23 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 77db9343b1 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon (#52569)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52569

Reviewed By: dtolnay

Differential Revision: D78146649

fbshipit-source-id: 0878130feeda20c746d7fd53a00b376cde61a502
2025-07-11 11:06:18 -07:00
Rob HoganandFacebook GitHub Bot ec5bde62b6 Breaking: Use named exports in metro-babel-register (#52564)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52564

Currently, `metro-babel-register` has a function as its default export, to which we've tagged on various properties.

This tidies that up to a more idiomatic object of named exports, with `register` as a new one of them.

This also serves to make it more compatible with automatic TypeScript generation.

This is semver breaking, but `metro-babel-register` has very little usage outside Meta projects so isn't expected to be disruptive.

Changelog: [Internal]

Metro changelog:
```
 - **[Breaking]**: Move metro-babel-register's main function to a named export `register`
```

Reviewed By: huntie

Differential Revision: D78157559

fbshipit-source-id: c59c9820e9895007345561fed9ccec2273b925c8
2025-07-11 11:03:29 -07:00
Rob HoganandFacebook GitHub Bot bb3ef784e3 Remove HTTP keepAliveTimeout workaround not needed since Node.js 12 (#52561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52561

The removed code comment is pretty clear that this workaround is in place for a specific bug, which was closed in a Node.js 8.x minor: https://github.com/nodejs/node/issues/13391

A related issue descibed a problem that still existed in Node 10:
https://github.com/nodejs/node/issues/27363

Subsequent comments reporting problems with newer Node.js versions all seem to relate to mismatched configuration with load balancers, not directly relevant to Metro.

Reproducers for the original bugs no longer repro on new Node.js (tested with 22.14), so I think it's safe to conclude this is fixed.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D78158427

fbshipit-source-id: 0be5dbc4334ac7b0bbccde44a840caac43deb4df
2025-07-11 11:03:29 -07:00
generatedunixname89002005287564andFacebook GitHub Bot b8550251d8 Fix CQS signal performance-faster-string-find in xplat/js/react-native-github/packages/react-native/ReactCommon/react/runtime (#52568)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52568

Reviewed By: dtolnay

Differential Revision: D78146248

fbshipit-source-id: 8b93b09d46832d6e67c1ded075eb99b9bdd1f0e2
2025-07-11 10:41:33 -07:00
Christoph PurrerandFacebook GitHub Bot 5dc3e18671 Fix loop iteration in Transform::Interpolate(... (#52548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52548

Changelog: [Internal]

While this does not cause real crashes as the code is already gated via
```
bool haveRHS = j < rhs.operations.size();
```
it still represents a bug in the logic

Reviewed By: rshest

Differential Revision: D78133364

fbshipit-source-id: 80efc97b5174e3d0d7efe33604255a96bc856e87
2025-07-11 09:28:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e79808fa4b Update caching keys for prebuild-core (#52565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52565

When we implemented caching in prebuilds for RN core for iOS, we were naïve in choosing the cache key. The current cache key does not consider the source code that is built and this can be problematic.
Imagine a contributor that changes a file in a React folder in their PR, but CI reuses a binary created from `main` and so everything will work well in CI even if the change contains an error.

This change globs over the header and implementation files in the React, ReactCommon and Libraries folder to ensure that we rebuild the code when iOS code changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D78161427

fbshipit-source-id: e612b76232308835eb88c3776122bebd1316f751
2025-07-11 09:14:43 -07:00
Rubén NorteandFacebook GitHub Bot 9747c955ac Migrate network profiling to console.timeStamp (#52560)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52560

Changelog: [internal]

This migrates the profiling logic for `XMLHttpRequest` from `performance.measure` to `console.timeStamp` with built-in support for tracks.

Reviewed By: hoxyq

Differential Revision: D78157407

fbshipit-source-id: 0ef060557a00e7973ef7f0478b26b81471d38226
2025-07-11 08:41:01 -07:00
Rubén NorteandFacebook GitHub Bot 6f6945e64f Propagate console.timeStamp entries to Perfetto (#52542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52542

Changelog: [internal]

This adds support to propagate performance entries logged to `console.timeStamp` to Perfetto, if enabled. It also modifies the Perfetto integration to support track groups, in addition to track names.

Reviewed By: hoxyq

Differential Revision: D78092596

fbshipit-source-id: 76b0fe2738d856fd75ee941de223d6a6a73d8e1c
2025-07-11 08:41:01 -07:00
Nicola CortiandFacebook GitHub Bot 0021dafc51 Remove deprecated constructors for TextInput *Event classes (#52535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52535

Those constructors are no longer necessary. They're deprecated + the class is internal so they're not breaking changes.
I'm just cleaning them up as they're not needed anymore.

Changelog:
[Internal] [Changed] - Remove deprecated constructors for TextInput *Event classes

Reviewed By: javache

Differential Revision: D78095748

fbshipit-source-id: 2dc6c750f8470a88918d8a69b68364f38251d79e
2025-07-11 08:15:42 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e69777d258 Connect prebuilds with CI (#52562)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52562

This change use the prebuilds we build in CI i other iOS jobs to speed-up the iOS CI

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D78159367

fbshipit-source-id: 64486c99fdbc54487dbcff786209cacac304b9b7
2025-07-11 07:15:35 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dc5110a8f2 Unify test_ios_rntester_dynamic_frameworks with test_ios_rntester (#52563)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52563

The test_ios_rntester_dynamic_frameworks is identical to the test_ios_rntester but for the framework parameter.

This change unifies the two, using a matrix to test all the configurations:
- Debug / Static Libraries
- Release / Static Libraries
- Debug / Dynamic Frameworks
- Release / Dynamic Frameworks

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D78159366

fbshipit-source-id: b321f295477fe3ae6e43c7518d47afb0714bddb8
2025-07-11 07:15:35 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 3de1dc0fd1 Fix RCTPushNotification podspec to work with prebuilds (#52531)
Summary:
This change tries to use the prebuilds we build in CI i other iOS jobs to speed-up the iOS CI

bypass-github-export-checks

## Changelog:
[Internal] -

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

Test Plan:
Build rntester using prebuilds:

```
# after downloading the prebuilds from CI and unzipping them
export HERMES_ENGINE_TARBALL_PATH=~/Downloads/hermes-ios-Debug.tar.gz
export RCT_USE_LOCAL_RN_DEP=~/Downloads/reactnative-dependencies-debug.tar.gz
export RCT_TESTONLY_RNCORE_TARBALL_PATH=~/Downloads/React.xcframework.tar.gz

USE_FRAMEWORKS=dynamic bundle exec pod install
open RNTesterPods.xcworkspace
```
And then build from Xcode.

Reviewed By: rshest

Differential Revision: D78158734

Pulled By: cipolleschi

fbshipit-source-id: 43cbb66bd44fa621292b69de0dadde5ed20c4574
2025-07-11 07:15:35 -07:00
Christoph PurrerandFacebook GitHub Bot 88cb7832ea Remove unused Color/Transform #includes and use enum class for TransformOperationType (#52549)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52549

Changelog: [Internal]

- The #includes are not used
- `enum class` is C++, (enum is C)

Reviewed By: rshest

Differential Revision: D78135339

fbshipit-source-id: 1a35301ea063ce17c195be7dc373132d342f111a
2025-07-11 06:51:49 -07:00
Zeya PengandFacebook GitHub Bot aa2a5a682f Animated.sequence (#52547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52547

## Changelog:

[Internal] [Added] - add fantom test for Animated.sequence

Reviewed By: christophpurrer

Differential Revision: D78107756

fbshipit-source-id: c3a7bc2d487cc0ae7316a26dc10b01dcf54dbd37
2025-07-11 06:40:03 -07:00
Zeya PengandFacebook GitHub Bot a0543b773c AnimatedValue.interpolate (#52546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52546

## Changelog:

[Internal] [Added] - add fantom test for AnimatedValue.interpolate

Reviewed By: christophpurrer

Differential Revision: D78032554

fbshipit-source-id: 0100a510cb0ad5c8e1886c309fab91ee9e017769
2025-07-11 06:40:03 -07:00
Rubén NorteandFacebook GitHub Bot f5abce0932 Micro-optimize performance methods (#52555)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52555

Changelog: [internal]

Applied several micro-optimizations to methods in the `performance` object:
- Cached property access
- Avoided unnecessary function calls
- Avoided unnecessary object allocations
- Use strict comparisons with `undefined` instead of loose comparisons with `null` whenever possible.

This yields wins from 5 to 15% depending on the method and args.

## Before

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1728.19 ± 0.81%'    | '1682.00'           | '592249 ± 0.01%'           | '594530'                  | 578640  |
| 1       | 'mark (with custom startTime)'                            | '2008.33 ± 1.32%'    | '1933.00'           | '514326 ± 0.01%'           | '517331'                  | 497927  |
| 2       | 'measure (default)'                                       | '2568.90 ± 1.48%'    | '2484.00'           | '400362 ± 0.02%'           | '402576'                  | 389272  |
| 3       | 'measure (with start and end timestamps)'                 | '2806.21 ± 0.69%'    | '2744.00'           | '362439 ± 0.02%'           | '364431'                  | 356353  |
| 4       | 'measure (with mark names)'                               | '2860.82 ± 0.23%'    | '2824.00'           | '352145 ± 0.02%'           | '354108'                  | 349551  |
| 5       | 'clearMarks'                                              | '763.05 ± 0.03%'     | '751.00'            | '1320377 ± 0.01%'          | '1331558'                 | 1310524 |
| 6       | 'clearMeasures'                                           | '788.10 ± 0.05%'     | '781.00'            | '1281839 ± 0.01%'          | '1280410'                 | 1268875 |
| 7       | 'mark + clearMarks'                                       | '2129.03 ± 1.04%'    | '2053.00'           | '484778 ± 0.01%'           | '487092'                  | 469698  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '3176.38 ± 0.67%'    | '3105.00'           | '320111 ± 0.02%'           | '322061'                  | 314825  |
| 9       | 'measure + clearMeasures (with mark names)'               | '3229.33 ± 0.60%'    | '3145.00'           | '316463 ± 0.02%'           | '317965'                  | 309662  |

## After

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1598.54 ± 0.93%'    | '1553.00'           | '639076 ± 0.01%'           | '643915'                  | 625572  |
| 1       | 'mark (with custom startTime)'                            | '1772.07 ± 1.24%'    | '1713.00'           | '579523 ± 0.01%'           | '583771'                  | 564314  |
| 2       | 'measure (default)'                                       | '2349.32 ± 0.81%'    | '2284.00'           | '434149 ± 0.01%'           | '437828'                  | 425656  |
| 3       | 'measure (with start and end timestamps)'                 | '2609.11 ± 1.06%'    | '2534.00'           | '391950 ± 0.02%'           | '394633'                  | 383273  |
| 4       | 'measure (with mark names)'                               | '2656.46 ± 0.42%'    | '2614.00'           | '380128 ± 0.01%'           | '382555'                  | 376442  |
| 5       | 'clearMarks'                                              | '666.38 ± 0.03%'     | '661.00'            | '1511649 ± 0.01%'          | '1512859'                 | 1500641 |
| 6       | 'clearMeasures'                                           | '718.62 ± 0.03%'     | '711.00'            | '1401526 ± 0.01%'          | '1406470'                 | 1391563 |
| 7       | 'mark + clearMarks'                                       | '2027.47 ± 1.29%'    | '1953.00'           | '509105 ± 0.01%'           | '512033'                  | 493227  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '3030.83 ± 0.98%'    | '2915.00'           | '340624 ± 0.02%'           | '343053'                  | 329943  |
| 9       | 'measure + clearMeasures (with mark names)'               | '2915.76 ± 0.59%'    | '2844.00'           | '349120 ± 0.02%'           | '351617'                  | 342964  |

Reviewed By: hoxyq

Differential Revision: D78013565

fbshipit-source-id: ddd02d887b228debd58805406c1395b9179dd804
2025-07-11 05:37:31 -07:00
Rubén NorteandFacebook GitHub Bot 38cf247c63 Add more benchmarks for performance.measure (#52556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52556

Changelog: [internal]

This adds a new benchmark for `performance.measure` to measure the performance of calling it without arguments.

Reviewed By: hoxyq

Differential Revision: D78013563

fbshipit-source-id: 84e2151d9d91cfc2e85d310f42010483e7304648
2025-07-11 05:37:31 -07:00
Rubén NorteandFacebook GitHub Bot 1fc168f005 Handle nullability of detail correctly in performance.mark and performance.measure (#52557)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52557

Changelog: [internal]

`PerformanceEntry.detail` should be `null` if not defined, not undefined as it is currently. This fixes that.

Reviewed By: hoxyq

Differential Revision: D78013568

fbshipit-source-id: b22dfdd8d582594fc1e5199264e8af92c26bb0ea
2025-07-11 05:37:31 -07:00
Rubén NorteandFacebook GitHub Bot 5e0eb0a17c Small refactor of performance API (#52558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52558

Changelog: [internal]

Small refactors for `$ReadOnly`, move `getCurrentTimeStamp` to utils so it can be reused, etc.

Reviewed By: hoxyq

Differential Revision: D78013570

fbshipit-source-id: f73d119f22dd4dc9aaa5efef76a1156821ecd8de
2025-07-11 05:37:31 -07:00
Rubén NorteandFacebook GitHub Bot acd07c7e1c Handle casting to string in performance.mark and performance.measure correctly (#52559)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52559

Changelog: [internal]

Making `performance.mark` and `performance.measure` slightly more spec-compliant.

Reviewed By: hoxyq

Differential Revision: D78013571

fbshipit-source-id: 4881b674f7cded5045b9f464ca7442a186c39048
2025-07-11 05:37:31 -07:00
Harini MalothuandFacebook GitHub Bot ff38d59cff # Fixed Type Conversion Error in DynamicEventPayload (#52525)
Summary:
Resolves https://github.com/microsoft/react-native-windows/issues/14797
We were facing a type conversion error in the DynamicEventPayload::extractValue() method. The function signature declares a return type of std::optional<double>, but when handling INT64 values, but when handling `INT64` values, the code was directly returning `dynamic.asInt()` without proper type conversion
We faced the issue while integrating https://github.com/microsoft/react-native-windows/pull/14791
## Changelog:
[General][Fixed]

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

Test Plan:
The fix involved wrapping the dynamic.asInt() call with static_cast<double>(), creating the corrected line: return static_cast<double>(dynamic.asInt())

Tested E2E in RNW

Reviewed By: andrewdacenko

Differential Revision: D78083842

Pulled By: rshest

fbshipit-source-id: 8dbedd67fa7c21e89b863d8b1bc7b9e0d7978b9f
2025-07-11 03:13:30 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7bbb13c9be Fix ENTERPRISE_REPOSITORY usage (#52553)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52553

This change fixes the usage of `ENTERPRISE_REPOSITORY` in Ruby

## Changelog
[Internal] -

Reviewed By: cortinico

Differential Revision: D78152641

fbshipit-source-id: e4ace014f1b7cbeb1ec5a0dea955d1fc2bae5b67
2025-07-11 03:01:30 -07:00
Jakub PiaseckiandFacebook GitHub Bot d4b36b0300 Fix display: contents nodes not being cloned with the wrong owner (#52530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52530

This PR fixes two issues with `display: contents` implementation:
1. When a node with `display: contents` set is a leaf, it won't be cloned after the initial tree is built. The added test case covers this scenario.
2. It was possible for the subtree of `display: contents` nodes not to be cloned during layout. I don't have a minimal reproduction for this one, unfortunately. It was discovered in the Expensify app: https://github.com/Expensify/App/issues/65268, along with a consistent reproduction. In that specific case, it seems to be heavily tied to `react-native-onyx`, which is a state management library.

Changelog: [GENERAL][FIXED] - Fixed nodes with `display: contents` set being cloned with the wrong owner

X-link: https://github.com/facebook/yoga/pull/1826

Reviewed By: adityasharat, NickGerleman

Differential Revision: D78084270

Pulled By: j-piasecki

fbshipit-source-id: eb81f6d7dcd1665974d07261ba693e2abea239bb
2025-07-11 02:16:35 -07:00
Vitali ZaidmanandFacebook GitHub Bot 84a2765c2a renamed release testing scripts (#52541)
Summary:
Use a more suitable name for the [scripts used in the release process](https://github.com/reactwg/react-native-releases/blob/main/docs/guide-release-testing.md) to generate a testing project to test a new React Native release against.
```diff
- test-e2e-local
+ test-release-local
```
## Changelog:
[INTERNAL]

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

Test Plan:
`yarn test-release-local-clean` works the same way:
<img width="1177" height="161" alt="Screenshot 2025-07-10 at 17 54 50" src="https://github.com/user-attachments/assets/5efe30c6-a738-476e-a670-696959e9a0fc" />

`yarn test-release-local` works the same way:
<img width="1077" height="395" alt="Screenshot 2025-07-10 at 17 59 29" src="https://github.com/user-attachments/assets/fe6c6443-9316-4ed0-b6dc-51de5ffb109c" />

Reviewed By: cipolleschi

Differential Revision: D78150648

Pulled By: vzaidman

fbshipit-source-id: 471715da271d03bc2a35afbda02074bf71f62734
2025-07-11 01:57:14 -07:00
Nick LefeverandFacebook GitHub Bot 6b8bc5a1d0 Move toDynamic conversion for FilterFunction (#52537)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52537

See title

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D78088447

fbshipit-source-id: 3f3a1e82e527cfe83de7a798b8b9ea2996dc8de1
2025-07-10 12:35:18 -07:00
Nick LefeverandFacebook GitHub Bot 0144798e25 Move toDynamic conversion for BoxShadow (#52536)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52536

See title

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D78005880

fbshipit-source-id: 5a4b7ff3c4d9c6ece17759926ee80aec80d3cde0
2025-07-10 12:35:18 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 263ccad3c5 Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages/react-native/React/CoreModules [B] (#52539)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52539

Reviewed By: dtolnay

Differential Revision: D78062538

fbshipit-source-id: 610505b5bfd78798b09970194f3b95aaefb08920
2025-07-10 12:16:40 -07:00
Devan BuggayandFacebook GitHub Bot c2a3e4420e HWInput: Add Channel Up/Down Support (#52540)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52540

Adds Channel Up/Down events to HWInput.

Changelog:
[Android][Added] - Channel up/down hardware events.

Reviewed By: Abbondanzo

Differential Revision: D78099245

fbshipit-source-id: 133d5c835f3862feba641354cb1164eefeafed9f
2025-07-10 12:04:00 -07:00
Rob HoganandFacebook GitHub Bot 5d4c22b4a7 Update @typescript-eslint (#52532)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52532

Since we updated TypeScript in https://github.com/facebook/react-native/pull/51831, ESLint has printed a warning that `typescript/eslint` doesn't support our TS version.

This updates it to fix the warning.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D77833826

fbshipit-source-id: 29a5179c4f223a8cc0ab2c8071f0a5efa09e5edc
2025-07-10 10:10:09 -07:00
Nicola CortiandFacebook GitHub Bot b0606ba041 Correctly mark as deprecated the ReactActivityDelegate.getReactInstanceManager (#52533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52533

This method is deprecated in the JavaDoc but not correctly annotated as Deprecated, let's fix it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D78092468

fbshipit-source-id: 31e4cb958a51b20f5105a4bec3366d67402e5419
2025-07-10 10:00:32 -07:00
Nicola CortiandFacebook GitHub Bot 4d1f1a4e29 Back out "Remove ShadowNodeTraits::Trait::DirtyYogaNode" (#52528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52528

This was a breaking change that is currently breaking `react-native-safe-area-context` so we can't ship it as it is, especially because all the apps in OSS will be affected by this.

Changelog:
[General] [Changed] - Revert breaking change due to the removal of `ShadowNodeTraits::Trait::DirtyYogaNode`

Original commit changeset: 869e81f0ae00

Original Phabricator Diff: D75324251

Reviewed By: huntie

Differential Revision: D78085848

fbshipit-source-id: f7fcc5e33d59cc966a4ee88dfdbedca4f4c580e0
2025-07-10 09:36:54 -07:00
Christoph PurrerandFacebook GitHub Bot a98ee9147a Add noexcept specifications to Transform and Color methods (#52497)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52497

Changelog: [Internal]

Is a good practice (and can reduce binary size):
https://cpp-core-guidelines-docs.vercel.app/errors#Re-noexcept

Reviewed By: philIip

Differential Revision: D77988686

fbshipit-source-id: 575c18aa0c8f593f363f4450e9e06d41c97a3d1a
2025-07-10 09:17:08 -07:00
Tomasz ZawadzkiandFacebook GitHub Bot d1730ff960 Expose react_renderer_bridging headers via prefab (#52529)
Summary:
This PR fixes the following build error while trying to build `react-native@0.81.0-rc.0` app with `react-native-screens@4.10.0` installed using react-native prebuilds (AAR) due to a missing `react/renderer/bridging/bridging.h` file in `prefab/modules/` inside `react-android-0.81.0-rc.0-debug.aar`.

```
In file included from /Users/tomekzaw/RNOS/react-native-reanimated/node_modules/react-native-screens/android/src/main/cpp/NativeProxy.cpp:2:
  In file included from /Users/tomekzaw/.gradle/caches/8.14.1/transforms/75e7f8f7b5ef763e687a16737daf01b6/transformed/react-android-0.81.0-rc.0-debug/prefab/modules/reactnative/include/react/fabric/Binding.h:12:
  In file included from /Users/tomekzaw/.gradle/caches/8.14.1/transforms/75e7f8f7b5ef763e687a16737daf01b6/transformed/react-android-0.81.0-rc.0-debug/prefab/modules/reactnative/include/react/fabric/FabricUIManagerBinding.h:22:
  /Users/tomekzaw/.gradle/caches/8.14.1/transforms/75e7f8f7b5ef763e687a16737daf01b6/transformed/react-android-0.81.0-rc.0-debug/prefab/modules/reactnative/include/react/renderer/uimanager/primitives.h:14:10: fatal error: 'react/renderer/bridging/bridging.h' file not found
     14 | #include <react/renderer/bridging/bridging.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  ninja: build stopped: subcommand failed.
```

## Changelog:

[ANDROID] [CHANGED] - Expose `react_renderer_bridging` headers via prefab

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

Reviewed By: cipolleschi

Differential Revision: D78092428

Pulled By: cortinico

fbshipit-source-id: de8208ae7545201f600c277a0c8907575c310c58
2025-07-10 08:25:50 -07:00
Vitali ZaidmanandFacebook GitHub Bot e0efd3eb5b add 0.81.0-rc.0 release to the changelog file (#52517)
Summary:
Changelog: [INTERNAL] - Update the changelog to include `0.81.0-rc.0`

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

Reviewed By: cortinico

Differential Revision: D78021431

Pulled By: vzaidman

fbshipit-source-id: 3053aed68a947bf808ae29d4827599112175f531
2025-07-10 03:34:10 -07:00
Christian FalchandFacebook GitHub Bot 42d1a7934c add release/debug switch script (#52498)
Summary:
Fixes #T228219721

This commit adds the debug/release switch script like we have for rn deps and hermes for react-core prebuilt:

- Added script: replace-rncore-version-js
- Inserted script into React-Core-prebuilt podspec
- Updated rncore.rb with correct filenames

bypass-github-export-checks

## Changelog:

[IOS] [ADDED] - add release/debug switch script for React-Core-prebuilt

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

Test Plan: Run in RNTester and switch between release/debug

Reviewed By: rshest

Differential Revision: D78012917

Pulled By: cipolleschi

fbshipit-source-id: 71cad23cd41484a8253fc89d5dce8653649657a0
2025-07-10 03:04:07 -07:00
Christian FalchandFacebook GitHub Bot f2b064c2d4 fix wrong use of return in header file generation loop (#52490)
Summary:
Instead of returning when creating the list of header files from our podspecs, we now call `continue`. This is a bug that causes all subsequent globs in the header file list to be omitted after the first omitted glob.

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - Fixed premature return in header file generation from podspec globs

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

Test Plan: Run prebuild scripts and verify that React-Fabric podspec headers are included in the resulting xcframework.

Reviewed By: mdvacca

Differential Revision: D78012399

Pulled By: cipolleschi

fbshipit-source-id: 2d334f4f7ff966ea4c778786a7056e13a255a708
2025-07-10 03:04:07 -07:00
Christian FalchandFacebook GitHub Bot 40e45f5366 add support for USE_FRAMEWORKS when using prebuilt React Native Core (#52489)
Summary:
When using prebuilts the USE_FRAMEWORKS setting is not really relevant for the React Native code, since there will not be any source code to build frameworks for - and because we already have a framework for the code in React.XCFramework.

This commit adds a new command to the React Native podspecs like we did with the ReactNativeDependencies framework. The method is called `add_rncore_dependency` and it does nothing when building from source - but when linking with the React.XCFramework it explicitly adds linking with the framework.

In addition there are a few places in the ruby code where we check for the USE_FRAMEWORK value and changes some settings - where needed this commit will add a separate check to ensure we're building from source when making these changes.

bypass-github-export-checks

## Changelog:

[IOS] [ADDED] - Added support for using USE_FRAMEWORKS with prebuilt React Native Core

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

Test Plan:
RNTester:

- Builds without USE_FRAMEWORKS as before with/without prebuilt
- Builds with USE_FRAMEWORKS=dynamic as before with source - and now also with prebuilt code.
- Same goes for the static variant.

Reviewed By: mdvacca

Differential Revision: D78012332

Pulled By: cipolleschi

fbshipit-source-id: ea942738ae52b9dceae48fb78a5026f04b7545b8
2025-07-10 03:04:07 -07:00
Fabrizio CucciandFacebook GitHub Bot 5ec4e74bc7 Add changelog entry for 0.78.3 (#52518)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52518

As per title.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D78024356

fbshipit-source-id: e006edd4d86839c7d8635de7c68d333530d0a91d
2025-07-10 01:35:25 -07:00
Luna WeiandFacebook GitHub Bot e40c10b9f6 Introduce experimental VirtualView (#52519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52519

Changelog: [Internal] - Experiment with intersection logic for VirtualViews in scrollView. Currently only on Android

### Changes in detail
`VirtualViewContainer` is held by the ScrollView and is lazily instantiated once a VirtualView tries to access.

Upon initial layout, a VirtualView will add itself to the container and report its updated `rect`. `VirtualViewContainer` holds a sorted list of VirtualViews and iterates through them to update mode

Reviewed By: yungsters

Differential Revision: D77313890

fbshipit-source-id: 30843143bf1828dcac9091479964e83934bf330c
2025-07-09 21:12:45 -07:00
generatedunixname89002005287564andFacebook GitHub Bot aa5b8551ce Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages/react-native/React/Fabric (#52523)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52523

Reviewed By: dtolnay

Differential Revision: D77993027

fbshipit-source-id: 2cf11338360613206a91a9acbeabbfa45934b98f
2025-07-09 20:43:05 -07:00
Eric RozellandFacebook GitHub Bot 57c5eee51f Delete animatedShouldSignalBatch feature flag (#52521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52521

Progress is moving quickly on the cxxNativeAnimatedEnabled flag, which this animatedShouldSignalBatch was intended to de-risk. We no longer need this flag to de-risk issues with animated batch flushing.

## Changelog

[Internal]

Reviewed By: christophpurrer

Differential Revision: D78005971

fbshipit-source-id: 719f1dfb0594fbe90dd6f08dea21ad20665832df
2025-07-09 20:15:57 -07:00
Vineeth KandFacebook GitHub Bot 586f5ba89c Added fix to use accessibility source props (#52397)
Summary:
accessibilityRole is not getting the default value from sourceProps.

This change will fix https://github.com/facebook/react-native/issues/52396

## Changelog:

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

Fixed accessibilityRole parsing.
Pick one each for the category and type tags:

[GENERAL] [FIXED] - Added fix for setting the default value for accessibility props

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

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

Test Plan: After this change accessibilityRole will get the default value from sourceProps.

Reviewed By: joevilches

Differential Revision: D77879025

Pulled By: NickGerleman

fbshipit-source-id: c2fd10dd34462e2cd01488b720ba91e4f1998000
2025-07-09 18:33:59 -07:00
Joe VilchesandFacebook GitHub Bot 384bd214ff Back out "Implement accessibilityOrder by building the accessibilityTree through addChildrenForAccessibility" (#52516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52516

Original commit changeset: 767ebc880a2e

Original Phabricator Diff: D77258926

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D78016839

fbshipit-source-id: 4f71764d5885c227b92840fc9191d0f3b86f6278
2025-07-09 18:10:56 -07:00
Jack PopeandFacebook GitHub Bot d18f1f7ca3 Enable Fragment Refs for intersection observers on Fabric (#52474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52474

1. Enables the feature flags for fragment refs on fbsource
2. Adds a test with Fantom for usage of `FragmentInstance#observeUsing` and `FragmentInstance#unobserveUsing`.
3. Exposes the `ReactFragmentInstance` type with the common methods that are used on native. We can override the DOM only methods in www libdefs.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74326262

fbshipit-source-id: e35ee45b23179ad3ba5527763567c9b04c127eff
2025-07-09 16:03:25 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 23f3bf9239 Add the ENTERPRISE_REPOSITORY env var to let user consume artifacts from their personal maven mirror (#52514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52514

As per title, this change add the `ENTERPRISE_REPOSITORY` env variable so that users can use their owm maven mirror to consume artifacts rather than the official url.

This is helpful as:
- we can reduce the traffic toward maven central
- companies can speed up their builds by relying on local/closer replicas

## Changelog:
[iOS][Added] - Add the `ENTERPRISE_REPOSITORY` env variable to cocopaods infra

Reviewed By: cortinico

Differential Revision: D78011424

fbshipit-source-id: 24b83b4866095d7fe3318362afc5075b99b146e7
2025-07-09 10:14:41 -07:00
Ruslan LesiutinandFacebook GitHub Bot dfce5c7180 console.timeStamp: support warning color (#52511)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52511

# Changelog: [Internal]

This is actually used in React for logging triggers, like Mount / Unmount / Reconnect / Disconnect.

Reviewed By: huntie

Differential Revision: D78008351

fbshipit-source-id: 9d39d45da499ce78172531c00cc7465b985c2646
2025-07-09 09:26:47 -07:00
Christoph PurrerandFacebook GitHub Bot 52815c2724 Improve NativeDOM Turbo Module typing (#52494)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52494

Changelog: [Internal]

- Use C++ private namespace instead of C static methods
- Strongly type C++ TM functions via AsyncCallback

Reviewed By: javache

Differential Revision: D77978354

fbshipit-source-id: 2274b95cfc5b65392fc3c808bbdf54ec4ab3a37e
2025-07-09 08:40:25 -07:00
Alex HuntandFacebook GitHub Bot 732bd12dc2 Add optional safeAreaInsets prop to NewAppScreen (replacing SafeAreaView) (#52507)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52507

Resolves https://github.com/reactwg/react-native-releases/issues/1011.

Changelog:
[General][Changed] - `NewAppScreen` no longer internally handles device safe area, use optional `safeAreaInsets` prop (aligned in 0.81 template)

Reviewed By: cortinico

Differential Revision: D78006238

fbshipit-source-id: 01fb16d6754b69a722ea11838d558bebd4748026
2025-07-09 08:26:19 -07:00
Riccardo CipolleschiandFacebook GitHub Bot bfc841d71d Change polling to try and download the pom manifest (#52512)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52512

The way Maven works is that the artifacts are uploaded and available way before the browsing UI will allow us to browse them.

By trying to download the `.pom` file instead of checking for the browsing website to be visible, we can shave some minutes during the release

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D78008635

fbshipit-source-id: 96516163628d6d25db385d996a11b4af78db764a
2025-07-09 08:12:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6ed0279700 Fix bump-podfile-lock job by using Xcode 16.2 (#52513)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52513

We bumped the requirement for cocoapods to use Xcode 16.1 or greater.
This job was not update and therefore it failed when releasing 0.81.0-rc.0.

This change should fix it and it should be cherry picked in the release branch too.
By default, the macos executor in github actions are using Xcode 15.2

## Changelog
[Internal] -

Reviewed By: cortinico, fabriziocucci

Differential Revision: D78008316

fbshipit-source-id: 4d05233ca3b936cf128400030328124c453963ea
2025-07-09 08:12:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 5e214f0dc8 Read the React Native version from the react-native's package.json (#52509)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52509

When building the CI Workflow to build React Native prebuilds, we were reading the react-native's version from the root package.json. This package.json is not updated by the release script, so the version is always 1000.
This makes the build process fail for stable releases.

With this change, we read the version from the right package.json file

## Changelog:
[Internal] - Read React Native version from the right package.json file

Reviewed By: cortinico

Differential Revision: D78007906

fbshipit-source-id: 35f868a1c203245fdcf518ee81957352e3ab1de7
2025-07-09 08:12:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot f37e983255 Back out "Add more logging around computeNightlyTarballURL" (#52510)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52510

We reverted this change in the 0.81 release branch

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D78007905

fbshipit-source-id: fec3df04423300571f629da19bf95cd82c952f12
2025-07-09 08:12:58 -07:00
Samuel SuslaandFacebook GitHub Bot daf6ebd7b5 fix race condition in C++ Animated (#52505)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52505

changelog: [internal]

there is a race condition where `startRenderCallbackIfNeeded` may be called from JS thread and the main thread at the same time, leading to a crash. To address this, this diff adds uses a boolean to make sure `startOnRenderCallback_` is only called once and `stopOnRenderCallback_` is only called after start was called.

Reviewed By: javache

Differential Revision: D77871230

fbshipit-source-id: 6d7fba596e7146adaff6f8dbe1f436ddd59950c6
2025-07-09 07:19:30 -07:00
Rubén NorteandFacebook GitHub Bot f578038cb2 Add test to show Fabric bug with intermediate states in JS and sync updates in UI (#52502)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52502

Changelog: [internal]

This is just a test to show the bug reported in https://github.com/facebook/react-native/issues/52373

Reviewed By: javache

Differential Revision: D78000010

fbshipit-source-id: 5f53a02eb875255f5e384a748057997491518adc
2025-07-09 05:59:27 -07:00
Anupriya VermaandFacebook GitHub Bot 2ca88a0069 'return': conversion from 'int' to 'uint8_t', possible loss of data in CSSHexColor (#52496)
Summary:
Resolves https://github.com/microsoft/react-native-windows/issues/14666
We faced this issue while integrating [0.79.0-nightly-20250220-41b597c73](https://github.com/microsoft/react-native-windows/pull/14662/files#top)

This warning is treated as error and should be fixed here as well.

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Message

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

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

Test Plan:
Fixed error:
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSHexColor.h(39,12): Error C4244: 'return': conversion from 'int' to 'uint8_t', possible loss of data
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSHexColor.h(39,12): error C4244: 'return': conversion from 'int' to 'uint8_t', possible loss of data [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')

Tested E2E in RNW

Reviewed By: javache

Differential Revision: D78000818

Pulled By: rshest

fbshipit-source-id: 5caafc5e92540f722b009480f030276e526355af
2025-07-09 05:05:52 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 47957f9adc 60 (#52493)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52493

Reviewed By: dtolnay

Differential Revision: D77920274

fbshipit-source-id: 42a68d5666f43f606ebcbbe4d207bb9b299760e7
2025-07-09 04:56:35 -07:00
Nicola CortiandFacebook GitHub Bot 9c172fbba3 Add more logging around computeNightlyTarballURL
Summary:
This is a backport of a fix we applied to the 0.81 branch.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: vzaidman

Differential Revision: D78000573

fbshipit-source-id: 64a4e90632158c1f52c45f9fbc3452e848271e94
2025-07-09 04:50:29 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 7725a0aee3 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/rn-tester/android/app/src/main/jni (#52501)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52501

Reviewed By: javache, cortinico

Differential Revision: D77990137

fbshipit-source-id: 1fe4b7a0a821cf9bff5b21d38b6e78a3b164211d
2025-07-09 03:03:48 -07:00
Christoph PurrerandFacebook GitHub Bot b5329ecd6d NativeCxxModuleExample test for testing C++ TM E2E (#52477)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52477

Changelog: [Internal]

This adds a Fantom test for

https://github.com/facebook/react-native/blob/main/packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.js

to test a C++ Turbo Module End 2 End (loading the C++ implementation in native code, accessing in JavaScript via Hermes VM and verifying the results of the API calls)

Reviewed By: rshest

Differential Revision: D77848654

fbshipit-source-id: 48a4ab88a330e9282ae8dab589743eaace62d124
2025-07-08 21:10:36 -07:00
Nicola CortiandFacebook GitHub Bot 6892dde363 Gradle to 8.14.3 (#52466)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52466

Just another patch bump of Gradle 8.14

Changelog:
[Android] [Changed] - Gradle to 8.14.3

Reviewed By: NickGerleman

Differential Revision: D77865220

fbshipit-source-id: 450d175242f046909ab1984654d24e92a2536d5d
2025-07-08 16:33:18 -07:00
Adan MorenoandFacebook GitHub Bot eb61e6f783 Revert D77143018: Cleanup react-native-codegen DEFS
Differential Revision:
D77143018

Original commit changeset: 06ec43ce5149

Original Phabricator Diff: D77143018

fbshipit-source-id: cec53068f88548c4494da315914763beb6730573
2025-07-08 16:29:45 -07:00
Marco WangandFacebook GitHub Bot df6ba3f155 Pre-suppress errors for boolean literals for xplat js (#52482)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52482

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D77915593

fbshipit-source-id: 9238b89e92410cea350c6057044167727de3601a
2025-07-08 12:50:53 -07:00
Fabrizio CucciandFacebook GitHub Bot 5baf1e6d00 Fix all workflows to use node 22.14.0 (#52491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52491

We hit this error when trying to release 0.81.0 (see [action run](https://github.com/facebook/react-native/actions/runs/16147471618/job/45570030039)):

> error react-native/metro-babel-transformer@0.81.0-main: The engine "node" is incompatible with this module. Expected version ">= 22.14.0". Got "20.19.2"

This should fix the issue.

Changelog: [Internal]

Reviewed By: motiz88, cortinico

Differential Revision: D77938906

fbshipit-source-id: 48ca412f05d99459c4386499330584d9e560408b
2025-07-08 09:24:15 -07:00
Alex HuntandFacebook GitHub Bot fc5e33b582 Reorganise shared script utils (#52473)
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
2025-07-08 06:10:36 -07:00
Pieter De BaetsandFacebook GitHub Bot 6dfe59e1df Fix missing bundle errors not correctly reported on Android (#52441)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52441

When an error is thrown using `handleHostException` from within the (immediate) execution of a `Task`, the `Task` will capture the error. If those errors are never consumed, the error is just silently swallowed. Instead we should make sure that this is raised outside of the context of a `Task` so the error correctly bubbles up and crashes the app (in release).

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D77798248

fbshipit-source-id: 41803aba0cace0e364a235501cf34bb946e7ff51
2025-07-08 05:58:56 -07:00
Moti ZilbermanandFacebook GitHub Bot db65cb70de Fix typo in new app screen
Summary:
TSIA

bypass-github-export-checks

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D77928389

fbshipit-source-id: 038d11bed3fbbb96c97b7e2c5727e91973de9078
2025-07-08 05:48:00 -07:00
Mateo GuzmánandFacebook GitHub Bot a0e11904d6 Clean up unnecessary test setup for Android tests (#52471)
Summary:
This came out of https://github.com/facebook/react-native/issues/52457 as I had to fix some tests and realised there is a lot of setup that could be shadow and other things that are not needed at all.

## Changelog:

[INTERNAL] - Clean up unnecessary test setup for Android tests

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

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

Reviewed By: cortinico

Differential Revision: D77926887

Pulled By: javache

fbshipit-source-id: ff493d87633fcb4c4194b50cd374ad2e8acda974
2025-07-08 05:31:11 -07:00
Pieter De BaetsandFacebook GitHub Bot 120a417320 Cleanup react-native-codegen DEFS (#52468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52468

* Re-enable tests
* Simplify logic to avoid bypasses for arc focus

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D77143018

fbshipit-source-id: 06ec43ce5149a139db78d38630191b01bc520461
2025-07-08 04:53:51 -07:00
Rubén NorteandFacebook GitHub Bot 5a79ece192 Use structuredClone to copy detail field in performance.mark and performance.measure (#52483)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52483

Changelog: [internal]

This is a small refinement for `performance.mark` and `performance.measure` to use `structuredClone` to copy the value of the `detail` field, instead of assigning it by reference.

This still doesn't completely fix the semantics of `performance.mark` and `performance.measure`, as the entries returned by those methods aren't referentially equal to the entries reported by `PerformanceObserver` (and the latter don't have the `detail` field yet).

Reviewed By: huntie

Differential Revision: D77863037

fbshipit-source-id: 54d959612ecd560250e49bb0887bb12112a0142f
2025-07-08 04:40:49 -07:00
Ruslan LesiutinandFacebook GitHub Bot f000116197 Fix Timestamps conversion for Custom Tracks (#52479)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52479

# Changelog: [Internal]

The previous cast is incorrect.

Reviewed By: javache

Differential Revision: D77894512

fbshipit-source-id: 67e6b9a4ed43020a343a2a9b5d702509c34ae41a
2025-07-08 04:34:14 -07:00
Vitali ZaidmanandFacebook GitHub Bot 5cf4d0899f Update debugger-frontend from 51a91a2...844f225 (#52486)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52486

Changelog: [Internal] - Update `react-native/debugger-frontend` from 51a91a2...844f225

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/51a91a2ad62e7f585912ed314a350a72de84d6ed...844f225009e6445d088ed0e431d1fc430325ed95).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [844f22500](https://github.com/facebook/react-native-devtools-frontend/commit/844f22500) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-08T10:16:09+01:00 | [Track when the stack trace symbolication succeeds (#187)](https://github.com/facebook/react-native-devtools-frontend/commit/844f22500) |
| [ffa6bb6af](https://github.com/facebook/react-native-devtools-frontend/commit/ffa6bb6af) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-07T16:21:55+01:00 | [parse "empty url" and "address at" frames as non-hyperlinked text (#188)](https://github.com/facebook/react-native-devtools-frontend/commit/ffa6bb6af) |

Reviewed By: robhogan

Differential Revision: D77926362

fbshipit-source-id: cbcf8b17cd175400d3d027ce2e8ebefa497f5d79
2025-07-08 04:15:32 -07:00
Marco WangandFacebook GitHub Bot 68650badd2 Pre-suppress errors for null_void for xplat js (#52480)
Summary:
Changelog: [Internal]

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

Reviewed By: SamChou19815

Differential Revision: D77890434

fbshipit-source-id: cc0571e0ff1c7cec3fff8614f688d46e46970cc4
2025-07-07 20:35:08 -07:00
Luna WeiandFacebook GitHub Bot 5ec8e60581 Refactor VirtualView target structure on Android (#52476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52476

Changelog: [Internal] - Refactor package structure on Android to prepare for experimental VirtualView so that non-view related objects go under `virtual` and the native view goes under `view`.
This breaks dependency circles for experimental VirtualView in upcoming change.

Reviewed By: yungsters

Differential Revision: D77335426

fbshipit-source-id: 3b978e9cc5ad376c71aebc039cfc74d2515d2cfa
2025-07-07 16:00:13 -07:00
Alex HuntandFacebook GitHub Bot 918f02dcc3 Consolidate JS API scripts under scripts/js-api/, update docs (#52469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52469

Organise `scripts/build-types/` and `scripts/diff-api-snapshot/` into a single grouping `scripts/js-api/` parent dir — matching the newly relocated `scripts/cxx-api/`.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D77865488

fbshipit-source-id: 33754d9275e65c3bda686294f18d855221ec7bff
2025-07-07 15:04:37 -07:00
Alex HuntandFacebook GitHub Bot 5fe782a800 Move cxx-api scripts under scripts/, add README (#52467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52467

Moves the WIP `cxx-public-api` project under `scripts/cxx-api/`, add minimal README docs.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D77865490

fbshipit-source-id: ce49845386c468ee7422b864c49f2a8c9eed5a70
2025-07-07 15:04:37 -07:00
Christoph PurrerandFacebook GitHub Bot abfb9cbd40 Update outdated ReactNativeCPP.api (#52475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52475

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D77887914

fbshipit-source-id: 1431205eff716bac86610750103df729553d22b9
2025-07-07 14:50:58 -07:00
Pieter De BaetsandFacebook GitHub Bot 3bf5cb3d0e Deprecate MessageQueueThreadPerfStats (#52470)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52470

These metrics are not actively consumed and are highly noisy.

Changelog: [Android][Removed] Deprecated MessageQueueThreadPerfStats API and replaced with stub.

Reviewed By: cortinico

Differential Revision: D77867087

fbshipit-source-id: 8bf7423ad60cb3bb21a5dbe94771d5a71832633d
2025-07-07 11:29:01 -07:00
Christoph PurrerandFacebook GitHub Bot ead669ade3 Remove unused ReactCommon/TurboModuleUtils functions #deepCopyJSIObject and #deepCopyJSIArray (#52443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52443

Changelog: [General][Breaking] Remove unused ReactCommon/TurboModuleUtils functions #deepCopyJSIObject and #deepCopyJSIArray

Those are not used anymore

Reviewed By: cortinico

Differential Revision: D77771186

fbshipit-source-id: e1f5e34238567241b4204d58ff85fd9067e321df
2025-07-07 11:04:01 -07:00
Nicola CortiandFacebook GitHub Bot 625f69f284 @DeprecatedInNewArchitecture -> @Deprecated (#52399)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52399

I'm raising the deprecation warnings for those methods that are using legacy arch.
Previously the `DeprecatedInNewArchitecture` was not generating warnings for user in their builds, while now the Kotlin's/Java's `DeprecatedInNewArchitecture` it will.

Changelog:
[Android] [Changed] - Introduce more deprecation warnings for Legacy Arch classes

Reviewed By: mdvacca

Differential Revision: D77736713

fbshipit-source-id: bc21729ed8253d3ec6b6a40577bcd76622c3f8a6
2025-07-07 10:20:43 -07:00
Christoph PurrerandFacebook GitHub Bot 06034554e4 Remove SampleTurboCxxModule example (#52442)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52442

Changelog: [Internal]

The sample is from an outdated approach of enabling C++ Modules in RN which is not recommended anymore.

Prefer C++ Turbo Modules if you need to expose / access C or C++ APIs in RN apps:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

It is not included in any RNTester app at this time

Reviewed By: cortinico

Differential Revision: D77771111

fbshipit-source-id: a4fe1d13fd0224babc46f54b921a036f7b237a48
2025-07-07 09:37:37 -07:00
Samuel SuslaandFacebook GitHub Bot 298ec6ca5d Deprecate ShadowNode::ListOfWeak and replace with std::vector<std::weak_ptr<const ShadowNode>> (#52401)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52401

changelog: [internal]

- Mark ShadowNode::ListOfWeak as deprecated with appropriate deprecation message
- Replace all usages of ShadowNode::ListOfWeak with std::vector<std::weak_ptr<const ShadowNode>>
- Updated primitives.h and ReactNativeCPP.api to use the explicit type instead of the alias

This change continues the effort to remove type aliases in favor of explicit standard library types for better code clarity and maintainability.

Reviewed By: christophpurrer

Differential Revision: D77652083

fbshipit-source-id: 79cad019e039c19f661346604ff49a44a4af7a79
2025-07-07 09:29:57 -07:00
Christoph PurrerandFacebook GitHub Bot c1200718a0 Move RuntimeExecutor after copying it into BufferedRuntimeExecutor (#52404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52404

Changelog: [Internal]

https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h#L23

is a copy-able type (it will be copied when passed into the BufferedRuntimeExecutor constructor).

Hence we can `std::move` it in the `BufferedRuntimeExecutor` constructor

Reviewed By: javache

Differential Revision: D77758211

fbshipit-source-id: 634b1cd0e1ed4d27a013ad8927b2123dc6977ad8
2025-07-07 08:59:56 -07:00
Rubén NorteandFacebook GitHub Bot a3933e6878 Remove legacy tests for Performance API (#52465)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52465

Changelog: [internal]

Now that we have enough coverage for the Performance API in Fantom, Jest tests where most of the API is mocked are redundant and useless, so this removes them (and the mock).

Reviewed By: huntie

Differential Revision: D77860888

fbshipit-source-id: 7dbd1a8a43b056a3b34e4e37d578be9ccb521824
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot 9f8179afa7 Add tests for durationThreshold option for PerformanceObserver (#52464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52464

Changelog: [internal]

This adds tests for the `durationThreshold` option for `PerformanceObserver.prototype.observe`.

Reviewed By: huntie

Differential Revision: D77860882

fbshipit-source-id: 1e56391166523d2c4f837f758bc367b58fe8e82e
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot e6bff3f1fe Add tests for performance.eventCounts (#52463)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52463

Changelog: [internal]

This adds Fantom tests for `performance.eventCounts`.

Reviewed By: huntie

Differential Revision: D77860881

fbshipit-source-id: 26b9ef56b9c610cbad7011bc0adde27251fda909
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot feeef97554 Expand tests for the performance API (#52462)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52462

Changelog: [internal]

This adds a few more tests for `performance.getEntries`, `performance.getEntriesByName` and `performance.getEntriesByType`.

Reviewed By: huntie

Differential Revision: D77801746

fbshipit-source-id: 42f80c4e2b787c455b149ee38d071511181532b0
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot 9005d93e32 Optimize performance.mark and performance.measure (#52429)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52429

Changelog: [internal]

This implements a significant optimization for `performance.mark` and `performance.measure`. After these changes, they take 1/3 of the time they took before.

We've seen these methods show up too often in traces (in the Hermes sampling profiler) so this should significantly reduce their overhead.

I found out that most of the time spent in `performance.mark` and `performance.measure` was creating the `PerformanceMark` and `PerformanceMeasure` instances returned by those methods. I applied the same playbook I did for `ReactNativeElement` (avoiding private fields and `super()` calls, which yielded these wins.

* Before

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '5579.80 ± 0.32%'    | '5479.00'           | '181368 ± 0.02%'           | '182515'                  | 179218  |
| 1       | 'mark (with custom startTime)'                            | '5759.72 ± 0.99%'    | '5648.00'           | '176162 ± 0.02%'           | '177054'                  | 173620  |
| 2       | 'measure (with start and end timestamps)'                 | '6506.38 ± 0.34%'    | '6390.00'           | '155503 ± 0.02%'           | '156495'                  | 153696  |
| 3       | 'measure (with mark names)'                               | '6770.94 ± 0.72%'    | '6620.00'           | '149833 ± 0.03%'           | '151057'                  | 147691  |
| 4       | 'clearMarks'                                              | '785.89 ± 0.07%'     | '771.00'            | '1291356 ± 0.01%'          | '1297017'                 | 1272442 |
| 5       | 'clearMeasures'                                           | '777.98 ± 0.06%'     | '761.00'            | '1303362 ± 0.01%'          | '1314060'                 | 1285383 |
| 6       | 'mark + clearMarks'                                       | '5995.34 ± 1.37%'    | '5779.00'           | '171874 ± 0.03%'           | '173040'                  | 166797  |
| 7       | 'measure + clearMeasures (with start and end timestamps)' | '7040.28 ± 0.57%'    | '6830.00'           | '145289 ± 0.03%'           | '146413'                  | 142040  |
| 8       | 'measure + clearMeasures (with mark names)'               | '7184.43 ± 0.40%'    | '6990.00'           | '141809 ± 0.03%'           | '143062'                  | 139190  |

* After

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1678.19 ± 0.73%'    | '1633.00'           | '607139 ± 0.01%'           | '612370'                  | 595882  |
| 1       | 'mark (with custom startTime)'                            | '1920.23 ± 1.30%'    | '1843.00'           | '538217 ± 0.01%'           | '542594'                  | 520772  |
| 2       | 'measure (with start and end timestamps)'                 | '2651.72 ± 0.94%'    | '2554.00'           | '388312 ± 0.02%'           | '391543'                  | 377114  |
| 3       | 'measure (with mark names)'                               | '2815.84 ± 0.75%'    | '2744.00'           | '362303 ± 0.02%'           | '364431'                  | 355134  |
| 4       | 'clearMarks'                                              | '743.82 ± 0.06%'     | '731.00'            | '1363190 ± 0.01%'          | '1367989'                 | 1344417 |
| 5       | 'clearMeasures'                                           | '776.69 ± 0.07%'     | '761.00'            | '1306563 ± 0.01%'          | '1314060'                 | 1287512 |
| 6       | 'mark + clearMarks'                                       | '2043.97 ± 1.26%'    | '1973.00'           | '504750 ± 0.01%'           | '506842'                  | 489801  |
| 7       | 'measure + clearMeasures (with start and end timestamps)' | '3048.39 ± 0.87%'    | '2965.00'           | '335285 ± 0.02%'           | '337268'                  | 328042  |
| 8       | 'measure + clearMeasures (with mark names)'               | '3132.75 ± 0.80%'    | '3065.00'           | '324365 ± 0.02%'           | '326264'                  | 319209  |

Reviewed By: huntie

Differential Revision: D77790874

fbshipit-source-id: baf7aca07d281fef4373956d125c63f006fab592
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot 74c03b67e3 Fix bugs in performance.mark and performance.measure (#52430)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52430

Changelog: [internal]

(This is marked as internal because this API hasn't been marked as stable yet).

This fixes multiple bugs and missing features in `performance.mark` and `performance.measure`. See re-enabled tests to see the specific behaviors.

Validated that performance isn't regressed by this change using the existing benchmark for `Performance` (`Performance-benchmark-itest`):

* Before

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '5557.96 ± 0.34%'    | '5459.00'           | '182114 ± 0.02%'           | '183184'                  | 179922  |
| 1       | 'mark (with custom startTime)'                            | '5664.54 ± 1.71%'    | '5518.00'           | '180296 ± 0.02%'           | '181225'                  | 176537  |
| 2       | 'measure (with start and end timestamps)'                 | '6653.62 ± 0.94%'    | '6530.00'           | '152296 ± 0.02%'           | '153139'                  | 150295  |
| 3       | 'measure (with mark names)'                               | '6903.37 ± 0.42%'    | '6790.00'           | '146429 ± 0.02%'           | '147275'                  | 144857  |
| 4       | 'clearMarks'                                              | '782.98 ± 0.04%'     | '771.00'            | '1287735 ± 0.01%'          | '1297017'                 | 1277173 |
| 5       | 'clearMeasures'                                           | '792.24 ± 0.03%'     | '781.00'            | '1270847 ± 0.01%'          | '1280410'                 | 1262238 |
| 6       | 'mark + clearMarks'                                       | '5883.69 ± 0.52%'    | '5759.00'           | '172863 ± 0.02%'           | '173641'                  | 169962  |
| 7       | 'measure + clearMeasures (with start and end timestamps)' | '7222.22 ± 0.68%'    | '7021.00'           | '141204 ± 0.02%'           | '142430'                  | 138462  |
| 8       | 'measure + clearMeasures (with mark names)'               | '7234.53 ± 0.34%'    | '7121.00'           | '139600 ± 0.02%'           | '140430'                  | 138227  |

* After

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '5579.80 ± 0.32%'    | '5479.00'           | '181368 ± 0.02%'           | '182515'                  | 179218  |
| 1       | 'mark (with custom startTime)'                            | '5759.72 ± 0.99%'    | '5648.00'           | '176162 ± 0.02%'           | '177054'                  | 173620  |
| 2       | 'measure (with start and end timestamps)'                 | '6506.38 ± 0.34%'    | '6390.00'           | '155503 ± 0.02%'           | '156495'                  | 153696  |
| 3       | 'measure (with mark names)'                               | '6770.94 ± 0.72%'    | '6620.00'           | '149833 ± 0.03%'           | '151057'                  | 147691  |
| 4       | 'clearMarks'                                              | '785.89 ± 0.07%'     | '771.00'            | '1291356 ± 0.01%'          | '1297017'                 | 1272442 |
| 5       | 'clearMeasures'                                           | '777.98 ± 0.06%'     | '761.00'            | '1303362 ± 0.01%'          | '1314060'                 | 1285383 |
| 6       | 'mark + clearMarks'                                       | '5995.34 ± 1.37%'    | '5779.00'           | '171874 ± 0.03%'           | '173040'                  | 166797  |
| 7       | 'measure + clearMeasures (with start and end timestamps)' | '7040.28 ± 0.57%'    | '6830.00'           | '145289 ± 0.03%'           | '146413'                  | 142040  |
| 8       | 'measure + clearMeasures (with mark names)'               | '7184.43 ± 0.40%'    | '6990.00'           | '141809 ± 0.03%'           | '143062'                  | 139190  |

Reviewed By: huntie

Differential Revision: D77795990

fbshipit-source-id: 97895065ca63f87f1f66710cf7bce97e1255a142
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot 34201d8387 Fix Flow types for performance.measure (#52431)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52431

Changelog: [internal]

`performance.measure` supports passing mark names as `start` and `end` options, so this fixes the Flow type before fixing the actual implementation.

It also makes it so you can't specify both `end` and `duration`, enforced by the type system.

Reviewed By: huntie

Differential Revision: D77795991

fbshipit-source-id: e89f509c7efc2fa49d17d79bc19bc1d14e007871
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot 2edda6d967 Add basic Fantom tests for performance.mark and performance.measure (#52432)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52432

Changelog: [internal]

This creates a battery of tests for `performance.mark` and `performance.measure`. For this, it was necessary to add a new method in the native module to mock the current time.

Many of the tests are currently failing, as the API doesn't support all the options or behaviors defined in the spec. They're skipped here and will be re-enabled and fixed in a following diff.

Reviewed By: huntie

Differential Revision: D77795989

fbshipit-source-id: 3ebf18c8ac336df1fb43003a55a4678b52e8982d
2025-07-07 06:42:23 -07:00
Samuel SuslaandFacebook GitHub Bot 1c51d6684b Deprecate ShadowNode::ListOfShared and migrate to std::vector<std::shared_ptr<const ShadowNode>> (#52402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52402

changelog: [internal]

Mark ShadowNode::ListOfShared as deprecated and replace most usages throughout the React Native renderer codebase with the explicit std::vector<std::shared_ptr<const ShadowNode>> type. This improves code clarity by making the container type explicit rather than relying on a type alias.

Reviewed By: christophpurrer

Differential Revision: D77651676

fbshipit-source-id: 8c4bd9b8cbbe467384b947ef9e7a4524f2053e36
2025-07-07 06:15:29 -07:00
szymonrybczakandFacebook GitHub Bot 9d63098520 chore: bump @react-native-community/cli* devDependencies to 20.0.0-alpha (#52460)
Summary:
Upgrade `react-native-community/cli` to version 20.

## Changelog:

[INTERNAL] [CHANGED] - Upgrade react-native-community/cli to v20

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

Test Plan: n/a

Reviewed By: huntie

Differential Revision: D77860027

Pulled By: cortinico

fbshipit-source-id: 3eb3942b38091b4216628b94cdf1449838daa8d3
2025-07-07 05:17:07 -07:00
Alex HuntandFacebook GitHub Bot 9d4d8dcb02 Move BugReporting module out of open source repo (#52425)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52425

Changelog:
[General][Breaking] - All `react-native/Libraries/BugReporting` APIs have been removed

Reviewed By: javache

Differential Revision: D77014767

fbshipit-source-id: a074fb952948a58259be66033e1f85e04bacf2de
2025-07-07 05:08:57 -07:00
Alex HuntandFacebook GitHub Bot caff37df5a Remove internal calls to BugReporting (#52374)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52374

Precursor to removing `BugReporting` from React Native's internals.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77014724

fbshipit-source-id: 91cd38fe6c39656573fecdeff18162073df2fb42
2025-07-07 05:08:57 -07:00
Christoph PurrerandFacebook GitHub Bot 7998914471 Remove outdated SampleTurboCxxModuleLegacyImpl (#52412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52412

Changelog: [Internal]

The sample is from an outdated approach of enabling C++ Modules in RN which is not recommended anymore.

Prefer C++ Turbo Modules if you need to expose / access C or C++ APIs in RN apps:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

It is not included in any RNTester app at this time

Reviewed By: cortinico

Differential Revision: D77770455

fbshipit-source-id: 987c9f2b9ab4145a2f6a724aad12d8473957dbe8
2025-07-06 22:35:20 -07:00
Christoph PurrerandFacebook GitHub Bot 94aca598c7 Remove unused #include <ReactCommon/TurboModuleUtils.h> (#52411)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52411

Changelog: [Internal]

Reviewed By: javache, cortinico

Differential Revision: D77770244

fbshipit-source-id: a300e377f8c6e52256ae04813c1372799cf5af59
2025-07-06 21:21:48 -07:00
Christoph PurrerandFacebook GitHub Bot 5e650d0105 Remove more unused #includes (#52389)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52389

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D77706943

fbshipit-source-id: b8662737699ec0857845cfded49302ee9e93b78e
2025-07-06 20:56:16 -07:00
Christoph PurrerandFacebook GitHub Bot 9d5033afb0 Delete non C++ Turbo Module SampleCxxModule (#52407)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52407

Changelog: [Internal]

The sample is from an outdated approach of enabling C++ Modules in RN which is not recommended anymore.

Prefer C++ Turbo Modules if you need to expose / access C or C++ APIs in RN apps:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

Reviewed By: javache

Differential Revision: D77765443

fbshipit-source-id: 112fef4c1a7e1c567f3c1d471728a1dfc926adc6
2025-07-06 19:54:06 -07:00
Christoph PurrerandFacebook GitHub Bot e8709355dc C++ Turbo Module > Allow Promise<void> types (#52388)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52388

Changelog: [Internal]

Similar to `AsyncCallback<>` (the foundation of `AsyncPromise`) we should allow `void` Promise types in C++ such as `AsyncPromise<>`

Reviewed By: rbergerjr

Differential Revision: D77712020

fbshipit-source-id: d7360df5cc1b77f1e03e5fb73b0b468f6e3a415b
2025-07-06 19:53:51 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 255977a7b9 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/utils (#52444)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52444

Reviewed By: dtolnay

Differential Revision: D77782134

fbshipit-source-id: 99989d45926a0eabcc6e19e12dce396a473e14ce
2025-07-06 13:33:29 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 8531015941 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon [A] (#52437)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52437

Reviewed By: cortinico

Differential Revision: D77790078

fbshipit-source-id: 3188cce596ffa382ca3a9bd27cd0aba8580bbb76
2025-07-06 13:30:04 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 4e62558e43 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon [B] (#52434)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52434

Reviewed By: cortinico

Differential Revision: D77790202

fbshipit-source-id: 35b5bb46e8056cddf874b05bf511754878f0e1fc
2025-07-06 12:32:42 -07:00
Rob HoganandFacebook GitHub Bot 5cdea3c295 Remove last use of Metro deep imports (#52456)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52456

Remove the last use of a Metro deep import in preparation for making all deep imports semver-private.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77450110

fbshipit-source-id: de7aa9c1f6b0d281fe8a6c3bd95e721c5bb58c63
2025-07-06 05:33:25 -07:00
Rob HoganandFacebook GitHub Bot 083644647e Update to Metro ^0.82.5 (#52454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52454

Bump Metro minimum from 0.82.4 to 0.82.5

Release notes: https://github.com/facebook/metro/releases/tag/v0.82.5

Changelog: [General][Changed] Bump Metro to ^0.82.5

Reviewed By: huntie

Differential Revision: D77450102

fbshipit-source-id: 7b0fdcbeb63d8021996ca82f98773145179c8a50
2025-07-06 04:30:38 -07:00
Alex HuntandFacebook GitHub Bot 987e3f8c00 Make NetworkingModule handlers internal (#52438)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52438

Motivation: After some investigation, these make sense as private APIs, and we intend to modify `UriHandler` slightly in order to report blob response body payloads via CDP for Network debugging.

Changelog:
[Android][Removed] - Internalize `NetworkingModule`'s `UriHandler`, `RequestBodyHandler`, and `ResponseHandler` APIs

Reviewed By: cortinico

Differential Revision: D77799144

fbshipit-source-id: 20c36f52a900830091a253ab9917832c30b31d31
2025-07-05 09:07:22 -07:00
Nick LefeverandFacebook GitHub Bot 27723c70b7 Clean up prop diffing gen (#52436)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52436

Reordered the different property types in the switch/case to group similar outputs together.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D77799101

fbshipit-source-id: 5b7c6d188e9ffa0f1e41f44f82f438afeda04d74
2025-07-05 06:19:23 -07:00
generatedunixname89002005287564andFacebook GitHub Bot dcd430721f Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/reactperflogger/reactperflogger [A] (#52433)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52433

Reviewed By: cortinico

Differential Revision: D77789924

fbshipit-source-id: 017ab5456bf25f40cd4b283d0405498f6e1e2e00
2025-07-04 16:20:30 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 22ccf8a6f5 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/reactperflogger/reactperflogger [B] (#52435)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52435

Reviewed By: cortinico

Differential Revision: D77789998

fbshipit-source-id: 9ac93f890c9df245a105b71369dc91501deb78a4
2025-07-04 15:38:07 -07:00
Ruslan LesiutinandFacebook GitHub Bot c302902b1d upgrade[react-devtools]: 6.1.5 (#52440)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52440

# Changelog:
[General] [Changed] - Bumped React DevTools to 6.1.5

Reviewed By: huntie

Differential Revision: D77799615

fbshipit-source-id: aa010176f6378f6306e8a2a45fad7afe002a609c
2025-07-04 14:26:08 -07:00
Sam ZhouandFacebook GitHub Bot 0666885f6a Deploy 0.275.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77800436

fbshipit-source-id: ff5a6a629c950959678d6a6311cda053f6b5dd4c
2025-07-04 11:55:28 -07:00
Nicola CortiandFacebook GitHub Bot efdf73983c Deprecate the DefaultNewArchitectureEntryPoint.load(Boolean, Boolean, Boolean) (#52439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52439

Users should not be passing true/false values for the 3 params in the `load()` method. The app template already uses the no param overload.
I'm deprecating it so it can go in 0.81.

Changelog:
[Android] [Changed] - Deprecate the DefaultNewArchitectureEntryPoint.load(Boolean, Boolean, Boolean)

Reviewed By: rubennorte

Differential Revision: D77739268

fbshipit-source-id: c901d1ed2e9623b0fa39f4e2d79f25404c284b8d
2025-07-04 10:33:18 -07:00
Ruslan LesiutinandFacebook GitHub Bot 377baa2ef6 Update debugger-frontend from 35c4630...51a91a2
Summary:
Changelog: [Internal] - Update `react-native/debugger-frontend` from 35c4630...51a91a2

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/35c4630bd58bbcbc6f4c54c084b4e52994dc4940...51a91a2ad62e7f585912ed314a350a72de84d6ed).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [51a91a2ad](https://github.com/facebook/react-native-devtools-frontend/commit/51a91a2ad) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-07-04T14:04:02+01:00 | [bump: react-devtools@6.1.4 (#189)](https://github.com/facebook/react-native-devtools-frontend/commit/51a91a2ad) |
| [761b96907](https://github.com/facebook/react-native-devtools-frontend/commit/761b96907) | Vitali Zaidman (vzaidman@gmail.com) | 2025-07-04T12:55:39+01:00 | [fixed missing new line before string error causes (#186)](https://github.com/facebook/react-native-devtools-frontend/commit/761b96907) |
| [7774c38db](https://github.com/facebook/react-native-devtools-frontend/commit/7774c38db) | Alex Hunt (hello@alexhunt.dev) | 2025-06-30T13:20:49+01:00 | [Disable request initiator panel in NetworkItemView (#185)](https://github.com/facebook/react-native-devtools-frontend/commit/7774c38db) |

Reviewed By: huntie

Differential Revision: D77795834

fbshipit-source-id: 3c30f8e87593687415538902734b09b3144b70a4
2025-07-04 08:09:12 -07:00
Ruslan LesiutinandFacebook GitHub Bot c9e44fbcf2 upgrade[react-devtools]: 6.1.4 (#52426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52426

# Changelog:
[General] [Changed] - Bumped React DevTools to 6.1.4

Reviewed By: huntie

Differential Revision: D77794756

fbshipit-source-id: 4b8a795a809f5e72e8753d65435c97212e38dd8a
2025-07-04 08:09:12 -07:00
Alex HuntandFacebook GitHub Bot f753158da4 Add JS implementation for PerformanceResourceTiming (#52427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52427

Adds and wires up a minimal implementation of `PerformanceResourceTiming` on the JS side. This materialises D74245441 in user space.

When all feature flags are enabled, network requests can now be observed from JS via `PerformanceObserver`.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D75062713

fbshipit-source-id: 06523e70f57feaaa53432ef21fa92676d1e90360
2025-07-04 07:07:20 -07:00
Ian ChildsandFacebook GitHub Bot d2b55ad1ba Use build instead of targets in check-api.sh (#52424)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52424

This makes sure the output is actually materialized.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D77793365

fbshipit-source-id: 5505abd0f4c2994f4ced1c27a506d9199f9454ca
2025-07-04 06:17:14 -07:00
Alex HuntandFacebook GitHub Bot 962a7dda44 Expose unstable_TextAncestorContext API (#52368)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52368

Motivated by https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-13497461.

Also align naming for internal usages.

Changelog:
[General][Added] - Expose `unstable_TextAncestorContext` API

Reviewed By: NickGerleman

Differential Revision: D77141176

fbshipit-source-id: d9a57d923994188f5ce7e0608ea28fdca98db860
2025-07-04 06:09:38 -07:00
Samuel SuslaandFacebook GitHub Bot bc4bce61df remove uses of ShadowNode::Shared from ShadowNode.cpp (#52422)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52422

changelog: [internal]

In https://github.com/facebook/react-native/pull/52393 not all uses of ShadowNode::Shared were removed. Github CI fails if a deprecated API is used. Let's remove the last uses.

Reviewed By: cortinico

Differential Revision: D77790411

fbshipit-source-id: 6fbbbffaa784de1f0939d1032dc7ea6586f2ce7d
2025-07-04 04:49:12 -07:00
Mohamed SalamaandFacebook GitHub Bot b4dcc9831e Revert D77547628: Fix Dimensions window values on Android < 15
Differential Revision:
D77547628

Original commit changeset: 9d841f642d5b

Original Phabricator Diff: D77547628

fbshipit-source-id: 80ee528740eb4b39816e7873939d74e29d64caec
2025-07-04 04:19:27 -07:00
Nicola CortiandFacebook GitHub Bot 2d0aa1a747 Revert Refactor ViewManagerInterfaces codegen to generate kotlin classes
Summary:
reverting Refactor ViewManagerInterfaces codegen to generate kotlin classes because of warning in OSS, we will reland after 0.81 cut

Changelog: [Android][Breaking] - Revert of Migrate ViewManagerInterfaces to kotlin. Some types in code generated ViewManagerInterfaces might differ. e.g. this will start enforcing nullability in parameters of viewManagerInterface methods (e.g. String commands parameters are not nullable, view params are not nullable in any method, etc)

Reviewed By: lenaic, mlord93

Differential Revision: D77759777

fbshipit-source-id: c24b216b231cdc53296d8c9fca8d789d80daa596
2025-07-04 02:48:42 -07:00
Samuel SuslaandFacebook GitHub Bot 0e175ce5b6 Mark ShadowNode::Shared as deprecated and replace all usages (#52393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52393

## Changelog:
[General][Deprecated] - ShadowNode::Shared is now deprecated. Use `std::shared_ptr<const ShadowNode>` instead.

- Mark ShadowNode::Shared as deprecated in ShadowNode.h
- Replace all uses of ShadowNode::Shared with std::shared_ptr<const ShadowNode>.

This continues the systematic effort to remove ShadowNode type aliases in favor of explicit standard library types for improved code clarity and maintainability.

Reviewed By: christophpurrer

Differential Revision: D77650696

fbshipit-source-id: b4769e2a1e39f49d14d5927be105487ecf69fa3f
2025-07-04 00:29:54 -07:00
Christoph PurrerandFacebook GitHub Bot 2ce7eab5f9 Remove unused RAIICallbackWrapperDestroyer (#52390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52390

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77710424

fbshipit-source-id: 7c1d7e3181450394311a001af117c6fbdcaeba31
2025-07-03 16:44:16 -07:00
Nicola CortiandFacebook GitHub Bot ccb9edc717 Remove deprecated isStartSamplingProfilerOnInit from DeveloperSettings (#52405)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52405

This field has been deprecated since RN 0.77, we can safely remove it ahead of the branch cut.

Changelog:
[Android] [Removed] - Remove deprecated `isStartSamplingProfilerOnInit` from `DeveloperSettings`

Reviewed By: mdvacca, javache

Differential Revision: D77734913

fbshipit-source-id: 231ecb360921d48ec941a3a214e73b4b89446c13
2025-07-03 15:28:06 -07:00
Nicola CortiandFacebook GitHub Bot f2ecb7e42c Make loadWithFeatureFlags correctly internal (#52395)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52395

This method was exposed as `public` but there is no need for us to expose it in OSS.
So I'm marking it as internal.

Changelog:
[Internal] [Changed] - Make loadWithFeatureFlags correctly internal

Reviewed By: mlord93, mdvacca, javache

Differential Revision: D77734270

fbshipit-source-id: 34e1d7aaa4a5bf3563c78aad570e2310592bcc77
2025-07-03 15:17:38 -07:00
Christoph PurrerandFacebook GitHub Bot 47fe09f505 Make virtual destructors default implemented - instead of empty one (#52382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52382

Changelog: [Internal]

In C++, both `virtual ~CallInvoker() {}` and `virtual ~CallInvoker() = default` can be used to define a virtual destructor. However, they have slightly different implications:

1. `virtual ~CallInvoker() {}`:
    * This is the traditional way of defining a virtual destructor.
    * It provides an empty implementation for the destructor, which does nothing.
    * The compiler will not generate a default implementation, as you've provided one explicitly.
2. `virtual ~CallInvoker() = default`:
    * This is a more modern way of defining a virtual destructor (introduced in C++11).
    * It tells the compiler to generate a default implementation for the destructor.
    * The default implementation will perform the necessary cleanup operations, such as calling the destructors of base classes and member variables.

In general, `= default` is considered better because it:
* Avoids unnecessary code duplication: By letting the compiler generate the default implementation, you avoid duplicating code that's already generated by the compiler.
* Improves maintainability: If the class has member variables or base classes with non-trivial destructors, using `= default` ensures that the correct cleanup operations are performed without requiring manual updates.
* Conveys intent: Using `= default` clearly indicates that the destructor should perform its default behavior, making the code easier to understand.

So, unless you have a specific reason to provide a custom implementation, `virtual ~CallInvoker() = default` is generally the better choice.

Reviewed By: rshest

Differential Revision: D77685932

fbshipit-source-id: 78c81f8e400069ad38d8d7405dafeb0b6db8e67b
2025-07-03 13:32:28 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot c9f1778faf Implement accessibilityOrder by building the accessibilityTree through addChildrenForAccessibility (#52347)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52347

We can build an accessibility tree for Talkback by overriding addChildrenForAccessibility of ViewGroup.

With this we just manually build a tree that contains the elements we care about in the order we want.

We also try to keep most of the tree intact so that coopting works properly
Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D77258926

fbshipit-source-id: 767ebc880a2efbf7934b9e7dee3013dd7822e5ad
2025-07-03 12:56:35 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 5b245767d6 Remove Virtual View accessibilityOrder implementation (#52297)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52297

Doing virtual views is the only way of making it possible to add the host view into the order. This however is too complex for very little gain, we are opting to go for a cleaner solution with the trade off of not being able to add the host view.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D77278752

fbshipit-source-id: 709b995f51a9a03f6d07f2e24f8aea21d62d95c4
2025-07-03 12:56:35 -07:00
David VaccaandFacebook GitHub Bot 76ff1aa5c6 Refactor ViewManagerInterfaces codegen to generate kotlin classes (#51735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51735

This diff refactors the ViewManagerInterfaces codegen to generate kotlin classes,

As a consequence of this change, there are some ViewManagerInterfaces that have changed their APIs

## Changelog: [Android][Breaking] - Migrate ViewManagerInterfaces to kotlin. Some types in code generated ViewManagerInterfaces might differ. e.g. this will start enforcing nullability in parameters of viewManagerInterface methods (e.g. String commands parameters are not nullable, view params are not nullable in any method, etc)

Reviewed By: javache

Differential Revision: D75719542

fbshipit-source-id: 7e9aa7ccc24e827bd7b6df72b3302e852932e731
2025-07-03 12:19:42 -07:00
Christoph PurrerandFacebook GitHub Bot 253606239b CallInvoker > Remove unused includes (#52381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52381

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D77685836

fbshipit-source-id: a01aedf51463d228ca14d37dc4a0869e6e9208c9
2025-07-03 11:56:03 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3561791ff8 fix: rename bottom stack frame (#33680) (#52400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52400

`react-stack-bottom-frame` -> `react_stack_bottom_frame`.

This survives `babel/plugin-transform-function-name`, but now frames
will be displayed as `at Object.react_stack_bottom_frame (...)` in V8.
Checks that were relying on exact function name match were updated to
use either `.indexOf()` or `.includes()`

For backwards compatibility, both React DevTools and Flight Client will
look for both options. I am not so sure about the latter and if React
version is locked.

DiffTrain build for [91d097b2c588a0977a7a10ed12512dc8a34e3a5b](https://github.com/facebook/react/commit/91d097b2c588a0977a7a10ed12512dc8a34e3a5b)

Reviewed By: jackpope

Differential Revision: D77601866

fbshipit-source-id: 24ed8713af4bebbaeb7a612333cd79c51b696565
2025-07-03 11:38:05 -07:00
Mathieu ActhernoeneandFacebook GitHub Bot 85d10ed904 Fix Dimensions window values on Android < 15 (#47554)
Summary:
This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled.

Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15):

<img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" />

Using `WindowMetricsCalculator` from AndroidX:

<img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" />

Fixes https://github.com/facebook/react-native/issues/47080

## Changelog:

[Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled

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

Test Plan:
Run the example app on an Android < 15 device.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D77547628

Pulled By: alanleedev

fbshipit-source-id: 9d841f642d5b7ef3294dfbf3868137087a672ad6
2025-07-03 11:37:55 -07:00
Ruslan LesiutinandFacebook GitHub Bot facdc2f6f4 Support rename of React stack bottom frame (#52398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52398

# Changelog: [Internal]

Adaptation for https://github.com/facebook/react/pull/33680.

Reviewed By: jackpope

Differential Revision: D77737710

fbshipit-source-id: 6c6893935e8da8175c0cd9ceab21cc05e2092e7a
2025-07-03 09:34:58 -07:00
Enrique López MañasandFacebook GitHub Bot 477d8df312 Updated targetSdk to 36 (#52355)
Summary:
We need to upgrade the targetSdk to 36, which requires ensuring compatibility with the latest Android APIs and addressing any deprecations or behavior changes introduced in this version.

## Changelog:

[Android] [Changed] - Updated targetSdk to 36 in Android.

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

Test Plan:
- Verified that the app builds and runs successfully with targetSdkVersion 36.

- Ran the full suite of unit and instrumentation tests: all tests passed.

- Manually tested key user flows (login, navigation, data sync) on devices running Android 14 (API 34) and emulator with API 36

- Confirmed that there are no runtime crashes or warnings related to `targetSDK` upgrade.

Behavioral guide for migration: https://developer.android.com/about/versions/16/behavior-changes-16

Reviewed By: fabriziocucci

Differential Revision: D77728391

Pulled By: cortinico

fbshipit-source-id: 3f714f900bbeecc56c0cf46c54b4e42c532c8384
2025-07-03 08:01:47 -07:00
Nicola CortiandFacebook GitHub Bot 2e724e4743 Add changelog for 0.80.1 (#52392)
Summary:
Just the changelog for 0.80.1

## Changelog:

[INTERNAL] - Add changelog for 0.80.1

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D77725130

Pulled By: cortinico

fbshipit-source-id: 2eddb56e8893e0d8e71a6509b1303b3b9cab8769
2025-07-03 06:57:20 -07:00
Alex HuntandFacebook GitHub Bot f4a9aa3525 Implement connectionTiming and dataReceived NetworkReporter methods (#52335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52335

Adds support for `Network.requestWillBeSentExtraInfo` and `Network.dataReceived` CDP events in jsinspector-modern and wires up for iOS.

In particular, `Network.requestWillBeSentExtraInfo` is necessary to populate request headers in the UI.

**End of base Network implementation for iOS**

After this diff, we are spec-complete on all CDP Network methods for our V1, on iOS.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77489476

fbshipit-source-id: 84aa4da9d9fcbdc61eff236fc6bd2136496910a5
2025-07-03 05:01:57 -07:00
Alex HuntandFacebook GitHub Bot ebb831a0c9 Implement Network.loadingFailed (#52334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52334

Adds support for `Network.loadingFailed` in jsinspector-modern and wires up for iOS.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77489477

fbshipit-source-id: dc8156979fe49583819019fa4b88b6eb99dea734
2025-07-03 05:01:57 -07:00
Alex HuntandFacebook GitHub Bot 68342a4d12 Support CDP response previews for chunked data (#52331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52331

Updates the iOS inputs to `NetworkReporter` to support incremental string data HTTP responses (`Transfer-Encoding: chunked`).

This means that incremental responses, such as Metro bundle requests, can be displayed as previews in React Native DevTools.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77457109

fbshipit-source-id: 00a622dbac97c38e07c67b5ee3661c8d586f6fe1
2025-07-03 05:01:57 -07:00
Alex HuntandFacebook GitHub Bot 94c97db4da Implement Network.getResponseBody (#52332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52332

Adds support for the [`Network.getResponseBody`](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody) CDP event in `jsinspector-modern` and configures this for iOS. This enables us to populate the "Preview" and "Response" tabs in the React Native DevTools Network panel.

This is integrated with `RCTNetworking.mm` to support synchronously received `text` or `blob` data types, with incremental response support added next in D77457109.

**Implementation notes**

- Adds a new `BoundedRequestBuffer` construct to safely buffer response previews at a max memory size.
- `RCTNetworking` will always call `maybeStoreResponseBody` (when feature flag enabled), but is unaware whether there is an active CDP debugging session with network support or not.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74319394

fbshipit-source-id: c9dbb44551c15d1b1a7cce56b35bf829f8a99dc7
2025-07-03 05:01:57 -07:00
Eric RozellandFacebook GitHub Bot 9253fc3b42 Defer focus cell render mask updates (#52380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52380

Apps that rely support focus in FlatList rendered items are missing out on a FlatList optimization that defers rendering for offscreen content updates.

For example, on Android, if you focus and smooth scroll an item into view, the onScroll event will fire first. For most sufficiently large virtualization windows, the next render will be delayed by the render batch timeout as most materialization of virtualized views is not treated as a high pri render.

However, this batch / timeout mechanism isn't being used for cell render updates that occur as a result of a focus change.

This change adds the same timeout mechanism used for scroll events. In most cases, the view that is focused is in the viewport, and the extra rendering needed is already scheduled (or executed with high priority if needed) when the onScroll event is processed.

In cases where the focus change occurs outside the viewport, most platforms will want to do some kind of "bring into view" anyway, and the same applies - onScroll will take care of scheduling the cell rendering priority.

## Changelog

[Internal]

Reviewed By: NickGerleman

Differential Revision: D77681274

fbshipit-source-id: 1ade377e513eca21338a380ff9299dd410606aec
2025-07-03 04:15:41 -07:00
Nicola CortiandFacebook GitHub Bot 45fd7feb9f Convert UIManagerModuleConstantsHelper to Kotlin (#52358)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52358

Another class going from Java to Kotlin.
This is quite involved due to the amount of Raw generics we were using so I'd appreaciate a couple of further eyes here.

Changelog:
[Android] [Changed] - Convert UIManagerModuleConstantsHelper to Kotlin

Reviewed By: mdvacca, javache

Differential Revision: D77589975

fbshipit-source-id: 477c1e2a8dfd31db60047fd1252f6d47c177f5c7
2025-07-03 02:52:01 -07:00
Nicola CortiandFacebook GitHub Bot 6cb8dc37c7 RNGP - Add support for exclusiveEnterpriseRepository (#52378)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52378

This adds a Gradle property called `exclusiveEnterpriseRepository`
that users can set in their `android/gradle.properties` as such:

```diff
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true

+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
```

This will remove all the existing Maven repositories and only use the internal mirror they have.

Changelog:
[Android] [Added] - RNGP - Add support for `exclusiveEnterpriseRepository` to specify an internal Maven mirror.

Reviewed By: mdvacca

Differential Revision: D77667573

fbshipit-source-id: 835004d2ae7aa4e250b6f7a88a41918b573f5bd5
2025-07-03 02:27:08 -07:00
Joe VilchesandFacebook GitHub Bot cec0de8f99 Change Scroller getter to protected (#52387)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52387

I would like to grab this in a subclass but unfortunately can't. It is kinda jank since this is a val obtained via reflection, but I figure this is better than copy and paste. I think that I could also expose a function that uses this scroller the way I want it to. Let me know if there are strong objections here

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D77684599

fbshipit-source-id: 6f02c1da5135c1cf34fa1483542e06bf8f0be75e
2025-07-02 22:13:16 -07:00
nishan (o^▽^o)andFacebook GitHub Bot 097d482446 fix(ios): Correct gradient interpolation for when transitioning to transparent color (#52249)
Summary:
This change fixes an issue on iOS where gradients that fade to a transparent color-stop appear dark or "muddy." The fix ensures that the color's hue is preserved during the transition, matching the behavior on Android and web.

### The Problem
When creating a gradient on iOS (e.g., linear-gradient(red, transparent)), the transparent keyword is treated as transparent black (rgba(0,0,0,0)). The `CAGradientLayer` on iOS then interpolates all color channels linearly, causing the red, green, and blue components of the start color to fade to 0. This transition through black results in an undesirable dark or "muddy" appearance in the middle of the gradient.

## Changelog:
[IOS][FIXED] - Gradient interpolation for transparent colors
<!-- 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/52249

Test Plan:
Checkout `LinearGradient` example in RNTester, checkout the newly added transparent color transition example, it should render same on android and iOS.

| Before | After |
| --- | --- |
| <img src="https://github.com/user-attachments/assets/c0bb54ad-ed0e-4a80-b37f-0458af0f1f77" width="300"> | <img src="https://github.com/user-attachments/assets/02da921a-bd0e-45c1-881c-cf6460d5ed43" width="300"> |
| `linear-gradient(to right, red, transparent)` transitions to black on iOS, creating a dark effect. | The gradient correctly fades the red color's alpha channel to zero |

Reviewed By: javache

Differential Revision: D77312194

Pulled By: NickGerleman

fbshipit-source-id: 053df8e44f52cd22a3f28fd01f583f7d03c66af5
2025-07-02 17:55:45 -07:00
Nick GerlemanandFacebook GitHub Bot 508b1526d9 Avoid array copies on every MapBuffer read (#52386)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52386

Enum `values()` function makes a copy of an underlying array on each call. This happens in a hot path, and seems to show up during profiling. Let's cache it.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D77623705

fbshipit-source-id: 5a33425822f477f63fe104ca9e5ed474385a2022
2025-07-02 17:26:48 -07:00
Nick GerlemanandFacebook GitHub Bot 0d455f3272 buildSpannableFromFragmentsOptimized (#52385)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52385

This replaces `buildSpannableFromFragmentsOptimized()` with a more optimized version. There are a couple main changes.

1. We don't need a complicated structure around ordering, and span priority, that made its way from the Java ShadowNode logic. AttributedString already ensures there are no overlapping attributes per fragment.
2. `SpannableStringBuilder` is a complicated text-editor style data structure, optimized to allow text content to be modified, and spans re-applied. We can use a much lighter `SpannableString`, on top of the ahead-of-time known text content, which is faster, and saves around 500 bytes per string (and prepared layout). If we assign this to an `EditText`, which later gets edited, Android will copy it to a `SpannableStringBuilder`.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D77622848

fbshipit-source-id: 69bbac86e1f0fd4a15dab6bc279cca305f2a53ae
2025-07-02 17:26:48 -07:00
Nick GerlemanandFacebook GitHub Bot a4b0d64395 ReactNativeFeatureFlags.enableAndroidTextMeasurementOptimizations() (#52384)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52384

Adds the feature flag, controlling multiple optimizations up the stack.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D77622983

fbshipit-source-id: 16500e8557d36db627c62faa511eeb4c73dc7484
2025-07-02 17:26:48 -07:00
Nolan O'BrienandFacebook GitHub Bot 22b8b53c77 Fix exhaustive switches (#52383)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52383

Changelog: [General][Fixed] - Add `default:` case to avoid warnings/errors for targets that compile with `-Wswitch-enum` and `-Wswitch-default` enabled

Reviewed By: aary

Differential Revision: D77051150

fbshipit-source-id: a4f18bb7e47f027fd64cc42bacd7246263ef2454
2025-07-02 16:56:07 -07:00
Nolan O'BrienandFacebook GitHub Bot 9079b53c6f Fix exhaustive switches (#52379)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52379

Changelog: [General][Fixed] - Add `default:` case to avoid warnings/errors for targets that compile with `-Wswitch-enum` and `-Wswitch-default` enabled

Reviewed By: aary, yungsters, astreet

Differential Revision: D77051152

fbshipit-source-id: 100b10f97cb3a5d73f1e3dcaf1b284baf6a43982
2025-07-02 14:21:18 -07:00
Nick LefeverandFacebook GitHub Bot da23346c7e Fix UNDEFINED YGValue serialization (#52376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52376

Correct the expected serialization based on the YogaValue parse implementation:
https://www.internalfb.com/code/fbsource/[ecdf90fe69d0]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaValue.java?lines=66-68

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77663413

fbshipit-source-id: e8b6091a5d57c6d0301411371c290a867c9b5224
2025-07-02 10:07:01 -07:00
Christoph PurrerandFacebook GitHub Bot ceb5f1dedb Remove unused SharedAttributedString alias (#52362)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52362

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77630091

fbshipit-source-id: df297bc5150416b6ddf719addc3ae926e3b39f48
2025-07-02 08:34:21 -07:00
Fabrizio CucciandFacebook GitHub Bot faa8c7b8a1 Keep changelog references for previous versions in CHANGELOG (#52372)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52372

This is just a follow-up on top D77025333 to make sure that the links in the blog posts and the GitHub releases keep working.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77654056

fbshipit-source-id: a1c6df44ebee058dd5b59e5b6a60c7c1e060e52c
2025-07-02 06:34:06 -07:00
Nicola CortiandFacebook GitHub Bot e20bb56f3b Bump Gradle to 8.14.2 (#52370)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52370

This is just a patch bump of Gradle ahead of the 0.81 branch cut.

Changelog:
[Android] [Changed] - Bump Gradle to 8.14.2

Reviewed By: fabriziocucci

Differential Revision: D77601121

fbshipit-source-id: b2fdc8b022f2ab43997f412c77e0c924c01f1a5d
2025-07-02 04:36:22 -07:00
Alex HuntandFacebook GitHub Bot 4274d6f7c7 Tweak RNTester status bar on Android (#52369)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52369

Tiny fix where the system status bar elements were no longer visible under Android edge-to-edge.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77653633

fbshipit-source-id: 1275a0de6665a6ef4599166fb205865cd581bb41
2025-07-02 04:34:10 -07:00
Nicola CortiandFacebook GitHub Bot b578a70bd5 Bump packages for next release (#52359)
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
2025-07-02 03:53:34 -07:00
Moti ZilbermanandFacebook GitHub Bot bf51035e04 Scaffolding for custom RNDT shell binary (#52357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52357

Changelog: [Internal]

Adds a hyper-minimal build script using `electron/packager` that produces custom binaries for the experimental React Native DevTools standalone shell. The main user-facing benefit of this is replacing the Electron name and icon with our own branding.

NOTE: `electron/packager` is designed to include the application code in the resulting binary. This is arguably overkill for us - the current launch model of `electron src/electron/index.js` is actually wholly sufficient for what we need - but I decided to go with the grain of the available tooling for simplicity.

Icon design courtesy of huntie. 🙏

Reviewed By: huntie

Differential Revision: D77591742

fbshipit-source-id: a968465df4f54fba54c874b6300788e151600ed7
2025-07-02 03:48:51 -07:00
Moti ZilbermanandFacebook GitHub Bot 2d68a733f8 Fix run-ci-javascript-tests script (#52364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52364

Changelog: [Internal]

D76512374 broke error reporting in `run-ci-javascript-tests.js`. This is partly because the file was untyped and we missed that the `.code` check on the result of `execSync` was always going to be falsy. Also, `execSync`'s default error handling mechanism is not human-friendly - it throws an `Error` with `Buffer`s for stdout and stderr (see [example](https://github.com/facebook/react-native/actions/runs/16003656383/job/45144825919?pr=52357&fbclid=IwY2xjawLRyfpleHRuA2FlbQIxMQBicmlkETFZSG1xeWhTWWczR1paS0lKAR4pF46Z-J2CbSk7YdHZJ-N3F9eQJ7hR4EowfLV6mUtzMLg8j-EWdZiGY1la6A_aem_1Zbvn6fD5NS9YO-B7QJssg)).

Here, I'm adding types, removing dead code and preserving stdout and stderr from all child processes in a human-readable format.

Reviewed By: huntie

Differential Revision: D77648312

fbshipit-source-id: c6d98e668d6edf15729fa02fecb3408b9dd6debc
2025-07-02 03:09:18 -07:00
Fabrizio CucciandFacebook GitHub Bot 326467c856 Add changelog entry for 0.79.5 (#52367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52367

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77652098

fbshipit-source-id: c9ab8c7549e1f50b2e3ca7a1c7de6ec321926ee6
2025-07-02 02:52:12 -07:00
Dawid MałeckiandFacebook GitHub Bot c1168cf919 Fix deep react native imports eslint rule (#52365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52365

Adds type imports autofix support and pass `fb_internal` paths in react native deep imports eslint rule. The rule fixes imports with all matched types with static API mapping to prevent splits.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D77445445

fbshipit-source-id: cd5b75b4b3b53792117b8297352dddc4d63dbf70
2025-07-02 02:13:31 -07:00
Samuel SuslaandFacebook GitHub Bot 2a6b55f0b1 put optimisation for VirtualView on iOS behind a flag (#52345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52345

changelog: [internal]

I would like to measure impact of D76597973 to get a better understanding of UIKit's rendering.

Reviewed By: yungsters

Differential Revision: D77542666

fbshipit-source-id: 4c2de4f36d2b374d83df934dd3a98d01b24f487f
2025-07-02 01:46:25 -07:00
Dawid MałeckiandFacebook GitHub Bot b41b924b2d Add diff-api-snapshot action to danger (#52045)
Summary:
This PR connects breaking change detection with a danger bot. The action takes snapshot from main branch and from the PR as inputs to`diff-api-snapshot` (saved in runner temp directory).

## Changelog:
[Internal]

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

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

Reviewed By: huntie

Differential Revision: D76735630

Pulled By: coado

fbshipit-source-id: 9208117340c1e0bf10d58b67892727717d22e62f
2025-07-01 08:58:15 -07:00
Dawid MałeckiandFacebook GitHub Bot 71f2f05f03 Align breaking change detection with new snapshot format (#52353)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52353

This diff aligns breaking change detection script with new snapshot format. It compares hashes to determine if the API changed for each specifier.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D77377762

fbshipit-source-id: e1c69692ace389fb08ae9470b9f9631e53834206
2025-07-01 08:58:15 -07:00
Dawid MałeckiandFacebook GitHub Bot 1c7b04db4a Delete public-api-test (#52342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52342

This diff deletes `public-api-test` for detecting changes in public API. It is replaced with public API snapshot validation (in D76340729) for better detection and understanding of changes that influence external interfaces.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D77531763

fbshipit-source-id: a8ef2b6f52fa6efb5b312598ea3e4746fc51e4ec
2025-07-01 08:58:15 -07:00
Dawid MałeckiandFacebook GitHub Bot 128f5eb9ac Validate RN JS API snapshot on CI (#52352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52352

This diff adds excution of `yarn build-types --validate` to run RN JS API snapshot validation on CI.

### Motivation

Detect react-native public API changes before they land.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76340729

fbshipit-source-id: 10c465418e0ba4eb05cf557a16119f9756843d9e
2025-07-01 08:58:15 -07:00
Dawid MałeckiandFacebook GitHub Bot 8f9bca5f74 Initial commit of ReactNativeApi.d.ts (#52343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52343

This diff commits our V2 JavaScript API snapshot for React Native.

This is a new format and workflow that replaces the previous `public-api-test` Jest test.

Please look at the file header for up-to-date instructions on updating the API snapshot.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77532617

fbshipit-source-id: d5faae815aa5071b0f472fcb02318b73772b11cf
2025-07-01 08:58:15 -07:00
David VaccaandFacebook GitHub Bot dcbbf275cb Reintroduce CppPropsIteratorSetter for Yoga Styles (#52351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52351

Reintroduce CppPropsIteratorSetter for Yoga Styles

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D77563504

fbshipit-source-id: 969c78e267db3e97ea567ad948489b5991c88678
2025-07-01 07:16:19 -07:00
Tim YungandFacebook GitHub Bot da520848c9 RN: Always Flatten Animated Styles (#52268)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52268

Ships the feature flag introduced in https://github.com/facebook/react-native/pull/51719 to fix crahes that result from shadowed animated style values.

Changelog:
[General][Changed] - Animated now always flattens `props.style`, which fixes an error that results from `props.style` objects in which `AnimatedNode` instances are shadowed (i.e. flattened to not exist in the resulting `props.style` object).

Reviewed By: javache

Differential Revision: D77314904

fbshipit-source-id: b442d0256aee7a8925e28c7e87aee5e0a3f39425
2025-07-01 07:07:33 -07:00
Pieter De BaetsandFacebook GitHub Bot ce306aca34 Remove redundant check for NativeReactNativeFeatureFlags (#52354)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52354

These should no longer be needed as `ReactNativeFeatureFlags` handles the missing native module gracefully.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D77365271

fbshipit-source-id: 92c6789b2175f24c79838118f681107a43c9ff0a
2025-07-01 03:49:58 -07:00
Nick GerlemanandFacebook GitHub Bot 5cc4d0a086 Reland Fix possible invalid measurements when width or height is zero pixels (#52348)
Summary:
X-link: https://github.com/facebook/yoga/pull/1823

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

Fixes https://github.com/facebook/yoga/issues/1819

Yoga has a fast path when measuring a node, if it thinks it knows its dimensions ahead of time.

This path has some eroneous logic, to set both axis to owner size, if *either* will evaluate to zero, while having an `YGMeasureModeAtMost`/`FitContent` constraint. This means that if a node is given a zero width, and Yoga later measures with with `FitContent`, its height will become the maximum allowable height, even if it shouldn't be that large.

We can fix this, by only allowing if both axis are this fixed case, instead of just one.

This bug has existed for about a decade (going back to at least D3312496).

Changelog:
[General][Fixed] - Fix possible invalid measurements with width or height is zero pixels

Reviewed By: yungsters

Differential Revision: D76851589

fbshipit-source-id: 6f5a0e6beccc51f591726c9e83e9b90f3350ed0f
2025-06-30 20:46:39 -07:00
Jack PopeandFacebook GitHub Bot 3eeda07a69 Align AttributeConfiguration type in ReactNativeTypes (#33671)
Summary: DiffTrain build for [1e0d12b6f273d7345e32c16cd937475ed7c512ad](https://github.com/facebook/react/commit/1e0d12b6f273d7345e32c16cd937475ed7c512ad)

Reviewed By: kassens

Differential Revision: D77541776

fbshipit-source-id: ef9a99bfc7f16feee1d27685de62a970305f8e5a
2025-06-30 17:19:32 -07:00
Mateo GuzmánandFacebook GitHub Bot 7d01060a8b Kotlin: fix static code analysis weak warnings (6/n) (#52338)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Accessor call that can be replaced with property access syntax](https://www.jetbrains.com/help/inspectopedia/UsePropertyAccessSyntax.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (6/n)

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

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

Reviewed By: NickGerleman

Differential Revision: D77504913

Pulled By: cortinico

fbshipit-source-id: 62661ba6adafb7893ce27811357020966d5ea4c1
2025-06-30 15:54:57 -07:00
Pieter De BaetsandFacebook GitHub Bot 69e4252ccb Fix access to observers outside lock in ImageResponseObserverCoordinator (#52346)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52346

This is bypassing the mutex, and potentially not thread-safe.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D77541041

fbshipit-source-id: f97415d066786864806836768dbce2d5e68487ef
2025-06-30 13:22:36 -07:00
Ruslan LesiutinandFacebook GitHub Bot 69a55d7b76 Console: prioritize original console.timeStamp implementation (#52319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52319

# Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D77315831

fbshipit-source-id: b4d7fd9c816dcb4b76cc7d026f509a6a24da58f8
2025-06-30 12:55:28 -07:00
Ruslan LesiutinandFacebook GitHub Bot 5340a00ac0 Define isProfiling option when Fusebox is used in Production mode (#52320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52320

# Changelog [Internal]

We are gating `__RCTProfileIsProfiling` global definition under this `isProfiling` option - [1].

Reviewed By: vzaidman

Differential Revision: D77315833

fbshipit-source-id: f71175a573aa6d77c16a657475c59820f9830aa6
2025-06-30 12:55:28 -07:00
generatedunixname89002005287564andFacebook GitHub Bot b8b79a3fc1 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon (#52344)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52344

Reviewed By: javache

Differential Revision: D77526780

fbshipit-source-id: 6ec8cac95cd0cf9bfc29c57b7ad85fb5e9ab65cb
2025-06-30 12:22:37 -07:00
Nicola CortiandFacebook GitHub Bot c4325c335b Fix broken Modal OSS E2E test due to createNewDialog setter (#52341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52341

The setter for `createNewDialog` is now wrong (after D76834213).
If the `createNewDialog` has been set to `true` by any other field, we should respect it and not set it to true/false regardless
(only considering the `isEdgeToEdgeFeatureFlagOn`) property.

This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D77539533

fbshipit-source-id: a1deaf1f1b856895304e8b73fa5d0c0367e677af
2025-06-30 10:16:55 -07:00
Mateo GuzmánandFacebook GitHub Bot 73e513280d Kotlin: fix static code analysis weak warnings (5/n) (#52337)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Unnecessary type argument](https://www.jetbrains.com/help/inspectopedia/RemoveExplicitTypeArguments.html)
- [Variable declaration could be moved inside 'when'](https://www.jetbrains.com/help/inspectopedia/MoveVariableDeclarationIntoWhen.html)
- [Assignment can be replaced with operator assignment](https://www.jetbrains.com/help/inspectopedia/AssignmentReplaceableWithOperatorAssignment.html)
- [Negated call can be simplified](https://www.jetbrains.com/help/inspectopedia/SimplifyNegatedBinaryExpression.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (5/n)

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

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

Reviewed By: cortinico

Differential Revision: D77525702

Pulled By: rshest

fbshipit-source-id: b0bd2e7616340c22b22e7f58387c53c51cbf073e
2025-06-30 03:38:26 -07:00
George ZaharievandFacebook GitHub Bot 9a2c422b80 Deploy 0.274.2 to xplat (#52329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52329

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D77485965

fbshipit-source-id: 6a0b1a85696335a796133e665f41034e00d47ea3
2025-06-28 12:23:25 -07:00
George ZaharievandFacebook GitHub Bot 2e6cf96e47 Update hermes-parser and related packages in xplat/arvr/socialvr to 0.29.1 (#52316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52316

Bump hermes-parser and related packages to [0.29.1](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D77431991

fbshipit-source-id: d0ab4d7a338fdb68a529ed8151c7e1924600a809
2025-06-27 21:48:28 -07:00
Joe VilchesandFacebook GitHub Bot 132c2cdf12 Fix keyboard navigation if snapToAlignment is set
Summary:
There is an issue with keyboard navigation if some scroll view sets `snapToAlignment`. In this case, we are unable to find potential focus candidates if clipping is enabled since this prop will make it so that certain views in the hierarchy under the scroll view form a native view without any traits being set. The fix we have in place currently relies on `FormsStackingContext` to be set to discover potential candidates so it will break in this case. To fix this, we just return the entire ancestor list, since native will know how to deal with the cases that are not actual views, and in general has the official knowledge of what can be in the hierarchy or not.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D77467933

fbshipit-source-id: 35daaba06347c738cf7a85eef86adb7944a9cb26
2025-06-27 18:02:06 -07:00
Nick GerlemanandFacebook GitHub Bot 2d1db71bc0 Add global cache for Facsimile Layouts (#52308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52308

Experimentation shows, that we very heavily rely on the global text cache for performance (not sure how much of this is invalidation, vs repeated text, or revisiting previous surfaces).

This adds a global LRU cache, of prepared layouts, given a specific AttributedString and constraints. This is similar to the existing cache, with the caveat, that we need to have separate entries for any display states, instead of just those that effect metrics.

I sized it at 200 elements for now, since an Android `Layout` is much heavier than a `Size` (in practice, each seem to weight 1-3KB (though this will be significantly reduced with future change to move from `SpannableStringBuilder` to `SpannableString` and also contributes to the global JNI ref table, but set this up to be customizable via flag, so we can experiment, on perf impact, vs memory.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D77341994

fbshipit-source-id: b453250dc475f6a281a3260b876bf80f301dd5dd
2025-06-27 14:37:33 -07:00
Soe LynnandFacebook GitHub Bot d96bbcdf0c Back out "Back out "Adding shouldForwardToReactInstance check in ReactDelegate for Bridgeless"" (#52323)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52323

Original commit changeset: b144ca6db6f7

Original Phabricator Diff: D77388413

Reverting the revert since it did not fix our javascript crash problem for v270 https://fburl.com/scuba/errorreporting_system_vros_javascripterrors/mtexik9e

Original diff stack: D76908041
Revert diff stack: D77388940

Changelog[Internal]:
Puting back the Kotlin Migration for ReactDelegate file

Reviewed By: cortinico

Differential Revision: D77448293

fbshipit-source-id: ed40836c3ecb4ca551b23cb64de2c34cfda0dea1
2025-06-27 11:55:44 -07:00
Soe LynnandFacebook GitHub Bot faef2b1252 Back out "Back out "[react-native][PR] Migrate ReactDelegate to Kotlin"" (#52322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52322

Original commit changeset: 4a366205ea9c

Original Phabricator Diff: D77388940

Reverting the revert since it did not fix our javascript crash problem for v270 https://fburl.com/scuba/errorreporting_system_vros_javascripterrors/mtexik9e

Original diff stack: D76908041
Revert diff stack: D77388940

Changelog[Internal]:
Puting back the Kotlin Migration for ReactDelegate file

Reviewed By: cortinico

Differential Revision: D77448238

fbshipit-source-id: f41faa19f6761b7ed644e804019f5ec4738326a7
2025-06-27 11:55:44 -07:00
Andrew DatsenkoandFacebook GitHub Bot ee02152fee Fix non standard hermes config internally (#52321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52321

Changelog: [Internal]
Allow non standard hermes internally.

Reviewed By: lenaic, rubennorte

Differential Revision: D77446774

fbshipit-source-id: 09919c8216932e15b2938d3e99b3df5d53e11c92
2025-06-27 09:47:34 -07:00
Vitali ZaidmanandFacebook GitHub Bot d5cd6ed152 Update debugger-frontend from d95ac13...35c4630 (#52317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52317

Changelog: [Internal] - Update `react-native/debugger-frontend` from d95ac13...35c4630

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/d95ac13bf0ab64a5e6c2eb18eb138587063b9c34...35c4630bd58bbcbc6f4c54c084b4e52994dc4940).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [35c4630bd](https://github.com/facebook/react-native-devtools-frontend/commit/35c4630bd) | Vitali Zaidman (vzaidman@gmail.com) | 2025-06-26T09:47:45+01:00 | [track stack trace symbolication failures (#183)](https://github.com/facebook/react-native-devtools-frontend/commit/35c4630bd) |
| [e4487ef2e](https://github.com/facebook/react-native-devtools-frontend/commit/e4487ef2e) | Vitali Zaidman (vzaidman@gmail.com) | 2025-06-24T14:29:35+01:00 | [support symbolication with native frames (#181)](https://github.com/facebook/react-native-devtools-frontend/commit/e4487ef2e) |

Reviewed By: huntie

Differential Revision: D77437936

fbshipit-source-id: 5b64195064aa5e157ae1adad01a3f2dc94045f98
2025-06-27 07:57:58 -07:00
Jakub PiaseckiandFacebook GitHub Bot 55d8581584 Cover versionExportedApis transform with tests (#52311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52311

Changelog: [Internal]

Adds test coverage for `versionExportedApis` transform

Reviewed By: huntie

Differential Revision: D77427733

fbshipit-source-id: 7bc6279602ce6a4194930fdaf0eb790c88425cd5
2025-06-27 07:00:39 -07:00
Jakub PiaseckiandFacebook GitHub Bot 5723de58b8 Explicitly cover more node types in versionExportedApis (#52310)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52310

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77427734

fbshipit-source-id: d9b8caee508166b2d47d5a160b0e326c4cd7783e
2025-06-27 07:00:39 -07:00
Mathieu ActhernoeneandFacebook GitHub Bot 09ef774ff6 Add edge-to-edge opt-in support (#52088)
Summary:
This follows https://github.com/facebook/react-native/pull/47554

Compared to the initial proposal, I had to remove the `edgeToEdgeEnabled` property from the root `gradle.properties` and put it in the app `gradle.properties` instead (explaining the `AgpConfiguratorUtils.kt` / `GenerateEntryPointTask.kt` / `ProjectUtils.kt` / `PropertyUtils.kt` changes)

This PR:
- Enable edge-to-edge for `MainActivity` (when `edgeToEdgeEnabled` is set to `true`)
- Disable `StatusBar` `backgroundColor` and `translucent` (when `edgeToEdgeEnabled` is set to `true`)
- Enforce `statusBarTranslucent` and `navigationBarTranslucent` on `Modal` when edge-to-edge is enabled
- Add an `isEdgeToEdge` constant to `DeviceInfoModule` for [`react-native-is-edge-to-edge`](https://github.com/zoontek/react-native-edge-to-edge/tree/main/react-native-is-edge-to-edge) detection

## 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
-->

- [Android] [Added] - Add edge-to-edge opt-in support

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

Test Plan:
- Update `enableEdgeToEdge` value in `packages/rn-tester/android/app/gradle.properties`
- Recompile

https://github.com/user-attachments/assets/4c6beb98-fa88-427c-b62d-a42ffe5330f0

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76834213

Pulled By: alanleedev

fbshipit-source-id: c39b2cff1a5e94e31306e3b35651aa2de83d2fe6
2025-06-27 06:16:23 -07:00
Nicola CortiandFacebook GitHub Bot 78c9671c24 Migrate ThemedReactContext to Kotlin (#52309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52309

This is another class going from Java to Kotlin.
Thish should have no breaking changes, but I'll keep an eye to see if this is disruptive for users in the ecosystem.

I also haven't removed any of the Deprecated method, which can be cleaned up afterwards.

Changelog:
[Android] [Changed] - Migrate ThemedReactContext to Kotlin

Reviewed By: javache

Differential Revision: D77374236

fbshipit-source-id: d1787b21897b01c45bbf841fdda00972e0be58db
2025-06-27 05:00:05 -07:00
Alex HuntandFacebook GitHub Bot d4bf1b7af0 Remove experimental notice from V2 API snapshot and build by default (#52301)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52301

Readying for imminent productionisation.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77386064

fbshipit-source-id: 2769545eace4e6c09da0b2f0f34cf74b2fdcb730
2025-06-27 04:49:28 -07:00
generatedunixname89002005287564andFacebook GitHub Bot a0d4e18020 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/hermes/instrumentation (#52285)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52285

Reviewed By: cortinico

Differential Revision: D77359122

fbshipit-source-id: ad425cdfecf57210ae79a8bad25fde4896b476c1
2025-06-27 01:20:27 -07:00
Soe LynnandFacebook GitHub Bot fbd8281ab2 Back out "Migrate ReactDelegate to Kotlin" (#52304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52304

Investigating javascript crash regression between Store APK v269 and v270 T228736366 with mid https://www.internalfb.com/logview/system_vros_javascripterrors/4a0131b8b79e3994b639c7ca212db717?ds=%7B%22start%22%3A%221750796919%22%2C%22constraints%22%3A[]%2C%22end%22%3A%22now%22%7D&ds_nux_type=task

We suspect that this diff stack may be causing the issue could be caused by this Kotlin migration diff stack D76908041

Changelog: [Internal]
Reverting Kotlin migration for `ReactDelegate`

Reviewed By: gorodscy, mullender

Differential Revision: D77388940

fbshipit-source-id: 4a366205ea9c515a1561a4624b8d29e81ab9bae9
2025-06-26 14:44:36 -07:00
Soe LynnandFacebook GitHub Bot c360251b4a Back out "Adding shouldForwardToReactInstance check in ReactDelegate for Bridgeless" (#52303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52303

Investigating javascript crash regression between Store APK v269 and v270 T228736366 with mid https://www.internalfb.com/logview/system_vros_javascripterrors/4a0131b8b79e3994b639c7ca212db717?ds=%7B%22start%22%3A%221750796919%22%2C%22constraints%22%3A[]%2C%22end%22%3A%22now%22%7D&ds_nux_type=task

We suspect that this diff stack may be causing the issue could be caused by this Kotlin migration diff stack D76908041

Changelog: [Internal]
Reverting Kotlin migration for ReactDelegate

Reviewed By: mullender

Differential Revision: D77388413

fbshipit-source-id: b144ca6db6f75614c7988e474ef89f19714a4a09
2025-06-26 14:44:36 -07:00
Zeya PengandFacebook GitHub Bot 793023a4e2 Fewer calls to direct manipulation callback (#52296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52296

## Changelog:

[Internal] [Changed] - Fewer calls to direct manipulation callback

`NativeAnimatedNodesManager::onRender` is supposed to run each frame for c++ animation, from the callstack sample trace, the vast majority of time is spent on `updateNodes` (run update on all AnimatedNodes) and `commitProps` (where either Fabric ShadowTree commit or direct manipulation is called). Change in this PR is supposed to reduce time spent in `commitProps`

{F1979788964}

Reviewed By: sammy-SC

Differential Revision: D77380842

fbshipit-source-id: 2f25ca1fba4171a7b3e485298738379d0daff3ad
2025-06-26 14:17:27 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ffd6e5537d Remove RCTPushNotificationManager from umbrella header (#52306)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52306

The RCTPushNotificationManager is deprecated and not part of the prebuilds as it is optional.
We mistakenly added it to the umbrella header and nightlies do not work with prebuilds.

This change removes the header ad should fix the build.

## Changelog:
[Internal] -

Reviewed By: philIip

Differential Revision: D77395754

fbshipit-source-id: 66371650dc56f5be16a00319d9e4a1078a7b68bd
2025-06-26 14:15:45 -07:00
Sam ZhouandFacebook GitHub Bot 505588b9aa Add annotations or make things readonly to prepare for object literal soundness fix in react-native (#52305)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52305

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77386425

fbshipit-source-id: d69184abb1c8f7c516229aafe24dd418b5dd887e
2025-06-26 13:24:24 -07:00
Nick GerlemanandFacebook GitHub Bot a6a2884d63 Fix onTextLayout metrics not incorporating ReactTextViewManagerCallback (#52276)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52276

The line metrics reported do not process the Spannable, meaning their layout results may disagree with those used for measurement and display.

Changelog:
[Android][Fixed] - Fix onTextLayout metrics not incorporating ReactTextViewManagerCallback

Reviewed By: lenaic

Differential Revision: D77261839

fbshipit-source-id: 87bdc86ce16a2ae9fa69532c5721c19567a53595
2025-06-26 12:09:54 -07:00
George ZaharievandFacebook GitHub Bot 56ccc87e63 Enable experimental.pattern_matching=true [DO NOT SHIP] (#52302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52302

Enable experimental.pattern_matching=true

Changelog: [internal]

Reviewed By: pieterv

Differential Revision: D77367102

fbshipit-source-id: a71352a58470c30fa7e466a67cb1909d80f0363e
2025-06-26 11:48:02 -07:00
Soe LynnandFacebook GitHub Bot ed756edd92 Back out "Revert D76757706: [iOS][RN] Fix LegacyViewManagerInteropComponentDescriptor" (#52269)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52269

Relanding the reverted PR.

Differential Revision: D77282452

fbshipit-source-id: 1480d8ab067bbbb1b41a9cd03315748c1311f910
2025-06-26 11:21:43 -07:00
Andrew DatsenkoandFacebook GitHub Bot d0770ce425 Introduce isOSS (#52222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52222

Changelog: [Internal]
Introduce environment option to force usage of OSS fantom test runner.
If env is not set - check for BUCK file in tester which is checked in for FB but not for OSS.

Reviewed By: rubennorte

Differential Revision: D77160761

fbshipit-source-id: 1701ff140ff2be1bbeacfb4305e9f89089cacb42
2025-06-26 11:03:20 -07:00
Samuel SuslaandFacebook GitHub Bot e3f029fd17 make VirtualView hidden when it is not visible on screen (#52294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52294

changelog: [internal]

Views that are hidden provide couple perf benefits:
- The layer is skipped during hit-testing, so the view no longer receives touches.
- Compositing work for the layer is skipped, so nothing is uploaded to the GPU for that view.

Note, VirtualView still occupies space in memory and because this is infinite list and its numbers will grow unbounded.

In this diff, hidden = YES is only set when VirtualView does not participate in accessibility features.

Reviewed By: yungsters

Differential Revision: D76597973

fbshipit-source-id: 10eb36fccabba9e37cc6322ed5969b8502193a5f
2025-06-26 10:51:32 -07:00
Riccardo CipolleschiandFacebook GitHub Bot afb2afec26 Fix React-Fabric podspec to only use the sources for iOS (#52295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52295

The current setup for several of our podspecs abuses the `**` globbing mechanism, forcing us to specify some excluded folders.
By excplicitly mention the folders that we want to use on iOS, we can avoid the usage of the `exclude_files` property.

This should make the setup more reliable and it will also avoid to leak to OSS the presence of some folders we only use internally like `platform/macos` and `platform/windows`

## Changelog:
[Internal] -

Reviewed By: huntie

Differential Revision: D77381512

fbshipit-source-id: 4cb9118bf9f0ecd253d7d871341f733564d84c83
2025-06-26 10:46:39 -07:00
Alex HuntandFacebook GitHub Bot 895f9b444a Improve stable hash input for local type names (#52300)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52300

Targeted improvement to `versionExportedApis` (D77303917) to reduce noise.

This eliminates the false positive from a rename to a local (unexported) type, that does not structurally change the shape of exported types.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D77314292

fbshipit-source-id: 4de90f5b5f1b622225762b2a73e386538000d54a
2025-06-26 10:46:23 -07:00
Alex HuntandFacebook GitHub Bot e50133a43d Support namespaced references in snapshot type versioning (#52299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52299

Correctness improvement to the `versionExportedApis` transform (D77303917). Now handles namespaced references (e.g. `Animated.Value`) by redirecting to the locally defined type name.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D77314293

fbshipit-source-id: 6442d3ab0a3c8bebf6593455b1c2fb74266e657f
2025-06-26 10:46:23 -07:00
Alex HuntandFacebook GitHub Bot 050fb25c14 Add debug flag to show versionExportedApis graph in output (#52298)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52298

Exposes the ability to output inline debug annotations for the `versionExportedApis` transform (D77303917) as a formalised `--debug-version-annotations` CLI flag.

This is helpful for debugging and future maintenance, and will be used to show the effect of the next diffs.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D77373723

fbshipit-source-id: 91c91abcb657ab88ee2f8209efccb4024602acc7
2025-06-26 10:46:23 -07:00
Alex HuntandFacebook GitHub Bot 94987205de Add versionExportedApis transform to JS API snapshot (#52292)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52292

Adds a new transform that annotates all exported symbols in our V2 JS API snapshot with a version hash based on the shape of all input types.

This intends to be a reliable mechanism to indicate how changes to local types will ultimately affect exported types.

**Advantages** (over our alternative type inlining prototype)

- More intuitive to developers — in that source type changes are preserved closer to their original source code shapes.
- Enables useful Git blaming of individual exported APIs — hash for each export line will change every time a type is affected, and relevant commits can be looked up based on this.
- Handles recursive types.
- Can be **best-effort** with minimal structural effect over time. We are okay with false positives that over-match input type changes (these are refined later in the stack).
- Similar to this, is **lower risk** in terms of requiring future updates that may pollute the diff of the body of the API snapshot structurally.

**Example change**

Example type change with multiple references: D77378010

{F1979784798}

 8 char hash based on input type shapes printed next to each root-exported identifier
 For a source change to the `AccessibilityProps` type, 33 dependent exported types are updated with a new hash

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D77303917

fbshipit-source-id: 9d43a617697418218eb4951e8e9858d125e222b3
2025-06-26 10:46:23 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot ffa6630243 Add API to get image loader instance from rncxx IMountingManager interface (#52293)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52293

# Changelog:
[Internal] -

Adds a helper method to the `IMountingManager` API in order to get the platform specific image loader implementation, if available.

Reviewed By: christophpurrer

Differential Revision: D77379053

fbshipit-source-id: b7595d78c83e9270ec1818daf2d0f1d342661e52
2025-06-26 10:34:38 -07:00
Christian FalchandFacebook GitHub Bot 47b2fe4140 Refactored how we create umbrella, modulemap and header files (#52286)
Summary:
To make sure we are exposing the same public API to swift as without prebuilt, this commit changes the follow:

- ModuleMap / Umbrella file is generated from template, not dynamically to align with non-prebuilt (cocoapods). This is temporary, we are already working toward a solution to generate them dynamically.
- Headers are extracted by reading from podspec files and expanding their globs. This is now easy since we can use the podspec_sources function to look for file globs.

## Changelog:
[Internal] -  refactored header/umbrella/modulemap generation for prebuild

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

Test Plan:
- Run RN-tester with/without prebuilts
- Create new RN app based on nightly, build with/without prebuiltsTo make sure we expose all the swift features that we should, we expose and declare a variable from React_RCTAppDelegate

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D77368255

Pulled By: cipolleschi

fbshipit-source-id: 88e2c9d1622753895c8667a9b5aeae4a0d332cc4
2025-06-26 10:25:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot ff97ca3134 Re-land Implement console.timeStamp
Summary:
# Changelog: [Internal]

Adds support for experimental non-standardized `console.timeStamp` API for capturing performance entries on a timeline. The main idea of the API is to be highly performant. More details in the corresponding RCP [1].

NOTE: Because of the `jsinspector-modern` stack gating logic, this won't be installed in production builds. `console.timeStamp` will be polyfilled with a stub - D76987507.

Reviewed By: rubennorte

Differential Revision: D77374707

fbshipit-source-id: cb66b9fda06168f4b13af764afe95a63a0a8d5a0
2025-06-26 09:57:32 -07:00
pchalupaandFacebook GitHub Bot 0386b9bd51 Rename arguments of onContentSizeChange callback (#52291)
Summary:
The argument names in the `onContentSizeChange` callback's type definition differ from the [documentation](https://reactnative.dev/docs/scrollview#oncontentsizechange).

## 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] - Renamed argument names in the `onContentSizeChange` callback's type definition

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

Test Plan:
The IDE reflects updated argument names.
![Screenshot 2025-06-26 at 14 59 40](https://github.com/user-attachments/assets/1579998a-d9a8-4b98-a664-e5106ffb42f5)

Reviewed By: fabriziocucci

Differential Revision: D77373877

Pulled By: rshest

fbshipit-source-id: 2a171e1bc16103320f5ec31efab896f6b840fb96
2025-06-26 08:00:31 -07:00
Moti ZilbermanandFacebook GitHub Bot 49b7fff2a0 Support IPv6 dev server URLs in legacy standalone RDT connection
Summary:
Changelog: [Internal]

A minimal tweak to a legacy code path for React DevTools in React Native (**NOT** Fusebox!) that enables it to work / not crash when encountering an IPv6 dev server address. See doc comment for more.

Reviewed By: hoxyq

Differential Revision: D77150288

fbshipit-source-id: c11c742aad7b83861a1242dd13c5ed2753fbdf29
2025-06-26 07:59:16 -07:00
Zeya PengandFacebook GitHub Bot 63d8d978f5 Reduce call to folly::dynamic::object insert and remove unnecessary AnimatedNode::update calls (#52270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52270

## Changelog:

[Internal] [Changed] - Reduce call to `folly::dynamic::object` insert and remove unnecessary AnimatedNode::update calls

Reviewed By: christophpurrer

Differential Revision: D77315659

fbshipit-source-id: 656d7bcc957126ee8fa5a7463223273a93d31369
2025-06-26 06:52:05 -07:00
Jim Jetsada MachomandFacebook GitHub Bot 556957d458 Revert D76284119: Implement console.timeStamp
Differential Revision:
D76284119

Original commit changeset: c87c6645fe32

Original Phabricator Diff: D76284119

fbshipit-source-id: 186b09de34c3bb3a80eb62d5c14b47d04ca5a8e0
2025-06-26 06:09:05 -07:00
George ZaharievandFacebook GitHub Bot 7d84158700 Deploy 0.274.1 to xplat (#52287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52287

 Deploy 0.274.1 to xplat

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77349884

fbshipit-source-id: 44ebd2c111a6077dbf2e7beb60369283b2256feb
2025-06-26 05:45:51 -07:00
Ruslan LesiutinandFacebook GitHub Bot df0a2c847b Implement console.timeStamp (#52091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52091

# Changelog: [Internal]

Adds support for experimental non-standardized `console.timeStamp` API for capturing performance entries on a timeline. The main idea of the API is to be highly performant. More details in the corresponding RCP [1].

NOTE: Because of the `jsinspector-modern` stack gating logic, this won't be installed in production builds. `console.timeStamp` will be polyfilled with a stub - D76987507.

Reviewed By: rubennorte

Differential Revision: D76284119

fbshipit-source-id: c87c6645fe32f56d84f5915ff57865cfd9723a47
2025-06-26 05:25:09 -07:00
Ruslan LesiutinandFacebook GitHub Bot 53d7e0f43b Move up forwardToOriginalConsole declaration (#52193)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52193

# Changelog: [Internal]

Will be re-used for `console.timeStamp` installation.

Reviewed By: motiz88

Differential Revision: D77027561

fbshipit-source-id: ef251541d67011acd21fe9b2be87f9ac1a85a01e
2025-06-26 05:25:09 -07:00
Ruslan LesiutinandFacebook GitHub Bot c612ae424a @react-native/js-polyfills: polyfill console.timeStamp (#52168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52168

# Changelog: [Internal]

The main reason for the stub is to make sure this method is always installed. The actual implementation will be part of the `jsinspector-modern` stack, which is fully initialized in production builds.

Once there is a gurantee that RuntimeTarget globals are always installed in any environments, we can remove polyfills altogether.

Reviewed By: rubennorte, GijsWeterings

Differential Revision: D76987507

fbshipit-source-id: 2602af28f9e4359cf58dfafdf84802c0bf92372d
2025-06-26 05:25:09 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3ed1af8a3c Fix incorrect rebase, apply lost changes (#52288)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52288

# Changelog: [Internal]

Reviewed By: motiz88, rubennorte

Differential Revision: D77368159

fbshipit-source-id: 3beefb01d8e25596269c1212ce90864f39fd9f0c
2025-06-26 04:50:40 -07:00
Alex HuntandFacebook GitHub Bot fe0dc19131 Align devtoolsFrontendUrl within /json/list (#52289)
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
2025-06-26 04:20:04 -07:00
Jakub PiaseckiandFacebook GitHub Bot 322142aab3 Further reduce naming collisions in the API snapshot (#52281)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52281

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77355160

fbshipit-source-id: b1a59b3817b88bf6de953816fc272633b14b3a54
2025-06-26 03:37:05 -07:00
Moti ZilbermanandFacebook GitHub Bot 74ae2ae8b6 Upgrade Electron to 36.3.0 (#52261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52261

TSIA

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77244751

fbshipit-source-id: 97c45286d18d3b266e1acd33408ea6067504f790
2025-06-26 03:22:17 -07:00
Jakub PiaseckiandFacebook GitHub Bot df5cd55cdb Flatten built-in utility types in the API snapshot (#52280)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52280

Changelog: [Internal]

Adds a type-simplifyng transform for the API snapshot, with the goal of resolving some built-in TS types during build time. Most notably, it's able to simplify `Omit` structures emitted by the `flow-api-translator` when translating Flow's type spread operator.

It builds upon a simplified type inlining transform from the previous approach. The type inlining transform is able to handle inlining type references and resolution of built-in TS types on literal types:
- `Omit`
- `Readonly`
- `Partial`
- `keyof`

Reference inlining is performed top-down and built-in type resolution is performed bottom-up, which makes it possible for the second step to assume working on type literals.

Type simplifying transform uses the type inlining to reduce type references encountered inside `Omits` to their literal shapes, which makes possible to determine whether `Omit` is neccessary case-by-case. If `Omit` is redundant, it can be safely removed. If it's not, the omitted keys can be reduced to represent a subset of keys existing in the target type.

It also keeps the ability to resolve `Partial` and `Readonly` types on type literals, simplifying the snapshot further.

An example diff the transform can handle:
Before:
```
export declare type AccessibilityProps = Readonly<
  Omit<
    AccessibilityPropsAndroid,
    | keyof {
        accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>
        accessibilityHint?: string
        accessibilityLabel?: string
        accessibilityRole?: AccessibilityRole
        accessibilityState?: AccessibilityState
        accessibilityValue?: AccessibilityValue
        accessible?: boolean
        "aria-busy"?: boolean
        "aria-checked"?: "mixed" | (boolean | undefined)
        "aria-disabled"?: boolean
        "aria-expanded"?: boolean
        "aria-hidden"?: boolean
        "aria-label"?: string
        "aria-selected"?: boolean
        "aria-valuemax"?: AccessibilityValue["max"]
        "aria-valuemin"?: AccessibilityValue["min"]
        "aria-valuenow"?: AccessibilityValue["now"]
        "aria-valuetext"?: AccessibilityValue["text"]
        role?: Role
      }
    | keyof AccessibilityPropsIOS
  > &
    Omit<
      AccessibilityPropsIOS,
      keyof {
        accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>
        accessibilityHint?: string
        accessibilityLabel?: string
        accessibilityRole?: AccessibilityRole
        accessibilityState?: AccessibilityState
        accessibilityValue?: AccessibilityValue
        accessible?: boolean
        "aria-busy"?: boolean
        "aria-checked"?: "mixed" | (boolean | undefined)
        "aria-disabled"?: boolean
        "aria-expanded"?: boolean
        "aria-hidden"?: boolean
        "aria-label"?: string
        "aria-selected"?: boolean
        "aria-valuemax"?: AccessibilityValue["max"]
        "aria-valuemin"?: AccessibilityValue["min"]
        "aria-valuenow"?: AccessibilityValue["now"]
        "aria-valuetext"?: AccessibilityValue["text"]
        role?: Role
      }
    > & {
      accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>
      accessibilityHint?: string
      accessibilityLabel?: string
      accessibilityRole?: AccessibilityRole
      accessibilityState?: AccessibilityState
      accessibilityValue?: AccessibilityValue
      accessible?: boolean
      "aria-busy"?: boolean
      "aria-checked"?: "mixed" | (boolean | undefined)
      "aria-disabled"?: boolean
      "aria-expanded"?: boolean
      "aria-hidden"?: boolean
      "aria-label"?: string
      "aria-selected"?: boolean
      "aria-valuemax"?: AccessibilityValue["max"]
      "aria-valuemin"?: AccessibilityValue["min"]
      "aria-valuenow"?: AccessibilityValue["now"]
      "aria-valuetext"?: AccessibilityValue["text"]
      role?: Role
    }
>
```

After:
```
export declare type AccessibilityProps = Readonly<
  AccessibilityPropsAndroid &
    AccessibilityPropsIOS & {
      accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>
      accessibilityHint?: string
      accessibilityLabel?: string
      accessibilityRole?: AccessibilityRole
      accessibilityState?: AccessibilityState
      accessibilityValue?: AccessibilityValue
      accessible?: boolean
      "aria-busy"?: boolean
      "aria-checked"?: "mixed" | (boolean | undefined)
      "aria-disabled"?: boolean
      "aria-expanded"?: boolean
      "aria-hidden"?: boolean
      "aria-label"?: string
      "aria-selected"?: boolean
      "aria-valuemax"?: AccessibilityValue["max"]
      "aria-valuemin"?: AccessibilityValue["min"]
      "aria-valuenow"?: AccessibilityValue["now"]
      "aria-valuetext"?: AccessibilityValue["text"]
      role?: Role
    }
>
```

Reviewed By: huntie

Differential Revision: D77295302

fbshipit-source-id: 213aef46035bde4f9783353b5344a6986a418399
2025-06-26 03:05:27 -07:00
Nick LefeverandFacebook GitHub Bot c6608685cb Mark prop diffing availability for codegen props (#52246)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52246

This diff adds the required override to codegen props to make the `FabricMountingManager` aware of the availability of a prop diffing implementation for native components using codegen props.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234066

fbshipit-source-id: 8e95628348f491c5ee08609bc7d7b3d30bc7151b
2025-06-25 18:28:22 -07:00
Nick LefeverandFacebook GitHub Bot 53ce247dbd Add codegen for MixedType diffing (#52266)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52266

Native components may use `MixedType` properties in rare cases to hold untyped data. This diff adds support for serializing and prop diffing these types of props so that all of the props and object fields would be included in prop diffing results.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77307169

fbshipit-source-id: ae6b00207ef857c9cfa4bdf9c235972915410a29
2025-06-25 18:28:22 -07:00
Nick LefeverandFacebook GitHub Bot e441954c82 Add codegen for ArrayType diffing (#52244)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52244

The ArrayType props converts to std::vector. This prompted the need for `toDynamic(const T&)` conversion functions as this breaks to potential reliance on all type instances having a `toDynamic()` function available. This includes:
- array of arrays types
- array of objects types
- object with arrays

The ArrayType conversion uses the availability of the `toDynamic` conversion methods for all supported types to convert the values stored by the `std::vector` to `folly::dynamic` values to be stored on a `folly::dynamic::array`.

The diff removes unnecessary conversion methods implemented previously for the core components prop diffing. These are now handled by the generic `toDynamic(const std::vector<T>&)` conversion method.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234065

fbshipit-source-id: 97a3b175ff07fe4a6de3adb14ee6cb42db1a2cfe
2025-06-25 18:28:22 -07:00
Nick LefeverandFacebook GitHub Bot b50ad49a4d Add codegen for ObjectType diffing (#52243)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52243

Building on the availability of `toDynamic` conversion methods for all supported property types, this diff adds support for diffing of `ObjectType` props.

The template adds the generation of a default comparator for the generated C++ struct. The struct also gains a `toDynamic` conversion method that will convert each property of the object type to a `folly::dynamic` value.

Primitive types make use of the implicit conversion supported by `folly::dynamic`, all other types are converted using `toDynamic`.

The `toDynamic` logic is implemented as a method defined on the struct to avoid increased binary size when required multiple times by the prop diffing implementation.

The external `toDynamic` conversion function calls the struct method directly. This enables support for converting object types using object types within their props.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234064

fbshipit-source-id: 21deb3104303aa374fb65b969af57a6aca6db38c
2025-06-25 18:28:22 -07:00
Nick LefeverandFacebook GitHub Bot 8c806ec31b Add codegen for DimensionType diffing (#52242)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52242

Codegen supports `DimensionType` props which represents a YGValue. This diff adds a conversion to `folly::dynamic` supporting all the existing value types `YGValue` can represent.

This completes codegen support for all allowed `ReservedPropTypeAnnotation` prop types.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234061

fbshipit-source-id: 6c3aef5e3ab0459d8a68ebd8efaccfecb83b0b08
2025-06-25 18:28:22 -07:00
Nick LefeverandFacebook GitHub Bot a164874b1a Add codegen for EnumType diffing (#52241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52241

Add support for converting string and int32 enum types to `folly::dynamic` and generating the correct property diffing for it conditionally adding the prop value to the prop diff result.

This diff updates the template to convert the enum back to the original string representation provided from the JS side based on the current generated C++ enum value.

The string enum re-uses the existing `toString` conversion. The number enum generates the switch-case mapping required to map back the C++ enum value to the original value assigned to it.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234070

fbshipit-source-id: 8c669d5b2e21bd6022c6ba36149465495e4d4bf3
2025-06-25 18:28:22 -07:00
Moti ZilbermanandFacebook GitHub Bot 0031377ae6 Correctly synchronise access to WebSocketDelegate
Summary:
Changelog: [Internal]

Fixes a thread safety bug in the C++ platform's `InspectorPackagerConnectionDelegate::WebSocket` implementation. Since D60520747 `IWebSocketDelegate` event calls have been required to be made on the inspector thread, but the C++ platform was making them on the platform's WebSocket thread instead.

Reviewed By: christophpurrer

Differential Revision: D77150289

fbshipit-source-id: f57de05eaccbbe9db674076fc9e60f8d0dd243c5
2025-06-25 13:49:00 -07:00
Sam ZhouandFacebook GitHub Bot 6b85c54ef4 Add annotations to array and object literal declarations to fix future natural inference errors (#52267)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52267

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D77308192

fbshipit-source-id: 21fa2f6d3df632941327b9b2d7910b035f16b7d2
2025-06-25 13:44:09 -07:00
Joe VilchesandFacebook GitHub Bot 7e8eadc041 Fix accessibility order example (#52271)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52271

In my haste I messed up a few of these. Either type in the text, or giving them props they should not have.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D77310876

fbshipit-source-id: 9c5a28285d4bb3673fe99630fa7ed97033b17904
2025-06-25 13:06:08 -07:00
Moti ZilbermanandFacebook GitHub Bot bc7a9d9c4e Add dev server host/port settings to ReactInstanceConfig (#52263)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52263

Changelog: [Internal]

Adds a bare-bones API to set the dev server host and port at the time of creating a `ReactInstance` in the C++ platform.

Reviewed By: rshest

Differential Revision: D77050457

fbshipit-source-id: 642dc96d3cb486a2e7faa177adcbf8a15b8fb668
2025-06-25 12:02:22 -07:00
Pieter De BaetsandFacebook GitHub Bot 167ec92f86 Consume ReactNativeAttributePayloadFabric from ReactNativePrivateInterface (#33616) (#52256)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52256

## Summary

ReactNativeAttributePayloadFabric was synced to react-native in
https://github.com/facebook/react-native/commit/0e42d33cbcfadcf5d787108da785d56a83d07a9f.
We should now consume these methods from the
ReactNativePrivateInterface.

Moving these methods to the React Native repo gives us more flexibility
to experiment with new techniques for bridging and diffing props
payloads.

I did have to leave some stub implementations for existing unit tests,
but moved all detailed tests to the React Native repo.

## How did you test this change?

* `yarn prettier`
* `yarn test ReactFabric-test`

DiffTrain build for [7a3ffef70339c10f8d65a27b88cd73bfbe13eb8a](https://github.com/facebook/react/commit/7a3ffef70339c10f8d65a27b88cd73bfbe13eb8a)

Reviewed By: rubennorte

Differential Revision: D77296286

fbshipit-source-id: a26aa0fe0f7f1c8a42407d759351734a4c85f970
2025-06-25 09:30:08 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 1348d7ee78 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/jsc (#52250)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52250

Reviewed By: javache

Differential Revision: D77290996

fbshipit-source-id: 582a090ea0b0ab6171f625b7a2147607abef1cab
2025-06-25 08:23:43 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 2ae154f650 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/first-party/fbgloginit/fb (#52251)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52251

Reviewed By: javache

Differential Revision: D77289931

fbshipit-source-id: ff61aa3a92a96492027c111ea2db25d5b86a777e
2025-06-25 08:08:12 -07:00
Vitali ZaidmanandFacebook GitHub Bot 5ba0e1f97a Improve how throws from components are reported to the console (#52050)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52050

Uncaught errors are currently raising a custom error to `console.error`:
* With somewhat unclear messaging.
* Only the **component stack** is reported.
* The top-most stack leads to the component where the throw occurred and not to the actual error being thrown.
* The actual error being thrown is never logged

After this change:
* We print the actual error thrown
* The *Owner stack* is attached

(see test plan for examples)

## Changelog:
[General][Breaking] Improve messaging and add error stack trace in console errors generated on throws from components.

----

This is a breaking change because someone might be monkey-patching console.errors, or just listens to them.

Reviewed By: rickhanlonii

Differential Revision: D75080385

fbshipit-source-id: 824f30a804a3bb836ea1be7257784e56c00077c1
2025-06-25 07:54:55 -07:00
Jakub PiaseckiandFacebook GitHub Bot 482f737ee1 Move stripping unstable identifiers earlier in the API Snapshot pipeline (#52260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52260

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77304456

fbshipit-source-id: 2c623fa6d5b6c75e985dc8aa79872019582c50d5
2025-06-25 07:47:38 -07:00
Christian FalchandFacebook GitHub Bot 02203f8608 revert changes in ReactCodegen template (#52257)
Summary:
After switching to the new backwards compatible cocoapods structure with prebuilts, we no longer need any change in the ReactCodegen template.

This commit fixes this.

## Changelog:

[IOS] [FIXED] - revert changes in ReactCodegen template

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

Test Plan: Build RN-tester with prebuilt

Reviewed By: cortinico

Differential Revision: D77303429

Pulled By: cipolleschi

fbshipit-source-id: d251d7d67b1c902082891ba705db5158c558e842
2025-06-25 07:36:56 -07:00
Mateo GuzmánandFacebook GitHub Bot d6efe9a56f Migrate ReactContextBaseJavaModule to Kotlin (#52210)
Summary:
Migrate com.facebook.react.bridge.ReactContextBaseJavaModule to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.ReactContextBaseJavaModule to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D77290330

Pulled By: cortinico

fbshipit-source-id: 1218af30c8a94ed11cc4db557ba34c7bfff2fc0c
2025-06-25 07:21:27 -07:00
Andrew DatsenkoandFacebook GitHub Bot 0b4429a33e Use RegExp instead of micromatch (#52234)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52234

Changelog: [Internal]

Use raw regex instead of micromatch as it depends on node imports.

Reviewed By: christophpurrer

Differential Revision: D77241819

fbshipit-source-id: c579b42f064f67c2e44e15e40ab6262f45a90797
2025-06-25 06:20:10 -07:00
Ruslan LesiutinandFacebook GitHub Bot ca647c13c2 Avoid copying strings when serializing TraceEvent / lock only on buffer operations (#52220)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52220

# Changelog: [Internal]

Mainly, 2 changes:
1. `PerformanceTracer::serializeTraceEvent(const TraceEvent& event)` -> `PerformanceTracer::serializeTraceEvent(TraceEvent&& event)` for less copies, actually move strings from the `TraceEvent` into the serialized `folly:object`.
2. When collecting events from the buffer, only lock when accessing buffer, not when serializing.

Reviewed By: rubennorte

Differential Revision: D77164969

fbshipit-source-id: c7dd84dd3c94dae22b89ffd4b229974e6d8084de
2025-06-25 05:38:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot 448fe573e0 Avoid potential copies of TraceEvent before serialization (#52196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52196

# Changelog: [Internal]

Probably been overlooked for quite some time, but shouldn't be a bottleneck.

Reviewed By: motiz88

Differential Revision: D77148271

fbshipit-source-id: e8eb32137086d6c280aab2ec5903be03f96175ad
2025-06-25 05:38:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot 823414e691 Avoid potential copies of TraceEvent when buffering (#52188)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52188

# Changelog: [Internal]

`buffer_.push_back` -> `buffer_.emplace_back`

I didn't measure if there were any runtime wins from this, because I don't expect there would be. Let's avoid potential copies, if possible.

Reviewed By: rubennorte

Differential Revision: D77053032

fbshipit-source-id: 80a0d3759bf95b1945ebe560806712bfa6a4f924
2025-06-25 05:38:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot e5049091c5 refactor: well-defined behaviour (#52187)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52187

# Changelog: [Internal]

- `bool tracing_` -> `std::atomic<bool> tracingAtomic_`.
- More doc-comments to explain the usage of mutex and atomics.
- `PerformanceTracer::isTracing()` -> `inline PerformanceTracer::isTracing()`.
- `uint64_t processId_` -> `const uint64_t processId_`.

The main change is that the boolean flag that controls "if we are tracing" is now atomic, which should eliminate potential data races. To avoid "logic" races, we are still going to lock mutex, and then check again. The use of `std::atomic` allows us to perform cheaper check first to avoid potentially unnecessary serializations from other systems that report events into `PerformanceTracer`.

Reviewed By: rubennorte

Differential Revision: D77053030

fbshipit-source-id: 82966055db0d75f828e7b95ad4c6cd7f18902265
2025-06-25 05:38:31 -07:00
Samuel SuslaandFacebook GitHub Bot 818e62e977 fix crash in view culling when culling context is incorrectly compared (#52254)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52254

changelog: [internal]

View culling would generate incorrect mounting instructions because view culling context is checked before it is changed by a view.

Reviewed By: javache

Differential Revision: D77298889

fbshipit-source-id: 2f98dc4de90f34673ff6f627b597942d80fda865
2025-06-25 05:33:49 -07:00
Nick LefeverandFacebook GitHub Bot 3d97bac5f2 Add codegen for EdgeInset type diffing (#52239)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52239

Add `toDynamic` conversion function for `EdgeInset` which allowed for removing the custom conversion implemented for the `ViewProps`.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234069

fbshipit-source-id: 3aecad8a6d78468f0056167fa1523ccdfb68f369
2025-06-25 04:33:12 -07:00
Nick LefeverandFacebook GitHub Bot 9b82e706fb Add codegen for PointPrimitive prop type diffing (#52238)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52238

Add prop diffing codegen for `PointPrimitive` prop type by adding a `toDynamic` conversion for the struct and the prop diffing conditional result update.

The addition of the `toDynamic` function will allow for converting the type when used in array and object types.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234062

fbshipit-source-id: d0f52e8fd78ac7712925ea2a47cdd0fe3392d5b0
2025-06-25 04:33:12 -07:00
Nick LefeverandFacebook GitHub Bot da0938edfd Add toDynamic conversion function for ImageSource (#52237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52237

For array props conversion following later in this stack, each type should have a toDynamic conversion available that can be called upon to convert all supported types to a `folly::dynamic` result.

This diff adds the toDynamic conversion function for `ImageSource`

 Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D77234063

fbshipit-source-id: 392cbaf172595936f7f66faa824900dadd58bdcf
2025-06-25 04:33:12 -07:00
Jakub PiaseckiandFacebook GitHub Bot dca83bc158 Move remaining transform to the typescript dir (#52247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52247

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77284561

fbshipit-source-id: 46a5a9d00223283423b791456db3613abfc063aa
2025-06-25 04:17:28 -07:00
Nicola CortiandFacebook GitHub Bot 04858ecbab Bump AGP to 8.11.0 (#52248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52248

Just keep the AGP version update.

Changelog:
[Android] [Changed] - Bump AGP to 8.11.0

Reviewed By: rshest

Differential Revision: D77292284

fbshipit-source-id: 2d0bfe1b50e613690bc3cc6b81ae352136543fd4
2025-06-25 03:49:48 -07:00
Christian FalchandFacebook GitHub Bot d8e00f0bb1 Added backwards compatible use of prebuild through cocoapods (#52252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52252

Instead of declaring two different sets of Pods for prebuilt and build from source, this commit now keeps the pod structure the same for both modes so that consuming libraries can expect to have the same pods and header files available - without this, libraries would have to be updated to take advantage of the prebuilds.

This PR does:
- Added React-Core-prebuilt as a pod in React-Core if prebuilt is enabled
- Simplified react_native_pods to keep pods structure and add React-Core-prebuilt pod if prebuilts are enabled
- Added function for selecting source sets based on prebuilt/build from source

To be able to function both in prebuilt and in regular build from source mode, all podspecs are now using the switch function podspec_sources so that they only include header files if we are in prebuild mode.

Also added React-Core-prebuilt as dependency on React-Core if we are in prebuilt mode so that we install the React.XCFramework.

## Changelog:

[IOS] [FIXED] - Added backwards compatible use of prebuild through cocoapods

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

Test Plan:
Tested in RN-Tester both with and without prebuild.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D77296047

Pulled By: cipolleschi

fbshipit-source-id: f3eb4d56b2a78bfc8e10ad852746be1ceaf828b2
2025-06-25 03:44:03 -07:00
Christian FalchandFacebook GitHub Bot 07f6f70aef Add missing RCTVibration target in SwiftPM (#52223)
Summary:
`Package.swift` was missing the `RCTVibration` target. This commit adds this target.

## Changelog:

[Internal] - Added RCTVibration to SwiftPM

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

Test Plan: Tested in RN-Tester both with and without prebuild.

Reviewed By: cortinico

Differential Revision: D77257066

Pulled By: cipolleschi

fbshipit-source-id: 13c918387a2ed4a8e3941ddce8b7ba11c24eaab5
2025-06-25 03:44:03 -07:00
Alex HuntandFacebook GitHub Bot ece8ca82cd Update JS API snapshot to group exports in single block (#52235)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52235

Adds `organizeDeclarations` transform, replacing `sortTypeDefinitions`.

All `export declare ...` statements are now collected and represented at the end of the snapshot in a single `export {}` block — significantly improving readability and diffing.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77150017

fbshipit-source-id: 1bd451c0e2a18fd6fc0504970b10a5d2502ac872
2025-06-25 02:55:42 -07:00
Tim YungandFacebook GitHub Bot 08a59c59e0 VirtualView: Minimize Events w/ Render State (#52245)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52245

Changes `VirtualView` to avoid dispatching redundant mode change events by reading the last committed `renderState` to determine whether the desired render state is already in effect.

This enables `VirtualView` to avoid dispatching synchronous `Visible` mode change events when a previous `Prerender` mode change event has already been committed.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D77271865

fbshipit-source-id: 75418aec1416995737f308a1beff407f2cedb940
2025-06-25 02:18:52 -07:00
Jakub PiaseckiandFacebook GitHub Bot fbd44ade3a Change Animated methods' local names to avoid symbol collisions in the API snapshot (#52219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52219

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77221690

fbshipit-source-id: 149711ee8c9d89c50178bf3d41de8b44fbc1d464
2025-06-25 00:16:24 -07:00
Jakub PiaseckiandFacebook GitHub Bot 4f94028ca6 Reduce symbol collisions in the API snapshot (#52213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52213

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D77207979

fbshipit-source-id: 10d8b9c8f24ddb52423197f5aa300402b1e45ebe
2025-06-25 00:16:24 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 0a567a63cd Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/first-party/fbgloginit (#52217)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52217

Reviewed By: javache

Differential Revision: D77211475

fbshipit-source-id: 22a89c5211ffc5f9f09ad27dc5e2597c6ceefd99
2025-06-24 22:55:27 -07:00
Tim YungandFacebook GitHub Bot 19ebd4c188 VirtualView: Prerender w/o Window Focus (#52240)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52240

Changes `VirtualView` to detect when its window is not in a focused window (e.g. scroll position or layout changes when it is blurred) and to instead dispatch an async `Prerender` event instead of a sync `Visible` event.

This minimizes unnecessary main thread synchronous work that is needed for a view that is not important to the user experience.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D77261958

fbshipit-source-id: 32acef9bc938005a0d73c5166f1741aebadf23bb
2025-06-24 22:33:07 -07:00
George ZaharievandFacebook GitHub Bot a2a72e239d Enable experimental Flow 'match' syntax for react-native-github/packages/react-native/src/private/components/virtualview/ (#52236)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52236

Enable experimental Flow 'match' syntax for `react-native-github/packages/react-native/src/private/components/virtualview/` and adopt in one case to see if there are any issues.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D77250963

fbshipit-source-id: 0b2a5817a05f3332031f0c0590fe956eaa74ddd3
2025-06-24 17:55:57 -07:00
Cao DoanandFacebook GitHub Bot fedceecc37 Correct some cpp imports (#52212)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52212

Correcting some C++ imports that show up when build with Xcode 26:
- Missing `<string>` imports.
- `<tgmath.h>` is a deprecated C++ header file, which in this case can be substituted with `<cmath>`.

## Changelog: [Internal]

[iOS][Fixed] - Fix deprecated C++ imports

Reviewed By: zhenma

Differential Revision: D77192276

fbshipit-source-id: 30c836947cb3eb54f6e7ac42b87fd2493334a4f4
2025-06-24 15:38:23 -07:00
Sam ZhouandFacebook GitHub Bot e3047db0dc Deploy 0.274.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D77246379

fbshipit-source-id: 4a86da380109e85b5e1d53f5723f6ea07e6ea429
2025-06-24 12:58:53 -07:00
Andrew DatsenkoandFacebook GitHub Bot 1e212f91bc Add remaining dependencies (#52202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52202

Changelog: [Internal]

Build fantom_tester for OSS

Reviewed By: mdvacca

Differential Revision: D76928253

fbshipit-source-id: a95e8751326f45a25cd512b7a5d05260b37a0305
2025-06-24 12:33:59 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 4f1f72ea34 Fix downloading nightly prebuilds (#52233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52233

When working on [c1bf39bfdf](https://github.com/facebook/react-native/commit/c1bf39bfdfaa0381be3a20d0d89ce159e482afe1) I forgot to add a `.body` to extract the body from the response.

As a result, we can't install prebuilds in a nightly.

This change fixes this.

## Changelog:
[Internal] -

Reviewed By: realsoelynn

Differential Revision: D77241914

fbshipit-source-id: 013ed927e1a3cd6476a551995577ade80c477dd7
2025-06-24 12:05:51 -07:00
Sam ZhouandFacebook GitHub Bot fe1aacae6d Pre-suppress errors in fbsource ahead of 0.274.0 release (#52232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52232

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D77230727

fbshipit-source-id: 890b819ffa3ea9996fa11d254215ea1304ba02b4
2025-06-24 11:04:37 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot a82b5acf3d Fix jumping talkback triggering scroll when reaching a view with accessibilityOrder (#52231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52231

Not calling `super.onInitializeAccessibilityNodeInfo` on the host view with accessibilityOrder prevents setting proper dimensions for the node that backs the view which leads TalkBack to trigger scrolling when under a ScrollVIew.

We still need the host's node to not be accessible so we still set it to not be focusable and not have a content description since this should be handled by the virtual views

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D77180494

fbshipit-source-id: fe8794cf421cdc9548cf3e18a62d4bb3e8c26b09
2025-06-24 09:37:36 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 8cc2874d3f Fix View Coopting View edge case on Android (#52066)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52066

Before, to disable views that were excluded from the order we were setting them to be not important for accessibility. This however breaks coopting behavior of parent views, because parent views will not announce content descriptions of children that are not important for accessibility.

Instead of disabling by setting `important for accessibility = no` now we just set `isFocusable = false` which disables focusing but still allows parent views to coopt

We also add functionality to restore view focusability when enabling disabling screen readers since `isFocusable` changes keyboard focusability and when screen readers are disabled we don't want to change it.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D76745057

fbshipit-source-id: cc237c5f8a4b894a7caa3e34207080777de440ac
2025-06-24 09:37:36 -07:00
Alex HuntandFacebook GitHub Bot d012b2c19b Fix stripUnstableApis to match type alias declarations (#52229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52229

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77148443

fbshipit-source-id: 423da38dfe5ca42e639e274461868a51e9987384
2025-06-24 09:15:53 -07:00
Alex HuntandFacebook GitHub Bot cfc6960bc4 Update all transforms to apply sequentially (#52228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52228

To avoid unexpected behaviour, apply all Babel transforms within `build-types` sequentially, so that each transform plugin has an accurate starting AST.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77148444

fbshipit-source-id: f86beac12b7a08ef800e28db1ff88755970cf64e
2025-06-24 09:15:53 -07:00
Alex HuntandFacebook GitHub Bot ef742dbc68 Subfolder build-types transforms by language (#52230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52230

Reorganisation/refactoring.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D77148446

fbshipit-source-id: fd29c6d47347efd5ad3da933b2112e864064dba7
2025-06-24 09:15:53 -07:00
Alex HuntandFacebook GitHub Bot 11a1ad7a98 Expose *AnimationConfig types (#52227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52227

Changelog:
[General][Added] - Expose additional `*AnimationConfig` types on the `Animated` namespace

Differential Revision: D77222030

fbshipit-source-id: 8fd01d820c3c8d6e952a4115578ecc83ae7a0d0f
2025-06-24 08:55:21 -07:00
Alex HuntandFacebook GitHub Bot b01a5f91fe Expose Animated.InterpolationConfig type (#52224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52224

Changelog:
[General][Added] - `InterpolationConfig` is now exposed on the `Animated` namespace

Differential Revision: D77222031

fbshipit-source-id: c64c2f348bc899c598ee86c637300037a5a8de6f
2025-06-24 08:55:21 -07:00
Mateo GuzmánandFacebook GitHub Bot 65ae3dafcd Migrate UIManagerHelper to Kotlin (#52209)
Summary:
Migrate com.facebook.react.uimanager.UIManagerHelper to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.UIManagerHelper to Kotlin

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

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

Reviewed By: javache

Differential Revision: D77210140

Pulled By: cortinico

fbshipit-source-id: 7a6669a6d92d33241d3f42edbabf20170a5a6ddf
2025-06-24 08:06:13 -07:00
Mateo GuzmánandFacebook GitHub Bot d3495fd162 Migrate ReactApplicationContext to Kotlin (#52208)
Summary:
Migrate com.facebook.react.bridge.ReactApplicationContext to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.ReactApplicationContext to Kotlin

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

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

Reviewed By: javache

Differential Revision: D77209812

Pulled By: cortinico

fbshipit-source-id: 2dae094d363e60efe05b4f2b3d55f0f84d921495
2025-06-24 08:03:22 -07:00
Andrew DatsenkoandFacebook GitHub Bot 252e1345bf Move fantom into OSS (#52201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52201

Changelog: [Internal]

Moving fantom tester into OSS.

Reviewed By: rubennorte

Differential Revision: D76928252

fbshipit-source-id: 3faf4a236eacba17896e0a440bac7a5032d063f9
2025-06-24 07:24:41 -07:00
Andrew DatsenkoandFacebook GitHub Bot dd1b795abe Introduce react_native_android_dep (#52194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52194

Changelog: [Internal]

Introducing a way to include sources and deps via function that react_native_android_dep.

This will help with Fantom OSS build.

Reviewed By: cortinico

Differential Revision: D77146189

fbshipit-source-id: 06b09d433741506bc1f58fbf1f9e6add9a9cff91
2025-06-24 07:24:41 -07:00
Mateo GuzmánandFacebook GitHub Bot c125f306c2 Kotlin: fix static code analysis weak warnings (4/n) (#52207)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Redundant curly braces in string template](https://www.jetbrains.com/help/inspectopedia/RemoveCurlyBracesFromTemplate.html)
- [Redundant call to toString() in string template](https://www.jetbrains.com/help/inspectopedia/RemoveToStringInStringTemplate.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (4/n)

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

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

Reviewed By: javache

Differential Revision: D77209873

Pulled By: cortinico

fbshipit-source-id: 2bf5fcf7dcbf02632e721aab0688f73d15f220b9
2025-06-24 06:36:11 -07:00
Alex HuntandFacebook GitHub Bot 03ab6a3098 Add nocommit to V2 JS API snapshot (#52200)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52200

Remains in an experimental format. Add `\nocommit` to prevent accidental inclusion in the repo right now.

Also disable ESLint rule `redundant-undefined/redundant-undefined`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77150743

fbshipit-source-id: 645e7db5af2c2a648eef7c8f7e324bc1264b8065
2025-06-24 06:31:04 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 46b562b9b3 Ship the new React-Core-prebuilt.podspec in the package.json (#52221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52221

It is currently not possible to use prebuilds, because we are missing the `React-Core-prebuilt.podspec` from the npm package we publish.

This change should fix it.

## Changelog:
[iOS][Added] - Ship the `React-Core-prebuilt.podspec` in the package.json

Reviewed By: cortinico

Differential Revision: D77223271

fbshipit-source-id: ab068e1711fdd86f3f0069dc9aa3c0a591fcd26b
2025-06-24 06:01:36 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c1bf39bfdf Fix download of nightlies with SwiftPM (#52215)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52215

We were not handling the download of the XML properly. Using `Net::HTTP.get` will directly return the body and that won't let us check on the status code of the response.

## Changelog:
[Internal] - use get_response instead of get when downloading the maven metadata

Reviewed By: cortinico

Differential Revision: D77216121

fbshipit-source-id: 4da0abff1624c687977a7b77db8a15f19e6b887d
2025-06-24 06:01:36 -07:00
nishan (o^▽^o)andFacebook GitHub Bot f238b74658 - Use CAGradientLayer for radial gradient (#52117)
Summary:
This PR replaces Core Graphics implementation with Core Animation for radial gradients. I found that `endPoints` for radial gradient type works differently than linear gradient type. The `endPoint.x` accounts for horizontal length and `endPoint.y` accounts for vertical. This makes it possible to draw ellipse gradients. So we don't need the core graphics API anymore.

## Changelog:

[IOS] [CHANGED] - Optimised Radial Gradients.

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

Pick one each for the category and type tags:

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

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

Test Plan: Non breaking change. Test Radial gradient example from RNTester. Compare results with web, android and iOS. Each platform should render the gradients identically.

Reviewed By: rshest

Differential Revision: D77140709

Pulled By: javache

fbshipit-source-id: 6e3ad9fcf8e819d340ccf5f5946beb140e616cb0
2025-06-24 05:10:30 -07:00
Mateo GuzmánandFacebook GitHub Bot 76e2ab4ac8 Kotlin: fix static code analysis weak warnings (3/n) (#52206)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Return or assignment can be lifted out](https://www.jetbrains.com/help/inspectopedia/LiftReturnOrAssignment.html)
- [Verbose nullability and emptiness check](https://www.jetbrains.com/help/inspectopedia/VerboseNullabilityAndEmptiness.html)
- [Size check can be replaced with 'isNotEmpty()'](https://www.jetbrains.com/help/inspectopedia/ReplaceSizeCheckWithIsNotEmpty.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (3/n)

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

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

Reviewed By: javache

Differential Revision: D77209766

Pulled By: cortinico

fbshipit-source-id: c154ec6578125c16ad37c9dd15295a2edcacee4a
2025-06-24 04:55:33 -07:00
Mo JavadandFacebook GitHub Bot 35dba09724 Add explicit Build Tools Version to RN Tester Android App Benchmark (#52216)
Summary:
After bumping to SDK version 36, the build process for Android was still pulling in SDK v35 unnecessarily. This PR fixes that issue.

## Changelog:

[ANDROID] [FIXED] - Added explicit build tool version to RN Tester build.gradle to avoid automatic installation of Android SDK Build Tools.

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

Test Plan:
Tested in fork pipeline to ensure it's working correctly.

This is the logs from the pipeline before:
![image](https://github.com/user-attachments/assets/9dc7f158-8dea-437e-836e-e5f500b3d5ff)

And this is after the fix:
![image](https://github.com/user-attachments/assets/c6cc1c0a-5823-41cb-ba32-027b69d6eaa6)

Reviewed By: rshest

Differential Revision: D77219569

Pulled By: cortinico

fbshipit-source-id: 7a0ca462d00bfc4b015a30807aaef999ff60c719
2025-06-24 04:34:46 -07:00
Mateo GuzmánandFacebook GitHub Bot 9e96acbd0f Kotlin: fix static code analysis weak warnings (2/n) (#52205)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses:

- [Kotlin Java methods should be replaced with Kotlin analog](https://www.jetbrains.com/help/inspectopedia/ReplaceJavaStaticMethodWithKotlinAnalog.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (2/n)

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

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

Reviewed By: javache

Differential Revision: D77209667

Pulled By: cortinico

fbshipit-source-id: 09b01a170abf43248b8fdb6a08498d278b9d03bd
2025-06-24 03:40:58 -07:00
Alex HuntandFacebook GitHub Bot 40b8f4ad22 Adjust source types for better output (#52199)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52199

Minor fixes to naming and generic type compatibility (→ TypeScript).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77148914

fbshipit-source-id: 2d3e65170f261b97ea8cf705d1a40a6f7bc5bcc7
2025-06-24 02:57:34 -07:00
George ZaharievandFacebook GitHub Bot 3306691d64 Update hermes-parser and related packages in xplat and socialvr to 0.29.0 (#52211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52211

Update hermes-parser and related packages in xplat and socialvr to 0.29.0

Changelog: [Internal]

Blocked on: https://fb.workplace.com/groups/relay.support/posts/28766057099682865

Reviewed By: SamChou19815

Differential Revision: D77004095

fbshipit-source-id: 5400ac07c0cbf1f9709d374929d842af9dd15d08
2025-06-23 19:19:50 -07:00
Antonio PiresandFacebook GitHub Bot f184b591cf adding scrollTo, and imperative handle exports for ScrollView (#52204)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52204

Changelog:
[General][Added] - Expose `ScrollViewImperativeMethods` and `ScrollViewScrollToOptions` types to public API

Reviewed By: huntie

Differential Revision: D76920770

fbshipit-source-id: 01b0a2788f7b8a3bad0b57e24b04a7380233ac34
2025-06-23 12:13:02 -07:00
Joe VilchesandFacebook GitHub Bot 62d8d30652 Revamp the accessibility order example in RNTester (#52122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52122

Would love to have a place with all the edge cases we can come back to when we try and tweak things.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D76942595

fbshipit-source-id: ce6e293e2c068383e54404af71a29a0586dbc04e
2025-06-23 11:07:52 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 60967fdffb Fix CQS signal modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput (#52145)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52145

Reviewed By: javache

Differential Revision: D77010402

fbshipit-source-id: db2823f888b1fca279ff13f8a323e074fcdf61f0
2025-06-23 09:55:44 -07:00
Zane BaumanandFacebook GitHub Bot 4b91b63094 fix: add missing getNativeScrollRef type for ScrollView (#52203)
Summary:
### The Problem

When trying to measure the location of a `View` within a `ScrollView` (ie. for scrolling to the view), the current recommended method is to use `measureLayout` on the nested view to determine its location inside the containing scroll view:

```tsx
const MyComponent = () => {
  const scrollViewRef = useRef<ScrollView>(null);
  const nestedViewRef = useRef<View>(null);

  const scrollToNestedView = () => {
    if (!scrollViewRef.current || !nestedViewRef.current) {
      return;
    }

    nestedViewRef.current.measureLayout(
      scrollViewRef.current.getInnerViewNode(),
      (x, y) => { scrollViewRef.current.scrollTo({ y, animated: true }); },
    );
  }

  return (
    <ScrollView ref={scrollViewRef}>
      <View ref={nestedViewRef}>
        { /* content */ }
      </View>
    </ScrollView>
  );
}
```

This is valid in the Typescript types layer. However, the only two methods on `ScrollView` to use in this scenario that are [available in the type definitions](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollView.d.ts#L830) are `getScrollableNode` and `getInnerViewNode` – both of these methods [return a `number`](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollView.js#L139-L140). The issue is that a `number` not a valid value to use with `measureLayout` because [its source returns early for that type](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js#L91-L102).

(Note, you can also use `findNodeHandle` with the scroll view ref, but this also returns a `number`.)

### The Solution

The long-term solution would be to update the types for both `measureLayout` and `ScrollView`. However, that would constitute a breaking change and require some fairly expansive updates. Instead, I am proposing an additive solution.

`ScrollView` has [a public method called `getNativeScrollRef`](https://github.com/facebook/react-native/blob/e69f0726cd2616fb112d2e4fabfeaafc8cada5d7/packages/react-native/Libraries/Components/ScrollView/ScrollView.js#L142) which returns the underlying `HostInstance`. This method correctly works in the runtime layer, but is not supported in the types layer. This PR exposes the public method in the type definition so that we can properly access the underlying instance without using `ts-ignore`.

## Changelog:[GENERAL] [FIXED] - Expose `ScrollView.getNativeScrollRef` on the type definition to allow accessing the underlying `HostInstance`.

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

Test Plan: None needed. This is only a type update exposing existing functionality.

Reviewed By: cortinico

Differential Revision: D77153959

Pulled By: rshest

fbshipit-source-id: 5880695da85406ed9fe49a1b736b5754db0e6382
2025-06-23 09:55:32 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 7f7655d711 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/cxxreact (#52146)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52146

Reviewed By: javache

Differential Revision: D77014011

fbshipit-source-id: 35afa03482c9a4d1fe11325421615a7214337e2a
2025-06-23 09:52:30 -07:00
Dawid MałeckiandFacebook GitHub Bot 76e04fac82 Replace shelljs in run-ci-javascript-tests.js (#52095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52095

This diff removes `shelljs` from `run-ci-javascript-tests.js` and replaces `echo, exec, and exit` methods.

### Motivation

Decrease number of references to `shelljs` across the react-native-github.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D76512374

fbshipit-source-id: 6e02901b570cf9a36bd13a075106a7066a85a2d9
2025-06-23 09:39:44 -07:00
Rubén NorteandFacebook GitHub Bot 18f4db44ef Clean up dead logic in RuntimeScheduler_Modern and simplify logic (#52192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52192

Changelog: [internal]

When we shipped the event loop we removed the need to run only expired tasks in `RuntimeScheduler_Modern`, but we never cleaned up the code properly. This does it.

Reviewed By: javache

Differential Revision: D77142978

fbshipit-source-id: f808edf80a134f487723fa36ab7a3593e4efe2d3
2025-06-23 08:34:50 -07:00
Rubén NorteandFacebook GitHub Bot 251eb3fd4c Log task ID when scheduling and executing tasks in RuntimeScheduler (#52191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52191

Changelog: [internal]

Some time ago we added logging for the timer ID in Systrace/Perfetto so we could see where timers were scheduled vs. executed.

This diff adds support for the same functionality for tasks in the runtime scheduler.

Reviewed By: javache

Differential Revision: D77039038

fbshipit-source-id: 792d2fe29b44fb209f9129f46f9d661dad7ebdff
2025-06-23 08:34:50 -07:00
Rubén NorteandFacebook GitHub Bot 3782fe865d Improve tracing metadata for IntersectionObserverManager (#52190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52190

Changelog: [internal]

This adds some tracing metadata to IntersectionObserver to contextualize the performance of certain operations (logging how many observers it's processing).

Reviewed By: javache

Differential Revision: D77039037

fbshipit-source-id: 9cee79ac0509f57e4658a16142f3fe2d10d71fdf
2025-06-23 08:34:50 -07:00
Rubén NorteandFacebook GitHub Bot 5742227dd8 Add Fantom benchmark for RuntimeScheduler (#52189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52189

Changelog: [internal]

This creates a benchmark to measure the changes in performance in RuntimeScheduler.

Reviewed By: javache

Differential Revision: D77142979

fbshipit-source-id: 1a6e6824f4c6fdb8d2c5cbad77fb4b8ba406ef29
2025-06-23 08:34:50 -07:00
Christian FalchandFacebook GitHub Bot 90654e4ba2 Integrate React Core prebuilds with apps (#52138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52138

Integrate React Core prebuilds with apps

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[IOS] [ADDED] - Added support for using prebuilt RNCore with Cocoapods

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

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980286

Pulled By: cipolleschi

fbshipit-source-id: 0ef34599cf7a60e54f799708bce93bcf6fb9d950
2025-06-23 08:13:56 -07:00
Christian FalchandFacebook GitHub Bot 60c01b4715 Update RNDependencies podspec to fail fast if framework is missing (#52134)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52134

Update RNDependencies podspec to fail fast if framework is missing

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[IOS] [CHANGED] - Fail fast when pod install i f using prebuild if frameworks are not present in the disk.

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

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980282

Pulled By: cipolleschi

fbshipit-source-id: 6ab029d0cb06e2f0a3d99ea9fc7b375865e7a966
2025-06-23 08:13:56 -07:00
Christian FalchandFacebook GitHub Bot 69e028da45 Update the xcframework.js script to support swift (#52135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52135

Update the xcframework.js script to support Swift

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[INTERNAL] - Update the xcframework.js script to support Swift

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

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980285

Pulled By: cipolleschi

fbshipit-source-id: 4e5486b79c406ba4b375e2ada24cbe5450e2346f
2025-06-23 08:13:56 -07:00
Christian FalchandFacebook GitHub Bot 152cb538f6 Update ReactCodegen to support Core prebuilds (#52137)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52137

Update ReactCodegen to support Core prebuilds

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[IOS] [CHANGED] - Update ReactCodegen to support Core prebuilds

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

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980283

Pulled By: cipolleschi

fbshipit-source-id: 4b120203e9e1628a63580b0b3b2e882837c0b818
2025-06-23 08:13:56 -07:00
Christian FalchandFacebook GitHub Bot 2ec6e3d901 Update rndependencies.rb to use the same logic of rncore.rb (#52136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52136

Update rndependencies.rb to use the same logic of rncore.rb

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[INTERNAL] - Update rndependencies.rb to use the same logic of rncore.rb

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

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980284

Pulled By: cipolleschi

fbshipit-source-id: a7f09d931c66e2fdf468a09da4be1d40847f472b
2025-06-23 08:13:56 -07:00
Christian FalchandFacebook GitHub Bot 1a86ee17fb Add React-Core-prebuild.podspec to integrate React native core prebuilds using cocoapods (#52133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52133

Add React-Core-prebuild.podspec to integrate React native core prebuilds using cocoapods

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

## Changelog:

[IOS] [ADDED] - Add `React-Core-prebuild.podspec` to integrate React native core prebuilds using cocoapods

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

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76980281

Pulled By: cipolleschi

fbshipit-source-id: ce102837d6df6ab0fa2e55862cc0c954125bd362
2025-06-23 08:13:56 -07:00
Christian FalchandFacebook GitHub Bot 8888cf9a2d Introduce rncore.rb to manage the core prebuilds (#52109)
Summary:
Introduce rncore.rb to manage the prebuilds of RNCore.

## Context
This PR introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

## Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.

bypass-github-export-checks

## Changelog:

[INTERNAL] - Added script to handle React Core prebuilds

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

Test Plan:
Run with RN Tester. We need to remove all extra pods from RNTester pod file since none of them are yet compatible with prebuilt (they reference non-prebuilt pods)

Rollback Plan:

Reviewed By: cortinico, rshest

Differential Revision: D76979549

Pulled By: cipolleschi

fbshipit-source-id: 7a2b1809bf58b600293cc33ca2dcff0060f3fab0
2025-06-23 08:13:56 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 27c97ac942 Minimal implementation for ImageLoaderModule in ReactCxxPlatform (#52198)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52198

# Changelog:
[Internal] -

This provides an implementation of what was the RnCxx ImageLoaderModule stub inside ReactCxxPlatform, allowing the clients use dependency injection to provide the actual platform specific image loading functionality.

Reviewed By: javache

Differential Revision: D77015269

fbshipit-source-id: 7355dd75692c1f564de8c3daffd6c8a79182dc09
2025-06-23 07:44:36 -07:00
Nicola CortiandFacebook GitHub Bot e69f0726cd Make EventDispatcherImpl internal (#52154)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52154

I wasn't able to find any meaningful usage of `EventDispatcherImpl` in OSS, therefore I'm making this class internal.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D77024759

fbshipit-source-id: e1ff3329cedf96a8c75edb9b9ccc1ce21adfab11
2025-06-23 07:35:06 -07:00
Nicola CortiandFacebook GitHub Bot 1ced97fbe6 Convert EventDispatcherImpl to Kotlin (#52150)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52150

This is another class moving from Java to Kotlin.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D77021952

fbshipit-source-id: 0b04a10bcbe65b7dc14ddd2821f80d90a43f8610
2025-06-23 07:35:06 -07:00
Nicola CortiandFacebook GitHub Bot ff7e24f19a @DoNotStrip ReactModalHostView to prevent instacrash on release (#52195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52195

RNTester is currently instacrashing on release due to use minifying the `ReactModalHostView`.
In that class there is a static method that is accessed by JNI so we should annotated this class
as `DoNotStrip` as otherwise we won't be able to access it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D77148010

fbshipit-source-id: c5b2758fa2919bc1f5885433202a45b4c3f8ff99
2025-06-23 07:24:47 -07:00
Nicola CortiandFacebook GitHub Bot d9ec57a3b9 Add further logging to help investigate T228303477 (#52185)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52185

It seems like one of the activity on the stack is not properly implementing `DefaultHardwareBackBtnHandler`.
This will make the crash more clear as it will be clear which activity is the one responsible for the crash.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D77142320

fbshipit-source-id: 1913976d1ad5d3ceafcfc0569f3b74dad9e919ae
2025-06-23 06:07:50 -07:00
Nicola CortiandFacebook GitHub Bot 33fed54a16 Truncate the changelog pre-80 to a separate file.
Summary:
Splitting the CHANGELOG as it's getting too big to handle.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D77025333

fbshipit-source-id: cf2d54f2096f9c8c6a3fadb354d0c3065370440d
2025-06-23 06:00:07 -07:00
Andrew DatsenkoandFacebook GitHub Bot 7b7b538d6b fix cmake empty spaces and naming (#52186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52186

Changelog: [Internal]
Minor fixes to spacing in cmake files and naming inconsistency

Reviewed By: cortinico

Differential Revision: D77141854

fbshipit-source-id: d1e12e571dbc0f7630d9d38faad7b22d0833dd2f
2025-06-23 04:25:59 -07:00
Pieter De BaetsandFacebook GitHub Bot 9612d2e225 NativeAnimated Kotlin nits (#52148)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52148

Address some Android Studio lint suggestions

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77017839

fbshipit-source-id: c0e025ee7eaae74560cfc8ff6ecc45a893e0dda1
2025-06-23 04:24:58 -07:00
Pieter De BaetsandFacebook GitHub Bot ee8b66e278 View clipping Kotlin nits (#52147)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52147

Simplify some of the nullability / checkNotNull behaviour

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D76334294

fbshipit-source-id: 32c2d0ab50713789ddf6af5e40083bae2161c91f
2025-06-23 04:24:58 -07:00
Susmita HorrowandFacebook GitHub Bot f214a52a9a Revert D76814453: Reduce symbol collisions in the API snapshot
Differential Revision:
D76814453

Original commit changeset: fffbf585d63e

Original Phabricator Diff: D76814453

fbshipit-source-id: 418ae90fb49c8c05f077bca7e434c039ad49c7ba
2025-06-23 01:43:20 -07:00
Jakub PiaseckiandFacebook GitHub Bot f338db9c17 Reduce symbol collisions in the API snapshot (#52085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52085

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76814453

fbshipit-source-id: fffbf585d63e282443830c08397ae5e4d745785a
2025-06-23 00:34:05 -07:00
Jakub PiaseckiandFacebook GitHub Bot fe4047fe3a Replace ElementConfig with directly imported props (#51971)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51971

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76502294

fbshipit-source-id: ed98c5e6d9ef5fd6a4d1adbd6a88ce8cda52b969
2025-06-22 23:58:45 -07:00
Andrew DatsenkoandFacebook GitHub Bot 9f479ff8d6 Add react_cxx_platform_react_utils cmake (#52177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52177

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_utils

Reviewed By: christophpurrer

Differential Revision: D77038580

fbshipit-source-id: 7cdd8defd57629342095587bd3e1819e04af50bd
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot dda8ab69d4 Add react_cxx_platform_react_threading cmake (#52176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52176

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_threading

Reviewed By: christophpurrer

Differential Revision: D77038544

fbshipit-source-id: 950e28af49c5de3870e11e03d5123f22a0f04a6b
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot f04d1f1ef7 Add react_cxx_platform_react_runtime cmake (#52178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52178

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_runtime

Reviewed By: christophpurrer

Differential Revision: D77038450

fbshipit-source-id: 54515f1aff84632c8a86abd8970107a1bd8ca043
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 54a1e41694 Add react_cxx_platform_react_renderer_uimanager cmake (#52175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52175

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_renderer_uimanager

Reviewed By: christophpurrer

Differential Revision: D77038183

fbshipit-source-id: 736651e170884f69313711f744c40194f259bfa1
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 269cf58140 Add react_cxx_platform_react_renderer_scheduler cmake (#52174)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52174

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_renderer_scheduler

Reviewed By: christophpurrer

Differential Revision: D77038129

fbshipit-source-id: f843c719d08f42f379042484542f4f4e5b94a2c6
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 941853974b Add react_cxx_platform_react_renderer_animated cmake (#52173)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52173

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_renderer_animated

Reviewed By: christophpurrer

Differential Revision: D77038030

fbshipit-source-id: 6ca45f0251c74dc49b5c1d72c42575b80248eb2a
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 36c0826f56 Add react_cxx_platform_react_profiling cmake (#52172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52172

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_profiling

Reviewed By: christophpurrer

Differential Revision: D77037934

fbshipit-source-id: 555a00cc59d48fd167810ba29075fb4cb3e53d62
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 7970f79078 Add react_cxx_platform_react_nativemodule cmake (#52171)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52171

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_nativemodule

Reviewed By: christophpurrer

Differential Revision: D77037835

fbshipit-source-id: 09346824c5e39ca9c41edeb22462d65408d95f18
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 37e863e866 Add react_cxx_platform_react_logging cmake (#52170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52170

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_logging

Reviewed By: christophpurrer

Differential Revision: D77037715

fbshipit-source-id: ea21160473d876c0014dcfc2d17323b2e0c4c0b2
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 5961edd825 Add react_cxx_platform_react_io cmake (#52169)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52169

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_io

Reviewed By: christophpurrer

Differential Revision: D77037593

fbshipit-source-id: 849c2b0b0de14b9a583b997f3137763df59b4af1
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 71d6d86ed6 Add react_cxx_platform_react_http cmake (#52167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52167

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_http

Reviewed By: christophpurrer

Differential Revision: D77037486

fbshipit-source-id: 7e90ed26cefa407a1e64ebdad8ac5835803c2c49
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 0a7e1342cd Add react_cxx_platform_react_devsupport cmake (#52166)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52166

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_devsupport

Reviewed By: christophpurrer

Differential Revision: D77037372

fbshipit-source-id: e6ed42492f29abfb93fe22b0c01a5d3a2ca7cf53
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 891656d055 Add react_cxx_platform_react_coremodules cmake (#52165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52165

Changelog: [Internal]
Add cmake lib react_cxx_platform_react_coremodules

Reviewed By: christophpurrer

Differential Revision: D77036283

fbshipit-source-id: 54141d32f61d1025ae40c60335a6831ec038217e
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot abbef4a0b8 Add react_renderer_observers_mutation cmake (#52164)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52164

Changelog: [Internal]
Add cmake library react_renderer_observers_mutation

Reviewed By: christophpurrer

Differential Revision: D77036195

fbshipit-source-id: 6661b6aecab83b1fd254dd7f7fca1c906538aee5
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot e888329e9a Add react_renderer_observers_intersection cmake (#52163)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52163

Changelog: [Internal]
Add cmake library react_renderer_observers_intersection

Reviewed By: christophpurrer

Differential Revision: D77036086

fbshipit-source-id: 9f7c2c9574c09f7775362a6155433fa194111f0b
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 1f8374e1dd Add react_nativemodule_webperformance cmake (#52162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52162

Changelog: [Internal]
Add cmake library react_nativemodule_webperformance

Reviewed By: christophpurrer

Differential Revision: D77035999

fbshipit-source-id: da267ddf10d9a9de315038142f7764d81190131a
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot a10ee5808b Add react_nativemodule_mutationobserver cmake (#52161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52161

Changelog: [Internal]
Add missing lib react_nativemodule_mutationobserver

Reviewed By: christophpurrer

Differential Revision: D77035742

fbshipit-source-id: f900024f0ad4f4e4596c4fa5730463277ee17242
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot ab2ce4f2d8 add react_nativemodule_intersectionobserver cmake (#52160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52160

Changelog: [Internal]
Add missing cmake lib for react_nativemodule_intersectionobserver

Reviewed By: christophpurrer

Differential Revision: D77035609

fbshipit-source-id: d6c372d48a2c60b403b33d1477e6085347fe8633
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot ee256d11ae Add react_nativemodule_fantomspecificmethods cmake (#52159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52159

Changelog: [Internal]
Add missing cmake target for react_nativemodule_fantomspecificmethods

Reviewed By: christophpurrer

Differential Revision: D77035521

fbshipit-source-id: caedff8d4479c1bff3d03ec149b15a8cd5458092
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 1f53d51e64 RN] Add missing link libraries for react_nativemodule_defaults (#52158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52158

Changelog: [Internal]
As title

Reviewed By: christophpurrer

Differential Revision: D77035424

fbshipit-source-id: 745cecd5e6d16a8cea6b2a883992fec75b565d31
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 4f71a9434d Create react/nativemodule/cputime/CMakeLists.txt (#52157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52157

Changelog: [Internal]

Add CMakeLists for `react/nativemodule/cputime`

Reviewed By: christophpurrer

Differential Revision: D77035337

fbshipit-source-id: c18289ed0558f8be7ba62f71bd74978a7c768e11
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot ed9969b3d0 Fix cmake build for devtoolsruntimesettings (#52156)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52156

Changelog: [Internal]

Fix devtoolsruntimesettings lib as it needs to be OBJECT library as it has source code included.

Reviewed By: christophpurrer

Differential Revision: D77035122

fbshipit-source-id: 27ad7fe637512afc79f3dcc6b0846dcfd4f22504
2025-06-22 23:48:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 04da4800da Gate RN_SERIALIZABLE_STATE behind ANDROID flag (#52155)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52155

Changelog: [Internal]

Gating RN_SERIALIZABLE_STATE behind ANDROID flag so we can build ReactCommon with cmake when targeting different platforms.
This will help build reac-native-fantom for OSS.

Reviewed By: christophpurrer

Differential Revision: D77034689

fbshipit-source-id: 15f9192c90693f4743f31fcf72f593802b622c47
2025-06-22 23:48:38 -07:00
Jakub PiaseckiandFacebook GitHub Bot bc093b8fa9 Remove undefined from optional type members in the API snapshot (#52009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52009

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76596252

fbshipit-source-id: 3d6c0ee10cbbb71435933e2ad74f1acc962f14b4
2025-06-22 23:29:29 -07:00
buschcoandFacebook GitHub Bot fbbd20dd63 publish index.js.flow instead of index.flow.js (#52179)
Summary:
I think in https://github.com/facebook/react-native/commit/50667eceb1be4771375d6a3cc2f4e42d4d8aad3a the file name was mixed up. Instead of `index.flow.js` it should be `index.js.flow` (see https://github.com/facebook/react-native/blob/main/packages/react-native/index.js.flow)

Should fix https://github.com/facebook/react-native/issues/51885

## Changelog:

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

[General][Added] Publish top-level Flow types for `react-native`

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

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

Test Plan:
Steps to reproduce

1. Setup a react-native project with flow (or clone https://github.com/buschco/react-native-flow + `cd ReproducerApp && npm i`)
2. `import {Alert} from 'react-native'` -> `Alert` has type `any`
3. add `index.js.flow` File (https://github.com/facebook/react-native/blob/v0.79.3/packages/react-native/index.js.flow) to `node_modules/react-native/index.js.flow` -> `Alert` no longer `any`

Reviewed By: christophpurrer

Differential Revision: D77052871

Pulled By: robhogan

fbshipit-source-id: 32b0052a9d96486aff66a1f6e4577ff62cbcd97e
2025-06-21 01:06:03 -07:00
Zeya PengandFacebook GitHub Bot 710e08cd54 Add Fantom test for layout props & fix an issue in c++ animated (#52110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52110

## Changelog:

[General] [Internal] - Add Fantom test for layout props

With this test it turns out `layoutStyleUpdated_` on PropsAnimatedNode actually can change after animation update, because its connected StyleAnimatedNodes might be changing. This bug was introduced since D74602321

Reviewed By: rshest

Differential Revision: D76753864

fbshipit-source-id: 5bebb11340086390df20c89adf80abaa63cadc90
2025-06-20 16:04:48 -07:00
Zeya PengandFacebook GitHub Bot cc442eb8c8 Add Fantom.getFabricUpdateProps (#52108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52108

## Changelog:

[General] [Added] - Add Fantom.getFabricUpdateProps

For reading fabric update props scheduled via `UIManager::updateShadowTree`

Reviewed By: rshest

Differential Revision: D76857429

fbshipit-source-id: d19312d0b1c6460258a7949054e66313f05afdbf
2025-06-20 16:04:48 -07:00
Mateo GuzmánandFacebook GitHub Bot aaad7e083d Kotlin: fix static code analysis weak warnings (1/n) (#52153)
Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Convert to primary constructor](https://www.jetbrains.com/help/inspectopedia/ConvertSecondaryConstructorToPrimary.html)
- [If-Then foldable to '?.'](https://www.jetbrains.com/help/inspectopedia/IfThenToSafeAccess.html)
- [Non-canonical modifier order](https://www.jetbrains.com/help/inspectopedia/SortModifiers.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (1/n)

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

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

Reviewed By: christophpurrer

Differential Revision: D77042260

Pulled By: arushikesarwani94

fbshipit-source-id: ea210976ccbcecbe4843ff5205238a83fc75d43b
2025-06-20 16:03:34 -07:00
Nicola CortiandFacebook GitHub Bot 999f437b02 Add categories for 0.80 changelog
Summary:
I've added categories for all the entries + sorted them alphabetically.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: fabriziocucci

Differential Revision: D77025334

fbshipit-source-id: 4c29bf3fa299078689473d7cf3c7cf8a79f4c097
2025-06-20 10:21:52 -07:00
Pieter De BaetsandFacebook GitHub Bot ffb37373ba Schedule OnViewAttachMountItems in GuardedRunnable (#52143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52143

Noticed that some of the `IndexOutOfBoundsException` crashes we've been tracking we're not being reported as soft errors because they were not running wrapped by the RN ExceptionHandler

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D77017423

fbshipit-source-id: 760297a0c5ee3d58577931829a31d312dacffdf1
2025-06-20 08:42:32 -07:00
Alex HuntandFacebook GitHub Bot e297fe1582 Improve CLI output for build-types (#52151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52151

Update `yarn build-types` with incremental progress output in the terminal. Minor refactoring.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77022957

fbshipit-source-id: d4a000a85c779fbdcda317164413b29674474178
2025-06-20 08:21:29 -07:00
Andrew DatsenkoandFacebook GitHub Bot 386a930afb HermesInstance::createJSRuntime integration (#52111)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52111

Changelog: [Internal]

JSRuntime integration with executor on messagequeue.

Inching closer to full integration with the rest of RN.

Reviewed By: rshest

Differential Revision: D76752667

fbshipit-source-id: 0ef8fe0c615dc1eb45355f7502e01663772ebf13
2025-06-20 07:08:28 -07:00
Nicola CortiandFacebook GitHub Bot 281f48daf4 Bump compileSdk to 36 (#52141)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52141

This is to make sure we're using buildTools 36 (Android 16) to compile everything.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D77014531

fbshipit-source-id: 65b16abce7f88c4a4c0b8b1b77e632cff2e64197
2025-06-20 06:09:47 -07:00
Mateo GuzmánandFacebook GitHub Bot a44098ea27 Kotlin: clean up redundant visibility modifiers (2/2) (#52139)
Summary:
Follow up from https://github.com/facebook/react-native/issues/51960, this PR cleans up the remaining warnings for redundant visibility modifiers detected by static code analysis.

## Changelog:

[INTERNAL] - Kotlin: clean up redundant visibility modifiers (2/2)

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

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

Reviewed By: cortinico

Differential Revision: D76997415

Pulled By: sbuggay

fbshipit-source-id: 77244dc83f8ecbf90cf3ade0f299930871ab3ae9
2025-06-20 00:00:28 -07:00
Arushi KesarwaniandFacebook GitHub Bot 0f7bf66bba Adding shouldForwardToReactInstance check in ReactDelegate for Bridgeless (#52112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52112

Adding `shouldForwardToReactInstance` check in Bridgeless since it was missed in https://github.com/facebook/react-native/pull/43351

**Changelog:**
[ANDROID][FIXED] - Adding `shouldForwardToReactInstance` check in ReactDelegate for Bridgeless

Reviewed By: cortinico, javache

Differential Revision: D76908041

fbshipit-source-id: 20b8fce248d8e560ab862cf325b6f8b15be870e3
2025-06-19 18:37:50 -07:00
Sophie LandFacebook GitHub Bot 14a213229a fix: improve the grammar/clarity of the stale bot comments (#52124)
Summary:
this PR makes the stale bot messages a bit clearer and fixes a grammatical issue.

# Changelog:

[INTERNAL] [FIXED] Tweak stale bot messages

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

Test Plan: N/A

Reviewed By: andrewdacenko

Differential Revision: D76969503

Pulled By: cortinico

fbshipit-source-id: d030a0488b44521f61447e252bae5ded10826dbb
2025-06-19 10:42:05 -07:00
Nicola CortiandFacebook GitHub Bot 4223285a23 Fix broken LayoutableShadowNodeTest after Modal fix. (#52130)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52130

After D73948178, Modals now need to access JNI to get the dimension of the
screen to properly position the modal on first rendering.

Before my change, the Modal was positioned in 0,0 (which is the default
behavior for CXX).
I'm suppressing this test for Android, as it will keep on running with the
previous behavior for CXX.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D76979787

fbshipit-source-id: 78675712f97baee29036f943b2a8bcd23047e4ed
2025-06-19 10:31:53 -07:00
Nicola CortiandFacebook GitHub Bot 55b87a5293 Make PointerEvent internal (#52131)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52131

This class is not used in OSS and can be made internal.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D76979122

fbshipit-source-id: 2d81e3605e6c51336b3bdb2671dd9faf8f25639b
2025-06-19 09:59:27 -07:00
Nicola CortiandFacebook GitHub Bot 0cf2985d27 Convert PointerEvent to Kotlin (#52132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52132

This is yet another class that is getting converted from Java to Kotlin.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D76979123

fbshipit-source-id: d1fc54e61d64b78a56cf0198ae5fe588702a8698
2025-06-19 09:59:27 -07:00
nishan (o^▽^o)andFacebook GitHub Bot 2f3b104224 - Use CAGradientLayer for linear gradient (#52096)
Summary:
This PR replaces Core Graphics implementation with Core Animation for linear gradients. I came across a great [solution](https://stackoverflow.com/questions/38821631/cagradientlayer-diagonal-gradient/43176174#43176174) that makes the `CAGradientLayer`'s start and end point behaviour CSS spec compliant. This will make gradients much more performant.

## Changelog:

[IOS] [CHANGED] - Optimised Linear Gradients.
<!-- 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/52096

Test Plan:
Non breaking change. Test Linear gradient example from RNTester. Compare results with web, android and iOS. Each platform should render the gradients identically.

## Note:

I will be doing a PR to use `CAGradientLayer` for radial gradients as well. The next properties that I have locally working are `background-size`, `background-position` and `background-repeat`. These will be addressed in small PRs.

Reviewed By: NickGerleman

Differential Revision: D76905215

Pulled By: javache

fbshipit-source-id: 0094bdf70869d619272d491dd496983316b0dbf0
2025-06-19 09:50:45 -07:00
Pieter De BaetsandFacebook GitHub Bot 6a3116a8a9 Add screenshot tests for LinearGradient (#52128)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52128

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D76972006

fbshipit-source-id: 657b78a842578df46f81d2416726665f49655a4f
2025-06-19 09:50:45 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 432ad09c41 Remove usage of SafeAreaView from RNTester (#52129)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52129

This remove all the usages of SafeAreaView from RNTester.
The problem is that we introduced a warning that SafEAreaView is deprecated and, therefore, we had a warning in debug mode.

This was causing a yellow bubble to appear and the OSS E2E test started failing.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76978227

fbshipit-source-id: c45a31bae1602bc307e4fbbd71e7987a8ed78858
2025-06-19 09:29:40 -07:00
Nicola CortiandFacebook GitHub Bot b950fa2afb Fix Modal first frame being rendered on top-left corner (#51048)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51048

Fixes https://github.com/facebook/react-native/issues/50442
Closes https://github.com/facebook/react-native/pull/50704

Users reported that Modals on Android are first renderer anchored in 0,0.
That results in them being on the top left corner of the screen for some seconds.

This is happening because the native state of the Modal on Android as width/height set at 0,0 - which we then update in a subsequent callback.

I'm fixing this by making sure we render the Modal the first time with the right screen size - the status bar size

Changelog:
[Android] [Fixed] - Fix Modal first frame being rendered on top-left corner

Reviewed By: javache

Differential Revision: D73948178

fbshipit-source-id: 055c12aa62d70acc1e4c5a2a5c4ea0c5608e22c7
2025-06-19 06:21:16 -07:00
Ruslan LesiutinandFacebook GitHub Bot 52df5dee91 Update debugger-frontend from 68cfd0a...d95ac13 (#52119)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52119

Changelog: [Internal] - Update `react-native/debugger-frontend` from 68cfd0a...d95ac13

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/68cfd0ae84acb0ed8e47b421afd64ae3b0b5b727...d95ac13bf0ab64a5e6c2eb18eb138587063b9c34).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [d95ac13bf](https://github.com/facebook/react-native-devtools-frontend/commit/d95ac13bf) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-18T12:35:02+01:00 | [fix: hide workplace suggest on Sources placeholder element (#180)](https://github.com/facebook/react-native-devtools-frontend/commit/d95ac13bf) |

Reviewed By: huntie

Differential Revision: D76919604

fbshipit-source-id: 55aa28f9fc9288df71019e8ca9001b35863395b1
2025-06-19 05:08:55 -07:00
Mateo GuzmánandFacebook GitHub Bot 50ea5b4380 Migrate ReactDelegate to Kotlin (#52024)
Summary:
Migrate com.facebook.react.ReactDelegate to Kotlin.

## Changelog:

[ANDROID][BREAKING] - Migrate com.facebook.react.ReactDelegate to Kotlin. Some users implementing this class in Kotlin could have breakages.

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

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

Reviewed By: javache

Differential Revision: D76740335

Pulled By: cortinico

fbshipit-source-id: d9ad948a71438070500685042c067f621fd3ea26
2025-06-19 04:33:53 -07:00
Nicola CortiandFacebook GitHub Bot 184664d47b Fix support for react.internal.useHermesNightly (#52127)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52127

Currently using `react.internal.useHermesNightly` is broken locally because we try to search for versions such as 0.0.0.+ while the nightlies version are of the form 0.81.0-...

This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: NickGerleman

Differential Revision: D76901197

fbshipit-source-id: 51f7b2e7ec936aace67d4d62a8019554800347fc
2025-06-19 03:51:52 -07:00
Mateo GuzmánandFacebook GitHub Bot 2b75479fa2 Migrate to Kotlin and internalize MountItemDispatcher (#52121)
Summary:
Migrate to Kotlin and internalize com.facebook.react.fabric.mounting.MountItemDispatcher.

This class has [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.fabric.mounting.MountItemDispatcher) so it can be internalized as well as it exposes some other internal classes and we don't want to make those public again.

## Changelog:

[ANDROID][CHANGED] - Migrate to Kotlin and internalize com.facebook.react.fabric.mounting.MountItemDispatcher

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

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

Reviewed By: cortinico, rshest

Differential Revision: D76967018

Pulled By: javache

fbshipit-source-id: def4be448db15705fc11e50e3fe8f9e532d973bb
2025-06-19 03:48:27 -07:00
Rubén NorteandFacebook GitHub Bot 2a52ee8ddb Clean up feature flag enableIntersectionObserverEventLoopIntegration (#52102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52102

Changelog: [internal]

This ships the variant of IntersectionObserver that integrates directly with the Event Loop, avoiding dispatching notifications during observation and waiting for the end of the Event Loop tick instead. Also cleans up all the associated feature flags.

Reviewed By: lenaic

Differential Revision: D76892649

fbshipit-source-id: 9364b43a4d60b75c25b9a2d6ced7937b03376b04
2025-06-19 02:48:39 -07:00
Mateo GuzmánandFacebook GitHub Bot 1d945629bf Clean up incorrect @VisibleForTesting annotation usages (#52025)
Summary:
Static code analysis reports 18 warnings for incorrect usages of the `VisibleForTesting` annotation as some of the classes/functions/properties that are annotated are not used only in tests but also in other non-test files across the codebase. This PR cleans that up to fix those warnings.

## Changelog:

[INTERNAL] - Clean up incorrect VisibleForTesting annotation usages

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

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

Reviewed By: rshest

Differential Revision: D76745241

Pulled By: sbuggay

fbshipit-source-id: 4702a7258002916cc95c178dc8931c8bb471f7bc
2025-06-18 22:25:09 -07:00
Mateo GuzmánandFacebook GitHub Bot 7885508f9b Migrate ReactTextShadowNode to Kotlin (#52116)
Summary:
Migrate com.facebook.react.views.text.ReactTextShadowNode to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.text.ReactTextShadowNode to Kotlin

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

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

Reviewed By: NickGerleman

Differential Revision: D76930707

Pulled By: sbuggay

fbshipit-source-id: 8e5c2c1b96ccaa2185d5c7f606e204470c401cbd
2025-06-18 20:59:02 -07:00
Joe VilchesandFacebook GitHub Bot 5e331304cb Comma separate co-opted accessibility labels (#52120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52120

It is pretty jarring for semantically different labels to be read all at once, let's comma separate them - which VoiceOver will pause at. Android does this by default with its coopting implementation

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D76921000

fbshipit-source-id: afe1f93e38babde918137576d0693c1579101ef7
2025-06-18 15:20:56 -07:00
Luna WeiandFacebook GitHub Bot f00b449498 Export unstable_VirtualView with iOS, Android implementations (#51980)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51980

Changelog: [Internal] - Export unstable_VirtualView. This is currently experimental

Reviewed By: mdvacca

Differential Revision: D76471250

fbshipit-source-id: 107b82c9ac93b31d7e30ea3473e341788176cdde
2025-06-18 14:11:39 -07:00
Peter AbbondanzoandFacebook GitHub Bot 94cbf206d6 Remove focus change listener and restore original when dropping view instance (#52093)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52093

This change updates the `BaseViewManager` implementation to drop and restore the original focus listener when a view instance has its `onDropViewInstance` method called. This is necessary to support view recycling, since the `addEventEmitters` method is called each time a recycled view is popped out of the stack. This would result in N+1 `onFocus`/`onBlur` calls for each time the view is recycled.

Changelog: [Android][Fixed] - Remove focus change listener when dropping/recycling view instances

Reviewed By: NickGerleman

Differential Revision: D76852137

fbshipit-source-id: 9e980e7a1850a952baf04724bc251ff32186c6fa
2025-06-18 11:21:32 -07:00
Rubén NorteandFacebook GitHub Bot 6bfc1187a8 Improve formatting for benchmark output (#52106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52106

Changelog: [internal]

This slightly improves the formatting of the output produced by benchmarks, so we can just copy&paste the result to share it as valid Markdown.

Reviewed By: christophpurrer

Differential Revision: D76898244

fbshipit-source-id: dc1040ee3787c7f0dcb747c9fba8eb14086a0087
2025-06-18 09:36:36 -07:00
Rubén NorteandFacebook GitHub Bot 29704b1f02 Add support for Static Hermes staging in Fantom (#52105)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52105

Changelog: [internal]

I just learnt there's a Hermes variant that we don't support (staging) so this adds support for it.

Reviewed By: christophpurrer

Differential Revision: D76897715

fbshipit-source-id: 3113edde3c785d71ad4a57dd435f16e13ab46976
2025-06-18 09:36:36 -07:00
1944 changed files with 66017 additions and 42444 deletions
-9
View File
@@ -9,12 +9,3 @@ end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
[*.gradle]
indent_size = 4
[*.kts]
indent_size = 4
[BUCK]
indent_size = 4
+2 -5
View File
@@ -47,6 +47,7 @@ packages/react-native/flow/
[options]
enums=true
experimental.pattern_matching=true
casting_syntax=both
component_syntax=true
@@ -74,11 +75,7 @@ module.system.haste.module_ref_prefix=m#
react.runtime=automatic
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty
ban_spread_key_props=true
@@ -103,4 +100,4 @@ untyped-import
untyped-type-import
[version]
^0.273.1
^0.278.0
@@ -1,6 +1,6 @@
name: 🔍 Debugger - Bug Report
description: Report a bug with React Native DevTools and the New Debugger
labels: ["Needs: Triage :mag:", "Debugger"]
labels: ["Needs: Triage :mag:", "Debugging"]
body:
- type: markdown
+6 -12
View File
@@ -4,9 +4,6 @@ inputs:
release-type:
required: true
description: The type of release we are building. It could be nightly, release or dry-run
run-e2e-tests:
default: 'false'
description: If we need to build to run E2E tests. If yes, we need to build also x86.
gradle-cache-encryption-key:
description: "The encryption key needed to store the Gradle Configuration cache"
runs:
@@ -31,10 +28,11 @@ runs:
uses: actions/cache/restore@v4
with:
path: /github/home/.cache/ccache
key: v1-ccache-android-${{ github.job }}-${{ github.ref }}
key: v2-ccache-android-${{ github.job }}-${{ github.ref }}-${{ hashFiles('packages/react-native/ReactAndroid/**/*.cpp', 'packages/react-native/ReactAndroid/**/*.h', 'packages/react-native/ReactCommon/**/*.cpp', 'packages/react-native/ReactAndroid/**/CMakeLists.txt', 'packages/react-native/ReactCommon/**/CMakeLists.txt') }}
restore-keys: |
v1-ccache-android-${{ github.job }}-
v1-ccache-android-
v2-ccache-android-${{ github.job }}-${{ github.ref }}-
v2-ccache-android-${{ github.job }}-
v2-ccache-android-
- name: Show ccache stats
shell: bash
run: ccache -s -v
@@ -43,11 +41,7 @@ runs:
run: |
if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then
# dry-run: we only build ARM64 to save time/resources. For release/nightlies the default is to build all archs.
if [[ "${{ inputs.run-e2e-tests }}" == 'true' ]]; then
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing
else
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a"
fi
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing
TASKS="publishAllToMavenTempLocal build"
elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then
# nightly: we set isSnapshot to true so artifacts are sent to the right repository on Maven Central.
@@ -63,7 +57,7 @@ runs:
uses: actions/cache/save@v4
with:
path: /github/home/.cache/ccache
key: v1-ccache-android-${{ github.job }}-${{ github.ref }}
key: v2-ccache-android-${{ github.job }}-${{ github.ref }}-${{ hashFiles('packages/react-native/ReactAndroid/**/*.cpp', 'packages/react-native/ReactAndroid/**/*.h', 'packages/react-native/ReactCommon/**/*.cpp', 'packages/react-native/ReactAndroid/**/CMakeLists.txt', 'packages/react-native/ReactCommon/**/CMakeLists.txt') }}
- name: Show ccache stats
shell: bash
run: ccache -s -v
@@ -15,8 +15,6 @@ runs:
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore Cached Artifacts
@@ -45,6 +43,8 @@ runs:
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
fi
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Yarn- Install Dependencies
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: ./.github/actions/yarn-install
@@ -14,23 +14,23 @@ runs:
uses: actions/download-artifact@v4
with:
name: hermes-workspace
path: 'D:\tmp\hermes'
path: 'C:\tmp\hermes'
- name: Set up workspace
shell: powershell
run: |
mkdir -p D:\tmp\hermes\osx-bin
mkdir -p C:\tmp\hermes\osx-bin
mkdir -p .\packages\react-native\sdks\hermes
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force C:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
- name: Windows cache
uses: actions/cache@v4
with:
key: v3-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
path: |
D:\tmp\hermes\win64-bin\
D:\tmp\hermes\hermes\icu\
D:\tmp\hermes\hermes\deps\
D:\tmp\hermes\hermes\build_release\
C:\tmp\hermes\win64-bin\
C:\tmp\hermes\hermes\icu\
C:\tmp\hermes\hermes\deps\
C:\tmp\hermes\hermes\build_release\
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1.3.2
- name: Set up workspace
@@ -83,4 +83,4 @@ runs:
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-win64-bin
path: D:\tmp\hermes\win64-bin\
path: C:\tmp\hermes\win64-bin\
+3 -3
View File
@@ -116,12 +116,12 @@ runs:
- name: Print Artifacts Directory
shell: bash
run: ls -lR ./packages/react-native/ReactAndroid/external-artifacts/artifacts/
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup gradle
uses: ./.github/actions/setup-gradle
with:
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Build packages
@@ -129,7 +129,7 @@ runs:
run: yarn build
- name: Build types
shell: bash
run: yarn build-types
run: yarn build-types --skip-snapshot
# Continue with publish steps
- name: Set npm credentials
if: ${{ inputs.release-type == 'release' ||
@@ -14,6 +14,8 @@ inputs:
runs:
using: composite
steps:
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Yarn install
uses: ./.github/actions/yarn-install
- name: Configure Git
@@ -0,0 +1,23 @@
name: diff-js-api-breaking-changes
description: Check for breaking changes in the public React Native JS API
runs:
using: composite
steps:
- name: Fetch snapshot from PR head
shell: bash
env:
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
run: |
mkdir $SCRATCH_DIR
git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
git show ${{ github.event.pull_request.head.sha }}:packages/react-native/ReactNativeApi.d.ts > $SCRATCH_DIR/ReactNativeApi-after.d.ts \
|| echo "" > $SCRATCH_DIR/ReactNativeApi.d.ts
- name: Run breaking change detection
shell: bash
env:
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
run: |
node ./scripts/js-api/diff-api-snapshot \
${{ github.workspace }}/packages/react-native/ReactNativeApi.d.ts \
$SCRATCH_DIR/ReactNativeApi-after.d.ts \
> $SCRATCH_DIR/output.json
+1 -1
View File
@@ -49,7 +49,7 @@ runs:
run: yarn run lint-markdown
- name: Build types
shell: bash
run: yarn build-types
run: yarn build-types --skip-snapshot
- name: Run typescript check of generated types
shell: bash
run: yarn test-generated-typescript
+2
View File
@@ -35,6 +35,8 @@ runs:
with:
java-version: '17'
distribution: 'zulu'
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Start Metro in Debug
@@ -17,9 +17,6 @@ outputs:
runs:
using: composite
steps:
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup hermes version
shell: bash
id: hermes-version
@@ -67,6 +64,8 @@ runs:
echo "HERMES_CACHED=true" >> "$GITHUB_OUTPUT"
fi
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Yarn- Install Dependencies
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
uses: ./.github/actions/yarn-install
@@ -0,0 +1,83 @@
name: Run Fantom Tests
inputs:
release-type:
required: true
description: The type of release we are building. It could be nightly, release or dry-run
gradle-cache-encryption-key:
description: "The encryption key needed to store the Gradle Configuration cache"
runs:
using: composite
steps:
- name: Install dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y git cmake openssl libssl-dev clang
- name: Setup git safe folders
shell: bash
run: git config --global --add safe.directory '*'
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Install node dependencies
uses: ./.github/actions/yarn-install
- name: Setup gradle
uses: ./.github/actions/setup-gradle
with:
cache-read-only: "false"
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
- name: Restore Fantom ccache
uses: actions/cache/restore@v4
with:
path: /github/home/.cache/ccache
key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(
'packages/react-native/ReactAndroid/**/*.cpp',
'packages/react-native/ReactAndroid/**/*.h',
'packages/react-native/ReactAndroid/**/CMakeLists.txt',
'packages/react-native/ReactCommon/**/*.cpp',
'packages/react-native/ReactCommon/**/*.h',
'packages/react-native/ReactCommon/**/CMakeLists.txt',
'private/react-native-fantom/tester/**/*.cpp',
'private/react-native-fantom/tester/**/*.h',
'private/react-native-fantom/tester/**/CMakeLists.txt'
) }}
restore-keys: |
v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-
v2-ccache-fantom-${{ github.job }}-
v2-ccache-fantom-
- name: Show ccache stats
shell: bash
run: ccache -s -v
- name: Run Fantom Tests
shell: bash
run: yarn fantom
env:
CC: clang
CXX: clang++
- name: Save Fantom ccache
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
uses: actions/cache/save@v4
with:
path: /github/home/.cache/ccache
key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(
'packages/react-native/ReactAndroid/**/*.cpp',
'packages/react-native/ReactAndroid/**/*.h',
'packages/react-native/ReactAndroid/**/CMakeLists.txt',
'packages/react-native/ReactCommon/**/*.cpp',
'packages/react-native/ReactCommon/**/*.h',
'packages/react-native/ReactCommon/**/CMakeLists.txt',
'private/react-native-fantom/tester/**/*.cpp',
'private/react-native-fantom/tester/**/*.h',
'private/react-native-fantom/tester/**/CMakeLists.txt'
) }}
- name: Show ccache stats
shell: bash
run: ccache -s -v
- name: Upload test results
if: ${{ always() }}
uses: actions/upload-artifact@v4.3.4
with:
name: run-fantom-tests-results
compression-level: 1
path: |
private/react-native-fantom/build/reports
+1 -1
View File
@@ -4,7 +4,7 @@ inputs:
node-version:
description: 'The node.js version to use'
required: false
default: '22'
default: '22.14.0'
runs:
using: "composite"
steps:
@@ -1,32 +0,0 @@
name: setup-xcode-build-cache
description: Add caching to iOS jobs to speed up builds
inputs:
hermes-version:
description: The version of hermes
required: true
flavor:
description: The flavor that is going to be built
default: Debug
use-frameworks:
description: Whether we are bulding with DynamicFrameworks or StaticLibraries
default: StaticLibraries
ruby-version:
description: The ruby version we are going to use
default: 2.6.10
runs:
using: composite
steps:
- name: See commands.yml with_xcodebuild_cache
shell: bash
run: echo "See commands.yml with_xcodebuild_cache"
- name: Cache podfile lock
uses: actions/cache@v4
with:
path: packages/rn-tester/Podfile.lock
key: v13-podfilelock-${{ github.job }}-NewArch-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }}
- name: Cache cocoapods
uses: actions/cache@v4
with:
path: packages/rn-tester/Pods
key: v15-cocoapods-${{ github.job }}-NewArch-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}
+11 -2
View File
@@ -23,6 +23,8 @@ runs:
uses: ./.github/actions/setup-xcode
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Create Hermes folder
shell: bash
run: mkdir -p "$HERMES_WS_DIR"
@@ -34,8 +36,6 @@ runs:
- name: Print Downloaded hermes
shell: bash
run: ls -lR "$HERMES_WS_DIR"
- name: Run yarn
uses: ./.github/actions/yarn-install
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
@@ -48,6 +48,14 @@ runs:
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
uses: actions/download-artifact@v4
with:
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }};
shell: bash
run: |
@@ -73,6 +81,7 @@ runs:
TARBALL_FILENAME=$(node ../../packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
yarn bootstrap ios "${args[@]}" | cat
+9 -7
View File
@@ -94,23 +94,25 @@ runs:
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Setup xcode build cache
uses: ./.github/actions/setup-xcode-build-cache
- name: Download React Native Prebuilds
uses: actions/download-artifact@v4
with:
hermes-version: ${{ inputs.hermes-version }}
use-frameworks: ${{ inputs.use-frameworks }}
flavor: ${{ inputs.flavor }}
ruby-version: ${{ inputs.ruby-version }}
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Install CocoaPods dependencies
shell: bash
run: |
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
export USE_FRAMEWORKS=dynamic
fi
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
cd packages/rn-tester
bundle install
@@ -31,7 +31,7 @@ runs:
run: |
cd /tmp/RNApp/ios
bundle install
bundle exec pod install
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
xcodebuild build \
-workspace RNApp.xcworkspace \
-scheme RNApp \
@@ -0,0 +1,895 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const {
FirebaseClient,
compareResults,
getYesterdayDate,
getTodayDate,
} = require('../firebaseUtils');
describe('FirebaseClient', () => {
const originalFetch = global.fetch;
const originalEnv = process.env;
beforeEach(() => {
global.fetch = jest.fn();
process.env = {
...originalEnv,
FIREBASE_APP_EMAIL: 'test@example.com',
FIREBASE_APP_PASS: 'testpassword',
FIREBASE_APP_APIKEY: 'test-api-key',
FIREBASE_APP_PROJECTNAME: 'test-project',
};
jest.spyOn(console, 'log').mockImplementation(() => {});
jest.spyOn(console, 'error').mockImplementation(() => {});
});
afterEach(() => {
global.fetch = originalFetch;
process.env = originalEnv;
jest.restoreAllMocks();
});
describe('constructor', () => {
it('should initialize with environment variables', () => {
const client = new FirebaseClient();
expect(client.email).toBe('test@example.com');
expect(client.password).toBe('testpassword');
expect(client.apiKey).toBe('test-api-key');
expect(client.projectId).toBe('test-project');
expect(client.databaseUrl).toBe('test-project.firebaseio.com');
expect(client.idToken).toBeNull();
});
});
describe('authenticate', () => {
it('should authenticate successfully', async () => {
const mockResponse = {
idToken: 'mock-id-token',
refreshToken: 'mock-refresh-token',
};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResponse)),
});
const client = new FirebaseClient();
await client.authenticate();
expect(client.idToken).toBe('mock-id-token');
expect(global.fetch).toHaveBeenCalledWith(
'https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=test-api-key',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'test@example.com',
password: 'testpassword',
returnSecureToken: true,
}),
},
);
});
it('should throw error when email is missing', async () => {
delete process.env.FIREBASE_APP_EMAIL;
const client = new FirebaseClient();
await expect(client.authenticate()).rejects.toThrow(
'Firebase credentials not found in environment variables',
);
});
it('should throw error when password is missing', async () => {
delete process.env.FIREBASE_APP_PASS;
const client = new FirebaseClient();
await expect(client.authenticate()).rejects.toThrow(
'Firebase credentials not found in environment variables',
);
});
it('should handle authentication failure', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 400,
text: jest.fn().mockResolvedValueOnce(
JSON.stringify({
error: {message: 'Invalid credentials'},
}),
),
});
const client = new FirebaseClient();
await expect(client.authenticate()).rejects.toThrow(
'HTTP 400: Invalid credentials',
);
});
});
describe('makeRequest', () => {
it('should make successful GET request', async () => {
const mockData = {test: 'data'};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockData)),
});
const client = new FirebaseClient();
const result = await client.makeRequest('example.com', '/test', 'GET');
expect(result).toEqual(mockData);
expect(global.fetch).toHaveBeenCalledWith('https://example.com/test', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
});
it('should make successful POST request with data', async () => {
const mockData = {success: true};
const postData = {test: 'post data'};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockData)),
});
const client = new FirebaseClient();
const result = await client.makeRequest(
'example.com',
'/test',
'POST',
postData,
);
expect(result).toEqual(mockData);
expect(global.fetch).toHaveBeenCalledWith('https://example.com/test', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(postData),
});
});
it('should handle non-JSON response', async () => {
const textResponse = 'plain text response';
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(textResponse),
});
const client = new FirebaseClient();
const result = await client.makeRequest('example.com', '/test', 'GET');
expect(result).toBe(textResponse);
});
it('should handle HTTP error with JSON error message', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce(
JSON.stringify({
error: {message: 'Not found'},
}),
),
});
const client = new FirebaseClient();
await expect(
client.makeRequest('example.com', '/test', 'GET'),
).rejects.toThrow('HTTP 404: Not found');
});
it('should handle HTTP error with plain text error message', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 500,
text: jest.fn().mockResolvedValueOnce('Internal Server Error'),
});
const client = new FirebaseClient();
await expect(
client.makeRequest('example.com', '/test', 'GET'),
).rejects.toThrow('HTTP 500: Internal Server Error');
});
});
describe('makeDatabaseRequest', () => {
it('should make database request with existing token', async () => {
const mockData = {test: 'data'};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockData)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.makeDatabaseRequest('2023-12-01', 'GET');
expect(result).toEqual(mockData);
expect(global.fetch).toHaveBeenCalledWith(
'https://test-project.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token',
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
},
);
});
it('should authenticate before making request if no token exists', async () => {
const authResponse = {idToken: 'new-token'};
const dataResponse = {test: 'data'};
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(authResponse)),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(dataResponse)),
});
const client = new FirebaseClient();
const result = await client.makeDatabaseRequest('2023-12-01', 'GET');
expect(result).toEqual(dataResponse);
expect(global.fetch).toHaveBeenCalledTimes(2);
expect(client.idToken).toBe('new-token');
});
it('should make PUT request with data', async () => {
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce('null'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const testData = [{library: 'test', status: 'success'}];
await client.makeDatabaseRequest('2023-12-01', 'PUT', testData);
expect(global.fetch).toHaveBeenCalledWith(
'https://test-project.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(testData),
},
);
});
});
describe('storeResults', () => {
it('should store results successfully', async () => {
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce('null'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const results = [{library: 'test', status: 'success'}];
await client.storeResults('2023-12-01', results);
expect(global.fetch).toHaveBeenCalledWith(
'https://test-project.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(results),
},
);
expect(console.log).toHaveBeenCalledWith(
'Successfully stored results for 2023-12-01',
);
});
});
describe('getResults', () => {
it('should retrieve results successfully', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const results = await client.getResults('2023-12-01');
expect(results).toEqual(mockResults);
});
it('should return null for 404 errors', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce('Not Found'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const results = await client.getResults('2023-12-01');
expect(results).toBeNull();
});
it('should throw error for non-404 HTTP errors', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 500,
text: jest.fn().mockResolvedValueOnce('Internal Server Error'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
await expect(client.getResults('2023-12-01')).rejects.toThrow(
'HTTP 500: Internal Server Error',
);
});
});
describe('getLatestResults', () => {
it('should authenticate before making requests if no token exists', async () => {
const authResponse = {idToken: 'new-token'};
const mockResults = [{library: 'test', status: 'success'}];
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(authResponse)),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
const result = await client.getLatestResults('2023-12-15', 1);
expect(result).toEqual({
results: mockResults,
date: '2023-12-14',
});
expect(client.idToken).toBe('new-token');
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-14 (1 days back)',
);
});
it('should find results from the previous day', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-14',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-14 (1 days back)',
);
});
it('should find results from several days back', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock 404 responses for first 2 days, then success on 3rd day
global.fetch
.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce('Not Found'),
})
.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce('Not Found'),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-12',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-13 (2 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-12 (3 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-12 (3 days back)',
);
});
it('should skip empty results and continue searching', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock empty array for first day, then valid results on second day
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify([])),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-13',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-13 (2 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-13 (2 days back)',
);
});
it('should return null when no results found within maxDaysBack', async () => {
// Mock 404 responses for all days
global.fetch.mockResolvedValue({
ok: false,
status: 404,
text: jest.fn().mockResolvedValue('Not Found'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 3);
expect(result).toEqual({
results: null,
date: null,
});
expect(console.log).toHaveBeenCalledWith(
'No previous results found within the last 3 days',
);
expect(global.fetch).toHaveBeenCalledTimes(3);
});
it('should use default maxDaysBack of 7 when not specified', async () => {
// Mock 404 responses for all days
global.fetch.mockResolvedValue({
ok: false,
status: 404,
text: jest.fn().mockResolvedValue('Not Found'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15');
expect(result).toEqual({
results: null,
date: null,
});
expect(console.log).toHaveBeenCalledWith(
'No previous results found within the last 7 days',
);
expect(global.fetch).toHaveBeenCalledTimes(7);
});
it('should handle non-404 errors and continue searching', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock 500 error for first day, then success on second day
global.fetch
.mockResolvedValueOnce({
ok: false,
status: 500,
text: jest.fn().mockResolvedValueOnce('Internal Server Error'),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-13',
});
expect(console.log).toHaveBeenCalledWith(
'No results found for 2023-12-14: HTTP 500: Internal Server Error',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-13 (2 days back)',
);
});
it('should handle date boundaries correctly', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
// Test month boundary
const result = await client.getLatestResults('2023-12-01', 1);
expect(result).toEqual({
results: mockResults,
date: '2023-11-30',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-11-30 (1 days back)...',
);
});
it('should handle year boundary correctly', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
// Test year boundary
const result = await client.getLatestResults('2024-01-01', 1);
expect(result).toEqual({
results: mockResults,
date: '2023-12-31',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-31 (1 days back)...',
);
});
it('should handle null results and continue searching', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock null for first day, then valid results on second day
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce('null'),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-13',
});
});
});
});
describe('compareResults', () => {
it('should handle null previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const result = compareResults(currentResults, null);
expect(result).toEqual({
broken: [],
recovered: [],
newFailures: [{library: 'lib1', platform: 'iOS', status: 'failed'}],
});
});
it('should handle undefined previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
];
const result = compareResults(currentResults, undefined);
expect(result).toEqual({
broken: [],
recovered: [],
newFailures: [{library: 'lib1', platform: 'iOS', status: 'failed'}],
});
});
it('should identify broken tests', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'failed',
},
]);
expect(result.recovered).toEqual([]);
});
it('should identify recovered tests', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([]);
expect(result.recovered).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'failed',
currentStatus: 'success',
},
]);
});
it('should identify both broken and recovered tests', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
{library: 'lib3', platform: 'iOS', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'failed'},
{library: 'lib3', platform: 'iOS', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'failed',
},
]);
expect(result.recovered).toEqual([
{
library: 'lib2',
platform: 'Android',
previousStatus: 'failed',
currentStatus: 'success',
},
]);
});
it('should handle tests that are not in previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'failed',
},
]);
expect(result.recovered).toEqual([]);
});
it('should handle empty current results', () => {
const currentResults = [];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([]);
expect(result.recovered).toEqual([]);
});
it('should handle empty previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
];
const previousResults = [];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([]);
expect(result.recovered).toEqual([]);
// When previousResults is an empty array (not null/undefined),
// the function doesn't return newFailures property
expect(result.newFailures).toBeUndefined();
});
it('should handle different status values', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'timeout'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'error'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'timeout',
},
]);
expect(result.recovered).toEqual([
{
library: 'lib2',
platform: 'Android',
previousStatus: 'error',
currentStatus: 'success',
},
]);
});
});
describe('getYesterdayDate', () => {
it("should return yesterday's date in YYYY-MM-DD format", () => {
const mockDate = new Date('2023-12-15T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getYesterdayDate();
expect(result).toBe('2023-12-14');
global.Date.mockRestore();
});
it('should handle month boundary correctly', () => {
const mockDate = new Date('2023-12-01T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getYesterdayDate();
expect(result).toBe('2023-11-30');
global.Date.mockRestore();
});
it('should handle year boundary correctly', () => {
const mockDate = new Date('2024-01-01T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getYesterdayDate();
expect(result).toBe('2023-12-31');
global.Date.mockRestore();
});
});
describe('getTodayDate', () => {
it("should return today's date in YYYY-MM-DD format", () => {
const mockDate = new Date('2023-12-15T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getTodayDate();
expect(result).toBe('2023-12-15');
global.Date.mockRestore();
});
it('should handle different times of day correctly', () => {
const mockDate = new Date('2023-12-15T23:59:59Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getTodayDate();
expect(result).toBe('2023-12-15');
global.Date.mockRestore();
});
});
@@ -117,13 +117,13 @@ describe('#verifyPublishedTemplate', () => {
it('will timeout if npm does not update package version after a set number of retries', async () => {
const RETRIES = 2;
await verifyPublishedTemplate('0.77.0', true, RETRIES),
(await verifyPublishedTemplate('0.77.0', true, RETRIES),
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'@react-native-community/template',
'0.77.0',
'latest',
2,
);
));
});
});
});
@@ -38,7 +38,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
expect(mockSleep).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
);
});
@@ -55,7 +55,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
expect(mockSleep).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
);
});
@@ -67,7 +67,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
expect(mockSleep).toHaveBeenCalledTimes(0);
expect(mockFetch).toHaveBeenCalledWith(
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
);
});
@@ -81,7 +81,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
expect(mockSleep).toHaveBeenCalledTimes(90);
expect(mockExit).toHaveBeenCalledWith(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
);
});
});
@@ -83,13 +83,13 @@ describe('#verifyReleaseOnNPM', () => {
it('will timeout if npm does not update package version after a set number of retries', async () => {
const RETRIES = 2;
await verifyReleaseOnNpm('0.77.0', true, RETRIES),
(await verifyReleaseOnNpm('0.77.0', true, RETRIES),
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'react-native',
'0.77.0',
'latest',
2,
);
));
});
it('will timeout if npm does not update latest tag after a set number of retries', async () => {
@@ -11,8 +11,15 @@ const fs = require('fs');
const path = require('path');
const {
prepareFailurePayload,
prepareComparisonPayload,
sendMessageToDiscord,
} = require('./notifyDiscord');
const {
FirebaseClient,
compareResults,
getYesterdayDate,
getTodayDate,
} = require('./firebaseUtils');
function readOutcomes() {
const baseDir = '/tmp';
@@ -103,16 +110,62 @@ async function collectResults(discordWebHook) {
const outcomes = readOutcomes();
const failures = printFailures(outcomes);
// Send failure notification if there are current failures
if (failures.length > 0) {
if (discordWebHook) {
console.log('Sending to discord');
console.log('Sending current failures to Discord...');
await notifyDiscord(discordWebHook, failures);
} else {
console.log('Web hook not set');
console.log('Discord webhook not set');
}
process.exit(1);
}
console.log('✅ All tests passed!');
// Initialize Firebase client
const firebaseClient = new FirebaseClient();
const today = getTodayDate();
try {
// Store today's results in Firebase
console.log(`Storing results for ${today} in Firebase...`);
await firebaseClient.storeResults(today, outcomes);
// Get the most recent previous results for comparison
console.log(`Looking for most recent previous results before ${today}...`);
const {results: previousResults, date: previousDate} =
await firebaseClient.getLatestResults(today);
let broken = [];
let recovered = [];
if (previousResults) {
console.log(`Comparing with results from ${previousDate}`);
// Compare results and identify broken/recovered jobs
const comparison = compareResults(outcomes, previousResults);
broken = comparison.broken;
recovered = comparison.recovered;
console.log(
`Found ${broken.length} newly broken jobs and ${recovered.length} recovered jobs compared to ${previousDate}`,
);
} else {
console.log(
'No previous results found for comparison - this might be the first run or no recent data available',
);
}
// Send comparison message to Discord if there are changes
if (discordWebHook && (broken.length > 0 || recovered.length > 0)) {
console.log('Sending comparison results to Discord...');
const comparisonMessage = prepareComparisonPayload(broken, recovered);
await sendMessageToDiscord(discordWebHook, comparisonMessage);
}
console.log('✅ All tests passed!');
} catch (error) {
console.error('Error in collectResults:', error);
// If Firebase fails but there are no test failures, don't fail the workflow
console.log('⚠️ Firebase operations failed, but all tests passed');
}
}
module.exports = {
@@ -25,6 +25,31 @@ function extractUsersFromScheduleAndDate(schedule, userMap, date) {
return [user1, user2];
}
/**
* You can invoke this script by doing:
* ```
* node .github/workflow-scripts/extractIssueOncalls.js $DATA
* ```
*
* the $DATA is stored in the github secrets as ONCALL_SCHEDULE variable.
* The format of the data is:
* ```
* {
* \"userMap\": {
* \"discord_handle1\": \"discord_id1\",
* \"discord_handle2\": \"discord_id2\",
* ...
* },
* \"schedule\": {
* \"2025-07-29\": [\"discord_handle1\", \"discord_handle2\"],
* \"2025-08-05\": [\"discord_handle3\", \"discord_handle4\"],
* ...
* }
* ```
*
* When uploading the secret, make sure that the JSON strings are escaped!
* The script will fail otherwise, because GitHub will remove the `"` characters.
*/
function main() {
const configuration = process.argv[2];
const {userMap, schedule} = JSON.parse(configuration);
+261
View File
@@ -0,0 +1,261 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
// We connect to firebase using a plain HTTP request because we don't want to
// add yet another devDependency to the react-native monorepo.
class FirebaseClient {
constructor() {
this.email = process.env.FIREBASE_APP_EMAIL;
this.password = process.env.FIREBASE_APP_PASS;
this.apiKey = process.env.FIREBASE_APP_APIKEY;
this.projectId = process.env.FIREBASE_APP_PROJECTNAME;
this.databaseUrl = `${this.projectId}.firebaseio.com`;
this.idToken = null;
}
async authenticate() {
if (!this.email || !this.password) {
throw new Error(
'Firebase credentials not found in environment variables',
);
}
const authData = {
email: this.email,
password: this.password,
returnSecureToken: true,
};
const response = await this.makeRequest(
'identitytoolkit.googleapis.com',
`/v1/accounts:signInWithPassword?key=${this.apiKey}`,
'POST',
authData,
);
this.idToken = response.idToken;
return;
}
/**
* Make a database request for a specific date
* @param {string} date - Date in YYYY-MM-DD format
* @param {string} method - HTTP method
* @param {*} data - Data to send (optional)
* @returns {Promise<*>} - Response data
*/
async makeDatabaseRequest(date, method, data = null) {
if (!this.idToken) {
await this.authenticate();
}
const path = `/nightly-results/${date}.json?auth=${this.idToken}`;
return this.makeRequest(this.databaseUrl, path, method, data);
}
/**
* Store test results for a specific date
* @param {string} date - Date in YYYY-MM-DD format
* @param {Array<Object>} results - Array of test results
* @returns {Promise<void>}
*/
async storeResults(date, results) {
await this.makeDatabaseRequest(date, 'PUT', results);
console.log(`Successfully stored results for ${date}`);
}
/**
* Retrieve test results for a specific date
* @param {string} date - Date in YYYY-MM-DD format
* @returns {Promise<Array<Object>|null>} - Array of test results or null if not found
*/
async getResults(date) {
try {
return await this.makeDatabaseRequest(date, 'GET');
} catch (error) {
if (error.message.includes('404')) {
return null; // No results found for this specific date.
}
throw error;
}
}
/**
* Find the most recent available job results before the given date
* @param {string} currentDate - Current date in YYYY-MM-DD format
* @param {number} maxDaysBack - Maximum number of days to look back (default: 7)
* @returns {Promise<{results: Array<Object>|null, date: string|null}>} - Most recent results and their date
*/
async getLatestResults(currentDate, maxDaysBack = 7) {
if (!this.idToken) {
await this.authenticate();
}
const currentDateObj = new Date(currentDate);
for (let daysBack = 1; daysBack <= maxDaysBack; daysBack++) {
const checkDate = new Date(currentDateObj);
checkDate.setDate(checkDate.getDate() - daysBack);
const checkDateStr = checkDate.toISOString().split('T')[0];
console.log(
`Checking for results on ${checkDateStr} (${daysBack} days back)...`,
);
try {
const results = await this.getResults(checkDateStr);
if (results && results.length > 0) {
console.log(
`Found results from ${checkDateStr} (${daysBack} days back)`,
);
return {results, date: checkDateStr};
}
} catch (error) {
console.log(`No results found for ${checkDateStr}: ${error.message}`);
continue;
}
}
console.log(
`No previous results found within the last ${maxDaysBack} days`,
);
return {results: null, date: null};
}
async makeRequest(hostname, path, method, data = null) {
const url = `https://${hostname}${path}`;
const options = {
method,
headers: {
'Content-Type': 'application/json',
},
};
if (data) {
options.body = JSON.stringify(data);
}
const response = await fetch(url, options);
const responseText = await response.text();
if (!response.ok) {
let errorMessage;
try {
const parsedError = JSON.parse(responseText);
errorMessage = parsedError.error?.message || responseText;
} catch {
errorMessage = responseText;
}
throw new Error(`HTTP ${response.status}: ${errorMessage}`);
}
try {
return JSON.parse(responseText);
} catch {
return responseText;
}
}
}
/**
* Compare current results with previous day's results
* @param {Array<Object>} currentResults - Today's test results
* @param {Array<Object>} previousResults - Yesterday's test results
* @returns {Object} - Object containing broken and recovered tests
*/
function compareResults(currentResults, previousResults) {
if (!previousResults) {
return {
broken: [],
recovered: [],
newFailures: currentResults.filter(result => result.status !== 'success'),
};
}
// Create maps for easier lookup
const currentMap = new Map();
const previousMap = new Map();
currentResults.forEach(result => {
const key = `${result.library}-${result.platform}`;
currentMap.set(key, result);
});
previousResults.forEach(result => {
const key = `${result.library}-${result.platform}`;
previousMap.set(key, result);
});
const broken = [];
const recovered = [];
// Check for broken tests (was success, now failed)
for (const [key, currentResult] of currentMap) {
const previousResult = previousMap.get(key);
if (previousResult) {
if (
previousResult.status === 'success' &&
currentResult.status !== 'success'
) {
broken.push({
library: currentResult.library,
platform: currentResult.platform,
previousStatus: previousResult.status,
currentStatus: currentResult.status,
});
}
}
}
// Check for recovered tests (was failed, now success)
for (const [key, currentResult] of currentMap) {
const previousResult = previousMap.get(key);
if (previousResult) {
if (
previousResult.status !== 'success' &&
currentResult.status === 'success'
) {
recovered.push({
library: currentResult.library,
platform: currentResult.platform,
previousStatus: previousResult.status,
currentStatus: currentResult.status,
});
}
}
}
return {broken, recovered};
}
/**
* Get yesterday's date in YYYY-MM-DD format
* @returns {string} - Yesterday's date
*/
function getYesterdayDate() {
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
return yesterday.toISOString().split('T')[0];
}
/**
* Get today's date in YYYY-MM-DD format
* @returns {string} - Today's date
*/
function getTodayDate() {
const today = new Date();
return today.toISOString().split('T')[0];
}
module.exports = {
FirebaseClient,
compareResults,
getYesterdayDate,
getTodayDate,
};
+59 -13
View File
@@ -41,20 +41,12 @@ async function sendMessageToDiscord(webHook, message) {
}
/**
* Prepares a formatted Discord message payload from a list of failures.
* @param {Array<Object>} failures - List of failures to format
* @returns {Object} - The formatted Discord message payload
* Sorts jobs by platform first, then by library name.
* @param {Array<Object>} jobs - Array of jobs with platform and library properties
* @returns {Array<Object>} - Sorted array of jobs
*/
function prepareFailurePayload(failures) {
if (!failures || failures.length === 0) {
return {
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
};
}
// Sort failures by platform and then by library name
const sortedFailures = [...failures].sort((a, b) => {
function sortResultsByPlatformAndLibrary(jobs) {
return [...jobs].sort((a, b) => {
// First sort by platform
const platformA = a.platform || 'Unknown';
const platformB = b.platform || 'Unknown';
@@ -68,6 +60,23 @@ function prepareFailurePayload(failures) {
const libraryB = b.library || 'Unknown';
return libraryA.localeCompare(libraryB);
});
}
/**
* Prepares a formatted Discord message payload from a list of failures.
* @param {Array<Object>} failures - List of failures to format
* @returns {Object} - The formatted Discord message payload
*/
function prepareFailurePayload(failures) {
if (!failures || failures.length === 0) {
return {
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
};
}
// Sort failures by platform and then by library name
const sortedFailures = sortResultsByPlatformAndLibrary(failures);
// Format the failures into a message
const formattedFailures = sortedFailures
@@ -83,8 +92,45 @@ function prepareFailurePayload(failures) {
};
}
/**
* Prepares a formatted Discord message payload for broken and recovered nightly jobs.
* @param {Array<Object>} broken - List of newly broken jobs
* @param {Array<Object>} recovered - List of recovered jobs
* @returns {Object} - The formatted Discord message payload
*/
function prepareComparisonPayload(broken, recovered) {
let content = '📊 **React Native Nightly Integration Status Update** 📊\n\n';
if (broken.length === 0 && recovered.length === 0) {
content +=
'No changes from yesterday - all nightly jobs maintained their previous status.';
} else {
if (broken.length > 0) {
content += '🔴 **Newly Broken Jobs:**\n';
const sortedBroken = sortResultsByPlatformAndLibrary(broken);
sortedBroken.forEach(job => {
content += `❌ [${job.platform}] ${job.library} (was ${job.previousStatus}, now ${job.currentStatus})\n`;
});
content += '\n';
}
if (recovered.length > 0) {
content += '🟢 **Recovered Jobs:**\n';
const sortedRecovered = sortResultsByPlatformAndLibrary(recovered);
sortedRecovered.forEach(job => {
content += `✅ [${job.platform}] ${job.library} (was ${job.previousStatus}, now ${job.currentStatus})\n`;
});
}
}
return {content};
}
// Export the functions using CommonJS syntax
module.exports = {
prepareFailurePayload,
prepareComparisonPayload,
sendMessageToDiscord,
};
@@ -13,13 +13,14 @@ const SLEEP_S = 60; // 1 minute
const MAX_RETRIES = 90; // 90 attempts. Waiting between attempt: 1 min. Total time: 90 min.
const ARTIFACT_URL =
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/';
const ARTIFACT_NAME = 'react-native-artifacts-';
async function verifyArtifactsAreOnMaven(version, retries = MAX_RETRIES) {
if (version.startsWith('v')) {
version = version.substring(1);
}
const artifactUrl = `${ARTIFACT_URL}${version}`;
const artifactUrl = `${ARTIFACT_URL}${version}/${ARTIFACT_NAME}${version}.pom`;
for (let currentAttempt = 1; currentAttempt <= retries; currentAttempt++) {
const response = await fetch(artifactUrl);
+4
View File
@@ -18,6 +18,10 @@ jobs:
run: |
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.2.0'
- name: Extract branch name
run: |
TAG="${{ github.ref_name }}";
+4
View File
@@ -32,3 +32,7 @@ jobs:
needs: check-nightly
secrets:
discord_webhook_url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
firebase_app_email: ${{ secrets.FIREBASE_APP_EMAIL }}
firebase_app_pass: ${{ secrets.FIREBASE_APP_PASS }}
firebase_app_projectname: ${{ secrets.FIREBASE_APP_PROJECTNAME }}
firebase_app_apikey: ${{ secrets.FIREBASE_APP_APIKEY }}
+2
View File
@@ -22,6 +22,8 @@ jobs:
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Run diff-js-api-breaking-changes
uses: ./.github/actions/diff-js-api-breaking-changes
- name: Danger
run: yarn danger ci --use-github-checks --failOnErrors
working-directory: private/react-native-bots
-4
View File
@@ -27,10 +27,6 @@ jobs:
ONCALL2=$(echo $ONCALLS | cut -d ' ' -f 2)
echo "oncall1=$ONCALL1" >> $GITHUB_ENV
echo "oncall2=$ONCALL2" >> $GITHUB_ENV
- name: Print oncalls
run: |
echo "oncall1: ${{ env.oncall1 }}"
echo "oncall2: ${{ env.oncall2 }}"
- name: Monitor New Issues
uses: react-native-community/repo-monitor@v1.0.1
with:
+3 -3
View File
@@ -128,9 +128,9 @@ jobs:
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
+5 -5
View File
@@ -23,7 +23,7 @@ jobs:
id: restore-ios-slice
uses: actions/cache/restore@v4
with:
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
path: packages/react-native/
- name: Setup node.js
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
@@ -83,7 +83,7 @@ jobs:
# Move the XCFramework in the destination directory
mv /tmp/third-party/packages/react-native/third-party/ReactNativeDependencies.xcframework packages/react-native/third-party/ReactNativeDependencies.xcframework
VERSION=$(jq -r '.version' package.json)
VERSION=$(jq -r '.version' packages/react-native/package.json)
echo "$VERSION-${{matrix.flavor}}" > "packages/react-native/third-party/version.txt"
cat "packages/react-native/third-party/version.txt"
# Check destination directory
@@ -117,7 +117,7 @@ jobs:
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
path: |
packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
packages/react-native/.build/headers
@@ -140,7 +140,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: packages/react-native/.build/output/xcframeworks
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
- name: Setup node.js
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-node
@@ -209,4 +209,4 @@ jobs:
path: |
packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.xcframework.tar.gz
packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.framework.dSYM.tar.gz
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
@@ -21,7 +21,7 @@ jobs:
- name: Build packages
run: yarn build
- name: Build types
run: yarn build-types
run: yarn build-types --skip-snapshot
- name: Set NPM auth token
run: echo "//registry.npmjs.org/:_authToken=$GHA_NPM_TOKEN" > ~/.npmrc
- name: Find and publish all bumped packages
+3 -3
View File
@@ -125,9 +125,9 @@ jobs:
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
+2 -2
View File
@@ -14,8 +14,8 @@ jobs:
with:
repo-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
days-before-stale: 180
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
stale-pr-message: 'This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
stale-issue-message: 'This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.'
stale-pr-message: 'This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.'
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
exempt-issue-labels: 'Help Wanted :octocat:, Good first issue, Never gets stale, Issue: Author Provided Repro'
+40 -41
View File
@@ -2,11 +2,6 @@ name: Test All
on:
workflow_dispatch:
inputs:
run-e2e-tests:
description: Whether to run E2E tests or not
type: boolean
default: false
pull_request:
push:
branches:
@@ -128,7 +123,7 @@ jobs:
test_ios_rntester_ruby_3_2_0:
runs-on: macos-14
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -141,31 +136,12 @@ jobs:
ruby-version: "3.2.0"
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_rntester_dynamic_frameworks:
runs-on: macos-14
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
continue-on-error: true
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
use-frameworks: DynamicFrameworks
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: Debug
test_ios_rntester:
runs-on: macos-14-large
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -174,20 +150,19 @@ jobs:
fail-fast: false
matrix:
flavor: [Debug, Release]
frameworks: [StaticLibraries, DynamicFrameworks]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
run-unit-tests: "false"
use-frameworks: StaticLibraries
use-frameworks: ${{ matrix.frameworks }}
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
test_e2e_ios_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: macos-14-large
needs:
[test_ios_rntester]
@@ -221,7 +196,6 @@ jobs:
flavor: ${{ matrix.flavor }}
test_e2e_ios_templateapp:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: macos-14-large
needs: [build_npm_package, prebuild_apple_dependencies]
env:
@@ -264,6 +238,14 @@ jobs:
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
uses: actions/download-artifact@v4
with:
name: ReactCore${{ matrix.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Prepare artifacts
run: |
REACT_NATIVE_PKG=$(find /tmp/react-native-tmp -type f -name "*.tgz")
@@ -286,6 +268,7 @@ jobs:
NEW_ARCH_ENABLED=1
export RCT_USE_LOCAL_RN_DEP=/tmp/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ matrix.flavor }}.xcframework.tar.gz"
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
xcodebuild \
@@ -305,7 +288,6 @@ jobs:
working-directory: /tmp/RNTestProject
test_e2e_android_templateapp:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: 4-core-ubuntu
needs: build_npm_package
strategy:
@@ -388,13 +370,32 @@ jobs:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
run_fantom_tests:
runs-on: 8-core-ubuntu
needs: [set_release_type]
container:
image: reactnativecommunity/react-native-android:latest
env:
TERM: "dumb"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Test Fantom
uses: ./.github/actions/run-fantom-tests
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
build_hermesc_windows:
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
@@ -424,11 +425,9 @@ jobs:
uses: ./.github/actions/build-android
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
run-e2e-tests: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
test_e2e_android_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: 4-core-ubuntu
needs: [build_android]
strategy:
@@ -548,7 +547,7 @@ jobs:
test_ios_helloworld_with_ruby_3_2_0:
runs-on: macos-14
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
env:
PROJECT_NAME: iOSTemplateProject
HERMES_WS_DIR: /tmp/hermes
@@ -565,7 +564,7 @@ jobs:
test_ios_helloworld:
runs-on: macos-14
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
strategy:
matrix:
flavor: [Debug, Release]
@@ -593,7 +592,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: ["24", "22"]
node-version: ["24.4.1", "22", "20.19.4"]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -626,7 +625,7 @@ jobs:
rerun-failed-jobs:
runs-on: ubuntu-latest
needs: [test_e2e_ios_rntester, test_e2e_android_rntester, test_e2e_ios_templateapp, test_e2e_android_templateapp]
if: always()
if: ${{ github.ref == 'refs/heads/main' && always() }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -5,6 +5,14 @@ on:
secrets:
discord_webhook_url:
required: true
firebase_app_email:
required: true
firebase_app_pass:
required: true
firebase_app_apikey:
required: true
firebase_app_projectname:
required: true
# We use the matrix.library entry to specify the dependency we want to use
@@ -94,6 +102,11 @@ jobs:
path: /tmp
- name: Collect failures
uses: actions/github-script@v6
env:
FIREBASE_APP_EMAIL: ${{ secrets.firebase_app_email }}
FIREBASE_APP_PASS: ${{ secrets.firebase_app_pass }}
FIREBASE_APP_APIKEY: ${{ secrets.firebase_app_apikey }}
FIREBASE_APP_PROJECTNAME: ${{ secrets.firebase_app_projectname }}
with:
script: |
const {collectResults} = require('./.github/workflow-scripts/collectNightlyOutcomes.js');
+4 -1
View File
@@ -43,7 +43,6 @@ project.xcworkspace
/private/helloworld/android/app/build/
/private/helloworld/android/build/
/packages/react-native-popup-menu-android/android/build/
/packages/react-native-test-library/android/build/
# Buck
.buckd
@@ -171,7 +170,11 @@ fix_*.patch
# Jest Integration
/private/react-native-fantom/build/
/private/react-native-fantom/.out/
/private/react-native-fantom/tester/build/
# [Experimental] Generated TS type definitions
/packages/**/types_generated/
/packages/debugger-shell/build/
/packages/*/dist/
-36
View File
@@ -1,36 +0,0 @@
{
"arrowParens": "avoid",
"bracketSameLine": true,
"bracketSpacing": false,
"requirePragma": true,
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf",
"overrides": [
{
"files": ["*.code-workspace"],
"options": {
"parser": "json"
}
},
{
"files": [
"*.js",
"*.js.flow"
],
"options": {
"parser": "hermes"
}
},
{
"files": [
"**/__docs__/*.md"
],
"options": {
"parser": "markdown",
"proseWrap": "always",
"requirePragma": false
}
}
]
}
+46
View File
@@ -0,0 +1,46 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
let plugins = ['prettier-plugin-hermes-parser'];
try {
plugins = require('./.prettier-plugins.fb.js');
} catch {}
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
requirePragma: true,
singleQuote: true,
trailingComma: 'all',
endOfLine: 'lf',
plugins,
overrides: [
{
files: ['*.code-workspace'],
options: {
parser: 'json',
},
},
{
files: ['*.js', '*.js.flow'],
options: {
parser: 'hermes',
},
},
{
files: ['**/__docs__/*.md'],
options: {
parser: 'markdown',
proseWrap: 'always',
requirePragma: false,
},
},
],
};
+4933
View File
File diff suppressed because it is too large Load Diff
+965 -4801
View File
File diff suppressed because it is too large Load Diff
+36 -1
View File
@@ -13,6 +13,7 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.binary.compatibility.validator) apply true
alias(libs.plugins.android.test) apply false
alias(libs.plugins.ktfmt) apply true
}
val reactAndroidProperties = java.util.Properties()
@@ -124,9 +125,43 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(project(":packages:react-native:ReactAndroid:hermes-engine"))
.using(module("com.facebook.react:hermes-android:0.0.0-+"))
.using(module("com.facebook.react:hermes-android:0.+"))
.because("Users opted to use hermes from nightly")
}
}
}
}
ktfmt {
blockIndent.set(2)
continuationIndent.set(4)
maxWidth.set(100)
removeUnusedImports.set(false)
manageTrailingCommas.set(false)
}
// Configure ktfmt tasks to include gradle-plugin
listOf("ktfmtCheck", "ktfmtFormat").forEach { taskName ->
tasks.named(taskName) { dependsOn(gradle.includedBuild("gradle-plugin").task(":$taskName")) }
}
allprojects {
// Apply exclusions for specific files that should not be formatted
val excludePatterns =
listOf(
"**/build/**",
"**/hermes-engine/**",
"**/internal/featureflags/**",
"**/systeminfo/ReactNativeVersion.kt")
listOf(
com.ncorti.ktfmt.gradle.tasks.KtfmtCheckTask::class,
com.ncorti.ktfmt.gradle.tasks.KtfmtFormatTask::class)
.forEach { tasks.withType(it) { exclude(excludePatterns) } }
// Disable the problematic ktfmt script tasks due to symbolic link issues in subprojects
afterEvaluate {
listOf("ktfmtCheckScripts", "ktfmtFormatScripts").forEach {
tasks.findByName(it)?.enabled = false
}
}
}
+149
View File
@@ -0,0 +1,149 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
declare module '@electron/packager' {
declare export type AsarOptions = $FlowFixMe;
declare export type ElectronDownloadRequestOptions = $FlowFixMe;
declare export type TargetDefinition = {
arch: TargetArch,
platform: TargetPlatform,
};
declare export type FinalizePackageTargetsHookFunction = (
targets: TargetDefinition[],
callback: HookFunctionErrorCallback,
) => void;
declare export type HookFunction = (
buildPath: string,
electronVersion: string,
platform: TargetPlatform,
arch: TargetArch,
callback: HookFunctionErrorCallback,
) => void;
declare export type IgnoreFunction = (path: string) => boolean;
declare export type HookFunctionErrorCallback = (err?: Error | null) => void;
declare export interface MacOSProtocol {
name: string;
schemes: string[];
}
declare export type NotaryToolCredentials = $FlowFixMe;
declare export type OsxSignOptions = $FlowFixMe;
declare export type OsxUniversalOptions = $FlowFixMe;
declare export type Win32MetadataOptions = $ReadOnly<{
CompanyName?: string,
FileDescription?: string,
OriginalFilename?: string,
ProductName?: string,
InternalName?: string,
'requested-execution-level'?:
| 'asInvoker'
| 'highestAvailable'
| 'requireAdministrator',
'application-manifest'?: string,
}>;
declare export type WindowsSignOptions = $FlowFixMe;
declare export type OfficialArch =
| 'ia32'
| 'x64'
| 'armv7l'
| 'arm64'
| 'mips64el'
| 'universal';
declare export type OfficialPlatform = 'linux' | 'win32' | 'darwin' | 'mas';
declare export type TargetArch = OfficialArch | string;
declare export type TargetPlatform = OfficialPlatform | string;
declare export type ArchOption = TargetArch | 'all';
declare export type PlatformOption = TargetPlatform | 'all';
declare export interface Options {
dir: string;
afterAsar?: HookFunction[];
afterComplete?: HookFunction[];
afterCopy?: HookFunction[];
afterCopyExtraResources?: HookFunction[];
afterExtract?: HookFunction[];
afterFinalizePackageTargets?: FinalizePackageTargetsHookFunction[];
afterInitialize?: HookFunction[];
afterPrune?: HookFunction[];
all?: boolean;
appBundleId?: string;
appCategoryType?: string;
appCopyright?: string;
appVersion?: string;
arch?: ArchOption | ArchOption[];
asar?: boolean | AsarOptions;
beforeAsar?: HookFunction[];
beforeCopy?: HookFunction[];
beforeCopyExtraResources?: HookFunction[];
buildVersion?: string;
darwinDarkModeSupport?: boolean;
derefSymlinks?: boolean;
download?: ElectronDownloadRequestOptions;
electronVersion?: string;
electronZipDir?: string;
executableName?: string;
extendHelperInfo?:
| string
| {
[property: string]: any,
};
extendInfo?:
| string
| {
[property: string]: any,
};
extraResource?: string | string[];
helperBundleId?: string;
icon?: string;
ignore?: RegExp | (string | RegExp)[] | IgnoreFunction;
junk?: boolean;
name?: string;
osxNotarize?: NotaryToolCredentials;
osxSign?: true | OsxSignOptions;
osxUniversal?: OsxUniversalOptions;
out?: string;
overwrite?: boolean;
platform?: TargetPlatform | 'all' | Array<TargetPlatform | 'all'>;
prebuiltAsar?: string;
protocols?: MacOSProtocol[];
prune?: boolean;
quiet?: boolean;
tmpdir?: string | false;
usageDescription?: {
[property: string]: string,
};
win32metadata?: Win32MetadataOptions;
windowsSign?: true | WindowsSignOptions;
}
declare function packager(options: Options): Promise<string[]>;
declare module.exports: typeof packager & {
packager: typeof packager,
default: typeof packager,
};
}
@@ -91,7 +91,14 @@ declare module 'tinybench' {
beforeEach?: (this: Task) => void | Promise<void>,
};
export type Fn = () => Promise<mixed> | mixed;
export interface FnReturnedObject {
overriddenDuration?: number;
}
export type Fn = () =>
| Promise<void | FnReturnedObject>
| void
| FnReturnedObject;
declare export class Bench extends EventTarget {
concurrency: null | 'task' | 'bench';
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+1 -1
View File
@@ -32,7 +32,7 @@ if (process.env.FBSOURCE_ENV === '1') {
require('@fb-tools/babel-register');
} else {
// Register Babel to allow local packages to be loaded from source
require('../scripts/babel-register').registerForMonorepo();
require('../scripts/shared/babelRegister').registerForMonorepo();
}
const transformer = require('@react-native/metro-babel-transformer');
+30 -22
View File
@@ -8,15 +8,19 @@
"android": "yarn --cwd packages/rn-tester android",
"build-android": "./gradlew :packages:react-native:ReactAndroid:build",
"build": "node ./scripts/build/build.js",
"build-types": "node ./scripts/build-types",
"build-types": "node ./scripts/js-api/build-types",
"clang-format": "clang-format -i --glob=*/**/*.{h,cpp,m,mm}",
"clean": "node ./scripts/build/clean.js",
"cxx-api-build": "node ./scripts/cxx-api/public-api.js",
"flow-check": "flow check",
"flow": "flow",
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
"format": "npm run prettier && npm run clang-format",
"featureflags": "yarn --cwd packages/react-native featureflags",
"js-api-diff": "node ./scripts/js-api/diff-api-snapshot",
"lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck",
"lint-kotlin-check": "./gradlew ktfmtCheck",
"lint-kotlin": "./gradlew ktfmtFormat",
"lint-markdown": "markdownlint-cli2 2>&1",
"lint": "eslint --max-warnings 0 .",
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
@@ -26,13 +30,13 @@
"set-version": "node ./scripts/releases/set-version.js",
"test-android": "./gradlew :packages:react-native:ReactAndroid:test",
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
"test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js",
"test-release-local-clean": "node ./scripts/release-testing/test-release-local-clean.js",
"test-release-local": "node ./scripts/release-testing/test-release-local.js",
"test-ios": "./scripts/objc-test.sh test",
"test-typescript": "tsc -p packages/react-native/types/tsconfig.json",
"test-generated-typescript": "tsc -p packages/react-native/types_generated/tsconfig.test.json",
"test": "jest",
"fantom": "JS_DIR='..' yarn jest --config private/react-native-fantom/config/jest.config.js",
"fantom": "./scripts/fantom.sh",
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
"update-lock": "npx yarn-deduplicate"
},
@@ -49,16 +53,17 @@
"@babel/plugin-transform-regenerator": "^7.24.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-flow": "^7.24.7",
"@electron/packager": "^18.3.6",
"@jest/create-cache-key-function": "^29.7.0",
"@microsoft/api-extractor": "^7.52.2",
"@react-native/metro-babel-transformer": "0.80.0-main",
"@react-native/metro-config": "0.80.0-main",
"@react-native/metro-babel-transformer": "0.82.0-main",
"@react-native/metro-config": "0.82.0-main",
"@tsconfig/node22": "22.0.2",
"@types/react": "^19.1.0",
"@typescript-eslint/parser": "^7.1.1",
"@typescript-eslint/parser": "^8.36.0",
"ansi-styles": "^4.2.1",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-syntax-hermes-parser": "0.28.1",
"babel-plugin-syntax-hermes-parser": "0.30.0",
"babel-plugin-transform-define": "^2.1.4",
"babel-plugin-transform-flow-enums": "^0.0.2",
"clang-format": "^1.8.0",
@@ -70,17 +75,18 @@
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-api-translator": "0.28.1",
"flow-bin": "^0.273.1",
"flow-api-translator": "0.30.0",
"flow-bin": "^0.278.0",
"glob": "^7.1.1",
"hermes-eslint": "0.28.1",
"hermes-transform": "0.28.1",
"hermes-eslint": "0.30.0",
"hermes-transform": "0.30.0",
"ini": "^5.0.0",
"inquirer": "^7.1.0",
"jest": "^29.7.0",
"jest-config": "^29.7.0",
@@ -89,27 +95,29 @@
"jest-snapshot": "^29.7.0",
"markdownlint-cli2": "^0.17.2",
"markdownlint-rule-relative-links": "^3.0.0",
"metro-babel-register": "^0.82.4",
"metro-memory-fs": "^0.82.4",
"metro-transform-plugins": "^0.82.4",
"memfs": "^4.7.7",
"metro-babel-register": "^0.83.1",
"metro-transform-plugins": "^0.83.1",
"micromatch": "^4.0.4",
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.1",
"prettier": "2.8.8",
"prettier-plugin-hermes-parser": "0.28.1",
"react": "19.1.0",
"react-test-renderer": "19.1.0",
"prettier": "3.6.2",
"prettier-plugin-hermes-parser": "0.31.1",
"react": "19.1.1",
"react-test-renderer": "19.1.1",
"rimraf": "^3.0.2",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"supports-color": "^7.1.0",
"temp-dir": "^2.0.0",
"tinybench": "^3.1.0",
"tinybench": "^4.1.0",
"typescript": "5.8.3",
"ws": "^6.2.3"
},
"resolutions": {
"eslint-plugin-react-hooks": "6.1.0-canary-12bc60f5-20250613",
"react-is": "19.1.0"
"react-is": "19.1.1",
"on-headers": "1.1.0",
"compression": "1.8.1"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.80.0-main",
"version": "0.82.0-main",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
@@ -17,7 +17,7 @@
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">= 22.14.0"
"node": ">= 20.19.4"
},
"files": [
"path-support.js",
+3 -3
View File
@@ -24,12 +24,12 @@ try {
} catch (e) {
// Fallback to lib when source doesn't exit (e.g. when installed as a dev dependency)
FlowParser =
// $FlowIgnore[cannot-resolve-module]
// $FlowFixMe[cannot-resolve-module]
require('@react-native/codegen/lib/parsers/flow/parser').FlowParser;
TypeScriptParser =
// $FlowIgnore[cannot-resolve-module]
// $FlowFixMe[cannot-resolve-module]
require('@react-native/codegen/lib/parsers/typescript/parser').TypeScriptParser;
// $FlowIgnore[cannot-resolve-module]
// $FlowFixMe[cannot-resolve-module]
RNCodegen = require('@react-native/codegen/lib/generators/RNCodegen');
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.80.0-main",
"version": "0.82.0-main",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -19,14 +19,14 @@
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">= 22.14.0"
"node": ">= 20.19.4"
},
"files": [
"index.js"
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.80.0-main"
"@react-native/codegen": "0.82.0-main"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.80.0-main",
"version": "0.82.0-main",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,16 +22,16 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.80.0-main",
"@react-native/dev-middleware": "0.82.0-main",
"debug": "^4.4.0",
"invariant": "^2.2.4",
"metro": "^0.82.4",
"metro-config": "^0.82.4",
"metro-core": "^0.82.4",
"metro": "^0.83.1",
"metro-config": "^0.83.1",
"metro-core": "^0.83.1",
"semver": "^7.1.3"
},
"devDependencies": {
"metro-resolver": "^0.82.4"
"metro-resolver": "^0.83.1"
},
"peerDependencies": {
"@react-native-community/cli": "*",
@@ -43,6 +43,6 @@
}
},
"engines": {
"node": ">= 22.14.0"
"node": ">= 20.19.4"
}
}
@@ -80,7 +80,7 @@ try {
'@react-native-community/cli-server-api',
{paths: [communityCliPath]},
);
// $FlowIgnore[unsupported-syntax] dynamic import
// $FlowFixMe[unsupported-syntax] dynamic import
communityMiddlewareFallback.createDevServerMiddleware = require(
communityCliServerApiPath,
).createDevServerMiddleware as CreateDevServerMiddleware;
@@ -92,14 +92,14 @@ async function runServer(
console.info(`Starting dev server on ${devServerUrl}\n`);
if (args.assetPlugins) {
// $FlowIgnore[cannot-write] Assigning to readonly property
// $FlowFixMe[cannot-write] Assigning to readonly property
metroConfig.transformer.assetPlugins = args.assetPlugins.map(plugin =>
require.resolve(plugin),
);
}
// TODO(T214991636): Remove legacy Metro log forwarding
if (!args.clientLogs) {
// $FlowIgnore[cannot-write] Assigning to readonly property
// $FlowFixMe[cannot-write] Assigning to readonly property
metroConfig.server.forwardClientLogs = false;
}
@@ -127,6 +127,8 @@ async function runServer(
const reporter: Reporter = {
update(event: TerminalReportableEvent) {
terminalReporter.update(event);
/* $FlowFixMe[constant-condition] Error discovered during Constant
* Condition roll out. See https://fburl.com/workplace/1v97vimq. */
if (reportEvent) {
reportEvent(event);
}
@@ -144,10 +146,10 @@ async function runServer(
}
},
};
// $FlowIgnore[cannot-write] Assigning to readonly property
// $FlowFixMe[cannot-write] Assigning to readonly property
metroConfig.reporter = reporter;
const serverInstance = await Metro.runServer(metroConfig, {
await Metro.runServer(metroConfig, {
host: args.host,
secure: args.https,
secureCert: args.cert,
@@ -161,18 +163,6 @@ async function runServer(
reportEvent = eventsSocketEndpoint.reportEvent;
// In Node 8, the default keep-alive for an HTTP connection is 5 seconds. In
// early versions of Node 8, this was implemented in a buggy way which caused
// some HTTP responses (like those containing large JS bundles) to be
// terminated early.
//
// As a workaround, arbitrarily increase the keep-alive from 5 to 30 seconds,
// which should be enough to send even the largest of JS bundles.
//
// For more info: https://github.com/nodejs/node/issues/13391
//
serverInstance.keepAliveTimeout = 30000;
await version.logIfUpdateAvailable(cliConfig, terminalReporter);
}
@@ -185,7 +175,7 @@ function getReporterImpl(
try {
// First we let require resolve it, so we can require packages in node_modules
// as expected. eg: require('my-package/reporter');
// $FlowIgnore[unsupported-syntax]
// $FlowFixMe[unsupported-syntax]
return require(customLogReporterPath);
} catch (e) {
if (e.code !== 'MODULE_NOT_FOUND') {
@@ -193,7 +183,7 @@ function getReporterImpl(
}
// If that doesn't work, then we next try relative to the cwd, eg:
// require('./reporter');
// $FlowIgnore[unsupported-syntax]
// $FlowFixMe[unsupported-syntax]
return require(path.resolve(customLogReporterPath));
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ export type * from './index.flow';
*/
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
require('../../../scripts/babel-register').registerForMonorepo();
require('../../../scripts/shared/babelRegister').registerForMonorepo();
}
module.exports = require('./index.flow');
@@ -153,7 +153,7 @@ function buildDiffUrl(oldVersion: string, newVersion: string) {
* Returns the most recent React Native version available to upgrade to.
*/
async function getLatestRnDiffPurgeVersion(): Promise<LatestVersions | void> {
const options = {
const options: RequestOptions = {
// https://developer.github.com/v3/#user-agent-required
headers: {'User-Agent': '@react-native/community-cli-plugin'} as Headers,
};
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.80.0-main",
"version": "0.82.0-main",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
@@ -21,7 +21,7 @@
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">= 22.14.0"
"node": ">= 20.19.4"
},
"files": [
"dist"
+1 -1
View File
@@ -13,7 +13,7 @@ export type * from './index.flow';
*/
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
require('../../../scripts/babel-register').registerForMonorepo();
require('../../../scripts/shared/babelRegister').registerForMonorepo();
}
module.exports = require('./index.flow');
+3 -4
View File
@@ -71,14 +71,13 @@ const FIRST = 1,
FOURTH = 4;
function getNodePackagePath(packageName: string): string {
// $FlowIgnore[prop-missing] type definition is incomplete
// $FlowFixMe[prop-missing] type definition is incomplete
return require.resolve(packageName, {cwd: [process.cwd(), ...module.paths]});
}
function metro(...args: $ReadOnlyArray<string>): ExecaPromise {
const metroPath = getNodePackagePath(path.join('metro', 'src', 'cli.js'));
log(`🚇 ${metroPath} ${args.join(' ')} `);
return execa('node', [metroPath, ...args]);
log(`🚇 metro ${args.join(' ')} `);
return execa('npx', ['--offline', 'metro', ...args]);
}
export const tasks = {
+2 -2
View File
@@ -75,7 +75,7 @@ const FIRST = 1,
FIFTH = 5;
function getNodePackagePath(packageName: string): string {
// $FlowIgnore[prop-missing] type definition is incomplete
// $FlowFixMe[prop-missing] type definition is incomplete
return require.resolve(packageName, {cwd: [process.cwd(), ...module.paths]});
}
@@ -125,7 +125,7 @@ export const tasks = {
}),
),
installDependencies: task(FIFTH, 'Install CocoaPods dependencies', () => {
const env = {
const env: {[string]: string | void} = {
RCT_NEW_ARCH_ENABLED: options.newArchitecture ? '1' : '0',
USE_FRAMEWORKS: options.frameworks,
USE_HERMES: options.hermes ? '1' : '0',
@@ -13,7 +13,7 @@ export type * from './version.flow';
*/
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
require('../../../../scripts/babel-register').registerForMonorepo();
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
}
module.exports = require('./version.flow');
+2 -2
View File
@@ -1,5 +1,5 @@
@generated SignedSource<<9ada78dff12dcfc7937c8934261f47f4>>
Git revision: 68cfd0ae84acb0ed8e47b421afd64ae3b0b5b727
@generated SignedSource<<b6a779e724ecce5e727ee674dc20f809>>
Git revision: e87564a24cf233c60aaebee8c418ec85724f7214
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebook/react-native-devtools-frontend
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.80.0-main",
"version": "0.82.0-main",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
@@ -20,6 +20,6 @@
"BUILD_INFO"
],
"engines": {
"node": ">= 22.14.0"
"node": ">= 20.19.4"
}
}
@@ -19,13 +19,13 @@ const semver = require('semver');
// safety to ensure the target of the resolution is in sync with the declared dependency.
describe('Electron dependency', () => {
test('should be semver-satisfied by the actual electron version', () => {
// $FlowIssue[untyped-import] - package.json is not typed
// $FlowFixMe[untyped-import] - package.json is not typed
const ourPackageJson = require('../package.json');
const declaredElectronVersion = ourPackageJson.dependencies.electron;
expect(declaredElectronVersion).toBeTruthy();
// $FlowIssue[untyped-import] - package.json is not typed
// $FlowFixMe[untyped-import] - package.json is not typed
const electronPackageJson = require('electron/package.json');
const actualElectronVersion = electronPackageJson.version;
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env dotslash
// @generated SignedSource<<14de73ea0ed751d80c7c687c6aeb123f>>
{
"name": "React Native DevTools",
"platforms": {
"linux-aarch64": {
"size": 116120331,
"hash": "sha256",
"digest": "5a1747bdb50f8140d96e99b31f9a603ceaf52e777e5dd59f65edacd87f8c6348",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQMRq1ou56GjpsIRFHpozEYiPfCuVvgWQVwiMMPBbwKyBnebit8HDGKof5XgDHbAKCqAZSgC8L22eJETnqIUM3kEAMYNXcHviIGy41rsXKVDYDgyWlGFB1zP2WzHrjWagfD062Pt4q5GqvCG5RVlhz656BOsutU7B4pDXGFCIdry7FveKn0PXGxvd1E"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-arm64/React Native DevTools"
},
"linux-x86_64": {
"size": 116056146,
"hash": "sha256",
"digest": "b48a3e392ac482de8058917879cf07fd5934dcb84aa901d4fe0d29273b503f54",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOyyb_LXrME2ubBGSkEi1vDw-2hwuHgHwnR-kAGQyhJK7lnELQDXKX1xW_u0joDwbTOhmiptwenq07G2NFkrY3t_AXefb_xTu2qHzpmrsX2YcwJlewbprgbuX7Uvdhqncb_IRAnJ4ogYKHUg6CZBNmLCQsyDsoqmkXtJ9ikJcQeDu2aiqbb-RWJ"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-x64/React Native DevTools"
},
"macos-aarch64": {
"size": 110957864,
"hash": "sha256",
"digest": "7964d83c857f12bb741abf4377771f3f3697b81df6283dd88d75ae43991afb73",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQM7USVzavWxZkjOO6CasnSfPIfE08jJAkwfVO0qWiYBli136vpzA_HS89ZqsIsAC_GXeT7K-K9BxdON7z5qBoRMUygAay7z4DGT5OZ9YSf9MDCd0JOzah5_6s3ijw2j4eeRu8ZNYzI3aTutDXtPMJAb2KfBHGx2lEiSW5YK9idcB5Y2boAWeDXXX5nb"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"macos-x86_64": {
"size": 117827315,
"hash": "sha256",
"digest": "bab2fac43def4a82fb88300aac05180eeda24f31cc00402a3ff7ca2e612bd532",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPYS0ZRQ7RV1S-yy3tut6pRqcKdPcOiKfekrA5AXdd_M-HDaXLwJS57iAFU2K2X-EA_cyg25C3L-5L7O3eyNKPMToZHbV282GiojnNSKFNjsjj9_B737lOwHI_XqbDQEIiNJZ7NjbkZ8_iMKK-LNL-Ydha2ORWWqytuzP4sWQ6sm0XIxsdyQ6bOLw"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
}
}
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-shell",
"version": "0.80.0-main",
"version": "0.82.0-main",
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
"keywords": [
"react-native",
@@ -8,7 +8,7 @@
],
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/debugger-shell#readme",
"bugs": "https://github.com/facebook/react-native/issues",
"main": "./src/node/index.js",
"main": "./src/index.js",
"exports": {
".": {
"node": "./src/node/index.js",
@@ -26,12 +26,12 @@
},
"license": "MIT",
"engines": {
"node": ">= 22.14.0",
"electron": ">=36.2.0"
"node": ">= 20.19.4",
"electron": ">=37.2.4"
},
"dependencies": {
"cross-spawn": "^7.0.6",
"electron": "36.2.0"
"electron": "37.2.4"
},
"devDependencies": {
"semver": "^7.1.3"
@@ -10,6 +10,7 @@
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
const {BrowserWindow, app, shell, ipcMain} = require('electron') as any;
const path = require('path');
const util = require('util');
const windowMetadata = new WeakMap<
@@ -68,6 +69,8 @@ function handleLaunchArgs(argv: string[]) {
partition: 'persist:react-native-devtools',
preload: require.resolve('./preload.js'),
},
// Icon for Linux
icon: path.join(__dirname, 'resources', 'icon.png'),
});
// Open links in the default browser instead of in new Electron windows.
@@ -90,7 +93,7 @@ function handleLaunchArgs(argv: string[]) {
}
app.whenReady().then(() => {
handleLaunchArgs(process.argv.slice(2));
handleLaunchArgs(process.argv.slice(app.isPackaged ? 1 : 2));
app.on(
'second-instance',
@@ -10,9 +10,25 @@
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
const {app} = require('electron') as any;
const util = require('util');
// Handle global command line arguments which don't require a window
// or the single instance lock to be held.
const {
values: {version = false},
} = util.parseArgs({
options: {version: {type: 'boolean'}},
args: process.argv.slice(app.isPackaged ? 1 : 2),
strict: false,
});
if (version) {
console.log(`${app.getName()} v${app.getVersion()}`);
// Not app.quit() - we want to exit immediately without initialising the graphical subsystem.
app.exit(0);
}
const gotTheLock = app.requestSingleInstanceLock({
argv: process.argv.slice(2),
argv: process.argv.slice(app.isPackaged ? 1 : 2),
});
if (!gotTheLock) {
@@ -13,7 +13,7 @@ export type * from './index.flow';
*/
if (!Boolean(process.env.BUILD_EXCLUDE_BABEL_REGISTER)) {
require('../../../../scripts/babel-register').registerForMonorepo();
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
}
module.exports = require('./index.flow');
@@ -16,7 +16,7 @@ contextBridge.executeInMainWorld({
let didDecorateInspectorFrontendHostInstance = false;
// reactNativeDecorateInspectorFrontendHostInstance was introduced in
// https://github.com/facebook/react-native-devtools-frontend/pull/168
// $FlowIgnore[prop-missing]
// $FlowFixMe[prop-missing]
globalThis.reactNativeDecorateInspectorFrontendHostInstance = (
InspectorFrontendHostInstance: $FlowFixMe,
) => {
Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

+26
View File
@@ -0,0 +1,26 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
// As far as Flow is concerned, this package is Node-only.
/*::
export type * from './node';
const Node = require('./node');
declare module.exports: typeof Node;
*/
// Because Electron doesn't support package.json `exports`, we need to
// switch at runtime.
if ('electron' in process.versions) {
// $FlowFixMe[invalid-export]
module.exports = require('./electron');
} else {
// $FlowFixMe[invalid-export]
module.exports = require('./node');
}
+1 -1
View File
@@ -13,7 +13,7 @@ export type * from './index.flow';
*/
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
require('../../../../scripts/babel-register').registerForMonorepo();
require('../../../../scripts/shared/babelRegister').registerForMonorepo();
}
export * from './index.flow';
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.80.0-main",
"version": "0.82.0-main",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,7 +23,7 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.80.0-main",
"@react-native/debugger-frontend": "0.82.0-main",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
@@ -35,11 +35,11 @@
"ws": "^6.2.3"
},
"engines": {
"node": ">= 22.14.0"
"node": ">= 20.19.4"
},
"devDependencies": {
"selfsigned": "^2.4.1",
"undici": "^5.28.5",
"undici": "^5.29.0",
"wait-for-expect": "^3.0.2"
}
}
@@ -70,7 +70,7 @@ export class DebuggerAgent {
this.#ws = null;
}
// $FlowIgnore[unsafe-getters-setters]
// $FlowFixMe[unsafe-getters-setters]
get socket(): WebSocket {
return nullthrows(this.#ws);
}
@@ -103,11 +103,11 @@ export class DebuggerMock extends DebuggerAgent {
originalHandleCallsArray === this.handle.mock.calls
? this.handle.mock.calls.slice(originalHandleCallCount)
: this.handle.mock.calls;
// $FlowIgnore[incompatible-use]
// $FlowIgnore[prop-missing]
// $FlowFixMe[incompatible-use]
// $FlowFixMe[prop-missing]
const [response] = newHandleCalls.find(args => args[0].id === message.id);
// $FlowIgnore[incompatible-return]
// $FlowIgnore[incompatible-indexer]
// $FlowFixMe[incompatible-return]
// $FlowFixMe[incompatible-indexer]
return response;
}
}
@@ -90,7 +90,7 @@ export class DeviceAgent {
});
}
// $FlowIgnore[unsafe-getters-setters]
// $FlowFixMe[unsafe-getters-setters]
get socket(): WebSocket {
return nullthrows(this.#ws);
}
@@ -64,9 +64,9 @@ export async function sendFromTargetToDebugger<Message: CdpMessageFromTarget>(
originalHandleCallsArray === debugger_.handle.mock.calls
? debugger_.handle.mock.calls.slice(originalHandleCallCount)
: debugger_.handle.mock.calls;
// $FlowIgnore[incompatible-type]
// $FlowFixMe[incompatible-type]
const [receivedMessage]: [Message] = newHandleCalls.find(
// $FlowIgnore[incompatible-call]
// $FlowFixMe[incompatible-call]
(call: [Message]) => call[0].method === message.method,
);
return receivedMessage;
@@ -97,13 +97,13 @@ export async function sendFromDebuggerToTarget<Message: CdpMessageToTarget>(
originalEventCallsArray === device.wrappedEventParsed.mock.calls
? device.wrappedEventParsed.mock.calls.slice(originalEventCallCount)
: device.wrappedEventParsed.mock.calls;
// $FlowIgnore[incompatible-use]
// $FlowFixMe[incompatible-use]
const [receivedMessage] = newEventCalls.find(
// $FlowIgnore[prop-missing]
// $FlowIgnore[incompatible-use]
// $FlowFixMe[prop-missing]
// $FlowFixMe[incompatible-use]
call => call[0].wrappedEvent.id === message.id,
);
// $FlowIgnore[incompatible-return]
// $FlowFixMe[incompatible-return]
return receivedMessage.wrappedEvent;
}
@@ -141,7 +141,7 @@ export async function createAndConnectTarget(
await until(async () => {
pageList = (await fetchJson(
`${serverRef.serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList).toHaveLength(1);
});
@@ -184,7 +184,7 @@ describe.each(['HTTP', 'HTTPS'])(
describe.each(['10.0.2.2:8080', '[::1]', 'example.com:2000'])(
'%s aliasing to and from localhost',
sourceHost => {
test('in source map fetching during Debugger.scriptParsed', async () => {
test('Debugger.scriptParsed - in source map fetching', async () => {
serverRef.app.use('/source-map', serveStaticJson({version: 3}));
const {device, debugger_} = await createAndConnectTarget(
serverRef,
@@ -220,6 +220,53 @@ describe.each(['HTTP', 'HTTPS'])(
}
});
test('Runtime.consoleAPICalled - in location resolutions', async () => {
const {device, debugger_} = await createAndConnectTarget(
serverRef,
autoCleanup.signal,
{
app: 'bar-app',
id: 'page1',
title: 'bar-title',
vm: 'bar-vm',
},
{
deviceHostHeader: sourceHost,
},
);
try {
const consoleMessage = await sendFromTargetToDebugger(
device,
debugger_,
'page1',
{
method: 'Runtime.consoleAPICalled',
params: {
stackTrace: {
callFrames: [
{
url: `${protocol.toLowerCase()}://${sourceHost}/bundleFile:1:2`,
field2: 'aaa',
},
{
url: `${protocol.toLowerCase()}://${sourceHost}/bundleFile:5:4`,
field3: 'bbb',
},
],
},
},
},
);
expect(consoleMessage.params.stackTrace.callFrames).toEqual([
{url: `${serverRef.serverBaseUrl}/bundleFile:1:2`, field2: 'aaa'},
{url: `${serverRef.serverBaseUrl}/bundleFile:5:4`, field3: 'bbb'},
]);
} finally {
device.close();
debugger_.close();
}
});
test('in Debugger.setBreakpointByUrl', async () => {
const {device, debugger_} = await createAndConnectTarget(
serverRef,
@@ -60,7 +60,7 @@ describe.each(['HTTP', 'HTTPS'])(
await until(async () => {
pageList = (await fetchJson(
`${serverRef.serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList).toHaveLength(1);
});
@@ -119,7 +119,7 @@ describe.each(['HTTP', 'HTTPS'])(
await until(async () => {
pageList = (await fetchJson(
`${serverRef.serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList).toHaveLength(1);
});
@@ -187,7 +187,7 @@ describe.each(['HTTP', 'HTTPS'])(
await until(async () => {
pageList = (await fetchJson(
`${serverRef.serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList).toHaveLength(1);
});
@@ -288,7 +288,7 @@ describe.each(['HTTP', 'HTTPS'])(
await until(async () => {
pageList = (await fetchJson(
`${serverRef.serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList).toHaveLength(1);
});
@@ -338,7 +338,7 @@ describe.each(['HTTP', 'HTTPS'])(
await until(async () => {
pageList = (await fetchJson(
`${serverRef.serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList).toHaveLength(1);
});
@@ -108,7 +108,7 @@ describe('inspector proxy device message middleware', () => {
await until(async () => {
pageList = (await fetchJson(
`${serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList.length).toBeGreaterThan(0);
});
@@ -314,7 +314,7 @@ describe('inspector-proxy device socket handoff', () => {
await until(async () => {
pageList = (await fetchJson(
`${serverRef.serverBaseUrl}/json`,
// $FlowIgnore[unclear-type]
// $FlowFixMe[unclear-type]
): any);
expect(pageList).toEqual(
expect.arrayContaining(

Some files were not shown because too many files have changed in this diff Show More