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:
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:
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
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
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
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
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
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
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
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
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