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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52678
From partner feedback, there's still appetite to support Node 20.x for the next <1y of life. Lower min version to `20.19.4` (Jul 2025) and widen test matrix in CI.
Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 20 (Overrides #51840)
Reviewed By: cortinico
Differential Revision: D78494491
fbshipit-source-id: c8d9dc6250cb11f8a12ca7e761b65f4a8dae9265
Summary:
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