Compare commits

...
Author SHA1 Message Date
Riccardo Cipolleschi c863979abc fix: reset Podfile 2025-06-19 17:13:30 +02:00
Riccardo Cipolleschi 27d152cd82 Update snapshot of ReactCodegen.podspec.template 2025-06-19 16:50:40 +02:00
Riccardo Cipolleschi b7b0013348 fix: support build rn core from source with prebuild rn dep 2025-06-19 16:36:30 +02:00
Christian Falch 325217371f [ios][prebuild] fixed header search paths in ReactCodegen template
Added a few missing search paths
2025-06-19 16:07:09 +02:00
Christian Falch 6f1e48d34d [ios][prebuild] fixed missing changes to ReactCodegen.podspec.template
Added support for prebuilt.
2025-06-19 15:54:18 +02:00
0aa79897e6 fix: revert change to dSYM path
Co-authored-by: Christian Falch <875252+chrfalch@users.noreply.github.com>
2025-06-19 15:19:59 +02:00
Riccardo Cipolleschi 08a6a1ae65 chore: add task to TODO 2025-06-19 15:17:14 +02:00
Riccardo Cipolleschi ad732b84ab fix: fix build from source 2025-06-19 15:11:45 +02:00
Riccardo Cipolleschi 284a20b0de refactor: abort if use local rndeps when no file is present 2025-06-19 14:51:38 +02:00
Riccardo Cipolleschi 742c205e52 fix: remove resolve_redirect from rndependencies as it is not used 2025-06-19 14:49:39 +02:00
Riccardo Cipolleschi 93dc62ac08 fix: remove resolve_redirect as it is not used 2025-06-19 14:49:04 +02:00
Riccardo Cipolleschi e0b07568fe fix: handle XML requests properly 2025-06-19 14:48:01 +02:00
Riccardo Cipolleschi 5adfe16ad2 rename: release_tarball_url to stable 2025-06-19 14:46:37 +02:00
Riccardo Cipolleschi 7b456c0e3f refactor: rename podspec_source_download_prebuild_release_tarball to stable 2025-06-19 14:45:59 +02:00
Riccardo Cipolleschi 0e91eadc12 refactor: simplify if check 2025-06-19 14:44:59 +02:00
Riccardo Cipolleschi 1e8c9639a0 refactor: extract abort code to helper function 2025-06-19 14:44:39 +02:00
Christian Falch 269456cf55 [ios-prebuild] Implemented support for prebuilt in cocoapods
This 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.
2025-06-18 17:36:33 +02:00
Mateo GuzmánandFacebook GitHub Bot ccc8ce0d01 Remove lint-java (#52092)
Summary:
Following up from https://github.com/facebook/react-native/pull/52064#discussion_r2151906096, this PR removes lint-java and its related files.

The codebase is moving entirely to Kotlin and a Kotlin linter is being setup as well, the usage of the Java linter will become unnecessary.

## Changelog:

[INTERNAL] - Remove lint-java

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

Test Plan: Relying on CI here to be green.

Reviewed By: cortinico

Differential Revision: D76880712

Pulled By: sbuggay

fbshipit-source-id: 2736772e7347f435b17d007e0322e1afc2fb2d7b
2025-06-18 08:22:04 -07:00
Krzysztof PiaskowyandFacebook GitHub Bot 1cc12ce7fd Fix the serialization of the alpha channel in the rgba() color string format (#52087)
Summary:
The alpha channel in the `rgba()` color string format should be a value between [0, 1] instead of [0, 255], as stated in the [React Native Documentation](https://reactnative.dev/docs/colors#red-green-blue-rgb).

## Changelog:

[GENERAL] [FIXED] - Fix the serialization of the alpha channel in the `rgba()` color string format.

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

Test Plan: I didn't find any usage of that function in React Native, but it is part of the public API, and I just wanted to use it in Reanimated.

Reviewed By: fabriziocucci

Differential Revision: D76822560

Pulled By: javache

fbshipit-source-id: 370d9729881c1eda794c1b9fe54d258242fde814
2025-06-18 07:28:34 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 28986a7599 fix(iOS): allow to interactively swipe down the modal (#51483)
Summary:
This PR allows to interactively close the modal using the swipe down gesture.

It fixes 5 year old issue: https://github.com/facebook/react-native/issues/29319

In short it removes `modalInPresentation` which according to the documentation causes: "UIKit ignores events outside the view controller’s bounds and **prevents the interactive dismissal of the view controller while it is onscreen.**".

It also adds another delegate event to call onRequestClose whenever modal is closed by gesture.

https://github.com/user-attachments/assets/8849ecba-f762-47ec-a28b-b41c1991a882

## Changelog:

[IOS] [ADDED] - Allow to interactively swipe down the modal.
Add allowSwipeDismissal prop.

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

Test Plan: Test if swiping down the modal calls onRequestClose

Reviewed By: rshest

Differential Revision: D75125438

Pulled By: javache

fbshipit-source-id: d4f2c8b59447680f405b725d0809573a937f97cf
2025-06-18 07:18:40 -07:00
Zeya PengandFacebook GitHub Bot ce75271d47 Gate logic to remove js sync at end of native animation loop (#52068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52068

## Changelog:

[Internal] [Changed] - Gate logic to remove js sync at end of native animation loop

because https://github.com/facebook/react-native/pull/51264 is causing regression in some cases, and was recently reverted again in https://github.com/facebook/react-native/pull/51933 . Using an extra feature flag to gate this potential optimization

Reviewed By: lenaic

Differential Revision: D76759441

fbshipit-source-id: 6950ab746b02af6e0b710ded0ddb6993673e5212
2025-06-18 06:54:09 -07:00
Zeya PengandFacebook GitHub Bot 99c60bfe0a Create feature flag cxxNativeAnimatedRemoveJsSync (#52067)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52067

## Changelog:

[Internal] [Changed] - Create feature flag cxxNativeAnimatedRemoveJsSync for optimization in cxx animated

Reviewed By: christophpurrer

Differential Revision: D76763197

fbshipit-source-id: 503d7cea53b6a5c3ed769b0d77a9d64730029433
2025-06-18 06:54:09 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot a477ee6ced Update ReactNativeCPP.api file (#52103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52103

## Changelog:
[Internal] -

This got out of sync again, causing the corresponding signal to fail.

Reviewed By: lenaic

Differential Revision: D76893994

fbshipit-source-id: e0e78cd41633972be53aa883c6015588b547b9c2
2025-06-18 06:38:35 -07:00
Rubén NorteandFacebook GitHub Bot a17a7003b1 Remove unnecessary feature flags from fantom tests (#52101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52101

Changelog: [internal]

`enableAccessToHostTreeInFabric` is enabled by default in tests, so doesn't need to be explicitly set.

Reviewed By: lenaic

Differential Revision: D76894319

fbshipit-source-id: 437a763bd9c557ecbafa53e31410da1120151b86
2025-06-18 06:03:12 -07:00
Vincent WongandFacebook GitHub Bot f70c01cc30 Revert D76757706: Fix LegacyViewManagerInteropComponentDescriptor
Differential Revision:
D76757706

Original commit changeset: 6fc6127b6ff4

Original Phabricator Diff: D76757706

fbshipit-source-id: 88a72c06dd799c322320870c69906cb843a6021d
2025-06-18 04:54:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot bc6b4f0525 Specify missing default destructor and assignment operator declarations in ImageRequest (#52099)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52099

# Changelog:
[Internal] -

Fixes a linter warning for the `ImageRequest` class declaration (AKA "C++ rule of 5").

Reviewed By: javache

Differential Revision: D76888523

fbshipit-source-id: aa080a582942bd083030d6b6ecd82294566b507c
2025-06-18 04:43:28 -07:00
Enrique López MañasandFacebook GitHub Bot 73133a31d5 Deprecating SafeAreaView (#51896)
Summary:
`SafeAreaView` has been marked for deprecation some time ago. The [following discussion](https://github.com/react-native-community/discussions-and-proposals/discussions/827) summarizes some of the arguments for it, but in a nutshell: it is iOS-only, limited in functionality, and incompatible with Android 15's enforced edge-to-edge rendering.

~~The Android/Kotlin classes have also been deprecated.~~ Not anymore, they are internal and might stay as they are.

## Changelog:

[General] [Deprecated] - Deprecate SafeAreaView due to its iOS-only support and incompatibility with Android 15 edge-to-edge behavior; recommend using react-native-safe-area-context instead.

<!-- 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/51896

Test Plan: Access `SafeAreaView` in your code and check that the deprecation warning logs exactly once in the console.

Reviewed By: rshest

Differential Revision: D76816160

Pulled By: cortinico

fbshipit-source-id: 60f539f9425f8ed8e19578a4530cb1f7d9b54488
2025-06-18 04:15:05 -07:00
Nicola CortiandFacebook GitHub Bot 9258e90c92 Publish, Close and Release the Maven repository during build_npm_package
Summary:
Due to us moving to central.sonatype.com for publishing, we cannot publish and release the Maven repository in 2 distinct invocations.
This consolidates all the publishing job to happen during build_npm_package

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D76888543

fbshipit-source-id: 3cb0db6176ed2221a12b4f3f1f575232aa006a6c
2025-06-18 04:02:28 -07:00
Fabrizio CucciandFacebook GitHub Bot f783d30beb Add changelog for 0.79.4 (#52100)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52100

As pet title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D76889179

fbshipit-source-id: 7551ade832a88ff8d6501945228e50d2572006bb
2025-06-18 03:16:48 -07:00
Samuel SuslaandFacebook GitHub Bot 2915902763 introduce gesture driven animations sync mechanism for C++ Animated (#52081)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52081

changelog: [internal]

# The problem in Java and Obj-C Native Animated
--------------------

Event based animations in Native Animated have one big problem: detecting when the gesture is completed. This has led to number of bugs over the years that manifest as Pressable's onPress not triggering. The root cause of the problem is disconnect between where a piece of UI is on the screen and where Fabric thinks it is. Fabric is used for hit testing, and other things like intersection observing, and if Fabric does not have up to date values, weird things start happening.

This diff implements completion detection for event based animations. Unlike previous solutions, it does not depend on sequence of events nor it uses React setState to update shadow tree.

# Completion Detection
--------------------

The key mechanism for marking event animations as completed is in the `onRender` method:

- After processing animations, if `onAnimationFrame` returns false - indicating no UI changes, the system assumes all event-driven animations have completed.
- it then:
    *   Collects all animated value nodes connected to event drivers.
    *   Updates all nodes connected to these "finished" animations.
    *   isEventAnimationInProgress_ to false.
    *   Commits final property values to the UI.

The benefits over the previous solution:
- It works across all platforms without the need to emit "completion events".
- It uses a UI frame that wouldn't animate anything to do syncing work. Using main thread IDLE time towards bookkeeping.
- No need to call into JavaScript for synchronisation.

Reviewed By: zeyap

Differential Revision: D76743467

fbshipit-source-id: b21ab5ef9c71ff93fd0250e6af6b22ded395be8d
2025-06-18 02:38:43 -07:00
Soe LynnandFacebook GitHub Bot c31ff55b92 Fix LegacyViewManagerInteropComponentDescriptor (#52094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52094

Changelog [Internal]:
- LegacyViewManagerInteropComponentDescriptor was initiaizing Module just to get the `Class` for `componentName`. This can cause deadlock issue when we have module that needs mainQueue to initialize.

Reviewed By: RSNara

Differential Revision: D76757706

fbshipit-source-id: 6fc6127b6ff472fda509364f0c3daa13b6a6df1e
2025-06-17 22:16:43 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot d405e306e3 Make experimental_accessibilityOrder a View prop only (#52056)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52056

This prop should only be used on Views using it in Text is not very intuitive and also would require some unnecessary edge case handling on Android which we now also remove

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D76744972

fbshipit-source-id: 23113789747295ea1a306727f1e29e3ddc078ac4
2025-06-17 18:07:58 -07:00
Ramanpreet NaraandFacebook GitHub Bot ad88309843 Compile out the legacy runtime
Summary:
Compile out the legacy c++ core from android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D72991984

fbshipit-source-id: 56bb6ca1c4797adb9235e982121712b11e85e109
2025-06-17 16:02:03 -07:00
FBLite Revert BotandFacebook GitHub Bot fd29d68c16 Revert D76793705: Fix possible invalid measurements when width or height is zero pixels
Differential Revision:
D76793705

Original commit changeset: ea4c00e68891

Original Phabricator Diff: D76793705

fbshipit-source-id: 95d6b66ab08e073da9fb07fd4094a7e30e2f453b
2025-06-17 14:33:32 -07:00
Nick GerlemanandFacebook GitHub Bot 5348f9ff1e Fix possible invalid measurements when width or height is zero pixels (#52073)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52073

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

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

fbshipit-source-id: ea4c00e688912a58c08801e4a14ddf1b293a5d86
2025-06-17 12:15:55 -07:00
Nick GerlemanandFacebook GitHub Bot e08e27a6fa Support Facsimile Views in Jest E2E Text Selectors (#52070)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52070

Changelog: [Internal]

Reviewed By: joevilches, rshest

Differential Revision: D76783111

fbshipit-source-id: 5f4c3a9cf6d59eff15a071761ef83425bd4c6d23
2025-06-17 12:13:27 -07:00
Nick GerlemanandFacebook GitHub Bot ded4ae1f78 Fix antialiasing for Facsimile on Android < 10 (#52069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52069

Noticed an E2E tests against old emulator version showed aliased Text against Facsimile. This is because non-scratch-paint path does not explicitly enable anti-aliasing (like TextView does), older versions of Android don't enable by default, and `updateTextPaint()` no longer sets, after call to `paint.reset()` was removed.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D76780749

fbshipit-source-id: 26f0de6d6558649fe08339f1ac91390bbd4cce3c
2025-06-17 10:51:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 331fab0683 Remove JSC related files from the repo (#51945)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51945

Remove code from jsc folder from React Native

## Changelog:
[iOS][Removed] - Remove code from jsc folder from React Native

Reviewed By: rshest

Differential Revision: D76419587

fbshipit-source-id: 6d5079c8f2843872172620601629e9643c7debdc
2025-06-17 09:38:21 -07:00
Nicola CortiandFacebook GitHub Bot 33aa7b9161 Remove unreferenced CMakeLists.txt for ReactCommon/jsc (#52078)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52078

This Cmake file is not imported anymore and can be removed now.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D76808417

fbshipit-source-id: 81824c7c46080bc16c891b5c11c3a8946f16c1b9
2025-06-17 06:26:18 -07:00
Christian FalchandFacebook GitHub Bot 560ac23001 Added missing define to target .reactRuntime (#52082)
Summary:
The target needs the HERMES_ENABLE_DEBUGGER flag in debug just like .reactHermes does.

This commit fixes this by adding the define to the reactRuntime target.

## Changelog:

[IOS] [FIXED] - Added HERMES_ENABLE_DEBUGGER to debug configuration for the reactRuntime target.

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

Test Plan: Prebuild React Core

Reviewed By: robhogan

Differential Revision: D76813200

Pulled By: cipolleschi

fbshipit-source-id: cb81a40fb9c5a91ca40c3a27ae4ccdf043186bac
2025-06-17 06:21:19 -07:00
Pieter De BaetsandFacebook GitHub Bot 87cd1c0a0a Add rncore stub headers for backwards-compat (#52083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52083

These headers were removed in D55037569 but we may have some targets still depending on them. Add redirection headers with warnings to help users migrate without this being a breaking change.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D76810433

fbshipit-source-id: 43cddcc69eefbcff0c0140e165fb893bee493c79
2025-06-17 06:18:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 3ea4f156c9 Change imports from jsireact to reacthermes (#52011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52011

This change aligns the import path of `jsireact/HermesExecutorFactory` to the OSS one: `reacthermes/HermesExecutorFactory`

## Changelog:
[Internal] -

Reviewed By: javache

Differential Revision: D76600638

fbshipit-source-id: d9ae35dec000196e4a51668c482fc27f3e6018b4
2025-06-17 05:51:02 -07:00
Nicola CortiandFacebook GitHub Bot 5e1768746a Unblock RNTester which is currently instacrashing. (#52077)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52077

RNTester is currently crashing on release due to a stripped `mHybridData` field.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D76808165

fbshipit-source-id: 049cca49f683c5dc92aa1f9a37dd7b4371dcbfd6
2025-06-17 04:54:47 -07:00
Samuel SuslaandFacebook GitHub Bot e259961e8b return object with string keys from getDirectManipulationProps
Summary:
changelog: [internal]

make API getDirectManipulationProps slightly nicer by returning `[string]: mixed` instead of mixed.

Reviewed By: rubennorte

Differential Revision: D76763893

fbshipit-source-id: 56c56578251b991f5fb3e68d44e834da17fc4a3b
2025-06-17 04:49:44 -07:00
Andrew DatsenkoandFacebook GitHub Bot aeaae4294f Add hermes and jsi (#52060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52060

Changelog: [Internal]

Add hermes and jsi so we can evaluate JS.

Reviewed By: christophpurrer

Differential Revision: D76746362

fbshipit-source-id: a5fbb90d06a8608154b6ae80242b969e7cb03cea
2025-06-17 04:18:08 -07:00
Andrew DatsenkoandFacebook GitHub Bot 74b6acb1f0 Add gflags (#52015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52015

Changelog: [Internal]
Add gflags to fantom_tester so we can pass in data like featureFlags

Reviewed By: cortinico

Differential Revision: D76618409

fbshipit-source-id: a18e642a02c405eef972a7418a606a5980253b6a
2025-06-17 04:18:08 -07:00
Fabrizio CucciandFacebook GitHub Bot a91e598e6a Minor renaming in ViewManagerRegistry (#52079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52079

After the conversion to Kotlin (D74571782), there seems to be a synchronization issue when iterating on `viewManagers` (see T226095884).

There could a shadowing problem kicking in in a few places due to the fact that we are declaring a `viewManagers` local variable when there is already a `viewManagers` instance variable within `ViewManagerRegistry`.

To remove any ambiguity, here we are renaming the instance variable `viewManagers` as `viewManagersMap` (which also makes more sense).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D76807070

fbshipit-source-id: 4f598700e04251409ee19b60515639e90699cc9e
2025-06-17 04:12:54 -07:00
Rubén NorteandFacebook GitHub Bot 10cabcc0a7 Refactor surface creation in Fantom (#52076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52076

Changelog: [internal]

This refactors the implementation of surface creation in Fantom to make the surface ID handled in native, and treated as an opaque type the same way we do at runtime in RN.

Reviewed By: andrewdacenko

Differential Revision: D76744096

fbshipit-source-id: 1b49a1cbdf0a8d6804de3b87ede727207bc662d9
2025-06-17 03:52:09 -07:00
zhongwuzwandFacebook GitHub Bot 3bfbaa8455 Fabric: Only add selection of textinput payload when event is selectionChange (#51051)
Summary:
Fixes https://github.com/facebook/react-native/issues/51020: TextInputChangeEventData does not contain selection (see [here](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts#L515-L518)). Additionally, Android does not have selection either (see [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.kt#L33-L37)) (iOS old arch also not contains it). We can consolidate these to prevent any misleading information.

## Changelog:

[IOS] [FIXED] -  Fabric: Only add selection of textinput payload when event is selectionChange

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

Test Plan: TextInput `onChange`'s event should not contains `selection`.

Reviewed By: javache

Differential Revision: D76253999

Pulled By: cipolleschi

fbshipit-source-id: 8a889cce4998be0e31f4aa33961759e7d228e06f
2025-06-17 03:23:48 -07:00
Tim YungandFacebook GitHub Bot 742ffa39fb RN: Update Fantom Path in EXCLUDED_FIRST_PARTY_PATHS (#52051)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52051

In {D76368959}, I moved `react-native-fantom` from `packages/` to `private/` and missed this reference.

Changelog:
[Internal]

Reviewed By: rubennorte

Differential Revision: D76743071

fbshipit-source-id: f99d3f2ac5e14fd23f7cf208ca030541844dddc6
2025-06-17 02:59:42 -07:00
Dawid MałeckiandFacebook GitHub Bot 6b40f35032 Add diff-api-snapshot for public API breaking change detection (#51972)
Summary:
This diff adds snapshot `diff-api-snapshot` script for public JS API breaking change detection.

### Motivation
Detecting if there are any breaking changes introduced in the commit. It is achieved by comparing `ReactNativeApi.d.ts` rollup from the current and previous revision.

This is a naive implementation with a three possible outcomes:
- BREAKING
- POTENTIALLY_NOT_BREAKING,
- NOT_BREAKING

The algorithm analyses exported top-level statements (after inlining) in both rollups and tries to create a mapping between them by name.

The **BREAKING** outcome happens whenever the statement is:
- removed
- renamed
- changed
- not exported anymore (private)

The **POTENTIALLY_NOT_BREAKING** outcome  happens if it's not BREAKING and the new statement is added.

The **NOT_BREAKING** outcome happens if public API snapshot doesn't change.

Changelog:
[General][Added] - Add public JS API breaking change detection under `yarn diff-api-snapshot` script.

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

Test Plan:
Signals, added tests.

In `react-native-github` run:
`yarn test scripts/diff-api-snapshot/__tests__/diffApiSnapshot-test.js`

Rollback Plan:

Reviewed By: j-piasecki

Differential Revision: D76430965

Pulled By: coado

fbshipit-source-id: 095a196aa4f643501db0af9262556ddefff5d30d
2025-06-17 02:27:53 -07:00
Rubén NorteandFacebook GitHub Bot 4556bdf4fc Make OpaqueNativeObserverHandle really opaque (#52054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52054

Changelog: [internal]

This makes `OpaqueNativeObserverHandle` really opaque and fixes the problems in the observer implementation caused by it.

Reviewed By: yungsters

Differential Revision: D76744094

fbshipit-source-id: a8b6fa43ee8a5ee9d15f0171a83fe0badd46d9c3
2025-06-17 02:24:22 -07:00
Rubén NorteandFacebook GitHub Bot 98fdc965b9 Make IdleCallbackID opaque in NativeIdleCallbacks implementation (#52055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52055

Changelog: [internal]

This migrates NativeIdleCallbacks to use opaque types now that they're supported in the codegen

Reviewed By: yungsters

Differential Revision: D76744095

fbshipit-source-id: d9d1beea8df7f5635fc531a2cef001ea0aed38b4
2025-06-17 02:24:22 -07:00
Rubén NorteandFacebook GitHub Bot e8cdb99baa Make NativeIntersectionObserverToken opaque in NativeIntersectionObserver implementation (#52053)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52053

Changelog: [internal]

The codegen allows us to do this already! :D

Reviewed By: yungsters

Differential Revision: D76741113

fbshipit-source-id: d460685bc6ad6ba11f7132136e8603bd57488014
2025-06-17 02:24:22 -07:00
Rubén NorteandFacebook GitHub Bot a15fc102e6 Add support for opaque types in Flow codegen for native modules (#52052)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52052

Changelog: [General][Added] - Add support for Flow opaque types in codegen for native modules

This allows us to codegen native modules that expose opaque types, but the implementation sees the type the same way they're visible in the JS spec.

Reviewed By: yungsters

Differential Revision: D76741112

fbshipit-source-id: 100ca9aa7f93d35120c52153f756436c9c380b07
2025-06-17 02:24:22 -07:00
Samuel SuslaandFacebook GitHub Bot 6ddfa708b0 small adjustments to when value listener is fired (#52063)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52063

changelog: [internal]

`addListener` API shouldn't fire when offset for node changes. Check https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.mm for reference.

Reviewed By: mdvacca

Differential Revision: D76740873

fbshipit-source-id: 04fb59ee9b630402803c4741f501d9d10591fa71
2025-06-17 02:16:32 -07:00
Samuel SuslaandFacebook GitHub Bot 1456d06c86 add comment explaining why addListener and removeListeners are not needed (#52062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52062

changelog: [internal]

- update comments to be more descriptive.
- use `#pragma mark -` to better group methods in `NativeAnimatedNodesManager`. It is nicely formatted in VSCode.

{F1979345410}

Reviewed By: mdvacca

Differential Revision: D76737257

fbshipit-source-id: c4b22ca45cd5dec2c72e7931bfec4466cda3070c
2025-06-17 02:16:32 -07:00
Jakub PiaseckiandFacebook GitHub Bot 7bfadb429c Update prettier config for the API Snapshot (#52031)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52031

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D76710754

fbshipit-source-id: 36a07a2797b1270681420471aa66987163269a11
2025-06-17 00:06:13 -07:00
Jakub PiaseckiandFacebook GitHub Bot faaec467b9 Strip unstable/experimental identifiers from the API snapshot (#52008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52008

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73102445

fbshipit-source-id: fe2ce04b32c9d839fec8b33eda9c67e551918ba3
2025-06-17 00:06:13 -07:00
Nick GerlemanandFacebook GitHub Bot 64ce7695f5 Fix Facsimile Hit Testing Bugs (#52065)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52065

1. We can crash when tapping at the boundary between two spans. Previous ReactTextView had some custom heuristic for overlapping ReactTags, assuming they could be nested, which never happens (We only have a single tag per AttributedString fragment), but spans may overlap at a single character, where one is meant to be exclusive, and the other inclusive. We add logic for that.
2. We don't incorporate the offset of the text layout within the view for hit testing, needed for padding or `textAlignVertical`.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D76764051

fbshipit-source-id: 308756c45d8ff574420dfc1c88678bae7e03e767
2025-06-16 20:51:23 -07:00
Gabriel DonadelandFacebook GitHub Bot 3ae9328571 Bump @types/react to 19.1 (#52059)
Summary:
While testing I notice that `types/react` was not updated in some peer depencies

## Changelog:

[GENERAL] [CHANGED] - Bump types/react to 19.1

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

Test Plan: CI should be green

Reviewed By: christophpurrer

Differential Revision: D76763084

Pulled By: sbuggay

fbshipit-source-id: c078c03aa57ca04040c64986dd7957da8a6f2c2d
2025-06-16 17:45:11 -07:00
Christoph PurrerandFacebook GitHub Bot 89401b78cd Update outdated ReactNativeCPP.api (#52061)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52061

changelog: [internal] Update outdated ReactNativeCPP.api

Reviewed By: sammy-SC

Differential Revision: D76763455

fbshipit-source-id: bb9b72742594c19d70d930fa3827b450922428bb
2025-06-16 15:13:01 -07:00
Christoph PurrerandFacebook GitHub Bot 089fb10740 Remove folly::EvictingCacheMap (#52019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52019

Replace folly::EvictionMap with pure std implementation

changelog: [internal][Breaking] Remove unused set() method of SimpleThreadSafeCache

Reviewed By: javache, sammy-SC

Differential Revision: D76631579

fbshipit-source-id: 15dfa8a8c0d2809440c214a72e48def6e1dba2f0
2025-06-16 15:06:17 -07:00
Samuel SuslaandFacebook GitHub Bot 2528e48e93 implement Value.extractOffset in C++ Animated (#52049)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52049

changelog: [internal]

As title says, add implementation of [Value.extractOffset](https://reactnative.dev/docs/animatedvalue#extractoffset)

Reviewed By: zeyap

Differential Revision: D76735003

fbshipit-source-id: db09e2ed1c8b540d911970d2268fcd0374717e96
2025-06-16 14:30:19 -07:00
Samuel SuslaandFacebook GitHub Bot cb24596c33 add Value.flattenOffset to C++ Animated (#52047)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52047

changelog: [internal]

implement AnimatedValue.[flattenOffset](https://reactnative.dev/docs/animatedvalue#flattenoffset) in C++ Animated.

Reviewed By: javache

Differential Revision: D76733524

fbshipit-source-id: df969cf8be421dd6fa22c4100ccd2c33aa7c91d8
2025-06-16 14:30:19 -07:00
Peter AbbondanzoandFacebook GitHub Bot cfb6c968dd Mark hasTVPreferredFocus as deprecated (#52043)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52043

The `hasTVPreferredFocus` prop is functionally similar to the `focusable` prop. On iOS, the props are identical. The primary difference appears on Android, where the prop attempts to request focus when set to true. Attempting to invoke imperative API calls through declarative means has been [a source of confusion](https://github.com/react-native-tvos/react-native-tvos/issues/237) and we should instead recommend requesting focus through imperative means, like calling `focus()` on a specific view's ref instead. Workarounds presented rely on lifecycle methods to request focus natively.

This change only marks these methods as deprecated on JS. In the following version, they will be removed from the public API.

Changelog: [General][Deprecated] - Deprecate `hasTVPreferredFocus`

Reviewed By: andrewdacenko

Differential Revision: D76732539

fbshipit-source-id: 64912b4dacb76cd40e79148c1082d8ed8f573879
2025-06-16 12:05:47 -07:00
Mathieu ActhernoeneandFacebook GitHub Bot 3c17e101ee Add UiModeUtils.isDarkMode helper (#51925)
Summary:
This PR is part of the [edge-to-edge core implementation effort](https://github.com/facebook/react-native/pull/47554). It adds a helper to `ContextUtils`, called `isDarkMode` in order to be reused accross the Android codebase.

## Changelog:

- [Internal] [Added] - Add `UiModeUtils.isDarkMode` helper

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

Test Plan:
<img width="300" alt="Screenshot 2025-06-10 at 17 50 19" src="https://github.com/user-attachments/assets/48795406-e852-486a-bae8-54507ad769ee" />

<img width="300" alt="Screenshot 2025-06-10 at 17 50 42" src="https://github.com/user-attachments/assets/0dbdece9-04f7-487b-ace8-4786c8da381d" />

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76352849

Pulled By: alanleedev

fbshipit-source-id: fbbc772d1dfa3e30e62a71a711de11b85cdec446
2025-06-16 10:35:35 -07:00
Nicola CortiandFacebook GitHub Bot 8174d02811 Cleanup all the JSC 1st party code. (#51949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51949

This code is no longer necessary now that JSC support is offered via
https://github.com/react-native-community/javascriptcore

Instructions for users on how to continue using JSC are available in the README of such library.

Changelog:
[Android] [Removed] - Remove 1st party JSC support

Reviewed By: javache

Differential Revision: D76420382

fbshipit-source-id: f8e61556bb02fe4d5b34f89b40f8e5e38ac1c8d6
2025-06-16 10:30:39 -07:00
Janic DuplessisandFacebook GitHub Bot 7e2f17ffe2 Only generate recursive accessibility label for accessible elements (#51988)
Summary:
When trying to implement e2e tests using maestro in a large app I ran into major performance issues. I tracked it down to the generation of recursive accessibility labels.

The maestro iOS driver uses [XCUIElement snapshot dictionaryRepresentation](https://developer.apple.com/documentation/xctest/xcuielementsnapshot/dictionaryrepresentation) [here](https://github.com/mobile-dev-inc/Maestro/blob/96e8c9a2be3430be991c13d033486d52d2001334/maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/Handlers/ViewHierarchyHandler.swift#L234) to get a representation of the view hierarchy. The problem is that will query the accessibilityLabel for every single view, starting from the root of the app. It goes without saying that this is extremely slow since it traverses the view hierarchy, executing a recursive function on each one.

I think the only way to fix this is to avoid generating these recursive labels when not needed. From my understanding these should only be needed for accessible views.

## Changelog:

[IOS] [CHANGED] - Only generate recursive accessibility label for accessible elements

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

Test Plan:
- Tested using VoiceOver in RN tester to make sure it works exactly the same.
- Tested in an app using Maestro to make sure this fixes the performance issue.
- Tested in RNTester running Maestro e2e test by creating a larger view hierarchy to make the problem more apparent, and simulate a real app. Using [this code](https://gist.github.com/janicduplessis/9f6b302d92b4e22ff5e8462a8a84e237) in RNTesterAppShared.js

Before:

```
❯ yarn e2e-test-ios
yarn run v1.22.22
$ ./scripts/maestro-test-ios.sh

Waiting for flows to complete...
[Passed] flatlist (14s)
[Passed] text (28s)
[Passed] modal (16s)
[Passed] image (8s)
[Passed] button (10s)
[Passed] legacy-native-module (32s)
[Passed] pressable (32s)
[Passed] new-arch-examples (35s)

8/8 Flows Passed in 2m 55s

  Done in 180.26s.
```

After:

```
❯ yarn e2e-test-ios
yarn run v1.22.22
$ ./scripts/maestro-test-ios.sh

Waiting for flows to complete...
[Passed] flatlist (7s)
[Passed] text (15s)
[Passed] modal (10s)
[Passed] image (4s)
[Passed] button (6s)
[Passed] legacy-native-module (16s)
[Passed] pressable (16s)
[Passed] new-arch-examples (17s)

8/8 Flows Passed in 1m 31s

  Done in 97.53s.
```

Reviewed By: christophpurrer, joevilches

Differential Revision: D76581949

Pulled By: cipolleschi

fbshipit-source-id: 0689c7d43a0c865572c4ee5ea32ee9b2dcb33ad5
2025-06-16 10:30:33 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot e13ee7a3d0 Fix accessibilityRespondsToUserInteraction not setting on first render (#51986)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51986

"{}" defaults to false on C++ but the prop is not initialized which means that if accessibilityEnablesUserInteraction is set to false it will not be applied on first render. setting the default to true fixes that issue

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D76532158

fbshipit-source-id: 51cba8b89eb239e01db985d412dd2b19e482f068
2025-06-16 10:22:05 -07:00
Alan LeeandFacebook GitHub Bot 9613d377de Fix Type comparison (v2) in TurboModuleInteropUtils.kt (2/2) (#51979)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51979

Fix type checking that was left out from the last diff; D73224138

We should unify the type checking so remove uses of `java.lang.Boolean` and just use Kotlin version of `Boolean`.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D76523674

fbshipit-source-id: 293ae5998c78c98a20c7d6cf962ab7b19087fd9c
2025-06-16 09:48:44 -07:00
David VaccaandFacebook GitHub Bot 3a0a7b0701 Export RNCodegen types (#52048)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52048

This diff exports types defined in RNCodegen to be used by other codegens

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D76472492

fbshipit-source-id: fa236a254a9a4211d2e00ace436f55978a262a76
2025-06-16 09:46:31 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c777ad0b84 Fix nightlies artefacts download (#52041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52041

After changing the publishing logic on Maven, the download logic for the artefacts published in a Snapshot was broken, because Maven does not support the redirect anymore.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76725418

fbshipit-source-id: 8bad88915d9bad96355a048486972a55f232d109
2025-06-16 09:26:41 -07:00
Mateo GuzmánandFacebook GitHub Bot 3412215e3a Kotlin: clean up some unused symbols (#52029)
Summary:
Static code analysis reports numerous unused symbols across the codebase, which accounts for several static code analysis warnings. I've cleaned up some of them (not all of them because many of them are false positives from testing files)

The cleaned-up symbols are mostly private and from internal classes, so this should not impact users (unless they are used internally at Meta – in that case, let me know so I can revert accordingly)

## Changelog:

[INTERNAL] - Kotlin: clean up some unused symbols

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

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

Reviewed By: javache

Differential Revision: D76722313

Pulled By: cortinico

fbshipit-source-id: 8c7dfe204fa7c457b7484a7edd120ae45e1d604d
2025-06-16 09:04:51 -07:00
Nicola CortiandFacebook GitHub Bot 19fd1536a4 Clarify JS documentation for StatusBar on Android 15+ (#52044)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52044

This clarifies that some props on `StatusBar` are not working on Android 15+
See https://github.com/facebook/react-native/issues/51928

Changelog:
[Internal] [Changed] -

Reviewed By: yungsters

Differential Revision: D76734324

fbshipit-source-id: 88b6f30f63ca0e269d5115e69a8a2b0ca222c2f4
2025-06-16 08:56:27 -07:00
Nicola CortiandFacebook GitHub Bot f6b7bd93d8 Fix crash on ReactInstance due to null returned for getViewManagerNames (#52035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52035

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

Some OSS library is still returning null for `getViewManagerNames` especially if they're
implementing the `ViewManagerOnDemandReactPackage` in Java.
I'm adding a try-catch here so that we prevent the NPE for those scenarios.

Changelog:
[Android] [Fixed] - Fix crash on ReactInstance due to null returned for getViewManagerNames

Reviewed By: javache

Differential Revision: D76723826

fbshipit-source-id: cc159dee389257c6877b03a67840a45ee5bec165
2025-06-16 07:49:11 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2ade12d747 Fix OSS CI (#52042)
Summary:
The OSS CI for iOS is broken because of a couple of commit that landed:
- Commit 05a61e8161 : dynamic frameworks are broken
- Commit abc8fe1c92 : pod donwload is broken

This change fixes both of them

## Changelog:
[Internal] - Fix OSS CI

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

Test Plan:
Tested locally by building RNTester with Dynamic frameworks

```
USE_FRAMEWORKS=dynamic bundle exec pod install
```

Reviewed By: rshest, lenaic, GijsWeterings

Differential Revision: D76730331

Pulled By: cipolleschi

fbshipit-source-id: 71cca1f50763d24773dedcd8267130df261b01dc
2025-06-16 07:29:00 -07:00
Tim YungandFacebook GitHub Bot f53f6137e6 RN: Migrate View to Component Syntax (#52018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52018

Migrates `View` to use Flow's [Component Syntax](https://flow.org/en/docs/react/component-syntax/).

Component Syntax offers more concise syntax for expressing component definitions and eliminates the need for `View` to be cast as a component type. Component types improve type safety by more accurately modeling `ref` as props and enabling the use of modern type utilities such as `React.PropsOf<Component>` and `React.RefOf<Component>`.

This represents the first introduction of Component Syntax in the open source React Native repository, which is lowered to standard JavaScript through the use of [`hermes-parser`](https://www.npmjs.com/package/hermes-parser) and the following supporting packages:

- [`babel-plugin-syntax-hermes-parser`](https://www.npmjs.com/package/babel-plugin-syntax-hermes-parser)
- [`hermes-eslint`](https://www.npmjs.com/package/hermes-eslint)
- [`prettier-plugin-hermes-parser`](https://www.npmjs.com/package/prettier-plugin-hermes-parser)

By default, [`react-native/babel-preset`](https://www.npmjs.com/package/react-native/babel-preset) already provides configuration for `babel-plugin-syntax-hermes-parser`.

Although this is the first usage of Component Syntax, there are already Flow syntax features used in React Native that have required `hermes-parser` (e.g. [type casting expressions](https://flow.org/en/docs/types/casting/), [type guards](https://flow.org/en/docs/types/type-guards/), [const expressions](https://flow.org/en/docs/types/const-expression/)). As such, we do not anticipate this to introduce new build configuration problems for developers.

Changelog:
[Internal]

Reviewed By: javache, NickGerleman

Differential Revision: D76632879

fbshipit-source-id: e0a83dfc2e2014933000083de1825a311faad707
2025-06-16 06:52:07 -07:00
Samuel SuslaandFacebook GitHub Bot ffe928ce50 pass config in C++ Animated with std::move (#52039)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52039

changelog: [internal]

config can be passed with std::move to avoid copy.

Reviewed By: rshest, javache

Differential Revision: D76628921

fbshipit-source-id: 82a90ce604d2a82a388eb4fa63f22deda6ec92ed
2025-06-16 04:50:47 -07:00
Samuel SuslaandFacebook GitHub Bot d20b9cfdf0 Fix value passed to animation's endCallback (#52038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52038

changelog: [internal]

The changes in this diff include:
- pass endCallback with std::move to avoid copy.
- call endCallback with rawValue instead of rawValue + offset.
- remove unused method AnimationDriver::endCallback.

Reviewed By: javache

Differential Revision: D76627693

fbshipit-source-id: 8653ed3ec59b3629ad3956323b73f02a1bbd9c48
2025-06-16 04:50:47 -07:00
Samuel SuslaandFacebook GitHub Bot b6e1938959 make style.transform testable in Fantom (#52037)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52037

changelog: [internal]

Reviewed By: javache

Differential Revision: D76606386

fbshipit-source-id: 87321f75803d9e6080d5345021aca9c56b6d2ecf
2025-06-16 04:50:47 -07:00
Samuel SuslaandFacebook GitHub Bot ddafd94124 implement setOffset (#52034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52034

changelog: [internal]

implement `setAnimatedNodeOffset`.

Reviewed By: christophpurrer

Differential Revision: D76604263

fbshipit-source-id: 36b86aada836098f502f8d24af07e2a98adf0446
2025-06-16 04:50:47 -07:00
Samuel SuslaandFacebook GitHub Bot eecd07c58b Set final value via direct manipulation to fix animation glitches (#52012)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52012

changelog: [internal]

On iOS, once a prop on a view is controlled by animated, the control is never released to Fabric or React. That's why it is important to use direct manipulation to commit even final value.

Reviewed By: lenaic

Differential Revision: D76601913

fbshipit-source-id: ea02219e158f28977018b34ac7152b899723b35a
2025-06-16 04:50:47 -07:00
Pieter De BaetsandFacebook GitHub Bot 0e42d33cbc Sync ReactNativeAttributePayload with upstream (#51998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51998

Sync with https://github.com/facebook/react/blob/main/packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js

Next step is to remove the copy in React upstream and consume it from ReactNativePrivateInterface, so I've copied over the tests as well.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75943237

fbshipit-source-id: c89c8711b55882f7069c54f6c1ce389f46760089
2025-06-16 04:35:17 -07:00
Riccardo CipolleschiandFacebook GitHub Bot abc8fe1c92 Fix nightly download of Hermes and react-native-dependencies (#52033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52033

This change fixes the download of the artefacts for the nightlies of Hermes and React Native Dependencies after we changed the publishing logic for Maven

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76723289

fbshipit-source-id: 6b0ea6a6c35125e6fb03cecc6be893bd02abdad8
2025-06-16 03:32:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a6ea626255 Remove the option to use JSC from core (#51946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51946

This change simplified the setp disallowing to use JSC from core.
As a side effect, it simplified the setup by always falling back to hermes if the users decides not to use the third party JSC

## Changelog:
[iOS][Removed] - remove the option to use JSC from core

Reviewed By: cortinico

Differential Revision: D76342625

fbshipit-source-id: c925ab4fab1e171e289a1c5f75890c92da1b3f08
2025-06-16 02:36:45 -07:00
Janic DuplessisandFacebook GitHub Bot 1da608f6f1 Fix RNTester hermesc build issue on iOS (#51989)
Summary:
I am not sure exactly why, but I've been getting this error when running RNTester on iOS, when it tries to build hermesc from source. We're clearing the env using `env -i` which seems to cause the issue. If I add PATH to the env we set then it builds fine.

```
++ hermesc_dir_path=/Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc
++ shift
++ jsi_path=/Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/../../react-native/ReactCommon/jsi
+++ xcode-select -p
++ SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
++ env -i SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /opt/homebrew/bin/cmake -S /Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/hermes-engine -B /Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc -DJSI_DIR=/Users/janicduplessis/Developer/react-native/packages/rn-tester/Pods/../../react-native/ReactCommon/jsi
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Command PhaseScriptExecution failed with a nonzero exit code
```

## Changelog:

[INTERNAL] [FIXED] - Fix RNTester hermesc build issue on iOS

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

Test Plan: Build RN tester locally

Reviewed By: cortinico

Differential Revision: D76606335

Pulled By: cipolleschi

fbshipit-source-id: f442b77aefb3afacd6d9fb1f3d515b8d63c526ba
2025-06-16 02:05:30 -07:00
Tim YungandFacebook GitHub Bot 98f5a4e118 Fantom: Enable hermesParser in Metro Transform (#52021)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52021

Enables the `hermesParser` option in Fantom tests.

Notably, this configures parsing with `hermes-parser` to use `reactRuntimeTarget: '19'`.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D76641340

fbshipit-source-id: a2dcdbe8cab838481dd37c251d03d1e6fffdf346
2025-06-14 06:41:00 -07:00
Tim YungandFacebook GitHub Bot 92af97591b RN: Align ReportFullyDrawnView Type Exports (#52020)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52020

Aligns the type exports of `ReportFullyDrawnView` across platforms, so that they are resilient to any changes made to `View` itself.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D76638685

fbshipit-source-id: 612b2bcd76e70751aec691a24f31beca453cea35
2025-06-13 19:26:26 -07:00
Tim YungandFacebook GitHub Bot 30d8a153e6 RN: Upgrade to eslint-plugin-react-hooks@6.1.0-canary (#52016)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52016

Upgrade the React Native monorep to use `eslint-plugin-react-hooks@6.1.0-canary`, which includes support for Flow's Component Syntax.

This does not affect production users of `eslint-config-react-native`.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D76627448

fbshipit-source-id: 19e95e5d7f1bcd4fb6bead4e94d268d0c36a4817
2025-06-13 19:26:26 -07:00
Ramanpreet NaraandFacebook GitHub Bot 05a61e8161 Introduce main queue coordinator (#51425)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51425

# Problem

React native's new architecture will allow components to do sync render/events. That means they'll makes synchronous dispatches from main thread to the js thread, to capture the runtime so that they can execute js on the main thread.

But, the js thread already as a bunch of synchronous calls to the main thread. So, if any of those js -> ui sync calls happen concurrently with a synchronous render, the application will deadlock.

This diff is an attempt to mitigate all those deadlocks.

## Context
How js execution from the main thread works:

* Main thread puts a block on the js thread, to capture the js runtime. Main thread is put to sleep.
* Js thread executes "runtime capture block". The runtime is captured for the main thread. The js thread is put to sleep.
* Main thread wakes up, noticing that the runtime is captured. It executes its js code with the captured runtime. Then, it releases the runtime, which wakes up the js thread. Both the main and js thread move on to other tasks.

How synchronous js -> main thread calls work:
* Js thread puts a ui block on the main queue.
* Js thread goes to sleep until that ui block executes on the main thread.

## Deadlock #1
**Main thread**: execute js now:
  * Main thread puts a block on the js queue, to capture the runtime.
 * Main thread then then goes to sleep, waiting for runtime to be captured

**JS thread**: execute ui code synchronously:
* Js thread schedules a block on the ui thread
* Js thread then goes to sleep, waiting for that block to execute.

**Result:** The application deadlocks

| {F1978009555} |  {F1978009612} |

![image](https://github.com/user-attachments/assets/325a62f4-d5b7-492d-a114-efb738556239)

## Deadlock #2
**JS thread**: execute ui code synchronously:
* Js thread schedules a block on the ui thread
* Js thread then goes to sleep waiting for that block to execute.

**Main thread**: execute js now:
* Main thread puts a block on the js queue, to capture the runtime.
* Main thread then then goes to sleep, waiting for runtime to be captured

**Result:** The application deadlocks

|  {F1978009690}  | {F1978009701} |

![image](https://github.com/user-attachments/assets/13a6ea17-a55d-453d-9291-d1c8007ecffa)

# Changes
This diff attempts to fix those deadlocks. How:
* In "execute ui code synchronously" (js thread):
   * Before going to sleep, the js thread schedules the ui work on the main queue, **and** it  posts the ui work to "execute js now".
* In "execute js now" (main thread):
   * This diff makes "execute js now" stateful: it keeps a "pending ui block."
   * Before capturing the runtime, the "execute js now" executes "pending ui work", if it exists.
   * While sleeping waiting for runtime capture, "execute js now" can wake up, and execute "pending ui work." It goes back to sleep afterwards, waiting for runtime capture.

## Mitigation: Deadlock #1
**Main thread**: execute js now:
* Main thread puts a block on the js queue, to capture the runtime.
* Main thread then then goes to sleep, waiting for runtime capture

**JS Thread**: execute ui code synchronously:
* Js thread puts its ui block on the ui queue.
* ***New***: Js thread also posts that ui block to "execute js now". Main thread was sleeping waiting for runtime to be captured. It now wakes up.
* Js thread goes to sleep.

The main thread wakes up in "execute js now":
* Main thread sees that a "pending ui block" is posted. It executes the "pending ui block." The block, also scheduled on the main thread, noops henceforth.
* Main thread goes back to sleep, waiting for runtime capture.
* The js thread wakes up, moves on to the next task.

**Result:** The runtime is captured by the main thread.

| {F1978010383} | {F1978010363} |  {F1978010371} |  {F1978010379} |

![image](https://github.com/user-attachments/assets/f53cb10c-7801-46be-934a-96af7d5f5fab)

## Mitigation: Deadlock #2
**JS Thread**: execute ui code synchronously:
* Js thread puts its ui block on the ui queue.
* ***New***: Js thread also posts that ui block to "execute js now". Main thread was sleeping waiting for runtime to be captured. It now wakes up.
* Js thread goes to sleep.

**Main thread**: execute js now
* Main thread sees that a "pending ui block" is posted. It executes the "pending ui block" immediately. The block, also scheduled on the main thread, noops henceforth.
* Js thread wakes up and moves onto the next task.

**Result:** Main thread captures the runtime.

|  {F1978010525}  |  {F1978010533} |  {F1978010542} |

![image](https://github.com/user-attachments/assets/9e0ca5ef-fab6-4a26-bcca-d79d36624d5d)

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74769326

fbshipit-source-id: 854b83ce4e482a4030dc711834ea6c5613091537
2025-06-13 16:32:03 -07:00
Nicola CortiandFacebook GitHub Bot feec8d0148 Hide JS FPS on performance overlay as not accurate (#52000)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52000

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

The current JS FPS value is incorrect because the frame skipping logic hasn't been reimplemented in Fabric.
As we're looking into moving this into the performance panel, I've discussed with huntie
and agreed we'll just remove the value for now to don't show inaccurate informations.

Changelog:
[Android] [Changed] - Hide JS FPS on performance overlay as not accurate

Reviewed By: huntie

Differential Revision: D76590909

fbshipit-source-id: 90b0d9c84f9aefa9197243ebb57f4e86107d6c01
2025-06-13 14:08:01 -07:00
Andrew DatsenkoandFacebook GitHub Bot 05521adbc8 Add react/featureflags (#52003)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52003

Changelog: [Internal]
This is a react common dep check that we can build and run tester.

Reviewed By: christophpurrer

Differential Revision: D76531041

fbshipit-source-id: 0a43fdb91aa61f7e6461ff8a94ea6e2732b55dbb
2025-06-13 13:36:39 -07:00
Nicola CortiandFacebook GitHub Bot cf6569bc18 Cleanup and internalize FpsDebugFrameCallback (#51982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51982

This class should not be accessed externally. I'm making it internal.
On top of this, it was not fully reimplemented on NewArch so is not working consistently.

This is gonna break one library which is unmaintained and not properly udpated to work with NewArch
https://github.com/hannojg/react-native-performance-stats

Changelog:
[Android] [Breaking] - Cleanup and internalize FpsDebugFrameCallback

Reviewed By: huntie

Differential Revision: D76531175

fbshipit-source-id: 25598eb7c1ecf476b69bb6a2f2f8088a57b9fbc2
2025-06-13 12:23:05 -07:00
Mateo GuzmánandFacebook GitHub Bot c64f698e5f Migrate JavaMethodWrapper to Kotlin (#51930)
Summary:
Migrate com.facebook.react.bridge.JavaMethodWrapper to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.JavaMethodWrapper to Kotlin

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

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

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76377903

Pulled By: alanleedev

fbshipit-source-id: 4df257639992304a6ff3ed9abf499d8ed0b6aac7
2025-06-13 11:40:56 -07:00
Mathieu ActhernoeneandFacebook GitHub Bot b5be57cb76 Fix RNTester system bars background when edge-to-edge is enforced (#51929)
Summary:
This PR fixes RNTester system bars background color to match the app one (not solid black).

## Changelog:

- [Internal] [Changed] - Fix RNTester app system bars color when edge-to-edge is enforced

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

Test Plan:
https://github.com/user-attachments/assets/8be0b721-6514-408f-81cd-2106ae7a17c4

Rollback Plan:

Reviewed By: javache

Differential Revision: D76352950

Pulled By: alanleedev

fbshipit-source-id: 474a81564570764a597aa995a0677617263338be
2025-06-13 11:05:35 -07:00
Mateo GuzmánandFacebook GitHub Bot b0530f0abf Migrate ModuleHolder to Kotlin (#51997)
Summary:
Migrate com.facebook.react.bridge.ModuleHolder to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.ModuleHolder to Kotlin

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

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

Reviewed By: javache

Differential Revision: D76591704

Pulled By: cortinico

fbshipit-source-id: adbf1375ae9999881ce75b7d73d8e0bb3a8a73f8
2025-06-13 10:46:44 -07:00
Arushi KesarwaniandFacebook GitHub Bot b417b0c2d5 Extract out FBReactNativeSpec's core components including Unimplemented from auto-generated registry (#51941)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51941

Changelog:
[Android][Fixed] - Extract out FBReactNativeSpec's core components including Unimplemented from auto-generated registry

Extracting out `FBReactNativeSpec`'s core components including `UnimplementedNativeView` from auto-generated registry. Using this `libraryName` to skip merging those modules

Reviewed By: RSNara

Differential Revision: D76371796

fbshipit-source-id: 4cfee0fe80a661f159a5f17e0d4abc60f601ea74
2025-06-13 10:18:50 -07:00
Nicola CortiandFacebook GitHub Bot 7ec2839955 Update Nightly URL for newly published versions on central.sonatype.com (#52004)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52004

This is necessary because the snapshots are now going to be published on a different repository:
central.sonatype.com.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D76596802

fbshipit-source-id: 424fb1134e41502d53b76209fba325c895c79ba8
2025-06-13 10:09:47 -07:00
Mateo GuzmánandFacebook GitHub Bot f880bfd1ab Kotlin: clean up redundant visibility modifiers (1/2) (#51960)
Summary:
Static code analysis shows that there are several redundant visibility modifiers across the codebase. These are most likely remnants after making different classes internal.

## Changelog:

[INTERNAL] - Kotlin: clean up redundant visibility modifiers

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

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

Reviewed By: javache

Differential Revision: D76503015

Pulled By: cortinico

fbshipit-source-id: e60e7aa141fc35ca2fd76335fbee791c86589e4e
2025-06-13 08:42:42 -07:00
Christoph PurrerandFacebook GitHub Bot fed27e71f8 Use std::format (#51992)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51992

changelog: [internal]

Reviewed By: javache

Differential Revision: D76486572

fbshipit-source-id: e0577c067d350c993cffbcb6efd5a240faeca5f6
2025-06-13 08:25:50 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 0fb0bd1ae7 Add headers to XCFramework (#52010)
Summary:
We found out that the XCFramework that is generated in CI is missing the headers.
This is happening because we run the setup script, the responsible to prepare the folder structure with the heaeders in the right place, only in the job that builds the slices. However, the headers are copied by the job that composes the XCFramework.

This change stores the header folder as an artifact in the build job and retrieves it in the compose job, so that the files are available to the XCFramework

## Changelog:
[Internal] -

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

Test Plan:
Check the generated artefact in CI
<img width="292" alt="Screenshot 2025-06-13 at 15 32 02" src="https://github.com/user-attachments/assets/437333da-5848-4657-a9b3-e87fc79c69b2" />

Reviewed By: cortinico

Differential Revision: D76599834

Pulled By: cipolleschi

fbshipit-source-id: 44d74b5f8df545a825ecfe3df2e1898effe41261
2025-06-13 08:12:30 -07:00
Nicola CortiandFacebook GitHub Bot 6b9d931a88 Move React Native publishing URLs to Central Portal (#51693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51693

This moves React Native to use the Central Portal URLs rather than the legacy OSSRH ones.
See https://github.com/gradle-nexus/publish-plugin for more context.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D75673984

fbshipit-source-id: 1de6746809eed72f232eac0c3fb4d809c2046620
2025-06-13 03:30:14 -07:00
David VaccaandFacebook GitHub Bot e61daa831d Introduce parameter to customize libraryGenerators used in the codegen (#51991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51991

This diff introduces a new parameter to customize libraryGenerators used in the codegen, since I'm adding a default object, this diff shoulnd't change any behavior

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D76472495

fbshipit-source-id: 50b9095c7c554e368f65e4c0b5539be0cca51a51
2025-06-12 22:22:20 -07:00
David VaccaandFacebook GitHub Bot a8386aa878 Prevent exporting internal objects of codegen (#51990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51990

In this diff I'm limiting visibility of internal objects of codegen, these objects are being exported but they are unused, let's avoid exporting them

changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D76470809

fbshipit-source-id: 0e168558d2d3211ab5a3a3de05e2495d7c1ae4f5
2025-06-12 22:22:20 -07:00
David VaccaandFacebook GitHub Bot e8b55a4456 Add flowTypes for codegen LIBRARY_GENERATORS (#51987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51987

In this diff I'm adding flowTypes for codegen LIBRARY_GENERATORS

changelog: [internal] internal

Reviewed By: huntie

Differential Revision: D76470808

fbshipit-source-id: 8e2bddeda1f9175fd25fee04f8fdd3cb7c7faa49
2025-06-12 22:22:20 -07:00
Alexander KlotzandFacebook GitHub Bot 70962ef3ed Added support for multiple widths with dashed and dotted borders on iOS (#51770)
Summary:
This change allows for dashed and dotted borders to have different widths for each of the sides on iOS. This issue was described in https://github.com/facebook/react-native/issues/51658. This allows for better dashed lines and moves the implementation of borders closer to how it is handled on web/android.
Resolves https://github.com/facebook/react-native/issues/51658
(related https://github.com/facebook/react-native/issues/39088)

## Changelog:

[IOS] [ADDED] - Add support for different borderWidths

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

Test Plan:
- yarn test
- yarn lint

Reviewed By: NickGerleman

Differential Revision: D76145887

Pulled By: jorge-cab

fbshipit-source-id: 3716e84799b44d2ff0994cc673a2172ee85bd9e6
2025-06-12 15:31:46 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 46eab9c509 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics (#51983)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51983

Reviewed By: dtolnay

Differential Revision: D76494516

fbshipit-source-id: 399311ad4e1eadf6741926a19ce1919e73a1bdaa
2025-06-12 15:06:56 -07:00
Aswin AndroandFacebook GitHub Bot 50667eceb1 Publish top-level Flow types for react-native (#51908)
Summary:
FIXED Add index.js.flow to npm package files for Flow support

Currently, the distributed npm package for react-native does not include the index.js.flow file, which causes all exports to be typed as any when using Flow. This commit adds index.js.flow to the "files" array in package.json, ensuring Flow users receive proper type definitions out of the box. This addresses issues where type checking with Flow fails in React Native projects.

## Changelog:

[General][Added] Publish top-level Flow types for `react-native`

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

Reviewed By: huntie, necolas

Differential Revision: D76292301

Pulled By: robhogan

fbshipit-source-id: e56360d3f35af30ef160470181349aac1812e7c1
2025-06-12 14:28:14 -07:00
Nick GerlemanandFacebook GitHub Bot e82a677c79 Convert TextLayoutManager to Kotlin and Make Internal (#51966)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51966

This starts off mechanically, but needed a couple changes:

1. Some null handling changes to `TextTransform` internals
2. We type MapBuffer keys as `Int` instead of `Short`, because Kotlin does not allow the implicit widening cast that Java does. I also made these internal
3. Some shifts around casting
4. Mark TextLayoutManager internal, and remove usages of `UnstableReactNativeAPI`

I verified that there were no usages of the Java side of TextLayoutManager throughout `react-native-libraries`, so marking TextLayoutManager internal is unlikely to break 3p libraries.

Changelog:
[Android][Breaking] - Make Java Side TextLayoutManager Internal

Reviewed By: javache

Differential Revision: D76444163

fbshipit-source-id: aabb1c498c731598559f0df5c12e0ecdc266339f
2025-06-12 13:50:13 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 42ca46b95c fix: add ImageSource type to TypeScript (#51969)
Summary:
This PR adds ImageSource type to ImageSource.d.ts which is defined in Flow:

https://github.com/facebook/react-native/blob/d6f29c8afd14b2cc835649db3c59ed2f0e685331/packages/react-native/Libraries/Image/ImageSource.js#L87-L90

But not in the TypeScript file.

## Changelog:

[GENERAL] [FIXED] - add ImageSource type to TypeScript

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

Test Plan: CI Green

Reviewed By: fabriziocucci

Differential Revision: D76532377

Pulled By: Abbondanzo

fbshipit-source-id: f1bbcd3b3fc07bb0f7e82f81ebaffedf9bc06148
2025-06-12 13:39:45 -07:00
Ramanpreet NaraandFacebook GitHub Bot fb1a4d7aa2 Add macros to remove old runtime
Summary:
This diff adds macros around the legacy architecture core.

To compile out the legacy architecture, simply set: -DRCT_FIT_RM_OLD_RUNTIME=1.

* RCTBridge: interface kept around
* RCTRootView: interface kept around
* RCTSurface: interface kept around
* RCTModuleData: interface kept around (used by RCTProfile)
* RCTProfile: Kept around (doesn't work in bridgeless...)
* RCTCxxBridge: interface kept around
* c++ bridge: removed
* legacy components in core: kept around (for now)

## Details
I added comments to each of the #else, and #endif directives. That way, we can more easily codemod this code in the future.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D72582307

fbshipit-source-id: 018d11cc488e97e60040bebf647f24f2437a57ce
2025-06-12 12:43:36 -07:00
Nicola CortiandFacebook GitHub Bot a6c310c588 Make ReactDelegate nullsafe (#51977)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51977

This will help the Kotlin migration of ReactDelegate.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D76518840

fbshipit-source-id: 8a24c20705aa6b04af693a6229235b11f30e0bc8
2025-06-12 12:32:33 -07:00
Mateo GuzmánandFacebook GitHub Bot ca1ecefc51 Kotlin: fix up several KDoc annotations (#51961)
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. Also, there are a lot of functions incorrectly linked in the comments that were using `[.yourFunction]` instead of `[yourFunction]` – this diff addresses many of them.

## Changelog:

[INTERNAL] - Kotlin: fix up several KDoc annotations

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

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

Reviewed By: fabriziocucci

Differential Revision: D76481171

Pulled By: Abbondanzo

fbshipit-source-id: dd55e8fc3abfeaefc9c3762632a05fb7baf63530
2025-06-12 11:13:21 -07:00
Nicola CortiandFacebook GitHub Bot d33c2d1435 Polish the changelog for 0.80
Summary:
I've done a pass and cleaned up the changelog for 0.80 ahead of the release

Changelog:
[Internal] -

bypass-github-export-checks

Reviewed By: fabriziocucci, cipolleschi

Differential Revision: D76511997

fbshipit-source-id: 3872f9adbf16767c466e4dbb72d70fdaf2defde3
2025-06-12 08:17:24 -07:00
Jorge (Hezi) CohenandFacebook GitHub Bot 84cbb09cef merge changelogs for 0.80 (#51892)
Summary:
Cleaned CHANGELOG for release 0.80

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

Reviewed By: fabriziocucci

Differential Revision: D76510935

Pulled By: cortinico

fbshipit-source-id: 9e1b47e0de9b11def300e471ebfbfe9ec6f7df0e
2025-06-12 08:17:24 -07:00
Nicola CortiandFacebook GitHub Bot 7a471c7c0d Fix broken tests due to nullable parameter on ReactInstanceManagerBuilder
Summary:
This parameter can be null and is causing failures on some tests. This fixes
it.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: lenaic

Differential Revision: D76505211

fbshipit-source-id: a23fca21daf5292bc7375e7d025d1202cc591b86
2025-06-12 06:54:44 -07:00
Kacper KafaraandFacebook GitHub Bot 1d80586730 Enable Defines Module option for RCTImage pod (#51974)
Summary:
This is to enable consuming RCTImage pod in mixed ObjC/Swift codebase. W/o this option set I get following error when building the library:

```
Installing RNScreens 4.11.1
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `RNScreens` depends upon `React-RCTImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

I've noticed that there is also a precedent in the form of https://github.com/facebook/react-native/commit/c8fcac2765e0f79f0e7bb3a422a65698aec62536, which handled very simlar case but for `React-jsc` pod.

## 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] - Allow for consuming RCTImage in Swift codebase by enabling "Defines Module" option

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

Test Plan: RNTester should build & run correctly

Reviewed By: cortinico

Differential Revision: D76505478

Pulled By: cipolleschi

fbshipit-source-id: bcce93ffc7e1c917da7f07db83a710575c659f45
2025-06-12 05:33:21 -07:00
Tim YungandFacebook GitHub Bot d6f29c8afd RN: Move {packages => private}/react-native-fantom (#51938)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51938

Moves `packages/react-native-fantom` to `private/react-native-fantom`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76368959

fbshipit-source-id: 8d62f792229c10cd108dc849e8629d3174dc72c1
2025-06-11 23:49:51 -07:00
Pieter VanderwerffandFacebook GitHub Bot c79e55f79d Deploy 0.273.1 to xplat (#51968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51968

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D76477358

fbshipit-source-id: a26827e7e3dcd265549d681bc9e3991c0ef2ad52
2025-06-11 20:05:55 -07:00
Tim YungandFacebook GitHub Bot 1b0851515e RN: Move {packages => private}/react-native-codegen-typescript-test (#51936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51936

Moves `packages/react-native-codegen-typescript-test` to `private/react-native-codegen-typescript-test`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76357099

fbshipit-source-id: c00d19d1393aa9bc8059e30f837a045169776b50
2025-06-11 17:39:26 -07:00
Tim YungandFacebook GitHub Bot f0f71ea914 RN: Move {packages => private}/helloworld (#51934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51934

Moves `packages/helloworld` to `private/helloworld`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76356557

fbshipit-source-id: 92b20d75a8f2badb3c685d4918fe692623d9c04d
2025-06-11 17:39:26 -07:00
Tim YungandFacebook GitHub Bot 85f0dec400 RN: Preserve Stack Traces in CLI Scripts (#51965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51965

Changes the error handling in `cli.js` scripts for `rn-tester` and `helloworld` so that the original error stack traces are preserved.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76458284

fbshipit-source-id: 491b2bacc4becb8676a2ed4f1181192632bd808f
2025-06-11 17:39:26 -07:00
Luna WeiandFacebook GitHub Bot 9d3fa88f7b Cleanup async flag and use feature flag for debugging (#51962)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51962

Changelog: [Internal] - Migrate debug feature flag to be accessed in both native and JS

Reviewed By: yungsters, mdvacca

Differential Revision: D76381273

fbshipit-source-id: d4071abeb9769821e236c444f89044165cf83d92
2025-06-11 17:36:22 -07:00
Nick GerlemanandFacebook GitHub Bot 4b76129ccb Cleanup Text Feature Flags (#51944)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51944

Ahead of more refactoring, this cleans up a couple feature flags, already on by default, the newest of which added on 5/1, since these should all be validated by significant production usage at this point, so it is unlikely we would want to turn off.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D76412970

fbshipit-source-id: a2612583c060ed3f6fc559864e481d5b5a33fef2
2025-06-11 16:44:52 -07:00
Ruslan LesiutinandFacebook GitHub Bot 0dd3f803d8 Update debugger-frontend from 41bf86b...68cfd0a (#51963)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51963

Changelog: [Internal] - Update `react-native/debugger-frontend` from 41bf86b...68cfd0a

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/41bf86bdbb3e59e7711f11527efac67c050bca75...68cfd0ae84acb0ed8e47b421afd64ae3b0b5b727).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [68cfd0ae8](https://github.com/facebook/react-native-devtools-frontend/commit/68cfd0ae8) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-11T19:20:10+01:00 | [feat: restore Performance landing page (#179)](https://github.com/facebook/react-native-devtools-frontend/commit/68cfd0ae8) |
| [bc3bd7f55](https://github.com/facebook/react-native-devtools-frontend/commit/bc3bd7f55) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-11T12:19:18+01:00 | [chore: hide unsupported Detached elements memory profiling option (#178)](https://github.com/facebook/react-native-devtools-frontend/commit/bc3bd7f55) |
| [1f9eb6528](https://github.com/facebook/react-native-devtools-frontend/commit/1f9eb6528) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-11T10:05:12+01:00 | [ci: minor naming and formatting fixes (#177)](https://github.com/facebook/react-native-devtools-frontend/commit/1f9eb6528) |
| [42526665c](https://github.com/facebook/react-native-devtools-frontend/commit/42526665c) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-11T10:02:00+01:00 | [ci: split build workflow (#176)](https://github.com/facebook/react-native-devtools-frontend/commit/42526665c) |
| [7307e9532](https://github.com/facebook/react-native-devtools-frontend/commit/7307e9532) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-10T19:43:08+01:00 | [chore: added lint GitHub workflow (#174)](https://github.com/facebook/react-native-devtools-frontend/commit/7307e9532) |
| [8d613dd1c](https://github.com/facebook/react-native-devtools-frontend/commit/8d613dd1c) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-10T19:42:53+01:00 | [chore: more instructions on repository syncing (#173)](https://github.com/facebook/react-native-devtools-frontend/commit/8d613dd1c) |
| [d449be9e2](https://github.com/facebook/react-native-devtools-frontend/commit/d449be9e2) | Ruslan Lesiutin (rdlesyutin@gmail.com) | 2025-06-10T18:48:14+01:00 | [Merge pull request #172 from facebook/repo-sync-7103](https://github.com/facebook/react-native-devtools-frontend/commit/d449be9e2) |

Reviewed By: huntie

Differential Revision: D76455694

fbshipit-source-id: e44a016afe25ae62d72cf4b02e620ba166a9eeb9
2025-06-11 14:39:50 -07:00
Mateo GuzmánandFacebook GitHub Bot d292f1392f Migrate ReactInstanceManagerBuilder to Kotlin (#51884)
Summary:
Migrate com.facebook.react.ReactInstanceManagerBuilder to Kotlin.

## Changelog:

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

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

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

Reviewed By: javache, mdvacca

Differential Revision: D76418525

Pulled By: cortinico

fbshipit-source-id: 672095719ff20526de2a8eecf82f9aabe43ac129
2025-06-11 14:05:04 -07:00
Eric RozellandFacebook GitHub Bot 8bcf134071 Re-use assigned root tag if possible (#51939)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51939

ReactRootView already reliably assigns itself a fresh root tag from its constructor. Assuming this `FabricUIManager.startSurface` method is called with a valid `ReactRoot` instance, we can just re-use the existing tag without minting a new one. This makes some native initialization that depends on root tag assumptions easier to setup.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D76370069

fbshipit-source-id: ad9bb91eee374c911f65ebcdd395716c77881e96
2025-06-11 12:30:36 -07:00
Nicola CortiandFacebook GitHub Bot d1ef8f1fa3 Make com.facebook.react.views.common.ContextUtils internal (#51959)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51959

This class is public while it should not. It's just internal utilities which we don't really want to expose to 3p users.

I've noticed only one unmaintained libraries (3 year old) that will be affected by this change: https://github.com/phanithken/react-native-pk-image-picker/blob/3c21d0e8e3a797d73806883041500fd546e427d6/android/src/main/java/com/pkimagepicker/PkImagePickerViewHost.kt#L63
So I'm marking this as not breaking.

Changelog:
[Android] [Changed] - Make com.facebook.react.views.common.ContextUtils internal

Reviewed By: alanleedev

Differential Revision: D76429746

fbshipit-source-id: 1677a4b7ae7f2cc2c6c941e7e5fe89a5b332fa20
2025-06-11 12:04:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot d8fe9155eb Fix multiple artifacts with the identical extension and classifier. (#51958)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51958

There is a copy and paste mistake, from dependencies to core, when uploading artefacts to maven.

This change fixes it.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76435336

fbshipit-source-id: a829b90ba3d4cbfc5528fc9f21dcee7be6a358ff
2025-06-11 10:00:03 -07:00
Dawid MałeckiandFacebook GitHub Bot f529fd6ba5 Add snapshot validation to build-types (#51893)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51893

This diff adds `--validate` flag that runs snapshot validation to determine if the `ReactNativeApi.d.ts` rollup has been changed (if JS public API has been touched). There was also an issue with `sortProperties` that reordered some properties (ex. in ImagePropsBase) after removing one of them (ex. accessible) which had negative impact on the displayed result.

### Motivation
Compare previous snapshot with the one built on the current revision to determine the impact of made changes on the public API surface. Display differences in human readable format using `diff` method from the `jest-diff` library.

For now `--validate` flag is not useful on its own. It should be used with `--withSnapshot` flag (which will be removed shortly and generating snapshot will be a default mechanism).

Changelog:
[General][Added] - Add `--validate` flag to `build-types` script for JS API snapshot validation.

Reviewed By: huntie

Differential Revision: D76135158

fbshipit-source-id: 53f5b142c66e3e3931961f741c3f2fab8ccdc228
2025-06-11 09:06:39 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 788c980c7c Rename ReactDebug and ReactRelease to ReactCoreXXX (#51957)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51957

We need to rename the artifacts correctly for Sonatype to pick them up.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76428060

fbshipit-source-id: 83f1da75fbbdd4317ec791a6e782bbaa5c05fa5c
2025-06-11 08:09:08 -07:00
Riccardo CipolleschiandFacebook GitHub Bot b215bde57c Make sure that build_npm_package waits for react-native-core prebuilds (#51956)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51956

While working on landing the prebuild for React Native core in CI, I forgot to add a strong dependency between the build_npm_package job and the prebuild_react_native_core job in the workflow.

It was still technically working, because there are other jobs that are slower than building react_native_core that will delay built_npm_package for enough time, but this fix will make it more robust.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76423766

fbshipit-source-id: 76d91901d63e95add62f26bbff4de0278e8609e3
2025-06-11 08:09:08 -07:00
Tim YungandFacebook GitHub Bot a293925280 RN: Remove "js engine" Suffix from Error Stacks (#51913)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51913

Removes the non-standard "js engine" suffix from `Error` stack traces.

Changelog:
[General][Changed] - Errors will no longer have the "js engine" suffix.

Reviewed By: robhogan

Differential Revision: D76319439

fbshipit-source-id: e0d8e4f451df7010f48e3076bc244981bf590402
2025-06-11 07:16:10 -07:00
Samuel SuslaandFacebook GitHub Bot cbc327ce53 Disable view culling in ScrollView with overflow visible (#51947)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51947

changelog: [internal]

disable view culling if ScrollView has overflow set to visible

Reviewed By: rubennorte

Differential Revision: D76419519

fbshipit-source-id: 002bde2ab4dda0fc635ae04cb4e34390a0e13d80
2025-06-11 06:35:28 -07:00
Michal KielanandFacebook GitHub Bot dac60204f3 Fix data race in updateRendering (#51948)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51948

TSAN is showing a data race in RuntimeScheduler_Modern::updateRendering.

# Changelog:
[Internal] -  Use atomic to unblock broken tests. eventTimingDelegate_ is only set once during startup, so the real fix here would be to delay runEventLoop until setEventTimingDelegate has been set.

Reviewed By: javache

Differential Revision: D76415742

fbshipit-source-id: 995d2a68d671c555f990b4f8d85ac9419ae2734c
2025-06-11 06:27:22 -07:00
Riccardo CipolleschiandFacebook GitHub Bot be1db20c1e Publish ReactCore prebuilds to Maven central (#51923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51923

This diff publishes the Reactcore prebuilds to Maven central so that apps can use it when integrating with React Native

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76338793

fbshipit-source-id: 777c91805573b90ef15209e196cd66801908a5ce
2025-06-11 04:48:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2cf1495379 Prebuild React Native core in CI (#51921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51921

Implemented the CI jobs that builds React Native core in CI and uploads the artifacts for the Debug and Release XCFrameworks and dSYMs

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76338031

fbshipit-source-id: 713fd82f3823c992c3b0fa5cf24952b793834c68
2025-06-11 04:48:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ecec7f324e Implement signing for React Native core (#51919)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51919

Implement signing for the React Native core XCFramework

The implementation follows the same approach we used for the ReactNativedependencies archive

## Changelog
[Internal] -

Reviewed By: cortinico

Differential Revision: D76337972

fbshipit-source-id: 74f61c087b31e4087752cd60bea59db15f00321b
2025-06-11 04:48:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 3ac8c0d218 Create dSYMs for React Native core (#51918)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51918

Create dSYMs for React Native core while building

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76338032

fbshipit-source-id: 5ac920f85ff97d028772b68c787145f87c379158
2025-06-11 04:48:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 32b2f98814 Use capital letters for Debug and Release (#51920)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51920

Introduce the BuildFlavor typeand refactor the build scripts to use 'Debug' and 'Release'.

For iOS we always use capitalized Debug and Release and it will make it easier to work with CI too.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76338034

fbshipit-source-id: ae1acc740b47692ec5eee94c897b49a0e1673b93
2025-06-11 04:48:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7f157d2ab3 rename build-ios to build-ios-dependencies (#51480)
Summary:
This change renames the build-ios workflow to build-ios-dependencies to prepare for build-ios-core

## Changelog:
[Internal] - Rename build-ios to build-ios-dependencies

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

Test Plan: GHA

Reviewed By: cortinico, rshest

Differential Revision: D75133854

Pulled By: cipolleschi

fbshipit-source-id: 05282a9c1088917c86e43b4d63a790482c0cf2e6
2025-06-11 04:48:54 -07:00
Nicola CortiandFacebook GitHub Bot 0954c1db45 Remove and cleanup JSEngineResolutionAlgorithm (#51931)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51931

This cleans up the whole `JSEngineResolutionAlgorithm` and all the API related to it.
As now we offer support only for Hermes and JSC is provided via a community package.

This is breaking as it affects Expo, but I'll reach out to Kudo to make sure this is integrated properly.
No other breakages other than this.

Changelog:
[Android] [Removed] - Remove and cleanup JSEngineResolutionAlgorithm

Reviewed By: mdvacca

Differential Revision: D76337620

fbshipit-source-id: e43d5d1164f368f5fa395971bca9c05821492dfe
2025-06-11 03:09:32 -07:00
Joe VilchesandFacebook GitHub Bot 0e1a94a339 Cache accessibilityElements (#51940)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51940

We are seeing some reports of badf00d fads (stalls), meaning we are likely doing too much work here. `accessibilityElements` gets called a lot, and is often cached so lets add that in.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D76371136

fbshipit-source-id: f9e3423e8135a47a24291b04150c4dc54afbda82
2025-06-10 17:17:55 -07:00
Tim YungandFacebook GitHub Bot 683054c512 RN: Move {packages => private}/react-native-bots (#51932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51932

Moves `packages/react-native-bots` to `private/react-native-bots`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76354266

fbshipit-source-id: 6ca714c8b0c881b073d84a2f033f78d366ed3f24
2025-06-10 16:37:49 -07:00
Tim YungandFacebook GitHub Bot df52bbe649 RN: Update set-versions for private/ Packages (#51937)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51937

Updates the `set-versions` script to also update workspace packages in `private/*`. Unlike with packages in `packages/*`, this does not change their `"version"` fields, though. It only updates their dependencies.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76358273

fbshipit-source-id: d0e0557d17c355828020a218083b98dd177a6732
2025-06-10 16:37:49 -07:00
Chang Liu (RL)andFacebook GitHub Bot c3bd624944 Back out "(Redo PR #51264) Remove native animation fabric sync in JS and infinite animation loop workaround" (#51933)
Summary:
## Changelog:
[General] [Changed] - Revert a previous change that caused UI regression

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

Reverting for the same reason as D75108344.

Original commit changeset: 966e2b187f43

Original Phabricator Diff: D75789100

Reviewed By: zijunl

Differential Revision: D76352826

fbshipit-source-id: bfae95e2fe66b19b9d615eb5290c0ca5964088e3
2025-06-10 15:09:21 -07:00
Christoph PurrerandFacebook GitHub Bot c3957800ab Add runtime target to ReactCxxPlatform (#51903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51903

changelog: [internal]

Reviewed By: andrewdacenko

Differential Revision: D76240684

fbshipit-source-id: ecf6492fcdd73795ce62a935ffa5d9bfad55b832
2025-06-10 12:19:42 -07:00
Samuel SuslaandFacebook GitHub Bot 2079cb295f Fix AnimationDriverTests and align with android on rounding (#51922)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51922

changelog: [internal]

fix existing C++ Animated tests and align with Android on how to go from current time to applied frame.

On iOS [floor](https://fburl.com/code/7zy5e5ul) is used to decide which frame to apply. On Android, [round](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/FrameBasedAnimationDriver.kt#L65) is used.

In D75813200 I chose to use `std::ceil` as I wanted to have a predictable behaviour in tests. This is not wrong but it is better to align at least with one of the existing implementations. Let's go with Android as it strikes the balance of what we want to see in tests (an animation that is running for 1000ms should finish after 1000ms, not 1000ms + one frame) and C++ Animated is closer to at least one of the existing implementations.

Reviewed By: christophpurrer

Differential Revision: D76337384

fbshipit-source-id: 444c94d88c2fa60bb4f0649f57e0e42f5cd27626
2025-06-10 08:03:44 -07:00
David VaccaandFacebook GitHub Bot 79354eb0b5 Update documentation for codegen options interfaceOnly (#51924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51924

In this diff I'm updating the documentation for codegen options `interfaceOnly`

changelog: [internal] internal

Reviewed By: arushikesarwani94, cortinico

Differential Revision: D76293414

fbshipit-source-id: 9a8fd752302d4167c8764ce76c0038cd5cc47d7f
2025-06-10 08:03:23 -07:00
Mateo GuzmánandFacebook GitHub Bot 0448898213 Migrate ReactFragment to Kotlin (#51756)
Summary:
Migrate com.facebook.react.ReactFragment to Kotlin.

## Changelog:

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

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

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

Reviewed By: javache

Differential Revision: D76255248

Pulled By: cortinico

fbshipit-source-id: 67d289f27f317da10cc68df568cfbf183978c0b4
2025-06-10 07:46:51 -07:00
Dawid MałeckiandFacebook GitHub Bot beb3d49a1b Fix sorting string literals in React Native API snapshot (#51916)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51916

String literals were not sorted in React Native API Snapshot. This diff fixes the issue by retrieving the value from the string literal.

Before:

```ts
type A = {
  a: string;
  b: string;
  \"ba\": string;
  \"ab\": string;
  aFn: () => void;
  bFn: () => void;
  aMethod(): void;
  bMethod(): void;
};
```

After:

```ts
type A = {
  a: string;
  \"ab\": string;
  b: string;
  \"ba\": string;
  aFn: () => void;
  bFn: () => void;
  aMethod(): void;
  bMethod(): void;
};
```

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D76329242

fbshipit-source-id: 9645b82cbd22e2d3acef1376a9ffefa3646457d9
2025-06-10 05:46:40 -07:00
Nicola CortiandFacebook GitHub Bot ff3cfff264 Remove JSC build logic from helloworld (#51895)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51895

Cleaning up helloworld from all the JSC infrastructure.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D76265678

fbshipit-source-id: 81fd363bf484b4c22bd278199646c7b18c59c7ff
2025-06-10 05:42:18 -07:00
Nicola CortiandFacebook GitHub Bot 10aef584d9 Cleanup JSC infrastructure inside test-e2e-local.js (#51894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51894

This code is no longer needed so let's clean it up.

Changelog:
[Internal] [Changed] -

Reviewed By: yungsters

Differential Revision: D76264885

fbshipit-source-id: f28e7aba5da0a4f0981a642d9824af71004593f1
2025-06-10 05:42:18 -07:00
Christoph PurrerandFacebook GitHub Bot 0e0cd39b00 Add devsupport target to ReactCxxPlatform (#51902)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51902

changelog: [internal]

Reviewed By: andrewdacenko

Differential Revision: D76240769

fbshipit-source-id: 83d13c0446f86caf66addf82e1a06c5dd81388be
2025-06-09 23:15:52 -07:00
Jakub PiaseckiandFacebook GitHub Bot daff0c99d5 Disallow usage of "NativeProps" symbol in internal components (#51889)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51889

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76244543

fbshipit-source-id: 0ccbc29f99e3fac992b8f0040e16a73f72350969
2025-06-09 23:14:38 -07:00
Jakub PiaseckiandFacebook GitHub Bot b649791920 Remove internal PlatformType type alias (#51888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51888

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76247655

fbshipit-source-id: e57aa0bed0cc4a7246dbce227e8023e859dfd60d
2025-06-09 23:11:42 -07:00
Jakub PiaseckiandFacebook GitHub Bot 6fff197006 Update the transform not to rename member expression fragments (#51891)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51891

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76258179

fbshipit-source-id: e45545ded17d95422625ce5ca6c232a6e78ab9d2
2025-06-09 22:50:20 -07:00
Christoph PurrerandFacebook GitHub Bot 56e58291c3 Add io target to ReactCxxPlatform (#51900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51900

changelog: [internal]

Reviewed By: andrewdacenko

Differential Revision: D76240623

fbshipit-source-id: 4756ff73f9cc7ee42c31fba60918380400c14410
2025-06-09 22:03:25 -07:00
Tim YungandFacebook GitHub Bot 0fad032fbb RN: Move `{tools => private/monorepo-tests}/__tests__ (#51862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51862

Moves the dependency tests in `tools/__tests__` to `private/monorepo-tests/__tests__`, allowing us to delete the now-vacant `tools/` directory.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D76098157

fbshipit-source-id: 8bf96069689c2e1788cd889c624768bcb174d46e
2025-06-09 20:30:32 -07:00
Tim YungandFacebook GitHub Bot 2a7e37e51e RN: Move tools/api to private/cxx-public-api (#51859)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51859

Moves `tools/apis` to `private/cxx-public-api` and cleans up a few things:

- Clean up the `BUCK` file a bit.
- Deduplicate relative paths in scripts.
- Prefix the private package name with `react-native/`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76091765

fbshipit-source-id: 6fac7423f9d205085b0b21465f65075a850b61e2
2025-06-09 20:30:32 -07:00
Tim YungandFacebook GitHub Bot bcffd4ef9b RN: Standardize ESLint Severity Levels (#51863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51863

Standardizes lint severity in `.eslintrc.js` to use the string format.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D76098593

fbshipit-source-id: bd45897e6c996c4993dc1fe09b67cf0f944ebf3f
2025-06-09 20:30:32 -07:00
Tim YungandFacebook GitHub Bot d17f7d0a29 RN: Private Package for Monorepo ESLint Rules (#51858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51858

Creates a new private package for the ESLint rules that are defined in the `facebook/react-native` repository for linting the monorepo itself: `react-native/eslint-plugin-monorepo`

It resides in a new `private/` directory that will be used for all private packages. I plan to move private packages over from `packages/` and `tools/`.

This also eliminates the need for the `eslint-plugin-lint` dependency in open source.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D76088698

fbshipit-source-id: 697d5d91421cda4ef3f96d0497a96954cd047296
2025-06-09 20:30:32 -07:00
Tim YungandFacebook GitHub Bot fb7a45a934 sort-imports: ESLint Suppression Comments (#51881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51881

Switches the suppression of ESLint for the generated `sort-imports` lint rule definition to using in-file comments instead of `.eslintignore`.

This makes the suppression more portable. If the path to the lint rule definition changes, we don't have to remember to update `.eslintignore`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D76152973

fbshipit-source-id: 7cc41282931788c9e347712e7ce8bf7fefb53858
2025-06-09 20:30:32 -07:00
Tim YungandFacebook GitHub Bot ad652cf99c sort-imports: Update Rule Definition (#51880)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51880

Updates the `sort-imports` lint rule.

The main change is that it enforces newlines after the last import statement.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D76149902

fbshipit-source-id: 928871655c5de0613b18334d6fc0d71b3a971a18
2025-06-09 20:30:32 -07:00
Christoph PurrerandFacebook GitHub Bot c5bfd5be8c Add http target to ReactCxxPlatform (#51899)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51899

changelog: [internal]

Reviewed By: andrewdacenko

Differential Revision: D76240550

fbshipit-source-id: 5817b80d8683d951ac686390ad74b0927a2d6d2a
2025-06-09 20:30:06 -07:00
Christoph PurrerandFacebook GitHub Bot 43ba9df55f Add jni target to ReactCxxPlatform (#51898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51898

changelog: [internal]

Reviewed By: andrewdacenko

Differential Revision: D76240376

fbshipit-source-id: bbae620dde69261e6d26d088471601e7d7e9a074
2025-06-09 19:15:47 -07:00
Alex HuntandFacebook GitHub Bot 89cb7ea600 Replace remaining uses of chalk (#51906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51906

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

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76273414

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

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

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76273412

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

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

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

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76037191

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

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D76292113

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

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

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

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

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

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

Reviewed By: cipolleschi

Differential Revision: D76158851

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

changelog: [internal]

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

Reviewed By: christophpurrer

Differential Revision: D76231984

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

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

Reviewed By: rshest

Differential Revision: D76080325

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

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

Reviewed By: cortinico

Differential Revision: D76080324

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

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

Reviewed By: christophpurrer

Differential Revision: D76259630

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

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

Pick one each for the category and type tags:

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

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

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

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

Reviewed By: cipolleschi

Differential Revision: D76270096

Pulled By: cortinico

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

## Changelog:

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

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

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

Reviewed By: fabriziocucci

Differential Revision: D76116517

Pulled By: cortinico

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

This converts to Kotlin and internaline MountingManager.

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

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

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

Reviewed By: rshest

Differential Revision: D76126338

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

changelog: [internal]

Reviewed By: javache

Differential Revision: D76159770

fbshipit-source-id: dd64a7bb7c1fa3ded0e293985f5c087ba7d78dff
2025-06-09 08:30:20 -07:00
Rob HoganandFacebook GitHub Bot fe2bcbf4ba Community CLI: Don't clobber user config of Metro resolver/serializer, expose CLI config to user as defaults (#51836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51836

Currently, `community-cli-plugin` loads the user config and then overrides parts of it - specifically `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule`, making it impossible for a user to modify this config.

Instead, treat the CLI's resolver and serializer customisations as "Framework defaults", layered on top of `react-native/metro-config` defaults but beneath a user's `metro.config.js`.

This allows the user to obtain (via `react-native/metro-config`'s `getDefaultConfig`) and extend or override them, if they need to.

This is technically breaking because users who currently have a custom `resolveRequest` or `getModulesRunBeforeMainModule` in their `metro.config.js` will have that config respected from this change, whereas currently they won't have any effect.

Changelog:
[General][Breaking] Community CLI users: user-defined `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule` Metro config now takes precedence over CLI defaults

Reviewed By: huntie

Differential Revision: D74811395

fbshipit-source-id: c250caf798fdaedb0822bea3d6e65c0c3ae4d691
2025-06-09 07:44:02 -07:00
Pieter De BaetsandFacebook GitHub Bot 85498ad46f Remove unnecessary receiveCommand overrides (#51844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51844

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

Changelog: [Internal]

Reviewed By: cortinico, rshest

Differential Revision: D75869325

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

changelog: [internal]

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

Reviewed By: javache

Differential Revision: D74878821

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

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

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

Pick one each for the category and type tags:

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

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

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

Test Plan: NA

Reviewed By: cipolleschi

Differential Revision: D76253803

Pulled By: cortinico

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

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

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

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

## Changelog:

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

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

Pick one each for the category and type tags:

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

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

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

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

Reviewed By: cortinico

Differential Revision: D76126649

Pulled By: cipolleschi

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

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

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75869317

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

changelog: [internal]

Reviewed By: rshest

Differential Revision: D75990891

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

changelog: [internal]

handle rawProps manually until props 2.0 is finished.

Reviewed By: rubennorte, zeyap

Differential Revision: D76127899

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

Reviewed By: dtolnay

Differential Revision: D76127542

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

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

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D76133641

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

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

Reviewed By: rubennorte, mdvacca

Differential Revision: D75641008

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

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

Reviewed By: rubennorte

Differential Revision: D75632540

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

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

This change should fix it

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76133191

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

Original commit changeset: 4394a2370d9e

Original Phabricator Diff: D73771648

Changelog:
[Internal] -

Reviewed By: lenaic, sammy-SC

Differential Revision: D76038710

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

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

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046443

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

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

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046444

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

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

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

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046441

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

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

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76046440

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

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

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76045574

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

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

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D76045454

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

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

TODO: We need to add resources / privacy bundles

## Changelog:

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

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

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

Reviewed By: cortinico

Differential Revision: D75869879

Pulled By: cipolleschi

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

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

## Changelog:

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

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

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

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D75865275

Pulled By: cipolleschi

fbshipit-source-id: d4d9f26c817eb15c16f6be52ffa4b9f060e789da
2025-06-06 06:43:33 -07:00
Alex HuntandFacebook GitHub Bot df39eadc03 Bump minimum Node.js version to 22.14.0 (#51840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51840

Bumps the minimum version of Node.js in React Native to the current active LTS release (22.x, upgraded from 18.x which is now out of support).

- CI configurations are reduced from `[22, 20, 18]` to `[24, 22]`.

{F1978909878}

See https://nodejs.org/en/about/previous-releases.

Changelog:
[General][Breaking] - Our new minimum Node version is Node.js 22

Reviewed By: yungsters, cortinico

Differential Revision: D76037015

fbshipit-source-id: b6e4b3ee279a9a93d716a13297420bba73f45250
2025-06-06 05:21:39 -07:00
Nicola CortiandFacebook GitHub Bot 0d4c326dd3 Remove reactnative_unittest target and setup (#51866)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51866

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

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D76050039

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

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

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D76051319

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

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

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

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

Reviewed By: huntie

Differential Revision: D76053989

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

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D76109534

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

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

## Changelog:

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

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

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

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D76044622

Pulled By: cipolleschi

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

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

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

## Changelog:

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

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

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

Reviewed By: rshest

Differential Revision: D76117000

Pulled By: cortinico

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

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75945486

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

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

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

## Changelog:

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

Pick one each for the category and type tags:

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

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

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

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

Test Plan: TBD

Reviewed By: christophpurrer

Differential Revision: D76044353

Pulled By: huntie

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

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

Changelog: [Internal]

Reviewed By: coado

Differential Revision: D72168391

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

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

Changelog: [Internal]

Reviewed By: coado

Differential Revision: D76034414

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

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

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

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71902007

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

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D76018604

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

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

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D76074712

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

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

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

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

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

Reviewed By: rickhanlonii

Differential Revision: D76073900

fbshipit-source-id: 6779ea0862d4a1e25354b12ef3d1363dc12d26cc
2025-06-05 15:19:06 -07:00
Rick HanlonandFacebook GitHub Bot e0797d0e03 Remove console.error patch (#48783)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48783

## Overview
This is the final boss of the new owner stacks feature. With owner stacks, we don't need to parse message strings to find the component stack for logbox. Instead, we can access the component stack directly with `captureOwnerStack`.

This means we don't need to install the LogBox console.error patch and can greatly simplify the process of handling errors and make it more reliable.

To do this, we rely only on adding LogBox to the ExceptionManager:
- `reactConsoleErrorHandler` -> `LogBox.addConsoleLog`
- `reportException` -> `LogBox.addException`

Changelog:
[General][Fixed] - Remove LogBox patch, de-duplicating errors

## Benefits
As a side effect, this removes a lot of duplicate errors. For example, currently if a component throws, you get 2 errors:

 {F1974436906}

After this, there's just the one you expect:

 {F1974436908}

## Followups
After this lands and doesn't need reverted for some reason, we can delete a ton of code from logbox for finding and detecting stacks from errors.

Reviewed By: javache

Differential Revision: D68380668

fbshipit-source-id: 68112f1e3992fada4d6aaffdf9bd618ce1834f7b
2025-06-05 14:30:30 -07:00
Nick LefeverandFacebook GitHub Bot e51a5f0ab8 Enable RSNRU only for React commits (#51843)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51843

Changelog: [Internal]

To avoid corrupting the React fiber tree when committing from multiple threads this diff only updates shadow node references within the fiber tree for commits originating from React.

This guarantees that during the update of the references no React render will start or is running, making the update of the shadow node reference safe to execute.

S527994

Reviewed By: sammy-SC

Differential Revision: D76043845

fbshipit-source-id: bfcbeaae7fc8b976a1c2db6682330cef9ca25ab8
2025-06-05 14:09:52 -07:00
Peter AbbondanzoandFacebook GitHub Bot fe66694faf Add example for focus events on Android (#51725)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51725

This change builds upon the focus/blur portion showcased in ViewExample but showcases several more components all in one spot. This can be shared with additional platforms or expanded to include more component examples like Image, but the goal is to target Android and not distract from the primary use cases.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D75747410

fbshipit-source-id: 7d53366d9f32192ca6b3da45dd127836fb6efdf6
2025-06-05 13:48:50 -07:00
Peter AbbondanzoandFacebook GitHub Bot e960a28af7 Add focus and blur dispatching logic to BaseViewManager (#51724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51724

Moves focus change listener logic from `ReactViewManager` to `BaseViewManager` so all view managers that extend the class can get focus/blur event dispatching for free. This does so by applying event listeners where `addEventEmitters` is called, so any extending classes must try to call `super.addEventEmitters` or implement it themselves. In the case of TextInput, this logic is re-implemented because the component emits an additional event when the text input is blurred and I wanted to avoid duplicate calls to get the event emitter for the view instance.

In addition, I've added logic and a test case to ensure that any preexisting focus change listeners set on the view instance are called. There can only ever be one focus change listener tied to a view instance, so this ensures that ones created during view instantiation are retained. However, this does not guarantee that events are emitted for downstream users who overwrite the focus change listener later in the view's lifecycle (i.e. in response to a prop change or an extending view manager that doesn't call `super.addEventEmitters`). There is no clean way to enforce that the `BaseViewManager` focus change listener is always set without changing the generics and introducing a significant breaking change.

Changelog: [Android][Added] - Adds support for onFocus/onBlur event dispatching logic to all native views that implement `BaseViewManager`

Reviewed By: NickGerleman

Differential Revision: D75579321

fbshipit-source-id: 02e1e6d0e78e9d05e4ec5bb59789f3097b73b3f8
2025-06-05 13:48:50 -07:00
Nick LefeverandFacebook GitHub Bot cd5d74518b Fix image loading on props change without layout invalidation (#51791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51791

On iOS the <Image> shadow node was expecting a layout call for every clone. With `passChildrenWhenCloningPersistedNodes` <Image> components may have the image source updated without layout being called on it due to the re-use of the previous layout data thanks to the improved handling of layout invalidation.

This diff triggers the image request as soon as possible if the cloned shadow node has a clean layout. The request will be made as soon as the image manager is set on the shadow node.

Changelog: [iOS][Fixed] - Fix RCTImageComponentView image loading after source props change with no layout invalidation

Reviewed By: NickGerleman, sammy-SC

Differential Revision: D75919671

fbshipit-source-id: 8b92a9c63b6ff4a62c7eb7b0dbe18dd2be989b81
2025-06-05 11:43:03 -07:00
Nick GerlemanandFacebook GitHub Bot 0581e88efe Avoid scratch TextPaint for Facsimile Layouts (#51827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51827

TextLayoutManager has an optimization today, where it reuses a scratch TextPaint throughout layouts.

This is not safe in Facsimile, since the paint is included as part of `Layout`, and the `Layout` escapes the TextLayoutManager, to later be drawn. I.e. every `PreparedLayoutTextView` right now is sharing this same scratch Paint.

This change makes it so that we only ever use a scratch paint for the purpose of measurements, where the layout is short-lived.

A simpler approach could be to just abandon the scratch TextPaint, since they do not seem wildly expensive at a glance (though not trivial).

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D75987605

fbshipit-source-id: 3fe3519c6164828a25cb4e2b0ee6eded73695a95
2025-06-05 11:23:18 -07:00
David VaccaandFacebook GitHub Bot 7f8cf06bf9 Update codegen to use StateData (#51823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51823

Refactor C++ codegen to use StateData for simple codegenerated components

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D75889787

fbshipit-source-id: 47edf5a2a7b7d0efa1f98d392b8c7457af5747c9
2025-06-05 11:04:13 -07:00
Tim YungandFacebook GitHub Bot 0df71eac81 RN: Prohibit ESLint Warnings (#51825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51825

Configures `yarn lint` to fail if there are any ESLint warnings.

Changelog:
[Internal]

Reviewed By: kassens, NickGerleman

Differential Revision: D75988059

fbshipit-source-id: 20f94492803d8b000f8424ef9ff8a19276f35fd9
2025-06-05 10:14:06 -07:00
Tim YungandFacebook GitHub Bot cf9d28a097 RN: Improve lint-ci Script (#51853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51853

While testing D75988059 with D76047973, I noticed a few opportunities to improve the script used by `yarn lint-ci`:

- The exit code does not currently propagate, meaning `lint-ci` will succeed when it shouldn't.
- The shell script uses some non-idiomatic practices, so this improves it.

Changelog:
[Internal]

Reviewed By: kassens, cipolleschi

Differential Revision: D76049502

fbshipit-source-id: ebefddf0909edc89cd97de756b93bfaaa3d7cdef
2025-06-05 10:14:06 -07:00
Peter AbbondanzoandFacebook GitHub Bot 8db12225a2 Forward onBlur/onFocus events to Pressability config (#51670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51670

As the title suggests, forwards `onBlur`/`onFocus` props into the Pressability config that the component creates

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D75238328

fbshipit-source-id: ebc955ab603012362b6fd021333ab61c54ef3f72
2025-06-05 08:26:45 -07:00
Samuel SuslaandFacebook GitHub Bot b4cf61901f add fantom tests for pointerevents (#51842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51842

changelog: [internal]

add tests for pointerevents props.

Reviewed By: rshest

Differential Revision: D75991670

fbshipit-source-id: 16ed5f11bf3d3ec015141587171fe4ff0e914810
2025-06-05 08:22:28 -07:00
Tomasz ŻelawskiandFacebook GitHub Bot c783128f6e fix: ignore build/ and DerivedData/ dirs in when reading infoPlistFiles (#51833)
Summary:
https://github.com/facebook/react-native/pull/49927 introduced a regression where a Ruby script would read compilation artifacts and fail, when the user has relative build directories set in XCode.

After successful compilation `build/` dir and `DerivedData/` dir have `.plist` files that aren't in UTF-8 encoding and shouldn't be read by the script. If the user tries to reinstall pods at this point, he gets the following error:

![image](https://github.com/user-attachments/assets/6bd31907-66af-4ea5-b2a6-2847e0ee18e1)

This is how you enable relative build directories in XCode.

![Screenshot 2025-06-05 at 11 08 31](https://github.com/user-attachments/assets/22a555b4-a468-481d-8492-02c3b36bfa25)

## Changelog:

[IOS] [FIXED] - Ignore `build/` and `DerivedData/` directories when reading `.plist` files.

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

Test Plan: After applying this patch the problem doesn't occur anymore on my machine.

Reviewed By: cortinico

Differential Revision: D76030133

Pulled By: cipolleschi

fbshipit-source-id: 7ae8c2d0ce28b6925245a9172154e3dcafee126f
2025-06-05 03:21:10 -07:00
Samuel SuslaandFacebook GitHub Bot 5661fe9e1f Add test for onScroll events (#51826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51826

changelog: [internal]

To make this possible, we "fake" a UI tick whenever `flushMessageQueue` is called. This was, after every JavaScript task a UI tick happens.
Result:
- Animations are setup right after mounting automatically.
- Animation happens after Fantom.scrollTo is called.

Reviewed By: lenaic

Differential Revision: D75899915

fbshipit-source-id: 1ccb86df6741ff9124f16073c6d61ba716d7cfe6
2025-06-05 03:14:39 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2c3fadd2a1 Add changelog for 0.79.3 (#51816)
Summary:
## Changelog:
[Internal] - Add Changelog for 0.79.3

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

Test Plan: N/A

Reviewed By: robhogan

Differential Revision: D75969644

Pulled By: cipolleschi

fbshipit-source-id: 8ff63e96235d4ccb63a033ef107f343d1df8b369
2025-06-05 03:08:12 -07:00
Mateo GuzmánandFacebook GitHub Bot d631ec9a6c Migrate ReactTextViewManager to Kotlin (#51721)
Summary:
Migrate com.facebook.react.views.text.ReactTextViewManager to Kotlin.

In this diff, `ReactTextAnchorViewManager` is made public again as it's extended by `ReactTextViewManager`.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.text.ReactTextViewManager to Kotlin

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

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

Reviewed By: mdvacca

Differential Revision: D75829457

Pulled By: NickGerleman

fbshipit-source-id: 425e9ec14f17de5470677b73d68873647bf28675
2025-06-04 21:24:00 -07:00
Tim YungandFacebook GitHub Bot 1a335b3f25 RN: Require @flow Annotations (#51824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51824

Configures ESLint to require `flow` (or `noflow`) annotations for JavaScript files in the React Native repository. This ensures that we uphold a high bar for type safety and correctness, or intentionally deviate when it makes sense.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D75985490

fbshipit-source-id: 56f9fe7666a02c796ceb9cf076677e81b164b65e
2025-06-04 19:33:54 -07:00
Tim YungandFacebook GitHub Bot e8e51ac1fb RN: Flowify Remaining Files (#51822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51822

Adds `flow` to the remaining files without it, in React Native.

After this, every `*.{flow,js}` file in React Native will have either `flow` or `noflow`.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D75980238

fbshipit-source-id: 84cd88e4eb0b0b1dc69df247de79a75c2119bf96
2025-06-04 19:33:54 -07:00
Nick GerlemanandFacebook GitHub Bot 48216b244a FabricUIManager.prepareLayout() -> FabricUIManager.prepareTextLayout() (#51787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51787

Feedback left on D75826792

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75896711

fbshipit-source-id: bc55e1e6b4beefbe7071fe3186caeeb49f74a9cd
2025-06-04 19:33:30 -07:00
Nick GerlemanandFacebook GitHub Bot add1113a02 Support ReactTextViewManagerCallback in Facsimile (#51759)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51759

Builds upon the changes in the last diff, to let Facsimile support `ReactTextViewManagerCallback`. We use the same new mechanism, of using `RCTTextViewManager` as the callback, if present, instead of relying on view manager measure function.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D75830964

fbshipit-source-id: 435798e6be08f579579eb0f2d30a67d4b1fcaf10
2025-06-04 19:33:30 -07:00
Nick GerlemanandFacebook GitHub Bot 2ba86caf18 Clean up measurements path and ReactTextViewManagerCallback injection (#51758)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51758

ViewManager’s may implement a measure function (using MapBuffer, or ReadableMap). This isn’t used automatically, but may instead be used, by calling into FabricUIManager via JNI, and passing the component name of the view manager to use.

This is only ever called manually, through specific C++ ShadowNodes. Confusingly, for some cases, like `TextInput`, we use the measure function on `RCTText` instead, because this call to FabricUIManager is hidden behind `TextLayoutManager`. This ends up really breaking Facsimile, since we want to measure these in a different way, while still measuring `TextInput` without preparing a layout.

This mechanism is also used to inject `ReactTextViewManager` from the Text View Manager, into the measurement process, for both Text, and TextInput.

I think we would ideally remove and replace the current View Manager measurement mechanism entirely. The interface doesn’t do what it claims to, and requires calling private Java methods via JNI, which we shouldn’t be encouraging external libraries to do. Only a single 3p librar (react-native-picker) uses this, but we have a lot of internal usages, and the current facility is valuable, for translating surface ID into a context. Ie we could not deprecate it without a well thought out replacement.

Instead, this change:
1. Removes the "generalized" version of this for MapBuffer, only ever used by Text
2. Given ourselves a `measureText` function, that will use a spannable processor provided, but go through TextLayoutManager, instead of trying to use this generalized path
3. Documents some of the weirdness of the current setup, without yet deprecating it

This will let the Facsimile View Manager:
1. Provide a ReactTextViewManagerCallback, like the previous version allowed, that influences measurement of both Text, and TextInput (which is... strange, but... not trying to boil the ocean here)
2. TextInput can now measure text, even if Facsimile View Manager doesn't implement this traditional measure interface

Changelog:
[Android][Breaking] - Remove FabricUIManager.measureMapBuffer() and MapBuffer measure functions on ViewManager. Please use ReadableMap variant.
[Android][Breaking] - Remove FabricUIManager.measure overload which accepts attachment positions

Reviewed By: javache

Differential Revision: D75826792

fbshipit-source-id: 6739b1e2e214351b9b95ba782d73cf4278211ab8
2025-06-04 19:33:30 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 997b7c99f6 Rewrite accessibilityOrder with virtual view hierarchy (#51692)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51692

The original algorithm for accessibilityOrder on Android had unexpected bugs. For some reason `.traversalAfter()` and `traversalBefore()` have unexpected behaviors when dealing with ancestor/descendant relationships getting more and more unexpected the further apart they are.

So we are ditching that approach entirely.

Now we have the view with accessibilityOrder create a virtual view hierarchy. We create a virtual node for each child that is in the order, and set the virtual node's position to be the same as the View it is trying to represent.

We then also populate that node with the same stuff we populate regular ax nodes with the `populateAccessibilityNodeInfo()` function and the content description of the view it is backing so we get matching descriptions with what would otherwise be the normal announcement.

**We have no way to exhaustively check every accessibility use case so we'll have to fine tune this as bugs come up, I'm expecting there to not be many issues since we populate the node the exact same way we populate every other node but anything that happens before React Native handles the node might miss some things**

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D74766296

fbshipit-source-id: 5e77c17bed1644bc5fbf5c1e19c3c6908cc1e3e9
2025-06-04 14:31:21 -07:00
Nick GerlemanandFacebook GitHub Bot c27a8804a6 Bump min Xcode to 16.1 (#51762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51762

Apple requires Xcode 16 or later to submit to the app store. Let's bump the minimum checked for in build logic as well. https://developer.apple.com/news/upcoming-requirements/?id=02212025

GHA is already only testing against 16.2.0 as of D73924819

Changelog:
[iOS][Breaking] - Bump min Xcode to 16.1

Reviewed By: cipolleschi

Differential Revision: D75835304

fbshipit-source-id: a7ce22f958be3a5448a279439e27b615e9b20a2f
2025-06-04 14:15:45 -07:00
Tim YungandFacebook GitHub Bot 5ce99e7eb2 RN: Flowify packages/react-native Mocks & Tests (#51794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51794

Adds `flow` to the remaining mocks and tests that are lacking it in the `packages/react-native` directory.

This required adding numerous type annotations and suppressions.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D75930095

fbshipit-source-id: ebb1280adc656680e00fd579701e31521826b55c
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot f2ff8c9012 RN: Flowify packages/react-native/Libraries/Alert (#51792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51792

Adds `flow` to the remaining files that are lacking it in the `packages/react-native/Libraries/Alert` directory.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75921478

fbshipit-source-id: e277cf8241b136da1409af2592fda6ec1f7e9502
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot d77057741d RN: Flowify Non-Library Files (#51790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51790

Adds `flow` or `noflow` to the remaining files that are outside of `packages/react-native/{Library,src}`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75904614

fbshipit-source-id: cb2c0969065cf443c3a6e74da0fa3708fda67d18
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot 13e0965ed5 RN: Flowify packages/helloworld (#51789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51789

Adds `flow` or `noflow` to the remaining files that are lacking it in the `packages/helloworld` directory.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75899853

fbshipit-source-id: 43990adb0827f35a8ca8c49c1787140ff47b8abb
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot 3e6423fe65 RN: Flowify packages/rn-tester (#51788)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51788

Adds `flow` to the remaining files that are lacking it in the `packages/rn-tester` directory.

This also adds any necessary type annotations and fixes lint warnings.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75899307

fbshipit-source-id: 27a74ed0007b3b754446a45931c2c148312d5e3a
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot 71bf0712e3 RN: Flowify packages/virtualized-lists (#51785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51785

Adds `flow` to the remaining files that are lacking it in the `packages/virtualized-lists` directory. In one of the Jest tests, there are so many failures that for now, I just added `noflow`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75888514

fbshipit-source-id: 29d96292f3d59fd5cf2f5ba09b58fdfb9eabab2e
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot 3d55f229cb RN: Flowify packages/react-native-fantom (#51784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51784

Adds `flow` to the remaining files that are lacking it in the `packages/react-native-fantom` directory.

This also adds any necessary type annotations (using comment syntax).

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75886119

fbshipit-source-id: 6045b4037da21791db2a8960fbdb83aa2fb5bbf2
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot 3728afa85f RN: Add @noflow to packages/react-native-compatibility-check (#51782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51782

Adds `noflow` to a test in `packages/react-native-compatibility-check`.

In the future, this file should be migrated to use `flow strict-local` or `flow strict`. However, it currently has way too many type errors. Adding `noflow` makes it explicit that this is known to not be typechecked.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75885038

fbshipit-source-id: d0eccda52d39e7cb1938d395c44e4441918f7fcb
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot 404f3ebde2 RN: Flowify packages/react-native-codegen (#51781)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51781

Adds `flow` to the remaining files that are lacking it in the `packages/react-native-codegen` directory.

This also adds any necessary type annotations (using comment syntax).

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75884727

fbshipit-source-id: 69e880b2dc63c3d6430f841652506e57436544a8
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot 9c38daf2ef RN: Flowify scripts (#51780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51780

Adds `flow` to the remaining files that are lacking it (or `noflow`) in the `scripts` directory.

This also fixes what I believe to be a typo in one of the files.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75883851

fbshipit-source-id: 928b7a12a08269b6643379d46de888f2c61dcb29
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot cc9074884a RN: Add @noflow to Node.js Scripts (#51779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51779

Adds `noflow` to a bunch of Node.js script files.

In the future, these files could be migrated to use `flow strict-local` or `flow strict` using comment syntax for type annotations. But for now, adding `noflow` makes it explicit that these are known to not be typechecked.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75883703

fbshipit-source-id: a8fed3aaa9c55ecda919a705940f8b34504cb07c
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot b344aec2ae RN: Add @noflow to ESLint & Babel Preset Files (#51778)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51778

Adds `noflow` to a bunch of ESLint and Babel files that are expected to be evaluated using Node.js without Babel. Additioanlly, these files tend to depend on ESLint and Babel type definitions that are not currently readily available.

In the future, these files could be migrated to use `flow strict-local` or `flow strict` using comment syntax for type annotations. But for now, adding `noflow` makes it explicit that these are known to not be typechecked.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75883642

fbshipit-source-id: 54236d123ca8773de42bce81189dfb5c0671563e
2025-06-04 12:03:52 -07:00
Tim YungandFacebook GitHub Bot c1216d99f8 RN: Flowify flow-typed/{environment/node,npm/jest} (#51777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51777

Just adding `flow` to these two libdefs that aren't sourced directly from `flow-typed/flow-typed`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75877692

fbshipit-source-id: 0ee0ec08e2046fdba38480cddca3686109e8ca45
2025-06-04 12:03:52 -07:00
Samuel SuslaandFacebook GitHub Bot 27f4801c82 introduce Fantom.unstable_getDirectManipulationProps (#51814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51814

changelog: [internal]

introduce Fantom.unstable_getDirectManipulationProps to make it possible to inspect what is changed by C++ Animated module before animation finishes.

Reviewed By: zeyap, rubennorte

Differential Revision: D75816105

fbshipit-source-id: 681829ca9d3f77e57213e9f88f4f24b340a982ed
2025-06-04 11:51:54 -07:00
Joe VilchesandFacebook GitHub Bot ed26358f63 Implement textVerticalAlign (#51680)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51680

Right now there are 2 flavors of vertical text alignment: `verticalAlign` and `textVerticalAlign`. Both do the same thing currently. For Facsimile, we actually want to "properly" implement `verticalAlign` so that it matches the web version, while leaving `textVerticalAlign` the same. That will take some time, however, so for now we are just going to implement the way it currently works, while fixing some issues with inline View's

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D75475915

fbshipit-source-id: ba6ff7c831bf769e9e60831ed215ab64faf143a4
2025-06-04 11:39:15 -07:00
Joe VilchesandFacebook GitHub Bot 55fd8b26f8 Move textAlignVertical to paragraph props (#51712)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51712

This prop only works on top level text components, yet it is stored as a TextAttribute. It should be a ParagraphAttribute, so I moved it there.

Changelog: [Android] [Breaking] - Move textAlignVertical to paragraph attributes instead of text attributes

Reviewed By: NickGerleman

Differential Revision: D75684576

fbshipit-source-id: 8ad2496f8a043a6a64924a6c43c7bad4593cf1db
2025-06-04 11:39:15 -07:00
Joe VilchesandFacebook GitHub Bot 573ba02530 Use PreparedLayout as opposed to Layout in PreparedLayoutTextView (#51711)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51711

This is needed to support textVerticalAlign as we are storing that offset in the prepared layout and need to read it from the new text view

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D75643360

fbshipit-source-id: 03620ecf09f525c45d0a60daad1dc1d9a5937362
2025-06-04 11:39:15 -07:00
Nicola CortiandFacebook GitHub Bot c7bbf120e3 Tweak visibility of fields inside NativeModuleRegistry (#51810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51810

Tweaking the visiblity of some of the fields `NativeModuleRegistry` after the Kotlin migration
of that class.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D75959962

fbshipit-source-id: b3d53fc29af3b0fe32a7bd6a61898814acf90123
2025-06-04 11:19:10 -07:00
Pieter De BaetsandFacebook GitHub Bot 2ec21b4679 Remove unneeded folly deps (#51807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51807

Remove unneeded deps from the build graph. Especially `//xplat/folly:logging_logging` ends up adding 418KB in development which is unused here.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D71316272

fbshipit-source-id: 39a73e26728cee23d4ffbdd5e4760de2029e671b
2025-06-04 11:01:19 -07:00
Gabriel DonadelandFacebook GitHub Bot f2b19608cc generate-artifacts-executor: fix parsing .class in complex classes (#51813)
Summary:
There is an edge case in the codegen `findRCTComponentViewProtocolClass` function where the parsing of the Component Class will fail if there is another `.class` call in the same file after the `Class<RCTComponentViewProtocol>` function. This ends up resulting in a `RCTThirdPartyComponentsProvider.mm` file that looks like the image bellow

<img width="1052" alt="image" src="https://github.com/user-attachments/assets/26ce93be-0370-4852-a949-9da21762ff7f" />

You can reproduce this with the following

```
Class<RCTComponentViewProtocol> XYZCls(void)
{
  return XYZ.class;
}
// this comment breaks codegen .class
```

## Changelog:

[IOS] [FIXED] - Fix codegen extracting `.class` from complex component classes

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

Test Plan: Run codegen locally, use this patch in the expo/expo repo and CI should be green

Reviewed By: cipolleschi

Differential Revision: D75964424

Pulled By: cortinico

fbshipit-source-id: 50e45aa2ac6e43c75ee6fdd76791c591d81d4df7
2025-06-04 10:46:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot b266f7854d Back out "Improve e2e times by using deep links to open examples" (#51812)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51812

Commit [8960d9ea2c](https://github.com/facebook/react-native/commit/8960d9ea2cea22451e8f7c9d6c22ed1ed6de131f) fully broke the iOS tests on RNTester in CI.

All 8 of them consistently fails 5 times out of 5 within the workflow and for each retry.

Reverting the change to get CI back to green

## Changelog:
[Internal] - Reverting [8960d9ea2c](https://github.com/facebook/react-native/commit/8960d9ea2cea22451e8f7c9d6c22ed1ed6de131f)

Reviewed By: cortinico

Differential Revision: D75960750

fbshipit-source-id: 63b4a4b4cd830ec48fa60ca6cfcb4dd12a97a331
2025-06-04 09:48:42 -07:00
Samuel SuslaandFacebook GitHub Bot 2be44354c0 rename advanceAnimationsByTime to produceFramesForDuration for clarify (#51811)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51811

changelog: [internal]

after a bit of discussion it was clear the name of this method was confusing. Let's rename it to `produceFramesForDuration` to make it more obvious what happens under the hood.

Reviewed By: rubennorte

Differential Revision: D75953355

fbshipit-source-id: a62933894f9d42fbb3692134d117c05208c62699
2025-06-04 09:45:47 -07:00
Samuel SuslaandFacebook GitHub Bot 031aa4f8d3 add comment why FabricUIManagerBinding::getScheduler is public (#51801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51801

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D75902518

fbshipit-source-id: 4564982d8cc253df575ba93233b2eec0d336479d
2025-06-04 08:38:58 -07:00
Rubén NorteandFacebook GitHub Bot 1dae8d119f Add support for Error.cause in Fantom (#51800)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51800

Changelog: [internal]

This adds support for printing the cause of errors thrown in tests in Fantom, if available.

Reviewed By: lenaic

Differential Revision: D75946044

fbshipit-source-id: 579a2fc547cae92d2a65a4023ba1fb2e34a1f735
2025-06-04 08:28:48 -07:00
Samuel SuslaandFacebook GitHub Bot 59fcc57e1a Make ShadowNode::transferRuntimeShadowNodeReference private (#51805)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51805

changelog: [internal]

this overload of transferRuntimeShadowNodeReference is only used within ShadowNode, let's make it private.

Reviewed By: lenaic

Differential Revision: D75903646

fbshipit-source-id: 1ea86b6d0771cdffaff2d425d591f1e58da330ca
2025-06-04 08:26:03 -07:00
Dawid MałeckiandFacebook GitHub Bot 0de92b52ba Bring back @flow strict to composeStyles and fix Flow errors (#51803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51803

The `flow strict` annotation was accidently removed in D74574293. This diff brings it back and fixes flow errors caused by this change. This makes generated TS types for `composeStyles` more relaxed but the main idea of inferring inputs base on output type annotation is preserved.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75945388

fbshipit-source-id: c24ff8ad5d286e16bca3522e82f02e14f660c0dd
2025-06-04 06:56:05 -07:00
Samuel SuslaandFacebook GitHub Bot b338a00467 make per UI tick calculation more predictable (#51802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51802

changelog: [internal]

avoid conversions when dealing with time in C++ Animated. This makes tests more predictable.

Reviewed By: christophpurrer

Differential Revision: D75813200

fbshipit-source-id: b8934848237e5ea7c350d9a5f0175ac0f9202ffd
2025-06-04 05:05:19 -07:00
Mateo GuzmánandFacebook GitHub Bot dc7be7c7aa Migrate NativeModuleRegistry to Kotlin (#51734)
Summary:
Migrate com.facebook.react.bridge.NativeModuleRegistry to Kotlin.

In this diff, `JavaModuleWrapper` and some of its functions/properties had to be made public again as they are exposed by the migrated class – and if the functions are kept internal, there are crashes in legacy arch due to the C++ usages.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.NativeModuleRegistry to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D75938404

Pulled By: cortinico

fbshipit-source-id: 088286d4b100d1013cff43b81db39c6aec10f4e1
2025-06-04 04:53:45 -07:00
Jakub PiaseckiandFacebook GitHub Bot 1c6923d879 Disallow usage of unprefixed (suffixed) Props type name (#51653)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51653

Changelog: [Internal]

Adds a transform that ensures no types and interfaces named `Props` end up in the generated TypeScript definitions. Those are not descriptive and cause duplicate types in the rollup.

Reviewed By: huntie

Differential Revision: D75508800

fbshipit-source-id: 8d64ec19cbabe57495d6462df9d372ba42cda618
2025-06-04 04:38:48 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a67916fdd2 Bump windows to latests as GH will remove windows-2019 EOM (#51798)
Summary:
As per title, GH is [removing windows-2019](https://github.com/facebook/react-native/actions/runs/15421451006/job/43403215354) at the end of the month. We need to migrate away from them.

## Changelog:
[Internal] - Bump windows runners

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D75946994

Pulled By: cipolleschi

fbshipit-source-id: 972b60300c918c0eae0403ed4149347a4ffa8bd0
2025-06-04 04:28:10 -07:00
Jakub PiaseckiandFacebook GitHub Bot 06a7eaad11 Update api-extractor config to reduce number of duplicated symbols (#51796)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51796

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75940071

fbshipit-source-id: 612aeb12ddb05a7219e69f649e7a490baf7ed7f6
2025-06-04 03:15:11 -07:00
Rubén NorteandFacebook GitHub Bot 773ee9c37c Nullability check for stderr from CLI (#51797)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51797

Changelog: [internal]

Fantom tests are generally very reliable, but a source of flakiness seems to be coming from `result.stderr` being `undefined` and throwing in this callsite. We just add a check to work around it, hoping it's just being set to `undefined` because there really are no errors.

Reviewed By: rshest

Differential Revision: D75942405

fbshipit-source-id: d8920cc2573f029de6bb108310c31f1992e74301
2025-06-04 03:04:08 -07:00
Rubén NorteandFacebook GitHub Bot d1efc5806d Remove unnecessary "using namespace" directives (#51774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51774

Changelog: [internal]

Just a small refactor to remove some unnecessary `using namespace` directives for code in the `facebook::react` namespace.

Reviewed By: javache

Differential Revision: D75874213

fbshipit-source-id: e63a91b412b2865eb05961d2174b14230ff35e88
2025-06-04 02:31:35 -07:00
Mateo GuzmánandFacebook GitHub Bot 8960d9ea2c Improve e2e times by using deep links to open examples (#51786)
Summary:
This is similar to https://github.com/facebook/react-native/issues/51590, but way better as it improves indirectly the flakiness for tests in the API tab. When the logbox is shown in debug mode, it interferes and sometimes makes that test fail, so this prevents that.

Android also takes more advantage of the improvement with this change, the previous PR only improved significantly iOS.

All the screens inside the RNTester seem to have a deeplink, which makes it easier to open the tests as the test cases are intended to check mostly specific behaviour of RN, and it is not necessary to have a middle step to find the specific components.

Maybe it would be good to run this a few times in CI to see if there are no side effects or flakiness added by opening deep links on CI builds.

## Changelog:

[INTERNAL] - Improve e2e times by using deep links to open examples

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

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

iOS:

| Before | After |
|--------|-------|
| <img width="387" alt="image" src="https://github.com/user-attachments/assets/03ccd957-d401-4944-bb5c-d3e7db957b2e" /> | <img width="364" alt="image" src="https://github.com/user-attachments/assets/40a14c95-63f8-441d-b718-b5f57a506393" /> |

Android:

| Before | After |
|--------|-------|
| <img width="455" alt="image" src="https://github.com/user-attachments/assets/c71da8d0-df69-44af-b1b2-580995ce55c7" /> | <img width="449" alt="image" src="https://github.com/user-attachments/assets/7357e670-3510-4bbe-8543-68d3bd8c4bea" /> |

Reviewed By: cipolleschi

Differential Revision: D75938844

Pulled By: cortinico

fbshipit-source-id: c7d4063af561e7b0e583eddefcbb289786f3805a
2025-06-04 02:30:59 -07:00
Samuel SuslaandFacebook GitHub Bot 1a6d466f18 trigger animations at time 0 in fantom (#51776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51776

changelog: [internal]

testing animation must be predictable.
When animation takes 1 second and test calls `unstable_advanceAnimationsByTime(1000)`, the expectation is that the animation would have completed.
Previously it was necessary to wait for at least 38ms over the time it took to complete animation. This diff reduces the delta to 22ms.

Reviewed By: andrewdacenko

Differential Revision: D75813087

fbshipit-source-id: 1a27e5c227a0f3f1183ebdf41dc8c18149d68be0
2025-06-03 15:36:01 -07:00
generatedunixname89002005287564andFacebook GitHub Bot eb6e1b80a7 Fix CQS signal modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactCommon/cxxreact (#51783)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51783

Reviewed By: dtolnay

Differential Revision: D75852593

fbshipit-source-id: 410e0693a65a25eeec9bb26292336cee5072b12c
2025-06-03 14:55:11 -07:00
Nick GerlemanandFacebook GitHub Bot 5f83c774ca Remove Broken Caching Logic in AndroidProgressBarMeasurementsManagaer and AndroidSwitchMeasurementsManager (#51757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51757

These both have a boolean flag `hasBeenMeasured_` which is never set to true, so the cached measurement is never used, but it would be wrong if it was used, since the cache doesn't respect the content, or measure constraints. Delete the broken code.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D75817999

fbshipit-source-id: eb062f523840bbac7099b28f7e9b25cf9ad302aa
2025-06-03 14:28:53 -07:00
Rubén NorteandFacebook GitHub Bot 638933418e Fix crash when accessing offsetParent from documentElement (#51773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51773

Changelog: [internal]

(This isn't a public API yet so not marking it as a bugfix).

This fixes a crash in the `offsetParent` DOM API when called on a node whose parent is the `documentElement`.

Reviewed By: andrewdacenko

Differential Revision: D75876349

fbshipit-source-id: d90fcc3cb98f592c396cb0f5ee6ec80c9570745a
2025-06-03 10:58:00 -07:00
NataliaandFacebook GitHub Bot b4ae5c1de1 refactor: migrated file LazyReactPackage to Kotlin (#51085)
Summary:
This PR migrates LazyReactPackage to Kotlin as requested in https://github.com/facebook/react-native/issues/50513.

## Changelog:

[ANDROID] [CHANGED] - Migrate com.facebook.react.LazyReactPackage to Kotlin.

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

Test Plan:
- replaced `BaseReactPackage` with `LazyReactPackage` in `RNTesterApplication.kt`
- run RN tester on old architecture
- executed legacy native module screen

Reviewed By: javache

Differential Revision: D75783140

Pulled By: cortinico

fbshipit-source-id: 9e93f68c6c7ee821a1e0b74649b2438b0dcd4a1a
2025-06-03 10:56:48 -07:00
React Native BotandFacebook GitHub Bot 5324ae2831 Add changelog for v0.80.0-rc.4 (#51747)
Summary:
Add Changelog for 0.80.0-rc.4

## Changelog:
[Internal] - Add Changelog for 0.80.0-rc.4

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

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D75863681

Pulled By: cortinico

fbshipit-source-id: cac04b7b033977e67deb605787640bc70c7fcd98
2025-06-03 10:44:05 -07:00
Samuel SuslaandFacebook GitHub Bot 3a009beaf0 link missing methods to tasks (#51714)
Summary:
changelog: [internal]

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

add tasks to todos in code.

Reviewed By: fabriziocucci

Differential Revision: D75709061

fbshipit-source-id: 2ad976c25a012687fa41fcd6af662f588a54f9d8
2025-06-03 10:31:29 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot d2464d8e7a fix: make sure RNTester builds with USE_HERMES=0 (#51772)
Summary:
This PR makes sure React Native still builds with USE_HERMES=0.

## Changelog:

[IOS] [FIXED] - make RNTester build with USE_HERMES=0

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

Test Plan: CI Green

Reviewed By: andrewdacenko

Differential Revision: D75876484

Pulled By: cipolleschi

fbshipit-source-id: 72f3a7d33c19063b52c4c3e577ad2c5eae049d90
2025-06-03 09:48:36 -07:00
Nicola CortiandFacebook GitHub Bot c8dcf11423 unbreak build_android due to wrong parameter name in ReactViewGroup (#51771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51771

This made build_android fail because the parameter name mismatched between class and one of the implementation.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D75869827

fbshipit-source-id: a40dd1fb914e0694f1958c8b19eb9672de683c75
2025-06-03 08:22:39 -07:00
Pieter De BaetsandFacebook GitHub Bot 0486604c89 Use delegate to handle commands when available (#51769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51769

Generated delegate has this

```
  Override
  public void receiveCommand(T view, String commandName, Nullable ReadableArray args) {
    switch (commandName) {
      case "highlightTraceUpdates":
        mViewManager.highlightTraceUpdates(view, args.getArray(0));
        break;
      case "highlightElements":
        mViewManager.highlightElements(view, args.getArray(0));
        break;
      case "clearElementsHighlights":
        mViewManager.clearElementsHighlights(view);
        break;
    }
  }
````

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75797948

fbshipit-source-id: c05f09f0afbc41b83b759e62ae020b6a7ebc6f0f
2025-06-03 07:28:18 -07:00
Moti ZilbermanandFacebook GitHub Bot ab2c81faeb Bring RNDT shell to front when paused on breakpoint (#51748)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51748

Changelog: [Internal]

Implements the first RNDT shell-specific feature based on https://github.com/facebook/react-native-devtools-frontend/pull/168 - namely, the ability for RNDT to foreground itself when certain events occur. This is most noticeable when pausing on a breakpoint.

Reviewed By: huntie, vzaidman

Differential Revision: D75795689

fbshipit-source-id: a073bf8ea96ba70d835007f5af6069d49a693d81
2025-06-03 06:37:35 -07:00
Jakub PiaseckiandFacebook GitHub Bot 75be907aa9 Integrate building a type snapshot into typegen script (#51765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51765

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D70093373

fbshipit-source-id: 1b536f86b205f71c8a708c4ab6aaaedc3b8e9450
2025-06-03 06:15:25 -07:00
Nicola CortiandFacebook GitHub Bot 48395d346b Convert ReactViewGroup to Kotlin (#51767)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51767

This is going to convert the last class inside `com.facebook.react.views.view` to Kotlin.

I still need to assess if this is going to be breaking or not for our users. Potentially some
breakages for Kotlin consumer could happen (see changes on ReactViewManager).
I'll follow-up with an investigation on that one.

Changelog:
[Android] [Changed] - Convert ReactViewGroup to Kotlin

Reviewed By: mdvacca

Differential Revision: D75797215

fbshipit-source-id: 5d58faa651d5959909a4b0237aad9c4209895083
2025-06-03 04:56:24 -07:00
Samuel SuslaandFacebook GitHub Bot 747eb3c8ae Introduce Fantom.unstable_advanceAnimationsByTime (#51752)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51752

changelog: [internal]

Introduce a way to test animations: `unstable_advanceAnimationsByTime`. An API that fakes passage of time and triggers UI ticks to simulate how animations are run on iOS and Android.

The API is marked as unstable because it might evolve as we write more tests for C++ Animated.

Reviewed By: mdvacca

Differential Revision: D75787082

fbshipit-source-id: 24e29732bbbf581871e7868289257ab60d891ddf
2025-06-03 04:43:35 -07:00
Samuel SuslaandFacebook GitHub Bot dd590c5b58 Remove outdated asserts from StubViewTree (#51751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51751

changelog: [internal]

these asserts are not correct with C++ Animated or anything that overrides pull transaction. When pull transaction is overriden, the modified mounting instructions are not stored in shadow tree. Therefore, these asserts fail.

Reviewed By: rshest

Differential Revision: D75787083

fbshipit-source-id: ac08b96f6dea89a9f127b179a5d05e351b281c35
2025-06-03 04:43:35 -07:00
Samuel SuslaandFacebook GitHub Bot d0e402f3d9 Call onRender inline instead of from startRenderCallbackIfNeeded (#51750)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51750

changelog: [internal]

inline call `onRender()` instead of calling it from `startRenderCallbackIfNeeded`. This has identical functionality but allows to use Fantom to test C++ Animated. In Fantom, there is only one thread the existing mechanism in C++ Animated uses thread locals to capture which thread in the UI thread. Therefore, some assumptions are broken. This is just an easy workaround around the problem.

Reviewed By: javache, zeyap

Differential Revision: D75787084

fbshipit-source-id: 8d70ef2d13e4ab14807deb7ca4cb0844980f5901
2025-06-03 04:43:35 -07:00
Samuel SuslaandFacebook GitHub Bot 116fb6dab0 Make time in C++ Animated injectable (#51749)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51749

changelog: [internal]

Make it possible to inject time via `now` argument to C++ Animated. This will be used in testing.

Reviewed By: javache

Differential Revision: D75710463

fbshipit-source-id: 2d6da875c7379c4b229f8b7af0fa665cebc2ca8b
2025-06-03 04:43:35 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 80e8a6a161 Fix build after unifying RNCore in FBReactNativeSpec (#51766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51766

Yesterday we landed [95ed8a6123](https://github.com/facebook/react-native/commit/95ed8a6123024afd03227358ab4b165fdf87b270) where we unified `rncore` and `FBReactNativeSpec` into the latter.

This of course broke the current setup of SwiftPM. This diff fixes it.

## Changelog:
[Internal] - Exclude rncore components

Reviewed By: javache

Differential Revision: D75863335

fbshipit-source-id: ad2739bed5645e41048a8bc466736712db18c3b6
2025-06-03 04:12:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 9c1a55a0b8 simplify searchPaths for FBLazyVectorPath (#51726)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51726

Previously we were spreading the searchPath on the FBLazyVectorPath everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the FBLazyVectorPath depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756304

fbshipit-source-id: 41abe073bf271fd5059f9cb8536cc4a8948a03dd
2025-06-03 04:12:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 004726eeca simplify searchPaths for ReactFBReactNativeSpecPath (#51727)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51727

Previously we were spreading the searchPath on the ReactFBReactNativeSpecPath everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the ReactFBReactNativeSpecPath depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756302

fbshipit-source-id: 41680b98dd07ea1abb09cebb1a1b8321f08929a0
2025-06-03 04:12:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dbbf0f8cf8 simplify searchPaths for CallInvoker (#51728)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51728

Previously we were spreading the searchPath on the CallInvoker everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the CallInvoker depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756303

fbshipit-source-id: d6fe70e43f65d8e9da5f1d18dc58491217575734
2025-06-03 04:12:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7ef7736130 simplify searchPaths for RuntimeExecutor (#51729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51729

Previously we were spreading the searchPAth on the Runtime Executor everywhere, but that's not needed.

This change ensure that only the targets that nedds visibility over the runtimeExecutor depends on them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756305

fbshipit-source-id: e54f1939d72049e7f4e8d3d14f7a33eacd5ac46f
2025-06-03 04:12:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 0e775ba378 Cleanup header search paths (#51730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51730

This change cleans up the header search paths that are now mostly computed starting from other informations of the target.

There are still some execptions, for example for header only target for which we can't have a SwiftPM target. Therefore targets that depends on header only targets need to specify them in their search path.

Plus there are a small number of other exceptions, such as some circular dependencies on header only files.
We will fix them later on, by introducing separated targets

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75756307

fbshipit-source-id: 53f24dcb08947648c8fce5c520a949b3b896c2fa
2025-06-03 04:12:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c38007a875 Improve searchPath transitive computation (#51731)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51731

With this change, we are computing the headerSearchPaths starting from the path, and the source's path. In this way we can greatly reduce the amount of searchPaths we have to manually specify, making it much easier to maintain the SwiftPM package in the long run.

## Changelog:
[Internal] -

## Facebook:
The next diff  in the stack proceeds with the cleanup.

Reviewed By: cortinico

Differential Revision: D75756306

fbshipit-source-id: 411ba6b598e568648488921c3ee62b8111f76749
2025-06-03 04:12:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 527e39a470 Move scrollView to ReactFabric (#51691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51691

In cocoapods infrastructure, Scrollview is part of ReactFabric.
In the SwiftPM implementation we erroneously moved that to reactFabricComponents. However, the new view culling features in reactFabric imports scrollview and that was broken in Swift PM.

This change fixes it.

## Changelog:
[Internal] - move scrollview to reactFabric

Reviewed By: lenaic

Differential Revision: D75638510

fbshipit-source-id: 00828956093aaa87e15c22d15ca3a647876182f5
2025-06-03 04:12:13 -07:00
Rubén NorteandFacebook GitHub Bot 8ac0ccbb91 Add tracing section for event loop tick work for IntersectionObserver (#51744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51744

Changelog: [internal]

TSIA

Reviewed By: rshest

Differential Revision: D75789346

fbshipit-source-id: fa32cd3e5d9809bcbad48f0a6f1706efcce34d7f
2025-06-03 02:42:38 -07:00
Nick GerlemanandFacebook GitHub Bot 7979c7ce06 Remove YogaLayoutableShadowNode::cleanLayout() and Fix ParagraphShadowNode Font Size Invalidation Logic (#51760)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51760

This API is evil.

Yoga's public API never allows a dirty node to become clean again, until its laid out, but this API requires doing that, since we will otherwise automatically dirty by default.

Let's replace it with `YogaLayoutableShadowNode::shouldNewRevisionDirtyMeasurement()`, which lets individual ShadowNodes represent whether a new revision's state and props should cause dirtying, defaulting to true.

Changelog:
[General][Removed] - Remove `YogaLayoutableShadowNode::cleanLayout()`

Reviewed By: lenaic

Differential Revision: D75479902

fbshipit-source-id: a40aa531522a76dc49feb7d12bae5a8d877c6c06
2025-06-02 19:52:31 -07:00
Tim YungandFacebook GitHub Bot 5c8c5388fc RN: Fix Shadowing of Animated Styles (#51719)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51719

When `Animated` traverses props for instances of `AnimatedNode`, it flattens `props.style` before traversing it so that we correctly ignore any `AnimatedNode` instances that may be shadowed by static values:

```
{
  style: [
    {transform: [{translateX: new Animated.Value(0)}]},
    {transform: [{translateX: 100}]},
  ],
}
```

However, there is a bug that occurs when *every* `AnimatedNode` instance is shadowed. In this case, `AnimatedProps` assumes that there are *no* `AnimatedNode` instances in the entire `props.style`.

It then incorrectly operates on the unflattened `props.style`, which *does* have `AnimatedNode` instances. When this is passed to `View`, the `AnimatedNode` instances are encountered and can cause a crash in `processTransform`, as reported by: https://github.com/facebook/react-native/issues/51395

The fix for this was originally attempted by riteshshukla04 in https://github.com/facebook/react-native/pull/51442. This diff reuses the same unit test case, but it applies a different fix that does not involve re-traversing the `props.style` object.

The fix is gated behind a feature flag, `alwaysFlattenAnimatedStyles`. This will enable us to validate correctness of the new behavior before enabling it for everyone. (Beyond fixing the bug described above, this also causes styles to flatten more aggressively, so production testing is important to ensure stability.)

Changelog:
[General][Changed] - Creates a feature flag that changes Animated to no longer produce invalid `props.style` if every `AnimatedNode` instance is shadowed via style flattening.

Reviewed By: javache

Differential Revision: D75723284

fbshipit-source-id: 504f63e8edf836243d615783e119137a920ad271
2025-06-02 19:19:03 -07:00
Chang HuaandFacebook GitHub Bot 3353579946 fix ReactScrollViewHelper.kt remove listeners logic (#51718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51718

## what

the current removing listeners code is not working. in prod, when removeScrollListener is called, it creates a new weakReference of the scroll listener and it would never match any existing weakreference listeners in the list. The remove action would end up removing nothing from the list.

This diff fixes the issue by iterating through the list and compare the obj
reference: https://stackoverflow.com/questions/6296051/how-to-remove-a-weakreference-from-a-list

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D75716993

fbshipit-source-id: af9eed218deb44e87317c19ffca7d227b96de8e2
2025-06-02 18:26:58 -07:00
Soe LynnandFacebook GitHub Bot ab9ff886fc Remove unused header import (#51754)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51754

Changelog: [Internal]

Remove unused header import from RuntimeScheduler_Modern.cpp

Reviewed By: mdvacca

Differential Revision: D75815960

fbshipit-source-id: 32f7cab30216b3a76452dc9ef6354517fe3fcaf2
2025-06-02 16:10:59 -07:00
Tim YungandFacebook GitHub Bot 0a951c1867 RN: Create virtualViewPrerenderRatio Feature Flag (#51716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51716

Adds a feature flag to experiment with different `prerenderRatio` values from the `VirtualView` native component. Notably, this is the first time that the a feature flag has a non-boolean type.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D75713594

fbshipit-source-id: ff3feb8d8bb3292fea6e04a4cfccd87e8249144e
2025-06-02 15:48:22 -07:00
Tim YungandFacebook GitHub Bot 746376af00 RN: Represent Numeric Feature Flags as Double (#51713)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51713

Changes the React Native Feature Flags system so that numeric feature flags are represented in native languages as double instead of int, in order to avoid loss of precision for non-integral JavaScript numbers.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D75709111

fbshipit-source-id: d4b2d553ce1e719a5f4b136a4f8d2e46446ef8d8
2025-06-02 15:48:22 -07:00
David VaccaandFacebook GitHub Bot 46e70fbcfd Rename root -> view in ViewManager parameters (#51755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51755

this diff renames root -> view in ViewManager parameters

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D75803186

fbshipit-source-id: e70708b5b504c13d617be3becac340d65471e67c
2025-06-02 14:56:59 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 5f0d508390 Stop testing the legacy architecture (#51738)
Summary:
Following up the announcement made at AppJS, this change stops testing the legacy architecture in our CI

## Changelog:
[Internal] - Stop testing the legacy architecture in CI

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

Test Plan: waiting for GHA

Reviewed By: cortinico

Differential Revision: D75791359

Pulled By: cipolleschi

fbshipit-source-id: cb3159338835f49589fa6f495cfb9f47750825fe
2025-06-02 10:23:32 -07:00
Mateo GuzmánandFacebook GitHub Bot df6eff4f8c Improve e2e times and flakiness by using the search (#51590)
Summary:
I'm writing some tests for some APIs/components, and I see some opportunity for improvement in the way how we can write e2e cases for the RNTester.

This diff improves two things:

1. e2e execution times: right now as we are using the `scrollUntilVisible` functionality, it takes quite some time *for some cases*, as some of the items are not very up in the lists and getting to them it's not always very fast.
2. Flakiness: I ran the tests multiple times locally, and in multiple occasions, the `scrollUntilVisible ` did not find anything as the scroll was too fast so the test ended up failing.

Instead of using `scrollUntilVisible` for all cases, we can simply use the search bar which we have in both Components and APIs tabs. This runs faster and we can also share the search flow across multiple test cases, so writing the tests becomes a bit simpler as well.

Initially, I did this for all cases but not all cases benefit from this change as some of them are easier to find than others – the improvement was most notable in iOS (keyboard visibility seems to make a big difference), but I still think it is a good baseline to use the search as if more test cases are added, likely, many of them are not going to be so easy to find.

## Changelog:

[INTERNAL] - Improve e2e times and flakiness by using the search

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

Test Plan:
These are the differences in the time it takes to pass the tests locally.

iOS:

| Before | After |
|--------|-------|
| <img width="336" alt="image" src="https://github.com/user-attachments/assets/6bc80de6-5a10-4c0c-b6b0-f7850d746781" /> | <img width="329" alt="image" src="https://github.com/user-attachments/assets/de47a7ff-84cf-4916-abce-9b3df96a03e1" /> |

<details>
<summary>Android (no significant difference):</summary>

| Before | After |
|--------|-------|
| <img width="328" alt="image" src="https://github.com/user-attachments/assets/73023669-af8e-410c-aee2-529d1cce7acf" /> | <img width="336" alt="image" src="https://github.com/user-attachments/assets/3fb868a9-36f5-43c3-9261-6f2753e28e5f" /> |

</details>

Reviewed By: cortinico

Differential Revision: D75389138

Pulled By: cipolleschi

fbshipit-source-id: cf9d11ab0f84c91eaa20ee5c4441766729925571
2025-06-02 10:16:48 -07:00
Riccardo CipolleschiandFacebook GitHub Bot f2c9d74f11 Remove continue-on-error from e2e test in GHA (#51746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51746

I observed that when continue-on-error is set to true, Github reports the outcome of a job as success even if it fails.

With this change, we should ensure that when an E2E test fails, the pipeline fails, so that we can retry the jobs properly.

## Changelog:
[Internal] - Remove continue-on-error from e2e tests in GHA

Reviewed By: cortinico

Differential Revision: D75796284

fbshipit-source-id: 0e769f53d7355ae6c985aace334b23205780673a
2025-06-02 10:09:13 -07:00
Moti ZilbermanandFacebook GitHub Bot fedc7f2b7a Generate rich changelog in debugger-frontend sync script, add --no-build flag for testing (#51745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51745

Changelog: [Internal]

1. Updates debugger-frontend's sync-and-build script to include a simple Markdown changelog inline and -mention authors who are Meta employees.
2. Also adds a `--no-build` flag that is mainly helpful for iterating on changelog generation logic.

Reviewed By: hoxyq

Differential Revision: D75789680

fbshipit-source-id: b30b49a9c50e93e7161a2dad012b92ef124a3a16
2025-06-02 10:07:23 -07:00
Krystof WoldrichandFacebook GitHub Bot 8f189fce03 fix(types): Devtools.d.ts (#51737)
Summary:
- This is similar to https://github.com/facebook/react-native/pull/43566, but include also updated `StackFrame` type.

The current `Devtools.d.ts` doesn't match the `parseErrorStack.js` and `symbolicateStackTrace.js` implementations.

I've tried to run `build-types`, but only `symbolicateStackTrace.d.ts` was generated. I've not checked why.

## 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] - Devtools TS Types

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

Test Plan: Call `parseErrorStack` and `symbolicateStackTrace` in TS.

Reviewed By: rshest

Differential Revision: D75782013

Pulled By: huntie

fbshipit-source-id: 91fe560f079731af2a5834c8de8eafb723d00bf9
2025-06-02 09:39:26 -07:00
Zeya PengandFacebook GitHub Bot 581097b8ea (Redo PR #51264) Remove native animation fabric sync in JS and infinite animation loop workaround
Summary:
## Changelog:

[General] [Changed] - Remove native animation fabric sync in JS and infinite animation loop workaround, when cxxNativeAnimated is enabled

when cxxNativeAnimated is enabled, we'll sync native animation props back to Fabric in native, when that happens we can remove the code in JS for same purpose

Reviewed By: sammy-SC

Differential Revision: D75789100

fbshipit-source-id: 966e2b187f43e8743ccbf7ba97b8e8a27273fe0c
2025-06-02 09:29:40 -07:00
Pieter De BaetsandFacebook GitHub Bot 68ed4071e2 Add missing tests references to buck targets (#51743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51743

Noticed some of these were missing, which may lose us useful test signal, or prevent tests from being ran at all.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D75789456

fbshipit-source-id: 75645866c672c77d3dac34383105955ef6d25e60
2025-06-02 09:05:14 -07:00
Pieter De BaetsandFacebook GitHub Bot 95ed8a6123 Merge all core codegen into FBReactNativeSpec (#50317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50317

`rncore`, `FBReactNativeSpec` and `FBReactNativeComponentSpec` contain the same symbols, which leads to conflicts when we try to merge them into a single shared library. Cleanup the duplication and standardize on `FBReactNativeSpec` everywhere. I've left the Android OSS targets names as is, to avoid breaking deps.

This aligns react-native's package.json with the codegen tooling supported across iOS and Android, which is a single target for all all type-derived codegen.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D55037569

fbshipit-source-id: dbf3c0a427c9d0df96e439b04e5b123cd1069c51
2025-06-02 08:47:05 -07:00
Tim YungandFacebook GitHub Bot 95113e9dfd RN: Default featureflags Script to Update (#51708)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51708

Changes `yarn featureflags` to default to `--update` when no options are supplied.

Provides a way to display the available options with a new `--help` option.

Changelog:
[Internal]

Reviewed By: sammy-SC

Differential Revision: D75692119

fbshipit-source-id: 50d25c5f12c7646159872661c93ebe8c42f44788
2025-06-02 08:40:55 -07:00
Tim YungandFacebook GitHub Bot 8343045404 RN: Support Non-Boolean Feature Flags (#51707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51707

Currently, the feature flag system does not properly support non-boolean feature flags. The type definitions and generated code make assumptions about the value type being `boolean`.

This diff fixes these assumptions so that non-boolean feature flags are supported.

Changelog:
[Internal]

Reviewed By: sammy-SC

Differential Revision: D75690997

fbshipit-source-id: 870063ff979d0650ce6d0a2f6b340d97c28d7d0b
2025-06-02 07:36:53 -07:00
Moti ZilbermanandFacebook GitHub Bot 8037e20206 Update debugger-frontend from 343405b...41bf86b (#51739)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51739

Changelog: [Internal] - Update `react-native/debugger-frontend` from 343405b...41bf86b

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/343405ba784fca9290486cbce57e7f2ca953dc14...41bf86bdbb3e59e7711f11527efac67c050bca75).

Reviewed By: huntie

Differential Revision: D75785047

fbshipit-source-id: 5b2a611237e78811f140e8f3cdb8dec4a8b8a2be
2025-06-02 07:19:30 -07:00
Vladimir IlievandFacebook GitHub Bot 36ddf853c3 Fix emitting event from turbo module crashes on 32bit android (#51695)
Summary:
After testing the latest RC and nighly builds, crash appeared when emitting events from turbo modules on 32bit Android devices. The crash is always reproducible only on 32bit devices on signed production builds. Fore more details and the crash log, check the [related issue](https://github.com/facebook/react-native/issues/51628#issue-3094045077).

From what I found, the variadic functions like CallVoidMethod are unsafe on 32bit due to not type checking the passed arguments at compile time. As far as I understand the 64bit cpus and ABIs are more forgiving with alignment and calling conventions. On 32bit the ABIs are strict as arguments are passed on the stack and if there is type/size/alignment issue it reads the wrong memory, which causes the SIGEGV crashes.

## Changelog:
[ANDROID] [FIXED]  - emitting event from turbo module crashes on 32bit android

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

Test Plan:
1. Pull the [reproduction demo](https://github.com/vladimirivanoviliev/rn079eventcrash), install the dependencies (v `0.80` is on PR)
2. Run codegen on android
3. Build signed apk. To create it you will need to create new demo key-store.
4. To install the build apk in 32bit mode you can use `adb -s YOURDEVICE install --abi armeabi-v7a android/app/release/app-release.apk`
5. Run the app, create key, save it. Than update the key and save it again. The app crashes when try to emit event from the turbo module.
6. Patch the related `JavaTurboModule.cpp` file with the changes from this PR and enable build from source.
7. Rebuild and reinstall the apk and test again - the issue is now fixed

## Additional notes:
I have tested the app on android using the `rn-tester` demo app, everything works as expected. I also patched our production app and tested more complex scenarios and they works as expected. I have run the tests and linter and they passed.

One thing that I didn't able to setup and run is the iOS `rn-tester` app, due to Hermes engine error `Command PhaseScriptExecution failed with a nonzero exit code`. I haven't found any information how to fix it. I have followed [this guide](https://github.com/facebook/react-native/blob/main/packages/rn-tester/README.md) and installed node modules using yarn and started the `yarn prepare-ios`. I also haven't found any information with what node version and ruby version the react native package is build on CI so I use the same versions locally. If you provide me with updated instructions for those I can contribute by updating the related guides and including `.npmrc`, `.ruby-version` files.

Reviewed By: cortinico

Differential Revision: D75782377

Pulled By: javache

fbshipit-source-id: b94998be6dd51e90ad4137b1d2e38a6850bc3cb2
2025-06-02 04:50:40 -07:00
riteshshukla04andFacebook GitHub Bot a6908ad1a5 Add pending declaration for ScrollView (#51613)
Summary:
Fixes https://github.com/facebook/react-native/issues/51548

## Changelog:

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

Pick one each for the category and type tags:

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

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General][ADDED] Added more Pending Decleration for ScrollView

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

Test Plan: Can be tested on RNTester with ScrollView

Reviewed By: cortinico

Differential Revision: D75516801

Pulled By: rshest

fbshipit-source-id: 87d6f68ab0a3ffd50af57b5eeaf313da4bf7ed98
2025-06-02 03:00:05 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e324874614 Fix workflow-retry for android (#51684)
Summary:
The retry mechanism introduced in [this commit]() works for iOS e2e failures but it is skipped if android e2e tests fails.
This change should fix that

## Changelog:
[Internal] - Fix retry for Android E2E tests

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

Test Plan: GHA

Reviewed By: rshest

Differential Revision: D75719890

Pulled By: cipolleschi

fbshipit-source-id: 0c2a22268bb655617eaf27f61227a46650878b4e
2025-06-02 02:58:37 -07:00
Nick GerlemanandFacebook GitHub Bot 93920e38e6 (Mostly) Back out "[react-native] Fix clang tidy for react-native"
Summary:
D75596329 disabled many, many rules that we previously explicitly enabled over the codebase, due to a specific rule causing crash in linter when specifically linting some files like RCTDeviceInfo.mm.

Let's revert the change, and remove the specific problematic rule from our list of manually enabled rules instead.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D75734557

fbshipit-source-id: 9d6ee401bfa5d1efc8de993d366839c740aa0bdc
2025-06-01 17:21:48 -07:00
Mateo GuzmánandFacebook GitHub Bot d3d92b9a1d Unify RNTester Cache Policy Image example (#51580)
Summary:
The Image component in Android now supports the same cache control behaviour as in iOS, the examples needed to be separated in the past because the support was not the same for iOS and Android, but now that it is, we can unify the example.

## Changelog:

[INTERNAL] - Unify RNTester Cache Policy Image example

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

Test Plan:
<details>
<summary>RNTester Screenshots</summary>

| iOS | Android |
|--------|-------|
| ![Simulator Screenshot - iPhone SE (3rd generation) - 2025-05-24 at 12 55 30](https://github.com/user-attachments/assets/f2fd680d-67e4-42db-bc91-f09fe5b0f947) | ![Screenshot_1748084132](https://github.com/user-attachments/assets/ef1b5454-4a85-48d7-be76-3107082b883e) |
</details>

Reviewed By: yungsters

Differential Revision: D75538812

Pulled By: Abbondanzo

fbshipit-source-id: 7705c8f824cb18cebc39e84b6f48979035dc104c
2025-05-31 13:13:39 -07:00
Sam ZhouandFacebook GitHub Bot 1e967ca983 Deploy 0.272.2 to xplat (#51717)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51717

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D75715829

fbshipit-source-id: 8074481b11bfd28817b1caf315c8009cf6ae3807
2025-05-31 06:19:34 -07:00
Samuel SuslaandFacebook GitHub Bot cddfe4a035 use if statement instead of unordered_map for mapping (#51705)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51705

changelog: [internal]

use if/else instead of unordered_map to map types of nodes/drivers from string to a class. This is faster and improves binary size.

Reviewed By: javache

Differential Revision: D75676701

fbshipit-source-id: be9b8b646ebd9472382e6f692768b8fe9703d88f
2025-05-30 10:28:17 -07:00
Rubén NorteandFacebook GitHub Bot 6a7cea25ba Fix reporting of errors during test setup (#51704)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51704

Changelog: [internal]

If you create a Fantom test that throws an error during its setup (not during the execution of specific tests), Fantom fails with an error saying there are no tests defined, which isn't useful.

This fixes the problem and shows where the error in the test setup happened exactly.

Reviewed By: javache

Differential Revision: D75689283

fbshipit-source-id: 54dd2382868dda0d284f46743ed94ba94aa3afdc
2025-05-30 10:25:16 -07:00
Pieter De BaetsandFacebook GitHub Bot 96fe4a5ad7 Move default trackingName as undefined to RCTNetworking (#51703)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51703

Feedback on D75516619

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D75544422

fbshipit-source-id: f6c5e0090946b7861fd9cd9646e1b06b7c6a05d2
2025-05-30 09:56:20 -07:00
Pieter De BaetsandFacebook GitHub Bot 69b56a4ca0 Do not use delegate wrapper for NativeReactNativeFeatureFlags (#51702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51702

We have no need for C++ bridging in this TurboModule, as the generated code matches the base codegen exactly.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D75681901

fbshipit-source-id: 4b6caafe0bcd08a06686e0a44112bdb99a64a1cf
2025-05-30 09:50:36 -07:00
Alex HuntandFacebook GitHub Bot 1a46b203b8 Re-expose src/ paths via exports (default) (#51699)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51699

Re-expose **all `"./src/*"` paths via `package.json#exports`.

Follows D72228547 — as we'd attempted to be proactive with hiding `src/`, but are now reverting — essentially reducing this change as much as possible (read: most defensive/safer effect on OSS).

**Motivation**

Mitigates a warning emitted by Metro that may surface in new bare React Native template projects.

{F1978757796}

This is due to a 1P reference to `'react-native/src/private/featureflags/ReactNativeFeatureFlags` in `react-native/virtualized-lists`.

This is enough motivation to undo part of our change with introducing `"exports"` on `react-native` in 0.80.

**Especially**, to avoid confusion with other warnings we've intentionally introduced in 0.80 around subpath imports.

- The key difference is the above screenshot is from Metro and covers **any** import from any `node_modules` file — as opposed to just the immediate project.

Changelog:
[General][Changed] - Re-expose `src/*` subpaths when not using the Strict TypeScript API

The net breaking change for 0.80, once picked, is simply the presence of `"exports"` (only very edge case effects on expanding per-platform extensions, which we've mitigated). **All exported paths equivalent**.

Reviewed By: robhogan

Differential Revision: D75682566

fbshipit-source-id: f90c7298279c6be3a4eab70f2dfdc618ffcf1124
2025-05-30 08:49:59 -07:00
Moti ZilbermanandFacebook GitHub Bot 188221052d Support conditional exports when enumerating entry points (#51698)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51698

Changelog: [Internal]

TSIA

Reviewed By: hoxyq

Differential Revision: D75682786

fbshipit-source-id: 3d70c36f26d87f0be003784aa76bec34640b38d2
2025-05-30 08:36:29 -07:00
Rubén NorteandFacebook GitHub Bot a218b63969 Refactor test setup to avoid importing the Fantom module before the body of the test (#51696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51696

Changelog: [internal]

I realized that the Fantom module was being initialized before the execution of the test module itself (as part of the code generated by the runner), which could have problems if the test sets up the global environment that Fantom consumes. For example, if Fantom needs to use the `EventTarget` type from the global scope, it needs to wait until the initialization of the runtime so it can use it safely.

This refactors all the code calling into Fantom as part of our infra to always initialize it lazily, so the first thing that runs as part of the test execution is the test itself (apart from our test setup, which is supposed to be side-effect free).

Reviewed By: sammy-SC

Differential Revision: D75681181

fbshipit-source-id: 91e4b903a49fcee59c5875e73db314cde0adea03
2025-05-30 07:50:42 -07:00
Samuel SuslaandFacebook GitHub Bot 3fb965df0c prevent deadlock in C++ Animated (#51697)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51697

changelog: [internal]

as a general rule of thumb, do not call outside of your class when holding a mutex. It is easy to cause a deadlock because the outside code may end up trying to acquire the mutex down the stack, leading to deadlock.

Here, it happens because `startRenderCallbackIfNeeded` may end up calling onRender and in onRender, we try to acquire the mutex again

Reviewed By: javache

Differential Revision: D75675465

fbshipit-source-id: 46168ee154a54ae5cccaa74728b41f027519db59
2025-05-30 07:49:38 -07:00
Moti ZilbermanandFacebook GitHub Bot 366c89265f Fix up debugger-shell package definition (#51694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51694

Changelog: [Internal]

D74820232 was missing an `exports` entry for `debugger-shell/package.json`, which is needed for some of our build tooling.

Reviewed By: hoxyq

Differential Revision: D75679347

fbshipit-source-id: 8deaf55ce354afcff410104948cad1b9a30093b7
2025-05-30 07:42:10 -07:00
Riccardo CipolleschiandFacebook GitHub Bot cb6d388603 Add reactRuntime target (#51690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51690

This change adds the reactRuntime target to SwiftPM

## Changelog:
[Internal] - Add reactRuntime

Reviewed By: cortinico

Differential Revision: D75638242

fbshipit-source-id: 900a1254e3084a78f41aec5e51f7513724c152ec
2025-05-30 07:21:25 -07:00
Jay KoutavasandFacebook GitHub Bot 48b2dd355b Fix ConcurrentModificationException in InteropUIBlockListener (#51631)
Summary:
This React Native Android fix hardens the Fabric `InteropUiBlockListener` against `ConcurrentModificationException` crashes in `willMountItems` and `didMountItems`. By iterating over a shallow copy of the UI‐block lists and catching any mid‐iteration mutations, we ensure the listener never throws during a UI frame and always clears its pending blocks.

The issue was first reported in [React Native Issue https://github.com/facebook/react-native/issues/49783](https://github.com/facebook/react-native/issues/49783), and although [React Native PR#50091](https://github.com/facebook/react-native/pull/50091) was closed and not merged, the work in that PR did make it to React Native in [commit 17da3cb](https://github.com/facebook/react-native/commit/17da3cbbf4687f86226c4a80297c4d8abfc9c4f5). However, the fix didn't go far enough. We saw intermittent examples of this exception being thrown when swiping through a carousel from `react-native-reanimated-carousel`. This fix goes right to the exception site itself.

## Changelog:

[ANDROID] [FIXED] -  Hardened the Fabric `InteropUiBlockListener` against `ConcurrentModificationException` crashes in `willMountItems` and `didMountItems`

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

Test Plan:
The only way to test this is to develop a standalone app that emulates what we've been seeing in our commercially available RN app. We have done extensive testing of before (intermittent crashes) and after the fix (no crashes) and things have been standing up very well for us.

Here is a the Red Box we see right at the time of the crash, before this fix:

<img width="414" alt="image" src="https://github.com/user-attachments/assets/8d1b6c6d-42f7-48a0-9574-2f05436547d4" />

And here is the beginning of the logcat crash log:

```
2025-05-07 16:01:49.212 unknown:BridgelessReact com.aura.suite                       W  ReactHost{0}.handleHostException(message = "null")
2025-05-07 16:01:49.212 unknown:ReactNative     com.aura.suite                       E  Exception in native call
                                                                                        java.util.ConcurrentModificationException
                                                                                        	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1111)
                                                                                        	at java.util.ArrayList$Itr.next(ArrayList.java:1064)
                                                                                        	at com.facebook.react.fabric.internal.interop.InteropUIBlockListener.willMountItems(InteropUiBlockListener.kt:72)
                                                                                        	at com.facebook.react.fabric.FabricUIManager$MountItemDispatchListener.willMountItems(FabricUIManager.java:1235)
                                                                                        	at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.java:184)
                                                                                        	at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.java:122)
                                                                                        	at com.facebook.react.fabric.FabricUIManager$3.runGuarded(FabricUIManager.java:820)
                                                                                        	at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:29)
                                                                                        	at com.facebook.react.fabric.FabricUIManager.scheduleMountItem(FabricUIManager.java:824)
                                                                                        	at com.facebook.react.fabric.FabricUIManagerBinding.reportMount(Native Method)
                                                                                        	at com.facebook.react.fabric.FabricUIManager$MountItemDispatchListener$1.run(FabricUIManager.java:1282)
                                                                                        	at android.os.Handler.handleCallback(Handler.java:959)
                                                                                        	at android.os.Handler.dispatchMessage(Handler.java:100)
                                                                                        	at android.os.Looper.loopOnce(Looper.java:232)
                                                                                        	at android.os.Looper.loop(Looper.java:317)
                                                                                        	at android.app.ActivityThread.main(ActivityThread.java:8592)
                                                                                        	at java.lang.reflect.Method.invoke(Native Method)
                                                                                        	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
                                                                                        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
```

All of this goes away with this fix. We're using React Native 0.79.2 and this is the first time we've open a PR for react-native. I hope this is enough info as far as testing goes.

Can we see a 0.79.x release with this fix, please?

Reviewed By: Abbondanzo, cortinico

Differential Revision: D75594791

Pulled By: javache

fbshipit-source-id: 982ae27e89756fdb290a24b0bdfa67c2e47c04e3
2025-05-30 03:50:09 -07:00
Moti ZilbermanandFacebook GitHub Bot 63f4fb129f Scaffold debugger-shell package (#51688)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51688

Changelog: [Internal]

# Context

See D74904547.

## This diff

Creates the `react-native/debugger-shell` package, containing a basic implementation of an Electron-based shell for React Native DevTools. At this point, there is no direct dependency on the new package from the rest of React Native - it's designed to be used as part of a Meta-internal experimental rollout of the new debugger shell via the `BrowserLauncher` interface in `dev-middleware`.

Reviewed By: huntie

Differential Revision: D74820232

fbshipit-source-id: cb06ea9e2ed8c8822019cad8296cc19e69f9db0b
2025-05-30 02:23:12 -07:00
Moti ZilbermanandFacebook GitHub Bot 55ff50fba5 dev-middleware: Scaffold standalone Fusebox shell experiment (#51687)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51687

Changelog: [Internal]

# Context

This is the first of several commits that aim to implement a **standalone shell for React Native DevTools**. This will be a lightweight desktop app designed to host the debugger frontend, in much the same way as we currently use Chrome or Edge. The launch flow will otherwise remain **very similar** to the one that exists today.

## What's changing for users?

1. With this commit, nothing; we're merely setting up an experiment flag (for stage 1 - Meta-internal testing) and will make separate plans for open source rollout, coordinated with our framework maintainer partners.
2. If the experiment is successful, we aim to *eventually* phase out the use of Chrome/Edge in React Native DevTools and ship the standalone shell as standard to all React Native developers. This is to enable further improvements that will rely on the standalone shell to work.
3. The first iteration of the standalone shell aims to solve some concrete pain points such as the "dead window problem" - the fact that opening DevTools multiple times for the same target will leave behind a now-dead window (that would ideally have been reused).

## This diff

We amend the `unstable_experiments` and `unstable_browserLauncher` APIs in `dev-middleware` to add basic support for launching a standalone shell based on a frontend URL and a *window key* - the latter being an opaque string that the shell process can match against previous launches in order to reuse and foreground existing windows.

We leave it up to `BrowserLauncher` implementers ( = frameworks) to provide a working implementation of `unstable_showFuseboxShell`, and do not provide one with `DefaultBrowserLauncher`. This will effectively allow us to dependency-inject the actual shell implementation at stage 1 so we don't increase the download size of React Native unnecessarily.

Reviewed By: rickhanlonii, robhogan

Differential Revision: D74904547

fbshipit-source-id: fbc6eac97923062bda8892bc130b39051845ea82
2025-05-30 02:23:12 -07:00
Ramanpreet NaraandFacebook GitHub Bot 3e49d17f58 Fix clang tidy for react-native (#51679)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51679

## Problem

I noticed that clang-tidy was crashing in some of our native modules.

This diff fixes the crash. And it blocklists all the warnings that got raised when I ran clang tidy for react native.

## Fix
This rule would crash clang tidy:

```
cppcoreguidelines-avoid-const-or-ref-data-members
```

I disabled it in the .clang-tidy file via:
```
-clang-analyzer-*,
```

## Why disable existing warnings?
We need to double check which checks make sense to enable for react native github. Until we have that understanding, I don't think we should prompt people to adjust their code. After we have that understanding, it should be really easy to enable the checks: just run the linter on react native, and fix the code.

Reviewed By: lunaleaps

Differential Revision: D75596329

fbshipit-source-id: 757a8d38f203d7fb4403bbda3703fda7b44923b0
2025-05-29 14:25:57 -07:00
Rubén NorteandFacebook GitHub Bot 25f8b86dbe Replace existing usages of shadowNodeFromValue with new bridging function (#51676)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51676

Changelog: [internal]

This replaces all existing usages of `shadowNodeFromValue` (previously defined in `primitives.h`) to use the new bridging method to automatically convert `ShadowNode::Shared` from and to JS.

It also deletes the old method.

Reviewed By: javache

Differential Revision: D75597543

fbshipit-source-id: ab4e307dad80c7507b7ebd1cfa6621d020473d89
2025-05-29 11:20:15 -07:00
Rubén NorteandFacebook GitHub Bot 9c2148920c Define JSI bridging function for ShadowNode::Shared (#51675)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51675

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542

fbshipit-source-id: 37c0c43cbde0f4de9a740d9da910f215ae50efbd
2025-05-29 11:20:15 -07:00
Nicola CortiandFacebook GitHub Bot 3a41cdf5b2 Fully remove LOG_TAG from Buck/CMake (#51660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51660

We should be able to clean this up as we're not using it directly.
It would be used via the NDK logging utilities from Android, that we don't use.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D75531640

fbshipit-source-id: e96932b6e77b159683728194ac2e856cb868e06f
2025-05-29 10:42:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot ff4f4c8331 chore: cleanup duplicate import and typo in PerformanceTracer (#51681)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51681

# Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75608626

fbshipit-source-id: 97236cd35afd1cd9955bf54a6fca4f19fde3007a
2025-05-29 10:37:19 -07:00
Moti ZilbermanandFacebook GitHub Bot 6d0e5b0c9d Improve reporting of API translation errors (#51683)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51683

TSIA

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75604640

fbshipit-source-id: 05fa76fb9a3a4d97fe9bbee17b756f74dbdb746e
2025-05-29 10:05:04 -07:00
Tim YungandFacebook GitHub Bot e7a9322bdf RN: Flowify packages/react-native-scripts (#51671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51671

Adds `flow` (or `noflow`) to all files in this directory and ensures that Flow succeeds (by adding type annotations, using minor refactors, or suppressing errors due to intentionally dynamic logic).

This will help improve type safety when making changes both in these files as well as files that these depend on.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75581879

fbshipit-source-id: 6dcd8cc55d0021973eeae2670c1ebceb6d69fa8f
2025-05-29 07:52:38 -07:00
Tim YungandFacebook GitHub Bot 1fd9508ecc RN: Refactor Jest Default Mocks (#51669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51669

Refactors the default mocks initialized in `packages/react-native/jest/setup.js` so that each mock is defined in its own file.

This provides several benefits, including:

- The ability to use `import` statements without worrying about eager initialization of dependencies before `globals` is setup.
- The ability to verify mocks export the same types as the actual module, using a new Flow-typed `mock` helper function.
- The ergonomic of implementing mocks with more complex logic, without having to split them out into a separate module (e.g. `mockModal`, `mockScrollView`).

As part of this migration, I also fixed any minor discrepancies to match the actual type definition. For more involved discrepancies (e.g. missing methods), I added type suppressions for now to minimize breaking changes.

Changelog:
[General][Changed] - Improved default mocking for Jest unit tests.

Reviewed By: javache

Differential Revision: D75575421

fbshipit-source-id: 98d60e10b753f1505ffdccf5f12f5d3ef306ebb5
2025-05-29 07:52:38 -07:00
Samuel SuslaandFacebook GitHub Bot 5bf7eb847c clean up AnimationDriverUtils (#51674)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51674

changelog: [internal]

just a clean up of code in AnimationDriverUtils and removal of unused headers.

Reviewed By: mdvacca

Differential Revision: D75549612

fbshipit-source-id: a8ad63622478d06318b6304b886554478b43d19b
2025-05-29 07:36:26 -07:00
Moti ZilbermanandFacebook GitHub Bot d61a8f7059 Fix the ability to require() JSON files in tests (#51678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51678

Changelog: [Internal]

TSIA

Reviewed By: hoxyq

Differential Revision: D75598975

fbshipit-source-id: ed6c151f021b5a9cc0fab22a179094064486691e
2025-05-29 06:16:48 -07:00
Samuel SuslaandFacebook GitHub Bot 014f212bce convert AnimatedModule away from lambdas (#51659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51659

changelog: [internal]

use std::variant in AnimatedModule to generate smaller C++ binary.

Reviewed By: javache, mdvacca

Differential Revision: D75379819

fbshipit-source-id: 4dc8bbf6e2cdb7aa9080a27526ca9d43d155b5d7
2025-05-29 05:43:10 -07:00
Tim YungandFacebook GitHub Bot d626d5b623 RN: Delete nullthrows Import in MutationObserver (#51672)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51672

Deletes an unused import.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D75583225

fbshipit-source-id: be57005f5647234acf450c13345987da24e92696
2025-05-29 03:50:47 -07:00
Tim YungandFacebook GitHub Bot 235b6b180a RN: Fix Unstable Component in FlatList-multiColumn (#51673)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51673

Fixes a lint warning that seems to inconsistently fire, by improving the code that it complains about.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D75583443

fbshipit-source-id: b6df191e2e51dee688df3f3c960704dea28a4ece
2025-05-29 02:59:01 -07:00
Mateo GuzmánandFacebook GitHub Bot a42631efad Migrate CoreModulesPackage to Kotlin (#51640)
Summary:
Migrate com.facebook.react.CoreModulesPackage to Kotlin.

## Changelog:

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

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

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

Reviewed By: arushikesarwani94

Differential Revision: D75502816

Pulled By: alanleedev

fbshipit-source-id: 0914adf0b7c5c082a283d9abac595783887da268
2025-05-29 01:56:29 -07:00
Peter AbbondanzoandFacebook GitHub Bot 3d7973a3e6 Add focus/blur example to RNTester (#51634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51634

Creates an example in the ViewExample setup for how onBlur/onFocus behave when using keyboard navigation

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D75238317

fbshipit-source-id: e69122ca17727fc7f71e9bb7a09098a2771b098e
2025-05-28 21:29:51 -07:00
Peter AbbondanzoandFacebook GitHub Bot af0a76cf5f Add support for blur and focus on View (#51570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51570

As the title suggests: adds support strictly to `View` components on Android for `onFocus` and `onBlur` events. This is especially helpful for apps that respond to controller or remote inputs and aligns with existing support for the `focusable` prop.

In order to make this change cross-compatible with text inputs, `TextInputFocusEvent` has been deprecated in favor of the `BlurEvent`/`FocusEvent` types now available from core. Their type signatures are identical but `BlurEvent`/`FocusEvent` should be the type going forward for all views that intend to support focus/blur. Text inputs intentionally do not forward information about their state upon focus/blur and docs specifically call out `onEndEditing` as a means of reading state synchronously when blurring. Therefore, the changes to the native side to remove the event type specifically for text inputs is not breaking.

Changelog: [Android][Added] - Support for `onFocus` and `onBlur` function calls in `View` components

Reviewed By: mdvacca

Differential Revision: D75238291

fbshipit-source-id: b991d1f24fc094ba9d5d466201ecd058f59258e9
2025-05-28 21:29:51 -07:00
Nick GerlemanandFacebook GitHub Bot dd9d7c0e74 Add Tests for layout events of ellipsized Text (#51666)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51666

The platforms handle this in pretty different ways right now. Let's add a test showing the differences.

Android also adds a bunch of unicode zero width spaces in there...

Changelog: [Internal]

Reviewed By: mlord93

Differential Revision: D75567210

fbshipit-source-id: 98cac7d3fd23451868b55b69478e2667a2de3716
2025-05-28 19:20:55 -07:00
Nick GerlemanandFacebook GitHub Bot 9478c27a69 Add Flag to disable global text measure cache (#51654)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51654

Facsimile may or may not use a global measure cache. Adding flags to let us run experiment, to understand real-world performance impact, now that we have fixed some (but not all) of the issues which may lead to measurement invalidation in Fabric.

Also does some quick cleanup th `SimpleThreadSafeCache` to remove the cache key as part of the lambda, which is never used, and makes this change mildly less efficient, and to accept lambda by generic type instead of repacking into std::function which has runtime overhead.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D75509799

fbshipit-source-id: 165c08d626ab1f2758f0203d3a0d527a1a5106a7
2025-05-28 17:59:15 -07:00
Tim YungandFacebook GitHub Bot b654417afd RN: Unnecessary $FlowFixMe for jest.now() (#51665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51665

This type suppression comment is no longer necessary.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75546017

fbshipit-source-id: 8c1f6a4260f0ca83bcba200bf550746270578534
2025-05-28 17:24:01 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 98872a1b09 Add automatic retry of failed workflows to improve E2E stability (#51627)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51627

This cdhanges are inspired by https://stackoverflow.com/a/78314483 and they should help with the stability of E2E tests on main.
Most of the time, those tests fails because of flakyness in the E2E infrastructure on GHA. Usually, rerunning the tests manually makes the workflow pass.

These couple of jobs automatically reruns the workflow up to 3 times in case one of the E2E tests fails

## Changelog:
[Internal] - improve CI by rerunning the workflow if the E2E tests fails

Reviewed By: cortinico

Differential Revision: D75449445

fbshipit-source-id: d9c235c76007a3bda048ec76b62710ca930cf252
2025-05-28 15:45:37 -07:00
Ramanpreet NaraandFacebook GitHub Bot 0b8db7e5e8 Mitigate device info main queue modules crash (#51662)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51662

## Changes
DeviceInfo: Deafult fontScale to 1 when accessibility manager isn't available

# Analysis
**The problem:** For reasons that we don't understand, accessibility manager is sometimes nil, when deviceinfo needs it. This is a long-standing issue in react native.

```
  _constants = @{
    @"Dimensions" : [self _exportedDimensions],
    // Note:
    // This prop is deprecated and will be removed in a future release.
    // Please use this only for a quick and temporary solution.
    // Use <SafeAreaView> instead.
    @"isIPhoneX_deprecated" : @(RCTIsIPhoneNotched()),
  };
```

```
- (NSDictionary *)_exportedDimensions
{
  RCTAssert(!_invalidated, @"Failed to get exported dimensions: RCTDeviceInfo has been invalidated");
  RCTAssert(_moduleRegistry, @"Failed to get exported dimensions: RCTModuleRegistry is nil");
  RCTAccessibilityManager *accessibilityManager =
      (RCTAccessibilityManager *)[_moduleRegistry moduleForName:"AccessibilityManager"];
  if (!accessibilityManager) {
    return nil;
  }
  CGFloat fontScale = accessibilityManager ? accessibilityManager.multiplier : 1.0;
  return RCTExportedDimensions(fontScale);
}

```

**The crash:** When accessibility manager is nil, device info tries to insert nil into an NSDictionary, and crashes.

We found a possible repro of this issue: [launch facebook, log out, and log back in](https://www.internalfb.com/diff/D72020801?transaction_fbid=982516293994114).

**Why this surged now:** Recently, we started initializing device info during react native init. That means this code-path just runs much more often.

# Mitigation
Remove the return nil in `[self _exportedDimensions]`. Instead, just default the fontScale to 1 when the accessibility manager isn't available.

**This should be safe:** If we assume that accessibility manager eventually becomes available, the fontScale will eventually become correct. Device info will send the updated fontScale to js when it becomes available: [native](https://www.internalfb.com/code/fbsource/[ec6fd664a9cd]/xplat/js/react-native-github/packages/react-native/React/CoreModules/RCTDeviceInfo.mm?lines=231-232), [js](https://www.internalfb.com/code/fbsource/[ec6fd664a9cd]/xplat/js/react-native-github/packages/react-native/Libraries/Utilities/Dimensions.js?lines=120-125).

# Long-term fix
Understand why accessibility manager is nil.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D75537894

fbshipit-source-id: 921cc573fdfd7e5c340ac3a4ada268caadb9e382
2025-05-28 15:29:19 -07:00
Nick GerlemanandFacebook GitHub Bot 628c1333ea Disable hasOverlappingRendering in PreparedLayoutTextView (#51549)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51549

This is copied from `ReactTextView`, with a comment explaining the shenanigans.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75248328

fbshipit-source-id: b325cf05e0000ee0b0c5fb82f0e7412a680e5d01
2025-05-28 15:18:33 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 2c04b54c05 Fix Custom Focus Ordering for FocusForward, FocusBackward and nested children (#51575)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51575

Before we were relying on absolute focus direction to determine the next focusable view inspired by Recycler View's implementation. This turned out to be inaccurate since FocusForward and FocusBackward do the ordering differently.

For FocusForward and FocusBackwards the children of the root node are ordered first from top to bottom then, row groups are created by getting views with the same vertical position and then everything else is sorted left to right.

Android creates an array with this order and then just focuses the next or previous element of this list. We don't do this but now FocusForward and FocusBackward follow the some comparisons used to build this array on Android.

Also, there was an issue with nested children within an accessible view, this just needed a bit of refactor on the focusSearch function so that we can tell when we actually need to trigger our custom focus search

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D75301251

fbshipit-source-id: 93b708092299afa778ba5938b093c2c38209b497
2025-05-28 14:34:22 -07:00
Samuel SuslaandFacebook GitHub Bot 091eb2ea11 clean up interface of AnimationDriver (#51663)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51663

changelog: [internal]

mark getters as noexcept const and use `get` prefix.

Reviewed By: christophpurrer

Differential Revision: D75531202

fbshipit-source-id: d66132ee3ec459e73ab3dc33c726c73d5afb6e72
2025-05-28 14:18:24 -07:00
Tim YungandFacebook GitHub Bot a4c2007068 RN: Flowify packages/react-native/jest (#51652)
Summary:
Adds `flow` (or `noflow`) to all files in this directory and ensures that Flow succeeds (by adding type annotations, using minor refactors, or suppressing errors due to intentionally dynamic logic).

This will help improve type safety when making changes both in these files as well as files that these depend on.

Changelog:
[Internal]

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

Test Plan:
Ran Flow and Jest tests successfully:

```
$ yarn flow
$ yarn test
```

Ran a Jest unit test internally to make sure they work with our internal environment setup:

```
$ cd ~/fbsource
$ js1 test /View-test.js
```

Reviewed By: javache

Differential Revision: D75488160

Pulled By: yungsters

fbshipit-source-id: 536cef9699acfa1edcd3dcf61c53ebcd92f560f9
2025-05-28 12:20:48 -07:00
Ramanpreet NaraandFacebook GitHub Bot 14a115282b IntersectionObserver: Only reset modern io, if it exists (#51510)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51510

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75077634

fbshipit-source-id: d648a5e8c1de8efd44f4b1d2c44932bfebe0fbb3
2025-05-28 11:25:50 -07:00
Bartłomiej BłoniarzandFacebook GitHub Bot 1161fb4fcd Add cloneMultiple method to the ShadowNode class (#50624)
Summary:
This PR adds a new cloning method, allowing for updating multiple nodes in a single transaction. It works in two phases:
1. Find which nodes have to be cloned (i.e. nodes given on input and all their ancestors)
2. Clone nodes in the bottom up order - so that every node is cloned exactly once

So the idea is that when we want to update all the red nodes in this picture, we first find the nodes in the green area and the clone only them in the correct order (children are cloned before parents):
![Screenshot 2025-04-10 at 14 31 14](https://github.com/user-attachments/assets/f397eeff-8279-4d0c-bf87-083bfb44b86a)

Adapting this method [brought a huge performance gain to reanimated](https://github.com/software-mansion/react-native-reanimated/pull/6214). I want to upstream it, so that:
1. we can optimize it further, because making it a part of the `ShadowNode` class gives us access to the parent field in `ShadowNodeFamily` so we can traverse the tree upwards, allowing for a optimal implementation of the first phase (in reanimated we repeatedly call `getAncestors`, which revisits some nodes multiple times)
2. the community can use it

A naive approach that calls `cloneTree` for every node is much slower, as it has to repeat many operations.
## Changelog:

[GENERAL] [ADDED] - Added `cloneMultiple` to `ShadowNode` class.

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

Test Plan:
I tested it with the following reanimated implementation and everything works fine:

<details>

```c++
const auto callback =
      [&](const ShadowNode &shadowNode,
          const std::optional<ShadowNode::ListOfShared> &newChildren) {
        return shadowNode.clone(
            {mergeProps(shadowNode, propsMap, shadowNode.getFamily()),
             newChildren
                 ? std::make_shared<ShadowNode::ListOfShared>(*newChildren)
                 : ShadowNodeFragment::childrenPlaceholder(),
             shadowNode.getState()});
      };
  return std::static_pointer_cast<RootShadowNode>(
      oldRootNode.cloneMultiple(families, callback));

```

</details>

I would like to add tests for it, but I'm not sure what's the best approach for that in the repo.

Reviewed By: mdvacca

Differential Revision: D75284060

Pulled By: javache

fbshipit-source-id: 0704c4386c3041eb368adf6950d46de197479058
2025-05-28 10:55:00 -07:00
Arthur KushkaandFacebook GitHub Bot 56c1ab3253 Revert D75478125: jsi | remove redundant semi colon
Differential Revision:
D75478125

Original commit changeset: d5a9db25ebee

Original Phabricator Diff: D75478125

fbshipit-source-id: a5d06fccfb955cbb598e20c96f607b95b26795d1
2025-05-28 06:26:09 -07:00
Samuel SuslaandFacebook GitHub Bot 7dda5512ff introduce opt out mechanism for View Culling (#51657)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51657

changelog: [internal]

Introduce a new ShadowNodeTraits: `Unstable_uncullableView` and `Unstable_uncullableTrace`. As the name suggests, this is not stable API yet.

When a shadow node sets this trait, it will be opted out of view culling together with its ancestors all the way to the root.

The trait is propagated to its parent in 4 different places:
1. When node is first created.
2. When node is cloned.
3. When child is appended.
4. When child is replaced.

we can safely do it only in those places because React constructs nodes from bottom up. We are leveraging this implementation detail here but if that changes in the future, a traversal will be required.

Alternative solution considered here was a traversal of shadow tree during commit phase to propagate `Unstable_uncullable` trait. This could be done in a separate traversal or as part of layout phase where layout information is copied out of Yoga tree. Leveraging the fact that React is cloning bottom up makes the implementation simpler.

If React changes its cloning approach in the future, this will be caught by tests.

Reviewed By: lenaic

Differential Revision: D75476847

fbshipit-source-id: f1e98804565c140c64945662af0247b1bd0e1882
2025-05-28 06:25:41 -07:00
Pieter De BaetsandFacebook GitHub Bot 618ed98882 Set default XMLHttpRequest trackingName to undefined (#51656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51656

This fixes an issue with the internal networking layer when `enableModuleArgumentNSNullConversionIOS` is enabled, as we'd try to  pass `NSNull` as trackingName instead of omitting it.
`
Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D75516619

fbshipit-source-id: 91a3bba32772fdd66edde1e24b7edd977918f727
2025-05-28 05:41:51 -07:00
Samuel SuslaandFacebook GitHub Bot 66730ae59e Fix crash in view culling when view is unflattened/flattened in deep hierarchy where each node has top offset (#51639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51639

changelog: [internal]

### Fix Crash in View Culling

This diff fixes a crash that occurs when a view is unflattened or flattened in a deep hierarchy where each node has a top offset.

The problem is that nodes passed to *calculateShadowViewMutationsFlattener* via argument *unvisitedOtherNodes* have their positions calculated in a different coordinate space and the view culling algorithm does not have the correct data to determine visibility of a node. To fix this, we pass another argument to *calculateShadowViewMutationsFlattener* which does have original view culling context with which these nodes had their position calculated.

Reviewed By: javache

Differential Revision: D75455704

fbshipit-source-id: 925f14dfdc6c2b669c89e100629291921f27cd1e
2025-05-28 05:16:26 -07:00
Nicola CortiandFacebook GitHub Bot a6f24a5eaa Cleanup custom LOG_TAG in our CMakeLists files. (#51622)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51622

We currently support an optional 3rd params for `target_compile_reactnative_options` which allows to specify a LOG_TAG macro.
No one is actually reading that Macro. The only usage would be logging from the Android SDK which we don't explicitely use.

Here I'm updating our build to specify a LOG_TAG as `ReactNative` for all the targets without allowing to customize it as it just complicates our build setup.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D75445577

fbshipit-source-id: a426ce77ba6d1dfd0800e874d9f7838bfdc5b877
2025-05-28 02:36:26 -07:00
Arthur KushkaandFacebook GitHub Bot 17f1d91893 jsi | remove redundant semi colon (#51651)
Summary:
X-link: https://github.com/facebook/hermes/pull/1714

X-link: https://github.com/facebook/hermes/pull/1715

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

this breaks certain compilers/build setups in cpp

Reviewed By: NickGerleman

Differential Revision: D75478125

fbshipit-source-id: d5a9db25ebeecb229e157babf2117e8a2096e0d2
2025-05-28 02:33:18 -07:00
Ramanpreet NaraandFacebook GitHub Bot 19d7e40c97 Introduce featureflag for main queue coordinator
Summary:
Gating for "main queue coordinator": D74769326

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D74940621

fbshipit-source-id: e5b339bd13c2015432211380ecfce00791a27f9f
2025-05-28 00:25:46 -07:00
Ramanpreet NaraandFacebook GitHub Bot b8ce7b837f RuntimeExecutor: Create an ios fork of sync ui thread utils
Summary:
RuntimeExecutor.h has sync ui thread utils:
* executeSynchronouslyOnSameThread_CAN_DEADLOCK

The ios platform has js -> ui sync calls. This util, when it executes concurrently with those sync calls, deadlocks react native.

On ios, we're going to resolve these deadlocks, which'll involve customizing this util: D74769326. Therefore, this diff forks an implementation of these sync ui thread utils for ios.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D74901907

fbshipit-source-id: f502df4216e9ba57f458435c696a2f086becf24f
2025-05-28 00:25:46 -07:00
Nick LefeverandFacebook GitHub Bot 8f2e981ab7 Remove hard-coded component name listing for Props 2.0 support testing (#51633)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51633

To fully support props diffing for a component, the component's Props implementation needs to implement the prop diffing for the derived class.

Because all Props classes extend the ViewProps, all Props classes implement the `getDiffProps` function. To support testing that the props diffing implementation support all properties of the derived Props class for the component being mounted, this diff adds the virtual function `getDiffPropsImplementationTarget` which returns the `ComponentName` that the `getDiffProps` function supports.

This removes the need for a hard-coded list of components that support props diffing and enables the use of codegen to conditionally enable props diffing.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D75465020

fbshipit-source-id: 2850a76f1036cfe930c3c69b98d478ef86a2d457
2025-05-27 19:04:03 -07:00
David VaccaandFacebook GitHub Bot 3903ce0a48 Update format for codegen prop diffing (#51644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51644

This diff updates the format for codegen prop diffing in Android

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D75476172

fbshipit-source-id: ec1c68ae1eb652fe9986386302969f9258983d39
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot da5d15ba0e Add support to diff ImageSource props (#51643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51643

Add support to diff ImageSource props

/react-native/ReactCommon/react/renderer/imagemanager/primitives.h

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D69497848

fbshipit-source-id: 56afe1d8601f7f4dc5dab815b6e534d7c63f651b
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot ad0ea17ae9 Add support to diff Point props (#51650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51650

This diff adds support to diff props with Point type

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D75469451

fbshipit-source-id: a6844b691d8e32326d04c2bd51e6509980feb611
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot 508610865b Assert ImageRequest is not used as a prop in codegen (#51642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51642

This diff asserts that ImageRequest won't be used as prop type

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D75469453

fbshipit-source-id: e9e46bc8806e00c104b76825445fe72779106220
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot 20da141f5f Add support for diffing ColorPrimitive props (#51641)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51641

Add support for diffing ColorPrimitive props

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D69493546

fbshipit-source-id: 7ad6a28bd42014a771c168d8d6a6d2349629f670
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot 26d40e40e1 Add support for diffing primitve type props (#51649)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51649

 Add support for diffing primitve type props

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D69491368

fbshipit-source-id: 2b882b349e9d1bd3a9012bae3c3e0a06be2fa0e3
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot 2df200db3f Extend getDiffProps method to support no changes of props (#51646)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51646

Extend getDiffProps method to support no changes of props

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D69487497

fbshipit-source-id: 2cb91f1cc6cba84100750ce5dda5824824c923fe
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot 3609d070eb Extend getDiffProps method to call HostPlatformViewProps (#51638)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51638

Extend getDiffProps method to call HostPlatformViewProps

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D69487495

fbshipit-source-id: 4d2b508f116ec0618b42981c0880361c3d8a871a
2025-05-27 17:55:11 -07:00
David VaccaandFacebook GitHub Bot 1a43fd7927 Prototype to create getDiff method using codegen (#51637)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51637

Start prototype to create getDiff method using js codegen

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D69487496

fbshipit-source-id: 1547a7302381333bf9b005153b44de5621bc56c4
2025-05-27 17:55:11 -07:00
Nick GerlemanandFacebook GitHub Bot 6e8ce60bd4 Implement ReactCompoundView for PreparedLayoutTextView (#51551)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51551

This allows hit RN's hit testing to find nested spans, and click them.

This mechanism is fully separate from the one used by a11y virtual views, and ClickableSpan, such as those added for links via dataDetectorType (and also the `link` role).

When we do have a link accessibilityRole, that ClickableSpan hit test seems to prevent the React one, and we only activate the onPress once (but then add keyboard interaction, press visual, and add to the a11y tree).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75257326

fbshipit-source-id: 0c693f581ec121cf4b4e3e2040d141985118224f
2025-05-27 17:23:36 -07:00
Nick GerlemanandFacebook GitHub Bot 83226431c2 Remove ShadowNodeTraits::Trait::DirtyYogaNode (#51645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51645

It's dead, Jim

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D75324251

fbshipit-source-id: 869e81f0ae0064629ddd84b939a1e492e6646365
2025-05-27 15:26:27 -07:00
Tim YungandFacebook GitHub Bot 2a13d20085 RN: Enable avoidStateUpdateInAnimatedPropsMemo by Default (#51635)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51635

Enables a feature flag by default, that reduces the memory usage of`Animated`. For more details, see: https://github.com/facebook/react-native/pull/49184

Changelog:
[General][Changed] - Enabled a feature flag that optimizes `Animated` to reduce memory usage.

Reviewed By: jehartzog

Differential Revision: D75466724

fbshipit-source-id: 3fdb57f394448bbd0530dcb558a58958010d0edd
2025-05-27 14:17:30 -07:00
Ramanpreet NaraandFacebook GitHub Bot 7ef278af50 RuntimeExecutor: Remove noexcept from sync ui thread utils (#51514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51514

This util can execute arbitrary runtimeWork, which can throw.

In the future, we'll also make these utils execute ui blocks posted from the javascript thread. And those will be able to throw.

Therefore, let's remove the noexcept. Otherwise, if an exception bubbles up to this util, it will just crash this app.

Changelog: [General][Changed] - RuntimeExecutor:  Remove noexcept from sync ui thread utils

Reviewed By: javache

Differential Revision: D75183993

fbshipit-source-id: 6c3a319fe3a76165a265815e6343220cf9db6fde
2025-05-27 12:21:04 -07:00
Ramanpreet NaraandFacebook GitHub Bot 4974839be9 RuntimeExecutor: Use promises in sync ui thread utils (#51429)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51429

If we use promises, I believe the code is just easier to understand.

Changelog: [Internal]

Reviewed By: javache, yungsters

Differential Revision: D74941734

fbshipit-source-id: a9bc5ac715c84a5a92f8f1c6635ebef9fe538377
2025-05-27 12:21:04 -07:00
Nicola CortiandFacebook GitHub Bot 8a04ce6656 Migrate MapBuilder to Kotlin (#51626)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51626

This just migrates the `MapBuilder` file to Kotlin.
Users on Kotlin should still use the built-in collection extensions rather than using this class that will go away at some point in the future.

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D75448739

fbshipit-source-id: 2bfa24ad9bd37bd571ea4551bd9a10e848841e0a
2025-05-27 12:09:16 -07:00
Rubén NorteandFacebook GitHub Bot 619f68b720 Do not log warning for missing feature flags native module in tests (#51629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51629

Changelog: [internal]

The native module will never be defined in tests, so there's no point in logging this warning there.

Reviewed By: rshest

Differential Revision: D75451414

fbshipit-source-id: cdc1f674d01fcaf58c1c2342c994d95e6b3b6847
2025-05-27 11:37:43 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 254a918669 properly set dependencies on JSI and React-hermes (#51623)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51623

This fix relaxes some dependencies on React-hermes that should not be in the code.

## Changelog:
[Internal] - Remove dependencies from React-Hermes when they are not needed.

Reviewed By: cortinico

Differential Revision: D75447910

fbshipit-source-id: 6d7695f0e2b6c936b4c5ed9e70261f1d3b28a3d0
2025-05-27 10:22:08 -07:00
Nicola CortiandFacebook GitHub Bot 2578fd1356 Remove unnecessary OkHttpCompat (#51624)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51624

Let's remove this class and inline all the methods to the callsites.
This class was also public which would make this a breaking change but I couldn't find any meaningful usage:
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.modules.network.OkHttpCompat

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D75448162

fbshipit-source-id: 9f4793809c9115a299ac72d79dbfb44073320d54
2025-05-27 09:51:24 -07:00
Nicola CortiandFacebook GitHub Bot 4487697971 Migrate OkHttpCompat to Kotlin (#51625)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51625

This just migrates this class to Kotlin, which is also the last class in this package.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D75448161

fbshipit-source-id: d5457dd8017fd459d166d2945ff440c303943db2
2025-05-27 09:51:24 -07:00
Mateo GuzmánandFacebook GitHub Bot 66aca66c88 Migrate ReactMarker to Kotlin (#51578)
Summary:
Migrate com.facebook.react.bridge.ReactMarker to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.ReactMarker to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D75442661

Pulled By: javache

fbshipit-source-id: f05f54f0f68b5a7012312225c28484d57accecf8
2025-05-27 07:43:54 -07:00
Mateo GuzmánandFacebook GitHub Bot 9218d1ed89 Fix InputAccessoryView example in dark mode and convert to functional components (#51583)
Summary:
As I reviewed some examples, I noticed that this one's dark mode could be improved, and the code could be modernised a bit as well by converting its classes into functional components.

## Changelog:

[INTERNAL] - Fix InputAccessoryView example in dark mode and convert to functional components

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

Test Plan:
<details>
<summary>Screenshots</summary>

| Dark | Light |
|--------|-------|
| ![Simulator Screenshot - iPhone SE (3rd generation) - 2025-05-24 at 17 39 16](https://github.com/user-attachments/assets/3ed7cb53-89d4-440d-ac4f-50816527774e) | ![Simulator Screenshot - iPhone SE (3rd generation) - 2025-05-24 at 17 39 35](https://github.com/user-attachments/assets/94592d35-859d-4666-a836-977903e955af) |
</details>

Reviewed By: fabriziocucci

Differential Revision: D75404561

Pulled By: cortinico

fbshipit-source-id: 3318e9869919e99055e47b59c89de0b22976f142
2025-05-27 06:44:54 -07:00
Mateo GuzmánandFacebook GitHub Bot c62d9527b4 Reland: Migrate PromiseImpl to Kotlin (#51273)
Summary:
Reland of https://github.com/facebook/react-native/pull/51241, which had to be reverted due to a crash.

Migrate com.facebook.react.bridge.PromiseImpl to Kotlin.

In this diff, nothing has changed yet as from the original PR. Awaiting for next steps to apply new changes https://github.com/facebook/react-native/pull/51241#issuecomment-2873363651

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.PromiseImpl to Kotlin

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

Test Plan:
Tested on IGVR here:
https://www.internalfb.com/intern/px/p/7j3zC

Reviewed By: mdvacca, cortinico

Differential Revision: D74645262

Pulled By: javache

fbshipit-source-id: 9d9a439a2e5867a3c7a114cd34277cd59fec864c
2025-05-27 05:53:23 -07:00
Nicola CortiandFacebook GitHub Bot c059ae1b77 Correctly propagate RN_SERIALIZABLE_STATE to 3rd party CMake targets (#51619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51619

RNTester Android is currently instacrashing in OSS due to 3rd-party packages not having the `RN_SERIALIZABLE_STATE` definition.
That's because the `INTERFACE` definition is not properly propagated on the prefab boundaries.

This was happening for `react-native-popup-menu-android` and `react-native-test-library` and will also happen for Codegen libraries.

This fixes it. 3p developers with custom CMake files will also have to use the `target_compile_reactnative_options` functions to make sure the compilation flag are properly populated.

Changelog:
[Android] [Breaking] - Correctly propagate RN_SERIALIZABLE_STATE to 3rd party CMake targets. Users with custom CMake and C++ code should update to use `target_compile_reactnative_options` inside their CMakeLists.txt files. See the 0.81 release notes for more information.

Reviewed By: cipolleschi

Differential Revision: D75441245

fbshipit-source-id: 3855fdf11cbe7f4b01f68e0dde68b63b3240ad35
2025-05-27 05:33:16 -07:00
Rubén NorteandFacebook GitHub Bot 017b2d0186 Clean up compatibility code for MutationObserver (#51309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51309

Changelog: [internal]

Clean up old compatibility code for when NativeMutationObserver.unobserveAll isn't available.

Reviewed By: lenaic

Differential Revision: D74313204

fbshipit-source-id: ef057884236563cc9592c9954d4e3edd24df74eb
2025-05-27 05:05:26 -07:00
Samuel SuslaandFacebook GitHub Bot c59a532950 mark methods as const in nodes (#51617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51617

changelog: [internal]

mark more methods as const and noexcept.

Reviewed By: mdvacca

Differential Revision: D75218535

fbshipit-source-id: 7ba5f2144e2db2fd1befbe28d807abd669188339
2025-05-27 04:25:24 -07:00
Samuel SuslaandFacebook GitHub Bot 8e8267de1b remove unused getter method from NativeAnimatedNodesManagerProvider (#51616)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51616

changelog: [internal]

doesn't seem to be used by anything. let's delete it.

Reviewed By: javache

Differential Revision: D75218695

fbshipit-source-id: eeb3a826f06456be8de6941fa95d6ffc7917dcf8
2025-05-27 04:25:24 -07:00
Samuel SuslaandFacebook GitHub Bot d7f94af5cb rename getters and mark them as const+noexcept in ValueAnimatedNode (#51615)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51615

changelog: [internal]

rename methods to reflect that they are getters and mark them as noexcept const

Reviewed By: rshest

Differential Revision: D75217535

fbshipit-source-id: c7d77060d0f54f8043a7552eec7e2b231cb5b7bf
2025-05-27 04:25:24 -07:00
Rubén NorteandFacebook GitHub Bot 77c860898e Fix missing willPerformAsynchronously parameter in calls to MountingCoordinator::pullTransaction (#51618)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51618

Changelog: [internal]

This sets the argument to `pullTransaction` to `true` in the cases where the call is done from the JS thread and the transactions are mounted asynchronously in the UI thread (basically platforms using the push model for mounting coordinator).

It was missing on an experiment for Android (compatibility mode for Props 2.0)

Reviewed By: lenaic

Differential Revision: D75439105

fbshipit-source-id: a106a3a674e44b0cf2603782302343f60ee5450e
2025-05-27 04:17:13 -07:00
React Native BotandFacebook GitHub Bot 6d7da0cc37 Add changelog for v0.80.0-rc.3 (#51608)
Summary:
Add Changelog for 0.80.0-rc.3

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

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D75431114

Pulled By: fabriziocucci

fbshipit-source-id: 645a7d8f0a8db3e542726cb81ed0db93cd618ee5
2025-05-27 03:29:27 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 69826e1f11 Fix nightlies by backing out "[RN][iOS] Decouple Hermes from JSI nd simplify dependencies" (#51620)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51620

The spirit of "Decouple Hermes from JSI nd simplify dependencies" is good, but the problem is that when we ships prebuilds of hermes-engine, it tries to load `libjsi.dylib` and that library is not available.

{F1978594163}

I'll have to investigate more how to properly decouple Hermes prebuilds and how to pass jsi to Hermes and react-native. We might have to decouple it further and have a separate job that builds jsi and feed it to hermes.

This problem will go away with SwiftPM, though, so probably not worth solving this.

## Changelog:
[Internal] - Fix nightlies with a backout

Reviewed By: cortinico

Differential Revision: D75442056

fbshipit-source-id: f1085be8247c0974854254c6bd631ca258488beb
2025-05-27 03:10:40 -07:00
Dawid MałeckiandFacebook GitHub Bot 9cdd0db138 Remove JSEventLoopWatchdog from react-native package (#51614)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51614

`JSEventLoopWatchdog` is not used in react-native package. This diff moves it to rn-tester which previously deep imported it from react-native (which we want to avoid).

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75410548

fbshipit-source-id: d4996742578e3b068e7acad9479394388b1907ac
2025-05-27 03:10:14 -07:00
Dawid MałeckiandFacebook GitHub Bot b34e56259a Remove TextAncestor import from rn-tester TextExample (#51603)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51603

In `rn-tester` TextAncestor was used to create a inlineView wrapper:

```js
function InlineView(props) {
  return (
    <TextAncestor.Provider value={false}>
      <View {...props} />
    </TextAncestor.Provider>
  );
}
```

however, it is already done in View.js and TextAncestor shouldn't be used outside of react-native package:

```js
 if (hasTextAncestor) {
    return <TextAncestor value={false}>{actualView}</TextAncestor>;
  }
  return actualView;
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75408231

fbshipit-source-id: 7f12278296dcfe56246f6b7065f5a094e4099f7a
2025-05-27 01:21:17 -07:00
Jakub PiaseckiandFacebook GitHub Bot 9be5ac1010 Update types of Animated FlatList and SectionList (#51602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51602

Changelog: [GENERAL][FIXED] - Fixed the generated type definitions for `Animated.FlatList` and `Animated.SectionList` to correctly infer item types.

Current definitions for animated list components cast away their generic definitions, preventing the types to be inferred from usage. This diff addresses that.

Reviewed By: huntie

Differential Revision: D75407762

fbshipit-source-id: c86f20298ded707971c05a78d025a63e82fe2a64
2025-05-26 23:55:12 -07:00
Samuel SuslaandFacebook GitHub Bot 6c053006b8 remove superclass enable_shared_from_this from AnimationDriver (#51611)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51611

changelog: [internal]

AnimationDriver does not use enable_shared_from_this, let's remove it. Also mark a few methods as noexcept and const.

This helps with C++ binary size.

Reviewed By: rshest

Differential Revision: D75172851

fbshipit-source-id: d6552cd577371a51c3fa3b394b451d7ed2b61e44
2025-05-26 15:03:56 -07:00
Samuel SuslaandFacebook GitHub Bot 5bbf7e60a9 remove uiManagerBinding_ member variable from NativeAnimatedNodesManagerProvider (#51610)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51610

changelog: [internal]

No need to store uiManagerBinding in a shared_ptr. Let's just get it, pass it to classes that need it and not store it.

This helps with C++ binary size a little bit.

Reviewed By: rshest

Differential Revision: D75174567

fbshipit-source-id: 1d4e5a9f89ba2f2d2eb733eac9d103ee97550d0f
2025-05-26 15:03:56 -07:00
Samuel SuslaandFacebook GitHub Bot 0c0d24080f Make NativeAnimatedNodesManagerProvider not virtual (#51609)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51609

changelog: [internal]

NativeAnimatedNodesManagerProvider is not subclassed. Let's remove virtual methods and make it a final class.

Reviewed By: lenaic

Differential Revision: D75169108

fbshipit-source-id: 32121cf372ba94c8a7b86c61fd96efd75560f789
2025-05-26 15:03:56 -07:00
Nick LefeverandFacebook GitHub Bot a314e34d6e Move Android ScrollView props to HostPlatformScrollViewProps (#51517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51517

The Props 2.0 implementation for ScrollView added two missing props which were Android specific.

This diff moves these to a separate HostPlatformScrollViewProps class so that other platforms wouldn't include them

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75183132

fbshipit-source-id: 44d0e0aa974e69f8584ad6bd681fad100c3493d8
2025-05-26 10:54:35 -07:00
Samuel SuslaandFacebook GitHub Bot 1da4abd273 use folly::dynamic without std::optional (#51605)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51605

changelog: [internal]

folly::dynamic can be constructed with nullptr and it creates a null folly::dynamic. Let's use that to indicate missing value instead of std::optional to lower C++ binary size.

Reviewed By: rshest

Differential Revision: D75174590

fbshipit-source-id: f2dfef00975686f6ac4c14b42539e700e967075b
2025-05-26 09:29:00 -07:00
Samuel SuslaandFacebook GitHub Bot 53b232fd5f remove enable_shared_from_this from AnimatedModule (#51606)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51606

changelog: [internal]

When native module is destroyed, ui queue is also torn down.

this helps with C++ binary size a little bit

Reviewed By: rshest

Differential Revision: D75149437

fbshipit-source-id: 1df061db26b4fb5026114e00bbc6846bf38d83a9
2025-05-26 09:29:00 -07:00
Samuel SuslaandFacebook GitHub Bot c653eea19d remove unimplemented methods (#51607)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51607

changelog: [internal]

remove methods that are not implemented yet.

Reviewed By: rshest

Differential Revision: D75148726

fbshipit-source-id: c01002050dc9c71df559e6f89b72aeee46e3a2f6
2025-05-26 09:29:00 -07:00
Dawid MałeckiandFacebook GitHub Bot 8a0cfec815 Remove infoLog invocations from react-native and rn-tester (#51600)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51600

The `infoLog` is a `console.log` wrapper to separate ad-hoc console debug logging, however console logs are already used in some files in rn-tester (ex. RNTesterAppShared.js). The same applies to files in react-native package.

Changelog:
[General][Changed] - Removed `infoLog` from react-native package

Reviewed By: huntie

Differential Revision: D75402930

fbshipit-source-id: 1a14a9122552130415f058d3647d715225321ab8
2025-05-26 08:19:05 -07:00
Nicola CortiandFacebook GitHub Bot 827a6851d0 Gradle to 8.14.1 (#51597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51597

Bumping Gradle patch version to address this problem:
https://github.com/facebook/react-native/pull/50960#issuecomment-2906368364

Changelog:
[Android] [Changed] - Gradle to 8.14.1

Reviewed By: fabriziocucci

Differential Revision: D75401634

fbshipit-source-id: 07726f4d882a5f447cbaea11c4d159ef85fd7636
2025-05-26 07:04:40 -07:00
Ritesh ShuklaandFacebook GitHub Bot d06909142a Typo correction in RCTFollyConvert.h (#51592)
Summary:
Just a minor typo correction

## Changelog:
[IOS][CHANGED] Minor typo correction in RCTFollyConvert

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D75389160

Pulled By: cipolleschi

fbshipit-source-id: 03764c82fa74c2b1b604db0d9dc4b0e1e364ac4a
2025-05-26 06:26:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 95304f7ac7 Decouple Hermes from JSI nd simplify dependencies (#51591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51591

This change decouples Hermes from JSI and simplify the dependency graph.

Prior to this change, Hermes was building and providing JSI to React Native.
Hermes and React Native shares the same version of JSI, so that's was not a problem, but this choice added an unnecessary dependency on hermes-engine for some pods. For example, `React-utils` was depending on hermes, although it only needs JSI.

## Changelog:
[Internal] - Decouple hermes-engine from jsi

Reviewed By: cortinico

Differential Revision: D75374285

fbshipit-source-id: 3af6846032e81b6461420dd4f4a9c34b741f31ae
2025-05-26 06:24:15 -07:00
Mateo GuzmánandFacebook GitHub Bot c1731ecd27 Update iOS RNTester build artifacts in .gitignore (#51579)
Summary:
Running `yarn prepare-ios` creates some build artifacts folders, which can be added to the .gitignore as they are generated.

## Changelog:

[INTERNAL] - Update iOS RNTester build artifacts in .gitignore

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D75389176

Pulled By: cipolleschi

fbshipit-source-id: ecb59051f5bb25b6be8fca9ac2ebf408adc5c7b7
2025-05-26 06:07:22 -07:00
Alex HuntandFacebook GitHub Bot c93036ce7d Annotate deprecated APIs (#51599)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51599

Adds `deprecated` to 2x API exports via `index.js.flow`. This will flag these APIs appropriately to the developer under TypeScript.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D75403796

fbshipit-source-id: 670c4bd0c262a58413e7703f09d6db2927d51408
2025-05-26 05:51:00 -07:00
Rob HoganandFacebook GitHub Bot 8ad43da3be Update Metro imports to use package root exports (#51261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51261

Cleanup to use the new public type / API exports from `metro` landed in Metro 0.82.3, which is RN's minimum as of D74181990 / [PR](https://github.com/facebook/react-native/pull/51122), in preference to deep imports.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74141939

fbshipit-source-id: 9405f88a85e248abe8a92be1dd5a5f1ea6ceeb87
2025-05-26 04:54:26 -07:00
Alex HuntandFacebook GitHub Bot 0e37db80f9 Delete accidentally committed helloworld test in Flow (#51598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51598

Accidentally staged as part of D75060846. `App.test.tsx` remains.

Fixes CI.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D75402566

fbshipit-source-id: 6f698cfcd4f342591f81c308b2353e7637842e7d
2025-05-26 04:08:23 -07:00
Rob HoganandFacebook GitHub Bot a3447d6b8b community-cli-plugin: Refactor CLI build command to use Metro.runBuild (#51124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51124

Metro 0.82.3's `runBuild` API now supports retrieving assets and passing through `unstable_transformProfile`, and fine control of output paths via `bundleOut`/`sourcemapOut`, so we can use it directly in the implementation of `community-cli-plugin`'s `bundle` command with no loss of function or API change.

This simplifies the implementation by re-using Metro's, and removes use of Metro internal APIs.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74151840

fbshipit-source-id: 3dcadaf8d38e7e77d21bacdf29e5d40467139d88
2025-05-26 03:45:58 -07:00
Dawid MałeckiandFacebook GitHub Bot 7af8c01f46 Disable deep import warning on rn-tester package (#51565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51565

This diff silence deep import warnings globally for rn-tester package.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75291027

fbshipit-source-id: 7b4b2fe46a5c992a420b21f09a72f17944c54f6d
2025-05-26 02:53:24 -07:00
Dawid MałeckiandFacebook GitHub Bot d8dc2d255a Remove prepare-flow-api-translator from build-types script and all experimental references (#51497)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51497

It removes `prepare-flow-api-translator` which is no longer needed as `flow-api-translator` version was bumped already and it blocks `build-types` script from running on CI (due to reference to `flow-api-translator` source). It also removes "Experimental" annotations.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75138541

fbshipit-source-id: 897009c91adeeeaae21603dbf90020b52b61c5d5
2025-05-26 01:45:05 -07:00
Sam ZhouandFacebook GitHub Bot 5dbe32ee14 Deploy 0.272.1 to xplat (#51584)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51584

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D75356543

fbshipit-source-id: 29234de4f1b6ee2b8857b24a5de566a4afd31030
2025-05-25 08:36:30 -07:00
Samuel SuslaandFacebook GitHub Bot bf974e8de1 remove enable_shared_from_this from NativeAnimatedNodesManager (#51589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51589

changelog: [internal]

With D75140890, there is a guarantee that `startOnRenderCallback_` won't be called after the owning class is destroyed.

There shouldn't be any events flowing through Fabric when the RN instance is torn down. Passing this to eventEmitterListener_ should be safe.

This helps with C++ binary size a little bit.

Reviewed By: rshest

Differential Revision: D75148616

fbshipit-source-id: 5110736c2ddcff738fce395bd0b9844d44e8dcb2
2025-05-25 04:20:59 -07:00
Samuel SuslaandFacebook GitHub Bot 44ebf31f3b remove use of shared_ptr from AnimatedNode (#51588)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51588

changelog: [internal]

AnimatedNode never outlive NativeAnimatedNodesManager. We can safely use raw pointer here instead of shared_ptr.

This improves a C++ binary size a little bit.

Reviewed By: rshest

Differential Revision: D75148487

fbshipit-source-id: 4c2f6dc6e4de670be37dd3b65dc3a8d63d546150
2025-05-25 04:20:59 -07:00
Samuel SuslaandFacebook GitHub Bot 1db4874bb3 Use unique_ptr instead of shared_ptr in activeAnimations_ (#51587)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51587

changelog: [internal]

use unique_ptr instead of shared_ptr to manage memory of activeAnimations_.

Active animations are only owned by NativeAnimatedNodesManager and their ownership isn't shared with any other class.

This saves a little bit of C++ binary size.

Reviewed By: rshest

Differential Revision: D75142643

fbshipit-source-id: c09753b68e70e95fedcb7b2b8fb19a0fd7010059
2025-05-25 04:20:59 -07:00
Samuel SuslaandFacebook GitHub Bot 1e31392211 remove use of shared_ptr from NativeAnimatedNodesManager::animatedNodes_ and NodesQueueItem (#51586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51586

changelog: [internal]

using shared_ptr here is not necessary because AnimatedNodes are not shared between multiple entities, they are only owned by NativeAnimatedNodesManager.

This saves a little bit C++ binary size.

Reviewed By: rshest

Differential Revision: D75148952

fbshipit-source-id: 18b8231061cda970ad96842ee6ca3135c2ec5d68
2025-05-24 16:05:01 -07:00
Samuel SuslaandFacebook GitHub Bot afb543683c introduce a way to inspect shadow node revision in Fantom (#51566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51566

changelog: [internal]

Expose [revision](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h#L229) of shadow node in Fantom tests. This makes it possible to write tests verifying that shadow nodes are only cloned when they should.

Even though excessive cloning does not usually lead to bugs, it may lead to performance problems.

Also introduce a test showing a performance problem where changing height of "Sibling" view from 1 to 2 will lead to component `D` being cloned by Yoga. Component D is not affected by the size change of Sibling and the clone is unnecessary.

```jsx
<ScrollView>
  <View id="Sibling" style={{ height: 1 }} />
  <View id="A">
    <View id="B">
      <View id="C">
        <View id="D" ref={ref} />
      </View>
    </View>
  </View>
</ScrollView>
```

Reviewed By: rshest

Differential Revision: D75287261

fbshipit-source-id: ea5acb2f5d7ba6e1e5bf895d8f82a16471122ec5
2025-05-24 15:44:11 -07:00
Pieter De BaetsandFacebook GitHub Bot ca5f4d1721 Disable enableModuleArgumentNSNullConversionIOS by default (#51576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51576

This is causing some internal test failures for now, so disabling the behaviour to prevent further rollout.

Changelog: [iOS][Removed] Disable fix for #51103 until more testing can be done.

Differential Revision: D75320842

fbshipit-source-id: 39c115afd11e5b1aca6cdc1fc18ec7e83eb10382
2025-05-23 16:05:44 -07:00
Soe LynnandFacebook GitHub Bot b6292d2646 Remove static from the local scoped variable for getConstants - part 2 (#51573)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51573

Changelog: [Internal]

Remove unnecessary `static` in a local scoped variable.

Reviewed By: RSNara

Differential Revision: D75306776

fbshipit-source-id: 52decae228c65ea993bd5fde0be66ab094c8fcf1
2025-05-23 12:02:11 -07:00
Vitali ZaidmanandFacebook GitHub Bot e04ab60784 Update debugger-frontend from 7e19a54...343405b
Summary:
Changelog: [Internal] - Update `react-native/debugger-frontend` from 7e19a54...343405b

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

Reviewed By: huntie

Differential Revision: D75298472

fbshipit-source-id: 13fd990669eaa37b96f770193640417de3cddd08
2025-05-23 11:51:42 -07:00
Vitali ZaidmanandFacebook GitHub Bot e757c09b96 fixed typo in UNREGISTERED_DEVICE error (#51561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51561

Changelog: [Internal] fix typo in InspectorProxy

Reviewed By: huntie

Differential Revision: D75217049

fbshipit-source-id: 2473ddf4a120175305b195ed78704e734554b423
2025-05-23 11:51:42 -07:00
Rob HoganandFacebook GitHub Bot fa79fd8f96 Bump Metro to 0.82.4 (#51567)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51567

Bump Metro minimum from 0.82.3 to 0.82.4

Release notes: https://github.com/facebook/metro/releases/tag/v0.82.4

Changelog: [General][Changed] Bump Metro to ^0.82.4

Reviewed By: vzaidman

Differential Revision: D75294674

fbshipit-source-id: 750e83db2fb5cd9a6bf4b1971cb701ac23dfa961
2025-05-23 10:53:17 -07:00
Joe VilchesandFacebook GitHub Bot d87790846b Fixup focusability logic of PreparedLayoutTextView (#51508)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51508

For now, we are opting to not auto-focus `PreparedLayoutTextViews` if they have links. The reason being this would not work well with Text nested in a View which is also accessible. If that Text had links, and was set to focusable, then TalkBack would individually focus that Text, which users may not want.

So this diff removes that link detection, and fixes up accessibility in general. Since this isn't a TextView, we need to explicitly set the `text` on the `AccessibilityNodeInfo` object in the delegate so TalkBack know what to annouce.

In the future we aim to bring back auto-focusing with links, but only if a screen reader is not on, so that keyboard users can benefit from this.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D75103779

fbshipit-source-id: 05e17f4eb8d5d79ed1d84458f6d5fc6d1571e382
2025-05-23 10:42:37 -07:00
Samuel SuslaandFacebook GitHub Bot 0f73a7ac28 Mark methods in NativeAnimatedNodesManager as noexcept (#51557)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51557

changelog: [internal]

use noexcept in NativeAnimatedNodesManager whenever feasible to lower C++ binary size.

Reviewed By: rshest

Differential Revision: D75149555

fbshipit-source-id: 03838c048d78bcfd9ad563c71a9a7a1f3c5cd2e3
2025-05-23 08:46:39 -07:00
Samuel SuslaandFacebook GitHub Bot e657862709 Do not throw error in PropsAnimatedNode (#51563)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51563

changelog: [internal]

Throwing errors in C++ is expensive and slow. Let's replace it with logging.

This is to reduce binary size of C++ Animated.

Reviewed By: mdvacca

Differential Revision: D75140875

fbshipit-source-id: 32909572141d8e1b51b60f317716f783aa760265
2025-05-23 07:10:56 -07:00
Pieter De BaetsandFacebook GitHub Bot ae4eac1eb6 RCTTurboModule nits (#51499)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51499

Small nits as follow-up to D74208525

 Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D75141440

fbshipit-source-id: 466ee3573c4afe88878f306d902c5aa82df2a3f3
2025-05-23 06:39:41 -07:00
zhongwuzwandFacebook GitHub Bot 4a4fd1cb8b Turbo module: Fixes dictionary stripped out when value is null (#51103)
Summary:
Fixes https://github.com/facebook/react-native/issues/51083. Turbo stripped out the dictionary when the value is null. The old architecture transforms null to NSNull. The null seems useful in cases like #51803 for removing the storage of the key. cipolleschi can you please help to review?

## Changelog:

[IOS] [FIXED] - Turbo module: Fixes dictionary stripped out when value is null

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

Test Plan: Repro please see https://github.com/facebook/react-native/issues/51083.

Reviewed By: rshest

Differential Revision: D74208525

Pulled By: javache

fbshipit-source-id: 53d630c265fba15d25309a3e1deb19dca24f298c
2025-05-23 06:39:41 -07:00
Samuel SuslaandFacebook GitHub Bot 6ff500d694 Stop render callback on destruction to prevent crash (#51558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51558

changelog: [internal]

we must call stopRenderCallbackIfNeeded to prevent UI tick from being called when
`NativeAnimatedNodesManager` is deallocated.

Reviewed By: mdvacca

Differential Revision: D75140890

fbshipit-source-id: 9ad32956a877f9ee8256790ba32cb5982a5b0c2f
2025-05-23 05:51:26 -07:00
Ruslan LesiutinandFacebook GitHub Bot a633d93f7f Define sampling methods implementations for Hermes fallback target delegate (#51519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51519

# Changelog: [Internal]

Hermes Sampling Profiler doesn't require debugger to be enabled - we can use it in fallback Hermes Runtime target delegate. That's probably the last thing to make Hermes really run in `opt` mode.

When Hermes Target is compiled with no Debugger support, we can still define implementation for sampling profiler methods and call them on Hermes Runtime.

Reviewed By: huntie

Differential Revision: D75188276

fbshipit-source-id: e3e0dccd09e0870264e8abc65f96052735d63ad8
2025-05-23 05:33:38 -07:00
Alex HuntandFacebook GitHub Bot 38acb4c074 Remove flow libdefs from npm package (#51556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51556

Excludes `packages/react-native/flow/` from being published to npm.

**As far as I know**, we already axed open source Flow support with a similar change in D46313482 (Jun 2023).

Changelog:
[General][Breaking] - The `react-native` package no longer ships with the `flow` directory

Reviewed By: cipolleschi

Differential Revision: D75060845

fbshipit-source-id: 3cb81820499383bf095abc97a9ab7e9061c870d6
2025-05-23 04:29:05 -07:00
Rubén NorteandFacebook GitHub Bot a573049c0a Improve support for multi-config benchmarks (#51559)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51559

Changelog: [internal]

Improves the support for multi-config benchmarks in Fantom by printing the Fantom configuration summary in the header of the table with the benchmark results for each variant.

Reviewed By: rshest

Differential Revision: D75281972

fbshipit-source-id: 80caf2e668a30ea1454cb932e91dac91192323bf
2025-05-23 04:24:44 -07:00
Rubén NorteandFacebook GitHub Bot 0ff4566ac7 Enable multi-config in IntersectionObserver-itest (#51541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51541

Changelog: [internal]

Now that we have support for tests with multiple configurations in Fantom, we can configure the test for IntersectionObserver to run with all the flag configurations that affect its behavior, and make sure it doesn't break for anyone while we're rolling out the changes.

Reviewed By: rshest

Differential Revision: D75231300

fbshipit-source-id: e7addf51cffad8c94bb3bf34e99272ee1dd9da2a
2025-05-23 04:24:44 -07:00
Rubén NorteandFacebook GitHub Bot 936666d3b4 Migrate ReactFabricPublicInstance tests to a single multi-config test (#51543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51543

Changelog: [internal]

For `ReactFabricPublicInstance-itest` we used a specific pattern to be able to run the same test with different feature flags (having multiple entrypoints with the configuration and a single implementation file). We can simplify this now that we have support for multiple configurations per test file in Fantom.

Reviewed By: rshest

Differential Revision: D75231301

fbshipit-source-id: ffd047b23217c06b1b15ba07da8b5c191cc652e7
2025-05-23 04:24:44 -07:00
Rubén NorteandFacebook GitHub Bot cc9be3048a Add support multi-config test runs (#51542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51542

Changelog: [internal]

This adds support for Fantom to run specific test suites with different combinations of options/flags, using wildcards as values.

See the new documentation for this feature in this diff for more details.

Reviewed By: rshest

Differential Revision: D75231299

fbshipit-source-id: 0e953e6de68f004944ee29206af49770c8b7dd9b
2025-05-23 04:24:44 -07:00
Rubén NorteandFacebook GitHub Bot 9d58eb5719 Display Fantom test configuration in test output (#51528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51528

Changelog: [internal]

This adds some logic to the Fantom runner to display the test configuration with the test results.

Reviewed By: lenaic

Differential Revision: D75063176

fbshipit-source-id: 8371e90247c1a0c24f29a13ead25fa5dbf98ec10
2025-05-23 04:24:44 -07:00
Christian FalchandFacebook GitHub Bot 592b09781b added missing search path to reactPerfLogger (#51555)
Summary:
ReactPerfLogger target now has an include file that wasn't in the search path.

This commit fixes this by adding "ReactCommon" as search path to the target.

## Changelog:

[IOS] [FIXED] - Added missing search path to swift package

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

Test Plan: No tests yet.

Reviewed By: cortinico

Differential Revision: D75279320

Pulled By: rshest

fbshipit-source-id: b4d217bdcdb45d4b2decee0aeee155b829cdec9d
2025-05-23 03:22:39 -07:00
Wojciech LewickiandFacebook GitHub Bot 90da666691 fix: call delete instead of free in imagefetcher (#51492)
Summary:
I've been digging into memleaks in RN for some time and noticed that instances of `FabricUIManager` are leaking on reload action even on an empty app. I managed to pinpoint it to [ContextContainer](https://github.com/facebook/react-native/blob/36df97f500aa0aa8031098caf7526db358b6ddc1/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp#L522) (which holds `FabricUIManager` on the cpp side) not being deallocated after reload. After much much digging (since contextContainer is passed around in many places) I found that destructor of `ImageFetcher` never runs on reload, and its instance holds `contextContainer`. It turns out that `ImageManager`, which holds `ImageFetcher`, was calling `free` instead of `delete` and the former does not call destructor. After applying it, `contextContainer` does not leak making `FabricUIManager` instances not to leak too 🎉.

## Changelog:

[ANDROID] [FIXED] - Change `free` to `delete` to call destructor of `ImageFetcher` and release `contextContainer`.

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

Test Plan: Run empty RN app in AS, do reload multiple times and see in AS profiler that instances of `FabricUIManager` are kept in memory without this change.

Reviewed By: Abbondanzo

Differential Revision: D75141983

Pulled By: javache

fbshipit-source-id: f13eea96cb7b614c1d6b53184498ef6294614986
2025-05-23 02:38:54 -07:00
Tomek ZawadzkiandFacebook GitHub Bot 2da4a6059a Apply baseline offset separately for each line of text on iOS (#51344)
Summary:
This PR removes extraneous blank space at the bottom of multiline `TextInput` when using nested `Text` with different font sizes on iOS with the New Architecture enabled.

| Before | After |
|:-:|:-:|
| <img width="283" alt="Screenshot 2025-05-15 at 12 16 05" src="https://github.com/user-attachments/assets/47256267-86ff-45f9-9e60-162d444a4b9d" /> | <img width="286" alt="Screenshot 2025-05-15 at 12 01 32" src="https://github.com/user-attachments/assets/43ce4b0b-6410-4ca5-be37-59c6374ea15c" /> |

The proposed solution is to call `RCTApplyBaselineOffset` separately for each line of text.

Ideally, we would call it separately for each part of text with different font size.

## Changelog:

[IOS] [FIXED] - Fixed blank space at the bottom of multiline TextInput on iOS

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

Test Plan:
```tsx
<TextInput
  multiline
  style={{borderWidth: 1, width: 300, fontSize: 20}}
  ref={ref}
  placeholder="Type here...">
  First line{'\n'}
  <Text style={{fontSize: 30, lineHeight: 60}}>Second line</Text>
  {'\n'}Third line{'\n'}Fourth line
  {'\n'}
  Fifth line
</TextInput>
```

Reviewed By: NickGerleman

Differential Revision: D74802648

Pulled By: j-piasecki

fbshipit-source-id: 30f02ae8af66264c1776d241ed8542899e9cdf99
2025-05-22 23:02:34 -07:00
Luna WeiandFacebook GitHub Bot 139f3d5ef9 Clean up double render flag (#51552)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51552

Changelog: [Internal] - Clean up double state render experiment

Reviewed By: yungsters

Differential Revision: D75248135

fbshipit-source-id: 360c7918ae7b7e7f3ddd76a58d54daf31e4b122a
2025-05-22 21:43:22 -07:00
Tim YungandFacebook GitHub Bot 1977dd6596 RN: Sort Pragmas in Headers (#51554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51554

Sorts pragma directives file headers in React Native.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75264593

fbshipit-source-id: 9e4b253dd0fc94dc2fc469d7114b93a8aae305f4
2025-05-22 21:18:53 -07:00
Tim YungandFacebook GitHub Bot 5a4be31a6a RN: Fix Extraneous & Erroneous Pragma in Headers (#51553)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51553

Fixes extraneous and erroneous pragma in file headers in React Native.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75264384

fbshipit-source-id: b104c48dae09d6afbbb51450618c917be0df9e38
2025-05-22 21:18:53 -07:00
Nick GerlemanandFacebook GitHub Bot b70c73d8f7 Fix missing height constraints when creating Fabric layout for adjustsFontSizeToFit (#51550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51550

`adjustsFontSizeToFit` will adjust font size so that given text fits in both veritcal and horizontal bounds. The algorithm to mutate text to fit is executed during TextLayoutManager during layout creation for Fabric, and then re-executed in `TextView.onDraw()`. See D56134348 which introduced the logic.

In Facsimile, we were not seeing font size adjusted when text is too tall. This is because we are only incorporating the height constraint during Spannable mutation during draw, but not the original layout, which Facsimile uses directly.

This could potentially fix other bugs, where width may not corredpond to the final font size we settle on during drawing.

Changelog:
[Android][Fixed] - Fix missing height constraints when creating Fabric layout for `adjustsFontSizeToFit`

Reviewed By: mdvacca

Differential Revision: D75251391

fbshipit-source-id: 77d90c49d48911e63131f9f088cfce13946c67d6
2025-05-22 17:42:29 -07:00
Peter AbbondanzoandFacebook GitHub Bot 1040cd62b6 Remove unused constructor (#51546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51546

A bit of housekeeping: this constructor is deprecated and unused as the class is internal

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D75233988

fbshipit-source-id: 8272ef4a9465c447d04b377b42071f9834092709
2025-05-22 14:57:06 -07:00
Alex Taylor (alta)andFacebook GitHub Bot 535444bca4 Deploy 0.272.0 to xplat (#51536)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51536

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D75228208

fbshipit-source-id: ad6666deedd976b02e8e0e475831df27b3a63984
2025-05-22 13:22:01 -07:00
David VaccaandFacebook GitHub Bot f4cea64ff0 Update documentation for DebugCorePackage (#51501)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51501

Update documentation for DebugCorePackage

changelog: [internal] internal

Reviewed By: javache, arushikesarwani94

Differential Revision: D75113218

fbshipit-source-id: e02e5385b42453623369a52f788c0225d644625f
2025-05-22 12:46:43 -07:00
David VaccaandFacebook GitHub Bot 95d6b03b61 Avoid reflection call to ReactInstanceManager.handleCxxError when MINIFY_LEGACY_ARCHITECTURE is enabled (#51484)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51484

In this diff I'm avoiding a reflection call to ReactInstanceManager.handleCxxError when MINIFY_LEGACY_ARCHITECTURE is enabled, to help proguard to compile-out this method when MINIFY_LEGACY_ARCHITECTURE is enabled

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D75085524

fbshipit-source-id: c80246fdb5940c549cc1d310f7ad042cc0482f0f
2025-05-22 12:46:43 -07:00
Nick LefeverandFacebook GitHub Bot 86ffa88bbd Add missing dependency to CMakeLists for mounting (#51540)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51540

The view culling `CullingContext` depends on the ScrollView component. This adds the dependency to the mounting target in CMakeLists

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D75233669

fbshipit-source-id: 8342ed791082174ac6d5c6f21270b0cd0adcc95f
2025-05-22 12:27:51 -07:00
Panos VekrisandFacebook GitHub Bot 206cdc1f05 enable natural inference in xplat/js (#51538)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51538

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D75196563

fbshipit-source-id: 1039e2234cb4f7ca81fef28bb1acbf4c6bd7e7d9
2025-05-22 11:50:16 -07:00
Panos VekrisandFacebook GitHub Bot ff9d33073d unbreak flow trunk (#51544)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51544

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D75235560

fbshipit-source-id: 7767aa3a9cabc6174d778f437bc31624224a530e
2025-05-22 11:29:22 -07:00
Alex HuntandFacebook GitHub Bot 44e36e6d9f Consolidate location for Flow libdefs (#51539)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51539

Follow up to D70322032. Relocates some of our newly added Flow library definitions into the package level `flow/` directory, to help disambiguate their use.

**Types directories after changes**

`packages/react-native/`

- `flow/` — Longstanding location for Flow package/global library definitions. Not imported by source code.
- `src/types/` — Contains public typedefs useful to 3P consumers (TypeScript) (today, just `globals.d.ts` as one module). Not imported by source code.
- `src/private/types/` — Source type modules **in Flow**, that **are imported** by other files in `src/private/`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D75060846

fbshipit-source-id: 750a31e11b8f65579ce0831273df4d3b86335bdc
2025-05-22 10:34:04 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3dc58f04dd Remove JSExecutor::performanceNow() (#51513)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51513

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

# Changelog: [Internal]

This is replaced by `HighResTimeStamp::now()`, which is available in a dedicated smal `react/timing` module.

Reviewed By: lenaic

Differential Revision: D75185783

fbshipit-source-id: 2eb37ce25ca319f3c37def43de4e1db89e0f5be9
2025-05-22 10:16:45 -07:00
Ruslan LesiutinandFacebook GitHub Bot f03268b896 Replace DOMHighResTimeStamp alias in ReactCommon with new abstractions (#51512)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51512

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

# Changelog: [Internal]

Replaces `DOMHighResTimeStamp` alias completely in `ReactCommon` with `HighResTimeStamp`.

`DOMHighResTimeStamp` as a type is now expected to be used only in JavaScript.

I didn't update places where we explcitly use `std::chrono::high_resolution_clock`, since it is platform-specific and there is no guarantee that `std::chrono::high_resolution_clock` == `std::chrono::steady_clock`.

Also, places that are isolated and not part of the Web Performance APIs, such as Telemetry for Fabric, are not updates as part of this diff. Although these subsystems are also using `std::chrono::steady_clock` as a low-level representation, they are not sharing it with other parts of the React Native core.

Reviewed By: rubennorte

Differential Revision: D75185613

fbshipit-source-id: 889719368de163e6f529689df6cc16d816fde66c
2025-05-22 10:16:45 -07:00
Ruslan LesiutinandFacebook GitHub Bot aa7202861f Use HighResTimeStamp (#51511)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51511

# Changelog: [Internal]

There are multiple changes:
1. `PerformanceTracer` class, `TraceEvent` struct are moved to `tracing` namespace. These are parts of the Tracing subsystems of the jsinspector, this should bring more clarity and make things more explicit.
2. Added `Timing.h` class which defines conversion logic from `HighResTimeStamp` to absolute units that are expected by CDP.
3. `PerformanceTracer` will receive timestamps for Performance Web API entries in `HighResTimeStamp`.

Also, we will explicilty define a Tracking Clock time origin that will be epoch of the `steady_clock`. This aligns with the approach in Chromium and saves us from aligning custom DOMHighResTimeStamps that can be specified in performance.mark / performance.measure calls: these should not extend the timeline window. I've confirmed that this is the current behavior in Chromium.

Reviewed By: rubennorte, huntie

Differential Revision: D75185467

fbshipit-source-id: 37444392f12e8c9c4479c47c42b2c4badca7ecfd
2025-05-22 10:16:45 -07:00
Riccardo CipolleschiandFacebook GitHub Bot cd01ecbb6a Rename RNDEP_VERSION to RN_DEP_VERSION (#51537)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51537

To adhere more closely to our conventions, this change renames `RNDEP_VERSION` to `RN_DEP_VERSION`

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D75223248

fbshipit-source-id: 7ba44d7b358981bfbabe71c9876e3c865bdf9f50
2025-05-22 10:06:14 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 66ec4b3778 Add documentation to the SwiftPM structure (#51532)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51532

This change adds documentation to the SwiftPM structure to simplify changing it, especially if we have to port some changes from the cocoapods infra to the Swift PM implementation.

## Changelog:
[Internal] - Add docs

Reviewed By: cortinico

Differential Revision: D75217331

fbshipit-source-id: 153e87883d10ceed5a899c9a7dc362b4d2b7e510
2025-05-22 10:06:14 -07:00
Christian FalchandFacebook GitHub Bot 1477cc0dbd simplify logging in prebuild scripts (#51527)
Summary:
To reduce reduntant code by repeating the logging functionality in each JS module, this commit introduces a factory for creating a logger with a given prefix.

- Create factory `createLogger`
- Remove redundant log implementations
- Changed to use factory in hermes.js and ios-prebuild.js

bypass-github-export-checks

## Changelog:

[IOS] [CHANGED] - simplified logging in prebuild scripts

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

Test Plan: No tests so far.

Reviewed By: cortinico

Differential Revision: D75213656

Pulled By: cipolleschi

fbshipit-source-id: 8403cfb8ed76ca3a30cfaaeabcd61ac790e7f0a1
2025-05-22 10:06:14 -07:00
Alex HuntandFacebook GitHub Bot c937439e87 Add a basic Jest test to helloworld (#51534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51534

Aims to give us CI coverage of React Native's Jest preset, preventing future bugs like https://github.com/facebook/react-native/pull/51525.

Changes:
- Add a basic "it renders" Jest test to helloworld
- Add "Run Helloworld tests" step to `test-ios-helloworld` job in CI
- Also convert helloworld's `App.tsx` to TypeScript, as easiest way to unblock Jest JSX behaviour.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D75218901

fbshipit-source-id: 601155c59c4483696971df4c29d51549d97f49f2
2025-05-22 09:44:15 -07:00
Alex HuntandFacebook GitHub Bot 0acd0828aa Delete helloworld CLI tests (#51533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51533

Motivation:

- These fail, when ran from `packages/helloworld/` with the available `jest.config.js` file.
- These aren't currently run in CI.
- Don't seem high value (only covers `set-version` behaviour).

In the next diff, I will be adding a missing basic ReactTestRenderer test.

{F1978505710}

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D75218694

fbshipit-source-id: b22f725aeea49deac069a3268bcf30d4981d44b6
2025-05-22 09:44:15 -07:00
Nick LefeverandFacebook GitHub Bot 7674cd25a7 Add tests for @fantom_hermes_variant (#51457)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51457

See title

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74999954

fbshipit-source-id: bd140b2df71477e2966406ed612a00ff3ea6de8b
2025-05-22 08:52:09 -07:00
Zeya PengandFacebook GitHub Bot cb02744fa8 Move c++ native animated code to github (#51509)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51509

## Changelog:

[Internal] [Added] - Move c++ native animated code to github

⚠️ Note that this is not buildable in OSS yet ⚠️

Reviewed By: sammy-SC, rshest

Differential Revision: D75169430

fbshipit-source-id: 499ce209f815474f12007c3c74f81fe0c9ad3f86
2025-05-22 08:28:29 -07:00
louixandFacebook GitHub Bot 9b1a8ffac4 Implement size for URLSearchParams (#51507)
Summary:
The current `URLSearchParams` is missing the readonly `size` property defined in the [whatwg spec](https://url.spec.whatwg.org/#interface-urlsearchparams), and attempting to use it returns `undefined`. This PR adds it.

## Changelog:
[GENERAL] [FIXED] - Added size property to URLSearchParams implementation
<!-- 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/51507

Test Plan: I've modified the [tests](packages/react-native/Libraries/Blob/__tests__/URL-test.js) to assert the `size` property is correct.

Reviewed By: cipolleschi

Differential Revision: D75205273

Pulled By: rshest

fbshipit-source-id: 4b773dfc95693a5e084663258de50d161d6facff
2025-05-22 07:57:57 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 50ec74e2d5 fix(iOS): use getNextRootViewTag() on new architecture (#51522)
Summary:
Sometime ago Fabric specific root view tag allocator was added to the codebase: https://github.com/facebook/react-native/commit/7dec625ecabdc23cbae37e0034d29bb7bff17755 This PR makes sure to use it on iOS. It removes the need for additional conversions.

## Changelog:

[INTERNAL] [CHANGED] -  use getNextRootViewTag() on new architecture

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

Test Plan: CI Green

Reviewed By: javache

Differential Revision: D75204499

Pulled By: rshest

fbshipit-source-id: 12927887ae229c9fe89fa680f2bd55b5e378f9ae
2025-05-22 07:50:24 -07:00
Andrew CoatesandFacebook GitHub Bot d42d46306a Allow platforms to provide custom IsColorMeaningful implementation (#51478)
Summary:
On windows, not all PlatformColors are convertible directly into colorComponents.  For PlatformColors, the Color.isColorMeaningful may need to do something other than check the alpha component of the color.

Here I'm moving the implementation of isColorMeaningful into the HostPlatformColor implemantion to allow the host platform to customize the implemenation of isColorMeaningful.

## Changelog:

[INTERNAL] [ADDED] - Allow platforms to override isColorMeaningful

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

Test Plan: No behavior change in core. -- Will be used in react-native-windows to fix https://github.com/microsoft/react-native-windows/issues/14006

Reviewed By: NickGerleman

Differential Revision: D75088378

Pulled By: javache

fbshipit-source-id: 0a456bfe6be93098e3d8fa22390a971e14a4312b
2025-05-22 07:20:32 -07:00
Alex HuntandFacebook GitHub Bot 6044e01460 Move RefreshControlMock into Jest preset files (#51530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51530

Alternative to https://github.com/facebook/react-native/pull/50784.

`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.

Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset

Reviewed By: rshest

Differential Revision: D75215731

fbshipit-source-id: 1240344c4236288f31b16513f4df16766ad1e571
2025-05-22 06:00:49 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 88ca4bb1b7 Use native .isNaN instead of java.lang.Float.isNaN
Summary:
# Changelog:
[Internal] -

Based on review discussions in on a previous PR, it's a better style to use native Kotlin's `.isNaN` instead of `java.lang.Float.isNaN()`.

This makes sure that we uniformly do so throughout the codebase.

Reviewed By: fabriziocucci

Differential Revision: D75215199

fbshipit-source-id: 3c73638caa26717feb6bf0b08d1d79df6a6c58b2
2025-05-22 05:54:35 -07:00
Christian FalchandFacebook GitHub Bot be11f2ee77 fix wrong path in prebuild hermes check (#51526)
Summary:
When checking if we should download hermes artifacts, the path to the folder we're checking was wrong, causing hermes to always be downloaded.

This commit fixes this by renaming it from `Libraries` -> `Library`

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - fixed wrong path in prebuild hermes check

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

Test Plan: Test to run the prebuild script twice with the same hermes version. Hermes should only be downloaded the first time.

Reviewed By: rshest

Differential Revision: D75213331

Pulled By: cipolleschi

fbshipit-source-id: 6eab6befa8f6a15b2215ec5ec9446063ec395ef7
2025-05-22 05:48:04 -07:00
Christian FalchandFacebook GitHub Bot e40c1d265a add missing React-RCTSettings (#51523)
Summary:
Added missing module React-RCTSettings to the Swift package.

This was found when testing intergrating with a bare bones React Native project.

## Changelog:

[IOS] [FIXED] - add missing React-RCTSettings to Swift package

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

Test Plan: Run against a bare bones React Native project (not available in repo yet)

Reviewed By: rshest

Differential Revision: D75204445

Pulled By: cipolleschi

fbshipit-source-id: d9fcb27cc532846eece591152462ff9c88f82302
2025-05-22 05:48:04 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 11b16ed95d Automate the download of ReactNativeDependencies (#51505)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51505

to simplify how we download and manage the `ReactNativeDependencies.xcframework`, we added a script that is specular to the `hermes.js` script to handle the download of ReactNativeDependencies.

## Changelog:
[Internal] - Add script to automate the download of ReactNativeDependencies

Reviewed By: mdvacca

Differential Revision: D75151884

fbshipit-source-id: 2938c2919a24e496f5287e7ba31f87970c923d5d
2025-05-22 05:48:04 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 1d2d336dd1 Automate fetching of the latest nightly (#51504)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51504

This change simplify testing building React Native core using SwiftPM.

It let you use the HERMES_VERSION env var to automatically fetch the latest nightly.

To do so, just call:
```
HERMES_VERSION=nightly node script/ios-prebuild
```

## Changelog:
[Internal] - Handle the `HERMES_VERSION=nightly` case for iOS prebuilds

Reviewed By: rshest

Differential Revision: D75146936

fbshipit-source-id: 1933979b12d80eff005c9a1349df52602b254978
2025-05-22 05:48:04 -07:00
Phil PluckthunandFacebook GitHub Bot 480a4642e5 fix: Align TimerManager sequential ids and function error handling with web standard (#51500)
Summary:
Calls to create timers should return sequential ids (integers greater than zero in the spec's words). This regressed in the `TimerManager` implementation, which instead starts at zero inclusively.

This has two side-effects for code assuming a spec-compliant implementation of `setTimeout` and `setInterval`:
- Calls to `clearTimeout(0)` or `clearInterval(0)` will potentially cancel scheduled timers, although it's supposed to be a noop
- Predicates like `if (timeoutId)` will fail since they assume non-negative ids

The change in this PR is to align with WHATWG HTML 8.6.2 (Timers): https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers

> otherwise, let id be an [implementation-defined](https://infra.spec.whatwg.org/#implementation-defined) integer that is **greater than zero** and does not already [exist](https://infra.spec.whatwg.org/#map-exists) in global's [map of setTimeout and setInterval IDs](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#map-of-settimeout-and-setinterval-ids).

Specifically,
- we should return `0` to indicate that no timer was scheduled
- we should start generating timer IDs at `1` instead of `0`

This was previously raised in review comments here: https://github.com/facebook/react-native/pull/45092/files#r1650790008

The spec-incompliant behaviour was raised in an issue here: https://github.com/apollographql/apollo-client/issues/12632#issue-3075269978

This PR does not,
- add bounds checking on `timerIndex_` and add a search of an available id that isn't in the unordered map
- exclude `0` from being an accepted `TimerHandle` in `TimerManager::createTimer` or `TimerManager::deleteTimer` since the above bounds checking hasn't been added either

## Changelog:

[GENERAL] [FIXED] - Align timer IDs and timer function argument error handling with web standards.

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

Test Plan:
- Run `setTimeout` / `setInterval`; before applied changes the timeout for the first timer will be `0`
- Run `setTimeout(null)`; before applied changes the timer ID will be non-zero
- Run `setInterval(null)`; before applied changes an error will be thrown rather than `0` being returned

Reviewed By: cipolleschi

Differential Revision: D75145909

Pulled By: rshest

fbshipit-source-id: 6646439abd29cf3cfa9e5cf0a57448e3b7cd1b48
2025-05-22 04:43:27 -07:00
Dawid MałeckiandFacebook GitHub Bot 44b0f5560b Fix VirtualizeSectionList generic arguments (#51496)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51496

Fixes problem with generics passed to `VirtualizedSectionList` in generated types. The `flow-api-translator` creates a re-declaration for `export default` variables which shadows generics.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75141051

fbshipit-source-id: 260ef066038320eee3ffa93692f77f1eff5c9205
2025-05-22 03:41:25 -07:00
Nick LefeverandFacebook GitHub Bot f900551216 Use RN_SERIALIZABLE_STATE for conditional getDiffProps code (#51516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51516

See title

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75153818

fbshipit-source-id: 66c9dee3bfdc56ebcffdceb7302cdb7efea70c75
2025-05-22 03:11:56 -07:00
Panos VekrisandFacebook GitHub Bot 0c70c0166e pre-suppress errors for natural inference rollout in xplat/js (#51524)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51524

Links in error suppressions will point to the announcement post in Flow FYI.

Changelog: [Internal]

drop-conflicts

Reviewed By: marcoww6

Differential Revision: D75188177

fbshipit-source-id: 27ea1fbee848e9371e679cf423e30bc9608edea0
2025-05-22 02:50:47 -07:00
Ruslan LesiutinandFacebook GitHub Bot 0f128f8b2c Update debugger-frontend from f5506e6...7e19a54 (#51515)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51515

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

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

Reviewed By: vzaidman

Differential Revision: D75187678

fbshipit-source-id: 9dd404ba77e8ffab1a227b2ac949f62642958f95
2025-05-22 02:43:50 -07:00
Dawid MałeckiandFacebook GitHub Bot 67a63804f8 Remove tslint.json and tsconfig.test.json (#51498)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51498

Removes unnecessary config files which were added in D74804967

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75129416

fbshipit-source-id: 20868da100ed463e2e11f664bf04a383e24165ea
2025-05-22 00:49:04 -07:00
Luna WeiandFacebook GitHub Bot b8a4fb2a4d Add docs about react flags and debugging (#51521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51521

Changelog: [Internal] - Add docs about react flags and debugging

Reviewed By: lenaic

Differential Revision: D75152355

fbshipit-source-id: 4ef69d036e8b70a3903ba2d2dbda6530b1893d2b
2025-05-21 23:11:25 -07:00
generatedunixname89002005232357andFacebook GitHub Bot 089621ebbe Revert D65085733 (#51520)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51520
Changelog: [Internal] - revert Intersection Observer `root` due to bug

Reviewed By: lunaleaps

Differential Revision: D75186289

fbshipit-source-id: d644b1ef3261996596af6a243076f7172d500167
2025-05-21 21:08:11 -07:00
Panos VekrisandFacebook GitHub Bot 50ca7e5730 manual annotations in preparation of natural inference rollout in react-native, tools, etc.
Summary:
The Flow team is improving the way Flow infers type for primitive literals. This diff prepares the codebase for the new behavior by adding type annotations, or annotations of the form `'abc' as const`.

Changelog: [internal]

Reviewed By: marcoww6

Differential Revision: D75188179

fbshipit-source-id: be50990f23f79cf2d8dae7576af5190218adcafe
2025-05-21 20:06:46 -07:00
Yannick LoriotandFacebook GitHub Bot 12ced22f70 Improve error messages when enum members are missing (#51502)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51502

While working on a case for Editor on mac, it took me a while to figure out what enum was the root cause:

 {F1978470518}

Adding the blaming enum name in the error message would have made my life much easier.

## Changelog:

[GENERAL][Added] - Improve error messages when enum members are missing

Reviewed By: rshest

Differential Revision: D75141414

fbshipit-source-id: 3625d817b218788891252add225f8fffb99e3145
2025-05-21 14:31:25 -07:00
Jiawei LüandFacebook GitHub Bot 5489e18abc Revert D74892330: Use HighResTimeStamp
Differential Revision:
D74892330

Original commit changeset: 514ca23dde8e

Original Phabricator Diff: D74892330

fbshipit-source-id: e7e2a778fb12ad5214217d3efb48c9f74dfb80f3
2025-05-21 14:12:16 -07:00
Jiawei LüandFacebook GitHub Bot 65ef8fe6b8 Revert D72649815: Replace DOMHighResTimeStamp alias in ReactCommon with new abstractions
Differential Revision:
D72649815

Original commit changeset: 96bcfaf909d4

Original Phabricator Diff: D72649815

fbshipit-source-id: 491579e20fed41f0f31639f51d6051022ae9de55
2025-05-21 14:12:16 -07:00
Jiawei LüandFacebook GitHub Bot cbfa2ecc9a Revert D75006354: Remove JSExecutor::performanceNow()
Differential Revision:
D75006354

Original commit changeset: d41bf73238e9

Original Phabricator Diff: D75006354

fbshipit-source-id: 99c60268d8d829ff87a8486b0ca67a47bfb198b4
2025-05-21 14:12:16 -07:00
Panos VekrisandFacebook GitHub Bot 1eebb5aa11 Back out "add 'as const' annotations in preparation of natural inference rollout in xplat/js [4/n]"
Summary:
Original commit changeset: 67ee5673816d

Original Phabricator Diff: D75114154

Reviewed By: SamChou19815

Differential Revision: D75161840

fbshipit-source-id: 144fc0e488154b957f4f2a549c077a2784124849
2025-05-21 12:03:51 -07:00
Ruslan LesiutinandFacebook GitHub Bot 6e50603faa Remove JSExecutor::performanceNow() (#51481)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51481

# Changelog: [Internal]

This is replaced by `HighResTimeStamp::now()`, which is available in a dedicated smal `react/timing` module.

Reviewed By: lenaic

Differential Revision: D75006354

fbshipit-source-id: d41bf73238e9c6bf5c5a9509d60713ce11e6ea4a
2025-05-21 11:56:22 -07:00
Ruslan LesiutinandFacebook GitHub Bot 84fa745be6 Replace DOMHighResTimeStamp alias in ReactCommon with new abstractions (#50585)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50585

# Changelog: [Internal]

Replaces `DOMHighResTimeStamp` alias completely in `ReactCommon` with `HighResTimeStamp`.

`DOMHighResTimeStamp` as a type is now expected to be used only in JavaScript.

I didn't update places where we explcitly use `std::chrono::high_resolution_clock`, since it is platform-specific and there is no guarantee that `std::chrono::high_resolution_clock` == `std::chrono::steady_clock`.

Also, places that are isolated and not part of the Web Performance APIs, such as Telemetry for Fabric, are not updates as part of this diff. Although these subsystems are also using `std::chrono::steady_clock` as a low-level representation, they are not sharing it with other parts of the React Native core.

Reviewed By: rubennorte

Differential Revision: D72649815

fbshipit-source-id: 96bcfaf909d4a7a5bb2ecfdd76f9939f1645fb69
2025-05-21 11:56:22 -07:00
Ruslan LesiutinandFacebook GitHub Bot 0ec36c4073 Use HighResTimeStamp (#51454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51454

# Changelog: [Internal]

There are multiple changes:
1. `PerformanceTracer` class, `TraceEvent` struct are moved to `tracing` namespace. These are parts of the Tracing subsystems of the jsinspector, this should bring more clarity and make things more explicit.
2. Added `Timing.h` class which defines conversion logic from `HighResTimeStamp` to absolute units that are expected by CDP.
3. `PerformanceTracer` will receive timestamps for Performance Web API entries in `HighResTimeStamp`.

Also, we will explicilty define a Tracking Clock time origin that will be epoch of the `steady_clock`. This aligns with the approach in Chromium and saves us from aligning custom DOMHighResTimeStamps that can be specified in performance.mark / performance.measure calls: these should not extend the timeline window. I've confirmed that this is the current behavior in Chromium.

Reviewed By: rubennorte

Differential Revision: D74892330

fbshipit-source-id: 514ca23dde8e23fbe07faf673e765674f328f60e
2025-05-21 11:56:22 -07:00
Ruslan LesiutinandFacebook GitHub Bot 53ae567488 Add toChronoSteadyClockTimePoint and fromChronoSteadyClockTimePoint converters (#51455)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51455

# Changelog: [Internal]

The main idea is that subsystems who might use a different time origin (the starting point of the whole timeline of events), can use `toChronoSteadyClockTimePoint` method to get raw `std::chrono::steady_clock::time_point` and then offset it by some arbitrary epoch: be it unix time origin or `std::chrono::steady_clock::epoch`.

`fromChronoSteadyClockTimePoint` can be used to convert time stamps from external systems, like Hermes.

Reviewed By: rubennorte

Differential Revision: D74892329

fbshipit-source-id: 70f34ce99aead6e0552d87d310c4d6ea4653b8fe
2025-05-21 11:56:22 -07:00
David VaccaandFacebook GitHub Bot f44a0da019 Mark ReactRawTextManager as @LegacyArchitecture (#51506)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51506

ReactRawTextManager is not used in new architecture, this diff marks it as so

changelog: [internal] internal

Reviewed By: mlord93, cortinico

Differential Revision: D75150100

fbshipit-source-id: 868420e87dc80185d5a51299736ce2ed6a855fe9
2025-05-21 11:36:38 -07:00
Panos VekrisandFacebook GitHub Bot 2a068c6559 add 'as const' annotations in preparation of natural inference rollout in xplat/js [4/n] (#51488)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51488

The Flow team is improving the way Flow infers type for primitive literals.
Announcement: https://fb.workplace.com/groups/flowlang/permalink/1725180268087629/

This diff prepares the codebase for the new behavior by codemoding `as const` annotations.

## Repro steps

1/ Used steps in D73610163 to produce the code changes.

2/ Reverted files where `flow` errored:
```
flow status --show-all-errors > errors.log
node ~/fbsource/fbcode/flow/facebook/error-analyzer.js errors.log |
  awk -F':' '{ print $1 }' | sort -u | grep -v 'Total Error Count' |
  xargs hg revert --rev .
```

3/ Reverted files that did not improve error count in new Flow mode
```
# Run Flow before change
~/fbsource/fbcode/flow/facebook/flowd status --show-all-errors > errors-0.log
# Run Flow after change
~/fbsource/fbcode/flow/facebook/flowd status --show-all-errors > errors-1.log

# Compute error counts before and after
node ~/fbsource/fbcode/flow/facebook/error-analyzer.js errors-0.log | sort > errors-counts-0.log
node ~/fbsource/fbcode/flow/facebook/error-analyzer.js errors-1.log | sort > errors-counts-1.log

# Revert files with no change in error count
comm -12 errors-counts-0.log errors-counts-1.log | awk -F':' '{ print $1 }' | xargs hg revert --rev .~1
```

## Note to code owners

Due to the large number of errors involved in this rollout, adding `as const` was the most feasible large-scale automated solution. Ideally, a lot of these errors would be fixed by adding other appropriate type annotations. For example instead of annotating
```
type Shape = {type: 'circle', radius: number} | {type: 'square', side: number} | ...;
type ShapeKind = 'circle' | 'square' | 'triangle';
const circle = {
  type: "circle" as const,  // <-- annotation added here
  radius: 42,
};
shape.type as ShapeKind;
takesShape(circle);
```
a more appropriate annotation would be
```
const circle: Circle = { type: "circle"; radius: 42 };
...
```

Changelog: [Internal]

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D75114154

fbshipit-source-id: 67ee5673816da9625431e2a2466a1e0038386151
2025-05-21 08:42:30 -07:00
Ruslan LesiutinandFacebook GitHub Bot 380dd59e80 Disable DevSupport for Profiling builds with Fusebox (#51495)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51495

# Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75140274

fbshipit-source-id: 5793c3ec02282391c1d2aaa5e5c735ddb88cd889
2025-05-21 08:33:33 -07:00
Panos VekrisandFacebook GitHub Bot 5250b59ee2 manual annotations in preparation of natural inference rollout in xplat/js (#51487)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51487

The Flow team is improving the way Flow infers type for primitive literals. This diff prepares the codebase for the new behavior by adding type annotations, or annotations of the form `'abc' as const`.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D75114156

fbshipit-source-id: e3175af85cdd2388c3b45af4beb314f334e3f9b5
2025-05-21 07:07:18 -07:00
Vitali ZaidmanandFacebook GitHub Bot 9af86ab25b renamed CDPMessagesLogging to CdpDebugLogging (#51471)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51471

Changelog: [Internal] renamed CDPMessagesLogging to CdpDebugLogging

Reviewed By: robhogan

Differential Revision: D75062639

fbshipit-source-id: d5c51375ffe1f7275bc48cea514319ac97fe81d4
2025-05-21 06:53:25 -07:00
Vitali ZaidmanandFacebook GitHub Bot c97853aeb1 log large cdp messages
Summary:
Running with
```
DEBUG=Metro:InspectorProxy DEV=1 js1 run --no-tty-print
```
When a message larger than 100kb is send over the cdp, log it.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D75000887

fbshipit-source-id: 6f426ed4db7ac1996c4f26461a6e0d13c096e5cd
2025-05-21 06:53:25 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 36df97f500 Stop testing JSC (#51475)
Summary:
As next step of the JSC deprecation, we are removing the CI testing for the JSC engine

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: NickGerleman

Differential Revision: D75089216

Pulled By: cipolleschi

fbshipit-source-id: 3839914cb58e872ddd82089bd7cb1391ddda20c1
2025-05-21 03:31:42 -07:00
Mateo GuzmánandFacebook GitHub Bot bcfa5ca474 Migrate TextAttributes to Kotlin (#51448)
Summary:
Migrate com.facebook.react.views.text.TextAttributes to Kotlin.

`TextTransform` is exposed in the `textTransform` var setter, and there doesn't seem to be a clean way to avoid having to make the `TextTransform` class public again. I have limited its companion to keep it internal as much as possible.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.text.TextAttributes to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D74978129

Pulled By: rshest

fbshipit-source-id: ea0594f01738b8c8f4696434fe76974bbb9ff661
2025-05-21 03:25:11 -07:00
Chang Liu (RL)andFacebook GitHub Bot dc737cb909 Back out "Remove native animation fabric sync in JS and infinite animation loop workaround" (#51486)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51486

Original commit changeset: 5b313a5e8c07

Original Phabricator Diff: D74198568

Fix the issue that dropdown menus in HSR worlds menu are not clickable.

Reviewed By: xieswufe

Differential Revision: D75108344

fbshipit-source-id: d134ff9287929f8e1fc0995acf2b884d6a67131c
2025-05-20 20:58:50 -07:00
Luna WeiandFacebook GitHub Bot 3cb70bb6ad Introduce root to IntersectionObserver (#47394)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47394

## Changelog:

[General] [Added] - Support for observation `root` for Intersection Observer

Reviewed By: rubennorte

Differential Revision: D65085733

fbshipit-source-id: e67a74ace16c3f6f8ebba7eb811c1a9e0d559b0a
2025-05-20 14:20:25 -07:00
Ramanpreet NaraandFacebook GitHub Bot ff62ad1c04 Refactor RCTUnsafeExecute{On,Once}MainQueueSync utils (#51428)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51428

Just refactoring the control flow in these functions (in a separate diff). So, that the logic in subsequent diffs is easier to read: D74769326.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74940681

fbshipit-source-id: 7aabc722948666a13993a1feff7eeca8ef1403cf
2025-05-20 14:18:57 -07:00
Tomasz ZawadzkiandFacebook GitHub Bot bca7c5a553 Restore the possibility to extend LayoutAnimationController (#51479)
Summary:
In https://github.com/facebook/react-native/pull/50734, `LayoutAnimationController` was migrated to Kotlin and all of its methods are now marked as final.

However, this class is used and extended by `react-native-reanimated` in order to provide Layout Animations for Android on the Old Architecture. With all its methods being marked as final, the builds are failing.

This PR restores the possibility to extend `LayoutAnimationController`.

## Changelog:

[ANDROID] [FIXED] - Restored the possibility to extend `LayoutAnimationController`

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

Test Plan: I've checked that this PR fixes build errors caused by `LayoutAnimationController` in react-native-reanimated.

Reviewed By: cipolleschi, mdvacca

Differential Revision: D75079557

Pulled By: cortinico

fbshipit-source-id: beeb700cbad87362dda4b60941124562c4753815
2025-05-20 12:42:00 -07:00
Samuel SuslaandFacebook GitHub Bot 580de87124 stop sending events to Paper if C++ Animated is enabled (#51477)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51477

changelog: [internal]

when using C++ Animated, no need to send events to Objective-C Native Animated.

Reviewed By: lenaic

Differential Revision: D75066259

fbshipit-source-id: 224d15ba2f707f2272a4fec56e5b2685694c7809
2025-05-20 11:09:47 -07:00
Rubén NorteandFacebook GitHub Bot b1e8729f4d Fix incorrect view flattening when using a specific not fully transparent color (#51379)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51379

Changelog: [General][Fixed] Fix incorrect flattening / non-rendering of views with backgroundColor set to `rgba(255, 255, 255, 127/256)`

Fixes #51378.

## Context

When testing some unrelated things with Fantom is realized that the color for some text that I wasn't explicitly defining was being set to `rgba(255, 255, 255, 127)`, like here:

https://github.com/facebook/react-native/blob/249a24ac756275eadbe3b4df1ff9c974af1671d2/packages/react-native-fantom/src/__tests__/Fantom-itest.js#L540-L542

When digging a bit more about why, I realized that was actually the value for `UndefinedColor`. When looking a bit deeper, I saw that the value for that constant was being set like this:

```
using Color = int32_t;

namespace HostPlatformColor {
static const facebook::react::Color UndefinedColor =
    std::numeric_limits<facebook::react::Color>::max();
}
```

I'm not sure what the logic could've been here:
- Defining it as a value out of bounds for all valid colors? In this case, it's a 32 bit value so all the range of values are actually valid RGBA colors.
- Defining it as a fully opaque white? Seems dangerous for a default because you wouldn't be able to distinguish a explicitly set white color from a non-set color, relevant if you're seeing a white background color in a view on top of another view with any other background color.

The result of this existing logic was actually setting `UndefinedColor` to `rgba(255, 255, 255, 127)` because the alpha channel is defined in the first bits of the value, and `Color` being a signed int with 32 bits, the largest value is `01111....1`, so extracting the first 8 bits, you get 127.

## Changes

This changes the value set for the `UndefinedColor` constant (which is used, among other things, to determine if a view sets a background color, or otherwise could potentially be flattened).

The new value, instead of white with a 127/256 opacity, is black with 0% opacity (or simply the number 0 in `int32_t`).

Reviewed By: javache

Differential Revision: D74869311

fbshipit-source-id: 5582b4803b0b5c72cb3c1b33720c4542c5e3f1de
2025-05-20 10:38:05 -07:00
Rubén NorteandFacebook GitHub Bot 6581c69e10 Fix structuredClone test and added test to clarify behavior in IntersectionObserver (#51476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51476

Changelog: [internal]

When we added integration of IntersectionObserver in the event loop by default, we changed the timing of the observer notification:
- Before, it was scheduled synchronously from the `observe` call.  That means that, if you schedule another task immediately after the observe call, the order is IO callback then task.
- After, it was scheduled at the end of the current event loop tick. That means that, if you schedule another task immediately after the observe call, the order is task then IO callback.

This change in order wasn't accounted for in the tests for IO (which it's added here) and made a test for `structuredClone` break because it was using incorrect assumptions.

This fixes that test.

Reviewed By: rshest

Differential Revision: D75073118

fbshipit-source-id: 38ad2d03686891daf4caa836e1f597917910ddd0
2025-05-20 09:54:58 -07:00
Samuel SuslaandFacebook GitHub Bot 0ac82ef83a use C++ Native Animated from JS if enabled (#51337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51337

changelog: [internal]

When C++ Native Animated is used, we can't be using TurboModuleAnimated native module. This diff just add the check to make sure that if C++ Native Animated is used, it will be correctly referenced from JS.

Reviewed By: lenaic

Differential Revision: D74490166

fbshipit-source-id: 1b6de3227707168618052ff4ca6a02ca11337607
2025-05-20 06:48:11 -07:00
Samuel SuslaandFacebook GitHub Bot 8672faef87 implement SchedulerDelegateProxy::schedulerShouldSynchronouslyUpdateViewOnUIThread (#51334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51334

changelog: [internal]

Implement schedulerShouldSynchronouslyUpdateViewOnUIThread for C++ Native Animated. This simply passes along the data.

Reviewed By: zeyap

Differential Revision: D74739294

fbshipit-source-id: 7ef65e0b76004b9a2f6c3353169a6aa55ebeb44e
2025-05-20 06:48:11 -07:00
Samuel SuslaandFacebook GitHub Bot 8d3e971baa introduce an option to drive animations with folly::dynamic (#51470)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51470

changelog: [internal]

To support C++ Native Animated and prevent unnecessary conversion between `folly::dynamic` <-> and `NSDictionary`, a method to apply `folly::dynamic` changes needs to be exposed on RCTMountingManager.

Previously I tried to change existing method `synchronouslyUpdateViewOnUIThread` to take folly::dynamic instead of `NSDictionary`. However this requires a change where we would expose C++ API to Objective-C class only, breaking build system in open source. This approach was backed out in  D74881580.

In this diff, I take an alternative approach and expose two methods to apply animation changes:
- Keep the existing API `synchronouslyUpdateViewOnUIThread` as is. This way, Objective-C Native Animated does not need to change.
- Introduce new method for `[RCTSurfacePresenter schedulerDidSynchronouslyUpdateViewOnUIThread]` which accepts `folly::dynamic`. This is used by C++ Native Animated only

Reviewed By: javache

Differential Revision: D74885607

fbshipit-source-id: 124b8800c01deeb6d57af8f4c47bea46cc1bcd66
2025-05-20 06:48:11 -07:00
Rubén NorteandFacebook GitHub Bot 4ae86e651c Enable enableIntersectionObserverEventLoopIntegration feature flag by default (#51472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51472

Changelog: [internal]

This enables the integration of `IntersectionObserver` with the Event Loop by default.

Reviewed By: rshest, javache

Differential Revision: D74991641

fbshipit-source-id: 7f12d7d5413d12a6a7de53e9d6701195d48996dc
2025-05-20 05:40:00 -07:00
Rubén NorteandFacebook GitHub Bot 3aeba22dda Integrate IntersectionObserver in Event Loop (#51452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51452

Changelog: [internal]

This implements a long planned refactor of `IntersectionObserver` to have a proper integration with the Event Loop, which unblocks `FragmentRef` in React Native.

The existing integration doesn't integrate with the Event Loop, so the intersection determination doesn't happen as a step in the event loop but in 2 different moments:
1. When you start observing a new target, we check if there are any pending transactions for that target, and otherwise determine the intersection immediately and queue the notifications.
2. Using mount hooks, when a transaction for a surfaceId is mounted, we check intersections for all the observers in that surface.

This has an important problem:
* If you attach a observer on a target before the target is attached to the tree (something that `FragmentRef` will start doing soon), we don't have a pending transaction so we determine intersections immediately. In that case, it's always "not visible" because it's not attached, and then we immediately trigger a transition when mounted in the same tick.

To fix this, we can implement a step in the Event Loop the same way that `IntersectionObserver` does on Web. We would still wait for pending transactions to be mounted to determine intersection timing (the same way we do now, but now checking at the end of the current Event Loop tick), but the dispatch of initial notifications for target that won't change is done at the end of the tick instead of synchronously.

It also refactors the list of active observers as a list of shared pointers to `IntersectionObserver` objects, instead of as list of `IntersectionObserver` objects directly. This is necessary to build the list of pending observers (with stable references) while making sure the ownership stays in the list of active observers.

Reviewed By: javache

Differential Revision: D74883214

fbshipit-source-id: 24accf1dba48d13b5773950a5cbf9ea38f4a1745
2025-05-20 05:40:00 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 50ce8c77a7 fix: make RCTScreenSize take horizontal orientation into account (#51444)
Summary:
This PR improves `RCTScreenSize` to handle horizontal orientations. This was causing a flicker whenever opening a Modal in horizontal orientation. Currently, `RCTScreenSize` is used to supply initial state for `ModalHostViewState`:

https://github.com/facebook/react-native/blob/f1697544cd720df21bd7dc8ca993d95a41321e3f/packages/react-native/ReactCommon/react/renderer/components/modal/ModalHostViewState.h#L31

This works great in portrait mode, but causes onLayout the be called twice in horizontal orientation (first with screen size and then with actual size..)

## Changelog:

[IOS] [FIXED] - make RCTScreenSize take horizontal orientation into account

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

Test Plan: Open modal in horizontal orientation

Reviewed By: cipolleschi

Differential Revision: D74978651

Pulled By: rshest

fbshipit-source-id: f026e727b3529766de38dd31059c51b255f33e78
2025-05-20 04:54:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot f4250fa09e Refactor the prebuild script to use fetch instead of curl (#51398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51398

As a followup after the comment of D74565936 (https://www.internalfb.com/diff/D74565936?dst_version_fbid=727294986523938&transaction_fbid=1121452289999956), I refactored the code to use `fetch` instead of `curl`.

## Changelog:
[Internal] - Refactor the code to use Fetch instead of curl

Reviewed By: NickGerleman

Differential Revision: D74886699

fbshipit-source-id: 843e915a5b13f420e9036c32a421d47beb5b5860
2025-05-20 04:32:46 -07:00
Christian FalchandFacebook GitHub Bot 9371e20192 fixed build type when downloading hermes artifacts (#51283)
Summary:
Hermes build-type was hardcoded to 'release' in the previous version of the prebuild scripts.

This commit fixes this so that we can provide a build-type for hermes when downloading prebuilt tarballs.

- Cleaned up parameters in hermes.js
- Updated with buildType parameter when suitable
- Fixed some function names
- Updated version file so that it contains build type
- Removed version file when using a local tarball

## Changelog:

[IOS] [FIXED] - Fixed resolving build type when downloading hermes artifacts

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

Test Plan: No test-plan yet

Reviewed By: cortinico

Differential Revision: D74882001

Pulled By: cipolleschi

fbshipit-source-id: cfeed934023712e70f7d04c137e8611164120cec
2025-05-20 04:32:46 -07:00
Christian FalchandFacebook GitHub Bot e2f6ce4ddf fixed defines in package.swift (#51284)
Summary:
Our Cocoapods config has a list of defines that are used mostly when setting up pods:

- RCT_FABRIC_ENABLED
- USE_HERMES
- RCT_AGGREGATE_PRIVACY_FILES
- RCT_NEW_ARCH_ENABLED
- APP_PATH
- REACT_NATIVE_PATH
- RCT_SKIP_CODEGEN
- SWIFT_ACTIVE_COMPILATION_CONDITIONS
- USE_FRAMEWORKS
- USE_THIRD_PARTY_JSC
- HERMES_ENABLE_DEBUGGER
- REACT_NATIVE_DEBUGGER_ENABLED
- REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY

Out of these, only the following are used in objective-c/c code:

- USE_HERMES
- HERMES_ENABLE_DEBUGGER
- REACT_NATIVE_DEBUGGER_ENABLED
- REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY

This commit adds the required defines to the correct targets.

## Changelog:

Pick one each for the category and type tags:

[IOS] [FIXED] - fixed defines in package.swift

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

Test Plan: No test-plan yet

Reviewed By: cortinico

Differential Revision: D74872272

Pulled By: cipolleschi

fbshipit-source-id: 5d9a68c1d819409bc7400ade622f62bb332d0896
2025-05-20 04:32:46 -07:00
Christian FalchandFacebook GitHub Bot ccbf878fb8 cleanup logging (#51243)
Summary:
Cleaned up logging

- Added `prebuildLog` function to harmonize output
- Reduced output from creating headers

bypass-github-export-checks

## Changelog:

[INTERNAL] [CHANGED] - cleaned up iOS-prebuild logging

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

Test Plan: No tests required.

Reviewed By: cortinico

Differential Revision: D74569484

Pulled By: cipolleschi

fbshipit-source-id: b41d336320762a6adcb82faec4e6d633c6a9a8a5
2025-05-20 04:32:46 -07:00
Christian FalchandFacebook GitHub Bot 41d2b5de0a add download/extract hermes prebuilts (#51216)
Summary:
When running the prebuild script:

`node scripts/ios-prebuild.js`

The script will now try to resolve and download a prebuilt version of hermes:

1. Hermes artifacts will be extracted to the `./build/artifacts/hermes` folder to ensure that Package.swift can find a version to link against.
2. The script checks the environment variable `HERMES_ENGINE_TARBALL_PATH` and tries do expand the tarball into the artifacts folder from 1
3. If not found, the script reads the hermes version from either the hidden environment-variable `HERMES_VERSION` and tries to download a release-tarball or a nightly tarball for this version. If the version does not exist, the script will fail.

Also added some extra logging features to the script.

bypass-github-export-checks

## Changelog:

[IOS] [ADDED] - Added downloading of hermes artifacts when pre-building for iOS.

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

Test Plan:
1. Delete the `packages/react-native/.build` folder
2. Run the build script (provide a valid HERMES_ENGINE_TARBALL_PATH or a valid Hermes version (or nightly version)
3. Verify that the script successfully exits
4. Build the Package.swift in Xcode and verify that it finds and links the relevant Hermes files, verifying is done by the build succeeding.

Reviewed By: NickGerleman

Differential Revision: D74565936

Pulled By: cipolleschi

fbshipit-source-id: 5bd231999da24cfcce446150ac0fc1b5a4b6a4ae
2025-05-20 04:32:46 -07:00
Pieter De BaetsandFacebook GitHub Bot d6371bd6ac Improve naming of template args in bridging (#51418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51418

Improve readability

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74884371

fbshipit-source-id: 26b6966458097c8ac8d030629a1bee131418a34d
2025-05-20 03:57:43 -07:00
Mateo GuzmánandFacebook GitHub Bot 5596923189 Legacy Native Module e2e test (#51449)
Summary:
Found an issue with the legacy native module calls in old architecture (https://github.com/facebook/react-native/issues/51443) and got the idea of adding some simple e2e tests for the native modules so regressions like this can be captured moving forward.

This doesn't cover all methods, as not all of them are available for both Android and iOS, and also some of them are currently crashing, so it makes no sense to cover them all yet – but this can be used as a good starting point to increase coverage for essential APIs.

## Changelog:

[INTERNAL]  - Legacy Native Module e2e test

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

Test Plan:
```sh
cd packages/rn-tester && maestro test .maestro/legacy-native-module.yml -e APP_ID=com.facebook.react.uiapp
```

<img width="594" alt="image" src="https://github.com/user-attachments/assets/6237613d-f5dc-4d8a-9b12-0980177793eb" />

<img width="740" alt="image" src="https://github.com/user-attachments/assets/8bdef368-13ac-494c-a506-88fff01dc8d6" />

Reviewed By: cortinico

Differential Revision: D74978093

Pulled By: rshest

fbshipit-source-id: f9c7ba3ca5177eb3d3863d2b8252ac17f3d07aa0
2025-05-20 03:35:42 -07:00
React Native BotandFacebook GitHub Bot 5d30829eb4 Add changelog for v0.80.0-rc.2 (#51463)
Summary:
Add Changelog for 0.80.0-rc.2

## Changelog:
[Internal] - Add Changelog for 0.80.0-rc.2

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D75050745

Pulled By: rshest

fbshipit-source-id: 91739212e3e646acdb33c01e65ed6fff4330cf7e
2025-05-20 03:27:32 -07:00
riteshshukla04andFacebook GitHub Bot 89e6c72fd4 Correct Link for Networking (#51396)
Summary:
I noticed the link to networking in new app screen is wrong. So correcting it here

## Changelog:
[GENERAL][FIXED] - Fix Networking URL in New app screen

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

Test Plan: Click on the link to open

Reviewed By: arushikesarwani94

Differential Revision: D74886240

Pulled By: cortinico

fbshipit-source-id: 19ccf63e64f0e40df4a0ab4082299c654926e35d
2025-05-20 03:07:42 -07:00
Krystof WoldrichandFacebook GitHub Bot 6399caef63 fix(types): Reference global.d.ts using path not types (#51104)
Summary:
After https://github.com/facebook/react-native/pull/49516 TSC would not find the global types.

Types reference expect a package name but was given a path to a declaration.

TS doc: https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-path-

This PR changes `types` to `path` to fix the issue.

`dtslint` fails with `no-bad-reference` rule, but the `../src` lives in the same package in `react-native` package.

## 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] - Reference `global.d.ts` using `path` so they can be resolved by TSC

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

Test Plan:
Before the change with current RN 0.79.2 TSC would fail on resolving the global types (example from [Sentry RN SDK build](https://github.com/getsentry/sentry-react-native/commit/134d810cf95416091779806e00d3a3cc6cbace89)):

![Screenshot 2025-05-05 at 17 18 04](https://github.com/user-attachments/assets/b264c8da-aa21-49d8-9597-82586291a01a)

After the change to path TSC finds the global types.

Using TSC Version 4.9.5

Reviewed By: huntie

Differential Revision: D74208815

Pulled By: coado

fbshipit-source-id: 2fd51d79061ffb356c047604213cff7a425f167e
2025-05-20 00:52:43 -07:00
Nick GerlemanandFacebook GitHub Bot 9fe20d4ea3 Remove Measurement Placeholder Logic from Text ShadowNodes (#51465)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51465

Prior to D63303709 AttributedString could not represent formatting on an empty string, and so some text content was forcefully added to empty strings during measurement.

This is problematic in combination with Facsimile, where we directly render the layout we used during measurement, since empty text now has a random "I" in it.

Android's TextLayoutManager already knows how to interpret `baseTextAttributes`, and the placeholder is not needed. Other platforms should be updated to do the same, but that may be non-trivial to validate everywhere.

This diff removes logic from ShadowNodes to always inset a placeholder, and instead shims it in platform TextLayoutManagers which have not yet been updated to use `BaseTextAttributes`. That way, we don't force placeholders during measurement, and different platforms can incrementally unjank their code.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74770916

fbshipit-source-id: 7cf19db1a9a5cf68137bbff81b14ce5288235b2b
2025-05-19 18:15:39 -07:00
Nick GerlemanandFacebook GitHub Bot 0cd6a29981 TextSharedExamples and empty text E2E test (#51464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51464

Add a module of shared examples, like `TextInputSharedExamples`, to avoid copy/paste between these.

Modifies the empty test example a bit and adds an E2E test.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74780847

fbshipit-source-id: 30c2830ef0b638680fe75b4bcf9f138f5c01e190
2025-05-19 18:15:39 -07:00
Ruslan LesiutinandFacebook GitHub Bot ce4334233c Validate marks presense, if specified (#51389)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51389

# Changelog: [Internal]

This is the pre-requisite for the diff on top, which migrates performance-related classes to start using `HighResTimeStamp`.

We should be throwing `SyntaxError` if the specified mark name is not buffered. Like Chromium does:
 {F1978032319}

In this diff:
- `PerformanceEntryReporter::getMarkTime` is now public, ca be called by `NativePerformance` and returns `std::optional`.
- `NativePerformance` is responsible for validating that marks are present in the buffer, if their names are specified in `.measure()` call.
- Mark names take precedence over `startTime` and `endTime` values, so if they are specified and not available, then we will throw Error over `jsi` that will be catched on JavaScript side in `Performance.js`.

Reviewed By: rubennorte

Differential Revision: D74837812

fbshipit-source-id: ca2ba198c4c9e6e2d8d37f852affea667f1c174c
2025-05-19 15:24:36 -07:00
Nick GerlemanandFacebook GitHub Bot 5ac46bbb67 Fix random characters in comment in CSSTokenizer (#51417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51417

tsia

Changelog: [Internal]

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: joevilches

Differential Revision: D74837890

fbshipit-source-id: b07a30ea49c555f606dbb348c16d5c9f0a6e7b47
2025-05-19 13:58:54 -07:00
Eric RozellandFacebook GitHub Bot 2f761ee7c4 Do not flush Animated operation queue on mount for some feature flags (#51461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51461

We are trying to minimize the amount of non-determinism in flushing Animated operation queues. Initially the `ReactNativeFeatureFlags.animatedShouldSignalBatch` handled non-determinism on the native side, eliminating the use of native mount hooks to trigger operation batch flushes in the native module. However, there is additional non-determinism introduced by JS, where the set of pending Animated operations may be flushed as a result of an effect.

This change eliminates the flushing of Animated operations in the `useEffect` for `createAnimatedPropsHook.js`.

## Changelog

[Internal]

Reviewed By: yungsters, zeyap

Differential Revision: D75003751

fbshipit-source-id: 73c7bb02355b5f634f4a800f46ca5f529cd15ebd
2025-05-19 13:49:27 -07:00
Eric RozellandFacebook GitHub Bot 71caf2c557 Fix cross-over issue with animatedShouldUseSingleOp and animatedShouldSignalBatch (#51459)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51459

When using `animatedShouldSignalBatch` in combination with `animatedShouldUseSingleOp`, we were seeing an issue where the queue is not flushed deterministically. It would be flushed in an ad-hoc manner by `createAnimatedPropsHook.js`, but this was only if a mount happened to occur in the same frame.

Adding a deterministic queue flush mechanism to the logic handling `animatedShouldUseSingleOp` appears to resolve the issue.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D75002657

fbshipit-source-id: 51f50af0f22becf152da15a720ba70dfc158cdbf
2025-05-19 13:49:27 -07:00
kocburakandFacebook GitHub Bot a703d4cfc1 Typo fix in InterpolationAnimatedNode for debugging (#51460)
Summary:
I noticed a missing debugging text while working on https://github.com/facebook/react-native/issues/50496. It was a typo. I though I might as well send a PR.

## Changelog:

[Android] [Fixed] - Fixing a typo in InterpolationAnimatedNode for debug text.

<!-- 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/51460

Reviewed By: cortinico, shwanton

Differential Revision: D75005096

Pulled By: javache

fbshipit-source-id: 390452b2b0c6eabfa003b9c95719649c79444d3a
2025-05-19 11:02:47 -07:00
Nick LefeverandFacebook GitHub Bot 3306c3b962 Improve naming of the hermes variants (#51456)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51456

Going from:
* static_hermes_stable -> static_hermes
* static_hermes_trunk -> static_hermes_experimental

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74999979

fbshipit-source-id: f20b07af4c7fddc6d162937b4c96f0bf60902dbd
2025-05-19 10:08:10 -07:00
Ruslan LesiutinandFacebook GitHub Bot efcc798de9 Make processingStartTime and processingEndTime optional (#51390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51390

# Changelog: [Internal]

Ideally, these should not be optional, but these values are set at runtime.

Assertions added to validate that these values are set before reporting to `PerformanceEntryReporter`.

Reviewed By: rshest

Differential Revision: D74811439

fbshipit-source-id: 5e95931848263a58d977c07bac0eb18e53b91140
2025-05-19 08:34:29 -07:00
Rubén NorteandFacebook GitHub Bot 935cba270c Adds basic Fantom test for <Button> (#51380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51380

Changelog: [internal]

Adding more examples of tests for core components with Fantom :)

Reviewed By: lenaic

Differential Revision: D74874581

fbshipit-source-id: 1285c4d222cb811b51155871c245b1bd5889b47a
2025-05-19 04:00:31 -07:00
Nick LefeverandFacebook GitHub Bot 8d8cb718aa Fix NaN value comparison for TextInput component (#51422)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51422

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74915630

fbshipit-source-id: e7a556229d04f835b80752259d01330d0f4fcd62
2025-05-19 03:12:48 -07:00
Nick LefeverandFacebook GitHub Bot 995129c757 Fix NaN value comparison for Text component (#51421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51421

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74915629

fbshipit-source-id: 0c24426c5e04ab3fc6ee85a4ca53e6095f0d3fce
2025-05-19 03:12:48 -07:00
Nick LefeverandFacebook GitHub Bot f278c94a12 Fix accessibilityState serialization for props diffing of View component (#51420)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51420

The checked and unchecked state of the accessibility state property has to be serialized as `{ "checked": true }` and `{"checked": false}`.

This diff updates the serialization of the `accessibilityState` prop for the prop diffing on the View component.

This fixes the e2e test selectors for radio buttons.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74910744

fbshipit-source-id: 212b78e29a007744ac9283c7ec9b96ce80fd5681
2025-05-19 03:12:48 -07:00
Nick LefeverandFacebook GitHub Bot 01db5aa230 Support running tests with different hermes variants (#51451)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51451

This diff adds the `fantom_hermes_variant` pragma which can be set to:
- `hermes` for the default Hermes runtime used by RN
- `static_hermes` for the stable version of Static Hermes
- `static_hermes_trunk` for the "trunk" version of Static Hermes

Each variant will set up the correct build options for the runner and the correct compiler to use for the bundle.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74959718

fbshipit-source-id: 5d30c8e15ab052eb5686f26632f08ab42b5e68c7
2025-05-19 03:06:53 -07:00
Nick LefeverandFacebook GitHub Bot b1772de409 Make default mode used for benchmarks more obvious (#51446)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51446

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74958927

fbshipit-source-id: 245397c6e9a89a40e5c1260fcd624e5f6b9f7c8d
2025-05-19 03:06:53 -07:00
Nick LefeverandFacebook GitHub Bot 0769ddf85b Add documentation for passChildrenWhenCloning feature (#51447)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51447

Changelog: [Internal]

Document how the `passChildrenWhenCloningPersistedNodes` feature works.

Reviewed By: rshest

Differential Revision: D74961913

fbshipit-source-id: 6f412de36acc233a6bdf3d59548035ad884264a8
2025-05-19 02:43:33 -07:00
Nick LefeverandFacebook GitHub Bot b2775a4501 Add technical documentation for RSNRU (#51435)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51435

Changelog: [Internal]

Adding a technical documentation for the Runtime Shadow Node Referece Update (RSNRU) feature.

Reviewed By: rshest

Differential Revision: D74943809

fbshipit-source-id: cf5cc02adefa2635efb29e498747fc733711c2e4
2025-05-19 02:43:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2fa9c850f7 Avoid duplicated symbols for FollyConvert.h functions (#51393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51393

In D74738548 we copied RCTFollyConvert to Follyconvert and we moved it to a separate file.

The problem is that when we build react native, we now might have duplicated symbols, especially with prebuilds where the symbols are "flattened" together.

To fix this, we can have the old file point to the new file in order not to break our suers and have a single symbol anyway.

## Changelog:
[Internal] -

Reviewed By: sammy-SC

Differential Revision: D74883143

fbshipit-source-id: 98361307286cdc19c57b8f5c9f066aebea992896
2025-05-18 11:27:39 -07:00
Tim YungandFacebook GitHub Bot 55cf1e7fd3 RN: Unbreak Rules of React in RNTesterPlatformTestEventRecorder (#51441)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51441

Refactors `RNTesterPlatformTestEventRecorder` so that it does not use `useMemo` from an instance method.

Instead, this diff changes the module to export a hook by the same name, `useRecorderTestEventHandlers`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74950333

fbshipit-source-id: 6cb222a6ec077abadbdc7008e822645aba3d07f6
2025-05-18 08:08:24 -07:00
Tim YungandFacebook GitHub Bot 3371fb57b7 RN: Migrate to ESM - ReactDevToolsSettingsManager (#51440)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51440

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949984

fbshipit-source-id: e89eb482835cb3a3d3b997dc766803dd307a6b99
2025-05-18 08:08:24 -07:00
Tim YungandFacebook GitHub Bot 77f2cb27be RN: Migrate to ESM - BackHandler (#51439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51439

Migrates the `BackHandler` mock to use ESM to mitigate the existing lint warning.

I'm actually not sure this is even used anywhere… and the unmocked `BackHandler` is already using ESM.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949885

fbshipit-source-id: 7f37212db2125bb7afdbd342175e3beae6c7c14f
2025-05-18 08:08:24 -07:00
Tim YungandFacebook GitHub Bot 4434707967 RN: Suppress Lint Error in ReactNativePrivateInterface (#51438)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51438

The `ReactNativePrivateInterface` module needs to continue using `module.exports` in order to lazily import dependencies.

For now, we just suppress the `lint/no-commonjs-exports` lint rule.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949839

fbshipit-source-id: 295853be7fb988b879b6fd0b15ef31dd6e47cf85
2025-05-18 08:08:24 -07:00
Tim YungandFacebook GitHub Bot d798423c29 RN: Migrate to ESM - __flowtests__ (#51437)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51437

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74949792

fbshipit-source-id: d1372bb3a8615fe4544d67f04d26237b06515bad
2025-05-18 08:08:24 -07:00
Tim YungandFacebook GitHub Bot f1697544cd RN: Migrate to ESM - Libraries/Components/Image (#51434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51434

Migrates files to use ESM to mitigate the existing lint warning.

I am suppressing `RelativeImageStub` to preserve compatibility with the dynamic asset exports generated by Metro (i.e. not ESM with `default` exports).

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74943031

fbshipit-source-id: ac4b2afd96fe5446acb4452395d7cb42bb5a6c17
2025-05-17 23:17:37 -07:00
Tim YungandFacebook GitHub Bot 1218a8a6d0 RN: Delete ErrorUtils Mock (#51433)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51433

This `ErrorUtils` mock is dead code.

There is no `ErrorUtils` module in React Native. (Maybe there was once upon a time...)

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942884

fbshipit-source-id: 893458c4bc6f9ed29452579ce81915a52e6cd649
2025-05-17 17:18:55 -07:00
Tim YungandFacebook GitHub Bot 42d2b1f675 RN: Migrate to ESM - Libraries/Components/RefreshControl (#51431)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51431

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942842

fbshipit-source-id: bc68b1a3422e97bafc23516e429877a6624f37a3
2025-05-17 17:18:55 -07:00
Tim YungandFacebook GitHub Bot bfb177cd9e RN: Migrate to ESM - Libraries/Blob (#51427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51427

Migrates files to use ESM to mitigate the existing lint warning.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942792

fbshipit-source-id: a9f5b3e73d4c89f3dd499053d9b575c2eb3b9842
2025-05-17 17:18:55 -07:00
Tim YungandFacebook GitHub Bot a1da4b102c RN: Fix Existing Lint Warnings (#51426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51426

Fixes a bunch of ESLint warnings across the codebase.

The only remaining warnings are from the `lint/no-commonjs-exports` rule.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74942686

fbshipit-source-id: 384de34c7297f7f7fcff1827c8b2e46714a5cda7
2025-05-17 17:18:55 -07:00
Tim YungandFacebook GitHub Bot 84de8a075e RN: Delete @oncall Annotations (#51416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51416

Deletes `oncall` annotations from the `facebook/react-native` repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74902524

fbshipit-source-id: 32a6a5b2ff27281792d572f151e2b094d9a79029
2025-05-17 16:18:05 -07:00
Tim YungandFacebook GitHub Bot ba092bfaba RN: Add Missing @format Annotations (#51415)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51415

Adds the `format` annotation to all files that were missing them.

Also, adds `noformat` to generated files, and removed it from files that no longer need them.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74901034

fbshipit-source-id: 7e0b85ca8ee2de41278f3aa23cb03e9c266d9c28
2025-05-16 18:09:09 -07:00
Samuel SuslaandFacebook GitHub Bot ef17880fb0 remove return value from synchronouslyUpdateViewOnUIThread (#51402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51402

changelog: [internal]

the return value is unused. Let's remove it.

Reviewed By: zeyap

Differential Revision: D74884875

fbshipit-source-id: 83449ea298bdfbd7d083080aaa4d214bf246fcab
2025-05-16 16:46:37 -07:00
Tim YungandFacebook GitHub Bot ebe2a857f1 RN: Prefer Destructured Import for isValidElement (#51413)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51413

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895841

fbshipit-source-id: c1d3af40134a3721c9a7b676ee1f2c4a18612e4d
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot ab1ac938c9 RN: Prefer Destructured Import for createElement (#51409)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51409

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895837

fbshipit-source-id: b9d6082e4882d95f0d2aa1eed13b725edeb854cd
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot d78916d6ca RN: Prefer Destructured Import for cloneElement (#51410)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51410

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895844

fbshipit-source-id: 67f334981a1effce051c89e3d4643232aa22b4e9
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 0a41b70164 RN: Prefer Destructured Import for useReducer (#51411)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51411

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895840

fbshipit-source-id: 0a3d78d2871c3334b6e1b570744962a4d0168a9e
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 2e95617c2b RN: Prefer Destructured Import for use (#51408)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51408

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895838

fbshipit-source-id: 2cc369e168a7ee10aa4374717f817636841c372c
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 2f77e0d7fd RN: Prefer Destructured Import for useContext (#51412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51412

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895839

fbshipit-source-id: 9ab9fc8bdee6d1764ad86fa2165da32cb266174e
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 4c1477073f RN: Prefer Destructured Import for useMemo (#51407)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51407

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74894324

fbshipit-source-id: 7179f27f8ff1fb1b67745650b38d87cb2ea982b2
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 7d3c4c81b5 RN: Prefer Destructured Import for useCallback (#51406)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51406

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74894207

fbshipit-source-id: 00286b3dbaa6ce1e4d8d0f0f6c0dfef6505824c5
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 3e70714cff RN: Prefer Destructured Import for useEffect (#51405)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51405

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74894042

fbshipit-source-id: 93fbadb32e4a1225836db9d729d7bf502ebddd84
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 1bf167ce97 RN: Prefer Destructured Import for useRef (#51404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51404

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74893440

fbshipit-source-id: 9032f1e867a34b9cfa808f920a38f2630046eed7
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 00108a1ac3 RN: Prefer Destructured Import for useState (#51403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51403

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74891875

fbshipit-source-id: 981e85b5da84950c9e66e8d6b6496019e536711d
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 7af10f7a1a RN: Prefer Destructured Import for memo (#51401)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51401

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74889277

fbshipit-source-id: 0d42921758c5d6e108a4c82dbd52b7de89fbef00
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot d7d10a4f0d RN: Prefer Destructured Import for createContext (#51400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51400

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74888314

fbshipit-source-id: 9224c7c371471fe1fc42c8d42d4b37a4edadcacf
2025-05-16 16:33:18 -07:00
Tim YungandFacebook GitHub Bot 255c197baf RN: Prefer Destructured Import for createRef (#51399)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51399

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: rubennorte

Differential Revision: D74888097

fbshipit-source-id: a22ca4b791153ff0c2f4ab34ff8e3ce5e9280e0d
2025-05-16 16:33:18 -07:00
Ruslan LesiutinandFacebook GitHub Bot a7810f6995 Use std::optional instead of stub constexpr value for unset event start (#51252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51252

# Changelog: [Internal]

Removes usage of `DOM_HIGH_RES_TIME_STAMP_UNSET` stub contstexpr.

Instead, all events that were using it will now declare timestamps as optional. This is the pre-requisite before migrating these raw `double` values to `HighResTimeStamp`.

Reviewed By: javache

Differential Revision: D74248998

fbshipit-source-id: 9ef223420823d036db815f956e91ff3a712c9833
2025-05-16 12:20:42 -07:00
Ruslan LesiutinandFacebook GitHub Bot 535150bc96 Replace RuntimeSchedulerClock with HighResTimeStamp, HighResDuration (#51251)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51251

# Changelog: [Internal]

Replaces `RuntimeSchedulerClock`, which was an alias for `std::chrono::steady_clock` with previously defined single timestamp abstraction.

Reviewed By: rubennorte

Differential Revision: D74246459

fbshipit-source-id: 2f5e31eb2299856e7eb69f3915fec6597963a3b8
2025-05-16 12:20:42 -07:00
Ruslan LesiutinandFacebook GitHub Bot 5d9cc9e407 Define Bridging protocol for HighResTimeStamp and HighResTimeDuration (#51253)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51253

# Changelog: [Internal]

Defines bridging template for `HighResTimeStamp` and `HighResTimeDuration`.

When these values are passed to JavaScript over bridge, they will be converted to [`DOMHighResTimeStamp`](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp).

Also the other way around, when we list `HighResTimeStamp` or `HighResTimeDuration` as a type of TurboModule spec, it will expect number value from JavaScript.

Reviewed By: rubennorte

Differential Revision: D74506516

fbshipit-source-id: b5893cef4525793eb6fb6326055c261c7b84a724
2025-05-16 12:20:42 -07:00
Ruslan LesiutinandFacebook GitHub Bot a882f19974 Define HighResTimeStamp, HighResDuration (#51254)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51254

# Changelog: [Internal]

Defines single timestamp abstraction that will be used in C++ layer of React Native core:
Key primitives include:
- `HighResTimeStamp`: A class representing a specific point in time with high precision.
- `HighResDuration`: A class representing a duration of time with high precision.

Right now, all these just encapsulate `std::chrono::steady_clock` with no extra custom logic. We might revisit this in a future, once we decide to add support for [`Performance.timeOrigin`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin).

This diff also adds a `README.md` documentation file with a brief summary of the `react/timing` module.

Reviewed By: rubennorte

Differential Revision: D72796412

fbshipit-source-id: 7a92b61202f5e527e020edea2b756b0063971242
2025-05-16 12:20:42 -07:00
Andrew DatsenkoandFacebook GitHub Bot 3e1b9a9182 Fix order of ancestor titles (#51397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51397

Changelog: [Internal]

Fix order of ancestor titles.

Due to reverse being applied to the title order it flipped order on even contexts.

Reviewed By: rubennorte

Differential Revision: D74886550

fbshipit-source-id: c556af977f1abee633527151a5896c7d69bd0b48
2025-05-16 10:05:01 -07:00
Christian FalchandFacebook GitHub Bot 378f163a25 adding accessor for backing map (#51386)
Summary:
Expo is using the backingmap to be able to update properties in a fast and performant way in two overridden view manager subclasses (ViewGroupManager subclass is one of them).

This diff exposes the backing field via JvmName using the `internal_` prefix.

So Expo can keep on accessing the field as they were doing before. In the long run we should prevent them from accessing this property altogether but this would require a different API.

## Changelog:

[INTERNAL] -

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

Test Plan: Build with Expo modules

Reviewed By: cipolleschi

Differential Revision: D74884533

Pulled By: cortinico

fbshipit-source-id: e76673c794a6a125059633d29445d991d867b770
2025-05-16 09:54:48 -07:00
Dawid MałeckiandFacebook GitHub Bot cfd4932bb0 Fix generated types base on __typetests__ (#51383)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51383

This diff is a set of alignments/improvements in generated TS types. It includes:
- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under `Animated` namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
extending Fn Args generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode`,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowList` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to `globals.d.ts` to not include "dom" lib in the tsconfig - tries to compare globals with `lib.dom.d.ts` and produces many errors,
- exporting `SectionListData`,

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74807552

fbshipit-source-id: c5254ea0f701f3602b9d716faeb50ca1ab21b013
2025-05-16 09:50:51 -07:00
Pieter De BaetsandFacebook GitHub Bot 6d25274a52 Add unit test for NSNull behaviour in RCTTurboModule (#51370)
Summary:
Changelog: [Internal]

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

Reviewed By: NickGerleman

Differential Revision: D74815079

fbshipit-source-id: 87e72dfbe4841655bc1420e0e1d4377455bd5c1c
2025-05-16 08:47:55 -07:00
Pieter De BaetsandFacebook GitHub Bot 05dee839d8 Use methodSignatureForSelector instead of instanceMethodSignatureForSelector (#51366)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51366

We inherited this from the legacy native module infra, where we didn't have access to the module instance. Instead we can use the simpler `methodSignatureForSelector` which works correctly with OCMock (needed in D74815079).

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74817191

fbshipit-source-id: 6f3f741e9a78dea967a7654e6410ddacfad6d8a3
2025-05-16 08:47:55 -07:00
Nicola CortiandFacebook GitHub Bot 83ed4620d6 Add react-native/build to .gitignore
Summary:
This folder should have been added to the .gitignore.
Gradle is placing some build file over there in the latest version. This prevents it.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D74884379

fbshipit-source-id: 7da9682589c2bc161c1b0e3d741d1049b94505e4
2025-05-16 08:27:45 -07:00
Samuel SuslaandFacebook GitHub Bot ba6323b12e Back out "refactor native animated to pass folly::dynamic to fabric" (#51392)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51392

Original commit changeset: a3f1373bb0c6

Original Phabricator Diff: D74738548

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D74881580

fbshipit-source-id: 5809fa8336e555accbbff05faec33ea23ef312e3
2025-05-16 08:15:30 -07:00
Dawid MałeckiandFacebook GitHub Bot 2e0c2c6df1 Remove dtslint from type tests (#51382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51382

This diff replaces `dtslint` which is obsolete and [It is not intended to be used on its own, but as part of the definitelytyped set of packages](https://github.com/microsoft/dtslint) in favor of `tsc` type tests.

It's probably not necessary to have `test-typescript-offline` as tsc does that out of the box but doesn't test with multiple TS versions.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74804967

fbshipit-source-id: 4c581ba5debf6fd0bb8dcddbb95f3c85b05082d4
2025-05-16 08:08:25 -07:00
Christian FalchandFacebook GitHub Bot 2a0c1e6a9e make DevServerHelper open (#51323)
Summary:
Expo inherits from the DevServerHelper class, and needs it to be declared as open, the same goes for its public interface.

Expo is using this in `DevLauncherDevServerHelper` and overrides the methods:

- getDevServerBundleURL
- getDevServerSplitBundleURL
- getSourceUrl
- getSourceMapUrl
- isPackagerRunning

This PR fixes this by adding the open to the class and to the methods that should be open

## Changelog:

[ANDROID] [FIXED] - Made DevServerHelper and its method open so that they can be overridden.

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

Test Plan: Verify that we can build against Expo.

Reviewed By: cipolleschi

Differential Revision: D74876479

Pulled By: cortinico

fbshipit-source-id: 0037d6f7cee190a690ec3ec59896df04f46797b2
2025-05-16 07:52:01 -07:00
Jakub PiaseckiandFacebook GitHub Bot e4ef685dd7 Restore legacy semantics of modulesConformingToProtocol (#51381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51381

Changelog: [General][Fixed] Fixed codegen breaking when a subset of `modulesConformingToProtocol` fields was specified or when the value was string

D70822061 introduced a new way of defininf modules and components in codegen, but accidentally introduced two breaking changes to the legacy syntax:
- before that diff, in case of 1:1 mapping, the value of the fileds could be a string, while after, it required it to be an array
- before that diff, not all of the fields on `modulesConformingToProtocol` had to be defined in `package.json`, while after, it required all fields to be defined even if unused

Reviewed By: cipolleschi

Differential Revision: D74875251

fbshipit-source-id: 610103b508f1462b4de01725f9b0a87341571197
2025-05-16 05:59:05 -07:00
Samuel SuslaandFacebook GitHub Bot 82279bd981 refactor native animated to pass folly::dynamic to fabric (#51335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51335

## Changelog:
[iOS][Breaking] - synchronouslyUpdateViewOnUIThread now accepts folly::dynamic instead of NSDictionary. Use https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/utils/platform/ios/react/utils/FollyConvert.h#L14 for conversion.

pass folly::dynamic directly from native animated since Fabric consumes folly::dynamic for direct manipulation.
Additionally, remove return value from `synchronouslyUpdateViewOnUIThread` as it was never used.

Reviewed By: lenaic, zeyap

Differential Revision: D74738548

fbshipit-source-id: a3f1373bb0c643e8dcfb3e065edbcad42aa5d4d7
2025-05-16 04:27:59 -07:00
Sam ZhouandFacebook GitHub Bot 249a24ac75 Deploy 0.271.0 to xplat (#51376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51376

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D74836348

fbshipit-source-id: 33c354c4e2e59baf4815bc6c58fc3ca0066763df
2025-05-15 15:10:02 -07:00
Sam ZhouandFacebook GitHub Bot aecd6f1079 Make use of ref-as-prop support in ProgressBarAndroid (#51362)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51362

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814465

fbshipit-source-id: 7264e137040381621dddc2641fb31114273cfb28
2025-05-15 14:56:13 -07:00
Sam ZhouandFacebook GitHub Bot 6129d3c48e Make use of ref-as-prop support in TouchableBounce (#51369)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51369

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74815336

fbshipit-source-id: b45f563ee73bd53794319b0d9886d3214caf0544
2025-05-15 14:25:37 -07:00
Sam ZhouandFacebook GitHub Bot 0312e9968c Make use of ref-as-prop support in Pressable (#51374)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51374

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74808387

fbshipit-source-id: e724130f88018b2cbe581dfd7a700cfbb0700bb9
2025-05-15 14:07:32 -07:00
Sam ZhouandFacebook GitHub Bot ba86a8f863 Make use of ref-as-prop support in ScrollView (#51365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51365

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814123

fbshipit-source-id: 5f9410df1710f6a9c59fea7ce1f225b04b67d664
2025-05-15 13:59:31 -07:00
Sam ZhouandFacebook GitHub Bot 22a55dc9b9 Make use of ref-as-prop support in TouchableHighlight (#51364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51364

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814121

fbshipit-source-id: b9b9f09577da1ba59a4b858b538140ab34bdc60d
2025-05-15 13:49:17 -07:00
Sam ZhouandFacebook GitHub Bot 80482d6be3 Make use of ref-as-prop support in TextInput (#51367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51367

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74810113

fbshipit-source-id: cb841ab71ef582f10f478f2094837cf52d9cdf68
2025-05-15 13:48:05 -07:00
Joe VilchesandFacebook GitHub Bot 0c6a60e2fe Fix crash when link endOffset > line offset (#51372)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51372

I got notified that a recent change I made was causing a crash. This would happen when the endOffset of the link is larger than the end offset of the line. This can be repro'd with

```
/**
 * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
 *
 * flow strict-local
 * format
 */

import {useState} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';

export default function Playground() {
  const [state, setState] = useState(false);
  function toggle() {
    setState(old => !old);
  }

  return (
    <View style={styles.container}>
      <Text
        style={[styles.paragraph, state && {backgroundColor: 'red'}]}
        numberOfLines={3}>
        <Text>Bacon Ipsum{'\n'}</Text>
        <Text>Dolor sit amet{'\n'}</Text>
        <Text>{'\n'}</Text>
        <Text accessibilityRole="link" onPress={toggle}>
          http://www.google.com
        </Text>
      </Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    paddingTop: 24,
    backgroundColor: '#ecf0f1',
    padding: 8,
  },
  paragraph: {
    margin: 24,
    fontSize: 18,
    fontWeight: 'bold',
    textAlign: 'center',
  },
});
```

This was encountered already by NickGerleman in D46206673 (https://github.com/facebook/react-native/pull/37050) and the fix is fairly straightforward. I modified that fix to check for the endOffset as well.

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D74823458

fbshipit-source-id: 08fe81893f1c41d1934215515f88a6e0e546e705
2025-05-15 13:39:19 -07:00
Sam ZhouandFacebook GitHub Bot dcf45f73b9 Make use of ref-as-prop support in TouchableOpacity (#51363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51363

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74814122

fbshipit-source-id: 88a184f84b811ad527e004edf0eb2344db8fe266
2025-05-15 13:34:53 -07:00
Sam ZhouandFacebook GitHub Bot 8146c07365 Make use of ref-as-prop support in Image (#51368)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51368

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74813682

fbshipit-source-id: c6bb9e286049c8ed16375c3bbb674b26a34459ca
2025-05-15 13:33:33 -07:00
Sam ZhouandFacebook GitHub Bot 6b0aedc72e Make use of ref-as-prop support in Animated (#51371)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51371

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74815987

fbshipit-source-id: 1f19757d0219f1d62deb263edfa2a0cc562dd9d2
2025-05-15 13:29:55 -07:00
Samuel SuslaandFacebook GitHub Bot 685a60e6b4 merge RCTCxxUtils into utils module (#51348)
Summary:
## changelog
[iOS][Deprecated] - RCTFollyConvert.h is deprecated please use /ReactCommon/react/utils/platform/ios/react/utils/FollyConvert.h instead

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

move RCTFollyConverter to utils module so it is more accessible and delete RCTCxxUtils (which only held that one file). Also align on naming and drop RCT prefix.

Reviewed By: cipolleschi

Differential Revision: D74804476

fbshipit-source-id: 9a702b4823a986ed9849707cbb62d024e589bc1d
2025-05-15 12:31:34 -07:00
Sam ZhouandFacebook GitHub Bot 824e2deae0 Remove unused forwardRef import in SectionListModern (#51373)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51373

Followup of https://github.com/facebook/react-native/pull/51360

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D74825642

fbshipit-source-id: 1ba8f4f1934279a0be484b7809cadeacee03d59d
2025-05-15 11:45:46 -07:00
Christian FalchandFacebook GitHub Bot 9d11dcd3b0 make removeView open in ViewGroupManager (#51322)
Summary:
After conversion to Kotlin we could no longer override the removeView function since it is no longer open. The rest of this class can be overridden as before, but since functions are final by default this doesn't work for the new `removeView` function.

Expo is overriding the `removeView` functions in `GroupViewManagerWrapper.kt` (a lot of other ViewManager methods are also overridden here, but the `removeView` is introduced in `ViewGroupManager` and needs to be open as well. `GroupViewManagerWrapper.kt` is a replacement view manager that adds support for a delegate that will receive callbacks whenever one of the methods in the view manager are called.

This commit fixes this by making the removeView function explicitly open.

## Changelog:

[ANDROID] [FIXED] - Made function `removeView` open in Kotlin class

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

Test Plan: Verify that Expo can build against this class.

Reviewed By: javache

Differential Revision: D74807744

Pulled By: cortinico

fbshipit-source-id: 55f4b9deccb7d82ceb78be1d56c2b99a6f7e3ce9
2025-05-15 10:36:14 -07:00
Sam ZhouandFacebook GitHub Bot 2fa2c2071c Make use of ref-as-prop support in Text (#51361)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51361

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74810512

fbshipit-source-id: 0f902da8b487db353609b8de14f46a4cec23a46b
2025-05-15 10:01:54 -07:00
Sam ZhouandFacebook GitHub Bot 797705c00d Make use of ref-as-prop support in examples (#51358)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51358

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74812747

fbshipit-source-id: 7ded547ff62ca59d28abfc46a2f57466e2486acd
2025-05-15 09:55:32 -07:00
Joe VilchesandFacebook GitHub Bot d07b2a9d99 Remove useEditTextStockAndroidBehavior and resolve old android blur issue (#51338)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51338

There was some problems removing this feature flag earlier in that, on older android versions, we would try to focus the top most text input whenever any other text input would try to blur. This was ultimately and issue with how Android implements `clearFocus`. To fix this, lets block the focusability of all views while we clear the focus, then re-enable.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74760594

fbshipit-source-id: 2811c08ad6ed0855da0a4d7fca89fb08f84905c2
2025-05-15 09:50:32 -07:00
Joe VilchesandFacebook GitHub Bot f6378c3390 Back out "Clean up useEditTextStockAndroidFocusBehavior feature flag"
Summary:
Original commit changeset: 4682cf709aa2

Original Phabricator Diff: D73954790

I want to pick this into 0.80 so users can enable the feature flag so this doesn't break older versions

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74754010

fbshipit-source-id: 75dc96516b00035984741b43814d6fc7df6be0ac
2025-05-15 09:50:32 -07:00
Joe VilchesandFacebook GitHub Bot 7a04f985fd Back out "Fix issue where text inputs cannot blur on <= Android 8.1" (#51336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51336

Original commit changeset: 12dcaf0c9c35

Original Phabricator Diff: D74678847

I plan on reverting this so that we can in turn revert the diff that this diff fixed so we can pick it into RN 0.80 so that users have some fix on all versions. Right now 0.80 will be broken for older android devices

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74754164

fbshipit-source-id: fda17da3e9b61ca13f68f6681726ffb3f4f4f6c0
2025-05-15 09:50:32 -07:00
Nicola CortiandFacebook GitHub Bot 036e47ef9f Add a gradle task to download native 3p dependencies. (#51357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51357

This adds a `prepareNative3pDependencies` Gradle task that downloads and prepares all the 3p dependecies.
This will be needed before we download native deps for Fantom.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D74812436

fbshipit-source-id: 85796d0bcffaeef05d3a21d50f39954ef39ae92c
2025-05-15 09:31:42 -07:00
Sam ZhouandFacebook GitHub Bot e7e4cdd12e Make use of ref-as-prop support in SectionListModern (#51360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51360

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74812991

fbshipit-source-id: 9df7247bcdaed7a880ed0a75a5dcc33fce6f1d86
2025-05-15 09:17:45 -07:00
Rubén NorteandFacebook GitHub Bot 6e9a816940 Migrate test to use React.createRef insted of ref functions (#51345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51345

Changelog: [internal]

I just realized there were some tests where we didn't migrate to the new recommended pattern.

Reviewed By: rshest

Differential Revision: D74803018

fbshipit-source-id: b74468f1be35fba8d20d3b96ea2b55452a8175ee
2025-05-15 08:46:32 -07:00
Rubén NorteandFacebook GitHub Bot c7611e0d79 Add definition of setNativeProps in NativeDOM and use it if available (#51343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51343

Changelog: [internal]

This implements `setNativeProps` as a method in the `NativeDOM` C++ TurboModule, so we can replace usages of the method from `FabricUIManager`.

Reviewed By: javache

Differential Revision: D74800815

fbshipit-source-id: cf3c2d4b75c8d30e2528f96d4d63318e1366096a
2025-05-15 08:46:32 -07:00
Rubén NorteandFacebook GitHub Bot 89e21b866a Add missing setNativeProps tests (#51342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51342

Changelog: [internal]

Adding a test for `setNativeProps`, as it was missing because we couldn't test this when this test suite was implemented.

Reviewed By: fabriziocucci

Differential Revision: D74800816

fbshipit-source-id: 5f4721e61d1fb41a1898f56be35e6e3b12c9537e
2025-05-15 08:46:32 -07:00
Rubén NorteandFacebook GitHub Bot f49083db69 Replace usage of FabricUIManager methods with NativeDOM methods where available (#51341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51341

Changelog: [internal]

`measure`, `measureInWindow` and `measureLayout` have been defined in the `NativeDOM` C++ TurboModule for a while, but we didn't migrate the callsites in the DOM APIs to use them. This does that migration so we can remove a few `$FlowFixMe`s and use a cleaner API.

Reviewed By: javache

Differential Revision: D74800814

fbshipit-source-id: 117e4a8798036f2266e25cfc0931e91c148eaf52
2025-05-15 08:46:32 -07:00
Sam ZhouandFacebook GitHub Bot f4c9df5b38 Make use of ref-as-prop support in ActivityIndicator (#51356)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51356

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74808564

fbshipit-source-id: 68f55d31c07ceaf7282833bd4b04039e35987935
2025-05-15 08:30:33 -07:00
Sam ZhouandFacebook GitHub Bot a6a073765a Make use of ref-as-prop support in ScrollViewStickyHeader (#51355)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51355

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74810588

fbshipit-source-id: e979e8fb59d46be6dabc4327b47b20d635864aa9
2025-05-15 08:28:48 -07:00
Sam ZhouandFacebook GitHub Bot 28c375fb53 Make use of ref-as-prop support in Switch (#51353)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51353

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74809899

fbshipit-source-id: aaa4ef65ea4d4a20c9d9315ae95957e67484c2d8
2025-05-15 08:24:58 -07:00
Sam ZhouandFacebook GitHub Bot 83401b5d44 Make use of ref-as-prop support in Button (#51354)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51354

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74808349

fbshipit-source-id: a359278b5d516eb04fc88ea14c21b628f1053fec
2025-05-15 08:18:30 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 84c5f294e5 Fix Maestro E2E Tests (#51347)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51347

The new warnings on RNTester for the imports are covering the New Architecture list item, as you can see from the video.

This prevents maestro from clicking on the list item, and therefore the test fails.

{F1977997600}

## Changelog:
[Internal] - Fix E2E Tests

Reviewed By: cortinico

Differential Revision: D74803709

fbshipit-source-id: 747af57d04c96ba9b0ee642eb70ebf84bca3a3fa
2025-05-15 08:15:26 -07:00
Sam ZhouandFacebook GitHub Bot 34c9612f93 Make use of ref-as-prop support in DebuggingOverlay (#51352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51352

Make use of the React 19 feature so that we can remove the remaining `forwardRef` in react native.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74808254

fbshipit-source-id: 2f5f8d8dbe1bd5fcaba179bea5deed1592dc900c
2025-05-15 08:07:21 -07:00
Rubén NorteandFacebook GitHub Bot ca764bb511 Fix Fantom tests to avoid logging errors to test output (#51346)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51346

Changelog: [internal]

I saw that this test was logging errors to the console, which is considered a bad practice in Jest tests.

This prevents the logs from being printed in the test output and also adds assertions to verify what should be logged.

Reviewed By: rshest

Differential Revision: D74803463

fbshipit-source-id: 9c840a51e0e616a6bb15b7a40b3a6937fcb88b64
2025-05-15 05:27:02 -07:00
Chi TsaiandFacebook GitHub Bot bf26cf9c31 Add Hermes Root API in all other versions of Hermes (#51082)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51082

Introduces the `IHermesRootAPI` interface and a class implementation.
This root API will contain the previously static methods on
`HermesRuntime`.

The root API will serve as an entry point for users to create the Hermes
runtime and invoke methods that do not necessarily require a runtime.

Diff also moves all usages of the static methods on `HermesRuntime` to
getting the methods from the root API.

Multiple places are depending on Hermes, Hermes snapshot, and Shermes,
so this diff will also update all of these verions of Hermes at once.

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D71132855

fbshipit-source-id: fddda83517682779b4aef062efe84e29fd027fae
2025-05-14 17:14:47 -07:00
Nick GerlemanandFacebook GitHub Bot 0455f8ff53 Use PreparedLayoutTextViewManager when Enabled by Gating (#51182)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51182

Wires up the logic to use Facsimile View Manager when flags for prepared layout enabled.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D73161911

fbshipit-source-id: dc8824ecf8a712d5ff52cb8e2d63e85646297d40
2025-05-14 16:10:08 -07:00
Nick GerlemanandFacebook GitHub Bot 9394813689 Update PreparedLayoutTextView for new state type (#51301)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51301

The type of the state we pass has changed, since the original prototype. Need to update the Java side to reflect this.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74417253

fbshipit-source-id: 9159689e07d6f00504b5116a647c7afdf79005f4
2025-05-14 16:10:08 -07:00
Nick GerlemanandFacebook GitHub Bot 729b5ae7d9 Send prepared layouts in Android ParagraphState updates (#51184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51184

This change adds prepared layouts to `ParagraphState` on Android, for us to send to the client when gating is enabled

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D74356128

fbshipit-source-id: bd1dd5a457869075c561173de398ae1954a20ab5
2025-05-14 16:10:08 -07:00
Nick GerlemanandFacebook GitHub Bot 88de631d05 RN_SERIALIZABLE_STATE (#51185)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51185

Was running into issues with split Android ParagraphState, because a lot of code is tied to `#ifdef ANDROID`, which also builds for react-native-cxx.

This does that spliitting, and also introduces `RN_SERIALIZABLE_STATE` to replace previous ANDROID checks related to state serialization, so we can cofine that to just the Android platform. These changes are dependent on each other.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D74374376

fbshipit-source-id: ffb246ea2e16773f85de12209f2d88a95f8bb792
2025-05-14 16:10:08 -07:00
Nick LefeverandFacebook GitHub Bot 09832198cc Add role and screenReaderFocusable to prop diffing for View component (#51332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51332

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74747715

fbshipit-source-id: dc0380b0402d6023971a902f22d44b87bad0edde
2025-05-14 15:43:33 -07:00
Nick LefeverandFacebook GitHub Bot b6d7451291 Add missing borderEndColor prop diffing for View component (#51331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51331

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74744566

fbshipit-source-id: dc70310e47dfd5e29070519fa29b7af7ce6ffeab
2025-05-14 15:43:33 -07:00
Nick LefeverandFacebook GitHub Bot c301a25251 Add hitSlop prop diffing to View component (#51329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51329

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74741639

fbshipit-source-id: da7317c8800d2f25c69ecd7d3aca9b75350c2a56
2025-05-14 15:43:33 -07:00
Nick LefeverandFacebook GitHub Bot 07c64ba341 Add mixBlendMode prop diffing to View component (#51326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51326

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74739648

fbshipit-source-id: 3123f001cf7520d39bc3e92cee79b1baa17bd7cf
2025-05-14 15:43:33 -07:00
Nick LefeverandFacebook GitHub Bot d4ee62793d Add filter prop diffing to View component (#51325)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51325

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74738361

fbshipit-source-id: 71c704b1a977327c05d06e48f5572753c2847b38
2025-05-14 14:33:53 -07:00
Nick LefeverandFacebook GitHub Bot 37ad315ebc Add outline prop diffing to View component (#51321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51321

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74734893

fbshipit-source-id: f9b96c7bbfc791fa601dd8e4d8c1a4a27b94e36c
2025-05-14 14:33:53 -07:00
Joe VilchesandFacebook GitHub Bot 14e53e4845 Allow links in facsimile to be keyboard focusable (#51305)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51305

tsia, there is a lot of TextView specific API calls and instance checks in the delegate that need to be modified. Additionally, facsimile has some custom focusing logic we do not need if we have a delegate

I opted to just do a lot of instance specific logic using `is` . That seems easier for the time being with this text view that should replace our other text view over time.

I also expose a new way of focusing a span on facsimile, which may not be the best way to do that, lmk

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D74104419

fbshipit-source-id: 87c2259bb1698d93afad88ed91cb6322b90714f0
2025-05-14 14:24:21 -07:00
Ramanpreet NaraandFacebook GitHub Bot 99505e0c74 RuntimeExecutor: Make executeSynchronouslyOnSameThread_CAN_DEADLOCK more readable (#51324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51324

This diff just renames the mutexes, so that the method is more understandable.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74692506

fbshipit-source-id: 3e928ee0465ebed90f9c95ba3eaf28ea148b0e60
2025-05-14 14:22:59 -07:00
Chi TsaiandFacebook GitHub Bot 6766cf6285 Used shared_ptr<Runtime> in jsi testlib (#51081)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51081

After introducing the interfaces, runtime should be managed through a
shared pointer instead of a unique pointer.

This diff will change the usage in JSI testlib. Later diffs will
actually change the HermesRuntime usages.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D70113190

fbshipit-source-id: ea831dd8f79750851fd626afe0f1f5550142ac05
2025-05-14 13:44:49 -07:00
Chi TsaiandFacebook GitHub Bot f7f60dc794 Add castInterface API in JSI (#49604)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49604

Add JSI castInterface API. This provides a structured way to provide
optional APIs that may or may not be supported in all engines.

Every interface will have its own set of APIs. For instance, Hermes
will provide an interface (`IHermes`) containing Hermes-specific
APIs. In the future, an interface may be created to expose optional
APIs.

A runtime will inherit the interfaces of which the APIs are supported by
the runtime. Users who want to access a specific API may call
castInterface with the UUID of interface containing the API.

For backwards compatibility, the current `jsi::Runtime` will remain as
an object, and its functionalities will not be described by an
interface. However, this may be revisited later.

Changelog: [Internal]

Reviewed By: tmikov

Differential Revision: D68964360

fbshipit-source-id: 3efe61c5bc1a0fa113a192f4abad6d0f135b4301
2025-05-14 13:44:49 -07:00
Ramanpreet NaraandFacebook GitHub Bot e275da45ea Migrate surface view off RCTSurface (#51328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51328

RCTSurface is a legacy class. We might be able to kill it off.

Let's decouple RCTSurfaceView from RCTSurface.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D72582309

fbshipit-source-id: 0ffb6c2d08c5ee1eda6ae90955ccbc14f57036b7
2025-05-14 13:10:41 -07:00
Ramanpreet NaraandFacebook GitHub Bot 70eeb9f541 Migrate display link off RCTModuleData (#51327)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51327

RCTModuleData is a legacy class. We might be able to kill it off.

Let's deocuple bridgeless from RCTModuleData.

Changelog: [ios][Breaking] - Migrate RCTDisplayLink's API from RCTModuleData

Reviewed By: cipolleschi

Differential Revision: D72582306

fbshipit-source-id: 3e06f8b2036e1f65425c8312644cc92c076e958e
2025-05-14 13:10:41 -07:00
Nick GerlemanandFacebook GitHub Bot 2fe6c1a947 Include fallback line spacing in BoringLayout Metrics (#51304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51304

A potential source of truncation we previously experienced with D65171352 is difference in how TextView calculates line spacing with StaticLayout.

As of Android 13, this also appies to how TextView creates the metrics of BoringLayout. Oddly, this is not also applied to `BoringLayout.make()` (I think it ends up only impacting metrics), so we don't pass the flag there. See https://cs.android.com/android/_/android/platform/frameworks/base/+/78c774defb238c05c42b34a12b6b3b0c64844ed7

This could cause some theoretical truncation of simple single line text, so let's match TextView expectations.

Changelog:
[Android][Fixed] - Include fallback line spacing in BoringLayout

Reviewed By: javache, joevilches

Differential Revision: D74694483

fbshipit-source-id: 76dd980b827824f19ac755b3a9a1ec8912cd6ff1
2025-05-14 12:03:44 -07:00
Ruslan LesiutinandFacebook GitHub Bot 3148f0fb2b Deduplicate strings and provide std::string_view (#51098)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51098

# Changelog: [Internal]

Depending on the sampling rate, there could be lots of samples recorded. Right now, React Native requests the rate to be 10kHz. In reality, Hermes will be slower. How exactly slower will depend on the platform, because sampling profiler implementation is platform-specific. Windows peaks at ~500Hz, whereas iOS and Android that are using signals can reach up to 5kHz, based on my observations. This means that we could record sample approximately every 0.5ms.

For 30 seconds of sampling, we can get around 150k samples, every one of which may have up to 500 call frames (it is a custom limitation on Hermes side). Previously, every call frame could have a unique copy of function name string and url string.

This diff changes the approach to deduplicate strings, keeping a single copy for every unique string. A new abstraction `StringEntry` is added that will keep a const pointer to the string storage and an offset to the entry in this storage.

On React Native side, we are going to re-use these `std::string_view` and keep Hermes' `Profile` alive as long as they are used. We are going to achieve this by keeping unique pointer to the Hermes' `Profile` in React Native's Profile abstraction - `RuntimeSamplingProfile`, which is agnostic to the runtime.

Reviewed By: fbmal7

Differential Revision: D73106068

fbshipit-source-id: bdc7026e19c2677e39e20f14c8532080c5842026
2025-05-14 11:34:14 -07:00
Zeya PengandFacebook GitHub Bot 2d7342f8b4 Remove native animation fabric sync in JS and infinite animation loop workaround (#51264)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51264

## Changelog:

[General] [Changed] - Remove native animation fabric sync in JS and infinite animation loop workaround, when cxxNativeAnimated is enabled

when cxxNativeAnimated is enabled, we'll sync native animation props back to Fabric in native, when that happens we can remove the code in JS for same purpose

Reviewed By: lenaic

Differential Revision: D74198568

fbshipit-source-id: 5b313a5e8c07058f939134e9a6d60dcfa3b45842
2025-05-14 11:31:11 -07:00
Nick LefeverandFacebook GitHub Bot 109fe1394a Add missing view events to View prop diffing (#51318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51318

Adding parsing and diffing for
- `onClickCapture`
- `onPointerOutCapture`
- `onPointerOverCapture`

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74732872

fbshipit-source-id: 458f476f645970e2bee608e020b63c14e7affafe
2025-05-14 10:25:28 -07:00
Nick LefeverandFacebook GitHub Bot 85994c9f62 Add boxShadow prop diffing to View component (#51314)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51314

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74726605

fbshipit-source-id: 4a26d05af51a7d77f3aade9fbea3dff47b2ea4ed
2025-05-14 10:25:28 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 8d634267f8 Add E2E test for FabricInteropLayer (#51269)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51269

This adds an E2E Tests for the fabric interop layer in RNTester, so we can make sure that we don't break the mechanism to add children after the view is rendered

## Changelog:
[Internal] - Add E2E test for FabricInteropLayer

Reviewed By: sammy-SC

Differential Revision: D74590458

fbshipit-source-id: 9483d1ac648d923a8494d6402b9b2f971b9b2547
2025-05-14 10:11:03 -07:00
Christian FalchandFacebook GitHub Bot d53a60dd23 fix adding children (#51213)
Summary:
See https://github.com/facebook/react-native/issues/51212 - children aren't updated correctly in an old arch native view using the interop layer under Fabric.

This is caused by the mountChildComponentView method not updating the view, only adding the new view to a list that will be used on the next update to mount the child.

This commit fixes this by adding the same pattern as in unmountChildComponentView where children are inserted directly if the underlying paperview is available in the adapter - otherwise it uses the mounting list as before.

#Closes 51212

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - fixed adding child views to a native view using the interop layer

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

Test Plan:
**Previous output**:

<image src="https://github.com/user-attachments/assets/472b95e7-0921-46c9-be6a-f31759c0cd26" width="200px" />

**After fix**:

<image src="https://github.com/user-attachments/assets/554387cd-c264-483e-9c52-d9cd40b42601" width="200px" />

Reviewed By: sammy-SC

Differential Revision: D74471278

Pulled By: cipolleschi

fbshipit-source-id: 798f9e7be389359bd6e3aa1b6a6e9fb799fcb369
2025-05-14 10:11:03 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e9c8fee4ef Add Example for InteropLayer on RNTester (#51260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51260

This is a preparatory change that adds an example to RNTester for the Fabric interop layer on iOS.
This example is needed to create a Jest E2E tests that will make sure that the Fabric Interop Layer can properly add views as subviews.

We discovered the bug thanks to react-native-maps.

## Changelog:
[Internal] - Add Example for the Fabric Interop Layer to RNTester iOS

Reviewed By: cortinico

Differential Revision: D74579737

fbshipit-source-id: 0c1bbb06790b01313cd98aa4b7152d8aba0cded3
2025-05-14 10:11:03 -07:00
Vitali ZaidmanandFacebook GitHub Bot 337ae3bacb improve the message displayed when opening devtools while bundle builds (#51315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51315

Changelog: [General][Internal] improve the message displayed when opening devtools while bundle builds

Reviewed By: motiz88

Differential Revision: D74718454

fbshipit-source-id: 8b0cc9ca08dc98d766ddd5a3685d60b5d2800119
2025-05-14 09:11:34 -07:00
Pieter De BaetsandFacebook GitHub Bot 039a333df5 Remove any props set by default on View (#51225)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51225

We process a number of props by default in View, so we can provide some amount of compatibility with web API's. The way we then pass these to React means we end up setting a number of props with 'undefined' values. These props need to be diffed, sent to native (so string keys copied via JSI) and serialized to folly::dynamic (on Android) which is just wasteful.

Instead we can mutate the destructured props object and update/insert keys only as necessary to reduce the props payload size.

Changelog: [General][Breaking] View no longer sets any default accessibility props, which should not result in visible changes in behaviour but may affect snapshot tests.

Reviewed By: yungsters

Differential Revision: D74472767

fbshipit-source-id: 462a4495c0672d4bf1752a532acff49b14598e8e
2025-05-14 09:02:00 -07:00
Jakub PiaseckiandFacebook GitHub Bot ee9bd851ac Add a custom Jest resolver to opt out from handling "exports" in tests (#51307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51307

D72228547 added the `exports` field to the main `react-native` package, in which all imports from `./src/*` are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.

Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests

Reviewed By: huntie

Differential Revision: D74708701

fbshipit-source-id: 9a2714f4e6f78ffbad9e56b5bb92657c9ea908ef
2025-05-14 08:01:15 -07:00
Dawid MałeckiandFacebook GitHub Bot 4d0f2b2ca7 Align ImageStyle overflow prop type and compose function type (#51285)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51285

The `composeStyles` function should correctly determine the type of the input styles (`ViewStyle`, `ImageStyle`, `TextStyle`) base on the output type:

```ts
const combinedStyle8: StyleProp<ImageStyle> = StyleSheet.compose(
  // ts-expect-error
  composeTextStyle,
  composeTextStyle,
);
```

This diff adds generic type checking for `compose` function and fixes `ImageStyle` overflow prop type which accepted `scroll` property (which wasn't previously accepted in manual types) and which enables type system to distinguish `ImageStyle` from `ViewStyle` and `TextStyle`:

previous:
```ts
overflow?: 'visible' | 'hidden' | 'scroll'
```

current:
```t
overflow?: 'visible' | 'hidden'
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74574293

fbshipit-source-id: 751a44f2d3cd43055d93031343995f16ef87b185
2025-05-14 07:44:05 -07:00
Vitali ZaidmanandFacebook GitHub Bot b817b1a75b Update debugger-frontend from 3d17e0f...f5506e6 (#51316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51316

Changelog: [Internal] - Update `react-native/debugger-frontend` from 3d17e0f...f5506e6

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

Reviewed By: motiz88

Differential Revision: D74727700

fbshipit-source-id: b0923b7fd1a7c1d721b9b4322270507c07fcedaf
2025-05-14 07:23:45 -07:00
Vitali ZaidmanandFacebook GitHub Bot 46f91fd34d Improved the description of the error shown when a previous debugger is closed when a new one is opened (#51296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51296

Changelog: [General][Internal] Improved the description of the error shown when a previous debugger is closed when a new one is opened

Corresponding DevTools PR:
https://github.com/facebook/react-native-devtools-frontend/pull/162

Reviewed By: hoxyq

Differential Revision: D74657572

fbshipit-source-id: fa601aab22099bbf957e5e66420f94752f03b6f3
2025-05-14 07:23:45 -07:00
Nick LefeverandFacebook GitHub Bot 169525d33b Fix nativeID and testID prop diffing for View component (#51312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51312

The nativeID and testID prop mapping on the native Java side use full caps `ID` in the setter mapping. Fixing the props diffing result to use the right key in the result for both.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74724759

fbshipit-source-id: 4291a72cd3081981f4a25f16f8f2bef17230da54
2025-05-14 06:02:37 -07:00
Samuel SuslaandFacebook GitHub Bot 4c0607ee36 add test for ViewCulling when sibling in FLatList resizes (#51311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51311

changelog: [internal]

add a test case for view culling to cover a crash observed in production.

Reviewed By: lenaic, rubennorte

Differential Revision: D74720814

fbshipit-source-id: ed1246ccbaa0d0ab51a6073f20642c1c78872f30
2025-05-14 05:38:49 -07:00
Rubén NorteandFacebook GitHub Bot 7776122e2e Move playground tests to their own directory (#51310)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51310

Changelog: [internal]

Just a bit of separation between these and Fantom own tests.

Reviewed By: lenaic

Differential Revision: D74717487

fbshipit-source-id: f9d8667c823fcda7b1f3222803367c6b15d9309d
2025-05-14 04:01:31 -07:00
Ritesh ShuklaandFacebook GitHub Bot 68d6ada448 Fixed borderBottomEndRadius on RTL (#51229)
Summary:
Fixes https://github.com/facebook/react-native/issues/51193
## Changelog:
[ANDROID][FIXED] Wrong borderBottomEndRadius on RTL

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

Test Plan:
Tested with Arabic (RTL) and English(LTR)

English
<img src="https://github.com/user-attachments/assets/5bd1eca9-194c-4d83-b75f-689bc13d827b" width=200>

Arabic
<img src="https://github.com/user-attachments/assets/459320a0-6bb2-4585-97bb-bd4ded6ec399" width=200>

Reviewed By: cortinico

Differential Revision: D74709219

Pulled By: NickGerleman

fbshipit-source-id: 885bb84d97d73324983d044fd2874a457b40f646
2025-05-14 03:54:04 -07:00
megandFacebook GitHub Bot 777397667c fix issue #51297 which addresses allWarningsAsErrors type error (#51300)
Summary:
Resolved a build error [issue https://github.com/facebook/react-native/issues/51297](https://github.com/facebook/react-native/issues/51297) caused by assigning a Boolean to a Property<Boolean>.
Switched from direct assignment to using .set(...) to correctly configure allWarningsAsErrors from project properties.

## Changelog:

- Gradle fix: assign allWarningsAsErrors using .set() for Property<Boolean>

<!-- 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] - [ANDROID] [FIXED]

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

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

Test Plan:
Fixes build failure with React Native v0.79.2 and Gradle v8.0.
```
npm run start
npm run android
```
no more build errors

Reviewed By: cortinico

Differential Revision: D74706741

Pulled By: rshest

fbshipit-source-id: 31ec923f49a6da63fb5abb464bc38b99b1e8650a
2025-05-14 02:54:02 -07:00
Nick GerlemanandFacebook GitHub Bot 7f8b6566c4 Resubmit: Ensure that ShadowNode measure functions respect constraints (#51299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51299

## Resubmit

This change was backed out, due to the WinUI Fabric TextLayoutManager not respecting minimum size constraints, causing early debug assert. D74494087 was confirmed to fix this.

For more safety, we limit fatal debug assertsions to `ParagraphShadowNode`, and only log a native error for other ShadowNodes.

## Original

Android's TextLayoutManager may return widths greather than the max measure constraint.

Yoga will clamp these, but this sort of issue points to a logic bug, and creates issues when we are looking at caching text measurements based on constraint reuse.

Let's debug assert that we don't do that, and fix a case of rounding up at a pixel boundary, to ensure that it doesn't go above max width. This should theoretically be safe, since Yoga is already doing this clamping, which is what dictates final size of the TextView.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D74674460

fbshipit-source-id: 807d6629bb799a3b1a55e378a3243065055ce219
2025-05-13 19:49:20 -07:00
Nick GerlemanandFacebook GitHub Bot 1fe3ff86c3 Fix more text rounding bugs (#51303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51303

We do a lot of incorrect `cei()` in text measurement, compensated later by other incorrect bits.

There are a couple of interesting bits here:

A "desired width" is how large a hypothetical text layout would like to be. It is a floating point value, and to avoid truncation, a container must be larger than the desired width. So ceiling this is correct.

We are also passed available width, which may be an exact specification, not at a subpixel boundary. Ceiling this is totally incorrect, since Yoga will disregard our ceiled version, and we just created a layout, larger than our actual measure will be.

We must instead floor `availableWidth`, and we create our layout based off of that, to not give an extra physical pixel, that may not be given to us, if later layout rounding doesn't go our way. We then ceil `desiredWidth` earlier.

Finally, when we have an exact measuremode, we create the layout so that it uses guaranteedWidth`, but act as if it takes the full available space, per-contract, which may be a subpixel size larger. This means we cannot create layouts which cause truncation.

I used this change as an opportunity to clean up `createLayout()`, since we are gating anyways, to remove the duplicated paths, and to avoid the unnecessary `TextDirectionHeuristic` work for BoringLayout case, and since `StaticLayoutBuilder` already defaults to the heuristic we are manually setting.

Changelog:
[Android][Fixed] - Fix more text rounding bugs

Reviewed By: joevilches

Differential Revision: D74685353

fbshipit-source-id: 3700df657958c6efb46bfbbe674051d16a2b7c26
2025-05-13 19:49:20 -07:00
Nick GerlemanandFacebook GitHub Bot 3391959fd8 Resubmit: Expose Unsnapped Dimensions (#51298)
Summary:
X-link: https://github.com/facebook/yoga/pull/1811

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

## Resubmit

This was backed out due to being up the stack from another change that was backed out, but should be safe by itself.

## Original

We want to know if an artifact created during measurement can fully be reused after final layout, but the final layout is allowed to be slightly larger due to pixel grid rounding (while still allowing reuse). It's hard to tell after the fact, whether it is larger because of this rounding (though the measure is used), or if it may be a pixel larger for valid reasons.

We can expose the unsnapped dimensions of a node to give us this information, and to correlate measurement artifacts.

This is most of the time the same as the layout's measured dimension, though I don't think it's safe to use this, since anything else measuring the node after could clobber this (I think `YGNodeLayoutGetOverflow` may also be prone to this as a bug).

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D74673119

fbshipit-source-id: 06d2eb21e28b76458ec88f4dfcaec809707d0390
2025-05-13 18:21:04 -07:00
Joe VilchesandFacebook GitHub Bot 79c47987b7 Fix issue where text inputs cannot blur on <= Android 8.1 (#51302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51302

We got https://github.com/facebook/react-native/issues/51072#issue-3035616801 which demonstrates that if we have 2 text inputs on a screen we cannot blur them. If you try to blur any, focus jumps to the first one.

This seems to be a bug with Android's `clearFocus` per https://developer.android.com/reference/android/view/View#clearFocus(), this behavior is intended when we are not in touch mode, yet it happens regardless of what mode we are in on this version.

I modified this a bit to swallow `requestFocus` calls if we are in touch mode. This should be fine as no JS focus calls will go through this path. On hardware keyboard focus and focus from `clearFocus`

Changelog: [Android] [Fixed] - Fix bug where focus would jump to top text input upon clearing a separate text input.

Reviewed By: mlord93

Differential Revision: D74678847

fbshipit-source-id: 12dcaf0c9c350d3ed697ff81e8dfb205b7942119
2025-05-13 17:56:46 -07:00
Rubén NorteandFacebook GitHub Bot 5dd489190c Handle platform objects in structuredClone (#51257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51257

Changelog: [internal]

Fixes the semantics for `structruredClone` when dealing with platform objects (cloning the supported ones and throwing exceptions for the rest).

Reviewed By: hoxyq

Differential Revision: D74574857

fbshipit-source-id: 71b99e9659cf3fb4bed8f431e9b54d2f9f514706
2025-05-13 14:29:01 -07:00
Rubén NorteandFacebook GitHub Bot 6454d2f0db Introduce concept of platform objects and serialization (#51256)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51256

Changelog: [internal]

This is just in preparation for `structuredClone` handling the cloning (or not) of platform objects correctly.

It marks all existing Web platform objects in RN as such, and defines the clone method for `DOMRectReadOnly`, `DOMRect` and `DOMException`.

Reviewed By: hoxyq

Differential Revision: D74574856

fbshipit-source-id: 9e9647fcaafcc1d32fb36e5ee40167871572c544
2025-05-13 14:29:01 -07:00
Rubén NorteandFacebook GitHub Bot 1bb8546698 Introduce better mechanism for non-serializable built-ins in structuredClone (#51255)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51255

Changelog: [internal]

Just a small refactor of how we handle non-serializable built-ins in structuredClone

Reviewed By: hoxyq

Differential Revision: D74398113

fbshipit-source-id: 26211920fcd4cf11c5da278e213eaa2b6b9aa1b5
2025-05-13 14:29:01 -07:00
Rubén NorteandFacebook GitHub Bot caaa5c93fb Optimize structuredClone (#51250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51250

Changelog: [internal]

Optimizes the implementation of `structuredClone`.

Before:
| (index) | Task name                | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | ------------------------ | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'clone a string'         | '955.81 ± 1.45%'     | '902.00'            | '1095925 ± 0.01%'          | '1108647'                 | 1046239 |
| 1       | 'clone a basic array'    | '7684.79 ± 0.76%'    | '7542.00'           | '131980 ± 0.02%'           | '132591'                  | 130128  |
| 2       | 'clone a basic object'   | '6286.35 ± 0.53%'    | '6179.00'           | '161179 ± 0.02%'           | '161838'                  | 159075  |
| 3       | 'clone a complex object' | '22446.96 ± 0.32%'   | '22223.00'          | '44819 ± 0.03%'            | '44998'                   | 44550   |

After:

| (index) | Task name                | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | ------------------------ | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'clone a string'         | '793.81 ± 0.09%'     | '781.00'            | '1270316 ± 0.01%'          | '1280410'                 | 1259755 |
| 1       | 'clone a basic array'    | '5079.81 ± 2.13%'    | '4798.00'           | '206235 ± 0.03%'           | '208420'                  | 196858  |
| 2       | 'clone a basic object'   | '3823.37 ± 1.60%'    | '3636.00'           | '271030 ± 0.03%'           | '275028'                  | 261550  |
| 3       | 'clone a complex object' | '13095.13 ± 2.04%'   | '12499.00'          | '79701 ± 0.03%'            | '80006'                   | 76365   |

Reviewed By: hoxyq

Differential Revision: D74576514

fbshipit-source-id: f452dcfca6398dbfa40c5a41b77b0157777fa59b
2025-05-13 14:29:01 -07:00
Rubén NorteandFacebook GitHub Bot f7327bddb5 Add benchmark for structuredClone (#51249)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51249

Changelog: [internal]

This adds a basic benchmark for `structuredClone`, so we can optimize it in the following diff.

Baseline:

| (index) | Task name                | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | ------------------------ | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'clone a string'         | '955.81 ± 1.45%'     | '902.00'            | '1095925 ± 0.01%'          | '1108647'                 | 1046239 |
| 1       | 'clone a basic array'    | '7684.79 ± 0.76%'    | '7542.00'           | '131980 ± 0.02%'           | '132591'                  | 130128  |
| 2       | 'clone a basic object'   | '6286.35 ± 0.53%'    | '6179.00'           | '161179 ± 0.02%'           | '161838'                  | 159075  |
| 3       | 'clone a complex object' | '22446.96 ± 0.32%'   | '22223.00'          | '44819 ± 0.03%'            | '44998'                   | 44550   |

Reviewed By: hoxyq

Differential Revision: D71407319

fbshipit-source-id: ee1c89d6ba3fd2484b2f4115cc58dc4b08e04fa7
2025-05-13 14:29:01 -07:00
Rubén NorteandFacebook GitHub Bot 46b55d2146 Basic implementation of structuredClone (#51248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51248

Changelog: [internal]

This implements an initial version of `structuredClone`, but only to be used internally (not exposed as a global yet).

The goal is to use this implementation to fix the semantics of the `detail` field in performance entries, which is meant to be cloned.

Reviewed By: hoxyq

Differential Revision: D71407320

fbshipit-source-id: c7ec1229f9c3414d8b95110da6f65828d74b8c8e
2025-05-13 14:29:01 -07:00
Rubén NorteandFacebook GitHub Bot 955c61c738 Implement DOMException (#51247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51247

Changelog: [internal]

This implements an initial version of `DOMException`, but only to be used internally (not exposed as a global yet).

The goal is to make this available to `structuredClone`, which will be added after this.

Reviewed By: hoxyq

Differential Revision: D71407318

fbshipit-source-id: b28f11542749ceef6485ff934a712eed941a4545
2025-05-13 14:29:01 -07:00
Samuel SuslaandFacebook GitHub Bot 34e9cba764 fix crash in view culling where differentiator creates create instruction for existing view (#51294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51294

changelog: [internal]

Fix a crash where a node that is supposed to be culled doesn't get visited because culling context is not updated.
The differentiator would generate a create instruction for a view that already exists.

Stack trace for the crash:
```
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x0000000111740874 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001117aa2ec libsystem_pthread.dylib`pthread_kill + 264
    frame #2: 0x0000000180171ea8 libsystem_c.dylib`abort + 100
    frame #3: 0x00000001802b0144 libc++abi.dylib`abort_message + 128
    frame #4: 0x000000018029fe4c libc++abi.dylib`demangling_terminate_handler() + 296
    frame #5: 0x000000018006f220 libobjc.A.dylib`_objc_terminate() + 124
    frame #6: 0x00000001375d1964 INFRAFramework`meta_terminate() + 5468
    frame #7: 0x00000001802af570 libc++abi.dylib`std::__terminate(void (*)()) + 12
    frame #8: 0x00000001802b2498 libc++abi.dylib`__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 32
    frame #9: 0x00000001802b2478 libc++abi.dylib`__cxa_throw + 88
    frame #10: 0x0000000180093904 libobjc.A.dylib`objc_exception_throw + 384
    frame #11: 0x0000000180e6999c Foundation`-[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 268
    frame #12: 0x000000031a3bcfc8 XPLAT_6_Framework`-[RCTComponentViewRegistry dequeueComponentViewWithComponentHandle:tag:] + 528
    frame #13: 0x000000031a3ccdec XPLAT_6_Framework`RCTPerformMountInstructions(std::__1::vector<facebook::react::ShadowViewMutation, std::__1::allocator<facebook::react::ShadowViewMutation>> const&, RCTComponentViewRegistry*, RCTMountingTransactionObserverCoordinator&, int) + 356
    frame #14: 0x000000031a3ccc7c XPLAT_6_Framework`-[RCTMountingManager performTransaction:]::$_1::operator()(facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) const + 80
    frame #15: 0x000000031a3ccc20 XPLAT_6_Framework`decltype(std::declval<-[RCTMountingManager performTransaction:]::$_1&>()(std::declval<facebook::react::MountingTransaction const&>(), std::declval<facebook::react::SurfaceTelemetry const&>())) std::__1::__invoke[abi:ne190102]<-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&>(-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 40
    frame #16: 0x000000031a3ccbc8 XPLAT_6_Framework`void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ne190102]<-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&>(-[RCTMountingManager performTransaction:]::$_1&, facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 40
    frame #17: 0x000000031a3ccb94 XPLAT_6_Framework`std::__1::__function::__alloc_func<-[RCTMountingManager performTransaction:]::$_1, std::__1::allocator<-[RCTMountingManager performTransaction:]::$_1>, void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()[abi:ne190102](facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 44
    frame #18: 0x000000031a3cba1c XPLAT_6_Framework`std::__1::__function::__func<-[RCTMountingManager performTransaction:]::$_1, std::__1::allocator<-[RCTMountingManager performTransaction:]::$_1>, void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()(facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&) + 44
    frame #20: 0x000000032f219804 XPLAT_1_Framework`std::__1::function<void (facebook::react::MountingTransaction const&, facebook::react::SurfaceTelemetry const&)>::operator()(this=0x000000016d4f0c78, __arg=0x000000016d4f0a10, __arg=0x000000016d4f0978) const at function.h:989:10
    frame #21: 0x000000032f219668 XPLAT_1_Framework`facebook::react::TelemetryController::pullTransaction(this=0x00000003f4680f00, willMount=0x000000016d4f0c98, doMount=0x000000016d4f0c78, didMount=0x000000016d4f0c58) const at TelemetryController.cpp:39:3
    frame #22: 0x000000031a3c5b28 XPLAT_6_Framework`-[RCTMountingManager performTransaction:] + 544
    frame #23: 0x000000031a3c5864 XPLAT_6_Framework`-[RCTMountingManager initiateTransaction:] + 456
    frame #24: 0x000000031a3c5240 XPLAT_6_Framework`__42-[RCTMountingManager scheduleTransaction:]_block_invoke + 308
    frame #25: 0x0000000131f81b84 BOTTOMFramework`__RCTExecuteOnMainQueue_block_invoke + 40
    frame #26: 0x000000018017c788 libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #27: 0x0000000180197278 libdispatch.dylib`_dispatch_client_callout + 12
    frame #28: 0x00000001801b2fcc libdispatch.dylib`_dispatch_main_queue_drain.cold.7 + 24
    frame #29: 0x000000018018c1c4 libdispatch.dylib`_dispatch_main_queue_drain + 1184
    frame #30: 0x000000018018bd14 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 40
    frame #31: 0x0000000180427fec CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
    frame #32: 0x00000001804229f8 CoreFoundation`__CFRunLoopRun + 1920
    frame #33: 0x0000000180421e3c CoreFoundation`CFRunLoopRunSpecific + 536
    frame #34: 0x0000000190f62d00 GraphicsServices`GSEventRunModal + 164
    frame #35: 0x0000000185bcec98 UIKitCore`-[UIApplication _run] + 796
    frame #36: 0x0000000185bd3064 UIKitCore`UIApplicationMain + 124
    frame #37: 0x0000000115fbf0bc PRODUCTFramework`main + 200
    frame #38: 0x00000001114293d8 dyld_sim`start_sim + 20
    frame #39: 0x0000000111506b4c dyld`start + 6000
```

Reviewed By: rubennorte

Differential Revision: D74654157

fbshipit-source-id: 9181bcd28524c71d0ca4620bd630dc0baa172386
2025-05-13 13:59:51 -07:00
Tomasz ZawadzkiandFacebook GitHub Bot 4a8fda83e3 Fix deprecation message for BindingsInstallerHolder (#51295)
Summary:
This PR replaces non-existent `BindingsInstaller` with `BindingsInstallerHolder` in deprecation message for old variant of `BindingsInstallerHolder`.

## Changelog:

[GENERAL] [FIXED] - Fixed deprecation message for `BindingsInstallerHolder`

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

Reviewed By: javache

Differential Revision: D74656439

Pulled By: cortinico

fbshipit-source-id: b29ffabbc8f8218e13d305e9f5143f084fea8dea
2025-05-13 12:47:14 -07:00
Vincent RiemerandFacebook GitHub Bot 49002fa0b4 Expose ShadowNodeFamily to RawEvent (#51267)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51267

Changelog: [Internal]

This diff exposes the corresponding target ShadowNodeFamily to a RawEvent through a weak pointer. This is necessary for the upcoming move of pointer event interception from the JS to main thread.

Reviewed By: javache

Differential Revision: D74500630

fbshipit-source-id: 3bcf32855a004e091be64b6171dc65127375534c
2025-05-13 11:23:17 -07:00
Nicola CortiandFacebook GitHub Bot 4fda28ee4c Remove the "Newer Patch Available" logic from @react-native-bot (#51286)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51286

This bog action is not really useful. It's currently buggy and spams the user twice + we agreed it provide little value for the user.
Therefore we're removing this message for the time being.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D74645716

fbshipit-source-id: a6b8aa6aa3f3f101ad649d2590bbcb2dc80ee30a
2025-05-13 10:38:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 80eed4a4a7 Fix data race in usage of ShadowTreeRevisionConsistencyManager (#51293)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51293

# Changelog:
[Internal] -

Indirect consequence of https://github.com/facebook/react-native/pull/50484, TSAN started to detect a data race in some configurations.

It's possible to have the data race between the `ShadowTreeRevisionConsistencyManager` being set in `RuntimeScheduler` and it being already used in the executor thread (as these things are generally done from different threads).

Differential Revision: D74651070

fbshipit-source-id: bda49371d541815119f119e6986de39c21f9b374
2025-05-13 09:39:04 -07:00
Nicola CortiandFacebook GitHub Bot 1d5bbf1ccf Cleanup several warnings inside DisplayMetricsHolder (#51074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51074

While working on this class I noticed there are a number of warnings. Let's clean them up.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D74001269

fbshipit-source-id: 7e86ffdaf9c82ff5a165618813fa700f8e850a74
2025-05-13 08:44:29 -07:00
Mateo GuzmánandFacebook GitHub Bot 2c1726a073 Suppress unused androidx.core.content.res.use warning (#51272)
Summary:
Follow up from https://github.com/facebook/react-native/pull/51170, static code analysis shows androidx.core.content.res.use as unused, it looked pretty harmless to remove it as there was no context about its usage, but it caused some crashes.

I'm suppressing the warning here, plus adding an explanation on why it is needed to prevent a future developer from touching this file and causing the same regression.

## Changelog:

[INTERNAL] - Suppress unused androidx.core.content.res.use warning

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

Test Plan: Static code analysis should not show the import as unused.

Reviewed By: cortinico

Differential Revision: D74642726

Pulled By: rshest

fbshipit-source-id: 14cec4fe92f06827636410df4b88a3b7088abe52
2025-05-13 08:02:22 -07:00
Vitali ZaidmanandFacebook GitHub Bot f5fba73439 Update debugger-frontend from bc635fa...3d17e0f (#51292)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51292

Changelog: [Internal] - Update `react-native/debugger-frontend` from bc635fa...3d17e0f

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

Reviewed By: hoxyq

Differential Revision: D74648171

fbshipit-source-id: d2c45b6d27ab71a933a7c6d6fedc07abc13cf3d2
2025-05-13 07:39:12 -07:00
Nick LefeverandFacebook GitHub Bot 4166cc0dd8 Fix NaN value comparison for paragraph props diffing (#51289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51289

Because NaN is always different from NaN, these Float props were always included in the diff when set to NaN. This checks for the specific case where both the current and the prev prop value is NaN.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74647582

fbshipit-source-id: 7941dcc6a96bed13c2e43232606bd1f9a9179606
2025-05-13 07:02:10 -07:00
Samuel SuslaandFacebook GitHub Bot 3e3f8eade5 enable enableEagerAlternateStateNodeCleanup in tests (#51291)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51291

changelog: [internal]

enable enableEagerAlternateStateNodeCleanup in tests and remove workarounds.

Reviewed By: rubennorte

Differential Revision: D74643973

fbshipit-source-id: 00f9a6b36546fdea246b587e0e716c7aa76c6bbc
2025-05-13 07:00:26 -07:00
Nick LefeverandFacebook GitHub Bot 76ed662f1e Fix numberOfLines prop diffing for Paragraph component (#51277)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51277

The number of lines prop diffing was not being updated when enabling Props 2.0 and when set through the paragraph attributes. This diff fixes the typo that was causing the bug.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74619497

fbshipit-source-id: 2ad7d1629106ff16d511760694dcef0cafd9a96e
2025-05-13 05:27:17 -07:00
Nick LefeverandFacebook GitHub Bot cde792ae5e Add getDiffProps for TextInput component - Android text input props (#51276)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51276

This diff adds the Android specific props to the `getDiffProps` implementation and enables `TextInput` components for Props 2.0 use in the Fabric mounting manager

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74610303

fbshipit-source-id: c45abf2b272f5dfb50f4f1bad256e9130a808900
2025-05-13 05:27:17 -07:00
Nick LefeverandFacebook GitHub Bot 63c0287c83 Add getDiffProps for TextInput component - base text input props (#51275)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51275

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74610301

fbshipit-source-id: cbd3f8eab75838f8b68a668ec44d3e14aa591f25
2025-05-13 05:27:17 -07:00
Nick LefeverandFacebook GitHub Bot d08e668a1a Add getDiffProps for TextInput component - paragraph attributes (#51274)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51274

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74610302

fbshipit-source-id: ef1f946e0b7f7b51c06da167e5b8df2fc57933f6
2025-05-13 05:27:17 -07:00
Mateo GuzmánandFacebook GitHub Bot d7b056c198 Migrate JSTouchDispatcher to Kotlin (#51242)
Summary:
Migrate com.facebook.react.uimanager.JSTouchDispatcher to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.JSTouchDispatcher to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D74568593

Pulled By: rshest

fbshipit-source-id: 2ce0087ce96025fd85aab2d61806cc9ada1d68cd
2025-05-13 05:05:51 -07:00
Mateo GuzmánandFacebook GitHub Bot 436bddadda Migrate ModuleSpec to Kotlin (#51240)
Summary:
Migrate com.facebook.react.bridge.ModuleSpec to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.ModuleSpec to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D74568550

Pulled By: rshest

fbshipit-source-id: 15cedc9e97f95aa2582ce12c9086336c12564371
2025-05-13 05:03:09 -07:00
Vitali ZaidmanandFacebook GitHub Bot 9b4be02ae8 standardize error messages thrown from inspector proxy when connection is closed to debugger (#51227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51227

Standardize error messages thrown from inspector proxy when connection is closed to debugger and link to where they are used in `react-native-devtools-frontend`

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74484316

fbshipit-source-id: 7885bc5ea41397539814f97d764c9a376ef50eaa
2025-05-13 04:38:29 -07:00
React Native BotandFacebook GitHub Bot d06c28833f Add changelog for v0.80.0-rc.1 (#51266)
Summary:
Add Changelog for 0.80.0-rc.1

## Changelog:
[Internal] - Add Changelog for 0.80.0-rc.1

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

Test Plan: N/A

Reviewed By: arushikesarwani94

Differential Revision: D74592294

Pulled By: cortinico

fbshipit-source-id: 0f06d14ddec054bea2f09e9e34079516eb0f9256
2025-05-13 03:52:20 -07:00
Tim YungandFacebook GitHub Bot 12b2b56102 RN: Enable Hermes GC on Memory Pressure Warning (iOS) (#51271)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51271

Deletes the feature flag that was gating the new logic to invoke Hermes GC when iOS emits a memory pressure warning.

Changelog:
[iOS][Changed] - Hermes GC is now triggered in response to iOS memory pressure warning.

Reviewed By: fkgozali

Differential Revision: D74605206

fbshipit-source-id: b0753b15f5a30f37ed17bfebff0b491c7e7a6b59
2025-05-12 20:22:54 -07:00
Pieter VanderwerffandFacebook GitHub Bot e30ba139b6 Deploy 0.270.0 to xplat (#51278)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51278

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D74622474

fbshipit-source-id: 6735c16ed9677050dc476e30671448d52c5ed6dd
2025-05-12 19:39:07 -07:00
Mateo GuzmánandFacebook GitHub Bot d469cca4ba Make SoftAssertions internal (#51172)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.SoftAssertions).

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.SoftAssertions internal

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

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

Reviewed By: rshest

Differential Revision: D74368288

Pulled By: arushikesarwani94

fbshipit-source-id: 50e9559f7f15700ea9adfb03a260615e3b397a0c
2025-05-12 17:22:24 -07:00
Mateo GuzmánandFacebook GitHub Bot 23e693ad67 Make ReactSoftExceptionLogger internal (#51173)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.ReactSoftExceptionLogger).

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.ReactSoftExceptionLogger internal

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

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

Reviewed By: rshest

Differential Revision: D74368261

Pulled By: arushikesarwani94

fbshipit-source-id: 913d790eb64ffda6bb48ddf69dd5ab996cd363d9
2025-05-12 17:22:24 -07:00
HyunWoo LeeandFacebook GitHub Bot b2ffd34a39 Refactor ReactAndroid to use buildReadableMap, buildReadableArray DSL (#51145)
Summary:
This PR refactors the entire ReactAndroid package to replace manual `Arguments.createMap()…` and `Arguments.createArray()…` calls with the new Kotlin DSL helpers `buildReadableMap { … }` and `buildReadableArray { … }`. All eligible call sites have been migrated to the DSL, except in functions whose signatures explicitly declare or return WritableMap or WritableArray.

No runtime behavior changes are introduced; existing functionality and tests continue to pass unchanged.

## 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] [CHANGED] Apply Collections DSL on ReactAndroid package

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

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

Reviewed By: rshest

Differential Revision: D74401357

Pulled By: cortinico

fbshipit-source-id: 0f7b7dfbb7b495675bc4730bdf018666e9041884
2025-05-12 16:35:07 -07:00
Joe VilchesandFacebook GitHub Bot d362e496eb Fix string comparison when self has accessibility order reference (#51270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51270

I was informed that we could not reference ourselves with accessibility order when using `useID`. The reason for that ended up being because of this if statement which uses `==`. Note this worked with a normal string like `"foo"` but `useID` has ids like `"<<r0>>"` so I imagine the < and > made this break.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74601689

fbshipit-source-id: 25adc84248fbfcaff36607d18c170e6c8000cffb
2025-05-12 15:09:18 -07:00
Mofei ZhangandFacebook GitHub Bot af4cfbf03f repro edge cases for noEmit and module opt-outs (#33144)
Summary:
see test fixtures
 ---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33144).
* #33146
* #33145
* __->__ #33144

DiffTrain build for [fbe7bc21b9aa00afa230132b3f7eee6d2b5c94a7](https://github.com/facebook/react/commit/fbe7bc21b9aa00afa230132b3f7eee6d2b5c94a7)

Reviewed By: jackpope

Differential Revision: D74404265

fbshipit-source-id: 8a2fc2856e2da9ca7c63d8d49191c4f9e6b015b9
2025-05-12 13:51:47 -07:00
Fabrizio CucciandFacebook GitHub Bot 4918b30f49 Kotlinify ViewManagerRegistry (#51262)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51262

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D74571782

fbshipit-source-id: 4acec9b9c0801d863074b7a91fb116780f22929a
2025-05-12 13:50:10 -07:00
Ruslan LesiutinandFacebook GitHub Bot 7430ee0b99 Define precise return types for toJs conversions, instead of generic jsi::Value (#51224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51224

Changelog: [Internal]

We have a bunch of places where we rely on implicit conversion operators of `jsi::Value` and return some primitive type.

This doesn't work well with Bridging, because currently it doesn't take into account these implicit operator conversions: primitives won't be treated as primitivies, but rather as generic `jsi::Value`, which could be many things.

We should be explicit about return type in `toJs`, because it affects the type checking logic.

Reviewed By: javache

Differential Revision: D74478571

fbshipit-source-id: 0633159c5af3a02aafe14e2b137c133d4554a5f8
2025-05-12 12:38:58 -07:00
Ruslan LesiutinandFacebook GitHub Bot e403b510d0 Support bridging for Class methods return types (#51223)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51223

Changelog:
[General][Added] - Added support for bridging Class methods return types

Previously, this wouldn't work, unless you define your C++ implementation of the TM to have primitive return type that can be converted to JavaScript's type.

Reviewed By: javache

Differential Revision: D74478572

fbshipit-source-id: 75c7f589559394704446be1ebac245d38a5c4b2b
2025-05-12 12:38:58 -07:00
Mohamed SalamaandFacebook GitHub Bot 775c16d8b4 Revert D74567102: Migrate PromiseImpl to Kotlin
Differential Revision:
D74567102

Original commit changeset: 1a7a36a88c04

Original Phabricator Diff: D74567102

fbshipit-source-id: 30814137c711757079fdc574dd21715089b23a25
2025-05-12 10:11:02 -07:00
Pieter De BaetsandFacebook GitHub Bot 5413304530 Convert com.facebook.react.runtime.ReactHostImpl to Kotlin (#51017)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51017

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73846053

fbshipit-source-id: 98017000e8f10df4156b232bc8b5d6e132502ea5
2025-05-12 10:02:19 -07:00
Tim YungandFacebook GitHub Bot 7e5a2663f9 RN: Simplify createAnimatedPropsHook-test.js (#51234)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51234

Since `createAnimatedPropsHook-test.js` no longer needs to override feature flags, clean up some of the extra logic.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74535116

fbshipit-source-id: 09dd4c5085f6ee1cbf7d87ab2b7c320119e69651
2025-05-12 09:15:43 -07:00
Szymon RybczakandFacebook GitHub Bot 0925ee8545 Update Callstack description in ECOSYSTEM.md (#51226)
Summary:
Updates Callstack's description in `ECOSYSTEM.md` file.

## Changelog:

[Internal] - Updates Callstack's description in `ECOSYSTEM.md` file.

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

Test Plan: n/a

Reviewed By: NickGerleman

Differential Revision: D74483225

Pulled By: cortinico

fbshipit-source-id: baab5984b4580c0395c1a987a8890d8465e139f1
2025-05-12 08:14:45 -07:00
Rubén NorteandFacebook GitHub Bot 0766587b5d Add playground benchmark (#51259)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51259

Changelog: [internal]

We recently added `Playground-itest` as a quick way to test things with Fantom without committing them.

This does the same for benchmarks, so we can quickly answer questions like:

> is `key in obj` faster than `obj[key]`?

Without having to create a new benchmark manually.

Reviewed By: yungsters

Differential Revision: D74578297

fbshipit-source-id: d86604d459f15652d0c2e1ad16a99d011a1324ca
2025-05-12 07:59:59 -07:00
Evan BaconandFacebook GitHub Bot eedd60b9e6 chore: convert View to React 19 (#51023)
Summary:
- Convert View implementation to React 19:
  - Remove legacy `forwardRef` in favor of built-in `ref` prop.
  - Use `use` API instead of `useContext`.
  - Drop the extraneous `.Provider` for `TextAncestor` context.
  - 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
- Based on discussion with Nicola Carti and Riccardo Cipolleschi.
- I tried using flow `component` keyword but it's not enabled in this project. Given the `react-native` package is shipped untranspiled, it's probably safer to avoid newer flow types.
- Overall matched the component style of LogBox.
- It's unclear the exact right way to type a ref since it should be optional for external users of the component but required inside the component. Erring on the side of caution and using optional types so users don't get type errors when `ref` isn't defined.

## Changelog:

[GENERAL] [BREAKING] Upgrade `View` component to React 19.

<!-- 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/51023

Test Plan: - Type checks should pass.

Reviewed By: rshest

Differential Revision: D74546184

Pulled By: yungsters

fbshipit-source-id: b8257e3a75477c1117b19cd3f8e0843947b092ca
2025-05-12 07:14:22 -07:00
Samuel SuslaandFacebook GitHub Bot 5d7f35cd7c add test for BaseTextProps.writingDirection (#51245)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51245

changelog: [internal]

Add test to prevent https://github.com/facebook/react-native/issues/51235 from happening in the future.

Reviewed By: cipolleschi, rubennorte

Differential Revision: D74571453

fbshipit-source-id: 49d8400543516a861c9034a8be562ee81b323c25
2025-05-12 06:14:14 -07:00
Jakub PiaseckiandFacebook GitHub Bot c9f2055097 Fix generated types in @react-native/virtualized-lists being used without opt-in (#51246)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51246

Changelog: [General][Fixed] Fix generated types in react-native/virtualized-lists being used without opt-in

D71969602 introduces `exports` field to `package.json` files in `react-native` and `virtualized-lists`. In that diff, the `types` in `virtualized-lists` by default pointed to the new generated types without requiring the opt-in.

This fixes that by requiring the opt-in before using the generated types.

Reviewed By: huntie

Differential Revision: D74573321

fbshipit-source-id: fe05b0204a7200c1c91aac2614aa786bbbced2a5
2025-05-12 04:53:20 -07:00
Mateo GuzmánandFacebook GitHub Bot 25abb0acdf Migrate PromiseImpl to Kotlin (#51241)
Summary:
Migrate com.facebook.react.bridge.PromiseImpl to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.PromiseImpl to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D74567102

Pulled By: cortinico

fbshipit-source-id: 1a7a36a88c0499e5bc35dc37d276219aaf823c90
2025-05-12 04:48:28 -07:00
Nick LefeverandFacebook GitHub Bot a12d9f9d33 Fix image source size props in getDiffProps (#51222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51222

The size parameters are flattened in the source object in the Android image component. This diff converts the `size` object to `width` and `height` props directly set on the source object, fixing image source setting more than one image source.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74477884

fbshipit-source-id: f6064b4222d5eeafd5d74f9a2044babedd1e291b
2025-05-12 04:01:03 -07:00
Nick LefeverandFacebook GitHub Bot 3edc8d4e2c Add getDiffProps for Paragraph component (#51219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51219

See title

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74473177

fbshipit-source-id: 88d8d29a1640fd9217460ac04f172f821bb47a91
2025-05-12 04:01:03 -07:00
Nick LefeverandFacebook GitHub Bot 571a0ae7bc Add getDiffProps for Text component (#51218)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51218

See title

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74473101

fbshipit-source-id: 7303a8b184f42e8b264a2d37c5a6570252c64d54
2025-05-12 04:01:03 -07:00
Nick LefeverandFacebook GitHub Bot 0cdf5c16b4 Add updateDiffProps to BaseTextProps (#51217)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51217

Add helper method to build the prop diffing based on the BaseTextProps which are used by the Text and Paragraph props.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74473004

fbshipit-source-id: 0ae8c0c033ee136da3b8376bd485f8926310dcd4
2025-05-12 04:01:03 -07:00
zhongwuzwandFacebook GitHub Bot 3461e98936 Fabric: Fixes Text style prop 'writingDirection' not working on IOS New Architecture (#51238)
Summary:
Fixes https://github.com/facebook/react-native/issues/51235 .

## Changelog:

[IOS] [FIXED] - Fabric: Fixes Text style prop 'writingDirection' not working on  IOS New Architecture

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

Test Plan: Repro please see https://github.com/facebook/react-native/issues/51235

Reviewed By: sammy-SC

Differential Revision: D74564832

Pulled By: cipolleschi

fbshipit-source-id: 82702ec3b3e963c454e23a9b18543cae6f378749
2025-05-12 03:56:25 -07:00
Mateo GuzmánandFacebook GitHub Bot 77fccb73fe Make DeprecatedInNewArchitecture internal (#51201)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.common.annotations.DeprecatedInNewArchitecture).

This class in particular is not in the ReactAndroid.api, so I have the question on whether we should leave these annotations marked as public in case we are already reducing the visibility in another way (and If that's the case, we can close this PR)

## Changelog:

[INTERNAL] - Make com.facebook.react.common.annotations.DeprecatedInNewArchitecture internal

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

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

Reviewed By: rshest

Differential Revision: D74461086

Pulled By: cortinico

fbshipit-source-id: a58aa4794c91d632ce9f21a1021de7aa23e662f8
2025-05-12 03:46:30 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a3da4abb31 Remove react-native-exit-app from nightly testing (#51230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51230

react-native-exit-app last commit is from 2 years ago.
Removing it as it is broken with our nightly integration

## Changelog:
[Internal] - Remove react-native-exit-app from nightly testing

Reviewed By: cortinico

Differential Revision: D74527792

fbshipit-source-id: 0974b2d857aa6f76c59b0411204798a5fe48cffe
2025-05-12 02:36:39 -07:00
Jakub PiaseckiandFacebook GitHub Bot 32ce95cc01 Move transforms to build-types (#50982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50982

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73667539

fbshipit-source-id: dc9ab6f3efef17f8ffd58a854363b39a31ec59d7
2025-05-11 22:49:43 -07:00
Tim YungandFacebook GitHub Bot 77c1eb6154 RN: Migrate VirtualView to Feature Flags (#51233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51233

Migrates internal operational and experimental feature flags to React Native's feature flag system, in order to simplify integration of other infrastructure features (e.g. Fantom).

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D74534921

fbshipit-source-id: 1559cba4f208a554bb043a203f331062036c60de
2025-05-11 00:30:21 -07:00
Rubén NorteandFacebook GitHub Bot 996be87071 Add Playground test (#51220)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51220

Changelog: [internal]

Just a playground file to do quick tests in the Fantom environment.

For example, I just used it to know if Hermes supports `AggregateError`, which does:

```
  it('...', () => {
    console.log('AggregateError', global.AggregateError);
  });
```

{F1977824992}

Reviewed By: lenaic

Differential Revision: D74474870

fbshipit-source-id: cbe8a287738b09afe336ae479cc3105d1474e58b
2025-05-10 01:53:28 -07:00
Jan KassensandFacebook GitHub Bot 32fafdf980 cleanup shipped flag enableFabricCompleteRootInCommitPhase
Summary:
Flag was removed in {D74196673}, this cleans up the dynamic flag.

bypass-github-export-checks

Changelog: [internal]

Reviewed By: jackpope

Differential Revision: D74493584

fbshipit-source-id: 6ade542b7e1bd9c4367b7dbef4d2f1ec2d79d0df
2025-05-09 23:01:51 -07:00
Chi TsaiandFacebook GitHub Bot 891ee78f13 Add JSI APIs setRuntimeData and getRuntimeData (#50197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50197

Adds `setRuntimeData` and `getRuntimeData` JSI APIs. This provides a
convenient way for users to store some custom data associated with an
UUID.

For the default implementation of this feature, store the runtime data
in the global map that is shared between all VMs. This is done to keep
JSI lightweight and stateless, instead of adding data members.

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D71579532

fbshipit-source-id: 553e28fbf80c93e268d475860197a00d2c5bacf7
2025-05-09 21:07:15 -07:00
Chi TsaiandFacebook GitHub Bot 499fcfad53 Add UUID struct to JSI (#50270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50270

Add UUID struct to JSI. This will be used in the incoming changes, such
as identifying JSI interfaces and storing custom runtime data.

Changelog: [Internal]

Reviewed By: tmikov

Differential Revision: D71826382

fbshipit-source-id: e0d9bc20fb0f0e75407b9c88e731623e6a9975dd
2025-05-09 21:07:15 -07:00
Chi TsaiandFacebook GitHub Bot 316f86f29f Build JSI with C++17 (#50413)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50413

Build JSI with C++17.

Changelog: [Internal]

Reviewed By: dannysu

Differential Revision: D72079417

fbshipit-source-id: 3b7796a100db8db75a7089423be303312a4f0e10
2025-05-09 21:07:15 -07:00
generatedunixname89002005287564andFacebook GitHub Bot cda82f5dd8 fbsource//xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated:animatedAndroid (#51215)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51215

Reviewed By: javache

Differential Revision: D74463923

fbshipit-source-id: a2494b9f1881b40488d284f84dbaafc807c2a2e9
2025-05-09 17:19:14 -07:00
Nick GerlemanandFacebook GitHub Bot 71ef049065 Directly Trust Text Layout Width (#51206)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51206

When we create a layout from measure constraints, we do some processing of the width, to return a different one, potentially smaller than the layout width, sometimes using line width, and sometimes using the container width.

This logic has gotten spooooky over time, and after a series of changes, and bugfixes, now effectively does nothing!

1. Way back in 2020, yungsters made D21056031 introducing this logic to "shrink wrap" text which is wrapped.
2. "Shrink wrapping" is not how web works when text is wrapped, (though it is how it works when there is explicit newline), and https://github.com/facebook/react-native/pull/47435 later undid this change
3. https://github.com/facebook/react-native/pull/37790 made changes specific to the case of trailing newline, because the logic to "shrink wrap" did not handle correctly.

After D74366936, which changes width used for layout creation to correctly respect `Layout.desiredWidth`, we should be back to multiline layouts, with no paragraph whose lines take up more than container width, being "shrink wrapped", while not doing so when there is wrapping or ellipsization, like current behavior. The desired width also excludes the non-visible trailing whitespace.

It means we can remove all of this logic, while preserving the same behavior. Mismatched measure widths from those used in the intermediate layout may also result in issues for Facsimile (see example in last diff of stack).

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74368513

fbshipit-source-id: df5d7b773ad1888ebca1966ee4020a5c2ce7fd64
2025-05-09 12:52:36 -07:00
Mateo GuzmánandFacebook GitHub Bot 3a84d42aa1 Make RetryableMountingLayerException internal (#51171)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.RetryableMountingLayerException).

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.RetryableMountingLayerException internal

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

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

Reviewed By: rshest

Differential Revision: D74381780

Pulled By: cortinico

fbshipit-source-id: 6d7255318669ac8edd0010d9655a105e72adf011
2025-05-09 10:40:19 -07:00
Pieter De BaetsandFacebook GitHub Bot cf428bde1c Simplify StubViewTree creation (#51221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51221

In the case of an empty root node, we don't need `buildStubViewTreeWithoutUsingDifferentiator` to create the initial `StubViewTree`

When testing with Fantom, this caused an additional unnecessary clone of RootShadowNode.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D74472766

fbshipit-source-id: 076e859a6c5795e9026c7a5f8246a5658db4a94b
2025-05-09 08:36:44 -07:00
Nicola CortiandFacebook GitHub Bot 35c96007eb Fix the use import on DefaultStyleValuesUtil (#51214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51214

D74381864 caused a series of crashes to spike due to .IncompatibleClassChangeError: Class 'android.content.res.TypedArray' does not implement interface 'java.lang.AutoCloseable'

This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D74468593

fbshipit-source-id: 70c14bdba4f229d4f59a01da3b56cd4fec29752f
2025-05-09 08:24:52 -07:00
Vitali ZaidmanandFacebook GitHub Bot 0750b5f040 Improve the error thrown when a bundle fails to load (#51070)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51070

Changelog: [General][Internal][Breaking] When a bundle is failing to load throw an error of special type.

### Breaking
`didCompleteNetworkResponse` now throws an Error instead of throwing a string.

In dev, we use [lazy bundling](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md#__loadbundleasync-in-metro) which allows us to re-build only the parts of the app that are changed.

However the function that loads these lazy bundles in `loadBundleFromServer.js` for requests that reach `didCompleteNetworkResponse` with an error **throws a string representing the error message** which makes debugging very inconvenient because it lacks stack trace and error type. Throwing strings is not a standard practice. We better throw an error in these cases so it can be handled better.

Why a special type of error?
* As you can see in the "after", in the test plan below, even with a stack trace, it might be hard to know where this error originates from
* Also so extra information can be added on it. Currently adding "url"
* Also to support error handling based on the type of error

Reviewed By: hoxyq

Differential Revision: D73925027

fbshipit-source-id: a0f98d283ec8842696f1b87864fb63cb30c0c028
2025-05-09 07:24:37 -07:00
Rubén NorteandFacebook GitHub Bot 54499d8007 Ensure LogBox is disabled in Fantom tests (#51210)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51210

Changelog: [internal]

This adds a safety mechanism to Fantom tests to prevent LogBox from swallowing errors.

Now we validate that LogBox isn't installed when running tasks, so we can properly fix error reporting in tests.

Reviewed By: rshest

Differential Revision: D74464749

fbshipit-source-id: ef5e814b14aedbc681a4c7f9f8f60f454b239b6d
2025-05-09 07:11:24 -07:00
Rubén NorteandFacebook GitHub Bot 30363070a3 Define Fantom specific initialization module (#51211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51211

Changelog: [internal]

This modifies the setup for Fantom so:
1. We don't inject "InitializeCore" by default.
2. We define a default environment setup module for Fantom with good defaults (LogBox, etc. disabled).

We also migrate all existing tests to use the new module.

The goal of this is to prevent LogBox from being used in tests so we can properly fix error propagation in the work loop (so they're not intercepted by it).

Reviewed By: rshest

Differential Revision: D69003812

fbshipit-source-id: 00353b5055e3700943a08ea67f698d49e068555b
2025-05-09 07:11:24 -07:00
Rubén NorteandFacebook GitHub Bot 9494eee868 Extract RN environment setup to a specific module (#51209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51209

Changelog: [internal]

This refactors `InitializeCore` to extract the initialization logic to a separate configurable module.

By default, this does the same thing it does now, but the new module could be used without `InitializeCore` to set up the environment forcing disabling developer tools (e.g.: for testing in Fantom in development environments).

Reviewed By: rshest

Differential Revision: D69003811

fbshipit-source-id: ab85b10e4f21adccd8844a848d3272c407832031
2025-05-09 07:11:24 -07:00
Rubén NorteandFacebook GitHub Bot 7e640b5dd3 Add additional test cases for error handling in Fantom event loop (#51208)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51208

Changelog: [internal]

Adding a few more test cases to make sure error handling is fixed considering these use cases.

Reviewed By: rshest

Differential Revision: D74459974

fbshipit-source-id: 9a5865a9a09dd64535b4d38307db6c30f213b45f
2025-05-09 07:11:24 -07:00
Christian FalchandFacebook GitHub Bot 8f722937ff Add Package.swift file to prebuild React native core (#51197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51197

This change adds the Package.swift file that can finally build React Native core using SPM

## Changelog:
[Internal] - Add Swift PM file to uild React Native Core using SwiftPM

Test Plan:
prepare the repo with
```
node packages/react-native/scripts/ios-prebuilds.js
```
and by downloading the ReactNativedependencies from the CI

Then open the Package.swift file in Xcode. I successfully built:
- iOS
- iOS Simulator
- Mac Catalyst

Reviewed By: lenaic

Differential Revision: D74393435

Pulled By: cipolleschi

fbshipit-source-id: 7d61ad1d09444a0c16e865062ae448ec1e7ef5ad
2025-05-09 03:19:47 -07:00
Yannick LoriotandFacebook GitHub Bot 7a72037b37 Revert D74291373: Ensure that ShadowNode measure functions respect constraints
Differential Revision:
D74291373

Original commit changeset: 44166f2e4732

Original Phabricator Diff: D74291373

fbshipit-source-id: 54a4dd0af1c020caacebe6f02cb95eba0c95c62f
2025-05-09 01:45:16 -07:00
Yannick LoriotandFacebook GitHub Bot 435d2e84ef Revert D74292949: Expose Unsnapped Dimensions
Differential Revision:
D74292949

Original commit changeset: 05011c66a9a9

Original Phabricator Diff: D74292949

fbshipit-source-id: c6ca51c7b882950d54b6a43e206973774db40429
2025-05-09 01:45:16 -07:00
Ramanpreet NaraandFacebook GitHub Bot f00fbaedbe Revert D74361644: IntersectionObserver: Clean up shadow nodes after unobserve
Differential Revision:
D74361644

Original commit changeset: 1a5ccce1486a

Original Phabricator Diff: D74361644

fbshipit-source-id: 89792482a09501aed24c21627c44b3229a0c7a32
2025-05-08 22:11:27 -07:00
Ramanpreet NaraandFacebook GitHub Bot a55f430daa IntersectionObserver: Clean up shadow nodes after unobserve
Summary:
After unobserve is called, the shadow node actually isn't deleted from the `targetToShadowNode` WeakMap. So, if the element is kept around, the shadow node will leak.

We suspect this doesn't happen in practice. But, still it's good to just do this cleanup, just in case.

Changelog: [General][Fixed] Fix potential leak inside IntersectionObserver

Reviewed By: lunaleaps, yungsters

Differential Revision: D74361644

fbshipit-source-id: 1a5ccce1486aa200fc7318c689bfa887f713c284
2025-05-08 20:52:13 -07:00
Ramanpreet NaraandFacebook GitHub Bot e6516f2d7b IntersectionObserver: Migrate js infra to shadow node family (#51148)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51148

Intersection observer should not be holding on to shadow nodes.

This diff migrates the javascript infra to instead use families.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74262804

fbshipit-source-id: cc090be54f7312ce32b853ddf86567bb43e676b8
2025-05-08 20:52:13 -07:00
Ramanpreet NaraandFacebook GitHub Bot a4be563935 Migrate IntersectionObserverManager to shadow node family
Summary:
IntersectionObserverManager now uses families to manage IntersectionObservers.

This diff just migrates its apis to family too.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D74263375

fbshipit-source-id: d2e5fda327dfc75f0f711932626643d49cb3322f
2025-05-08 20:52:13 -07:00
Nick GerlemanandFacebook GitHub Bot 8ed5ccca62 Expose Unsnapped Dimensions (#51181)
Summary:
X-link: https://github.com/facebook/yoga/pull/1809

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

We want to know if an artifact created during measurement can fully be reused after final layout, but the final layout is allowed to be slightly larger due to pixel grid rounding (while still allowing reuse). It's hard to tell after the fact, whether it is larger because of this rounding (though the measure is used), or if it may be a pixel larger for valid reasons.

We can expose the unsnapped dimensions of a node to give us this information, and to correlate measurement artifacts.

This is most of the time the same as the layout's measured dimension, though I don't think it's safe to use this, since anything else measuring the node after could clobber this (I think `YGNodeLayoutGetOverflow` may also be prone to this as a bug).

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74292949

fbshipit-source-id: 05011c66a9a9480544313eb1dfe2c46bf7742bac
2025-05-08 17:45:16 -07:00
Nick GerlemanandFacebook GitHub Bot 99119a2104 Fix TextLayoutManager MeasureMode Regression (#51183)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51183

D58818560 tried to deduplicate some code, but introduced an error, where we no longer correctly incorporate the width MeasureMode into the text layout that we create, instead, passing `YogaMeasureMode.EXACTLY`.

In effect, this means the Android layout created always takes up the maximum allowable space, even if content is smaller. This is later masked, because our returned measure when `AT_MOST` is based on maximum line length, and the layout is then recreated when drawing a TextView, but means:

1. Attachments may not be positioned correctly, when using a non-left-aligned paragraph alignment
2. Directly drawing the layout shows the wrong thing

Changelog:
[Android][Fixed] - Fix TextLayoutManager MeasureMode Regression

Reviewed By: rshest

Differential Revision: D74366936

fbshipit-source-id: 3eda8c716ba9790a61c2da19023e140afbb6971d
2025-05-08 16:18:01 -07:00
Nick GerlemanandFacebook GitHub Bot 1c52eec2c6 Ensure that ShadowNode measure functions respect constraints (#51180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51180

Android's TextLayoutManager may return widths greather than the max measure constraint.

Yoga will clamp these, but this sort of issue points to a logic bug, and creates issues when we are looking at caching text measurements based on constraint reuse.

Let's debug assert that we don't do that, and fix a case of rounding up at a pixel boundary, to ensure that it doesn't go above max width. This should theoretically be safe, since Yoga is already doing this clamping, which is what dictates final size of the TextView.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74291373

fbshipit-source-id: 44166f2e47323384cb00f3cf4c32f398e298a63e
2025-05-08 14:41:50 -07:00
Christian FalchandFacebook GitHub Bot 65544024b3 Add script to prepare the .build folder to prebuild React Native with SwiftPM (#51195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51195

This change adds a script that prepares the repository by creating hard links to the header files in the `.build` folder that is also gitignored

## Changelog:
[Internal] - Add sdcript to setup the repository so that we can build it properly.

Test Plan:
run:
```
node packages/react-native/scripts/ios-prebuilds.js
```
observe the folder `.build` being created with all the files.

Reviewed By: cortinico

Differential Revision: D74393116

Pulled By: cipolleschi

fbshipit-source-id: 4951e61b49db83fbebbcc265ae025f53185fec81
2025-05-08 12:59:49 -07:00
Christian FalchandFacebook GitHub Bot 500f458e5d Add utils script to create folders to prebuild React Native core (#51194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51194

This change adds an utils script to set up folders when needed.

## Changelog:

[INTERNAL] - Add utils script

Test Plan: This is tested in the next diff of the stack.

Reviewed By: cortinico

Differential Revision: D74393298

Pulled By: cipolleschi

fbshipit-source-id: db3db61ec938d2ebe5c0bf5ae0a42aa20c673bb0
2025-05-08 12:59:49 -07:00
Christian FalchandFacebook GitHub Bot 43bfb5da11 building up to React Core (#50766)
Summary:
- Added multiple targets to Package.swift
- WIP: Builds up untill we need to touch files in React/Base

## Changelog:

[INTERNAL] - WIP: prebuilding using Swift packages

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

Test Plan: This will be tested in a diff in the stack.

Reviewed By: cortinico

Differential Revision: D74386522

Pulled By: cipolleschi

fbshipit-source-id: 7bac3c21a362c4ef79d0104727cdd3494419012f
2025-05-08 12:59:49 -07:00
Mark VerlingieriandFacebook GitHub Bot a21a4b87c3 Allow fadingEdgeLength to be set independently on the start and end of the scrollview (#51174)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51174

Allows the start and end of the scrollview to be faded to different values independently by passing an object containing a "start" and "end" value to the fadingEdgeLength prop.

To support non-uniform edge lengths we use the [FadingEdgeStrength](https://developer.android.com/reference/android/view/View#getTopFadingEdgeStrength()) api to set different values for the start/end of the scrollview. The FadingEdgeStrength value is multiplied by the FadingEdgeLength value [internally by Android when drawing the view.](https://cs.android.com/android/platform/superproject/+/android15-qpr1-release:frameworks/base/core/java/android/view/View.java;l=25007)

Because the value of FadingEdgeStrength is required to be between 0 and 1, we set setFadingEdgeLength to the max value and set the smaller side as a percentage of that value.

Changelog: [Android][Added] Allow fadingEdgeLength to be set independently on the start and end of the scrollview

Reviewed By: martinbooth

Differential Revision: D74222606

fbshipit-source-id: 7010ca803cc48450ab98c2a457fdc72ff47c29d7
2025-05-08 10:59:32 -07:00
Nick LefeverandFacebook GitHub Bot 536aa67817 Add getDiffProps for RawText component (#51179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51179

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74365934

fbshipit-source-id: a1db8db1f3f2b63f3e3facd7070e9a12c01cbc5b
2025-05-08 09:37:26 -07:00
Nick LefeverandFacebook GitHub Bot 0dbfcda6c6 Add getDiffProps for ScrollView component (#51168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51168

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74327336

fbshipit-source-id: 9e306400578ac6d83c49537ab2c38e86209fbcfd
2025-05-08 09:37:26 -07:00
Nick LefeverandFacebook GitHub Bot 4591bb2909 Add missing ScrollView props to ScrollProps (#51167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51167

Adding the ScrollView properties that are android specific to the common ScrollView props so that they can be diffed in a getDiffProps implementation.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74327335

fbshipit-source-id: 8e5683d4bf7fe0f6d54d4b97f535731721c60292
2025-05-08 09:37:26 -07:00
Nick LefeverandFacebook GitHub Bot 68baff1d67 Add getDiffProps for Unimplemented View component (#51166)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51166

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74327337

fbshipit-source-id: c5b44d833fccaa200d6019932dd5e9b1760c3af3
2025-05-08 09:37:26 -07:00
Nick LefeverandFacebook GitHub Bot 73a03d5314 Add getDiffProps for Image component (#51165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51165

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74327298

fbshipit-source-id: 8faa04807615e223033cbede80112df4496f77ef
2025-05-08 09:37:26 -07:00
Dawid MałeckiandFacebook GitHub Bot f3c289835f Move imported types from @react-native/assets-registry and @react-native/js-polyfills to react-native repo (#51192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51192

The `build-types` script cannot currently resolve `react-native/assets-registry` and `react-native/js-polyfills`. This diff moves imported types from these packages to `react-native` to include them in generated types.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74392568

fbshipit-source-id: cbce977b710f54dc53ce1b0fc080704b420490d4
2025-05-08 09:07:42 -07:00
Alan LeeandFacebook GitHub Bot 14cea6e70e migrate deprecated KEYCODE_BACK in Modal (#51097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51097

**Problem:** `Event.KEYCODE_BACK`has been deprecated with targetSdk 36, predictive back will be enforced and KEYCODE_BACK no longer triggered. We need to migrate to backward compatible `OnBackPressedCallback`.
- https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back.

**Solution:**
Use `OnBackPressedCallback` to handle BACK. Logic for ESC key handling still remains.
To support the callback mechanism, we are using AndroidX ComponentDialog ([src](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:activity/activity/src/main/java/androidx/activity/ComponentDialog.kt)) which is a thin wrapper on the existing Dialog.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D74162844

fbshipit-source-id: ebd0e89c29999d3dd99431a4359c442e42d23911
2025-05-08 08:50:45 -07:00
Alan LeeandFacebook GitHub Bot bc876fb3b3 migrate deprecated onBackPressed() (#51096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51096

**Problem:** `Activity.onBackPressed()` has been deprecated and with targetSdk 36, predictive back will be enforced and the API no longer called. We need to migrate to backward compatible AndroidX `OnBackPressedCallback`.
- https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back.

**Solution:**
`OnBackPressedCallback` is registered conditionally only if it is `targetSdk` 36 or greater.
If the callback in enabled, `onBackPressed()` is not called and callback is used regardless of `android:enableOnBackInvokedCallback` property in <application> or <activity> set in AndroidManifest.xml.

As a workaround callback is manually calling existing `onBackPressed()`.

This is done rather than removing onBackPressed() completely and using only `OnBackPressedCallback` as we are not sure of the impact of removing the implementation entirely. Once we determine it is safe to do so then, we should remove the workaround and fully transition to `OnBackPressedCallback`

* I also surveyed child classes extending ReactActivity for overridden `onPressedBack()` usage and found only one usage which will be handled later.

NOTE: `ReactDelegate.onHostResume()` sets up the `DefaultHardwareBackBtnHandler` using `ReactActivity` (https://fburl.com/ul47tbeo) and will be called from JS `BackHanderl.exitApp` (https://fburl.com/code/a4l2pjsw). Calling `BackHanderl.exitApp` enables predictive back to work.

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D74161428

fbshipit-source-id: 2e081ba6922b315e9d1746e83a41bab5277fa62e
2025-05-08 08:50:45 -07:00
Dawid MałeckiandFacebook GitHub Bot fd21570a3c Attach @deprecated tag and doc block to ProgressBarAndroid (#51136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51136

This diff attaches doc block to ProgressBarAndroid copied from the manual TS types.

Generated types result:

```ts
import * as React from "react";
import type $$IMPORT_TYPEOF_1$$ from "./ProgressBarAndroidNativeComponent";
type ProgressBarAndroidNativeComponentType = typeof $$IMPORT_TYPEOF_1$$;
import type { ProgressBarAndroidProps } from "./ProgressBarAndroidTypes";
export type { ProgressBarAndroidProps };
declare let ProgressBarAndroid: (props: Omit<ProgressBarAndroidProps, keyof {
  ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}> & {
  ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}) => React.ReactNode;
/**
 * ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
 * It can now be installed and imported from `react-native-community/progress-bar-android` instead of 'react-native'.
 * see https://github.com/react-native-community/progress-bar-android
 * deprecated
 */
declare const $$ProgressBarAndroid: typeof ProgressBarAndroid;
declare type $$ProgressBarAndroid = typeof $$ProgressBarAndroid;
export default $$ProgressBarAndroid;

```

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D73855212

fbshipit-source-id: c6c09ea68c9f61f305f96c0954370bb938fc59d9
2025-05-08 08:14:32 -07:00
Fabrizio CucciandFacebook GitHub Bot 090a8da0d1 Kotlinify ReactInstanceManagerInspectorTarget + make internal (#51196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51196

As per title.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74325454

fbshipit-source-id: a490614c83bd69660ecdd4cc8439a1a168de3010
2025-05-08 07:47:57 -07:00
Dawid MałeckiandFacebook GitHub Bot 69fe957dcf Add transform that moves comments for default exported variable declarations (#51135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51135

In generated types default exported variables are re-declared which shadows attached tags and doc blocks. This transform moves necessary comments on top of re-declarations to keep them accessible.

Example output for SafeAreaView:

```ts
import type { ViewProps } from "../View/ViewPropTypes";
import View from "../View/View";
import * as React from "react";
declare const exported: (props: Omit<ViewProps, keyof {
  ref?: React.Ref<React.ComponentRef<typeof View>>;
}> & {
  ref?: React.Ref<React.ComponentRef<typeof View>>;
}) => React.ReactNode;
/**
 * Renders nested content and automatically applies paddings reflect the portion
 * of the view that is not covered by navigation bars, tab bars, toolbars, and
 * other ancestor views.
 *
 * Moreover, and most importantly, Safe Area's paddings reflect physical
 * limitation of the screen, such as rounded corners or camera notches (aka
 * sensor housing area on iPhone X).
 */
declare const SafeAreaView_DEFAULT: typeof exported;
declare type SafeAreaView_DEFAULT = typeof SafeAreaView_DEFAULT;
export default SafeAreaView_DEFAULT;
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74249424

fbshipit-source-id: 5cdd1c746e7fed99e3d3427d6ebf4c0e7ba3f3fd
2025-05-08 07:07:02 -07:00
Jakub PiaseckiandFacebook GitHub Bot 1f795eb93d Validate that typegen script can run in action (#51189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51189

Changelog: [Internal]

Adds a Github action that validates that the typegen script can successfully translate every necessary Flow file to TypeScript.

Reviewed By: huntie

Differential Revision: D74390916

fbshipit-source-id: 8c6d554c8681a2b92a8b182244a329ee538d9e53
2025-05-08 06:11:22 -07:00
Alex HuntandFacebook GitHub Bot 320231c6f9 Narrow file set for no-commonjs-exports lint rule (#51191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51191

Avoids over-matching non-runtime files such as `packages/react-native/scripts/`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D74394261

fbshipit-source-id: dbfd13e305d51c91d36fbc844af7631f066b8297
2025-05-08 06:09:57 -07:00
ismarbesicandFacebook GitHub Bot be8595b18a Exclude selectively disabled libraries from codegen generation (#51078)
Summary:
Selectively disabling autolinking of a native dependency with components registered in the codegen configuration in react-native.config.js causes builds to crash upon launch on iOS. This is because the generated `RCTThirdPartyComponentsProvider.mm` file contains references to the excluded library using `NSClassFromString` causing the returned NSDictionary from `+[RCTThirdPartyComponentsProvider thirdPartyFabricComponents]` to be populated with nil values and therefore crashing the app. This has been confirmed in 0.78.2 and 0.79.2 but probably exists in 0.77.x as well.

The issue has been further described in https://github.com/facebook/react-native/issues/51077.

## Changelog:

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

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

Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (see reproducer) and install the iOS pods.
2. Build the app.
3. App should run successfully without any crashes.

Reviewed By: cortinico

Differential Revision: D74248371

Pulled By: cipolleschi

fbshipit-source-id: 1ff7b477ed3d94ca45616ae243d3d2d30bd897db
2025-05-08 04:38:29 -07:00
Mateo GuzmánandFacebook GitHub Bot 04ab28fb7e Kotlin: Clean up redundant constructs (2/n) (#51170)
Summary:
Follow up from https://github.com/facebook/react-native/issues/51061 – Static code analysis detected several redundant constructs across the codebase. Most of the ones fixed here are marked as warnings/weak warnings, likely code smells post-migration from Java.

Doing another small round to clean up some of them.

## Changelog:

[INTERNAL] - Kotlin: Clean up redundant constructs

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

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

Reviewed By: rshest

Differential Revision: D74381864

Pulled By: cortinico

fbshipit-source-id: 25244cdf384875f7cc4e2d091c8b247710de5ecf
2025-05-08 03:53:33 -07:00
Nicola CortiandFacebook GitHub Bot db18aac521 hermes-engine should build with target Java version 17 (#51162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51162

We specify the java target version to 17 for ReactAndroid but not for hermes-engine.
This is causing it to be the default (8) which will cause our build to fail on JDK 21.
This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D74325107

fbshipit-source-id: 39ba745be4fa754fb0b0408160202940a61fcd94
2025-05-08 03:17:16 -07:00
React Native BotandFacebook GitHub Bot f75c8f6f04 Add changelog for v0.80.0-rc.0 (#51152)
Summary:
Add Changelog for 0.80.0-rc.0

## Changelog:
[Internal] - Add Changelog for 0.80.0-rc.0

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

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D74333203

Pulled By: hezi

fbshipit-source-id: 052147550ecbe47f9e75dba6ebf6257a10a49f5b
2025-05-08 02:33:00 -07:00
Kacper RożniataandFacebook GitHub Bot 473e42bbc3 fix(iOS): enable DEFINES_MODULE in React-jsc (#51160)
Summary:
Enables `DEFINES_MODULE` in `React-jsc.podspec`

After upgrading app to RN `0.79`, when installing pods with JSC enabled there is an error being thrown that

`The following Swift pods cannot yet be integrated as static libraries`
`The Swift pod 'RNFlashList' depends upon 'React-jsc', which does not define modules. ...`
when installing packages that use Swift

## Changelog:

[IOS] [CHANGED] -  enable `DEFINES_MODULE` in `React-jsc.podspec`

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

Test Plan: RNTester runs and builds correctly

Reviewed By: huntie

Differential Revision: D74325357

Pulled By: cipolleschi

fbshipit-source-id: b994b7e678633440d5e362ae6965b2d5188d34f1
2025-05-08 02:12:45 -07:00
Intl SchedulerandFacebook GitHub Bot 457f29f09c translation auto-update for batch 0/58 on master
Summary:
Chronos Job Instance ID: 1125907957818733
Sandcastle Job Instance ID: 31525199229818080

Processed xml files:
android_res/com/facebook/common/util/res/values/strings.xml
android_res/com/oculus/auth/authenticator/meta/res/values/strings.xml
android_res/com/oculus/horizon/common/res/values/strings.xml
android_res/com/oculus/horizon/platformplugin/res/values/strings.xml
android_res/com/oculus/horizon/try_before_you_buy/res/values/strings.xml
android_res/com/oculus/os/q4b/mma/res/values/strings.xml
android_res/com/oculus/horizon/mediaupload/res/values/strings.xml
android_res/com/oculus/horizon/linkedaccounts/res/values/strings.xml
android_res/com/oculus/auth/authenticator/work/res/values/strings.xml
android_res/com/oculus/auth/authenticator/oculus/res/values/strings.xml
android_res/com/oculus/auth/authenticator/instagramsso/res/values/strings.xml
android_res/com/oculus/auth/authenticator/horizonworldsplatform/res/values/strings.xml
android_res/com/oculus/auth/authenticator/facebooksso/res/values/strings.xml
android_res/com/oculus/auth/authenticator/facebook/res/values/strings.xml
android_res/com/oculus/demoapp/res/values/strings.xml
android_res/com/facebook/wearable/common/comms/notification/res/values/strings.xml
android_res/com/facebook/wearable/apps/igdirect/res/values/strings.xml
android_res/com/facebook/wearable/common/wds/theme/res/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/systeminfo/values/strings.xml
android_res/rendercore/res/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml
android_res/com/facebook/content/res/values/strings.xml
android_res/com/facebook/common/i18n/res/values/strings.xml
android_res/com/facebook/common/timeformat/res/values/strings.xml
libraries/foa/ui/cds/widgets-litho/brandasset/res/values/strings.xml
android_res/com/meta/icon/res/values/strings.xml
android_res/com/facebook/resources/res/values/strings.xml
android_res/com/facebook/common/strings/external/res/values/strings.xml
android_res/com/facebook/common/strings/res/values/strings.xml
android_res/com/oculus/twilight/app/res/values/strings.xml
android_res/com/facebook/fbui/widget/pagerindicator/res/values/strings.xml
android_res/com/facebook/fbui/widget/contentview/res/values/strings.xml
android_res/com/facebook/stella/res/values/strings.xml
android_res/com/facebook/wearable/companion/settings/keys/res/values/strings.xml
android_res/com/bloks/foa/cds/bottomsheet/strings/res/values/strings.xml
android_res/com/facebook/reportaproblem/res/values/strings.xml
android_res/com/oculus/twilight/reportaproblem/res/values/strings.xml
android_res/com/facebook/widget/res/values/strings.xml
android_res/com/facebook/config/appspecific/res/values/strings.xml
android_res/com/facebook/fbavatar/res/values/strings.xml
android_res/com/facebook/messaging/ui/stickerstore/res/values/strings.xml
android_res/com/facebook/stickers/res/values/strings.xml
android_res/com/facebook/messaging/shared/res/values/strings.xml
android_res/com/facebook/caspian/res/values/strings.xml
android_res/com/facebook/timeline/widget/actionbar/res/values/strings.xml
android_res/com/facebook/showpages/res/values/strings.xml
android_res/com/facebook/nux/res/values/strings.xml
android_res/com/facebook/facecast/common/badge/res/values/strings.xml
android_res/com/facebook/nativetemplates/res/values/strings.xml
android_res/com/facebook/iorg/common/upsell/res/values/strings.xml
android_res/com/facebook/iorg/common/res/values/strings.xml
android_res/com/facebook/zero/common/res/values/strings.xml
android_res/com/facebook/video/components/feed/res/values/strings.xml
android_res/com/facebook/runtimepermissions/res/values/strings.xml
android_res/com/facebook/dialtone/res/values/strings.xml
android_res/com/oculus/twilight/gcm/messaging/res/values/strings.xml
android_res/com/oculus/twilight/gcm/followrequest/res/values/strings.xml
android_res/com/facebook/rtc/notification/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/common/res/values/strings.xml
android_res/com/facebook/zero/messenger/semi/res/values/strings.xml
android_res/com/facebook/zero/res/values/strings.xml
android_res/com/facebook/widget/facepile/res/values/strings.xml
android_res/com/facebook/tabbar/res/values/strings.xml
android_res/com/facebook/ui/toolbar/res/values/strings.xml
android_res/com/facebook/dialtone/messenger/res/values/strings.xml
android_res/com/facebook/catalyst/shell/res/values/strings.xml
android_res/com/facebook/rtc/runtimepermissions/manager/res/values/strings.xml
android_res/com/facebook/rtc/connectionservice/res/values/strings.xml
android_res/com/facebook/rtc/helpers/connectionservicecoordinator/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callstatus/participantinfo/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callstatus/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/incoming/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/participant/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/pip/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/header/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callcontrols/audioselector/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callcontrols/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/incall/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/ended/res/values/strings.xml
android_res/com/facebook/payments/dcp/res/values/strings.xml
libraries/smartcapture/common/common-ui/res/values/strings.xml
android_res/com/bloks/common/components/autogenmediagallery/res/values/strings.xml
android_res/com/facebook/ui/mainview/res/values/strings.xml
android_res/com/facebook/audience/stories/storysurface/activity/main/res/values/strings.xml
android_res/com/facebook/horizon/res/values/strings.xml
android_res/com/meta/fxmetalogin/res/values/strings.xml
android_res/com/instagram/ui/common/res/values/strings.xml
android_res/com/instagram/actionbar/res/values/strings.xml
android_res/com/instagram/tabs/res/values/strings.xml
android_res/com/instagram/avatar/res/values/strings.xml
android_res/com/instagram/icons/igax/res/values/strings.xml
android_res/com/instagram/debug/res/values/strings.xml
android_res/com/facebookpay/widget/res/values/strings.xml
android_res/com/facebookpay/ecpexception/res/values/strings.xml
android_res/com/facebookpay/expresscheckout/res/values/strings.xml
android_res/com/fbpay/auth/res/values/strings.xml
android_res/com/oculus/twilight/hsrmobile/res/values/strings.xml
android_res/com/oculus/twilight/calling/res/values/strings.xml
../xplat/messengervr/msys/feature_aggregation/src/i18n/res/values/strings.xml

allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D74381578

fbshipit-source-id: 3e17ebecf9bd5a6822bf98c9d195885320705655
2025-05-08 01:28:36 -07:00
Maddie LordandFacebook GitHub Bot bbc1e121c7 Allow Custom ReactNativeFeatureFlags for Shell 2.0 (#51177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51177

Introduce DefaultNewArchitectureEntryPoint.loadWithFeatureFlags() to allow custom feature flags while using DefaultNewArchitectureEntryPoint

Reviewed By: arushikesarwani94

Differential Revision: D74228467

fbshipit-source-id: ec3fe7edd31cc9713498b316d6306eaa3686398b
2025-05-07 18:58:21 -07:00
Jan KassensandFacebook GitHub Bot a96aeab147 use difftrain version of eslint-plugin-react-hooks
Summary:
Switches to use the version imported through diff train for `eslint-plugin-react-hooks`. This should allow us to finally use component syntax in RN.

bypass-github-export-checks

Changelog: [internal]

Reviewed By: yungsters

Differential Revision: D74203162

fbshipit-source-id: d9ea17e5c6533e8df0889404a7f7798f6f5061c0
2025-05-07 14:57:36 -07:00
Joe VilchesandFacebook GitHub Bot be60aed1b0 Allow links that are entire text views to be focusable when co-opted (#51138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51138

The co-opting logic failed to account fo the case where the entire text view as a link and therefore turns off ax. In this case I think it makes sense to re-focus that element again so the user can interact with the link.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D74262675

fbshipit-source-id: c8d11cdff76cd92170581d167d5a8df64d0dd101
2025-05-07 14:46:39 -07:00
Samuel SuslaandFacebook GitHub Bot 1c312befd5 add tests for some accessibility props (#51155)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51155

changelog: [internal]

we have experienced breakages where we stopped propagating accessibility prop to the mounting layer. These tests should catch it.

Reviewed By: fabriziocucci

Differential Revision: D74317767

fbshipit-source-id: 72c6d8c788afe3a9d4d41f7cfc0aa37605b20b6a
2025-05-07 13:02:18 -07:00
Fabrizio CucciandFacebook GitHub Bot 1908b3dfac Kotlinify JavaScriptModuleRegistry (#51164)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51164

As per title.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D74326679

fbshipit-source-id: ecd15fda9ea8686b65171c462e7e82dc9609377b
2025-05-07 10:34:14 -07:00
Mateo GuzmánandFacebook GitHub Bot 84253c4e20 Add missing ReplaceWith on deprecations (#51144)
Summary:
Static code analysis detected several missing `ReplaceWith` on deprecated methods. This diff addresses some of them by adding the most accurate suggestions based on the implementations.

## Changelog:

[INTERNAL] - Add missing ReplaceWith on deprecations

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

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

Reviewed By: fabriziocucci

Differential Revision: D74327121

Pulled By: javache

fbshipit-source-id: 5b338531210bef104208d14cbd0e3320dc566b8e
2025-05-07 10:09:35 -07:00
Nicola CortiandFacebook GitHub Bot cf94070416 Unbreak build_android due to broken StateReconciliationTest.cpp (#51161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51161

This unbreaks the CI after D74245228

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D74324800

fbshipit-source-id: b89147f4f57b5d94fd8ae1549ef18ef2deb97c5b
2025-05-07 08:49:39 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 130fb7fd30 Fix set-rn-version to account for codegen snapshot test files (#51157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51157

test-js jobs are failing because the codegen snapshot tests generates a Podspecs withan hardcoded version that does not matches the version we are about to release.

This fix updates the script that set the RN version to make sure it also updates the Codegen snapshots.

This is a porting to `main` of [this PR](https://github.com/facebook/react-native/pull/51156).

## Changelog:
[Internal] - Fix set-rn-version to account for codegen snapshot test files

Reviewed By: fabriziocucci, cortinico

Differential Revision: D74321590

fbshipit-source-id: 6837e60a0a2834030680f7ec0c7584bf2622f33e
2025-05-07 07:18:45 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 56b2690ecd Fix creation of Draft release (#51159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51159

This change fixes a syntax error in the GH Action that generates the draft PR.

## Changelog:
[Internal] - Fix draft release generation

Reviewed By: fabriziocucci, cortinico

Differential Revision: D74322577

fbshipit-source-id: 0fcb03403ea35f7c64217bce5f1cbf93e7d5bd9a
2025-05-07 07:07:59 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 807dfb4a1b Fix build codegen (#51130)
Summary:
When testing the release by running the `test-e2e-local` for RNTester on iOS, the script sometimes fails because it expect to have codegen properly built before running the app.
This fix makes sure we build the codegen package.

## Changelog:
[Internal] - Fix building the codegen

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

Test Plan: Tested locally

Reviewed By: fabriziocucci

Differential Revision: D74248031

Pulled By: cipolleschi

fbshipit-source-id: 319f3332c616f7118b673fb7acb63c2e15946b2c
2025-05-07 06:12:06 -07:00
Mateo GuzmánandFacebook GitHub Bot a3c9db6122 Make ReactQueueConfigurationImpl internal (#51143)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.queue.ReactQueueConfigurationImpl).

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.queue.ReactQueueConfigurationImpl internal

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

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

Reviewed By: rshest, cortinico

Differential Revision: D74309556

Pulled By: javache

fbshipit-source-id: 1c5eaa0e975bd2db5d451c5e21f14cfa3856e4c3
2025-05-07 05:21:37 -07:00
Mateo GuzmánandFacebook GitHub Bot f81a721b57 Make DebugServerException internal (#51140)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.common.DebugServerException).

## Changelog:

[INTERNAL] - Make com.facebook.react.common.DebugServerException internal

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

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

Reviewed By: javache

Differential Revision: D74309486

Pulled By: rshest

fbshipit-source-id: 092ffb350d9093deb6b12ad639dd7453027c4c06
2025-05-07 04:54:39 -07:00
Samuel SuslaandFacebook GitHub Bot 12fb101e30 deprecate type aliases ShadowNode::Unshared and ShadowNode::Weak (#51151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51151

changelog: [General][Deprecated] - deprecate type aliases ShadowNode::Unshared and ShadowNode::Weak in favour of std::shared_ptr<ShadowNode> and std::weak_ptr<ShadowNode>

migrate away from using these type aliases to avoid confusion.

It is unclear from ShadowNode::Unshared what it means. This can be avoided by using std::shared_ptr<ShadowNode> directly. The same applies to ShadowNode::Weak.

Reviewed By: rubennorte

Differential Revision: D74245228

fbshipit-source-id: f22a18e87f170e46f5079e0ee7678700a3f5f623
2025-05-07 04:51:38 -07:00
Alex HuntandFacebook GitHub Bot f4dd3addb6 Remove force disable Fusebox flag (#51127)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51127

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D74246823

fbshipit-source-id: af3978c120853d4ef1150fffb38c71c74728f907
2025-05-07 04:26:06 -07:00
Rubén NorteandFacebook GitHub Bot 79c3b4c409 MutationObserver: switch from ShadowNode to ShadowNodeFamily to prevent leaks (#51149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51149

Changelog: [internal]

This replaces the use of `ShadowNode` with `ShadowNodeFamily` in the `MutationObserver` logic to prevent retaining stale subtrees of the nodes being observed.

It refactors some existing logic so we don't need to keep track of the shadow nodes in JS. It was only used to be able to find the node for a target after unmounted, so we could "unobserve" it, but `MutationObserver` doesn't support unobserving individual targets anyway, so we removed that use case and implemented a more general `unobserveAll` method that doesn't require the shadow nodes in the first place.

Reviewed By: javache

Differential Revision: D74240834

fbshipit-source-id: 6d4c43a561780962874c76615fb53369c0c68cf7
2025-05-07 04:17:26 -07:00
Rubén NorteandFacebook GitHub Bot da56d57ac7 Refactor MutationObserver.disconnect (#51128)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51128

Changelog: [internal]

Just a minor refactor of a method in `MutationObserver` which was doing some redundant work that could be avoided.

Reviewed By: javache

Differential Revision: D74247437

fbshipit-source-id: 510d26f2a315582df9cddc215bf516d3d4ebd341
2025-05-07 04:17:26 -07:00
Rubén NorteandFacebook GitHub Bot 759652b09f Refactor existing native module into a general purpose native module for Fantom test specific methods (#51133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51133

Changelog: [internal]

Having a single native module with all the test-specific functionality that we need in native in Fantom is just more convenient.

Reviewed By: rshest, huntie

Differential Revision: D73997209

fbshipit-source-id: 5d3aa69a2c799166a1351fbff3e80e4396cec9c6
2025-05-07 04:16:41 -07:00
Alex HuntandFacebook GitHub Bot 12627f10b3 Report PerformanceResourceTiming events (#51126)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51126

NOTE: Resubmission of D73922341, fixing a dependency cycle (T223145455).

(Sparsely) wires up reporting of Network events to the Web Performance subsystem.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D74245441

fbshipit-source-id: ce8f47dfb3f5cd415f51287d7fcc6a048336018e
2025-05-07 03:49:56 -07:00
Mateo GuzmánandFacebook GitHub Bot f9225635bf Fix unresolved KDoc references (#51142)
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. This is just another round addressing several of them.

## Changelog:

[INTERNAL] - Fix unresolved KDoc references

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

Test Plan: Verify that the comments link the classes correctly using Android Studio.

Reviewed By: rshest

Differential Revision: D74305933

Pulled By: javache

fbshipit-source-id: f512a33fa5da46fb828bb76bd95d9502261ea08a
2025-05-07 03:31:30 -07:00
Jakub PiaseckiandFacebook GitHub Bot e48b496665 Update fabric-component type test to use namespaced types (#51120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51120

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74242678

fbshipit-source-id: b39b56bb3a34633bec55f07c8bf081fb70b62249
2025-05-07 03:06:04 -07:00
David VaccaandFacebook GitHub Bot a254b5e69e Introduce ReactSoftExceptionLogger.CategoryMode to warn categories used on soft errors (#51141)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51141

This diff introduces ReactSoftExceptionLogger.CategoryMode to limit categories used on soft errors, the limiation will only create a lint warning but won't create a compilation error.

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D74263367

fbshipit-source-id: 56fb2ef0ad3d24810172af300e43ecc1f479464f
2025-05-06 15:46:23 -07:00
Tim YungandFacebook GitHub Bot d945c5863a IntersectionObserver: Switch from ShadowNode to ShadowNodeFamily (#51089)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51089

Currently, `IntersectionObserver#observe` retains a reference to the `ShadowNode` of the view that is supplied as an argument, which is used to compute intersection whenever a shadow tree is committed.

However, the `shadowNode` includes all of child nodes and state at the time that `IntersectionObserver#observe` is called. This means that an active `IntersectionObserverEntry` will retain references to memory that would otherwise be deallocated (e.g. if children of the observed view are unmounted after `IntersectionObserver#observe` is called).

This diff refactors `IntersectionObserver` to instead retain a reference to the `ShadowNodeFamily`, which does not retain references to child nodes and still eanbles `IntersectionObserver` to compute intersections.

Changelog:
[General][Changed] - Fixed `IntersectionObserver#observe` to avoid retaining memory for unmounted child nodes of observed views.

Reviewed By: RSNara

Differential Revision: D74130479

fbshipit-source-id: 6b581f73f06b93e6463d5004c181c39aae13896a
2025-05-06 15:24:42 -07:00
Abhijeet JhaandFacebook GitHub Bot d94f4d8c9d Added decalaration for pressRetentionOffset prop to be recognised by typescript (#51068)
Summary:
Added decalaration for  pressRetentionOffset prop to be recognised by typescript

## Changelog:
Added decalaration for  pressRetentionOffset prop to be recognised by typescript in Text.d.ts

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

Pick one each for the category and type tags:
[General] [Added] - Add  pressRetentionOffset prop to be recognised by typescript in Text.d.ts

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

Test Plan:
Before fix

https://github.com/user-attachments/assets/476364c4-6602-4916-84f2-1ede56bce285

After fix

https://github.com/user-attachments/assets/e5f720d9-cd7d-4cf0-8499-ebe9f83eb17b

Tested here: Related PR: (https://github.com/microsoft/react-native-windows/pull/14596)

Reviewed By: yungsters

Differential Revision: D74208617

Pulled By: philIip

fbshipit-source-id: 625996bec64058e4e4cdbe108ed53a62426d1222
2025-05-06 10:20:41 -07:00
Rob HoganandFacebook GitHub Bot db0fa9200e Update Metro to ^0.82.3 (#51122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51122

Update Metro to 0.82.2 => 0.82.3, containing important bug fixes for `package.json#exports` support.

Changelog: [General][Changed] Metro to ^0.82.3

Reviewed By: huntie

Differential Revision: D74181990

fbshipit-source-id: 8320a0cf4aa671d9e7f2976c36d260934807a179
2025-05-06 09:29:30 -07:00
Samuel SuslaandFacebook GitHub Bot 4b06965b30 add fantom test for View.accessibilityRole (#51131)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51131

changelog: [internal]

add test for View.accessibilityRole.

Reviewed By: rubennorte

Differential Revision: D74247897

fbshipit-source-id: 9246e690fe15fc659b134cf2484a5ac64ff321d7
2025-05-06 09:17:49 -07:00
Samuel SuslaandFacebook GitHub Bot 93b8868c77 small changes to ctor of State and ConcreteState (#51118)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51118

changelog: [internal]

1. `ConcreteState` and `State` were taking shared_ptr to family even though they only use weak_ptr.
2. `ConcreteState` was taking a const& to `data`. It unconditionally takes ownership of data, make it obvious in the interface.

Reviewed By: lenaic

Differential Revision: D74024980

fbshipit-source-id: 22401d4153588861f3edd04af0bdc7213a8056ac
2025-05-06 07:42:47 -07:00
Alex HuntandFacebook GitHub Bot 9bccd6c4ea Explicitly exclude types_generated/ from "exports" (#51121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51121

Previously could match via the `"./*"` subpath when `"react-native-strict-api"` is not set. Only the entry point `./types_generated/index.d.ts` should be exposed.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D74242716

fbshipit-source-id: 232c90f34fafe8fdf1a5a7ef1fec4acc191525b4
2025-05-06 07:26:04 -07:00
Alex HuntandFacebook GitHub Bot c34987f0b5 Remove redundant config value for @types/react-native (#51119)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51119

See https://www.typescriptlang.org/tsconfig/#types.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D74242632

fbshipit-source-id: d4b5cbb42340e40a7e6770e3a6c41964366fe71e
2025-05-06 06:49:27 -07:00
Jakub PiaseckiandFacebook GitHub Bot 9010e691e0 Update transform types to preserve behavior in TypeScript (#51115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51115

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74229819

fbshipit-source-id: 08e363ae58c29ca910601b2f078153b8ff30103c
2025-05-06 06:21:15 -07:00
Dawid MałeckiandFacebook GitHub Bot 5e612e6eca Fix suggesting components from types_generated directory (#51101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51101

TS LSP suggests importing/using components from `types_generated` directory which are exported under slightly different name than root exports. Prefixing default exports with `$$` fixes the issue.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74177107

fbshipit-source-id: 86a6869c2aa7a113915184e4857a7882710b1db4
2025-05-06 06:01:19 -07:00
Jakub PiaseckiandFacebook GitHub Bot a65744fd4a Unify ref usages in TS type tests (#51117)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51117

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74240080

fbshipit-source-id: 5cc7042b5ac1515887d20b72a0b7d96cc8313ed7
2025-05-06 05:42:29 -07:00
Pieter De BaetsandFacebook GitHub Bot ef6f2fb32d Create granite.target_platform for RN overrides (#51076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51076

Changelog: [Internal]

Reviewed By: MichaelTay, rshest

Differential Revision: D73451500

fbshipit-source-id: b31962fed5004204e15f4adbaf8a8ce2432b94a2
2025-05-06 03:38:22 -07:00
Christian FalchandFacebook GitHub Bot 3ac16dd6a8 replaced use of rsync with cp in prebuild scripts (#51095)
Summary:
When building the RNDependencies XCFrameworks we saw some errors in the CI servers about rsync failing:

`rsync(3031): error: poll: hangup on nonblocking write`

We decided to fix this by changing from using rsync to cp.

This commit fixes this by replacing rsync with cp, and adding a cleanup step after copying the XCFramework files.

## Changelog:

[INTERNAL] [FIXED] - Replacing rsync with cp, and adding a cleanup step after copying the XCFramework files.

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

Test Plan: Run RNDependencies scripts on CI and verify that they're working as expected.

Reviewed By: fabriziocucci

Differential Revision: D74236114

Pulled By: cipolleschi

fbshipit-source-id: accd84abf7601919cfdbc1b6a8681a61d4293ca5
2025-05-06 02:19:54 -07:00
David VaccaandFacebook GitHub Bot 3ad0b8244a Throw if getCatalystInstance() is executed when running on bridgless mode + legacy arch minification (#51112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51112

Throw if getCatalystInstance() is executed when running on bridgless mode + legacy arch minification

This should be safe given that all the methods of BridgelessCatalystInstance throw exceptions

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D74200099

fbshipit-source-id: a888061250f19348a22895c3684aa2333280c916
2025-05-05 23:53:10 -07:00
David VaccaandFacebook GitHub Bot a02052d37f Mark BridgelessCatalystInstance as LegacyArchitecture and remove DoNotStrip (#51111)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51111

BridgelessCatalystInstance is unused in bridgeless, any usage will lead to an exception / crash.
This diffs marks BridgelessCatalystInstance as LegacyArchitecture and removes DoNotStrip annotation to enable further optimizations

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D74200097

fbshipit-source-id: f99b6fa74c30bdf0e1cd6758e223601b3ce5826c
2025-05-05 23:53:10 -07:00
Tim YungandFacebook GitHub Bot e69e35e370 Fantom: Create Shadow Node Reference Counter (#51088)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51088

Creates `ShadowNodeReferenceCounter`, a module with utilities for writing Fantom tests that make assertions about the reference count for a `ShadowNode` object.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D74131710

fbshipit-source-id: a949a402ee52f40445ce99c712540e80c8a05065
2025-05-05 23:43:41 -07:00
Nick GerlemanandFacebook GitHub Bot f85b30b24b Underpinnings for Caching Text Layouts (#51065)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51065

This adds infrastructure to let us start storing cached Android text layouts as part of a `ParagraphShadowNode`. After this, we will clear them out, and propagate them to state. Right now, the flag doesn't do much, apart from extra work.

This is done by adding `TextLayoutManagerExtended::supportsPreparedLayout()`, and `TextLayoutManager::PreparedLayout` types, to shim between platforms, then on Android, we add a `PreparedLayout`, which is for now just an Android layout, with extra field (`maxNumberOfLines`, for some reason not exposed on recent versions).

Android `TextLayoutManager` java side is split a little bit, so that we reuse all the existing logic for prepared layouts. I tried to set up the boundary, so that we don't reserialize a MapBuffer after preparation, and for simplicity, this means source of truth for attachment count, and attachment sizes, now lives on the layout. This means we need to change boundary a bit, where we are no longer able to pass in a buffer to fill from C++ side of attachment positions.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D73970149

fbshipit-source-id: ff71c227e062c16fe52a4eb3ba2acbebf3d96e56
2025-05-05 16:48:16 -07:00
Aaron CoplanandFacebook GitHub Bot 2562440385 Construct FBImagePerfImageInfo and pass to completion handler from within FBIconModule (#51110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51110

Changelog: [iOS][Changed] Update RCTImageLoader.mm to cast loadHandler to RCTImageLoaderLoggable before calling shouldEnablePerfLogging

Replacing cast from RCTImageURLLoaderWithAttribution to RCTImageLoaderLoggable

Reviewed By: philIip

Differential Revision: D73148595

fbshipit-source-id: 01f61bc60624e2bb9cb4ff9b45094e38ea77dcaa
2025-05-05 16:37:56 -07:00
Aaron CoplanandFacebook GitHub Bot 43c9a609de Update loadImageURL signature in RCTImageURLLoader to include metadata in completion callback (#51107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51107

Changelog: [iOS][Deprecated] Deprecate loadImageForURL in favor of new signature which uses completionHandlerWithMetadata

Updating the signature of completionHandlerWithMetadata to allow passing metadata through the completionHandlerWithMetadata in order to enable better instrumentation of image loading.

Reviewed By: philIip

Differential Revision: D73162738

fbshipit-source-id: 8e7e4ac35c9685a362a2efe08ebebbf0dd249ff9
2025-05-05 16:37:56 -07:00
Nick GerlemanandFacebook GitHub Bot e565c662d7 Assume full container width when ellipsizing line (#51108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51108

We calculate the width of text to be the full width of the container, if the text overflows the bounds of the container, instead of the wrapped width, to match the behavior on web.

Incorporating line count into layout defeats this logic, since the final layout never overflows. We need to also check to see if we are ellipsized (had overflow) instead.

Changelog:
[Android][Fixed] - Assume full container width when ellipsizing line

Reviewed By: joevilches

Differential Revision: D74204041

fbshipit-source-id: 1c2a7fc50f101bd4c9ed2f979534731992b5310b
2025-05-05 15:47:10 -07:00
Joe VilchesandFacebook GitHub Bot f1e7bbb88b Fix "detected text" annoucement (#51106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51106

There was a strange bug reported to us with `accessibilityOrder` where an OCR model would announce text on the screen sometimes. This would happen if a focused `View` without a label would wrap `Text` that was was not included in the `accessibilityOrder` array. What happens under the hood is we have a focused `View` trying to coopt a label. It finds no accessibility nodes under it (because the `Text` has `importantForAccessibility` set to `NO`) so it falls back to this weird TalkBack behavior. It both reads the text from the TextView and announces an OCR announcement - leading to repeating the text.

To fix this we just check if we are going to coopt text and if we do then we do not set `importantForAccessibility`. Behavior here changes a bit. Links are not accessible without having to reference the Text, setting `accessible={true}` on non-referenced `Text` will lead to be focusable.

These are both less bad than what we had before though, so I think this tradeoff is fine.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D74101530

fbshipit-source-id: 0678915efdc46a6273f79927b87f22bc9017814a
2025-05-05 12:58:18 -07:00
Rob HoganandFacebook GitHub Bot f4936894f0 Miscellaneous lint fixes (#51099)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51099

Fix up some misc broken lints and add temporary suppressions to reduce noise in the subsequent stack.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74141669

fbshipit-source-id: dc19378e41f6d8d45fc7d2ecf18c1c01a1e501be
2025-05-05 09:48:46 -07:00
Eric RozellandFacebook GitHub Bot d9823d80bb Delete ShadowTreeRevision on background thread (#50997)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50997

In some apps, we spend a non-trivial amount of time calling ShadowNode destructors on the UI thread.

A simple way to avoid stalling the UI thread is to move the `baseRevision_` instance to a data structure that is cleared on a background thread, so it's tree of ShadowNode shared_ptrs are released (and in most cases destroyed) on the background thread.

Rather than using std::thread, this change introduces the LowPriorityExecutor abstraction that should be supplied by host platforms. The implementation of this LowPriorityExecutor for each platform is as follows:
- iOS: uses dispatch_async to a low priority dispatch queue
- Android: uses a pthread with SCHED_OTHER and priority = 19

Moving the ShadowTreeRevision into a lambda capture and punting the lambda to the LowPriorityExecutor moves the destructor calls of the ShadowNodes to the host platform implementation of the LowPriorityExecutor.

This change is also guarded by a feature flag so we can keep an eye out for potential memory leaks.

## Changelog

[Internal]

Reviewed By: NickGerleman

Differential Revision: D73688009

fbshipit-source-id: 6a66da248e6fe5c38375bf026499346e8381e75a
2025-05-05 07:44:02 -07:00
Dawid MałeckiandFacebook GitHub Bot 8d08845cda Root export PublicRootInstance and PublicTextInstance for ReactNativeTypes to use (#51018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51018

`ReactNativeTypes` deep imports  `MeasureOnSuccessCallback`, `PublicInstance`, `PublicRootInstance` and `PublicTextInstance`. The `MeasureOnSuccessCallback` type  is already root exported, `PublicInstance` is exported as `HostInstance` and there are two types left to export to root import all of them from react-native. This is needed for `simpleResolve` to properly resolve and build types located in `ReactNativePrivateInterface`.

This cannot be fixed on the resolver level because that would also involve change in the `exports` field in `package.json` to enable types resolution for deep paths which should be strict by design.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D73926160

fbshipit-source-id: 3a711a0f002ea42d9ad538c07ec00f22cc4afb6b
2025-05-05 03:24:02 -07:00
Ruslan LesiutinandFacebook GitHub Bot 271232d856 Make call frames point to function definition, not callsite (#51084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51084

# Changelog: [Internal]

Reviewed By: dannysu

Differential Revision: D73850528

fbshipit-source-id: fc1c22c5bf7cf71f76cf49643af06eeb188b770c
2025-05-05 02:20:58 -07:00
Alex HuntandFacebook GitHub Bot 69f9a9a029 Add status bar offset to New App Screen on Android (#51091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51091

Fix for top padding with Android edge-to-edge (default for current version of the RN template). We add a `statusBarHeightOffset` explicitly, since this is not covered by the builtin `SafeAreaView`.

{F1977676990}

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D74142357

fbshipit-source-id: 6d70db43d8b80b7e3d2d4b598e29560efa046b5c
2025-05-04 13:07:52 -07:00
Rob HoganandFacebook GitHub Bot 93f22e79d4 community-cli-plugin: Use TerminalReporter type from metro, replace deep imports (#51092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51092

`TerminalReporter` is re-exported from `metro` (since [0.76.7](https://github.com/facebook/metro/releases/tag/v0.76.7)), so we can update these deep imports to use public exports.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74141704

fbshipit-source-id: 22cd3209868ed9ab260e199f9099ef98335feaeb
2025-05-04 09:57:57 -07:00
Nick GerlemanandFacebook GitHub Bot 5eed872463 Split Java TextLayoutManager Logic (#51066)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51066

Splits up some of the `measureText` code in Android TextLayoutManager, ahead of D73970149, which adds `measurePreparedLayout` to reuse most of this logic. Most significant change, is we pull out logic to iterate and retrieve metrics for attachments, since `measurePreparedLayout`, needs to also return dimensions, and fill into ArrayList, instead of received buffer.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D74035246

fbshipit-source-id: 2a0f5b171c4343e26ffa5b2538a0018939b06773
2025-05-02 23:22:09 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 989b3f61a0 Fix clipToPaddingBox on new Background and Border drawable (#51055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51055

When clipping to the padding box without a background or border set, we should default to clipping to the drawing rectangle.

This ensures accurate clipping behavior when there is no background or border set. This is because it seems bounds accommodates the contents of the drawables but when no content is present (either a background or a border) the bounds are 0. In which case we want to rely on the drawing rect instead of the bounds for this edge case.

Changelog: [Android][Fixed] - Fix incorrect clip to padding box on new Background and Border drawables

Reviewed By: NickGerleman

Differential Revision: D74014372

fbshipit-source-id: bd5a496db6de44c4185760ed72b3013d9f2faa00
2025-05-02 19:00:28 -07:00
Jiawei LüandFacebook GitHub Bot d45c0419ac Revert D73922341: Report PerformanceResourceTiming events
Differential Revision:
D73922341

Original commit changeset: bcfc03c3d8a9

Original Phabricator Diff: D73922341

fbshipit-source-id: 3898ae763332b79f5a37fc91abb70be53c299655
2025-05-02 14:42:24 -07:00
Joe VilchesandFacebook GitHub Bot e00028f6bb Clean up useEditTextStockAndroidFocusBehavior feature flag (#51039)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51039

We added a feature flag in case this broke things. Its been about 4 months now with now issues, I think we can clean this up.

Changelog: [Android][Fixed] - Can now focus TextInput with keyboard

Reviewed By: NickGerleman

Differential Revision: D73954790

fbshipit-source-id: 4682cf709aa2f34ba69e76a35d07a908edb28f23
2025-05-02 13:21:27 -07:00
Mateo GuzmánandFacebook GitHub Bot 6fa1864d52 Make ModuleDataCleaner internal (#51060)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.common.ModuleDataCleaner).

Only one library uses it (https://github.com/jbrodriguez/react-native-android-sqlite), but it's hasn't been updated for 10 years. Marking it as breaking, but it's unlikely that the library is used nowadays. See:

## Changelog:

[ANDROID][BREAKING] - Make com.facebook.react.modules.common.ModuleDataCleaner internal

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

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

Reviewed By: cortinico, shwanton

Differential Revision: D74036994

Pulled By: arushikesarwani94

fbshipit-source-id: 520fc3dfdc1ecfb27f161a1b59ad5d79dfc854cf
2025-05-02 12:51:13 -07:00
Ramanpreet NaraandFacebook GitHub Bot f4d99d6a23 Reland: [rn][ios] Bridgeless: Fix unstable_hasComponent (#51053)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51053

unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.

## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.

The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.

## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.

Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.

Reviewed By: yungsters, cipolleschi

Differential Revision: D73949864

fbshipit-source-id: ac5b6fc373cb1b2436045ae1f78391f0712bca17
2025-05-02 12:27:58 -07:00
generatedunixname499836121andFacebook GitHub Bot c514333f41 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!

Changelog: [Internal]

<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge

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

GitHub Repo: facebook/react

Reviewed By: kassens

Differential Revision: D73844457

fbshipit-source-id: 840a8448839992538427cd52501cdfaf0a2e82da
2025-05-02 12:24:24 -07:00
David VaccaandFacebook GitHub Bot 3f62d001fd Update error message for non-registered ViewManagers (#51067)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51067

Update error message for non-registered ViewManagers

changelog: [internal] internal

Reviewed By: arushikesarwani94, cortinico

Differential Revision: D74048740

fbshipit-source-id: 016469ec79654863d51a7b1acff513bf50fd4e86
2025-05-02 12:22:32 -07:00
David VaccaandFacebook GitHub Bot 8c231b7d81 Document logic implemented in ComponentDescriptorRegistry when a component is not found (#51062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51062

Document logic implemented in ComponentDescriptorRegistry when a component is not found

changelog: [internal] internal

Reviewed By: arushikesarwani94, cortinico

Differential Revision: D74036572

fbshipit-source-id: 20a5d182e0308538cdfa3f5e97957d488f010f0d
2025-05-02 12:22:32 -07:00
David VaccaandFacebook GitHub Bot 5ae6f6be25 Cleanup and document ReactUnimplementedView (#51063)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51063

Cleanup and document ReactUnimplementedView

changelog: [internal] internal

Reviewed By: rshest, cortinico

Differential Revision: D74036571

fbshipit-source-id: 75077914697cac56743c99fba7d7cdccad5c828a
2025-05-02 12:22:32 -07:00
Mateo GuzmánandFacebook GitHub Bot 809372c49e Make EventBeatManager internal (#51057)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.fabric.events.EventBeatManager).

## Changelog:

[INTERNAL] - Make com.facebook.react.fabric.events.EventBeatManager internal

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

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

Reviewed By: javache, cortinico

Differential Revision: D74037193

Pulled By: arushikesarwani94

fbshipit-source-id: 77e677a977d8a5c4d7f985c3eff352c19ca1140c
2025-05-02 11:55:01 -07:00
HyunWoo LeeandFacebook GitHub Bot 78dbbaafdd Support collections dsl (#51042)
Summary:
This PR introduces a concise Kotlin DSL for constructing `ReadableMap` and `ReadableArray` in Android native modules:

- Adds `buildReadableMap { … }` and `buildReadableArray { … }` functions, modeled after Kotlin’s `buildMap`/`buildList` APIs.
- Wraps `Arguments.createMap()` / `Arguments.createArray()` in a type-safe, nested DSL to reduce boilerplate and prevent errors.
- Improves readability and maintainability when assembling nested map/array structures for React Native bridges.

Current code like:
```kotlin
val map = Arguments.createMap().apply {
  putString("name", user.name)
  putInt("age", user.age)
  // …
}
```

can now be written as:

```kotlin
val userMap = buildReadableMap {
  put("name", user.name)
  put("age", user.age)
  put("scores") {
    user.scores.forEach { add(it) }
  }
}
```

This feature proposal also written in [[Android] Support Collection DSL](https://github.com/react-native-community/discussions-and-proposals/issues/899)

## Changelog:

[Android] [Added] - Collections DSL functions for Kotlin(`buildReadableMap`, `buildReadableArray`)

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

Test Plan:
### Run Unit Test

```shell
cd packages/react-native/ReactAndroid
./gradlew :ReactAndroid:unitTest
```

Ensure all tests in `src/test/java/.../ReadableMapBuilderTest.kt` and `ReadableArrayBuilderTest.kt` pass.

Reviewed By: javache

Differential Revision: D73986390

Pulled By: cortinico

fbshipit-source-id: b9f94327646bcb6e0190cdd06dfb9bb5eaa6375c
2025-05-02 11:02:52 -07:00
Nicola CortiandFacebook GitHub Bot 2590438b67 Minor cleanup of AbstractLayoutAnimationTest (#51079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51079

This test was not using AssertJ. I've updated it then.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D74065455

fbshipit-source-id: 2393340fd75aaf9599ba789237c29bb91e0192ae
2025-05-02 10:21:57 -07:00
Alex HuntandFacebook GitHub Bot ec38728c75 Report PerformanceResourceTiming events (#51025)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51025

(Sparsely) wires up reporting of Network events to the Web Performance subsystem.

Our plan is to report to the Web Performance APIs (lightweight timing metadata, here) for all build flavours, and report to CDP (more costly full metadata/previews) in dev/profiling builds.

**Notes**

- Introduces `PerformanceEntryReporter::unstable_reportResourceTiming` — this will become "stable" when further network events/fields are fully hydrated on Android and iOS.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73922341

fbshipit-source-id: bcfc03c3d8a9a286ae72ba00a3313602fb2adea8
2025-05-02 08:14:40 -07:00
Alex HuntandFacebook GitHub Bot 6b304bc551 Fix missing podspec dependency in RCTNetwork (#51071)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51071

Follows D73995864.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D74062263

fbshipit-source-id: 2cb9bc30b36ecd2cd925bf5efa5ee31e9c8a92a6
2025-05-02 08:14:40 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 58a9046978 Improve cleanup script for ios (#51046)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51046

This small change improves the cleanup script for ios, which is now not deleting the workspace and that it might be keeping an outdated version of the codegen for OSS.

## Changelog:
[Internal] - Improve yarn clean-ios script

Reviewed By: cortinico

Differential Revision: D73988442

fbshipit-source-id: 6de5d6ab08812ba7fdb19b0cc955a38840d82f89
2025-05-02 04:21:12 -07:00
Mateo GuzmánandFacebook GitHub Bot 5d98f6f364 Kotlin: Clean up redundant constructs (#51061)
Summary:
Static code analysis detected several redundant constructs across the codebase. Most of the ones fixed here are marked as warnings/weak warnings, likely code smells post-migration from Java.

Doing a small round to clean up some of them.

## Changelog:

[INTERNAL] - Kotlin: Clean up redundant constructs

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

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

Reviewed By: rshest

Differential Revision: D74056259

Pulled By: javache

fbshipit-source-id: 04f7ce7ce7b4f6063c8e1712840a44fd91d3b9e1
2025-05-02 03:59:22 -07:00
Nicola CortiandFacebook GitHub Bot c6685d29ad Fix RNTester SampleLegacyModule not rendering in Old Arch (#51073)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51073

Currently the SampleLegacyModule screen is not loading in OldArch for RNTester.

That's because we gate adding a `SampleLegacyModule` to the BaseReactPackage
only if NewArch is enabled.

This shouldn't be the case as we can still build RNTester in oldarch and we
should be able to visualize the SampleLegacyModule example.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D74009245

fbshipit-source-id: 55eae3dc6063343f57261af2742e643a8e5c2b50
2025-05-02 03:59:10 -07:00
Mateo GuzmánandFacebook GitHub Bot 506f03b5e1 Make ShareModule internal (#51059)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.share.ShareModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.share.ShareModule internal

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

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

Reviewed By: javache

Differential Revision: D74037444

Pulled By: arushikesarwani94

fbshipit-source-id: 13f7652a0db35200b4de9ea95a800cf9ea52b837
2025-05-02 02:18:47 -07:00
Alex HuntandFacebook GitHub Bot e1632da01c Gate network event reporting with feature flag (#51050)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51050

Gate network event reporting on iOS (inputting into the network reporting subsystem), now that this is load-bearing with the Performance API.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D73995864

fbshipit-source-id: 65a15485cdae445eadff6c57148f3682af6de215
2025-05-01 23:19:29 -07:00
Mateo GuzmánandFacebook GitHub Bot c4a2cb9d90 Make JSResponderHandler internal (#51058)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.touch.JSResponderHandler).

## Changelog:

[INTERNAL] - Make com.facebook.react.touch.JSResponderHandler internal

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

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

Reviewed By: mdvacca

Differential Revision: D74036832

Pulled By: arushikesarwani94

fbshipit-source-id: c31cd271e7c1007fdfe9582c8c3055ecbda324a6
2025-05-01 22:45:33 -07:00
Alex HuntandFacebook GitHub Bot 195b723d74 Refactor performanceNow call, remove cxxreact dependency (#51024)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51024

Prevents a dependency cycle in the next diff.

Changelog: [Internal]

Reviewed By: rubennorte, hoxyq

Differential Revision: D73933671

fbshipit-source-id: 79c66cd5f6a32ed7287a2d6e7840a512466306a9
2025-05-01 22:40:39 -07:00
Alex HuntandFacebook GitHub Bot baf895c239 Add internal support for PerformanceResourceTiming (#50996)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50996

Adds a representation of the [`PerformanceResourceTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming) event type to the Web Performance subsystem, ahead of integration with our network event reporting.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73861431

fbshipit-source-id: 8258058c432727808d30c338bba79ca92a17c1c8
2025-05-01 22:40:39 -07:00
Alex HuntandFacebook GitHub Bot 1135f10e05 Refactor PerformanceEntry as std::variant (#50995)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50995

Refactors our previous single-struct representation for `PerformanceEntry` ([see MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry)) as a `std::variant`.

This maps closely to the `PerformanceEntry` type inheritance in the web spec, and makes this type substantially cleaner to extend and work with in D73861431.

Changelog: [Internal]

Reviewed By: rubennorte, rshest

Differential Revision: D73860532

fbshipit-source-id: f3b7a7444d2456370620c1a1ba9a43f118cb9730
2025-05-01 22:40:39 -07:00
Alex HuntandFacebook GitHub Bot e6870c68f9 Limit request body size for Network.requestWillBeSent (#51026)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51026

Performance optimisation — truncate request body content (sent as `Request.postData` over CDP) at 1MB.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D71905868

fbshipit-source-id: ba82b4937902e057d4694bf4f000eb77ee37aa8a
2025-05-01 21:46:36 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 04f0e66a6b Avoid accessing the MainBundle multiple times (#51044)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51044

This change prevents RN from accessing the MainBundle every time a NativeModule is registered by caching the `legacyLogEnabled` property in a static variable.

## Changelog:
[Internal] - Prevent multiple access to mainBundle

Reviewed By: javache

Differential Revision: D73992070

fbshipit-source-id: a14aada43f367314b7f868a0b5e30b9f92d0971a
2025-05-01 20:22:50 -07:00
Richard HowellandFacebook GitHub Bot 21bf7cf6cf remove ATOMIC_VAR_INIT
Summary:
ATOMIC_VAR_INIT is deprecated in C17, and does nothing anyway.

Changelog:
[iOS][Fixed] - Remove deprecated ATOMIC_VAR_INIT macro in RCTProfile.m

Reviewed By: NSProgrammer

Differential Revision: D74002901

fbshipit-source-id: e453fbc084cd0b1049c7f8b052c9779d9b19b44f
2025-05-01 19:16:54 -07:00
Nick GerlemanandFacebook GitHub Bot e4b6b346bc Remove ENABLE_MEASURE_LOGGING (#51064)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51064

This is pretty much just checked in printf debugging. Let's clean it up, before we duplicate some code which has the logs.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73975310

fbshipit-source-id: d2b936ad62a17aef20903fd2ca0defc23c647aa0
2025-05-01 18:13:39 -07:00
Nick GerlemanandFacebook GitHub Bot b1367eeb81 Resubmit: Incorporate maxLines and ellipsization into text layout (#51040)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51040

## Resubmit

We were previously only checking for `maxNumberOfLines` of `ReactConstants.UNSET` (-1), but it may also be `0` to signify unset from other checks (wut), and different versions of Android would handle this case of `maxLines={0}` differently.

The resubmission adds an explicit check for zero here as well.

```
      if (ReactNativeFeatureFlags.incorporateMaxLinesDuringAndroidLayout()) {
        if (maxNumberOfLines != ReactConstants.UNSET && maxNumberOfLines != 0) {
          builder.setEllipsize(ellipsizeMode).setMaxLines(maxNumberOfLines);
        }
      }
```

## Previous

Right now, we fully layout text, then use max lines to determine  a metric to use when calculating size.

Android API 23+ which we fully target allows incorporating ellipsization and maxlines directly into the layout. This will let us directly draw the layout when using maxLines later. This may also let Android optimize line-breaking a bit, when we hit truncation.

Special care is taken not to set this when we are in `adjustsFontSizeToFit` path, so that line count will flow over, signifing overflow.

I think the main user-facing change is that `onTextLayout` events will have measures post-ellipsization.

Changelog:
[Android][Changed] - Incorporate maxLines and ellipsization into text layout

Reviewed By: lenaic, joevilches

Differential Revision: D73953691

fbshipit-source-id: 2e08faab5bb9eda90a126545571bb441ea1ece39
2025-05-01 18:13:39 -07:00
Zeya PengandFacebook GitHub Bot 0c58ccf501 Call Java AudioModule from C++ TM to play audio (#51037)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51037

## Changelog:

[Android] [Changed] - Make mHybridData in CxxReactPackage protected

In some cases subclass needs to override it in constructor

Reviewed By: javache

Differential Revision: D73894471

fbshipit-source-id: 7958f9b88841a0201d39e49fba09af76927e5737
2025-05-01 14:22:10 -07:00
Fabrizio CucciandFacebook GitHub Bot b406c0a37e Add changelog entry for 0.79.2 (#51054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51054

As per title.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D74013007

fbshipit-source-id: f5a8a99956ec3fe4dcf56ffd5f7ed2f4cef158eb
2025-05-01 12:45:39 -07:00
Alex HuntandFacebook GitHub Bot b731ea3d3f Internalise RNTester examples referencing unexported APIs (#51019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51019

Follows D72228547 and D73770609.

This diff internalises (moves files from fbsource+GitHub to fbsource only) a number of RNTester examples which referenced `'react-native/src/private/'` subpaths.

In future, new components/APIs should be exported from index as `unstable_`, or added to `RNTesterListFbInternal` if they are exported from `src/fb_internal/`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73777092

fbshipit-source-id: d9fb0833c56f2ae580b6db62ddbbbeae774a0004
2025-05-01 09:58:30 -07:00
Alex HuntandFacebook GitHub Bot ba5acdba83 Introduce enableNetworkEventReporting and enableResourceTimingAPI feature flags
Summary: Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73995231

fbshipit-source-id: ade6f858b14928a32fa022d4e9a85704bc944726
2025-05-01 07:00:52 -07:00
Nick LefeverandFacebook GitHub Bot 07073fbac8 Override useShadowNodeStateOnClone for OSS (#51041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51041

Enabling `useShadowNodeStateOnClone` by default on OSS to resolve https://github.com/facebook/react-native/issues/49694

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D73970421

fbshipit-source-id: 4021c9fc07a7fc28012c022f6131409486e8aea7
2025-05-01 05:48:52 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e1d2285791 Do not access to main bundle when running in prod (#51043)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51043

The call to the mainBundle to read the `RCTLegacyWarningsEnabled` key can sometime deadlock in prod.
However, these are development logs that we don't want to run in Prod.

This change should disable the logs in prod, skipping the access to the `mainBundle`, and avoid the deadlock completely.

## Changelog:
[Internal] - Fix deadlock at startup to read `RCTLegacyWarningsEnabled`

Reviewed By: philIip, javache

Differential Revision: D73987454

fbshipit-source-id: 014410266733fdfa1e7b29d41fab5f7112b1ddb4
2025-05-01 04:48:55 -07:00
Pieter De BaetsandFacebook GitHub Bot 773ba66c64 Cleanup unnecessary unsafe dereferences in BlobModule (#51016)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51016

Addressing some lint feedback.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73840204

fbshipit-source-id: ed1035bb785ce0246e714bca86a1ae84578f1464
2025-05-01 04:07:30 -07:00
Mateo GuzmánandFacebook GitHub Bot 81f3f091ae Make ReactModalHostManager internal (#51002)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.modal.ReactModalHostManager).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.modal.ReactModalHostManager internal

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

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

Reviewed By: cortinico, rshest

Differential Revision: D73890830

Pulled By: alanleedev

fbshipit-source-id: 6443c4ab80a287fbe963ee60e361ff7864a0d73f
2025-05-01 02:23:01 -07:00
Joe VilchesandFacebook GitHub Bot 69f41ca367 a11y] Let links discovered by dataDetectorType be accessible (#50914)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50914

The URL spans generated by Linkify are not actually accessible because we do not update the delegate's virtual views.

I also had to change how AccessibilityLinks get generated, since it does not work well if it includes spans that are not `ReactClickableSpans`

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73612119

fbshipit-source-id: 0c6028a7473e0484216300863f2d7a043fb2ea85
2025-05-01 01:52:46 -07:00
Joe VilchesandFacebook GitHub Bot 70aced5eb1 Let LinkMovementMethod take precedence over accessibility delegate when dataDetector is present (#50887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50887

There is currently a bug with the recent changes to keyboard accessibility with Text and nested links. If something with nested links has a `dataDetectorType` prop then we have 2 different selections when we navigate with arrow keys since the drawing behind the 2 are separate.

Removing LinkMovementMethod is not possible since it allows for clicking the links it detects

As a result, lets just allow it to take precedence over the delegate when handling link navigation in the cases its present.

Changelog: [Android][Fixed] - Double selection with dataDetectorType and links

Reviewed By: NickGerleman

Differential Revision: D73549839

fbshipit-source-id: bbe37470e78841bb119fa68e197b327023031c7e
2025-05-01 01:52:46 -07:00
Ruslan LesiutinandFacebook GitHub Bot 0f5eeb6970 Use correct scriptId (#51030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51030

# Changelog: [Internal]

I've been using the wrong thing this whole time, because it is referenced in `ChromeTraceSerializer.cpp`:
https://www.internalfb.com/code/fbsource/[b422eeb3bb6334ef95e8cf01b18e32ba8ab72bbe]/xplat/hermes-snapshot/lib/VM/Profiler/ChromeTraceSerializer.cpp?lines=439

Turns out, there is a real `scriptId`, defined by the Runtime and which is unique for every script. This also aligns with other parts of the CDP stack in Hermes. Since this scriptId is always available, there is no need to make it optional.

Reviewed By: dannysu

Differential Revision: D73185984

fbshipit-source-id: 1bb057584cf3f18bd7b440fef44de9e880ceb961
2025-05-01 00:22:44 -07:00
Ruslan LesiutinandFacebook GitHub Bot 0b6ed6c7d5 Define range for iteration over samples and call stack frames (#51029)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51029

# Changelog: [Internal]

Instead of exposing vector of samples / call frames directly, we will share pair of iterators that would allow iterating over them in a specified order.

Reviewed By: dannysu

Differential Revision: D73448002

fbshipit-source-id: 16c476453e943a71403b375b168b30da7d261cfa
2025-05-01 00:22:44 -07:00
Ruslan LesiutinandFacebook GitHub Bot a5f2acde20 Avoid heap allocations when serializing sampling profile (#51028)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51028

# Changelog: [Internal]

There is a way to implement the trie without allocating `ProfileTreeNode` on the heap. The serialization logic (`RuntimeSamplingProfilerTraceEventSerializer.cpp`) remained mostly the same, the only new limitation is that we can only use pointer to `ProfileTreeNode` until the next push into a `children` container, when all pointers are invalidated. Not sure if we can avoid this invalidation, since we don't know the potential size of `children` vector, it has to be dynamically allocated.

Main changes are in `ProfileTreeNode`:
- Instead of receving already created instane that will be check if it should be added as a child, it will expose predicate to check if such node already exists - `getIfAlreadyExists`. If not, then caller can use `addChild` to register it and receive a pointer.

Reviewed By: huntie

Differential Revision: D73213284

fbshipit-source-id: 385be884bcc5feb61b3a8cbd0ff36402e3b20c6c
2025-05-01 00:22:44 -07:00
Ruslan LesiutinandFacebook GitHub Bot c09340e73e Use std::variant, remove heap allocations (#50847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50847

# Changelog: [Internal]

We have different types of call frames, right now we defined 4 of them. Previously, they would descend from `ProfileSampleCallStackFrame`, which has `kind_` field that can be used for determining the type of the call frame.
We were using polymorphism later on React Native side to cast from base type to derived.

Instead of this, and instead of doing heap allocations for potentially tens of thousands of objects, we will use std::variant for storing frames in a single container and them distinguishing them.

This fixes memory leaks caused by new-ing objects and not clearing out when Profile is destroyed.

Reviewed By: dannysu

Differential Revision: D72803934

fbshipit-source-id: a279c6d68c7c2628f0eab585f33137222ad9e3f1
2025-05-01 00:22:44 -07:00
Sam ZhouandFacebook GitHub Bot 88a04c530e Pre-suppress errors related to Object.assign
Summary:
The `Object.assign` support is [inherently unsound](https://github.com/facebook/flow/issues/3392), carries a lot of tech debt, and we want to error on them.

This diff pre-suppresses errors that will be added in the next version of Flow, to make the next release easier.

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D73963639

fbshipit-source-id: ebefc82c123588eb0b72ab48a24e45c42be33267
2025-04-30 19:44:58 -07:00
Nick GerlemanandFacebook GitHub Bot 025f2d931e Back out "Incorporate maxLines and ellipsization into text layout" (#51035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51035

This is causing some problems with older versions of Android. Let's back out for now.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73950625

fbshipit-source-id: 424dfc1216ae811e1e287774c6ac5d0c9ba5aa17
2025-04-30 17:45:25 -07:00
Joe VilchesandFacebook GitHub Bot 4d8eeb34f9 Allow accessibilityOrder to reference itself (#51004)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51004

It would be very convenient if `accessibilityOrder` could reference itself. Meaning the View with the `accessibilityOrder` prop can include its own `nativeID` in the array. This makes sense API wise - we allow for referencing parents and their descendants, so long as they are treated as an element and not a container. This is pretty nice since you no longer have to wrap everything in a View who's sole purpose is `accessibilityOrder`.

Under the hood things get a bit garbled, however, since iOS only lets you have UIViews that are either accessibility elements or accessibility containers - and we need to support both at the same time for this to work. To do this, we make use of the `UIAccessibilityElement` class and just forward all of the logic to the View with the `accessibilityOrder` prop. This View will also not be an accessibility element from the point of view of iOS.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D73792934

fbshipit-source-id: b0810277c8e410319639b863b59e4e60782bffca
2025-04-30 15:33:35 -07:00
Joe VilchesandFacebook GitHub Bot 62742e21c9 getShadowNodeClass() impl in PreparedLayoutTextViewManager (#50925)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50925

This crashes without this change, now it does not!

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73626930

fbshipit-source-id: 37fd99372d1781a9e895e854e8b2f75c568ef9c0
2025-04-30 15:08:53 -07:00
Mateo GuzmánandFacebook GitHub Bot b40157e758 Make FabricEventEmitter internal (#51001)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.fabric.events.FabricEventEmitter).

## Changelog:

[INTERNAL] - Make com.facebook.react.fabric.events.FabricEventEmitter internal

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

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

Reviewed By: cortinico, NickGerleman

Differential Revision: D73895164

Pulled By: arushikesarwani94

fbshipit-source-id: 46adb077f5d3ee93fe7006c0ffc6c9e87d50147f
2025-04-30 12:33:28 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot ae2773f231 Make AccessibilityOrder also include the host view (#51027)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51027

Simple change to make the host of `experimental_accessibilityOrder` include the view that hosts the property in its order.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73808337

fbshipit-source-id: 441329a6ca0cd4b0aba08bddb15143215d337e01
2025-04-30 11:54:09 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2d3285ab60 Bump Xcode to version 16.2 (#51014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51014

Starting from the [24th of April](https://developer.apple.com/news/upcoming-requirements/?id=02212025a), Apple only accepts app built with Xcode 16.0 or greater

This change bumps our CI to ensure that everything works with Xcode 16.

## Changelog:
[Internal] - Bump CI to Xcode 16.2

Reviewed By: javache

Differential Revision: D73924819

fbshipit-source-id: 82cdca5e12cee505de6e97513c07678776642d88
2025-04-30 09:49:42 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 9683287319 Bump maestro to 1.40 (#51022)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51022

As per title, it bumps maestro to 1.40 in CI

## Changelog:
[Internal] - Bump Maestro to 1.40

Reviewed By: cortinico

Differential Revision: D73929936

fbshipit-source-id: 7dfd974a0d1227520c5a6892ff4f157633fdbd54
2025-04-30 09:25:34 -07:00
generatedunixname89002005287564andFacebook GitHub Bot c232148e74 fbsource//xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo:deviceinfoAndroid (#51011)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51011

Reviewed By: rshest

Differential Revision: D73840378

fbshipit-source-id: 8a902c454b4b8252f8e690fb10de58cfecd6c703
2025-04-30 09:07:19 -07:00
Pieter De BaetsandFacebook GitHub Bot 8de401c625 Make ResourceDrawableIdHelper an object (#51013)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51013

There's no need to use a singleton pattern here, we can just use a Kotlin object.

Changelog: [Android][Removed] Deprecated `ResourceDrawableIdHelper.instance`

Reviewed By: Abbondanzo

Differential Revision: D73923281

fbshipit-source-id: f46e125ce595fe4506b9fb5aa471109f5ba150f0
2025-04-30 08:53:59 -07:00
Pieter De BaetsandFacebook GitHub Bot 16bfb2f87a Fixup tests for ReactHostImpl Kotlin migration (#51012)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51012

Splitting of from D73846053 to reduce size.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D73923280

fbshipit-source-id: 61840fce0a5ef8c5fb19396e55ce4bded0cdd9ff
2025-04-30 08:53:59 -07:00
Anupriya VermaandFacebook GitHub Bot f53d066d26 Support minimumFontScale in paragraphAttributes (#50933)
Summary:
Support minimumFontScale in paragraphAttributes

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

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Message

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

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

Test Plan:
Tested via this code here: https://github.com/microsoft/react-native-windows/pull/14617

Before:
![image](https://github.com/user-attachments/assets/76b94aa8-228b-4a7e-9ec0-c366c7bf38ac)

After:
![image](https://github.com/user-attachments/assets/f9fbf8c2-9776-429f-8605-5663f9c7b7c9)

https://github.com/user-attachments/assets/fb9ae889-7d01-4317-a6e6-61e6b0708bc4

Reviewed By: NickGerleman

Differential Revision: D73658489

Pulled By: cipolleschi

fbshipit-source-id: 87ed27c0de2363e2ce0d908cc26670349586e7a6
2025-04-30 05:30:19 -07:00
Nicola CortiandFacebook GitHub Bot 0abd5d63e1 Back out "Migrate ReactActivity" (#50998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50998

I'm reverting this as this change is too disruptive for the OSS ecosystem.
It will break ALL the apps written in Kotlin and it's coming too close to the branch cut which is in less than one week.

We need to re-do this migration in a non breaking manner after the branch cut as this is highly disruptive for little benefit at this point

Changelog
[Android][Changed] - Back out "[RN][Kotlin] Migrate ReactActivity"

Original commit changeset: 936263100ca9

Original Phabricator Diff: D73507044

Reviewed By: mdvacca

Differential Revision: D73864144

fbshipit-source-id: 264921b1f1cd38301e66364de4b619807272bd27
2025-04-29 21:50:25 -07:00
Mateo GuzmánandFacebook GitHub Bot 79d3cb7e1e Make EventEmitterWrapper internal (#51003)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.fabric.events.EventEmitterWrapper).

## Changelog:

[INTERNAL] - Make com.facebook.react.fabric.events.EventEmitterWrapper internal

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

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

Reviewed By: NickGerleman

Differential Revision: D73888667

Pulled By: arushikesarwani94

fbshipit-source-id: 2119775a5630e76a46924d7db3afd8d5ab6f082b
2025-04-29 19:16:31 -07:00
Nick GerlemanandFacebook GitHub Bot e43c5db84b Spannable -> Spanned (#51006)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51006

Moves a bit of code, reading spans that we may not control, to query for `Spanned`, instead of `Spannable`, since some code (see last diff around ellipsization) may wrap intermediate Spannables.

Changelog: [internal]

Reviewed By: joevilches

Differential Revision: D73820368

fbshipit-source-id: e107bcf1f2f7d5555fca68fb2209c12c3f99c099
2025-04-29 18:45:58 -07:00
Nick GerlemanandFacebook GitHub Bot 746275ff14 Incorporate maxLines and ellipsization into text layout (#51007)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51007

Right now, we fully layout text, then use max lines to determine  a metric to use when calculating size.

Android API 23+ which we fully target allows incorporating ellipsization and maxlines directly into the layout. This will let us directly draw the layout when using maxLines later. This may also let Android optimize line-breaking a bit, when we hit truncation.

Special care is taken not to set this when we are in `adjustsFontSizeToFit` path, so that line count will flow over, signifing overflow.

I think the main user-facing change is that `onTextLayout` events will have measures post-ellipsization.

Changelog:
[Android][Changed] - Incorporate maxLines and ellipsization into text layout

Reviewed By: joevilches

Differential Revision: D73811573

fbshipit-source-id: df83295d0902ae8b043ce57b06cbb9c8f0c194fc
2025-04-29 18:45:58 -07:00
Nick GerlemanandFacebook GitHub Bot 6f0a0a5c2c Correctly Pass SurfaceID to TextLayoutManager (#51005)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51005

We need to get a context corresponding to the root being passed, to be able to resolve things like theme to use. RIght now that's a TODO, that's been around since new arch. Let's pass the real data along.

Changelog:
[Android][Fixed] - Correctly Pass SurfaceID to TextLayoutManager

Reviewed By: javache

Differential Revision: D73819640

fbshipit-source-id: 1ae2505b59b8577d35a4dc5bb2a524663f3bd47f
2025-04-29 18:45:58 -07:00
Nick GerlemanandFacebook GitHub Bot 2e42eab6df Platform specific TextLayoutManager Headers (#50889)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50889

This effectively reverts D67064488

We are trying to smash together functions, variables, virtual or non-virtual, all required by different platforms, into a single header, often using #ifdefs that are not what we want (apart from a bad editor experience, `#ifdef ANDROID` may or may not be compiled into the react-native-cxx platform, and we cannot use it for the Android platform reliably).

For Facsimile, we are going to be introducing more potential divergence, with the idea of `PreparedText`, where we can generate intermediate products as part of the layout process to be reused later. I'm planning to design that in a way which can be eventually reused across platforms, but not everywhere.

I think the best path for this is going to be to allow each platform to have their own headers, instead of the current messiness, then allow shared code (e.g. in `ParagraphShadowNode`) to pick how to interact at compile time. I added an example of this as part of `TextLayoutManagerExtended`, to customize how we act if a `TextLayoutManager` chooses not to implement `measureLines`.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73557126

fbshipit-source-id: 9851ebba691b0d123f6a355126f2d5b003aceba0
2025-04-29 18:45:58 -07:00
Martin BoothandFacebook GitHub Bot 2efe8094c0 Include offset as separate field in payloads (#50970)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50970

__onAnimatedValueUpdateReceived is called from 2 places.

It is called from the onAnimatedValueUpdate subscription where the source of the values comes from here: https://fburl.com/8v2cwd2x with getValue() returning the offset + value components combined.

It's also called from in the animation end callback here: https://fburl.com/h36xy2nw where the source of this value comes from https://fburl.com/sud7m7st. In this case it's accessing `nodeValue` directly rather than calling getValue() and so it only includes the value component.

In this diff we pass both the value and offset in both onAnimatedValueUpdate callbacks as well as endCallback.

This allows us to separate the value from the offset on the JS side and ensures we have the latest offset value from native

Changelog: [Android][Fixed] - Sync offset and value from native -> js in separate fields

Reviewed By: zeyap

Differential Revision: D73795619

fbshipit-source-id: e8ed234497e3fcaf9d2a137aa1e17ca8d0f76d97
2025-04-29 17:03:44 -07:00
Samuel SuslaandFacebook GitHub Bot 1c5ec4bd35 introduce more tests for edge cases for view culling (#51000)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51000

changelog: [internal]

# Why so many tests?
Differentiator has two modes: regular and reparenting. The reparenting one is almost a completely separate Differentiator, effectively doubling the complexity. It handles quite a few different special cases and is not covered by any reasonable tests, so here I am adding the tests to make sure every branch of the reparenting Differentiator is traversed.

Reviewed By: lenaic

Differential Revision: D73845746

fbshipit-source-id: 27a9fd72a5f8111b84e231cf8f495e278037a323
2025-04-29 14:57:08 -07:00
David VaccaandFacebook GitHub Bot 0a5b21c44c Setup feature flag to fix double measurement of android components (#50971)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50971

This feature flag enables a fix of double measurement on a subset of android components

changelog: [internal] internal

Reviewed By: yungsters

Differential Revision: D73804996

fbshipit-source-id: 3271deb8a8bf4c132cbfb6819f72cab556c6253c
2025-04-29 13:50:57 -07:00
Ruslan LesiutinandFacebook GitHub Bot 996630b5b5 Avoid copying samples list when serializing (#50985)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50985

# Changelog: [Internal]

There may be tens of thousands of samples stored, so we should avoid copying it. I don't think we should restrict it from being copied, though, but we don't need it to copy in this case.

Reviewed By: huntie, dannysu

Differential Revision: D73106950

fbshipit-source-id: 45c027ea8bfc3424fe3428f5578d5bed3d1cdda9
2025-04-29 12:03:11 -07:00
Ruslan LesiutinandFacebook GitHub Bot b08f87aa90 TraceEventProfile as plain data structs (#50984)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50984

# Changelog: [Internal]

We are only using these struct to define how they will be serialize before sending over CDP, no need for custom constructors.

Also updated the naming of the serialization method to align with other parts of the project: `asDynamic()` -> `toDynamic()`.

Reviewed By: huntie

Differential Revision: D73774114

fbshipit-source-id: d0371cf3dee7584daa77054f73aced440550e674
2025-04-29 12:03:11 -07:00
Alex Taylor (alta)andFacebook GitHub Bot 78e45e5828 Deploy 0.269.1 to xplat (#50993)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50993

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D73853679

fbshipit-source-id: 4860c205f764a0be14080015cab1759bb59f442b
2025-04-29 10:24:21 -07:00
Rubén NorteandFacebook GitHub Bot 6dc4da466a Refactor event dispatching logic to improve readability and performance slightly (#50991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50991

Changelog: [internal]

TSIA.

Reviewed By: javache

Differential Revision: D73853068

fbshipit-source-id: 93e33072e4ce14225cc76ca8daf5d8816489ac7b
2025-04-29 10:13:09 -07:00
Rubén NorteandFacebook GitHub Bot 030ca3c543 Fix bug when dispatching unique and non-unique events of the same type on the same target (#50988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50988

Changelog: [internal]

This fixes a potential bug where we coalesce unique events with non-unique ones of the same type and target.

Not marked as a bug fix in the changelog because this wouldn't happen in practice, as we always dispatch events of a given type the same way (all unique or all non-unique).

Reviewed By: sammy-SC, javache

Differential Revision: D73849222

fbshipit-source-id: 6f387d63b3a68dccc81c110287d42e15e31c181e
2025-04-29 10:13:09 -07:00
Rubén NorteandFacebook GitHub Bot ab543d1ab1 Add isUnique option in RawEvent and refactor EventQueue to use it (#50987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50987

Changelog: [internal]

This adds a new `isUnique` option in `RawEvent` to determine if it's unique (whether it should be coalesced with other unique events of the same type and target).

This effectively makes `dispatchUniqueEvent` redundant, as we can use `dispatchEvent` with a `RawEvent` marked as unique.

This will allow us to fix the bug we found in the new tests for event dispatching, where non-unique events of a given type where being coalesced with non-unique events of the same type.

Reviewed By: javache

Differential Revision: D73849220

fbshipit-source-id: ce89623aee509071ab6a86654ee25d9614863a8a
2025-04-29 10:13:09 -07:00
Rubén NorteandFacebook GitHub Bot 41de764c83 Add Fantom test for Fabric event dispatching (#50989)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50989

Changelog: [internal]

Just adding a test suite to verify the behavior of event dispatching in Fabric (especially around event priorities, automatic determination based on ContinuousStart/ContinuousEnd and unique events).

This also surfaced a bug where we incorrectly batch unique and non-unique events together (see the disabled test).

Reviewed By: javache

Differential Revision: D73849218

fbshipit-source-id: 404172822d6985283a161c8a56575e0b5658a5cc
2025-04-29 10:13:09 -07:00
Rubén NorteandFacebook GitHub Bot 524afb4c2a Expose event priorities in Fantom and JS (#50986)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50986

Changelog: [internal]

This just exposes some enum values and methods that we forgot to expose in a few interfaces.

Reviewed By: javache

Differential Revision: D73849221

fbshipit-source-id: 19014d53216e67c77b0c31e5ade8f86de071b001
2025-04-29 10:13:09 -07:00
riteshshukla04andFacebook GitHub Bot 761b15888d Migrate ViewGroupManager to kotlin (#50895)
Summary:
This PR aims to migrate ViewGroupManager to kotlin as part of https://github.com/facebook/react-native/issues/50513
## Changelog:
[ANDROID][CHANGED]Migrate ViewGroupManager to kotlin

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

Test Plan: Tested with RN tester with old and new arch

Reviewed By: javache

Differential Revision: D73770843

Pulled By: cortinico

fbshipit-source-id: 45959a8bf512b3590ca8bc64dac281e13fa41ca3
2025-04-29 09:47:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 9a448736c1 Fix E2E tests for template (#50990)
Summary:
With the redesign of the new app screen, the E2E tests against the template started failing because we don't have a `Step One` string anymore.

This change should fix them.

## Changelog:
[Internal] - Fix Template E2E tests

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

Test Plan: tested by running the E2E tests on this PR

Reviewed By: huntie

Differential Revision: D73855988

Pulled By: cipolleschi

fbshipit-source-id: d0d72e5a07cd88923e310767eae27f5df376d637
2025-04-29 09:14:11 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 91829bef5a Integrate sending notification to discord (#50979)
Summary:
As part of the work to integrate libraries with our nightlies, we want to receive a message when the libraries are failing to build on discord. This will help us catch breaking changes early on and onboarding library maintainer as soon as possible.

## Changelog:
[Internal] - Integrate with Discord when nightly fails

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D73845810

Pulled By: cipolleschi

fbshipit-source-id: c6cfdf16b29642b1c3ad3872096c0e815fa88a0a
2025-04-29 08:57:30 -07:00
Lenny KarununganandFacebook GitHub Bot 868ec3db86 fix crash when host pause called and mCurrentActivity is null (#50992)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50992

shouldnt happen but when it does it shouldnt crash some more

fix for P1798860939

Changelog: [Internal] - fix crash when onHostPause is called and mCurrentActivity is null

Reviewed By: cortinico

Differential Revision: D73852655

fbshipit-source-id: 19ee4ada1c71a34a6115882e9a558b4ea9f9d8c7
2025-04-29 08:53:09 -07:00
Alex HuntandFacebook GitHub Bot 0968707ef7 Create src/fb_internal/ directory, initially migrate VirtualView (#50965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50965

While D72228547 has recently disallowed all `./src/*` subpath imports from React Native (functionally, `./src/private/*`), we have a number of APIs that are imported from Meta product code legitimately — e.g. as part of validating under-development React Native features internally in real Meta apps.

This diff defines a new, exported `./src/fb_internal/*` subpath via `package.json#exports`, which will allow us to expose select entry points for this purpose.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73770609

fbshipit-source-id: 397019669e565b95a86302ef30f80b65a17dcc0d
2025-04-29 07:52:24 -07:00
Jakub PiaseckiandFacebook GitHub Bot d2556c3cbd Update exports field to include the types entry (#50974)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50974

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73835331

fbshipit-source-id: dc5002287408177db527140db967928a7714cf56
2025-04-29 07:37:39 -07:00
Alex HuntandFacebook GitHub Bot 46ddb604d9 Update Metro dependencies to 0.82.2 (#50977)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50977

Updates all `metro*` dependencies to the latest `^0.82.2`.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D73841705

fbshipit-source-id: dc550abfecddce933ed148f094aaf8629ffe549b
2025-04-29 06:25:22 -07:00
Dawid MałeckiandFacebook GitHub Bot 7959a63a1a Migrate rn-tester codegen types imports to use root exported CodegenTypes namespace (#50976)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50976

This is the second part of the migration of `rn-tester` package to use root imports. In this diff the `CodegenTypes` namespace is used to define Codegen primitives.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D73780584

fbshipit-source-id: c13c2dfcfa4d023978a9463af1d2a3bf7b72476c
2025-04-29 06:06:16 -07:00
Dawid MałeckiandFacebook GitHub Bot 9666a68977 Attach docs in AnimatedExports (#50975)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50975

Re-defining types in `AnimatedExports.js.flow` shadows their documentation located in `AnimatedImplementation`. Moving them to the `AnimatedExports` fixes the issue for generated TS types.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D73840908

fbshipit-source-id: 2648498a53660b483c70be647716accc11e96d82
2025-04-29 05:05:37 -07:00
Nicola CortiandFacebook GitHub Bot f882206bc9 Fix typo in ScrollView.d.ts (#50978)
Summary:
Fixes https://github.com/facebook/react-native/issues/50969

## Changelog:

[INTERNAL] -

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D73842116

Pulled By: cortinico

fbshipit-source-id: 90bcbdec46a5de02c34c909e6e411f7cd0ae34eb
2025-04-29 04:01:37 -07:00
Joe VilchesandFacebook GitHub Bot e486fda106 Check feature flags for a11yOrder iff prop exists (#50967)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50967

In some cases we may want to check this only if the prop exists

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73793783

fbshipit-source-id: b498f82414edf63d8644b90bb3932298eb37b43c
2025-04-28 14:39:31 -07:00
Martin BoothandFacebook GitHub Bot 3e3094c3dd Sync offset value to native immediately (#50941)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50941

Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302

fbshipit-source-id: 7e67a7f41d900cc225af410af94ccdfd33c170c8
2025-04-28 14:06:44 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 4ce093154d Add screenReaderFocusable prop (#50850)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50850

This prop will be used to enable screen reader focusability without allowing keyboard focus. Mostly a quality of life prop for product engineers and maps 1:1 to Android

Changelog: [Android][Added] - Expose Android's screenReaderFocusable prop

Reviewed By: javache

Differential Revision: D73382051

fbshipit-source-id: 8171b9d24a735dd42d54abe4537fb487bdd011b7
2025-04-28 12:11:04 -07:00
Alex HuntandFacebook GitHub Bot 99c3aa3861 Add "./scripts/*" exports subpath (#50966)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50966

Should fix non-`.js` script resolution using `require.resolve` (currently breaking CI).

Changelog: [Internal]

Reviewed By: mdvacca, cipolleschi, rshest

Differential Revision: D73786668

fbshipit-source-id: 9f793cd9df217158aa4ade0a0b41c183caefae49
2025-04-28 11:41:50 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot fd8a3456ca Add accessibilityRespondsToUserInteraction prop (#50837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50837

This prop can be used to disable user interaction with switch control, voice control or full keyboard access.

VoiceOver is not affected by it.

https://developer.apple.com/documentation/swiftui/view/accessibilityrespondstouserinteraction(_:)

Changelog: [iOS][Added] - Expose iOS's accessibilityRespondsToUserInteraction as a prop

Reviewed By: joevilches

Differential Revision: D73382060

fbshipit-source-id: c9f3137adc0ea34a58435f7f0438748fbfcc5a18
2025-04-28 11:15:35 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 1cfb46b63b Override updateRuntimeShadowNodeReferencesOnCommit for OSS (#50962)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50962

OSS is affected by https://github.com/facebook/react-native/issues/49694 and it is endangering the migration of multiple apps to the New Architecture.

We fixed the issue but it is hidden behind feature flag while we are experimenting with it internally, to make sure it does not causes regressions.

However, the fix has been verified for the reproducer code and the OSS will be beneficial for the community.

We are overriding the featureFlag, enabling it for OSS.

## Changelog:
[Internal] - Enable `updateRuntimeShadowNodeReferencesOnCommit` for OSS

Reviewed By: lenaic, cortinico

Differential Revision: D73771648

fbshipit-source-id: 4394a2370d9edd9699c8e03293868defd465853c
2025-04-28 10:55:07 -07:00
Jakub GrzywaczandFacebook GitHub Bot 4d7c4bd6e8 Fix ImageSource require (#50963)
Summary:
In react-native-svg, I found that the `Image` component stopped working starting with `react-native@0.79`. After some debugging, I traced the issue to the migration of `Libraries/Image` to the new export syntax (see https://github.com/facebook/react-native/commit/8783196ee540f8f78ce60ad20800338cc7645194). To fix this, I updated the import to match other requires, similar to https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L84.

## Changelog:

[GENERAL] [FIXED] - Fix codegen ImageSource require

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

Test Plan:
`validAttributes` process should be a function instead of object with a default property.

Before:
<img width="1041" alt="image" src="https://github.com/user-attachments/assets/9fbc9e9f-6c45-4b0b-adb8-2eb911676fe1" />

After:
<img width="1005" alt="image" src="https://github.com/user-attachments/assets/ee594103-90da-4917-8252-72f4ecfc28e1" />

Reviewed By: Abbondanzo

Differential Revision: D73778127

Pulled By: huntie

fbshipit-source-id: ae80c770e8e578794ae1356751f170ff955e1f5a
2025-04-28 10:30:21 -07:00
Alex HuntandFacebook GitHub Bot 6ea24f7bb9 Define "react-native-strict-api" type exports (#50909)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50909

Enables and maps the `types_generated/` directory for `react-native` and `react-native/virtualized-lists` — exposing the new Strict TypeScript API entry points to React Native.

**New `"exports"` conditions**

- `"react-native-strict-api"` — The Strict TypeScript API opt in, exposing the `index.d.ts` entry point only.
- `"react-native-strict-api-UNSAFE-ALLOW-SUBPATHS"` — Opts into the new from-source generated types, but allows accessing subpaths (unsafe).
    - We intend for this unsafe condition to be an escape hatch for Frameworks only (i.e. Expo).

Note: In the case of `virtualized-lists`, we simply use the `"types"` condition — since this package did not expose any TypeScript API previously.

NOTE: Should we need to roll back JS Stable API phase 1, **this is the single diff to revert**.

Changelog:
[General][Added] - Configure the "react-native-strict-api" opt in for our next-gen TypeScript API

Reviewed By: cipolleschi

Differential Revision: D71969602

fbshipit-source-id: 291182cc826db8b33f21fc79698e6096876d17ef
2025-04-28 10:00:39 -07:00
Alex HuntandFacebook GitHub Bot 1d8fec19f0 Fix all active ESLint warnings (#50964)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50964

Address/supress ESLint warnings across the codebase, currently flagged on every PR via GitHub's "Unchanged files with check annotations" check.

{F1977480883}

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D73778510

fbshipit-source-id: 91bed86877eae74fa3b9ebea71e26cdcaeee1761
2025-04-28 09:31:46 -07:00
Vin-XiandFacebook GitHub Bot 93efaeb241 refactor: rewrite Inspector from Java to Kotlin (#50947)
Summary:
Rewrite of the Inspector class from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513

## Changelog:
[ANDROID] [CHANGED] - Migrated Inspector to Kotlin

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

Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages

Reviewed By: cortinico

Differential Revision: D73767386

Pulled By: javache

fbshipit-source-id: e0098568aa0ed9863503e206a88d3b171c8f9966
2025-04-28 09:20:56 -07:00
Nicola CortiandFacebook GitHub Bot 0e963aaa54 Gradle to 8.14 (#50960)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50960

This brings Gradle to the latest minor ahead of branch cut.

Changelog:
[Android] [Changed] - Gradle to 8.14

Reviewed By: cipolleschi

Differential Revision: D73769416

fbshipit-source-id: 52fd6b36068a719fbfdee6b5df0e80573567487a
2025-04-28 08:01:08 -07:00
Dawid MałeckiandFacebook GitHub Bot ddcab831b1 Migrate already root exported deep imports in rn-tester. (#50958)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50958

In rn-tester package there are many react-native deep imports which will be deprecated in the future. It is a starter for migrating rn-tester to using root imports instead. Only deep imports that are already root exported are changed. This diff avoids using `CodegenTypes` as it causes build errors and will be resolved in next stages.

Besides import changes, `PointerEvent` type is now also exported from the root.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D73656526

fbshipit-source-id: 5814a3d9c6a04b1236581dbbe291cd109e2c71c0
2025-04-28 07:24:46 -07:00
Rubén NorteandFacebook GitHub Bot e162fba413 Update interruptible rendering test to use feature flag to fix React<>Fabric priorities (#50959)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50959

Changelog: [internal]

This updates the test for interruptible rendering to use the feature flag that fixes priority mapping between Fabric and React.

In this case, it shows how the change fixed how React Native implements the React programming model, as before this change continuous events weren't interrupting transitions (and they should): https://github.com/facebook/react/blob/c498bfce8b9baa3dd21bd0d5124eb3a4549886f1/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js#L109

Reviewed By: sammy-SC

Differential Revision: D73662527

fbshipit-source-id: 6276fe6f02b6c4e1af8dbb7d46c9a14ee6846636
2025-04-28 06:55:25 -07:00
Rubén NorteandFacebook GitHub Bot 9ae7f7fcc1 Refactor InterruptibleRendering Fantom test to use dispatchNativeEvent (#50957)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50957

Changelog: [internal]

Now we can use the higher level API for event dispatching in this test.

Reviewed By: javache

Differential Revision: D73663626

fbshipit-source-id: 961af26f62128f093c71ad14f457ac8544348415
2025-04-28 06:55:25 -07:00
Dawid MałeckiandFacebook GitHub Bot a120c5c4db Ignore warnings for imports from react-native/Libraries/Core/InitializeCore (#50903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50903

For now we do not change the way this module is exported to prevent breaking changes (due to high usage in external packages).  It is a tentative mitigation - this case requires more discussion and what could be sufficient. The `no-deep-imports` rule and plugin shouldn't emit a warning when encountered.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D73590627

fbshipit-source-id: 6f85c52373ee6c7c538c632b55cd9e0b9357f2a3
2025-04-28 05:32:11 -07:00
Sanjay ThakurandFacebook GitHub Bot 7a919d6966 Fix EXC_BAD_ACCESS within RCTInspectorNetworkReporter (#50952)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50952

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D73720844

fbshipit-source-id: 5acde68e811782a1a402ad633b56c7bdd9b7ea22
2025-04-28 04:55:05 -07:00
Nicola CortiandFacebook GitHub Bot 9345c88a61 Implement LegacyArchitecture warning for ShadowNode measure() (#50932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50932

Add a warning for LegacyArch users that are providing a ViewManager with a corresponding shadow node that implements the `YogaMeasureFunction`.

For those users, we know that the ViewManager is most likely not working on the NewArch (unless they have a backward compat ViewManager with a C++ shadow node implementation).

Changelog:
[Android] [Added] - Warn Legacy Arch users if they use a Component with a ShadowNode with `YogaMeasureFunction.measure()` function. That Component will stop working on NewArch.

Reviewed By: javache

Differential Revision: D73654273

fbshipit-source-id: 70d232434f94bc2a6970379d566b276f73850fce
2025-04-28 04:28:06 -07:00
Alex HuntandFacebook GitHub Bot 3cf0102007 Redesign New App Screen and move to package (#50939)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50939

Redesigns React Native's `NewAppScreen` component, and moves it into a new `react-native/new-app-screen` package with a single component export. Deletes the old New App Screen under `'react-native/Libraries/NewAppScreen/'`.

{F1977434404}

**Motivation**

- **Reduces our public API** (see https://github.com/react-native-community/discussions-and-proposals/pull/894)
    - Separates this screen from the main `react-native` package, where it was a number of subpath exports.
    - Reduces the size of the main `react-native` package, including image assets — which are redundant for consumers like Expo.
- **Updated visual treatment**
    - Replace outdated logo, update to a responsive tablet/windowed layout.
    - Removes outdated guidance (e.g. "use cmd+R to reload"), and generally simplifies the layout (with the aim of reducing future maintenance).
- **Simplifies template boilerplate**
    - `NewAppScreen` is now a fully encapsulated screen layout, avoiding the cruft of the previous modular design.

**Integration plan**

When we cut the `0.80-stable` branch, we'll update [the template](https://github.com/react-native-community/template/blob/main/template/App.tsx) to import and use `<NewAppScreen />`.

- This will cause an extra runtime dependency in the template `package.json`, which will require user cleanup. We are happy with this tradeoff, given the self-evident package name, reduction of template boilerplate, and size reduction on the main `react-native` package.

Changelog:
[General][Breaking] - The `NewAppScreen` component is redesigned and moved to the `react-native/new-app-screen` package

Reviewed By: cipolleschi

Differential Revision: D73657878

fbshipit-source-id: 9ca07afa9fbdd6f32015eafa2f27d52ed182918e
2025-04-28 04:17:21 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 1b4a6ec1ca fix(CI): run monitor-new-issues only in the main repo (#50951)
Summary:
This PR makes sure that monitor-new-issues runs only in the main repo. It was failing on my fork and spamming notifications.

## Changelog:

[INTERNAL] [FIXED] - run monitor-new-issues only in the main repo

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

Test Plan: CI Green

Reviewed By: cipolleschi

Differential Revision: D73763006

Pulled By: cortinico

fbshipit-source-id: cbb22f8804448b41de970d3d11930110b353994f
2025-04-28 03:22:04 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 403feb9bc2 Migrate ReactActivity (#50871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50871

# Changelog:
[Android][Changed] - ReactActivity has been migrated to Kotlin.

Reviewed By: cortinico

Differential Revision: D73507044

fbshipit-source-id: 936263100ca93dafd643a53e5cb799fd5ed7e584
2025-04-28 01:53:11 -07:00
Mateo GuzmánandFacebook GitHub Bot 29cc2357e2 Remove unused com.facebook.react.bridge.MemoryPressure class (#50924)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.MemoryPressure).

Edit: we can remove it as has no usages

## Changelog:

[INTERNAL] - Remove unused com.facebook.react.bridge.MemoryPressure class

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

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

Reviewed By: javache

Differential Revision: D73643870

Pulled By: rshest

fbshipit-source-id: 80c9abe82352a13cdd9f4110349e03656d423a05
2025-04-28 01:23:25 -07:00
Martin BoothandFacebook GitHub Bot 9efcdc091c Calling setOffset actually calls setAnimatedNodeOffset currently (#50913)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50913

Changelog: [Android][Fixed] - Fix BatchExecutionOpCodes.OP_CODE_SET_ANIMATED_NODE_OFFSET mapping to call setAnimatedNodeOffset (rather than setAnimatedNodeValue)

Reviewed By: zeyap, Abbondanzo

Differential Revision: D73608624

fbshipit-source-id: 38e5b94d9fa8b0a0d776e7886020b4cb1e347821
2025-04-27 17:52:17 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot eb2f6b1ae5 Fix RemoveClipped subviews algorithm
Summary:
For real this time, the change was lost due to some merge conflict

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D73726167

fbshipit-source-id: 1e0cef75f59a166d795922266365b2b7b060472e
2025-04-26 17:35:22 -07:00
Alex HuntandFacebook GitHub Bot 319ba0afd2 Define "exports" field on main package (#50872)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50872

NOTE: Resubmission of D71968187.

Define `"exports"` field on the main `react-native` package.

**Notes**

Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible).

- Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged )
    - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)
        - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged )
- Exports `./package.json` (unchanged )
- TypeScript should:
    - fall back to the `"types"` field (unchanged )
    - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged )

Changelog:
[General][Breaking] - The `react-native` package now defines package.json `"exports"`.
- While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools.
- Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code.
- Imports from `src/` and `src/private/` directories are disallowed.

Reviewed By: robhogan

Differential Revision: D72228547

fbshipit-source-id: d50d6e556d32a9cf2f90855a562e61549853acb9
2025-04-25 15:40:14 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 9526406fc2 Fix crash with nested FlatLists and fix edge case with nested views (#50855)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50855

This diff addresses a crash caused by view duplication in React Native Android. The issue occurred when a view was not already clipped and was laid out again, resulting in duplicated views.

This problem was particularly noticeable when using nested FlatLists, which triggered a custom focus search with an incomplete and buggy duplicated FlatList container view.

The fix involves preventing the duplication of views by checking if a view is clipped already before laying it out again. Additionally, this diff includes two other improvements:
- Preventing clipping issues: When a view is nested within a non-ReactClippingViewGroup ancestor, focus searching would fail due to the needUpdateClippingRecursive logic only running on instances of ReactClippingViewGroup. By excluding these ancestors, we ensure that the next focusable view can be properly excluded from being clipped.
- Minor fix: A minor fix was made to prevent potential issues in deeply nested cases.
- Add a Kill switch with a feature flag and mobile config combo.

Reviewed By: joevilches

Differential Revision: D73471780

fbshipit-source-id: efbb968600f21b24ab1fa32222d555f346fb336e
2025-04-25 13:01:31 -07:00
Adrian StoneandFacebook GitHub Bot 0f55ef7754 Replace hsr_core dependency for react profiling with hz_tracing dependency (#50936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50936

D63141469 introduced an option to use HSR Core's trace macros for profiling react.  I believe this was to enable Tracy support.  However, the consequence of this is that hsr core is statically linked twice into Worlds, once in libclient_server_android.so and once into libxplat_js_react-native-github_packages_react-native_ReactCxxPlatform_react_profiling_profiling.so.
It isn't obvious that this causes any problems, but it does result in some weirdness with regard to symbol interposition between the two shared libraries.  Some tracing categories are registered twice in hz_tracing, for example.

Since the HSR Core macros call directly through to hz_tracing, this change simply replaces the HSR Core dependency with an equivalent hz_tracing dependency.

Reviewed By: javache

Differential Revision: D73532803

fbshipit-source-id: 56d4b62873aabcbf0a92cebd7a0f720fed616158
2025-04-25 11:31:43 -07:00
David VaccaandFacebook GitHub Bot dfa3a9575a Remove usages of ShadowNodes by fully releasing disableShadowNodeOnNewArchitectureAndroid() (#50908)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50908

This diff removes the usages of ShadowNodes in the new architecture by fully releasing disableShadowNodeOnNewArchitectureAndroid() feature flag.
changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D73519567

fbshipit-source-id: e222e3b4fab371c8bc5480950da005d2a12a8619
2025-04-25 10:29:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6520db2868 Fix RNTester running in the old architecture (#50940)
Summary:
We landed a PR that was importing a file available only in the New Architecture also when the app was running in the old architecture.
This was creating a corrupted bundle for rntester.

This PR fixes the issue

bypass-github-export-checks

## Changelog:
[Internal] - Fix RNTester on Android

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

Test Plan: Tested locally by setting `newArchEnabled` to false in the gradle.properties file

Reviewed By: javache, cortinico

Differential Revision: D73663049

Pulled By: cipolleschi

fbshipit-source-id: c8d6e4190adee7388e51901360a811b0007ee3a5
2025-04-25 09:53:38 -07:00
Rubén NorteandFacebook GitHub Bot 2489308871 Improve pattern to access host instances in tests (#50938)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50938

Changelog: [internal]

No more `maybeNode`s. Using ref objects makes the tests cleaner and the JSX easier to read than injecting lambdas.

This speaks for itself:
* 617 lines added
* 1393 lines removed

{F1977434870}

Reviewed By: lenaic

Differential Revision: D73659018

fbshipit-source-id: d1c23e6457bb1d351ce02b9f6fa8778b06ee0e55
2025-04-25 09:22:02 -07:00
Samuel SuslaandFacebook GitHub Bot 12b4a0f4f3 Back out "Bridgeless: Fix unstable_hasComponent" (#50937)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50937

changelog: [internal]

Reviewed By: yungsters

Differential Revision: D73657804

fbshipit-source-id: d1069f7d8def662f7a26a1ff2d5e90fe3e31b9f9
2025-04-25 08:44:10 -07:00
Nicola CortiandFacebook GitHub Bot 0ad9de86d1 Removing internal ModalHostShadowNode and ModalHostHelper classes (#50935)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50935

Those classes are internal and deprecated since a while.
It should now be safe to fully remove them.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73655877

fbshipit-source-id: cdca8f032fe865f9a08c40e4a0145945c7e25a85
2025-04-25 08:20:51 -07:00
Nicola CortiandFacebook GitHub Bot 465469e92c Cleanup LegacyArchitectureLogger.OSS_LEGACY_WARNINGS_ENABLED (#50931)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50931

This removes all the `OSS_LEGACY_WARNINGS_ENABLED` infrastructure from LegacyArchitectureLogger. We'll instead pivot to use ad-hoc functions for scenarios that don't work in LegacyArch + Interop Layers (see D73654273).

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73654272

fbshipit-source-id: d10eac2ded92f2c0191503e64f0c1d9db688d6e9
2025-04-25 07:49:59 -07:00
Nicola CortiandFacebook GitHub Bot 1c920d305d RNTester - Do not explicitely enable legacyWarningsEnabled (#50930)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50930

Due to D73591315, we don't need to specify the `legacyWarningsEnabled` for RNTester anymore as it's effectively ignored.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest, cipolleschi

Differential Revision: D73654270

fbshipit-source-id: 9428634fb8374024940e4041de60d679b6f352a2
2025-04-25 07:49:59 -07:00
Nicola CortiandFacebook GitHub Bot 5a476e94be RNGP - Ignore the legacyWarningsEnabled property if provided (#50929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50929

We decided to change the warning model for LegacyArch/NewArch.

I'm currently removing the infra to read the `legacyWarningsEnabled` Gradle property if provided.

Warnings will be enabled by default for all Legacy Arch users in the new model.

This change was never shipped in a numbered version, so that's not breaking.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73591315

fbshipit-source-id: a46fade91b46fcc9b81984577161c046dc0939b6
2025-04-25 07:49:59 -07:00
Mateo GuzmánandFacebook GitHub Bot 8b0635bd15 Make MeasureUtil internal (#50918)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.view.MeasureUtil).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.view.MeasureUtil internal

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

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

Reviewed By: javache, cortinico

Differential Revision: D73642487

Pulled By: Abbondanzo

fbshipit-source-id: a6bfa875883ec1c179022305734eadc00184123b
2025-04-25 06:56:11 -07:00
Jacek PudyszandFacebook GitHub Bot 8a8737af62 feat: add support for numeric font weight values in shadow tree (#50901)
Summary:
This PR aligns the JS `fontWeight` types and supports numeric `fontWeight` values in the C++ converter.
Previously, React Native cast `fontWeight` to a string on the JS layer, so handling integers was unnecessary.

Some libraries, such as `react-native-unistyles` and `react-native-reanimated`, use `ShadowTree` to update user styles. In these cases, `ShadowTree` cannot handle numeric `fontWeight` values passed directly from the user, resulting in the default `fontWeight` being applied instead.

This PR introduces a simple numeric converter to cover this case.

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

## Changelog:

[INTERNAL] [ADDED]

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

Test Plan:
Patched locally with the Unistyles repo, as it is very difficult to create a small reproducer for working with ShadowTree.

### Test description:

Add custom logic that changes the Text's `fontWeight` based on the user's color scheme.
For light mode we should use `fontWeight: 100`; for dark mode `fontWeight: 500`.

#### Before:

https://github.com/user-attachments/assets/fe98fe92-3853-4bca-802a-8ec8b80862f3

https://github.com/user-attachments/assets/9ad82909-4b4f-4502-a2e1-d2837aacf524

#### After:

https://github.com/user-attachments/assets/520ed266-4d05-44ad-9dbe-e800917657a9

<video src="https://github.com/user-attachments/assets/acb37354-7ce4-4b9c-81bd-977cad04818b" width="400" />

Reviewed By: NickGerleman

Differential Revision: D73596819

Pulled By: javache

fbshipit-source-id: d609ee986f52875c5cf06ae3eaa01ecdb1428980
2025-04-25 06:52:11 -07:00
Pieter De BaetsandFacebook GitHub Bot aa8c072870 Fix Switch broken as controlled component (#50928)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50928

This broke in D72979663, since we relied on the object identify of `native` changing to correctly reset the native state back to the controlled JS state.

Changelog: [General][Fixed] Fixed switches correctly reverting to controlled state

Reviewed By: vzaidman

Differential Revision: D73653323

fbshipit-source-id: d6ca8a31d9f08a339c7acf6bba264137690dd794
2025-04-25 06:13:11 -07:00
Yogesh Choudhary PaliyalandFacebook GitHub Bot de165a2cfd refactor: Rewrite JSBundleLoader from Java to Kotlin (#50911)
Summary:
Rewrite of JSBundleLoader from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513

## Changelog:
[ANDROID] [CHANGED] - Migrated JSBundleLoader to Kotlin

<!-- 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/50911

Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages

Reviewed By: cortinico

Differential Revision: D73649145

Pulled By: javache

fbshipit-source-id: 7ef1fc1ea1c53a8b914ae1aada1966e64b4c3d80
2025-04-25 05:23:43 -07:00
Samuel SuslaandFacebook GitHub Bot 0c8f3aca0e incorporate feedback to Fantom's user guide (#50899)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50899

changelog: [internal]

making things clearer in the docs for Fantom.

Reviewed By: rubennorte

Differential Revision: D73580305

fbshipit-source-id: 0e5edaa3baf57fc54f7a0c454fe4d2fa81627f66
2025-04-25 04:54:58 -07:00
Mateo GuzmánandFacebook GitHub Bot 4207f9951f Make DrawerStateChangedEvent internal (#50917)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.drawer.events.DrawerStateChangedEvent).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.drawer.events.DrawerStateChangedEvent internal

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

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

Reviewed By: cortinico

Differential Revision: D73643872

Pulled By: rshest

fbshipit-source-id: b181af5be7e67e9f088d9cbf685436b3e9600500
2025-04-25 03:31:05 -07:00
Mateo GuzmánandFacebook GitHub Bot 7dea1d734e Make ReactInterceptingViewGroup and OnInterceptTouchEventListener internal (#50919)
Summary:
These classes can be internalized as part of the initiative to reduce the public API surface. I've checked there are no relevant OSS usages.

- [ReactInterceptingViewGroup](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.touch.ReactInterceptingViewGroup)
- [OnInterceptTouchEventListener](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.touch.OnInterceptTouchEventListener)

## Changelog:

[INTERNAL] - Make ReactInterceptingViewGroup and OnInterceptTouchEventListener internal

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

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

Reviewed By: javache, cortinico

Differential Revision: D73643867

Pulled By: rshest

fbshipit-source-id: 8e3c9d36f3cdd985d53189c83e462ca1c612d96c
2025-04-25 03:02:46 -07:00
David VaccaandFacebook GitHub Bot 906474a709 Annotate Interop Event APIs (#50927)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50927

Annotate Interop Event APIs

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D73407612

fbshipit-source-id: 90cd6d888b3d72c09e3eb4c5142cc50da65d9b4c
2025-04-24 22:06:30 -07:00
David VaccaandFacebook GitHub Bot 7e4ec7d8d3 Mark NativeModule interop classes with InteropLegacyArchitecture (#50926)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50926

Mark NativeModule interop classes with InteropLegacyArchitecture

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D73407611

fbshipit-source-id: 57de0ec81209ec0947520278f3adbc9c0bb58369
2025-04-24 22:06:30 -07:00
David VaccaandFacebook GitHub Bot a7b0619846 Introduce InteropLegacyArchitecture annotation (#50906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50906

Annotation to mark classes or functions that are part of the interop APIs that provide support for legacy architecture APIs in the new architecture of React Native .

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D73407613

fbshipit-source-id: 887a14ca4dea891b50e7df01e0ffff5064cd43ea
2025-04-24 22:06:30 -07:00
Nick GerlemanandFacebook GitHub Bot 01cc16bbfe Extract TextLayoutManager::baseline() (#50888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50888

This is shared between platforms using a very strange pattern. Let's just extract this into its own function. Not considering breaking, since TextLayoutManager is internal interface.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D73555465

fbshipit-source-id: ea99fbebd9db44efd1dc56c2cad68b5b56e77ad1
2025-04-24 20:10:57 -07:00
Nick GerlemanandFacebook GitHub Bot eb459a9f42 Platform specific PargraphState (#50890)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50890

With Facsimile, we are introducing some new concept of `PreparedText`, where platform TextLayoutManager which implement, can lead to additional optimizations.

`#ifdef ANDROID` is not a workable pattern for this. Apart from react-native-cxx getting hooked into it, and all of the existing bugs there, it is bad for editor environment, and hard to reason about.

This splits up `ParagraphState`, so that we can control platform specific bits more easily. We do not split `ParagraphShadowNode`, which will use concepts (e.g. `TextLayoutManagerWithPreparedText`) to control which paths it takes, based on platform capaibilities.

Changelog: [internal]

Reviewed By: rshest

Differential Revision: D73555441

fbshipit-source-id: fd585eb99d26b0b6966efb1867d03fbd5cc7e7e2
2025-04-24 20:10:57 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot fcb3ef3f76 Add unit tests for Radial Gradient and fix typo on conversion.h (#50835)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50835

tsia

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D73371776

fbshipit-source-id: 0016f42de4dc95d76da561f6af9c7ef57e407a2c
2025-04-24 17:27:52 -07:00
Nick GerlemanandFacebook GitHub Bot fd126b36b7 PreparedLayoutTextViewManager (#50923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50923

This implements the view manager for `PreparedLayoutTextView`, originating by taking the view managers composing `ReactTextView`, converting to Kotlin, and removing everything no longer needed.

In Facsimile, anything influencing text appearance is applied earlier, when creating the Fabric layout, so there are many less setters here. Most visual attributes are instead present in the state we are presenting.

We have tasks for some of these, that need to be reimplemented, as they do not currently influence the Spannable being measured. That includes e.g. `ReactTextViewManagerCallback`, used for injection, and `dataDetectorType` for linkifying Spannable.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73287706

fbshipit-source-id: 938b57d4e443f6b8bb127e17b47cc371f31a416d
2025-04-24 17:20:03 -07:00
Nick GerlemanandFacebook GitHub Bot 6465cb1b0b PreparedLayoutTextView (#50922)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50922

This forms the basis for a replacement of `TextView`.

This started off with Litho's [`RCTextView`](https://github.com/facebook/litho/blob/master/litho-rendercore-text/src/main/java/com/facebook/rendercore/text/RCTextView.java), which is a simple view, for rendering a text layout, and providing some built-in keyboard navigation and a11y support. Many changes were made to it, including:

1. Removing many parts not relevant to RN, or which will be replaced by other RN infra. E.g. we will reuse existing a11y delegates, have existing ways of creating Spannables and text layouts, inline views, etc
2. Converting to Kotlin
3. Adding back in some changes required for RN's drawing, and expected view manager APIs (e.g. overflow/clipping customization)
4. Making it target a ViewGroup instead of a View, for correct inline view support down the line

Because we rely on drawing text layout, with the same Spannable as before, most things "just work", because they are part of the layout we are drawing, generated by TextLayoutManager on the Fabric side. We don't offer much customization to what can be drawn, forcing it to have happened in the layout we are showing already.

There are quite a few bits not implemented yet. Some of these are cases, like `textAlignVertical`, were previously incorrectly implemented just at the ReactTextView layer, so Fabric layout was unaware of them. Another similar class to this is any non-default fonts which we must load. `adjustsFontSizeToFit` (stubbed out in later diff) will also need some tweaking with the new assumption we don’t want to mutate Spans/layouts set in State.

Fine grained selection support is the largest tbd.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D73282649

fbshipit-source-id: abe3a30461095d2d0ddbc6c939704f3982f44771
2025-04-24 17:20:03 -07:00
Nick GerlemanandFacebook GitHub Bot 75a01c37ae Add unstable ReferenceStateWrapper API (#50921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50921

This adds the ability to represent Fabric State sent to Java View managers as a raw JNI reference. This is used by Facsimile to tell a component to mount a layout, previously generated during measurement.

This API is consciously well hidden (in comparison to MapBuffer which is fairly public). To use it:
1. The concrete state data representation must implement a method named `getJNIReference()` that returns an fbjni ref
2. The Java view manager must cast the `StateWrapper` to an internal `ReferenceStateWrapper` type, not exposed outside of React Native internals

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D73159146

fbshipit-source-id: b7602bf7717bff28d2f3b259073bc47606fd76e4
2025-04-24 17:20:03 -07:00
Nick GerlemanandFacebook GitHub Bot 9f941c50c9 Make StateWrapperImpl Internal (#50920)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50920

We construct this from JNI, which doesn't care about visibility, and then only want to expose `StateWrapper` as the public interface.

Changelog:
[Android][Removed] - Make StateWrapperImpl Internal

Reviewed By: Abbondanzo

Differential Revision: D73161592

fbshipit-source-id: b787e31e190dc52a02d73cadfa77b1c1defb9703
2025-04-24 17:20:03 -07:00
Luna WeiandFacebook GitHub Bot dd52b4e212 Update Fantom tests to use scrollTo (#50912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50912

Changelog: [Internal] - Update IntersectionObserver Fantom tests to use the new `scrollTo` api which didn't exist when I first wrote these tests. As well, do clean up between tests

Reviewed By: rubennorte

Differential Revision: D73551695

fbshipit-source-id: 9625328879230d178f23a089436f2a3c7b8323bd
2025-04-24 15:03:31 -07:00
AjitandFacebook GitHub Bot 87c54a7eba fix fetch of content scheme urls failing on Android (#50122)
Summary:
This PR fixes https://github.com/facebook/react-native/issues/48762
- fix creating Blobs from Android 'content://' scheme urls was failing on the js side due to [this check](https://github.com/JakeChampion/fetch/blob/ba5cf1ed2e02ebb96fa1e60b4fd2eb04071b60e4/fetch.js#L547)

## Changelog:
[ANDROID] [FIXED] - fix fetch of content scheme uris failing on Android.

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

Test Plan:
Used the App here to test Android Blob creation. https://github.com/giantslogik/blob-large-file-fetch.

EDIT: Added tester to RNTester

Reviewed By: rshest

Differential Revision: D73576300

Pulled By: javache

fbshipit-source-id: 3fa5966aabd10d5fbe9f441948309c66e7113199
2025-04-24 12:39:58 -07:00
Pieter De BaetsandFacebook GitHub Bot ac8b01fb6f Fix OSS build error in JavaModuleWrapper (#50905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50905

Subtle compiler differences cause this to fail, but we can just `Class<*>` here instead.

Changelog: [Internal]

Reviewed By: cortinico, rshest

Differential Revision: D73593304

fbshipit-source-id: ea3996fc0641ae5d12a6923bd78645e21232afe7
2025-04-24 11:41:11 -07:00
Anupriya VermaandFacebook GitHub Bot 49ea9d80b8 Support headers [crossOrigin and referralPolicy] in Image without src and srcSet and only remote source.uri (#50799)
Summary:
Resolves https://github.com/facebook/react-native/issues/50778

### Problem Description

Implement the crossOrigin property for Image in RNW Fabric when only source.uri is passed and not src/ srcSet.

For reference, check the public API documentation: https://reactnative.dev/docs/image#crossorigin

Implement the referrerPolicy property for Image in RNW Fabric when only source.uri is passed and not src/ srcSet.

For reference, check the public API documentation: https://reactnative.dev/docs/image#referrerpolicy

Also refer docs for source, src, srcSet
https://reactnative.dev/docs/image#source
https://reactnative.dev/docs/image#src
https://reactnative.dev/docs/image#srcset

It's not mentioned in the doc that when src / srcSet is missing then crossOrigin / referralPolicy would be ignored when source uri is a remote URL that is passed.

Currently these were ignored if src / srcSet was not passed and not added to sources headers.

This change adds headers support even without passing src / srcSet and only sources uri that consists of remote URL.

crossOrigin and referrerPolicy are passed as source.headers here:

![Image](https://github.com/user-attachments/assets/6df1a274-353e-4e03-9033-75695d04e2c0)

### Steps to reproduce

```
 <Image
              defaultSource={{uri: this.state.defaultImageUri}}
              source={{uri: this.state.imageUri}}
              crossOrigin="use-credentials"
              referrerPolicy="no-referrer"
            />
```

Pass this in React Native and check source headers

## Changelog:
[GENERAL] [ADDED] - Support headers [crossOrigin and referralPolicy] in Image without src and srcSet and only remote source.uri

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

Test Plan:
Refer this PR for testing; https://github.com/microsoft/react-native-windows/pull/14521
## Screenshots
_Add any relevant screen captures here from before or after your changes._
Before
![image](https://github.com/user-attachments/assets/21804411-91f4-4a27-b6e9-971675cbd546)

After
<img width="790" alt="image" src="https://github.com/user-attachments/assets/8e0a2522-7009-430d-b848-da80896670f4" />

## Testing
_If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios._

Tested in playground and RNW Tester and Visual Studio Debugger

_Optional_: Describe the tests that you ran locally to verify your changes.

1. Tested with only source remote uri passed
2. Tested with both source, src
3. Tested with source, src, srcSet

Reviewed By: javache

Differential Revision: D73427747

Pulled By: cipolleschi

fbshipit-source-id: f09174d1e4eaa2173b27970a6079eeb8ba6f3069
2025-04-24 11:10:59 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 0e11e6a28b Sync React 19.1 into React Native OSS (#50865)
Summary:
X-link: https://github.com/facebook/metro/pull/1492

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

This change updates React in React Native OSS from 19 to 19.1
bypass-github-export-checks
## Changelog:
[General][Changed] - Bump React to 19.1

## Internal:
jest_e2e[run_all_tests]

Reviewed By: cortinico

Differential Revision: D73502629

fbshipit-source-id: 362897e8b491d1474f433ee7ad3306baf95d2e6c
2025-04-24 10:15:42 -07:00
Nicola CortiandFacebook GitHub Bot e4bf88a076 AGP to 8.9.2 (#50900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50900

This bumps the minor of Android Gradle Plugin ahead of the branch cut for 0.80

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

Reviewed By: rshest

Differential Revision: D73579447

fbshipit-source-id: f0d40ba3d160e332ee9ab2853a949ed6ec51a3fc
2025-04-24 09:44:26 -07:00
aleqsioandFacebook GitHub Bot 4cc9db1cd5 Fix disappearing redbox on initial load of an invalid bundle. (#50867)
Summary:
Right now having a javascript error like an invalid import statement during first bundle load results in a disappearing redbox screen.

https://github.com/user-attachments/assets/ab9c64f5-6e32-481c-a58f-6d37bb920acb

The `invalidate` call removed in this PR cleans up all turbomodules, including the RedBox module, which in turns calls `dismiss` in `RCTRedBox`.

After removing this line the result is as following:

https://github.com/user-attachments/assets/6eeb4d43-f883-440f-ade3-5628f85f833a

I made sure that the `invalidate` function is still called when executing only two possible ways to reload the bundle:
- the Reload button
- Cmd+R

The HMR/hot reload is not connected if the bundle has an error on initial load, so we don't need to worry about it.

Longer term, it would be better to establish HMR and use a different redbox in this case:

![simulator_screenshot_DFF4EA47-DA12-46A9-81DF-9904B35EB1D9](https://github.com/user-attachments/assets/c46eb0e9-845a-4b62-96e2-74215cbdad18)

Doing this requires larger changes to the bundle loading flow – happy to to try and land that change if there's any guidance you could give.

## 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 disappearing redbox on initial load of an invalid bundle.

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

Test Plan: I have tested this change using RN from main and RNTester app (see videos).

Reviewed By: cortinico

Differential Revision: D73511154

Pulled By: cipolleschi

fbshipit-source-id: dfe149ebc15d845f07fd3926db2e063b468870af
2025-04-24 08:54:09 -07:00
Dawid MałeckiandFacebook GitHub Bot 3e14d1638c Add babel plugin to @react-native/babel-preset for console.warn injection under deep react native imports (#50802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50802

The plugin analyses the source of all `import`, `require`, and `export` statements and injects the `console.warn` statement for each path targeting deep react-native source code. It runs only on a dev mode so there is no need to keep that in the `if (__DEV__) ` block. It is possible to disable this plugin by setting `disableDeepImportWarnings: true` and **resetting** the Metro cache:

```js
module.exports = {
  presets: [['module:react-native/babel-preset', {
    "disableDeepImportWarnings": true
  }]],
};
```

Changelog:
[General][Internal] - Added plugin to react-native/babel-preset injecting `console.warn` for each react native deep import in dev mode.

For a given code:
```js
import { Image } from 'react-native';
import View from 'react-native/Libraries/Components/View/View';
const Text = require('react-native/Libraries/Text/Text');
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
```

The transformed output should look like:

```js
import { Image } from 'react-native';
import View from 'react-native/Libraries/Components/View/View';
const Text = require('react-native/Libraries/Text/Text');
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Components/View/View').");
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Text/Text').");
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Pressability/PressabilityDebug').");
```

For more information about why this plugin was needed, please check [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/894).

Reviewed By: huntie

Differential Revision: D70783145

fbshipit-source-id: ae145db6471d861099566a8faf2fbd93bd136450
2025-04-24 08:04:21 -07:00
Wojciech LewickiandFacebook GitHub Bot bef5cc1007 fix: build proper hermes for all debug variants (#50897)
Summary:
When building hermes from source in a project that has a debug scheme not named strictly "Debug", hermes is built with wrong flags which makes the compilation fail. We should use a better check for such cases, analogous to https://github.com/facebook/react-native/blob/ec43150b2a8db3a93137ae69ac414859a2fff73e/packages/react-native/scripts/react-native-xcode.sh#L16. I haven't found any other usages of this pattern: https://github.com/search?q=repo%3Afacebook%2Freact-native%20%24CONFIGURATION&type=code, hopefully other places use the correct semantics already.

## Changelog:

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

Pick one each for the category and type tags:

[IOS] [FIXED] - properly check for debug schemes when building hermes from source

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

[IOS] [FIXED] - properly check for debug schemes when building hermes from source

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

Test Plan: Use e.g. https://github.com/martinlAP/keyboardcrash with `Dev-Debug` scheme and try to build hermes from source based on https://github.com/facebook/hermes/blob/rn/0.79-stable/doc/ReactNativeIntegration.md. to see that it fails without this PR.

Reviewed By: rshest

Differential Revision: D73579031

Pulled By: cortinico

fbshipit-source-id: 3a48c6fe63f78fbc9cf566d300b9518aa9abdd89
2025-04-24 06:15:42 -07:00
Samuel SuslaandFacebook GitHub Bot 51091d434a add a view culling test case when for reparenting a culled grand (#50894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50894

changelog: [internal]

adding more tests to cover all branches of `calculateShadowViewMutationsFlattener`.

calculateShadowViewMutationsFlattener is over 400 lines of code and covers quite a few edge cases. I plan to cover every branch with a test to make it easier to refactor Differentiator in the future.

Reviewed By: rubennorte

Differential Revision: D73543444

fbshipit-source-id: b0b22aba4b9cc4718edd2a6c4535993be437ed9f
2025-04-24 05:32:48 -07:00
Samuel SuslaandFacebook GitHub Bot d8fe0d2ee2 simplify parent-child flattening-unflattening (#50893)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50893

changelog: [internal]

In the two branches changed by this diff, it is unnecessary to check `reparentMode` because `reparentMode` and `childReparentMode` will always mismatch. When `childReparentMode` is unflatten, `reparentMode` will be flatten and vice versa. This is guaranteed by a `if else` statement above: https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp#L674

This slightly simplifies code and lowers the burden on the reader.

Reviewed By: javache, rubennorte

Differential Revision: D73571160

fbshipit-source-id: 8623d991f7b063f70c95720ca0d3b63318dfc08b
2025-04-24 05:32:48 -07:00
Mateo GuzmánandFacebook GitHub Bot 94fed5facc Flip mockito usages to mockito-kotlin (#50878)
Summary:
As the repository is moving towards Kotlin and the tests have also been moving towards mockito-kotlin, I'm doing another round here.

## Changelog:

[INTERNAL] - Flip mockito usages to mockito-kotlin

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

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

Reviewed By: javache

Differential Revision: D73569293

Pulled By: rshest

fbshipit-source-id: 9bfe7d3f69480367384eafdde429db15eb81d11c
2025-04-24 05:21:57 -07:00
drrefactorandFacebook GitHub Bot 79d3eea0b7 refactor: Rewrite JavaModuleWrapper from Java to Kotlin (#50882)
Summary:
Rewrite of JavaModuleWrapper from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513

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

[ANDROID] [CHANGED] - Migrated JavaModuleWrapper to Kotlin

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

Test Plan:
Test RNTester using old arch. SampleLegacyModule is the one I've used, it needs to be enabled for old arch though (RNTesterApplication.kt -> getPackages & getReactModuleInfoProvider).

I may enable SampleLegacyModule for old arch to make testing easier. mateoguzmana
It breaks on `getDynamic` on old arch, but I could filter these from examples or add some fallback in SampleLegacyModule.kt for old arch.

Reviewed By: cortinico

Differential Revision: D73576099

Pulled By: javache

fbshipit-source-id: c940be27133258fa589571a600435fa478e6b51e
2025-04-24 04:58:43 -07:00
Samuel SuslaandFacebook GitHub Bot c443bc18f5 clean up removeTurboModuleManagerDelegateMutex feature flag (#50891)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50891

changelog: [internal]

remove unnecessary mutex in RCTTurboModuleManager.mm.

Reviewed By: philIip

Differential Revision: D73506191

fbshipit-source-id: 54c83704ffb8066f214e683a163face78f1922d5
2025-04-24 04:23:42 -07:00
Pieter De BaetsandFacebook GitHub Bot fc55cc3318 Simplify InteropModuleRegistry API (#50863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50863

No need for `shouldReturnInteropModule` if we can just use the nullability of what's returned by `getInteropModule` instead.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73501845

fbshipit-source-id: 9b7628707edc3eb288733baffaca59a9d3c40b40
2025-04-24 03:20:12 -07:00
Pieter De BaetsandFacebook GitHub Bot 22f2247a96 Migrate ReactInstanceProcessedErrorConverter to Kotlin (#50870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50870

As explained in the doc block, now that ReactInstance is in Kotlin we can move this logic to StackTraceHelper and migrate it to Kotlin

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D73503879

fbshipit-source-id: 38a9ff346e00d68bbc3c383834e2a1763dbba9b8
2025-04-24 03:03:06 -07:00
Mateo GuzmánandFacebook GitHub Bot 12147e3bee TypeScript: Replace deprecated React.ElementRef usages to React.ComponentRef (#50883)
Summary:
While upgrading a project to React 19, I noticed React.ElementRef is deprecated (see [types/react/index.d.ts#L199](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L199)). I think we can replace it for the RN types as well.

Not sure if this is considered as a breaking change.

## Changelog:

[GENERAL] [CHANGED] - TypeScript: Replace deprecated React.ElementRef usages to React.ComponentRef

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

Test Plan:
Create a RNTesterPlayground.tsx next to the normal .js just to validate the type checking is not throwing an unexpected error.

<details>
<summary>Code snippet:</summary>

```tsx
import React, { useRef, useEffect } from 'react';
import { FlatList, Text, View } from 'react-native';

type Item = { id: string; title: string };

const data: Item[] = Array.from({ length: 10 }, (_, i) => ({
  id: i.toString(),
  title: `Item ${i + 1}`,
}));

const FlatListScrollRefExample: React.FC = () => {
  const flatListRef = useRef<FlatList<Item>>(null);

  useEffect(() => {
    if (flatListRef.current) {
      const nativeRef = flatListRef.current.getNativeScrollRef();

      console.log('nativeRef', nativeRef?.componentWillUnmount);
    }
  }, []);

  return (
    <FlatList
      ref={flatListRef}
      data={data}
      keyExtractor={(item) => item.id}
      renderItem={({ item }) => (
        <View style={{ padding: 16 }}>
          <Text>{item.title}</Text>
        </View>
      )}
    />
  );
};

export default FlatListScrollRefExample;

```

</details>

Reviewed By: cipolleschi

Differential Revision: D73569274

Pulled By: rshest

fbshipit-source-id: f72477b9b3c0eda1007187c7dac3da0433410e86
2025-04-24 03:02:27 -07:00
Samuel SuslaandFacebook GitHub Bot 4e679a22e7 group reparenting tests for view culling together (#50886)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50886

changelog: [internal]

Group tests related to reparenting in "describe" block. Differentiator is two algorithms hidden behind a single interface: regular and reparenting. The tests are structured this way as well where regular tests focus on common scenarios and reparenting section focuses on reparenting and special cases around that. The reparenting implementation is considerably more complex as it handles edge cases that don't happen often.

Reviewed By: mdvacca

Differential Revision: D73541053

fbshipit-source-id: c3905a0f0117cb1aa6c468e24e6bb982de48545d
2025-04-23 20:21:49 -07:00
Samuel SuslaandFacebook GitHub Bot 6f345cb852 add a test for view culling where during reparenting a view is culled (#50885)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50885

changelog: [internal]

a special case inside of Differentiator handling parent-child switching from unflattened-flattened to flattened-unflattened. If a child has view that is culled, this needs to be handled.

This diff also simplifies the implementation inside of calculateShadowViewMutationsFlattener by passing only one cullingContext.

Reviewed By: mdvacca

Differential Revision: D73523523

fbshipit-source-id: d6f314da6b9ff40bcf3362243b03de1b39e7aabb
2025-04-23 20:21:49 -07:00
Samuel SuslaandFacebook GitHub Bot f51d6ec9ff fix bug in reparenting where wrong parentTag is used in differentiator (#50884)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50884

changelog: [internal]

Fix incorrect parentTag coming from differentiator when reparenting. The fix is hidden behind existing feature flag that is already fixing similar issue: D73428312

The problem occurs under very specific circumstances that are covered by an integration test. The *parentTag* is also [only used on Android](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp#L566) and only if layout changes as part of the update.

This diff introduces a new test specifically triggering the incorrect behaviour: `Differentiator-itest.js`. Without this fix, the test fails on following assert:           [react_native_assert(hasTag(mutation.parentTag))](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp#L245).

Reviewed By: mdvacca

Differential Revision: D73545165

fbshipit-source-id: 43344eebfa4cc0119e5b42170f6b9097dacd704d
2025-04-23 20:21:49 -07:00
Arushi KesarwaniandFacebook GitHub Bot d28d4c5ff8 Rename Codegen Component Descriptors Entrypoint for FAC and hook it up in DefaultComponentsRegistry (#50881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50881

Rename Codegen Component Descriptors Entrypoint for FAC and hook it up in DefaultComponentsRegistry

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D73535745

fbshipit-source-id: dad68e7e6c8d7ba2ed86bbd1c06131101e00689e
2025-04-23 16:56:45 -07:00
Zeya PengandFacebook GitHub Bot 5ec00097b6 Add pan gesture animation examples to rntester (#50851)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50851

## Changelog:

[General] [Added] - Add pan gesture animation example to rntester

Including examples of
* using native driven Animated.event + touch event (which will not be interrupted by busy js thread, and is potentially a boost to performance) - the code requires some hacks but it's doable
* using js PanResponder to drive pan gesture animation

Reviewed By: sammy-SC

Differential Revision: D68909931

fbshipit-source-id: 484ecb0646fb249b31362013725219a1c1ec6181
2025-04-23 16:41:46 -07:00
Nick GerlemanandFacebook GitHub Bot 42251ec0ed Fix Non-uniform border colors on TextInput (#50880)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50880

Kotlin conversion exposes unused variable warning. Looks like I broke this a year ago.

Changelog:
[Android][Fixed] - Fix Non-uniform border colors on TextInput

Reviewed By: mdvacca

Differential Revision: D73453825

fbshipit-source-id: 8e3fcac8ea55feb518a8d11a6fbdba7ea548ea2b
2025-04-23 15:26:04 -07:00
Nick GerlemanandFacebook GitHub Bot cf9514e549 Fix ReactTextAnchorViewManager Nullability (#50879)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50879

The view for a view manager should not be nullable. Let's fix that.

These are also all bound specifically to `ReactTextView` instead of the generic constraint, so I just changed the constraint. Really this should just be totally merged with `ReactTextViewManager`.

Changelog: [Internal]

Reviewed By: cortinico, rshest

Differential Revision: D73453631

fbshipit-source-id: 74bcadeef0e83a719dfe2b989784501575b58168
2025-04-23 15:26:04 -07:00
Nick LefeverandFacebook GitHub Bot 1156c08ac4 Move shadow node reference updates to tree commit (#50753)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50753

Runtime Shadow Node Reference Updates (RSNRU) is currently implemented through the clone method which on each internal clone updates the runtime reference to point to the new clone. This guarantees that the runtime reference always points at the latest revision of the shadow node.

This came with the constraint that RSNRU could only run from one thread at all times, otherwise the React renderer state (current fiber tree) would end up being corrupted by receiving reference updates from multiple threads cloning shadow nodes.

This change moves the reference update step to the locked scope of the commit phase. Since the runtime is blocking on the commit and the scope is locked, it is safe and correct to update the runtime references with the latest revision of the shadow node after running state progression and layout.

By moving the reference update to the commit, we can support shadow node syncing from any thread since the actual runtime references are now executing at a safe time and the renderer state will stay valid at all times.

This change is gated behind the `updateRuntimeShadowNodeReferencesOnCommit` feature flag, which enabled shadow node syncing from any thread and reference updates only during the commit.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73038439

fbshipit-source-id: d90308498f3c0625dc87158f15311d1088aad8b0
2025-04-23 14:55:23 -07:00
Nick LefeverandFacebook GitHub Bot 2080fd81f9 Split shadow node reference setter and update functionality (#50752)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50752

Storing the runtime reference for a shadow node and updating the runtime reference to point at a specific shadow node should be separated so that these actions can be done at different moments in time.

We want to keep a reference to the runtime reference of a shadow node for all revisions cloned internally (not triggered by the React renderer, e.g. on layout or shadow node state updates).

We also want to support updating that runtime reference to point at a specific shadow node revision, ideally the one that will end up being used to mount the host component.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D73038438

fbshipit-source-id: 68c3912cbb077d790dd8d2abe8291548b12c8231
2025-04-23 14:55:23 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot ee215800d7 Fix backgroundImage on new Background Drawable (#50877)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50877

At some point I made some changes to how alpha works on BackgroundDrawable. This inadvertently broke BackgroundImage because we need a non transparent color to apply shaders.

Setting the alpha to 255 temporarily when drawing background-image layers fixes it

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73520952

fbshipit-source-id: b8017bb06adc0d3d328d9831fbc4c74f2ec0b783
2025-04-23 14:13:05 -07:00
David VaccaandFacebook GitHub Bot 4d44273672 Temporarily revert removal of ShadowNodes (#50876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50876

This diff is temporarily reverting the code shipped in D72671083 to wait for more data before fully release this change

changelog: [internal] internal

Reviewed By: rshest, arushikesarwani94

Differential Revision: D73515903

fbshipit-source-id: 6566e9533ebffc93348e24eb6c0512020b220eae
2025-04-23 13:54:09 -07:00
Peter AbbondanzoandFacebook GitHub Bot 93f12eb71d Add prop to filter drag and drop pasting on iOS (#50533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50533

Builds upon https://github.com/facebook/react-native/pull/49446

On iOS, by default, every EditText accepts DragEvent and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input.

This change adds a new prop `acceptDragAndDropTypes` to do exactly that: reject drag and drop events by telling the system to ignore certain types of drag data and, by proxy, disabling behavior that automatically focuses the text input.

The prop accepts a list of [Uniform Type Identifiers](https://developer.apple.com/documentation/uniformtypeidentifiers) that iOS supports. It's important to note that these are *not* MIME types. A MIME type would be something like `text/plain` but the equivalent for iOS is `public.plain-text`.

It's important to note that this is an experimental prop, as is evident by the `experimental_` prefix on the JS side. Its signature could change before the prop has fully matured, use at your own risk

Changelog: [iOS][Added] - Add new prop for filtering drag and drop targeting to text inputs

Reviewed By: javache

Differential Revision: D70992749

fbshipit-source-id: 22b5aa1b4ced14147bf16a844361acf6f99c5a40
2025-04-23 13:13:17 -07:00
Peter AbbondanzoandFacebook GitHub Bot d10dd7130c Add prop to filter drag and drop pasting on Android (#49446)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49446

On Android, by default, every EditText accepts `DragEvent` and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input.

This change adds a new prop `acceptDragAndDropTypes`  to do exactly that: reject drag and drop events by telling the system to ignore certain types of drag data and, by proxy, disabling behavior that automatically focuses the text input.

The prop accepts a subset of MIME types supported by Android as documented [here](https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_TEXT_HTML).

It's important to note that this is an experimental prop, as is evident by the `experimental_` prefix on the JS side. Its signature could change before the prop has fully matured, use at your own risk

Changelog: [Android][Added] - Add new prop for filtering drag and drop targeting to text inputs

Reviewed By: javache

Differential Revision: D69674225

fbshipit-source-id: 4dbbdd81bb0f394b6206da5a377c75ea71671626
2025-04-23 13:13:17 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 3b17cdb643 Add back the folly_compiler_flags for backward compatibility (#50875)
Summary:
Some libraries still use the `folly_flags` method provided by our infra. When updating how folly should be installed in an app, we removed that function.
We are putting it back as deprecated, to avoid unnecessary breaking changes in libraries

## Changelog:
[iOS][Fixed] - Put back the `folly_compiler_flag` function to make libraries install pods

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

Test Plan: Tested locally in a nightly app, using the react-native-exit-app library which still uses these flags

Reviewed By: cortinico

Differential Revision: D73512830

Pulled By: cipolleschi

fbshipit-source-id: 28f099064e93ecd5a5a6a7b82e3f7e9db4d35cb9
2025-04-23 12:15:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 3f41fe2948 Make fmt and SocketRocket compatible with Swift (#50874)
Summary:
`SocketRocket` and `fmt` are part of React Native dependencies.
If a library is written in swift and depends on them, it will fail to install the pods because these pods are not compatible with Swift.

This change makes sure that the pods are installed in a way that is swift compatible.

## Changelog:
[iOS][Fixed] - Make fmt and SocketRocket Swift friendly

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

Test Plan:
Tested locally in a nightly app.

### Before the change:

```
yarn add react-native-video
cd ios
bundle exec pod install
```

This script resulted in this error:

```
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `react-native-video` depends upon `fmt` and `SocketRocket`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

### After the change

```
yarn add react-native-video
cd ios
bundle exec pod install
```

This script installed pods successfully.

Reviewed By: cortinico

Differential Revision: D73512109

Pulled By: cipolleschi

fbshipit-source-id: 222d85dba1cbdf4044e3c8459008a4083a720016
2025-04-23 12:07:20 -07:00
Pieter De BaetsandFacebook GitHub Bot b9b61f002c Tweak SoftError tags (#50862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50862

Changelog: [Internal]

Reviewed By: arushikesarwani94

Differential Revision: D73501837

fbshipit-source-id: 7889dd994900cec54845263286e24da24a3c9542
2025-04-23 10:31:50 -07:00
Iwo PlazaandFacebook GitHub Bot dc494bb341 Revert [RN][JS Stable API] Limit @react-native/virtualized-lists subpath imports (#50846)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50846

## Motivation
After a more rigorous search through GitHub uses of the restricted APIs, and consultation with framework authors, it became apparent that this restriction should be lifted.

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D73267844

fbshipit-source-id: e6c0c146690c07debf74c51f82171a9239be5c15
2025-04-23 10:20:06 -07:00
bornkissandFacebook GitHub Bot 96b6604037 chore: update license-docs link (#50868)
Summary:
The source for the React Native documentation and website is hosted on a separate repository, [**facebook/react-native-website**][repo-website]. [LICENSE-docs](https://github.com/facebook/react-native/blob/main/LICENSE-docs) had been removed, so it should be replaced by [**this link**](https://github.com/facebook/react-native-website/blob/main/LICENSE-docs). Of course we could delete it directly.

## Changelog:
[Internal] [Fixed] - Update link

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

Test Plan: nothing

Reviewed By: cipolleschi

Differential Revision: D73512121

Pulled By: cortinico

fbshipit-source-id: dba43626eb2a65a73ca2f46a830488e1437c3a1f
2025-04-23 09:33:43 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ec43150b2a Disable react-native-maps for nightlies (#50873)
Summary:
the `react-native-maps` library has a complex setup for iOS. It doesn't work with autolinking, therefore we need to disable the test with the nightlies

## Changelog:
[Internal] - Disable nitghtly test for react-native-maps

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D73510995

Pulled By: cipolleschi

fbshipit-source-id: a8abadfc8f0656de1288aa28e65abeab07bb9074
2025-04-23 08:14:36 -07:00
Mateo GuzmánandFacebook GitHub Bot e25e4258a0 Make JSStackTrace internal (#50792)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.util.JSStackTrace).

## Changelog:

[INTERNAL] - Make com.facebook.react.util.JSStackTrace internal

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

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

Reviewed By: cortinico

Differential Revision: D73501578

Pulled By: javache

fbshipit-source-id: 367161f06a43a3877c157e976b6e813f3bbef758
2025-04-23 06:14:20 -07:00
Mateo GuzmánandFacebook GitHub Bot 41b17504bf Make DrawerSlideEvent internal (#50791)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.drawer.events.DrawerSlideEvent).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.drawer.events.DrawerSlideEvent internal

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

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

Reviewed By: cortinico, fabriziocucci

Differential Revision: D73501596

Pulled By: javache

fbshipit-source-id: f2c3d94e8a91c6b7666a30d3d9a465c57358d871
2025-04-23 05:38:35 -07:00
Samuel SuslaandFacebook GitHub Bot d40b4c660b add view culling tests when flattetning and deleting a subtree (#50860)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50860

changelog: [internal]

Adding a test case verifying branch of code starting in [Differentiator:855](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp#L855)

Without using `adjustedOldCullingContext` in the branch, it leads to a crash on [StubViewTree:177](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp#L177):  trying to remove view that does not exist.

Reviewed By: lenaic

Differential Revision: D73493001

fbshipit-source-id: 4b81a6635decabb5be043b36cbbd764998f2c438
2025-04-23 05:01:25 -07:00
Samuel SuslaandFacebook GitHub Bot e0b1b63c3f add view culling test when unflattening a subtree (#50852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50852

changelog: [internal]

Adding a test to verify view culling in scenario where a subtree is revealed and part of it is culled.

Reviewed By: lenaic

Differential Revision: D73454202

fbshipit-source-id: 6c4fb2ec4757b9ed1460bec8d3f02a661470266f
2025-04-23 05:01:25 -07:00
Vitali ZaidmanandFacebook GitHub Bot 8b11970adb accept Settings.Global.TRANSITION_ANIMATION_SCALE with a comma decimal separator (#50864)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50864

Changelog:
[Android][Fixed] Settings.Global.TRANSITION_ANIMATION_SCALE accepts comma as decimal separator

Reviewed By: javache

Differential Revision: D73501445

fbshipit-source-id: f7f54dbbcbc4cea1e746222febf8ec63638a73ac
2025-04-23 04:45:01 -07:00
Mateo GuzmánandFacebook GitHub Bot 5ed486cc8f Text: fix selectable prop not working correctly on initial render (#50822)
Summary:
Fixes https://github.com/facebook/react-native/issues/50010

On the initial render of a Text with the `selectable` prop set as `true`, the Text view is not making itself selectable. I debugged this quite a lot, and by changing the state from false to true using `setState` on the JS side, I made it work.

It turns out that we are setting this property in `onAttachedToWindow`, but somehow if `super.setTextIsSelectable` was already set as `true`, it won't re-apply it and we have to reset it to false before setting it again to true. This PR adds this reset.

I couldn't understand yet why this is not breaking in Fabric.

## Changelog:

[ANDROID] [FIXED] - Fix `selectable` prop not working correctly on initial render (old-arch)

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

Test Plan:
- Test in both Fabric and Paper architectures to ensure there won't be a regression with this change in Fabric, as the issue occurs only in Paper.

- To test this, I created a small example in the RN-Tester playground to toggle the selectable property on/off. Notice in the first video that initially the prop is set as true, but it won't allow selecting. If you toggle to false and then back to true again, it works. With the provider fix it should also allow selecting the text on initial render.

Use this code snippet:

```tsx
function Playground() {
  const [selectable, setSelectable] = React.useState(true);

  return (
    <View style={styles.container}>
      <Text selectable={selectable} selectionColor="blue">
        TESTING: is selectable? {selectable ? 'true' : 'false'}
      </Text>
      <Button title="Press me" onPress={() => setSelectable(!selectable)} />
    </View>
  );
}
```

Videos:

<details>
<summary>Before</summary>

https://github.com/user-attachments/assets/6a24dd0d-7f45-4a38-b18d-5142801ea1c3

</details>

<details>
<summary>After</summary>

https://github.com/user-attachments/assets/ce5f9e6e-9a4c-44d7-9d97-f607f2fdc1b4

</details>

Reviewed By: cortinico

Differential Revision: D73421487

Pulled By: rshest

fbshipit-source-id: c0b9d76076ef2e05930996953015fb58ad2a3d5f
2025-04-23 02:21:52 -07:00
Samuel SuslaandFacebook GitHub Bot 45160b64af add test describing React commit overriding values set by setNativeProps (#50858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50858

changelog: [internal]

This test verifies that React commits can override values previously set by `setNativeProps`. The test demonstrates the proper reconciliation behaviour between imperative updates via `setNativeProps` and declarative updates via React renders.

Reviewed By: lenaic

Differential Revision: D73463364

fbshipit-source-id: 3504d9a23bfc36a46fdfc4e9bf585f64088ab518
2025-04-23 00:08:06 -07:00
Samuel SuslaandFacebook GitHub Bot e89d2681ee write a test for setNativeProps+props update (#50849)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50849

changelog: [internal]

Previously we didn't have a way to properly test bug reported in https://github.com/facebook/react-native/issues/47476. But with Fantom we do! Let's write a test for it to make sure this is not broken in the future.

Reviewed By: rubennorte

Differential Revision: D73432279

fbshipit-source-id: dbc1ce9d7b34bbe4275f6b8b1ce3a1c48bca3504
2025-04-22 18:18:43 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 3af8d95441 Revert D73114782: Fix keyboard navigation for FlatList with removeClippedSubviews enabled
Differential Revision:
D73114782

Original commit changeset: 081a2216037e

Original Phabricator Diff: D73114782

fbshipit-source-id: fa37a2c52171e3acb4ffea3380e923e919ddf65e
2025-04-22 17:15:59 -07:00
Erich GrahamandFacebook GitHub Bot aa98b8589b Run swift-format OrderedImports rule across fbsource [58] (#50853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50853

Pre-run OrderedImports rule in prep for enabling across repo.
drop-conflicts

Reviewed By: adamjernst

Differential Revision: D73453458

fbshipit-source-id: d7f7bb319e04209f20dbdd03945eededc57522d5
2025-04-22 16:53:01 -07:00
Samuel SuslaandFacebook GitHub Bot 8f33c006e9 fix deadlock and test flakiness for RuntimeSchedulerTest (#50854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50854

changelog: [internal]

In D73437449 I accidentally introduced a deadlock for single threaded testing environments. Here, I resolve the flakiness and the deadlock.

Reviewed By: mdvacca

Differential Revision: D73457182

fbshipit-source-id: 242edd4443b354cda4b082c2d45d8df04033cfd0
2025-04-22 15:48:50 -07:00
Sim SunandFacebook GitHub Bot 40381830c5 Revert D73213775: Fix crash with nested FlatLists and fix edge case with nested views
Differential Revision:
D73213775

Original commit changeset: 51a667a0c22e

Original Phabricator Diff: D73213775

fbshipit-source-id: da2269a70981522f87bd5636a1614b41773b96c2
2025-04-22 15:09:42 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 5a9023f7ab Fix crash with nested FlatLists and fix edge case with nested views (#50827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50827

This diff addresses a crash caused by view duplication in React Native Android. The issue occurred when a view was not already clipped and was laid out again, resulting in duplicated views.

This problem was particularly noticeable when using nested FlatLists, which triggered a custom focus search with an incomplete and buggy duplicated FlatList container view.

The fix involves preventing the duplication of views by checking if a view is clipped already before laying it out again. Additionally, this diff includes two other improvements:
- Preventing clipping issues: When a view is nested within a non-ReactClippingViewGroup ancestor, focus searching would fail due to the needUpdateClippingRecursive logic only running on instances of ReactClippingViewGroup. By excluding these ancestors, we ensure that the next focusable view can be properly excluded from being clipped.
- Minor fix: A minor fix was made to prevent potential issues in deeply nested cases.
- Add a Kill switch with a feature flag and mobile config combo.  For Facebook we can kill through MC and for all other apps we can kill with the feature flag default value

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73213775

fbshipit-source-id: 51a667a0c22eb35f0ec46ac4cbe430e2e62b407b
2025-04-22 13:17:21 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot bbff754db3 Fix keyboard navigation for FlatList with removeClippedSubviews enabled (#50826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50826

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

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

When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.

This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.

With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.

We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent

Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled

Reviewed By: NickGerleman

Differential Revision: D73114782

fbshipit-source-id: 081a2216037e033a4638151e5226f430ac093ea5
2025-04-22 13:17:21 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 98c10d568e Add fabric implementation to find Top-Most relative and relevant parent of a child view (#50825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50825

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

Add another function to fabric to get the topmost stacking context parent given a root and a child.

This is to be used on focus searching algorithm in the case where the next focusable child is deeper in the hierarchy meaning we need to find the top most parent in the Android hierarchy and lay that out as well before transferring focus.

If we don't lay out the parent as well as the next focusable view:

- The next focusable view might lack context given by the parent
- If the parent is a scrollview and has removeClippedSubviews enabled then laying out the next focusable view will not work
- If the view is deeper in the android hierarchy in some cases it won't be layed out unless the parent is

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73114933

fbshipit-source-id: 081720199943eff78966982a5fd1c921d4e105fd
2025-04-22 13:17:21 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot c31699b760 Add fabric implementation to find next focusable view (#50824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50824

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

Currently when `removeClippedSubviews` is enabled on Android keyboard navigation breaks and we can never focus the elements that are clipped. iOS has a similar issue but not as drastic, it only happens when elements on the FlatList have a lot of margin between them.

This algorithm aims to find the next focusable view and return it to native so that we can prevent the clipping of the view on the view clipping algorithm and hence fix keyboard navigation. For more information see D71324219

Fabric algorithm to find the next focusable view given:

`parentTag`: Top most relevant parent of the focused view
`focusedTag`: Tag of the currently focused view
`direction`: Direction in which focus is moving

EDIT AFTER AMA SEV 3 S510469:

This whole algorithm was based on the idea of fixing focusing within a ScrollView. What we didn't consider is that focus search could be triggered when focusing a pop-up view. This includes transfering focus to an element on a new page or a modal which means that in some cases the parent view could be removed from the hierarchy.

Just add null checks to the parent node and the currently focused node to prevent unexpected crashes.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73115104

fbshipit-source-id: b9c9314fbd4b97da23c0b941d34f4dc2a1a3b883
2025-04-22 13:17:21 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 0796ff80c1 Add KeyboardFocusableNode ShadowNodeTrait (#50823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50823

Introduce a trait to be able to tell if a ShadowNode is focusable by keyboard. This will be used for focus ordering that delegates the work to the shadow tree when Native platforms don't have enough information to define the next focusable node

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73114986

fbshipit-source-id: eed8642db0c65b6f54808d681640bb605cb6e0aa
2025-04-22 13:17:21 -07:00
Samuel SuslaandFacebook GitHub Bot 43403be02d fix crash in view culling when parent-child go from flattened-unflattened to unflattened-flattened (#50844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50844

changelog: [internal]

Fixes a problem where during reparenting differentiator will generate invalid mounting instructions. In tests, this fails with assertion failure on [StubViewTree.cpp:177](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp#L177).

Reviewed By: rubennorte

Differential Revision: D72822113

fbshipit-source-id: 924fca76a87119c3a86c19dc974f4ec282b149d5
2025-04-22 10:32:55 -07:00
Samuel SuslaandFacebook GitHub Bot 4ab7d531fb fix a crash in view culling when the differentiator produces create instruction for existing tag (#50843)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50843

changelog: [internal]

Fix a crash where view culling produces a mutation to create a view that was already created.

Without the change in Differentiator.cpp, the test fails assert on [StubViewTree.cpp:69](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp#L69).

Reviewed By: rubennorte

Differential Revision: D72818343

fbshipit-source-id: 8aec3ccf967f453c619a9495dcd32b43b21afea3
2025-04-22 10:32:55 -07:00
Samuel SuslaandFacebook GitHub Bot 90a93aa48c fix incorrect parentTag coming from differentiator when reparenting (#50842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50842

changelog: [internal]

introduce a feature flag that fixes incorrect parentTag coming from differentiator when reparenting.

The problem occurs under very specific circumstances that are covered by an integration test. The *parentTag* is also [only used on Android](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp#L566) and only if layout changes as part of the update.

This diff introduces a new test specifically triggering the incorrect behaviour: `Differentiator-itest.js`. Without this fix, the test fails on following assert:           [react_native_assert(hasTag(mutation.parentTag))](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp#L245).
This diff also converts existing tests for the differentiator to parametrised tests and enables the fix.

Reviewed By: rubennorte

Differential Revision: D73428312

fbshipit-source-id: 8b00977b610a85fba8b01a50a151f30bd5321ed4
2025-04-22 10:32:55 -07:00
Nicola CortiandFacebook GitHub Bot 12def6d730 Update the reproducer message (#50848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50848

This clarifies our reproducer guidelines.
It's also currently pending on this other PR on the website:
https://github.com/facebook/react-native-website/pull/4589

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73194317

fbshipit-source-id: 35a0e6b4def734c8cff5099ab426d024f9ff6c4d
2025-04-22 09:40:35 -07:00
Samuel SuslaandFacebook GitHub Bot 4221fc8a32 fix flaky RuntimeSchedulerTest (#50845)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50845

changelog: [internal]

`signalTaskToSync` should be released after `executeNowOnTheSameThread` is called to prevent race condition between `executeNowOnTheSameThread` and reading stubQueue's size on line 723.

Reviewed By: rubennorte, rshest

Differential Revision: D73437449

fbshipit-source-id: 3b2af3ddee5a422f7f846cc34ebbb7695463c267
2025-04-22 09:15:27 -07:00
Alex HuntandFacebook GitHub Bot 7a3da81478 Remove Learn Core warnings for JS APIs with >3y blame (#50840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50840

Cleanup of index.js API removal warnings. This should motivate more urgency on the remaining members.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73429537

fbshipit-source-id: 03faabdf30c2836dd5c61b4a2ce8d2355ad8e1e9
2025-04-22 08:01:35 -07:00
Nicola CortiandFacebook GitHub Bot be37e1b7d8 Convert to Kotlin - ReactTextAnchorViewManager (#50841)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50841

This diff convert to Kotlin the following file: ReactTextAnchorViewManager.java
Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D72778863

fbshipit-source-id: d088005573763c95475cfd2ff712a094f764940b
2025-04-22 07:15:12 -07:00
Mateo GuzmánandFacebook GitHub Bot 2b0189b964 Skip cloning Fragments in ListEmptyComponent to avoid onLayout warning (#50833)
Summary:
Fixes https://github.com/facebook/react-native/issues/50817

Using a fragment is very common when rendering elements. We are cloning and adding `onLayout` always to the ListEmptyComponent element, but this would seem to work only when `View` is used for this as a wrapper in this prop. To prevent this unnecessary warning, I think we can easily check whether it is a fragment or not before cloning and adding the extra props – this adds backwards compatibility for those that don't need to use `onLayout`.

## Changelog:

[GENERAL] [FIXED] - Skip cloning Fragments in ListEmptyComponent to avoid onLayout warning

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

Test Plan: Use the code snippet from the linked issue to verify that the warning is not thrown anymore when using a Fragment.

Reviewed By: javache

Differential Revision: D73421503

Pulled By: rshest

fbshipit-source-id: 0da4a38130601943e4704589ac275eba39767191
2025-04-22 07:06:07 -07:00
Pieter De BaetsandFacebook GitHub Bot 04348e9db6 Convert com.facebook.react.runtime.ReactInstance to Kotlin (#50664)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50664

Changelog: [Internal]

Reviewed By: mlord93

Differential Revision: D72804418

fbshipit-source-id: 776adcb4c6cd6ad867525ac28cda8089c56f1ae5
2025-04-22 06:18:25 -07:00
Mateo GuzmánandFacebook GitHub Bot ffd7691505 Fix out-of-date "Direct Manipulation" link (#50834)
Summary:
Was triaging an issue and saw this dead link that has changed. This diff adds the equivalent link that works.

<details>
<summary>See screenshot of previous link:</summary>

![image](https://github.com/user-attachments/assets/f17e72a0-75b2-4446-9f4b-7a6470580f17)

</details>

## Changelog:

[INTERNAL] - Fix out-of-date "Direct Manipulation" link

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

Test Plan:
<details>
<summary>See screenshot of new link:</summary>

![image](https://github.com/user-attachments/assets/a284ba3c-050d-4c4c-9f8e-4770608f529a)

</details>

Reviewed By: cortinico

Differential Revision: D73421475

Pulled By: rshest

fbshipit-source-id: c9be165d2a27a3227d8337dc00456746627b8708
2025-04-22 06:07:06 -07:00
Mateo GuzmánandFacebook GitHub Bot 66a4a4d9fa Make MultiSourceHelper internal (#50793)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.imagehelper.MultiSourceHelper).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.imagehelper.MultiSourceHelper internal

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

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

Reviewed By: Abbondanzo

Differential Revision: D73250760

Pulled By: cortinico

fbshipit-source-id: 8c1103745d405a9ab36c1372f3ca6750ae8ce8e2
2025-04-22 05:55:01 -07:00
JatinDream11andFacebook GitHub Bot 5d1febf7de refactor: migrate BlobProvider.java to Kotlin (#50756)
Summary:
This PR aims to migrate BlobProvider from Java to kotlin as part of [50513](https://github.com/facebook/react-native/issues/50513)

## Changelog:
[ANDROID][CHANGED] – Migrate BlobProvider to Kotlin

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

Test Plan: Tested on RN tester with both new and old arch

Reviewed By: rshest

Differential Revision: D73420896

Pulled By: cortinico

fbshipit-source-id: 4c9a26452a7e45a78c9698f699822b4ac855628c
2025-04-22 05:46:44 -07:00
Alan LeeandFacebook GitHub Bot 1fb04e2134 Fix Type comparison (v2) in TurboModuleInteropUtils.kt
Summary:
instead of explictly specifying fully qualified Java boxed types, use proper Kotlin syntax to refer to it.

 ---
👉 Notes on Java <> Kotlin type mapping !!!

See: Kotlin's Mapped Types; https://kotlinlang.org/docs/java-interop.html#mapped-types
- kotlin `Boolean` maps to Java's primitive type `boolean` and not boxed Type `Boolean`
- Java boxed type `Boolean` maps to `Boolean?` in Kotlin

So in Kotlin,
- `Boolean::class.java` refers to Java primitive type `Class<boolean>` which is equivalent to `Boolean::class.javaPrimitiveType`
- For boxed type use `Boolean::class.javaObjectType` == `Class<Boolean>`

**TIP:** When dealing with Java primitive types using reflection, use `::class.javaPrimtiveType` or `::class.javaObjectType` to avoid the confusion with using plain `::class.java`.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D73224138

fbshipit-source-id: 858093a22b38bfdad40b170d0cf80a440e503829
2025-04-22 05:11:30 -07:00
Joe VilchesandFacebook GitHub Bot f466e43a15 Label coopting RN Tester example (#50812)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50812

tsia, adding some accessibility examples that we have refined so far this half.
Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73283176

fbshipit-source-id: 5bb451c1e79cd8bc92f333ef2fce82669ad0e971
2025-04-21 19:16:23 -07:00
Joe VilchesandFacebook GitHub Bot e9a0747a8f Text with links RN Tester example (#50811)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50811

tsia, adding some accessibility examples that we have refined so far this half.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73281713

fbshipit-source-id: 42db49feba5c232e699afe01916425ddf11f4aea
2025-04-21 19:16:23 -07:00
Joe VilchesandFacebook GitHub Bot dc13a45907 Accessibility Order RN Tester example (#50810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50810

tsia, adding some accessibility examples that we have refined so far this half.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73280582

fbshipit-source-id: a1cc572522729d06b9a0227f0e5731e698f86cc3
2025-04-21 19:16:23 -07:00
David VaccaandFacebook GitHub Bot f8b7ab8733 Remove usages of ShadowNodes by fully releasing disableShadowNodeOnNewArchitectureAndroid() (#50838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50838

This diff removes the usages of ShadowNodes in the new architecture by fully releasing disableShadowNodeOnNewArchitectureAndroid() feature flag.

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D72671083

fbshipit-source-id: a1505d02fd6bf7e87c7234581a26ef13768796a0
2025-04-21 18:43:27 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 57779cebf0 Fix border rendering incorrectly when it has translucent alpha (#50829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50829

It is not appropriate to go through the fast path for border drawing when we have translucent border colors since it will cause overlapping borders to look weird.

Adding an if statement to prevent fastpath when the alpha value of any border is less than 255 (opaque)

Changelog: [Android][Fixed] - Fix translucent borders on Android overlapping bug

Reviewed By: NickGerleman

Differential Revision: D73145119

fbshipit-source-id: f22d0d55adca571d6b75725f6bc4753f98698763
2025-04-21 17:35:12 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 132a871b46 Change to use new Background and Border drawables by default (#50828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50828

The new Background and Border drawables come with some correctness improvements and potential small perf gains on edge cases. We are now switching to using them by default.

Changelog: [Android][Changed] - Change to use new Background and new Border drawables by default

Reviewed By: NickGerleman

Differential Revision: D72082947

fbshipit-source-id: 7caeb279110b520bea760a4621184dc0de05cf78
2025-04-21 17:35:12 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot aa89f7a01c Fix incorrect conditional for radial gradients (#50836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50836

Made a typo on D71898565 when addressing lints

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73393379

fbshipit-source-id: 9fef08bddb5875ff5bd4e3da28c9ea2b93027642
2025-04-21 17:23:21 -07:00
Anupriya VermaandFacebook GitHub Bot bc90c839aa Add showsVerticalScrollIndicator in ScrollViewProps.cpp SetProp (#50798)
Summary:
https://github.com/facebook/react-native/blob/a3252def1990c0d0afba67a4698357bc91c5bb2a/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.cpp#L409

Need to add     `RAW_SET_PROP_SWITCH_CASE_BASIC(showsVerticalScrollIndicator);` as it's missing

Related PR: https://github.com/microsoft/react-native-windows/pull/14526
Resolves: https://github.com/facebook/react-native/issues/50779

## Changelog:

Add showsVerticalScrollIndicator in ScrollViewProps.cpp SetProp

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Message

Windows : RNW

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

Test Plan: Tested here: Related PR: https://github.com/microsoft/react-native-windows/pull/14526

Reviewed By: Abbondanzo

Differential Revision: D73291101

Pulled By: NickGerleman

fbshipit-source-id: 6db26d379d496c0652917cc326dfbcbd92dc3923
2025-04-21 16:28:51 -07:00
Ramanpreet NaraandFacebook GitHub Bot aa41184633 Take 2: Mitigate deadlock hazard in RCTUtils.m (#50807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50807

This structure is unsafe:

```
// In each native module:
+load
  dispatch_once
    NSBundle mainBundle
```

NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.

## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.

Created from CodeHub with https://fburl.com/edit-in-codehub

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73265906

fbshipit-source-id: f718e5bba7e95517613204b1f95e1b637e6c2366
2025-04-21 15:49:27 -07:00
Phillip PanandFacebook GitHub Bot 5b5cf0e199 cleanup queue configs for some native modules (#50832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50832

Changelog: [iOS][Breaking]

these experiences did not end up shipping, so cleaning them up.

Reviewed By: fkgozali

Differential Revision: D73343958

fbshipit-source-id: ff0dc1394748c897aed9c66513b250dfc2192e0d
2025-04-21 15:09:54 -07:00
Alan LeeandFacebook GitHub Bot 77f2c610db fixed wrong class name in string (#50831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50831

fixed wrong class name in string

Changelog:
[Internal]

Reviewed By: Abbondanzo

Differential Revision: D73370669

fbshipit-source-id: 76529099b1eabc4e23333fb97aec2c9b613ee7e0
2025-04-21 14:32:26 -07:00
David VaccaandFacebook GitHub Bot 7284bea018 Delete unused tag constant in LegacyArchitectureLogger (#50819)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50819

Delete unused tag constant in LegacyArchitectureLogger

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D73322326

fbshipit-source-id: 38463792675094db721d1fa018185d4aed17c1d8
2025-04-21 12:26:41 -07:00
George ZaharievandFacebook GitHub Bot 6ad41f9a3f Update hermes-parser and related packages in xplat to 0.28.1 (#50803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50803

Bump hermes-parser and related packages to [0.28.1](https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision: D73242526

fbshipit-source-id: fbe0a233b4ae1315eb0e060c6338eb7156a5c6ea
2025-04-21 07:50:22 -07:00
David RicheyandFacebook GitHub Bot 634f06688c Apply SWIFTFORMAT to fbsource
Summary:
```
hg files -I '**/*.swift' \
| arc lint \
  --take SWIFTFORMAT \
  --apply-patches \
  --no-paths-check \
  --paths-from - \
  --eden-prefetch \
  --output none \
  > /dev/null
```

Reviewed By: ebgraham

Differential Revision: D73276943

fbshipit-source-id: 5432642a217fc1fa37eb97409a2cc282f65c3117
2025-04-20 18:08:18 -07:00
David VaccaandFacebook GitHub Bot 0bdf7bf2c4 Log LegacyArchitectureLogger asserts only in Debug mode (#50818)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50818

Logging LegacyArchitectureLogger asserts only in Debug mode as that will give us enough information about wrong usages of Legacy Architecture at this point

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D73322301

fbshipit-source-id: 981a26b1bd7c89080f35ef0ab27677b0a38f2665
2025-04-20 13:44:24 -07:00
Nick GerlemanandFacebook GitHub Bot f98c227ee9 Fix Android Gradle Build and Missing Buck Build for Test (#50813)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50813

This is already in the same package, which makes Gradle build unhappy. Then, this wasn't invoked at all by a Buck build, because we have target per folder. Let's fix those.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D73286269

fbshipit-source-id: 6100c83e6607705160e4602e8637e3b1ebe8f28b
2025-04-18 18:01:56 -07:00
Tim YungandFacebook GitHub Bot f2518d4374 RN/Metro: Configure Transformer for React 19 (#50809)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50809

Configures `react-native/metro-babel-transformer` (used by `react-native/babel-preset`) to parse source using `hermes-parser` to target React 19. This changes components written with Component Syntax to stop generating `forwardRef` calls (because `ref` is now a prop).

Most of this was already accomplished in https://github.com/facebook/react-native/pull/50377 ({D72070021}), but this call site was missed.

Changelog:
[General][Changed] - Configured Hermes Parser to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls.

Reviewed By: elicwhite

Differential Revision: D73279825

fbshipit-source-id: c0d64cb8c0adb22b78c5fbed1b2c386c8b3f3ede
2025-04-18 17:14:47 -07:00
Joe VilchesandFacebook GitHub Bot db6e000023 Allow Switch to use default UISwitch accessibility annoucements (#50796)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50796

When we render a `Switch` today we are never actually focusing on the native `UISwitch` that gets rendered. We instead focus on the parent `RCTViewComponentView` which houses the `UISwitch` as a `contentView`. That is because of [this logic](https://www.internalfb.com/code/fbsource/[b7e1547dab5a]/xplat/js/react-native-github/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm?lines=1211-1213). This blocks the accessibility of any descendants, including the `contentView`.

What we lose here is the announcement of "on" and "off" based on the toggle state that comes built into `UISwitch`. To do this today you need to add `accessibilityState={{checked: ...}}` which is very unintuitive. Android DOES announce "on" and "off".

We can fix this with an override on the switch class.

Changelog: [iOS][Fixed] - Fix "on" and "off" announcements on `Switch`

Reviewed By: realsoelynn

Differential Revision: D73226500

fbshipit-source-id: ff4eed0b0b4b978e4b59c5e4b37d880373f6506c
2025-04-18 15:33:42 -07:00
Nick GerlemanandFacebook GitHub Bot f6589177ce Fix logic around hiding chrome with deeplinks on small screen (#50806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50806

1. `useWindowDimensions` is already returning in DIPs, my math was just wrong before
2. Playground is marking itself as a deeplink when it shouldn't be

Changelog: [internal]

Reviewed By: cortinico, joevilches

Differential Revision: D73221335

fbshipit-source-id: 32dfa9d60609faccef8e264aa46d64b79250b64d
2025-04-18 15:31:57 -07:00
Jakub PiaseckiandFacebook GitHub Bot 5fd5188172 Fix TextInput onContentSizeChange event being dispatched only once on iOS (#50782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50782

Changelog: [IOS][FIXED] Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture

Currently, the comparison to decide whether to send event happens between the content size before and after layout metrics update. Those values turn out to be the same in all but the first call.

This updates the logic to use the previously send values in the comparison.

Reviewed By: huntie

Differential Revision: D73182563

fbshipit-source-id: 3b764a89c1844e203001d75022a3295a3fd747f2
2025-04-17 23:54:07 -07:00
Nick GerlemanandFacebook GitHub Bot 3e5c609a1e Back out "Mitigate deadlock hazard in RCTUtils.m" (#50795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50795

This diff causes `rntester-ios` to launch into legacy architecture by default.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73225574

fbshipit-source-id: 9a4f1967bbabd23936cf2faf9a2bf48a850a4d11
2025-04-17 20:14:06 -07:00
nishan (o^▽^o)andFacebook GitHub Bot 1b45dc8033 feat: radial gradient js prop passing (#50268)
Summary:
Adds JS changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[GENERAL] [ADDED] - Radial gradient
<!-- 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/50268

Test Plan:
- Added tests in `processBackgroundImage-test.js` in https://github.com/facebook/react-native/pull/50268
- Merge this, https://github.com/facebook/react-native/pull/50266 and https://github.com/facebook/react-native/pull/50269 and check examples in `RadialGradientExample.js`

Reviewed By: NickGerleman

Differential Revision: D71898524

Pulled By: jorge-cab

fbshipit-source-id: 39bdf0f647ba19839b6e6deb09b30a1c337e6457
2025-04-17 16:39:44 -07:00
nishan (o^▽^o)andFacebook GitHub Bot a2409941c2 feat: radial gradient android changes (#50269)
Summary:
Adds android changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[ANDROID] [ADDED] - Radial gradient
<!-- 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/50269

Test Plan:
- Added tests in processBackgroundImage-test.js in https://github.com/facebook/react-native/pull/50268
- Merge this and [this](https://github.com/facebook/react-native/pull/50268) and check examples in `RadialGradientExample.js`

Reviewed By: NickGerleman

Differential Revision: D71898546

Pulled By: jorge-cab

fbshipit-source-id: 2872bcf16a492c7bc829be10eedb0f6c7dad32c7
2025-04-17 16:39:44 -07:00
nishan (o^▽^o)andFacebook GitHub Bot d7533dce1c feat: radial gradient iOS (#50266)
Summary:
Adds iOS changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[IOS] [ADDED] - Radial gradient
<!-- 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/50266

Test Plan:
- Added tests in `processBackgroundImage-test.js` in https://github.com/facebook/react-native/pull/50268
- Merge this, https://github.com/facebook/react-native/pull/50268 and check examples in `RadialGradientExample.js`

Reviewed By: joevilches

Differential Revision: D71898565

Pulled By: jorge-cab

fbshipit-source-id: ac00c7c3cc7dcbe9116c2d60dac8eb1a87153908
2025-04-17 16:39:44 -07:00
Mohd. Yasir AnsariandFacebook GitHub Bot 867858df65 refactor: migrate DynamicFromObject to Kotlin (#50754)
Summary:
PR migrates DynamicFromObject class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.

## Changelog:

[ANDROID] [CHANGED] - Migrated DynamicFromObject to Kotlin

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

Test Plan: Run RN-Tester application and played around with it a bit.

Reviewed By: mlord93

Differential Revision: D73118014

Pulled By: alanleedev

fbshipit-source-id: 84958ff07ccafea9ec3dbdf06467c638eb92d49d
2025-04-17 15:54:18 -07:00
Ramanpreet NaraandFacebook GitHub Bot fa9d082747 Bridgeless: Fix unstable_hasComponent
Summary:
unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.

## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.

The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.

## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.

Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.

Reviewed By: yungsters

Differential Revision: D73127468

fbshipit-source-id: ee30bde486a6bb970f40f654c65a8946452f49b3
2025-04-17 14:33:26 -07:00
Nick GerlemanandFacebook GitHub Bot f144b53122 Remove "usesMapBufferForStateData" template parameter from ConcreteShadowNode and ConcreteState
Summary:
These internals have leaked pretty far. As we are adding support for JNI reference state wrappers, lets hide this, and make functions for getting MapBuffer work automatically if state data exposes the requisite functions, instead of external users needing to worry about multiple possible `ConcreteState` types for a given state data type.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73158627

fbshipit-source-id: e3ac2a045368d46fab72e2017fc28d680db6a7c0
2025-04-17 14:25:22 -07:00
Nicola CortiandFacebook GitHub Bot f1f2788410 Re-add an eventName field inside Event.kt to unbreak several libraries (#50787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50787

Converting Event from Java to Kotlin resulted in a number of breaking changes for Kotlin
libraries that were using an `.eventName` accessors from the `getEventName()` Java method.

This diff re-adds the `eventName` property without backing field.
This could potentially be disruptive in OSS but only one library is affected:
https://github.com/search?type=code&q=%22import+com.facebook.react.uimanager.events.Event%22+%22val+eventName%3A%22+%22%3A+Event%3C%22+language%3AKotlin+path%3A*Event.kt+NOT+is%3Afork+NOT+org%3Afacebook+NOT+path%3AInteropEvent.kt

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73193202

fbshipit-source-id: a69159950e1ef275c93f265f264525236a19d1db
2025-04-17 13:06:13 -07:00
Alex HuntandFacebook GitHub Bot 16a61bf2ba Remove .npmignore files from other packages, add lint check (#50786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50786

Follows https://github.com/facebook/react-native/pull/50784. Having any `.npmignore` files is a gotcha — remove and replace with `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73193257

fbshipit-source-id: de715d74195e4f53c817c11f244a61c79b8ce5bc
2025-04-17 12:48:28 -07:00
Alex HuntandFacebook GitHub Bot 09187491a6 Align __test_fixtures__ to __fixtures__ (#50785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50785

Enables us to simplify exclude patterns in `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73185320

fbshipit-source-id: 40219a0e440740bec35876fff6e37e4bf4fe9ddc
2025-04-17 12:48:28 -07:00
Alex HuntandFacebook GitHub Bot d1cf58484d Replace .npmignore files, ignore all test/fixture/docs directories (#50784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50784

Migrates us from several `.npmignore` files to `package.json#files`, for the main `react-native` package.

This reduces the size of our npm package by 38 files — in particular, catching previously missed `__tests__` and `__docs__` directories.

```diff
- npm notice package size: 4.4 MB
- npm notice unpacked size: 23.7 MB
- npm notice total files: 4533
+ npm notice package size: 4.4 MB
+ npm notice unpacked size: 23.7 MB
+ npm notice total files: 4533
```

NOTE: `"files"` or `.npmignore` — one or the other!
- Having `.npmignore` at the package root does not behave(!). Having `"files"` as one source of truth is better and safer. See https://github.com/npm/cli/issues/6221.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D73185321

fbshipit-source-id: 429c9fec4f447d63440a38bb8e3f3ce3bd155414
2025-04-17 12:48:28 -07:00
generatedunixname89002005287564andFacebook GitHub Bot cd5991c648 Fix CQS signal. Id] 19045409 -- readability-redundant-string-init in xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/view
Reviewed By: dtolnay

Differential Revision: D73175242

fbshipit-source-id: 4f79d0f661a15fda883eb9f03c42040da9a740c8
2025-04-17 11:59:57 -07:00
Gijs WeteringsandFacebook GitHub Bot e2232090d7 Update Danger to 13.0.4
Summary:
parse-git-config is a transitive dep for Danger that hasn't been updated in years and has an unresolved CVE (CVE-2025-25975)

Danger has moved away from this dependency yesterday and cut a new version, so we can update to resolve

Changelog: [General][Fixed] Update Danger to 13.0.4

Reviewed By: cortinico

Differential Revision: D73181590

fbshipit-source-id: e5c512e6f381725eea71d64555018327144e23be
2025-04-17 09:49:03 -07:00
Alex HuntandFacebook GitHub Bot 2410fc97b7 Reorganise dev tooling/debugging modules as src/private/devsupport/ (#50730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50730

This is a consolidation of our "dev support" features in the `src/private/` dir.

New grouping:

- `src/private/devsupport/`
    - `devmenu/` — The Dev Menu and in-app inspection features (in-app UI)
        - `elementinspector/` — The Element Inspector overlay (panel with sub-features), accessed from  Dev Menu → Toggle Element Inspector
        - `perfmonitor/` — The Perf Monitor overlay, accessed from Dev Menu → Show Perf Monitor
    - `rndevtools/` — Modules supporting React Native DevTools (external UI)

`NativeReactDevToolsRuntimeSettingsModule.js` and `NativeReactDevToolsSettingsManager.js` are also moved out of `specs_DEPRECATED/`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D73031559

fbshipit-source-id: 952a469f31f4cd05aeed27dc7023552e723ca078
2025-04-17 09:43:48 -07:00
Nicola CortiandFacebook GitHub Bot a3d38d5722 Kotlin to 2.1.20 (#50780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50780

This bumps Kotlin to the latest stable: 2.1.20.
I've also fixed several warnings emitted by the new compiler.

Changelog:
[Android] [Changed] - Kotlin to 2.1.20

Reviewed By: rshest

Differential Revision: D73122000

fbshipit-source-id: 019a01d085b2c115a3efcf567056e9990a1ff0ce
2025-04-17 08:40:20 -07:00
Jakub PiaseckiandFacebook GitHub Bot 6bc9447506 Update TextInput props, expose more types from the package (#50781)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50781

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73180987

fbshipit-source-id: e47d8fa674ab7e5e821e9786f8069c0b7466a082
2025-04-17 08:03:30 -07:00
Bogusz KaszowskiandFacebook GitHub Bot 74e8c78268 refactor: migrate DynamicFromArray to Kotlin (#50602)
Summary:
PR migrates DynamicFromArray class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.

## Changelog:

[ANDROID] [CHANGED] - Migrated DynamicFromArray to Kotlin

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

Test Plan: Run RN-Tester application and played around with it a bit.

Reviewed By: rshest

Differential Revision: D73179609

Pulled By: cortinico

fbshipit-source-id: e304884fea9f57e152bca4926677d7338dc2403a
2025-04-17 07:23:48 -07:00
Nick LefeverandFacebook GitHub Bot 95ca59eb94 Add unit test for shadow node state on clone (#50774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50774

Adding a Fantom test for the `useShadowNodeStateOnClone` feature flag, showing that the shadow node state is maintained after commit hook processing only when the feature flag is enabled.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73121159

fbshipit-source-id: bbd7f46fbf49394ca5015e825a59d2fb1b519ee5
2025-04-17 06:18:36 -07:00
Jakub PiaseckiandFacebook GitHub Bot b3c110b0b2 Add a lint rule preventing named type imports from React (#50776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50776

Changelog: [Internal]

Adds a lint rule that prevents the use of named imports when importing types from React. `flow-api-translator` relies on the `React` namespace being used when generating TypeScript definitions based on Flow.

Reviewed By: huntie

Differential Revision: D73170799

fbshipit-source-id: 96d014b016c7cec8d3b266447dc7a185d2b1da26
2025-04-17 05:39:22 -07:00
Gourav KhungerandFacebook GitHub Bot cb51d25ba8 refactor: FrescoBasedTextInlineImageSpan (#50532)
Summary:
I've migrated `FrescoBasedTextInlineImageSpan.java` to kotlin. Reference https://github.com/facebook/react-native/issues/50513.

## Changelog:

[ANDROID] [CHANGED] - Refactor class `FrescoBasedTextInlineImageSpan` from Java to Kotlin.

<!-- 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/50532

Test Plan: Tested the RN tester app with `yarn android` on both new and old architecture.

Reviewed By: rshest

Differential Revision: D73031024

Pulled By: cortinico

fbshipit-source-id: e7208bf1103849f38c3dc26d73b31315b2326275
2025-04-17 04:42:23 -07:00
riteshshukla04andFacebook GitHub Bot f5ae157820 Added more test cases for URL (#50768)
Summary:
I forgot to add toString and protocol in test cases last time when we merged this https://github.com/facebook/react-native/pull/50043

## 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][ADDED] More Test cases

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

Test Plan: Tested with yarn jest

Reviewed By: rshest, cipolleschi

Differential Revision: D73169665

Pulled By: cortinico

fbshipit-source-id: 1115c0ccce52a67663fcd60ef376ce7bde502d1f
2025-04-17 03:18:13 -07:00
Rubén NorteandFacebook GitHub Bot 7ff5db3c46 Fix last Excalidraw SVG diagram in docs (#50765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50765

Changelog: [internal]

TSIA

Reviewed By: andrewdacenko

Differential Revision: D73117512

fbshipit-source-id: fd575e819781e93c3f8bf796415b3ff03797fb07
2025-04-17 01:59:21 -07:00
Nicola CortiandFacebook GitHub Bot 93f161b4bd Unblock binary-compatibility-validator for Kotlin 2.1.0
Summary:
This unblocks the `binary-compatibility-validator` for Kotlin 2.1.0
I've bump the tool to the latest version + re-aligned all the dependencies to the one used by the tool as well
(diff utils, asm, kotlinx-metadata-jvm).

Reviewed By: mdvacca

Differential Revision: D73057557

fbshipit-source-id: 020babea3a4032a8f9919ce7f456c3d4fb9a8e0c
2025-04-17 01:52:49 -07:00
Nicholas WilsonandFacebook GitHub Bot a3252def19 docs(typo): Fix typos in CHANGELOG-pre-060.md (#50772)
Summary:
Nothing big, fixed typos in CHANGELOG

## Changelog:

[INTERNAL] - Fix Changelog message

<!-- 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/50772

Reviewed By: cortinico

Differential Revision: D73155730

Pulled By: arushikesarwani94

fbshipit-source-id: 0f169b455af5d657f3fa09a99562eb376c955389
2025-04-17 01:06:59 -07:00
Nicola CortiandFacebook GitHub Bot 9d84909330 Enable CMP0069=NEW for all the targets
Summary:
Since I enabled INTERPROCEDURAL_OPTIMIZATION last week, we're having a warning for gtest that
they're not setting this CMake policy: CMP0069
https://cmake.org/cmake/help/latest/policy/CMP0069.html

As Gtest is not a production dependency, we can safely ignore this warning. So I'm enabling the policy for all the targets.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D73122573

fbshipit-source-id: 319a889024f080752f0c9287d011209459dcb013
2025-04-17 00:00:51 -07:00
Nick GerlemanandFacebook GitHub Bot 71c82ce1ad Remove code related to onInlineViewLayout event
Summary:
Afacit from searching both fbsource and GitHub, this should be totally dead.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D73154613

fbshipit-source-id: 1ed993ae53e7bc97232a8200b5fb4e01f0db7bb4
2025-04-16 19:57:32 -07:00
Nick LefeverandFacebook GitHub Bot 96939f160b Use source shadow node state on clone (#50773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50773

With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.

This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.

Changelog: [Internal]

Reviewed By: rshest, cipolleschi

Differential Revision: D72315898

fbshipit-source-id: 5e14d03681dd1cc5686a649caa2e8c3685042cfa
2025-04-16 18:58:26 -07:00
Nick LefeverandFacebook GitHub Bot b962646079 Add feature flag for using shadow node state on clone (#50751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50751

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73067007

fbshipit-source-id: 2a67ed33ebd35ffaa3470d75ef6f695471820fa6
2025-04-16 18:58:26 -07:00
Nick LefeverandFacebook GitHub Bot 539f2377a4 Add feature flag for RSNRU on commit (#50745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50745

See title

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D73038437

fbshipit-source-id: e304f3521799c893a51ee8da8e85f45352a8d873
2025-04-16 18:58:26 -07:00
riteshshukla04andFacebook GitHub Bot 4fa57f98da Replaced abort with Default value (#50764)
Summary:
Fixes https://github.com/facebook/react-native/issues/50740

## Changelog:
[INTERNAL] - App Crash on wrong prop type

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

Test Plan: Tested with wrong prop on RN Tester

Reviewed By: cipolleschi

Differential Revision: D73130916

Pulled By: NickGerleman

fbshipit-source-id: 21ffc242e6398509584baf27cf3fb98cbaf2582d
2025-04-16 17:16:32 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 986bcdbbfb Fix CQS signal. Id] 42896038 -- modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/hermes/inspector-modern/chrome
Reviewed By: dtolnay

Differential Revision: D73023455

fbshipit-source-id: 394a337d10546308efa4a49aa7e72b67ef41c2f1
2025-04-16 16:52:06 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 5ed459283a Add deprecation message for receiveCommand (#50770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50770

OSS CI is failing because the we forgot a deprecation message in ReactScrollViewManager.

## Changelog:
[Internal] - Add deprecation annotation to fix ci build

Reviewed By: sbuggay

Differential Revision: D73136939

fbshipit-source-id: 4f39d7c7ae60aaca1011b70135d9535b16ed58e0
2025-04-16 15:51:37 -07:00
zhongwuzwandFacebook GitHub Bot 692b05e77d CSS Added hwb(H W B / A) notation (#50750)
Summary:
Fixes https://github.com/facebook/react-native/issues/50583. cc NickGerleman

## Changelog:

[GENERAL] [FIXED] - CSS Added hwb(H W B / A) notation

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

Test Plan: Added hwb(H W B / A) notation

Reviewed By: cipolleschi

Differential Revision: D73126316

Pulled By: NickGerleman

fbshipit-source-id: 8e3730c6de44a0b4d8a21339e1f7339cb70e2044
2025-04-16 15:47:28 -07:00
Vitali ZaidmanandFacebook GitHub Bot 95af970096 Update debugger-frontend from 26e19a4...bc635fa (#50762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50762

Changelog: [Internal] - Update `react-native/debugger-frontend` from 26e19a4...bc635fa

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

Reviewed By: huntie

Differential Revision: D73102920

fbshipit-source-id: a6c7c4cee2cf8e2ba4ecf130eafa5e6bf6c71e10
2025-04-16 13:46:04 -07:00
Vitali ZaidmanandFacebook GitHub Bot e18e4feb3a react native devtools extra telemetry (#50737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50737

Changelog: [Internal][General] the debugger can now be opened with the query param "telemetryInfo"

Corresponding PR on debugger: https://github.com/facebook/react-native-devtools-frontend/pull/157

Reviewed By: huntie

Differential Revision: D72972397

fbshipit-source-id: 51612d90fedb489ffa1079bfd86d27d0f38b6eee
2025-04-16 13:46:04 -07:00
Sam ZhouandFacebook GitHub Bot 3ab7c26e20 Deploy 0.268.0 to xplat (#50769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50769

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D73120518

fbshipit-source-id: 34017d8c5be1200e669d97012be3d329c815e607
2025-04-16 12:54:38 -07:00
Eugene LinandFacebook GitHub Bot d4f2b02b4d Lower JS Thread Priority by 10
Summary:
## Changelog: [Internal]: [Threading][Added] - Add option to change thread priority
D73074402 handles lowering priority for IWM js and granite threads. this diff handles lowering priority for in game panel js thread

JS thread inherits parent thread priority by default
lowering priority by 10

Reviewed By: rshest

Differential Revision: D72842049

fbshipit-source-id: 6797f7c8406a410956c64bb08a12d2b26c100040
2025-04-16 11:19:29 -07:00
Ramanpreet NaraandFacebook GitHub Bot a6f510003c Mitigate deadlock hazard in RCTUtils.m
Summary:
This structure is unsafe:

```
// In each native module:
+load
  dispatch_once
    NSBundle mainBundle
```

NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.

## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.

Created from CodeHub with https://fburl.com/edit-in-codehub

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D73058551

fbshipit-source-id: 9d14b5556748288227cfb93940f79d44997d7b47
2025-04-16 10:33:53 -07:00
Andrew DatsenkoandFacebook GitHub Bot 929099f064 Move rncxx coremodules
Summary: Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72875329

fbshipit-source-id: 86578362f99210dbe8aa990991829760fa61daf8
2025-04-16 09:53:18 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 706b6e878d Add warning when app is running with the old architecture (#50735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50735

This change adds a warning in JS that is printed when the app is running using the old architecture.

The assumption is that, if it is running with Fabric, it is running with the new architecture. So running without Fabric implies old architecture.

## Changelog:
[General][Added] - Add warning when the app runs with the legacy architecture

Reviewed By: cortinico, rubennorte

Differential Revision: D73041156

fbshipit-source-id: 89a14f6370ae54b9d115e0ef672f29084d009a8e
2025-04-16 09:51:23 -07:00
Mateo GuzmánandFacebook GitHub Bot 99153d8ad8 Make HeadlessJsTaskSupportModule internal (#50739)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.core.HeadlessJsTaskSupportModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.core.HeadlessJsTaskSupportModule internal

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

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

Reviewed By: cortinico

Differential Revision: D73089424

Pulled By: rshest

fbshipit-source-id: efad44f89679932ed6bebcf19fb2beeb096881cb
2025-04-16 09:46:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6d8a02a666 Fix URL parsing to respect node/chromium convention (#50757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50757

We received [this issue](https://github.com/facebook/react-native/issues/50747) in OSS where the URL parsing logic does not respect node/chromium specs.

This can cause issue in usercode. This change fixes it

## Changelog:
[General][Fixed] - make sure that URLs are parsed following the node specs

Reviewed By: huntie

Differential Revision: D73101813

fbshipit-source-id: 36f1d23b3ad7882c16524843621d9ebbcc09b95d
2025-04-16 09:45:46 -07:00
Nicola CortiandFacebook GitHub Bot cac27d15be Convert to Kotlin - ReactEditText
Summary:
This diff converts the last java file inside `com.facebook.react.views.textinput` to Kotlin.

As `ReactEditText` is quite involved, reviewing this one is going to be quite critical.
I'm marking this as breaking as a number of nullability types has changed for OSS users.

Changelog:
[Android] [Breaking] - com.facebook.react.views.textinput.ReactEditText is now in Kotlin. If you're subclassing this type you'll need to adjust your signatures.

Reviewed By: rshest

Differential Revision: D72972921

fbshipit-source-id: 92ed112444cbc20daed5466ad20f651479bfac6f
2025-04-16 09:14:55 -07:00
Mateo GuzmánandFacebook GitHub Bot 9397b113b0 Make ToastModule internal (#50741)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.toast.ToastModule).

GH results are mostly forks and some very old repos (~8, 9 old)

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.toast.ToastModule internal

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

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

Reviewed By: cortinico

Differential Revision: D73089456

Pulled By: rshest

fbshipit-source-id: 0cee12c92e5356c75a7c8b1b1b3c652c9bfce6be
2025-04-16 09:07:26 -07:00
Neil DharandFacebook GitHub Bot 6182795081 Remove usage of HERMES_BUILD_APPLE_DSYM (#50738)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50738

The implementation of this in Hermes depends on a deprecated CMake
feature. Since it just needs to run a command to generate the dSYM, it
seems simpler to eliminate the flag and move the work into the RN build
script.

## Changelog:
[Internal] - move dsym generation logic from Hermes to RN

Reviewed By: cortinico, cipolleschi

Differential Revision: D73054511

fbshipit-source-id: 4b8f9d97ef3386154bfe4030e0061f9c0791d7ea
2025-04-16 07:28:46 -07:00
Gijs WeteringsandFacebook GitHub Bot b743af0aef Back out "Add KeyboardFocusableNode ShadowNodeTrait"
Summary:
Original commit changeset: dcc2410b408e

Original Phabricator Diff: D72258544

Changelog: [Internal]

Differential Revision: D73103169

fbshipit-source-id: ff51309f8470664a6f0859ff729bd4b155ffb0a4
2025-04-16 07:28:41 -07:00
Gijs WeteringsandFacebook GitHub Bot eee1d8b11d Back out "Add fabric implementation to find next focusable view"
Summary:
Original commit changeset: 1a13c82d0678

Original Phabricator Diff: D71558965

Changelog: [Internal]

Differential Revision: D73103165

fbshipit-source-id: b7813a03224dad550ff6d3d99c2b308df5cb4a55
2025-04-16 07:28:41 -07:00
Gijs WeteringsandFacebook GitHub Bot 1d5324cba9 Back out "Add fabric implementation to find Top-Most relative and relevant parent of a child view"
Summary:
Original commit changeset: 7b91ea695e23

Original Phabricator Diff: D72178408

Changelog: [Internal]

Differential Revision: D73103168

fbshipit-source-id: 91a469dd74f8941f3295ff594f47c8fd3ae70184
2025-04-16 07:28:41 -07:00
Gijs WeteringsandFacebook GitHub Bot 513ff5307c Back out "Fix keyboard navigation for FlatList with removeClippedSubviews enabled"
Summary:
Original commit changeset: b55b7735a307

Original Phabricator Diff: D71324219

Changelog: [Internal]

Differential Revision: D73103167

fbshipit-source-id: 99f2ed13a482958a8c71ba2dd1cfc2a5de4786d3
2025-04-16 07:28:41 -07:00
Rubén NorteandFacebook GitHub Bot 7325531eae Fix all Excalidraw SVG diagrams in the docs (#50760)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50760

Changelog: [internal]

This updates all Excalidraw SVG diagrams in the repository to use the latest format exported by Excalidraw after the fix in https://github.com/excalidraw/excalidraw/pull/9386.

I basically opened every image in Excalidraw and re-exported it.

Reviewed By: lenaic

Differential Revision: D73107703

fbshipit-source-id: 4432e952f9e6ee29f59ef8a9ff05479552744a31
2025-04-16 07:24:33 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 44c274ae6e Kotlinify ReactScrollViewManager
Summary:
## Changelog:
[Android] [Internal] - As in the title

Reviewed By: cortinico

Differential Revision: D72971263

fbshipit-source-id: 8bd0c4e29e48f7e3d47a97f1a4e988e7b0282646
2025-04-16 04:57:43 -07:00
Jakub PiaseckiandFacebook GitHub Bot e0a506fac3 Import React namespace instead of specific types (#50749)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50749

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73088912

fbshipit-source-id: 23e4d530fc3b7fb2a0611ba1721474671ab0b9fd
2025-04-16 03:58:58 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot e05c0e67d0 Migrate BridgelessReactContext (#50729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50729

## Changelog:
[Android] [Internal] - As in the title

Reviewed By: cortinico

Differential Revision: D73033754

fbshipit-source-id: 624c36735ec29ce97e426289fd05cf3405fc93d7
2025-04-16 03:32:28 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 0f9af750d4 Migrate ReactHorizontalScrollViewManager (#50703)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50703

## Changelog:
[Android] [Internal] - As in the title

Reviewed By: cortinico

Differential Revision: D72966797

fbshipit-source-id: e295b04719f4390242eebd707518cc261a1631c6
2025-04-16 03:11:30 -07:00
Mateo GuzmánandFacebook GitHub Bot b880d470e0 Make StatusBarModule internal (#50742)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.statusbar.StatusBarModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.statusbar.StatusBarModule internal

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

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

Reviewed By: cortinico

Differential Revision: D73089888

Pulled By: rshest

fbshipit-source-id: c66c2bfe9e1a97855617374a9d46d1378e6e45a5
2025-04-16 02:53:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 989fddc45d Migrate LayoutAnimationController (#50734)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50734

## Changelog:
[Android] [Internal] - As in the title

Reviewed By: cortinico

Differential Revision: D73040384

fbshipit-source-id: adb1ef4c505888deb65403a8339c7d8e1a82786e
2025-04-15 23:56:59 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot bb6f55e774 Migrate TurboModuleManagerDelegate to Kotlin (#50727)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50727

## Changelog:
[Android] [Internal] - As in the title

Reviewed By: cortinico

Differential Revision: D73031128

fbshipit-source-id: b61f46d6877e4fda55e87552874aed7a0bee2736
2025-04-15 23:50:46 -07:00
Alan LeeandFacebook GitHub Bot 0c77bb9f58 Suppress deprecation warning in OSS for BlobModule
Summary:
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Only Error was supressed in previous diff, also suppress warning.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D73085528

fbshipit-source-id: a38a6e15e8ca33d4e93678c54d337ad9e86c2bbe
2025-04-15 22:50:48 -07:00
Alan LeeandFacebook GitHub Bot a070d529fc Suppress deprecation error in OSS for BlobModule (#50748)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50748

We have a different version of OkHttp internally and in OSS so we need to suppress these for now.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D73079163

fbshipit-source-id: 1928b00acbba5bc6577a248bc46a091d5b970f10
2025-04-15 20:45:07 -07:00
Alan LeeandFacebook GitHub Bot c2aa4c14e9 fix naming error in AndroidInfoModule
Summary:
const val NAME had quotes around it breaking native module loading from CoreReactPackage
This error was uncaught in previous diff.

Changelog:
[Internal]

Reviewed By: makovkastar

Differential Revision: D73070533

fbshipit-source-id: a7f14f4b4bd25003529c625d9182554dd2c2ee3e
2025-04-15 18:14:30 -07:00
Alan LeeandFacebook GitHub Bot 912b10416d Fix crash with wrong type comparison in TurboModuleInteropUtils.kt (#50744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50744

Crash was discovered after converting source code from Java to Kotlin.
This was due to type checking against Kotlin types instead of Java types.
Also added minor refactoring of code

Changelog:
[Internal]

Reviewed By: Abbondanzo

Differential Revision: D73064216

fbshipit-source-id: 3429f0627740438be3bbc345c9e7b2c4a535da7e
2025-04-15 16:24:48 -07:00
Tim YungandFacebook GitHub Bot cd031e5693 RNCI: Migrate OSS CI to Flow DotSlash Binary (#50743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50743

Expose `--flowBinary` on React Native CI script.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D73062734

fbshipit-source-id: 6501b6ff2976e4e7e0bbc1c6025205cde4169679
2025-04-15 16:09:45 -07:00
Fabrizio CucciandFacebook GitHub Bot a89f67fe9c Kotlinify BlobModule
Summary:
As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72866832

fbshipit-source-id: 7e67224859a4526ce535f6fc1b17daa08ee1a046
2025-04-15 15:05:38 -07:00
Alan LeeandFacebook GitHub Bot a13f84adcc Convert CoreReactPackage.java to Kotlin (#50709)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50709

Convert Java to Kotlin

Changelog:
[Internal]

Reviewed By: mdvacca

Differential Revision: D72825456

fbshipit-source-id: 4c71ae9892c217a722a74d662f6ae1ca68b97d3f
2025-04-15 11:47:24 -07:00
Ruslan LesiutinandFacebook GitHub Bot c9bee009c3 Record Microtasks step (#50586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50586

# Changelog: [Internal]

We are going to record microtasks phase of the Event Loop.

RAII reporter that was added in D69399955 will be updated to support phase as a parameter.

There is one downside of the current implementation. Every Event Loop task will have a corresponding "Run Microtasks" block displayed, even if the microtasks queue was empty. There is no API in `jsi` that would allow us to get the size of the queue. If we had that, we could emit this event only when there is something in a microtasks queue.

The good this is that these frames usually have duration of 1-2 microseconds, so they are not visible, until user fully zooms in.

Reviewed By: rubennorte

Differential Revision: D72649816

fbshipit-source-id: d597f5b75aaf0975b14f61d2aa28b9c8bc34f4d5
2025-04-15 10:40:51 -07:00
Andrew DatsenkoandFacebook GitHub Bot 5bf54bc1f8 Add support for multiple TurboModule providers (#50707)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50707

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D72968663

fbshipit-source-id: 87026d0a774b3b44980095c31f6df697717951ff
2025-04-15 10:14:07 -07:00
Riccardo CipolleschiandFacebook GitHub Bot b028f84233 Fix check nightlies by escaping the artifact folder (#50726)
Summary:
The check nightlies job is failing on some libraries because the library key contains `/` and ` ` characters that fails to be used properly when they are part of a path.
With this change, we are replacing those characters with `_` so this is a valid path were CI can save the outcome that needs to be collected later.

## Changelog:
[Internal] - Fix folder path

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

Test Plan: Running in GHA

Reviewed By: cortinico

Differential Revision: D73036049

Pulled By: cipolleschi

fbshipit-source-id: 147b9fa15b4dfa08e94f01715e5a175479230d80
2025-04-15 09:37:11 -07:00
Mateo GuzmánandFacebook GitHub Bot a8bb7ea67a Make JSTimers internal (#50711)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.core.JSTimers).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.core.JSTimers internal

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

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

Reviewed By: cortinico, rshest

Differential Revision: D73010826

Pulled By: arushikesarwani94

fbshipit-source-id: ab86059e927350340e379832184d15ccede34207
2025-04-15 09:31:00 -07:00
Peter AbbondanzoandFacebook GitHub Bot 8726e26348 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java (#50705)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50705

Changelog: [Android][Breaking] - Convert NetworkModule to Kotlin, mark methods as final

Reviewed By: mlord93

Differential Revision: D72731227

fbshipit-source-id: 80569f1cc88754492f48fca558db7eab3e1c28b2
2025-04-15 09:26:31 -07:00
Sanjaiyan ParthipanandFacebook GitHub Bot 38fefb2771 Minor Performance and Code Quality Improvements ✈️ (#50682)
Summary:
*Hi,*

I made a small update to the dependency array in `useLayoutEffect`, changing it from `[native]` to `[native.value]` for better precision. Since JavaScript compares objects by reference, this change can lead to a minor performance improvement. Additionally, as `useLayoutEffect` is render-blocking, I wanted to ensure we optimize its usage as much as possible.

As a micro-optimization and in line with good coding practices, I also changed a `let + if` variable to `const`. While the performance gain is minimal, it contributes to cleaner and more consistent code.

Please feel free to review, and I sincerely apologize if I made any mistakes in the process.

## 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] [Changed]* – Refined `useLayoutEffect` dependency array from `[native]` to `[native.value]` for improved precision and efficiency in re-renders.
*[General] [Changed]* – Replaced `let` with `const` where applicable for better code standards and micro-optimization.

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

Reviewed By: huntie

Differential Revision: D72979663

Pulled By: yungsters

fbshipit-source-id: 64ac09811b78ca67be903d8cd91da8cd6f0a45fa
2025-04-15 09:17:02 -07:00
Mateo GuzmánandFacebook GitHub Bot be247076bd Make DrawerOpenedEvent internal (#50712)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.drawer.events.DrawerOpenedEvent).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.drawer.events.DrawerOpenedEvent internal

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

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

Reviewed By: cortinico

Differential Revision: D73010844

Pulled By: arushikesarwani94

fbshipit-source-id: 0fe44c20d0ad0d82d37f5920e37158b20f61479a
2025-04-15 08:47:36 -07:00
Rubén NorteandFacebook GitHub Bot 4930d83d51 Move docs for specs_DEPRECATED to __docs__ to follow the convention (#50724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50724

Changelog: [internal]

TSIA

Reviewed By: huntie

Differential Revision: D73027507

fbshipit-source-id: 3028a30758de0dcb6eff22ce5ef0b6d962227455
2025-04-15 08:34:41 -07:00
Rubén NorteandFacebook GitHub Bot 2b3726b6a3 Add README explaning why we have the Fantom specs in src/private (#50723)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50723

Changelog: [internal]

TSIA

Reviewed By: huntie

Differential Revision: D73027410

fbshipit-source-id: c48c384373bd906344a9604a17102b1e9881b34f
2025-04-15 08:34:41 -07:00
Rubén NorteandFacebook GitHub Bot a482726a44 Use SVG for all diagrams in RN (#50722)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50722

Changelog: [internal]

Just replacing PNG with SVG in a diagram.

Reviewed By: huntie

Differential Revision: D73026611

fbshipit-source-id: 641b40e410ac60bee9afaec3afe454d7ad459044
2025-04-15 08:34:41 -07:00
Fabrizio CucciandFacebook GitHub Bot c74a2cfb36 Kotlinify TouchTargetHelper (2nd attempt) (#50733)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50733

Second attempt after the first diff (i.e. D72716749) was reverted (i.e. D72796716) due to input breakage (see [post](https://fb.workplace.com/groups/rn.panelapps/permalink/1176149354006489/)).

 groundhogday

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72968558

fbshipit-source-id: b0f3713d000e383d59816fcd777dbc14f571e72b
2025-04-15 08:32:26 -07:00
rohitverma-d11andFacebook GitHub Bot 800b12406f Kotlinify ReactLifecycleStateManager (#50685)
Summary:
Implemented ReactLifecycleStateManager.java in Kotlin as part of Kotlin-ifying RN Round 3

## Changelog:

[ANDROID] [CHANGED] - Migrate ReactLifecycleStateManager to Kotlin

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

Test Plan: Run RN-Tester and interacted with Mulitple components(Image, Flatlist, Input ) with both new architecture enabled and disabled

Reviewed By: rshest

Differential Revision: D73003097

Pulled By: cortinico

fbshipit-source-id: 27b90a0b94c17aa42cbb1665ca6fcf06db7cbf96
2025-04-15 07:51:14 -07:00
Mateo GuzmánandFacebook GitHub Bot 555ffd82e8 Make ReactRootViewTagGenerator internal (#50687)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.ReactRootViewTagGenerator).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.ReactRootViewTagGenerator internal

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

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

Reviewed By: rshest

Differential Revision: D73029600

Pulled By: cortinico

fbshipit-source-id: daaa76c823e8b55983e1219766f025301c0db881
2025-04-15 07:39:07 -07:00
Fabrizio CucciandFacebook GitHub Bot ffb10bdd7a Add changelog entry for 0.79.1 (#50732)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50732

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73035393

fbshipit-source-id: 198c8c9e436a5f30bbd190af9706793c38efeeec
2025-04-15 07:25:17 -07:00
Alex HuntandFacebook GitHub Bot 1f27e3e2e4 Add build-types to release workflows (#50396)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50396

Integrates the `yarn build-types` script into our CI workflows.

**Notes**

- Will validate type generation in future PRs as part of the `test-all` workflow (this has been stable (i.e. successfully runs for our codebase) for the last 3 weeks).
- This is not load bearing in production code until D71969602.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71975705

fbshipit-source-id: a234a05008b5e75976bbd5258948c37fcc1eeb76
2025-04-15 07:12:27 -07:00
Jakub PiaseckiandFacebook GitHub Bot 81db7e7426 Omit mouse events from Pressable props (#50717)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50717

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73018165

fbshipit-source-id: 7a5ec463adf614587d107ae052e1cd413d24c189
2025-04-15 05:02:32 -07:00
poonamjain96andFacebook GitHub Bot a0f016ecad Migrated file ReactStylesDiffMap to kotlin (#50616)
Summary:
This PR aims to migrate ReactStylesDiffMap from Java to kotlin as part of https://github.com/facebook/react-native/issues/50513

## Changelog:
[ANDROID][CHANGED]Migrate ReactStylesDiffMap to Kotlin

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

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

Test Plan: Tested on RN tester with both new and old arch

Reviewed By: alanleedev

Differential Revision: D72962016

Pulled By: cortinico

fbshipit-source-id: 4de63ab78cd692822c01b5964209000c9d41f595
2025-04-15 04:23:18 -07:00
Jakub PiaseckiandFacebook GitHub Bot 86bede9c60 Update hermes-parser and related packages in fbsource to 0.28.0 (#50695)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50695

Bump hermes-parser and related packages to 0.28.0.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D72693713

fbshipit-source-id: f529b78a933ae7a6497f67f1f616c1acb95995c3
2025-04-15 03:56:39 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 49d3d0fd9d Migrate MaintainVisibleScrollPositionHelper (#50701)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50701

## Changelog:
[Android] [Internal] - As in the title

Reviewed By: cortinico

Differential Revision: D72965907

fbshipit-source-id: f5e2faebf950ab8ba337bf133c2e049af6c43a2e
2025-04-15 03:18:44 -07:00
Dawid MałeckiandFacebook GitHub Bot eb67bec958 Use sum of subpaths instead of path.join in no-deep-imports lint rule (#50718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50718

On Windows `path.join` returns path with separators unsupported by resolution mechanism. This change enforces the use of `/` separators in `no-deep-imports` rule tests.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D73021185

fbshipit-source-id: d4799c01a5aef5b27fad961d774b58627115d213
2025-04-15 02:39:48 -07:00
Alex HuntandFacebook GitHub Bot 55de31fe1b Define syntax language for .js.flow on GitHub (#50720)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50720

Useful given the recently added `packages/react-native/index.js.flow` file.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D72968275

fbshipit-source-id: f2d330d831f7c473c1abcf05cb5c8ec67ca058c5
2025-04-15 01:44:07 -07:00
David VaccaandFacebook GitHub Bot e8da86a7fe Reduce log level for NativeModuleRegistry.onBatchComplete (#50715)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50715

This diff reduces the log level for NativeModuleRegistry.onBatchComplete(), to track logs before throwing exceptions

changelog: [internal] internal

Reviewed By: makovkastar

Differential Revision: D72999456

fbshipit-source-id: 9ea2f7ed4c86be78837ec2011e3e17e3b2126120
2025-04-14 20:56:07 -07:00
David VaccaandFacebook GitHub Bot e1f562fc2b Categorize LegacyArchitectureLogger soft errors as SOFT_ASSERTIONS (#50714)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50714

This diff changes the category used by LegacyArchitectureLogger soft errors to be SOFT_ASSERTIONS

changelog: [internal] internal

Reviewed By: makovkastar

Differential Revision: D72999455

fbshipit-source-id: b5378fb92b22a3d06dda550192c7eba0db97ddcb
2025-04-14 20:56:07 -07:00
Nick GerlemanandFacebook GitHub Bot a7e7651586 Use standard infra for sample legacy module example
Summary: Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72896577

fbshipit-source-id: 5d3d10a274385e9c73eda48f841fdf58e1f0869a
2025-04-14 19:34:27 -07:00
priyanka.raghuvanshiandFacebook GitHub Bot 2834825b8b Migrate ReactClippingViewGroupHelper.java to Kotlin (#50679)
Summary:
Migrated ReactClippingViewGroupHelper.java to Kotlin as part of the React Native Kotlin migration initiative.
This change helps modernize the React Native Android codebase and improve maintainability.
No functional changes were introduced—only a language conversion while preserving the original logic and behavior.

## Changelog:
[ANDROID] [CHANGED] - Migrated ReactClippingViewGroupHelper.java to Kotlin

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

Test Plan:
 Ran yarn && yarn android in the root directory and verified RNTester builds successfully.
  Opened RNTester on an Android emulator/device and navigated through various screens to ensure the app works as expected.
 Specifically tested views with removeClippedSubviews enabled to confirm runtime behavior remains unchanged.
 Used [KtFmt](https://github.com/facebook/ktfmt) to format the Kotlin file properly.

Reviewed By: arushikesarwani94

Differential Revision: D72973621

Pulled By: cortinico

fbshipit-source-id: e6f426a0cb7eb583935a560660900b29786df4c3
2025-04-14 18:18:36 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot fc9f2fe0ea Fix keyboard navigation for FlatList with removeClippedSubviews enabled (#50105)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50105

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

When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.

This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.

With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.

We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent

Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled

Reviewed By: joevilches

Differential Revision: D71324219

fbshipit-source-id: b55b7735a30714b2a5e1c9e0ed4ae84ab43f6694
2025-04-14 18:08:36 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot d56971011a Add fabric implementation to find Top-Most relative and relevant parent of a child view (#50404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50404

Add another function to fabric to get the topmost stacking context parent given a root and a child.

This is to be used on focus searching algorithm in the case where the next focusable child is deeper in the hierarchy meaning we need to find the top most parent in the Android hierarchy and lay that out as well before transferring focus.

If we don't lay out the parent as well as the next focusable view:

- The next focusable view might lack context given by the parent
- If the parent is a scrollview and has removeClippedSubviews enabled then laying out the next focusable view will not work
- If the view is deeper in the android hierarchy in some cases it won't be layed out unless the parent is

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D72178408

fbshipit-source-id: 7b91ea695e236f3a92f9703bcc9ca943bf0dec24
2025-04-14 18:08:36 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot c8a9b9d342 Add fabric implementation to find next focusable view (#50196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50196

Currently when `removeClippedSubviews` is enabled on Android keyboard navigation breaks and we can never focus the elements that are clipped. iOS has a similar issue but not as drastic, it only happens when elements on the FlatList have a lot of margin between them.

This algorithm aims to find the next focusable view and return it to native so that we can prevent the clipping of the view on the view clipping algorithm and hence fix keyboard navigation. For more information see D71324219

Fabric algorithm to find the next focusable view given:

`parentTag`: Top most relevant parent of the focused view
`focusedTag`: Tag of the currently focused view
`direction`: Direction in which focus is moving

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D71558965

fbshipit-source-id: 1a13c82d067834337e7f7936860780f467c9a15d
2025-04-14 18:08:36 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 96e49330f8 Add KeyboardFocusableNode ShadowNodeTrait
Summary:
Introduce a trait to be able to tell if a ShadowNode is focusable by keyboard. This will be used for focus ordering that delegates the work to the shadow tree when Native platforms don't have enough information to define the next focusable node

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D72258544

fbshipit-source-id: dcc2410b408eab5dbefc4512e0680cbe7f18c811
2025-04-14 18:08:36 -07:00
Joe VilchesandFacebook GitHub Bot 0929697a6d Fix some edge cases with box shadow (#50638)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50638

There were two issues with inset shadows here that I fixed

* If spread was big enough it would "invert" the clear region. [RectF's inset](https://developer.android.com/reference/android/graphics/RectF#inset(float,%20float)) method does not bound to a 0x0 rect, it will instead start making the rect bigger if the inset value is large enough.
* If the clear region was outside the rect the shadow disappeared. This is because [Canvas's drawDoubleRoundRect](https://developer.android.com/reference/android/graphics/Canvas#drawDoubleRoundRect(android.graphics.RectF,%20float[],%20android.graphics.RectF,%20float[],%20android.graphics.Paint)) will fail to draw if the inner rect is not completely inside of the outer.

Changelog: [Android][Fixed] - Fix inset shadow edge cases

Reviewed By: GijsWeterings

Differential Revision: D72833275

fbshipit-source-id: 3f42fb767630319c51a380f8ea28d682df9771a6
2025-04-14 13:57:54 -07:00
David VaccaandFacebook GitHub Bot ab7ef77120 Update assert message in ReactNativeNewArchitectureFeatureFlags (#50666)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50666

This diff updates the assert message in ReactNativeNewArchitectureFeatureFlags to reflect the behavior required by the assert

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D72868428

fbshipit-source-id: 7a43aa9d3b3a2ee60e88cf77d117d97edc955af3
2025-04-14 13:50:53 -07:00
Omar BafagihandFacebook GitHub Bot 5aa8288e85 Convert ReactProp.java to Kotlin (#50671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50671

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D72803988

fbshipit-source-id: 00bacd99f1bde19d905eba71a820496ad6328b2c
2025-04-14 13:22:09 -07:00
Mateo GuzmánandFacebook GitHub Bot 47157aaf3a Make ClearableSynchronizedPool internal (#50690)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.common.ClearableSynchronizedPool).

## Changelog:

[INTERNAL] - Make com.facebook.react.common.ClearableSynchronizedPool internal

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

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

Reviewed By: cortinico

Differential Revision: D72948047

Pulled By: rshest

fbshipit-source-id: c1fab4dc50a0244f57f771c5976d5e549ac7c40f
2025-04-14 12:21:06 -07:00
Alan LeeandFacebook GitHub Bot f9c318b05d Convert TurboModuleManager.java to Kotlin (#50706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50706

Convert Java to Kotlin

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D72771539

fbshipit-source-id: 2646987d12bfed35a1692b96a8548a0952fc41d7
2025-04-14 10:40:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 309ccb8b60 IntBufferBatchMountItem - migrate to Kotlin (#50700)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50700

## Changelog:
[Android] [Internal] - IntBufferBatchMountItem is now in Kotlin

Reviewed By: cortinico

Differential Revision: D72965060

fbshipit-source-id: d036030ddd3fbd0bc387e02236ee330bb310ca64
2025-04-14 10:37:01 -07:00
Jakub PiaseckiandFacebook GitHub Bot f622923374 Update VirtualizedLists react-native imports (#50551)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50551

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72634484

fbshipit-source-id: 128c4eb1b8d7ca2f3821d138afb6750c19bc5f84
2025-04-14 10:32:48 -07:00
Alan LeeandFacebook GitHub Bot 402ada828a Convert DevToolsReactPerfLogger.java to Kotlin
Summary:
Convert Java to Kotlin

Changelog:
[Internal]

Reviewed By: rshest

Differential Revision: D72773730

fbshipit-source-id: 1dfd0b70b950f7270497afcdac3ba465e4d017e1
2025-04-14 10:07:07 -07:00
Jakub PiaseckiandFacebook GitHub Bot c008604e0a Fix changing font scale breaking text (#45978)
Summary:
Fixes https://github.com/facebook/react-native/issues/45857

The general idea behind this PR is the same for both platforms: dirty all nodes with `MeasurableYogaNode` trait when the layout is constrained with a new `fontSizeMultiplier`. There were a few caveats:
- `ParagraphShadowNode` marks its layout as clean in the constructor in most cases. To prevent that from using a stale measurement I'm using the font scale multiplier stored in `content_` property of the node. That value is then compared with the scale used to create the attributed string kept in the node's state. If those differ, the layout is not cleared.
- On Android, font scale wasn't passed down to the `SurfaceHandler`
- On Android, text measurement relies on cached `DisplayMetrics` which were not updated when the system font scale changed.
- `AndroidTextInputShadowNode` wasn't using `fontSizeMultiplier` at all. I needed to add it in all places where an `AttributedString` is constructed.

## Changelog:

[GENERAL] [FIXED] - Fixed text not updating correctly after changing font scale in settings

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

Test Plan:
So far tested on the following code:

```jsx
function App() {
  const [counter,setCounter] = useState(0);
  const [text,setText] = useState('TextInput');
  const [flag,setFlag] = useState(true);

  return (
    <SafeAreaView
        style={{
          flex: 1,
          backgroundColor: '#fff',
          alignItems: 'center',
          justifyContent: 'center',
        }}
    >
      <Text style={{fontSize: 24}}>RN 24 Label Testing {flag ? 'A' : 'B'}</Text>
      <TextInput value={text} onChangeText={setText} style={{fontSize: 24, borderWidth: 1}} placeholder="Placeholder" />
      <Pressable onPress={() => setCounter(prevState => prevState + 1)} style={{backgroundColor: counter % 2 === 0 ? 'red' : 'blue', width: 200, height: 50}} />
      <Pressable onPress={() => setFlag(!flag)} style={{backgroundColor: 'green', width: 200, height: 50}} />
    </SafeAreaView>
  );
}
```

Reviewed By: NickGerleman

Differential Revision: D71727907

Pulled By: j-piasecki

fbshipit-source-id: 240fb5fa4967a9182bce7e885798b233d1e25aea
2025-04-14 08:57:05 -07:00
Alan LeeandFacebook GitHub Bot d791a85911 Convert TurboModuleInteropUtils.java to Kotlin
Summary:
Convert Java to Kotlin

Changelog:
[Internal]

Reviewed By: rshest

Differential Revision: D72752341

fbshipit-source-id: d8e760244f433328ea48533fc694c2a6d62f7b1c
2025-04-14 08:50:02 -07:00
Tim YungandFacebook GitHub Bot 68cad5d2d3 RN: Configure Hermes Parser for React 19 (#50377)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50377

Configures the Hermes Parser to target React 19, which changes components written with Component Syntax to stop generating `forwardRef` calls (because `ref` is now a prop).

Changelog:
[General][Changed] - Configured Hermes Parser to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls.

Reviewed By: javache, SamChou19815

Differential Revision: D72070021

fbshipit-source-id: b891789d4ff1cbcb8eebea3525361ab14e628b51
2025-04-14 08:36:24 -07:00
Mateo GuzmánandFacebook GitHub Bot 2edb928059 Make DrawerClosedEvent internal (#50689)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.drawer.events.DrawerClosedEvent).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.drawer.events.DrawerClosedEvent internal

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

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

Reviewed By: rshest

Differential Revision: D72959868

Pulled By: cortinico

fbshipit-source-id: 6a9c1f408b821afb753b514d5d9e7cbd2079e8ea
2025-04-14 08:28:41 -07:00
Andrew DatsenkoandFacebook GitHub Bot 152fa171ee move rncxx threading (#50702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50702

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72865847

fbshipit-source-id: 0477670ca1f99089aece9b21feb2482b56f43936
2025-04-14 07:55:19 -07:00
Nitin ShuklaandFacebook GitHub Bot 30030c5a76 Migrate FrescoBasedReactTextInlineImageShadowNode.java to Kotlin (#50693)
Summary:
Migrated FrescoBasedReactTextInlineImageShadowNode.java to Kotlin as part of the React Native Kotlin migration initiative.
This change helps modernize the React Native Android codebase and improve maintainability.
No functional changes were introduced—only a language conversion while preserving the original logic and behavior.

## Changelog:
[ANDROID] [CHANGED] - Migrated FrescoBasedReactTextInlineImageShadowNode.java to Kotlin

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

Test Plan:
 Ran yarn && yarn android in the root directory and verified RNTester builds successfully.
 Opened RNTester on an Android emulator/device and navigated through various screens to ensure the app works as expected.
 Specifically tested views with FrescoBasedReactTextInlineImageShadowNode enabled to confirm runtime behavior remains unchanged.
 Used [KtFmt](https://github.com/facebook/ktfmt) to format the Kotlin file properly.

Reviewed By: cortinico

Differential Revision: D72948067

Pulled By: rshest

fbshipit-source-id: ed56e6b328804d7b70271b669d101f70d6190d7f
2025-04-14 07:38:45 -07:00
Jakub GrzywaczandFacebook GitHub Bot 864833fca9 Generate keep.xml to prevent resource shrinking on Android (#50620)
Summary:
On Android, when resource shrinking is enabled, all resources added by Metro may be removed as react-native is accessing resources based on strings rather than references, so AGP can't see its usage.

Example output of `android/app/build/outputs/mapping/release/resources.txt `when `shrinkResources` is enabled.
```
raw/__node_modules_expo_vectoricons_build_vendor_reactnativevectoricons_fonts_materialcommunityicons : reachable=false
drawable/__common_assets_haptics_icon : reachable=false
```

It’s a coincidence that most of the resources are currently working, as many file names begin with strings that already exist in the String Pool. For example, `node_modules...` is flagged as used because 'node' is present in the String Pool, causing it to be whitelisted. However, this does not guarantee that the same will apply to all files - especially in a monorepo setup, where paths are significantly different. For example
* `__node_modules_expo_vectoricons_build_vendor_reactnativevectoricons_fonts_materialcommunityicons`
* `__common_assets_haptics_icon`

To prevent that behavior, metro during assets export should create `keep.xml` listing all resources generated by metro.
https://developer.android.com/build/shrink-code#keep-resources

We have already made a similar change in expo cli: https://github.com/expo/expo/pull/35465

## Changelog:

[ANDROID][ADDED] - Generate keep.xml to prevent resource shrinking

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

Test Plan:
1. Enable resource shrinking in RNTester by adding this to `android.buildTypes.release` to `packages/rn-tester/android/app/build.gradle.kts`
```gradle
isMinifyEnabled = true
isShrinkResources = true
```
2. Use some resources in playground, for example:
```diff
 diff --git a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
index 9dbacb99701..9ac9c231f3f 100644
 --- a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
+++ b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
@@ -11,16 +11,14 @@

 import type {RNTesterModuleExample} from '../../types/RNTesterTypes';

-import RNTesterText from '../../components/RNTesterText';
 import * as React from 'react';
 import {StyleSheet, View} from 'react-native';
+import {Header} from "react-native/Libraries/NewAppScreen";

 function Playground() {
   return (
     <View style={styles.container}>
-      <RNTesterText>
-        Edit "RNTesterPlayground.js" to change this file
-      </RNTesterText>
+      <Header />
     </View>
   );
 }
```

3. Build app using `hermesRelease` variant
4. See Playground screen

| Before | After |
|---|---|
| <img width="488" alt="Zrzut ekranu 2025-04-10 o 12 17 53" src="https://github.com/user-attachments/assets/24fcaa7b-6ddb-4ba6-9fe5-65c27bcbc931" /> | <img width="488" alt="Zrzut ekranu 2025-04-10 o 12 15 58" src="https://github.com/user-attachments/assets/09a1ce77-be26-4571-a4b8-c466bf19e026" /> |

5. Inspect `packages/rn-tester/android/app/build/outputs/mapping/hermesRelease/resources.txt`

| Before | After |
|---|---|
| `drawable/_reactnative_libraries_newappscreen_components_logo : reachable=false` | `drawable/_reactnative_libraries_newappscreen_components_logo : reachable=true` |

Reviewed By: cortinico

Differential Revision: D72960028

Pulled By: huntie

fbshipit-source-id: df725fa2ea50150cd67687a97986976ffbbb5b40
2025-04-14 07:33:27 -07:00
Rubén NorteandFacebook GitHub Bot 748183ded0 ] Clean up feature flag to enable paint time reporting in Event Timing API (#50698)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50698

Changelog: [internal]

This cleans up the flag to enable paint time reporting for Event Timing API entries, as this reporting fixes a bug and we've verified is stable/performant enough.

Reviewed By: rshest

Differential Revision: D72960337

fbshipit-source-id: 976810382208b9403c01c80324b540570bbc0e42
2025-04-14 07:12:00 -07:00
Wang ChuanandFacebook GitHub Bot 7771317e5c fix(ios): avoid incorrectly updating caret position (#50680)
Summary:
Avoid incorrectly updating caret position

Pull Request resolved: https://github.com/facebook/react-native/issues/50641

The caret position is updated incorrectly when a user is first typing if an zero-length selection is set.

## Changelog:
[IOS] [CHANGED] - Typing into TextInput now will not cause the caret position to update to the beginning when a zero-length selection is set.

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

Test Plan:
Tested with the following code(a simplified version from the code in https://github.com/facebook/react-native/issues/50641)
```js
const [selection, setSelection] = useState({start: -1, end: -1});
const onSelectionChange = (
      evt: NativeSyntheticEvent<TextInputSelectionChangeEventData>,
    ) => {
      const {selection} = evt.nativeEvent;
      const {start, end} = selection;
      console.log('selection change: ', start, end);
      setSelection(selection);
};
return (
  <View style={{ position: 'absolute', top: 50, left: 30 }}>
    <TextInput
      placeholder="test"
      selection={selection}
      onSelectionChange={onSelectionChange}
    />
  </View>
);
```
When using the main branch, the caret position will jump back to the beginning after the first typing.
It works fine after applying this commit.

Reviewed By: fabriziocucci

Differential Revision: D72957245

Pulled By: cipolleschi

fbshipit-source-id: 3586797332b35e86b17f386a35e7d192ff758f7e
2025-04-14 05:42:24 -07:00
Rubén NorteandFacebook GitHub Bot db4b3df910 Use emojis in technical docs titles (#50699)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50699

Changelog: [internal]

Just changing the template to include emojis in the top level titles to make it easier to scan the doc

Reviewed By: lenaic

Differential Revision: D72961870

fbshipit-source-id: 64c45e7ac769c38af06ea318cdb581a04e230f90
2025-04-14 05:41:02 -07:00
Nicola CortiandFacebook GitHub Bot ab47834eb1 Convert to Kotlin - ReactTextInputManager (#50656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50656

This is going to convert to Kotlin one of the biggest class we have: ReactTextInputManager

As this class is quite big, I suspect there will be breakages.
https://github.com/search?type=code&q=%22%3A+ReactTextInputManager%22

I will investigate further and adjust the class as necessary.

Changelog:
[Android] [Breaking] - ReactTextInputManager is now in Kotlin

Reviewed By: rshest

Differential Revision: D72859925

fbshipit-source-id: 140d1a48ef891f1e6a401e3be59a11d3f9e24078
2025-04-14 05:25:39 -07:00
Jakub PiaseckiandFacebook GitHub Bot 7269a2da79 Update React types usage in ImageProps (#50541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50541

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72624527

fbshipit-source-id: ffdce30b010e2425bc805d800f70be5eaf2b3fed
2025-04-14 05:12:31 -07:00
Mateo GuzmánandFacebook GitHub Bot 1d7fd7ebcf Make I18nManagerModule internal (#50691)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.i18nmanager.I18nManagerModule).

There is only one usage in [qunarcorp/imsdk-android](https://github.com/qunarcorp/imsdk-android), but the project has not been updated for 6 years so I'm not considering it breaking.

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.i18nmanager.I18nManagerModule internal

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

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

Reviewed By: cortinico

Differential Revision: D72948034

Pulled By: rshest

fbshipit-source-id: 3ca653194d73125d5718bfce74abd1fc969eb050
2025-04-14 04:54:23 -07:00
Mateo GuzmánandFacebook GitHub Bot fef7fb954c Make ImageLoaderModule internal (#50688)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.image.ImageLoaderModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.image.ImageLoaderModule internal

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

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

Reviewed By: cortinico

Differential Revision: D72948039

Pulled By: rshest

fbshipit-source-id: d164ec1df405072731c956926ae7fb977635ad96
2025-04-14 04:45:29 -07:00
Mateo GuzmánandFacebook GitHub Bot 6f2357a050 Remove obsolete @TargetApi annotations for Lollipop (API 21) (#50686)
Summary:
Static code analysis detected obsolete SDK version checks.

Since [the minimum supported SDK version is API 24](https://github.com/react-native-community/discussions-and-proposals/discussions/802), these checks for API 21 are no longer necessary and can be safely removed.

## Changelog:

[INTERNAL] - Remove obsolete TargetApi annotations for LOLLIPOP (API 21)

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

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

CI should be green.

Reviewed By: cortinico

Differential Revision: D72948073

Pulled By: rshest

fbshipit-source-id: 1dd1415364d19f115771de3643cdc023a247d851
2025-04-14 04:37:59 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 18a7c8d57c Do not generate ReactCodegen.podspec for libraries (#50645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50645

While we were refactoring the generation of the podspec, we made a mistake and we started generating the ReactCodegen.podspec for both libraries and apps.

This must be generated only for apps.

## Changelog:
[iOS][Fixed] - Generate `ReactCodegen.podspec` only for apps.

Reviewed By: fabriziocucci

Differential Revision: D72854074

fbshipit-source-id: 5a1d1120e576d4fe4cf8f733793f5a2619278c2b
2025-04-14 03:38:55 -07:00
Dawid MałeckiandFacebook GitHub Bot 87809d9326 Add no-deep-imports rule to eslint-plugin-react-native (#50542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50542

After TS types generation is completed, react native deep imports will be deprecated. This rule produces warnings to let users know to use root imports instead. For more information about why this rule was added, please check [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/894).

Changelog:
[General][Added] - Added no-deep-imports rule to eslint-plugin-react-native.

Reviewed By: robhogan

Differential Revision: D71398004

fbshipit-source-id: 69104f69b1b1c59b5b0f115dcdd708a46d8d614d
2025-04-14 03:02:36 -07:00
Nicola CortiandFacebook GitHub Bot 70cdf12c4d Extract inner classes from ReactTextInputManager to separate files (#50657)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50657

The ReactTextInputManager file is huge and really hard to migrate to Kotlin.
Here I'm extracting 4 private inner classes to separate files and converting them to Kotlin.

This will make reviewing the Kotlin migration of ReactTextInputManager a bit easier.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D72858396

fbshipit-source-id: 1fcca1b8421c810aa4bf9fdca7656f4e805565d8
2025-04-12 01:49:35 -07:00
Nicola CortiandFacebook GitHub Bot 02aa7e7ce0 Make class internal - ReactTextInputShadowNode (#50647)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50647

This diff makes the following file internal - ReactTextInputShadowNode
as part of our ongoing effort of reducing the API surface.

There is only one usage in OSS: `react-native-aztec`. The library is abandoned
with little weekly download so we should be good marking this as internal.

Changelog:
[Internal] [Changed] - ReactTextInputShadowNode is now internal.

Reviewed By: javache

Differential Revision: D72854896

fbshipit-source-id: 27512704ed84e893ae72d26469527276133a6295
2025-04-12 01:49:35 -07:00
Panos VekrisandFacebook GitHub Bot ef12ecfa92 Deploy 0.267.0 to xplat (#50674)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50674

Changelog: [Internal]

Reviewed By: mvitousek

Differential Revision: D72888246

fbshipit-source-id: 88aa6dad3a968858a22aaa43a2118aa4a0ec5f82
2025-04-11 23:22:56 -07:00
Nick GerlemanandFacebook GitHub Bot f9aed5a747 Enable TextInput-textStyles E2E Test against RNTester
Summary:
We fixed the previous layout issue when it wasn't in a ScrollView (I think text caching problem?) Let's enable for more than just Catalyst, and re-enable this test for iOS!

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D72683455

fbshipit-source-id: 538f8e23226c07510d382e45eb29f1710822849e
2025-04-11 21:08:16 -07:00
Nick GerlemanandFacebook GitHub Bot e4ae7be1a2 Hide chrome when viewing deep links on tiny screens (#50673)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50673

Because, this is less a pain then trying to shrink every example to fit in to the tiny window given to us by Jest E2E.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D72683487

fbshipit-source-id: 5c08bd04445fc573086bc780194c893d0cb6ea19
2025-04-11 21:08:16 -07:00
Nick GerlemanandFacebook GitHub Bot 675b51f562 Remove chonky header for single modules (#50672)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50672

We have precious little screen real estate, esp in E2E tests where we get 320x192 dips. Let's clean this up.

Changelog: [Internal]

Reviewed By: cortinico, GijsWeterings

Differential Revision: D72683491

fbshipit-source-id: 222a77f937dfb9dcceb627d8f084c58df7c07b56
2025-04-11 17:13:19 -07:00
Nick GerlemanandFacebook GitHub Bot e385ff689b Use rntester-legacy URL scheme for legacy arch app (#50670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50670

Changelog: [internal]

Reviewed By: shwanton

Differential Revision: D72840476

fbshipit-source-id: 8fca3241c54b70fc3267cfcf30211035eb595a25
2025-04-11 14:50:12 -07:00
Andrew DatsenkoandFacebook GitHub Bot 047914562e move rncxx utils (#50668)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50668

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D72800712

fbshipit-source-id: f966906d10df1fac818fc9998dbe5e0b8d67be3f
2025-04-11 14:35:03 -07:00
Omar BafagihandFacebook GitHub Bot a92a209544 Convert ReactPropertyHolder.java to Kotlin (#50633)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50633

Changelog:
[Internal]

Converted xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/ReactPropertyHolder.java to Kotlin using Android studio kotlinator

Reviewed By: alanleedev

Differential Revision: D72800835

fbshipit-source-id: 4637a3b63f346fb72311427f27d8f711cd37996e
2025-04-11 14:05:38 -07:00
Tim YungandFacebook GitHub Bot d0c8716bfd RN: Revert Okio.buffer(…) Change from D72632266 (#50669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50669

Fixes a bug that was introduced while migrating from Java to Kotlin.

Changelog:
[Android][Changed] - Fixed a bug with synchronously fetching resources from Metro.

Reviewed By: cortinico, mdvacca

Differential Revision: D72878362

fbshipit-source-id: feb881fa51f6eaa2cb5c7ba87ac93b7fdc29dc2c
2025-04-11 13:32:12 -07:00
Andrew DatsenkoandFacebook GitHub Bot 14fdf3257f move rncxx profiling (#50651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50651

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72792459

fbshipit-source-id: d010508ca6311b6981090a64e4746141eda67976
2025-04-11 12:07:12 -07:00
Joe VilchesandFacebook GitHub Bot 52173ab701 Use CA shadow apis for box shadow (#50636)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50636

A while ago someone on GitHub reported that box shadow on iOS was causing frame drops when animating a large, pretty blurry shadow: https://github.com/facebook/react-native/issues/49128. This week I finally got around to fixing this!

The slowness was happening since we were using CG to draw this shadow, which is very CPU intensive and, to my knowledge, does not take advantage of GPUs to do anything. Couple that with an animating, large, blurry shadow and we have frame issues. These shadows were taking very long to draw, to get the image of the shadow (which then needs to be copied into some texture 3 times as big, composited, put on the screen etc) took 12-14ms :o, thats very slow.

To fix this I figured out how to get CA's shadow APIs working, which take advantage of the GPU. The enable inset shadows and spread you have to get creative with a mix of `shadowPath` and `mask` with a `CAShapeLayer`, but we got it done! Things are much faster, I am not sure how to time this but using a real device shows no frame drops :D

Changelog: [iOS][Fixed] - Box shadows on iOS are faster

Reviewed By: lenaic

Differential Revision: D72823334

fbshipit-source-id: 460339c9d77e7423ce59a1a9178b6b3ad527e4b0
2025-04-11 11:55:50 -07:00
Zeya PengandFacebook GitHub Bot c5e9ef53ae allow setting SurfaceStartedCallback on UIManager
Summary:
## Changelog:

[General] [Added] - allow setting SurfaceStartedCallback on UIManager

Reviewed By: rshest

Differential Revision: D71917124

fbshipit-source-id: b8f8eaef892518e3aaa3da82ab91b06173a644a0
2025-04-11 10:54:07 -07:00
Zeya PengandFacebook GitHub Bot 8d6098a645 create UIManagerNativeAnimatedDelegate to drive per frame NativeAnimated update
Summary:
## Changelog:

[Android] [Added] - create UIManagerNativeAnimatedDelegate to potentially drive per frame NativeAnimated update
* I'm imitating the way LayoutAnimation kicks off (`UIManagerAnimationDelegate`); re-using `UIManager::animationTick` function to schedule per frame animation callback

Reviewed By: rshest

Differential Revision: D71419497

fbshipit-source-id: ba867e4c2ed2ad89a7c9229c1156e20aca45e0e9
2025-04-11 10:54:07 -07:00
Zeya PengandFacebook GitHub Bot a812cac176 call TurboModuleWithJSIBindings::installJSIBindings at core TurboModuleBinding instead of on each platform (#50534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50534

## Changelog:

[Internal] [Changed] - call `TurboModuleWithJSIBindings::installJSIBindings` at core TurboModuleBinding instead of on each platform

Reviewed By: rshest

Differential Revision: D72073835

fbshipit-source-id: 17adde1e003876d41695f4679e6fe85a82fbaff7
2025-04-11 10:54:07 -07:00
Zeya PengandFacebook GitHub Bot 5747fc4b17 Fix license comment block in ReactCxxPlatform code
Summary:
## Changelog:

[Internal] [Changed] - Fix license comment block in ReactCxxPlatform code

Reviewed By: rshest

Differential Revision: D72802801

fbshipit-source-id: 987a532bfe10d66db0aa2dad687d064225fa609d
2025-04-11 10:44:01 -07:00
Rubén NorteandFacebook GitHub Bot 143beaaa99 Improve format of navigation to home (#50665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50665

Changelog: [internal]

Just a stylistic change of the link back to the documentation home.

It also changes the link in the template to make sure it's incorrect so people are forced to edit it when creating new docs.

Reviewed By: lenaic

Differential Revision: D72866823

fbshipit-source-id: fa7be286f996049b3f06e2defa5a8c486d63091b
2025-04-11 10:28:04 -07:00
Rubén NorteandFacebook GitHub Bot 9fde76a02d Improve documentation for Fantom (expanding on pragmas) (#50663)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50663

Changelog: [internal]

Adds additional documentation about pragmas and feature flags for Fantom.

Changes the diagram to mention that feature flags are passed to the Fantom CLI.

Reviewed By: andrewdacenko

Differential Revision: D72865960

fbshipit-source-id: abfd167279195495064f3c4dbdcaff92dd865bcf
2025-04-11 10:28:04 -07:00
artus9033andFacebook GitHub Bot 86a7388355 refactor: migrate DynamicFromMap to Kotlin (#50597)
Summary:
This PR introduces a rewrite of `DynamicFromMap.java` to Kotlin as requested in https://github.com/facebook/react-native/issues/50513.

## Changelog:

[ANDROID] [CHANGED] - Migrated `DynamicFromMap.java` to Kotlin

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

Test Plan:
1. Implement unit tests for `DynamicFromMap.kt` - `DynamicFromMapTests.kt`
2. Ensure the tests pass: `./gradlew test`
3. Run the RN tester app on new & on old architectures

Reviewed By: javache, rshest

Differential Revision: D72853616

Pulled By: cortinico

fbshipit-source-id: 855acdc7fa7810ab9f223b0be7778c028a646de5
2025-04-11 09:59:00 -07:00
Rubén NorteandFacebook GitHub Bot 39b2d664bf Fix incorrect formatting (#50662)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50662

Changelog: [internal]

Prettier accidentally removed the line break here, breaking the Github Markdown format for this.

Reviewed By: andrewdacenko

Differential Revision: D72861208

fbshipit-source-id: 565e9f146a5eed12a9bbc465bb599057a4511d21
2025-04-11 09:11:28 -07:00
Rubén NorteandFacebook GitHub Bot 6a746e8855 Move src/private/component files to specific directories (#50653)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50653

Changelog: [internal]

Just moving some private modules to scoped directories within `src/private/components`.

Reviewed By: rshest

Differential Revision: D72855151

fbshipit-source-id: ae61c9fa976fde4f5f58622525bf16eceb9de7bf
2025-04-11 08:49:03 -07:00
Riccardo CipolleschiandFacebook GitHub Bot bd64ec817d Backout "Add warning when a component is loaded with the interop layer"
Summary:
Backing out https://github.com/facebook/react-native/pull/50244 as it is causing unexpected issues internally.

## Changelog:
[iOS][Changed] - Revert  "Add warning when a component is loaded with the interop layer"

Reviewed By: cortinico

Differential Revision: D72857290

fbshipit-source-id: cfae6ccf85a472ae03983349fc7a2620e157865d
2025-04-11 08:16:46 -07:00
Gijs WeteringsandFacebook GitHub Bot 5fd08ce3de Fix ReactInstanceIntegrationTest.cpp poisoning future tests. (#50658)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50658

The root cause of this is D67857739, confirmed via bisect.

The ReactInstanceIntegrationTest.cpp tests caused some sort of state poisoning. Because of that all tests in the same buck module that ran after, failed. These cpp tests have a retry mechanism where failing tests are retried, and because in that situation the integration tests didn't run, they passed there.

This turned into a total of 24 tests being 50% flaky, as every first attempt failed but every second attempt (in isolation) succeeded.

I did a bit of trial and error with resetting InspectorFlags and ReactNativeFeatureFlags (the latter was already being done before D67857739), and added an extra assertion to the tests to make sure that after that, `dangerouslyDisableFuseboxForTest` still worked in the right (but only the right) contexts.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D72860850

fbshipit-source-id: 959e67ff7a43ccc3c35db108bdb1138d8c27d328
2025-04-11 08:15:26 -07:00
Nicola CortiandFacebook GitHub Bot 45e725b3dc Convert to Kotlin - ReactTextInputShadowNode (#50648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50648

This diff converts another class to Kotlin - ReactTextInputShadowNode

Changelog:
[Internal] [Changed] - ReactTextInputShadowNode to Kotlin

Reviewed By: rshest

Differential Revision: D72854819

fbshipit-source-id: 94d2f4e05ecdbf0d7507e59a0e11fd02d4dbfa55
2025-04-11 08:09:24 -07:00
Andrew DatsenkoandFacebook GitHub Bot 798eb0ab84 move rncxx logging (#50652)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50652

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D72800216

fbshipit-source-id: 722546b4538fce0d30d90a346a737a564bfd21ee
2025-04-11 08:06:06 -07:00
Rubén NorteandFacebook GitHub Bot d18abc8ec7 Use scrollTop for scrolling tests (#50660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50660

Changelog: [internal]

This is just a simpler way to test for changes in scroll position.

Reviewed By: andrewdacenko

Differential Revision: D72860138

fbshipit-source-id: a92d430399255a278f5c3c72005a5288d28310ab
2025-04-11 08:05:48 -07:00
Rubén NorteandFacebook GitHub Bot 277d39a216 Add technical documentation for Fantom
Summary:
Changelog: [internal]

This adds some technical documentation for the Fantom testing system.

Reviewed By: andrewdacenko

Differential Revision: D72861981

fbshipit-source-id: edcf71c98bea0b95dfdbb6289aaf7eda4b0b24b1
2025-04-11 07:52:26 -07:00
d06b32d215 Add usage documentation for Fantom (#50659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50659

Changelog: [internal]

This adds the user guide documentation for Fantom.

Reviewed By: sammy-SC

Differential Revision: D72860137

fbshipit-source-id: 672224b38d045e29af2468ab05fed98991218bf7

Co-authored-by: Samuel Susla <samuelsusla@meta.com>
2025-04-11 07:52:26 -07:00
Rubén NorteandFacebook GitHub Bot 1ac682ca83 Fix link to main doc in Event Loop documentation (#50650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50650

Changelog: [internal]

just a fix in the docs

Reviewed By: rshest

Differential Revision: D72855852

fbshipit-source-id: 3919b71861c1a803df755d1917df5bf29fb39462
2025-04-11 07:52:26 -07:00
Rubén NorteandFacebook GitHub Bot c8cbf7f813 Improve documentation for feature flags (#50644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50644

Changelog: [internal]

This improves the documentation for the feature flag system by extending information about 2 areas:
- Codegen
- `print` command in CLI

Reviewed By: lenaic

Differential Revision: D72852768

fbshipit-source-id: 97932ea078595ef54cd437a433072f83bbdff609
2025-04-11 07:52:26 -07:00
Rubén NorteandFacebook GitHub Bot c8455804dd Disable default markdownlint rules to prevent conflicts with prettier (#50649)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50649

Changelog: [internal]

`markdownlint` failed on https://github.com/facebook/react-native/actions/runs/14400262967/job/40384250331?fbclid=IwZXh0bgNhZW0CMTEAAR51hcoM4zuGTG4SNbqas4z9X0FsIO8Y9DsCgxJepvD5qSdDezhhIV-uLTpn5w_aem_FF2OiYft3uMzK4xJrKGvuA because lines were too long, but that's already handled by Prettier and I thought that I had disabled that rule in the configuration/

It turns out you have to explicitly set `default: false` to actually disable the default rules and only use the options explicitly set in the config (which this does).

Reviewed By: andrewdacenko

Differential Revision: D72855229

fbshipit-source-id: 8e0c74e8e47e298ebf1450b1a0e31f31179c626c
2025-04-11 07:52:26 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e83ece0d17 Do not generate Apple specific files for Android (#50654)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50654

We realized that when calling
```
npx react-native-community/cli codegen --path . --platform all --outputPath /tmp/codegen
```

We were generating in the android folder some files that are Apple-specific.

With this change, we should stop generating the Apple specific files in Android.

## Changelog
[General][Fixed] - Do not generate Apple specific files for Android

Reviewed By: cortinico

Differential Revision: D72859336

fbshipit-source-id: 443c4dca032e8e68c1da9d829d361d5e0ed007a0
2025-04-11 07:41:38 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot c50f3e5f66 Migrate Event class (#49887)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49887

## Changelog:
[Internal] -

As in the title.

This was the last Java file in the `events-common` module, so now it can be a pure Kotlin one.

NOTE: I opted to make the base method `Event.getEventData` public (instead of previously protected), as based on the usage patterns by the users this seems to make the most sense in this context.

Reviewed By: cortinico

Differential Revision: D70777597

fbshipit-source-id: fdaa52e4400ad8e86a8711daf359eb5a10974d05
2025-04-11 07:02:03 -07:00
Mateo GuzmánandFacebook GitHub Bot c134c41cd7 Fix unresolved KDoc references (#50640)
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. This is just another round addressing several of them.

## Changelog:

[INTERNAL] - Fix unresolved KDoc references

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

Test Plan: Verify that the comments link the classes correctly using Android Studio

Reviewed By: cortinico

Differential Revision: D72848152

Pulled By: javache

fbshipit-source-id: e09b1ddad494885ef3090d7f0f62a782eed922c1
2025-04-11 06:25:14 -07:00
Fabrizio CucciandFacebook GitHub Bot 57768bfbcd Kotlinify ColorPropConverter (#50626)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50626

As per title.

Changelog:
[Android][Breaking] Kotlinify ColorPropConverter

Reviewed By: javache

Differential Revision: D72788490

fbshipit-source-id: 1c81c70566437db36e45e59995093c4c808369d8
2025-04-11 05:14:34 -07:00
Pieter De BaetsandFacebook GitHub Bot 398f2068d1 Migrate com.facebook.react.runtime.ReactSurfaceImpl to Kotlin
Summary: Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72804023

fbshipit-source-id: ceb046ca271e97d8f314c1ba3599c7c65c4295fe
2025-04-11 05:01:45 -07:00
Omar BafagihandFacebook GitHub Bot 5fe814e38f Convert ReactPropGroup.java to Kotlin (#50629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50629

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D72770907

fbshipit-source-id: 249bdf84b1d2d27c2f9d4e201d5b4f35285b4b32
2025-04-11 04:05:30 -07:00
Rubén NorteandFacebook GitHub Bot 3839861dbe Clean up feature flag fixMountingCoordinatorReportedPendingTransactionsOnAndroid (#50632)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50632

Changelog: [internal]

This cleans up the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag that is no longer necessary.

Reviewed By: javache

Differential Revision: D72561255

fbshipit-source-id: 0942122832ce40cacc273265e4c95b5fe251dbe6
2025-04-11 04:02:33 -07:00
Rubén NorteandFacebook GitHub Bot c0fac7ba74 Reference print command in featureflags CLI help (#50643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50643

Changelog: [internal]

Just realized this was missing from the message.

Reviewed By: lenaic

Differential Revision: D72852138

fbshipit-source-id: 27ed4b6e6d8b370cfa34a9878ca9bb0815cb75eb
2025-04-11 03:40:27 -07:00
Pieter De BaetsandFacebook GitHub Bot 86cd31eb6b Remove unused loadSplitBundleFromServer
Summary:
This code is not referenced internally or externally and was part of the DevSplitBundleLoader which was removed in D43597007.

Changelog: [Android][Breaking][Removed] Removed loadSplitBundleFromServer from DevSupportManager interface

Reviewed By: cortinico

Differential Revision: D72790533

fbshipit-source-id: 9e0960af4c528d9019943c89466ab442f34619e1
2025-04-11 03:27:04 -07:00
Pieter De BaetsandFacebook GitHub Bot bf8d6da101 Make Task.call API simpler (#50545)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50545

All usages of Task.call involve a Runnable which returns another Task, which we then extract using `.continueWithTask(Task::getResult)`. Instead inline this behaviour inside `Task.call` to avoid allocation of unnecessary intermediate objects.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72600051

fbshipit-source-id: 7e7c0c8e1de24b1aeff7addab2eb10272bc73ddb
2025-04-11 03:05:00 -07:00
Pieter De BaetsandFacebook GitHub Bot 26e89cf9e3 Remove UnobservedTaskException (#50546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50546

We do not use this mechanism for exception handing with Tasks, so remove it.

Changelog: [Internal]

Reviewed By: cortinico, fabriziocucci

Differential Revision: D72600053

fbshipit-source-id: f9ae877b05ece66682cb6c291b05257953f5aebb
2025-04-11 03:05:00 -07:00
Nicola CortiandFacebook GitHub Bot 5ef68569b3 Bump CMake to 3.30.x and Enable INTERPROCEDURAL_OPTIMIZATION for libhermes.so in OSS
Summary:
PR is here https://github.com/facebook/react-native/pull/50581

This enables INTERPROCEDURAL_OPTIMIZATION for Hermes in OSS, similar to how we did for libreactnative.so
I also had to bump CMake to 3.30.x to unblock the build failure with `-fuse-ld=gold`

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D72696879

fbshipit-source-id: e842f6cdf41f6936ef4baeb70e4833a1a0c2d19b
2025-04-11 03:03:09 -07:00
Alan LeeandFacebook GitHub Bot f62bd98a32 Convert ReconnectingWebSocket.java to Kotlin (#50614)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50614

Convert Java to Kotlin

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D72750330

fbshipit-source-id: 03014c47938697a337109a6d213388837eccfb71
2025-04-10 19:52:23 -07:00
Alan LeeandFacebook GitHub Bot 61c539fa6a Convert FileIoHandler.java to Kotlin (#50612)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50612

Java to Kotlin conversion

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D72742937

fbshipit-source-id: b72b51460555226fa7fe99f4ca5290f46c478291
2025-04-10 19:52:23 -07:00
Peter AbbondanzoandFacebook GitHub Bot c51c4b1922 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java (#50630)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50630

Changelog: [Internal] - Convert AlertFragment to Kotlin

Reviewed By: mlord93

Differential Revision: D72729380

fbshipit-source-id: f7d8ee4cd5938c453b865aea60b6f0533bd8fe0e
2025-04-10 18:26:47 -07:00
Peter AbbondanzoandFacebook GitHub Bot 7101adf611 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java (#50631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50631

Changelog: [Internal] - Convert DialogModule to Kotlin

Reviewed By: mlord93

Differential Revision: D72729281

fbshipit-source-id: fb5ced042f48c8615c1c7ea4bc1de07671d652e6
2025-04-10 18:26:47 -07:00
Tim YungandFacebook GitHub Bot eeab47e61a Animated: Ship avoidAnimatedRefInvalidation (#50635)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50635

Ships the feature flag introduced by https://github.com/facebook/react-native/pull/50002.

Changelog:
[General][Changed] - Animated components' `ref` will now only reattach when receiving new props if the new props contain different `AnimatedValue` or `AnimatedEvent` instances. (Previously, Animated components' `ref` would always reattach when receiving new props.)

Differential Revision: D72802613

fbshipit-source-id: 4495eb778e3bb9473172c393bd984d93c4ba5f00
2025-04-10 18:26:23 -07:00
David VaccaandFacebook GitHub Bot f8b2956437 Delete ChoreographerCompat
Summary:
Deleting ChoreographerCompat as its only method is deprecated and it's unused.

Use Choreographer.FrameCallback instead

changelog: [Android][Breaking] Deleting ChoreographerCompat, Use Choreographer.FrameCallback instead

Reviewed By: alanleedev

Differential Revision: D72817152

fbshipit-source-id: 08624dd07e916116381293cde57a0fdf5452a670
2025-04-10 17:58:01 -07:00
David VaccaandFacebook GitHub Bot d34cbfa819 Delete react/bridge/bridge.pro
Summary:
react/bridge/bridge.pro is unused and out-of-sync, let's delete it

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D72090835

fbshipit-source-id: 6bbfd870465c6e440943a7d715d6dfeb5e5bd043
2025-04-10 17:57:13 -07:00
David VaccaandFacebook GitHub Bot 98d0847440 Remove DoNotStripAny annotation from ReactModuleWithSpec
Summary:
ReactModuleWithSpec is deprecated and unused, it was replaced by TurboModule interface.
In this diff I'm removing DoNotStripAny annotation from ReactModuleWithSpec to make sure proguard doesn't retain any reference to it

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D72090838

fbshipit-source-id: 44aa0d6d4b2b592b5b8fea1b9e4578e2df3a9a8e
2025-04-10 17:57:13 -07:00
David VaccaandFacebook GitHub Bot df0e479644 Delete InvalidIteratorException
Summary:
InvalidIteratorException is not used in java, kotlin nor C++. This diff just removes this class

This is not a breaking change due to the lack of usages

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D72090837

fbshipit-source-id: 75aa4a8d2c1abbeb32bd38e5e60cbf7f04be823e
2025-04-10 17:57:13 -07:00
David VaccaandFacebook GitHub Bot 767462a910 Introduce UseReactNativeNewArchitectureFeatureFlagDetector
Summary:
In this diff I'm introducing a new lint error called UseReactNativeNewArchitectureFeatureFlagDetector to prevent usages of:

```
ReactNativeFeatureFlags.enableBridgelessArchitecture
ReactNativeFeatureFlags.enableFabricRenderer
ReactNativeFeatureFlags.useFabricInterop
ReactNativeFeatureFlags.useTurboModuleInterop
ReactNativeFeatureFlags.useTurboModules
```

in favor of:
```
ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture
ReactNativeNewArchitectureFeatureFlags.enableFabricRenderer
ReactNativeNewArchitectureFeatureFlags.useFabricInterop
ReactNativeNewArchitectureFeatureFlags.useTurboModuleInterop
ReactNativeNewArchitectureFeatureFlags.useTurboModules
```

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D72028734

fbshipit-source-id: c9ca39133e3ce5e5f2d393e9b9ee1803b350bdad
2025-04-10 17:57:13 -07:00
David VaccaandFacebook GitHub Bot 9ad8f22d00 Migrate ReactNativeFeatureFlags -> ReactNativeNewArchitectureFeatureFlags for new architecture feature flags
Summary:
This diff migrates all usages of new architecture feature flags from ReactNativeFeatureFlags -> ReactNativeNewArchitectureFeatureFlags

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71988913

fbshipit-source-id: 2cdfaeaf19ebbe236ea2bd0539854b69f70a6e01
2025-04-10 17:57:13 -07:00
David VaccaandFacebook GitHub Bot aaf0d7dc7f Introduce ReactNativeNewArchitectureFeatureFlags (#50605)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50605

In order to help Proguard to stripping-out bytecode, we need a way to statically enable all Feature Flags used by the New Architecture at build time (e.g. enableBridgelessArchitecture, useTurboModule, etc). The React Native Feature Flag system is mostly implemented in C++ and unfortunately Proguard can’t follow C++ code to understand what feature flags are enabled or disabled at build time.

After analyzing several proposals, we decided to introduce a new internal API called ReactNativeNewArchitectureFeatureFlags, this API will help us detect if an app is using the new architecture at build time.
In order to make this API to work I’ve migrated all usages of new architecture feature flags from ReactNativeFeatureFlags -> ReactNativeNewArchitectureFeatureFlags

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D71988912

fbshipit-source-id: a6d58c5b1f39f85370298a347db228e933c6c743
2025-04-10 17:57:13 -07:00
David VaccaandFacebook GitHub Bot 7aed1fe6a0 Ensure interop is disabled when ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE == true (#50604)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50604

ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE asume Fabric and TurboModule interops are disabled, in this diff I'm adding an assertion to validate this at runtime

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D71854550

fbshipit-source-id: a4b3acfe4c3227115300b100be4d6222d5eace8e
2025-04-10 17:57:13 -07:00
David VaccaandFacebook GitHub Bot c962980363 Mark ReactPackageLogger as @LegacyArchitecture (#50596)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50596

Mark ReactPackageLogger as LegacyArchitecture

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D72067076

fbshipit-source-id: 128d005f8de7eb3b3a2d90a86a375f8db6f7f4ec
2025-04-10 17:57:13 -07:00
Fabrizio CucciandFacebook GitHub Bot 68f0b7cd73 Back out "Kotlinify TouchTargetHelper"
Summary:
Original commit changeset: 2e3e7ff41e27

Original Phabricator Diff: D72716749

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D72796716

fbshipit-source-id: e716fb4dbfbb73f7dc6d27e0f7572992d316adb6
2025-04-10 17:56:24 -07:00
David VaccaandFacebook GitHub Bot 212c68ea96 Make @FrameworkAPI classes internal
Summary:
FrameworkAPI classes are not part of the public API, this diff will remove all FrameworkAPI classes from our public API tracking

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D72805466

fbshipit-source-id: b16791ab854017be681ceabd61b628d2d0ba0c5c
2025-04-10 16:51:51 -07:00
David VaccaandFacebook GitHub Bot 40899f5d28 Remove @StableReactNativeAPI from Legacy architecture classes (#50634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50634

Remove StableReactNativeAPI from Legacy architecture classes

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D72802685

fbshipit-source-id: d3ba5237838396a0158d389eb834793755442905
2025-04-10 16:08:35 -07:00
Zeya PengandFacebook GitHub Bot bfb274c244 Convert NativeAnimatedNodesManager to kotlin
Summary:
## Changelog:

[Android] [Changed] - Convert NativeAnimatedNodesManager to kotlin

Reviewed By: alanleedev

Differential Revision: D72657697

fbshipit-source-id: 36180d0906f6ef621b8b667442b61642f9ccc5d1
2025-04-10 13:53:30 -07:00
Rubén NorteandFacebook GitHub Bot 02bf24b1d8 Define continuous and idle priority for raw events and expose them to React via nativeFabricUIManager (#50627)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50627

Changelog: [internal]

This defines 2 new priorities in Fabric, matching the definitions in React:
* Continuous
* Idle

They're exposed to React via 2 new properties in `nativeFabricUIManager`: `unstable_ContinuousEventPriority` and `unstable_IdleEventPriority`.

It also adds the mapping from the raw event priorities to the Fabric event priorities.

This change doesn't have any effect at the moment. For these to come into effect, we need to:
1. Fix the mapping between Fabric priorities and React priorities in the React repository. See https://github.com/facebook/react/pull/32847
2. Enable the `fixMappingOfEventPrioritiesBetweenFabricAndReact` feature flag.

Reviewed By: javache

Differential Revision: D72791968

fbshipit-source-id: 525b6e5c99dc0ddc1e5c60fdb5b73f0555e5f0d3
2025-04-10 13:12:21 -07:00
Mateo GuzmánandFacebook GitHub Bot 834a6338c8 Make RequestOnlyHandler internal (#50601)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.packagerconnection.RequestOnlyHandler).

## Changelog:

[INTERNAL] - Make com.facebook.react.packagerconnection.RequestOnlyHandler internal

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

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

Reviewed By: cortinico

Differential Revision: D72746748

Pulled By: arushikesarwani94

fbshipit-source-id: d70b87c09dd1a9ddd4b25e33f2bc164c15a5d90b
2025-04-10 11:37:50 -07:00
Mateo GuzmánandFacebook GitHub Bot 7851f87594 Make EventCategoryDef internal (#50600)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.events.EventCategoryDef).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.events.EventCategoryDef internal

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

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

Reviewed By: cortinico

Differential Revision: D72746853

Pulled By: arushikesarwani94

fbshipit-source-id: d74847d89b3cfc3d68ff43a0ca31abb59aefa575
2025-04-10 11:27:32 -07:00
Pieter De BaetsandFacebook GitHub Bot b0c3613fb6 Use @JvmOverloads in Task (#50547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50547

Remove duplication and instead use JvmOverloads to expose all variants to Java

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72600052

fbshipit-source-id: a92c75a49ee74f13f3d7bfba6a394099bfaac291
2025-04-10 10:32:32 -07:00
Pieter De BaetsandFacebook GitHub Bot d0ab69791b Align all Systrace markers on TRACE_TAG_REACT
Summary:
We currently have a high granularity of different React Native systrace markers. These different markers are not consistently applied and we only enable a subset of them by default in our tracing workflows. As we migrate more and more tracing to Perfetto the tags also become less relevant and will be replaced by Perfetto categories and tracks in the future.

This stack aims to simplify this setup by reducing all systrace tags to single TRACE_TAG_REACT.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72672912

fbshipit-source-id: 1b6b14fc4ef6d6830bba41d7977f277d63ff5117
2025-04-10 10:06:47 -07:00
Rubén NorteandFacebook GitHub Bot 2c79c70c3b Downgrade markdownlint-rule-relative-links to v3 to avoid yarn errors with incompatible engines (#50625)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50625

Changelog: [internal]

This fixes yarn install errors coming from repositories other than `react-native` where `--ignore-engines` isn't specified. This was caused by `markdownlint-rule-relative-links` requiring Node.js >= v22 when we're using v20 in most cases.

Fixes https://github.com/react-native-community/docker-android/actions/runs/14380730414/job/40323632337?pr=234

Reviewed By: cortinico

Differential Revision: D72789007

fbshipit-source-id: 2c0b161af8be8d37bf57a7ea9cc22023434d4cb2
2025-04-10 09:44:11 -07:00
Pieter De BaetsandFacebook GitHub Bot 05ce95fca4 Convert com.facebook.react.runtime.internal.bolts.Task to Kotlin (#50548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50548

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72578962

fbshipit-source-id: b4364e7b252bb3fc59a76df8a92f45b18854e650
2025-04-10 08:36:52 -07:00
Fabrizio CucciandFacebook GitHub Bot f70dcd8912 Kotlinify JSONArguments (#50623)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50623

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72784115

fbshipit-source-id: 601bae57cd1143f3cdf5f3e93bfed36b8a2015b7
2025-04-10 07:41:51 -07:00
Rubén NorteandFacebook GitHub Bot 7aa0499e11 Clean up feature flag to enable LongTasks API
Summary:
Changelog: [internal]

(This is "internal" because the `PerformanceObserver` API isn't stable yet).

This cleans up the feature flag to enable the LongTasks API to the availability of the API itself isn't gated behind this specific one.

Reviewed By: rshest

Differential Revision: D72784109

fbshipit-source-id: 8ca45d66cebbd80729829c928bebb13f4a38b7ab
2025-04-10 07:39:52 -07:00
Gijs WeteringsandFacebook GitHub Bot 568ba647cf fix nullsafe FIXMEs for ReactHostImpl.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactHostImpl.java nullsafe

Reviewed By: cortinico

Differential Revision: D72384082

fbshipit-source-id: 999903b1bf98ea61d2431ace5ca6584535ca4857
2025-04-10 06:56:29 -07:00
Gijs WeteringsandFacebook GitHub Bot 87accdfe47 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72384065

fbshipit-source-id: 0f1df2a870d1975b0c522a2e6a17e8959aab6c7c
2025-04-10 06:56:29 -07:00
Gijs WeteringsandFacebook GitHub Bot 58b0755b80 remove stale NULLSAFE_FIXME comment
Summary:
this is no longer actionable/relevant

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72787458

fbshipit-source-id: 44eda9c7b461228ff66b31f8831b85d0d5650905
2025-04-10 06:50:15 -07:00
Fabrizio CucciandFacebook GitHub Bot 32b1b7c2a0 Kotlinify JsonWriterHelper (#50619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50619

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72782158

fbshipit-source-id: f81b60a1a965efe82e065d7426d26f69fc84b321
2025-04-10 06:26:02 -07:00
Nicola CortiandFacebook GitHub Bot b4965fcfa6 Convert to Kotlin - BridgelessAtomicRef
Summary:
This diff converts to Kotlin the following file: BridgelessAtomicRef.java
as part of our ongoing effort of migrating the codebase to Kotlin.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D72777272

fbshipit-source-id: b6e10ce32b701614cb323adde7d3df2aa2a8f293
2025-04-10 04:50:45 -07:00
Alan LeeandFacebook GitHub Bot ca2b2aac60 Convert StateWrapperImpl.java to Kotlin (#50615)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50615

Convert Java to Kotlin

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D72752437

fbshipit-source-id: 7c437087f161538ab20ce9d123d7526b98cf4d90
2025-04-10 03:17:02 -07:00
Devansh SainiandFacebook GitHub Bot 07a1fb8e6b Migrate FileReaderModule to kotlin (#50562)
Summary:
This PR aims to migrate FileReaderModule from Java to kotlin as part of https://github.com/facebook/react-native/issues/50513

## 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][CHANGED]Migrate FileReaderModule to Kotlin

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

Test Plan: Tested on RN tester with both new and old arch

Reviewed By: arushikesarwani94

Differential Revision: D72726333

Pulled By: cortinico

fbshipit-source-id: 130393373a258f18f8baaa96745da8fdebd62436
2025-04-10 02:55:06 -07:00
Fabrizio CucciandFacebook GitHub Bot f21e61f4c5 Kotlinify TouchTargetHelper
Summary:
As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72716749

fbshipit-source-id: 2e3e7ff41e2706808b112347fedd370eb9048f1e
2025-04-10 02:06:35 -07:00
Mateo GuzmánandFacebook GitHub Bot e424a5739e Make TextTransform internal (#50599)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.text.TextTransform).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.text.TextTransform internal

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

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

Reviewed By: mdvacca

Differential Revision: D72746912

Pulled By: arushikesarwani94

fbshipit-source-id: 7a5b0d4179f23f457c79194f043ce9189f17fce7
2025-04-09 19:43:17 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot b47bfcef5f Fix border-radius with outline-offset
Summary:
This is not mentioned on the spec https://drafts.csswg.org/css-ui/#outline-offset but web adds the outline-offset to the border-radius of the outline. With this change now we render outline in this case like web

Related issue: https://github.com/facebook/react-native/issues/50582

Changelog: [General][Fixed] - Outline now takes into account outline-offset to calculate its border-radius, same as web.

Reviewed By: joevilches

Differential Revision: D72749009

fbshipit-source-id: b3cd39e09e7856b6ccd45aab541cd51f05559832
2025-04-09 18:53:51 -07:00
Phillip PanandFacebook GitHub Bot cbad8aafa5 cleanup rn_ama_new_arch_ios.bridge_batch_did_complete_fix (#50598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50598

changelog: [ios][breaking] delete BridgeModuleBatchDidComplete config helpers

this is not used anywhere, cleanup

Reviewed By: srinathvijay

Differential Revision: D72692359

fbshipit-source-id: 42220a64be59bc0d32efe76c1f1d8fc4508a6b0e
2025-04-09 18:17:57 -07:00
Intl SchedulerandFacebook GitHub Bot 89bcbed1a5 translation auto-update for batch 2/58 on master
Summary:
Chronos Job Instance ID: 1125907957165630
Sandcastle Job Instance ID: 13510800658866748

Processed xml files:
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/systeminfo/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml
android_res/com/facebook/catalyst/shell/res/values/strings.xml
android_res/com/facebook/anna/app/res/values/strings.xml
android_res/com/facebook/anna/app/res/values/strings.xml
android_res/com/facebook/orca/res/values/strings.xml
android_res/com/facebook/workshared/userstatus/donotdisturb/res/values/strings.xml
android_res/com/facebook/widget/tokenizedtypeahead/res/values/strings.xml
android_res/com/facebook/widget/refreshableview/res/values/strings.xml
android_res/com/facebook/video/player/res/values/strings.xml
android_res/com/facebook/spherical/res/values/strings.xml
android_res/com/facebook/saved/common/res/values/strings.xml
android_res/com/facebook/facecast/common/badge/res/values/strings.xml
android_res/com/facebook/ui/emoji/res/values/strings.xml
android_res/com/facebook/stickers/res/values/strings.xml
android_res/com/facebook/feedbase/res/values/strings.xml
android_res/com/facebook/rtc/common/res/values/strings.xml
android_res/com/facebook/payments/ui/res/values/strings.xml
android_res/com/facebook/fig/mediagrid/res/values/strings.xml
android_res/com/facebook/pages/app/clicktomessengerads/messagesuggestion/ui/res/values/strings.xml
android_res/com/facebook/messagingneue/res/values/strings.xml
android_res/com/facebook/messaging/widget/toolbar/res/values/strings.xml
android_res/com/facebook/messaging/shared/res/values/strings.xml
android_res/com/facebook/messaging/ui/stickerstore/res/values/strings.xml
android_res/com/facebook/caspian/res/values/strings.xml
android_res/com/facebook/timeline/widget/actionbar/res/values/strings.xml
android_res/com/facebook/showpages/res/values/strings.xml
android_res/com/facebook/nux/res/values/strings.xml
android_res/com/facebook/messaging/users/username/res/values/strings.xml
android_res/com/facebook/messaging/tincan/messenger/res/values/strings.xml
android_res/com/facebook/messaging/res/values/strings.xml
android_res/com/facebook/messaging/threadview/quickpromotion/res/values/strings.xml
android_res/com/facebook/messaging/threadview/message/res/values/strings.xml
android_res/com/facebook/messaging/threadview/games/res/values/strings.xml
android_res/com/facebook/messaging/xma/res/values/strings.xml
android_res/com/facebook/messaging/threadview/admin/res/values/strings.xml
android_res/com/facebook/messaging/reactions/res/values/strings.xml
android_res/com/facebook/messaging/threadview/attachment/video/res/values/strings.xml
android_res/com/facebook/messaging/settings/res/values/strings.xml
android_res/com/facebook/messaging/searchnullstate/res/values/strings.xml
android_res/com/facebook/messenger/login/res/values/strings.xml
android_res/com/facebook/messaging/promotion/res/values/strings.xml
android_res/com/facebook/messaging/presence/res/values/strings.xml
android_res/com/facebook/messaging/polling/adminmessage/res/values/strings.xml
android_res/com/facebook/messaging/photos/view/res/values/strings.xml
android_res/com/facebook/messaging/omnipicker/res/values/strings.xml
android_res/com/facebook/messaging/media/res/values/strings.xml
android_res/com/facebook/messaging/livelocation/shared/res/values/strings.xml
android_res/com/facebook/messaging/permissions/res/values/strings.xml
android_res/com/facebook/messaging/invites/res/values/strings.xml
android_res/com/facebook/messaging/groups/threadactions/res/values/strings.xml
android_res/com/facebook/messaging/groups/nullstate/res/values/strings.xml
android_res/com/facebook/messaging/groups/admin/res/values/strings.xml
android_res/com/facebook/messaging/extensions/res/values/strings.xml
android_res/com/facebook/messaging/ephemeral/res/values/strings.xml
android_res/com/facebook/messaging/emoji/res/values/strings.xml
android_res/com/facebook/ui/emoji/common/res/values/strings.xml
android_res/com/facebook/messaging/customthreads/res/values/strings.xml
android_res/com/facebook/messaging/contacts/picker/res/values/strings.xml
android_res/com/facebook/messaging/search/picker/res/values/strings.xml
android_res/com/facebook/contacts/res/values/strings.xml
android_res/com/facebook/messaging/connectivity/res/values/strings.xml
android_res/com/facebook/messaging/composer/tooltips/res/values/strings.xml
android_res/com/facebook/messaging/composer/platformmenu/res/values/strings.xml
android_res/com/facebook/messaging/composer/botcomposer/quickreply/res/values/strings.xml
android_res/com/facebook/messaging/composer/botcomposer/res/values/strings.xml
android_res/com/facebook/messaging/composer/res/values/strings.xml
android_res/com/facebook/xapp/messaging/composer/audio/button/res/values/strings.xml
android_res/com/facebook/mig/button/close/res/values/strings.xml
android_res/com/facebook/messaging/composer/messagereply/res/values/strings.xml
android_res/com/facebook/messaging/communitymessaging/adminactions/mutememberoptions/composer/res/values/strings.xml
android_res/com/facebook/messaging/chatheads/menuitem/res/values/strings.xml
android_res/com/facebook/messaging/chatheads/res/values/strings.xml
android_res/com/facebook/messaging/banner/res/values/strings.xml
android_res/com/facebook/maps/common/res/values/strings.xml
android_res/com/facebook/lowdatamode/res/values/strings.xml
android_res/com/facebook/mig/dialog/alert/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/ui/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/whatsapplogin/tos/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/whatsapplogin/authconfirmation/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/whatsapplogin/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/login/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/owners/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/remotepairing/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/language/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/multilocaletext/res/values/strings.xml
android_res/com/facebook/alohacommon/remote/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/remotedfu/res/values/strings.xml
android_res/com/facebook/alohacommon/ui/player2/res/values/strings.xml
android_res/com/facebook/alohaapp/debug/res/values/strings.xml
android_res/com/facebook/alohaapp/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/postinstall/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/passcode/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/name/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/mounting/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/enterpriseinternal/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/enterprise/res/values/strings.xml
android_res/com/facebook/alohacommon/devicesetup/dayzeroota/res/values/strings.xml
android_res/com/facebook/ui/mainview/res/values/strings.xml
android_res/com/facebook/audience/stories/storysurface/activity/main/res/values/strings.xml

allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D72759811

fbshipit-source-id: a83fc3eb1a6191f8e8007f44ae07c58df27baa32
2025-04-09 17:56:33 -07:00
Sam ZhouandFacebook GitHub Bot 178febd0aa Replace $Diff with Omit in react-native (#50603)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50603

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D72740500

fbshipit-source-id: 829a51dfbdb597fec8b3cca29364a67158a8dd2a
2025-04-09 17:38:01 -07:00
Gijs WeteringsandFacebook GitHub Bot f86de9724b Mark ReactApplicationContext.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark ReactApplicationContext.java as nullsafe

Reviewed By: javache

Differential Revision: D72704847

fbshipit-source-id: cd6907630839a8be2a6fb1d0a673357aef1395fc
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot 8d72e5eeb9 Mark Inspector.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark Inspector.java as nullsafe

Reviewed By: javache

Differential Revision: D72704854

fbshipit-source-id: fcd15a3cc2e9ea1ed90ecca13c068188b859afac
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot bf911e1f92 Mark JavaScriptModuleRegistry.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark JavaScriptModuleRegistry.java as nullsafe

Reviewed By: javache

Differential Revision: D72704846

fbshipit-source-id: d1bca84cd2f4543e154ab8e7948821b176088d64
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot 9d21f97ebe Mark JSBundleLoader.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark JSBundleLoader.java as nullsafe

Reviewed By: javache

Differential Revision: D72704848

fbshipit-source-id: 7995bda8200fff96ff66e54eb503fee53f8a19dd
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot 12b22dc57c Mark JSONArguments.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark JSONArguments.java as nullsafe

Reviewed By: javache

Differential Revision: D72704849

fbshipit-source-id: a545bca24d4d95930f0e334c5295584e3c03c10c
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot 1e4d016950 Mark ModuleSpec.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark ModuleSpec.java as nullsafe

Reviewed By: javache

Differential Revision: D72704851

fbshipit-source-id: 4cccc70ac846f1aa90831557841d2e621847bfc4
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot 27179a7cf2 Mark ReactContextBaseJavaModule.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark ReactContextBaseJavaModule.java as nullsafe

Reviewed By: javache

Differential Revision: D72704852

fbshipit-source-id: 65abc94d59aefc64ff214bd70ead16d9011dec20
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot 911c11f129 Mark ReactMarker.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark ReactMarker.java as nullsafe

Reviewed By: javache

Differential Revision: D72704853

fbshipit-source-id: 2d022f407070ab473a43281fab6f28c53fa09f21
2025-04-09 14:49:39 -07:00
Gijs WeteringsandFacebook GitHub Bot 005c11ea0a Mark NativeModule.java as nullsafe
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!

Changelog: [Android][Fixed] Mark NativeModule.java as nullsafe

Reviewed By: javache

Differential Revision: D72704850

fbshipit-source-id: a71f3acddb0382410739b9632fba509fffcfebfd
2025-04-09 14:49:39 -07:00
Nick GerlemanandFacebook GitHub Bot 9528872692 Delete RNTesterTextInput
Summary:
This is not a TextInput and is totally unused (whoops).

Changelog: [Internal]

Reviewed By: cortinico, Abbondanzo

Differential Revision: D72683433

fbshipit-source-id: 1218701fdc473117774a9bdb6f94b6a4508599a4
2025-04-09 13:26:01 -07:00
Andrew DatsenkoandFacebook GitHub Bot 1dd6c84339 Move rncxx uimanager (#50593)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50593

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72577247

fbshipit-source-id: dff49be35556f9b899d6f6f696dc89cfa83e115b
2025-04-09 12:23:07 -07:00
Mateo HrastnikandFacebook GitHub Bot d816ba0a70 Inject dev machine IP on Android and improve error message when connection fails (#49166)
Summary:
I've implemented a feature that automatically bundles the Metro Bundler's IP address into Android builds. This change aligns the Android development experience with iOS, allowing the app to maintain a connection to the Metro Bundler even when disconnected from USB.

Currently, in iOS builds, the IP address of the computer running the Metro Bundler is automatically bundled into the app, ensuring seamless connectivity even when the device is disconnected from USB. In contrast, Android developers must manually input the IP address if the USB connection is lost, which can be tedious and error-prone.

More info in discussion thread: https://github.com/react-native-community/discussions-and-proposals/issues/870

I anticipate that a change where making IP the default method of connection will result in a lot of people running into issues where they can't connect to Metro server (for example, if they're on a different network, or they disable wifi). So I also changed the default error message you get in case the app can't connect to the bundler and updated the "Change Bundle Location" dev menu.

The previous error message

```
Unable to load script. Make sure you're either
running Metro (run 'npx react-native start') or
that your bundle 'RNTesterApp.android.bundle' is
packaged correctly for release.
```

was changed to:

```
Unable to load script.

Make sure you're running Metro (npx react-native start)
or that your bundle 'RNTesterApp.android.bundle' is
packaged correctly for release.

The device must be on the same WiFi as your laptop to
connect to Metro.

To use USB instead, shake the device to open the dev
menu and set the bundler location to 'localhost: 8081'
and run:
  adb reverse tcp:8081 tcp:8081

```

![image](https://github.com/user-attachments/assets/f4002c7a-ff8a-4518-acf7-85af4257e05b)

And the new dev menu UI looks like this:
![image](https://github.com/user-attachments/assets/ecaf6922-f074-4db9-b723-c4b18ececd91)

The two buttons with "10.0.2.2:8081" and "localhost:8081" are suggestions which when tapped fill the input with the text from the button. The first button suggests the IP of the development machine, and the second one is hardcoded to localhost:8081.

## Changelog:

[ANDROID] [CHANGED] - Automatically use Metro bundler IP address when installing apps on Android

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

Test Plan:
I've tested the implementation on a physical device and on emulator and it's working solid. However, I would invite further testing in order to catch possible edge cases.

I've recorded common scenarios

Scenario 1:
	Device doesn't have the app installed.
	We connect the device via USB, install the app and open it.
	Device is on the same network as the dev machine.
	Bundler location is by default set to the IP of the dev machine.
	When starting app, the app is able to connect to the dev machine and download the bundle.

Scenario 2:
	Device doesn't have the app installed.
	Wi-Fi is turned off on the device but device is connected via USB
	We install the app and open it.
	Bundler location is by default set to the IP of the dev machine.
	When starting app, the app is not able to connect to the dev machine and shows the error message.
	After opening the dev menu we see that the IP is set to the IP of the dev machine.
	We click the "localhost" option in the dev menu and click apply
	After that the app is able to connect to the dev machine and download the bundle (via USB) since the traffic is forwarded using adb reverse.

Notes:
	When we set an IP in the dev menu, the app will persist it.
	If we connect the device via USB and reinstall the app the persisted data stays the same, so the previously set IP will be used.
	However, the IP of the dev machine will be displayed as an option in the dev menu.

https://github.com/user-attachments/assets/cc2da5d4-de07-4980-a61c-68ca53db74c7

https://github.com/user-attachments/assets/407b8871-8b83-4a6b-a833-f87ddc0afc82

Reviewed By: huntie

Differential Revision: D69664231

Pulled By: cortinico

fbshipit-source-id: 5a339be50a17a59202416b99e72f4397d8ff4805
2025-04-09 11:58:05 -07:00
Pieter De BaetsandFacebook GitHub Bot d60a9c1c06 Export WITH_FBSYSTRACE and fbsystrace deps
Summary:
We only use fbsystrace API's directly from cxxreact and reactperferflogger targets, so export the dependency and the preprocessor flag there so we do not have to duplicate (and potentially forget to do this) from all other targets in react-native.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72704827

fbshipit-source-id: 845c174b4f9ce0a67dd80be3f6274234328bbdb9
2025-04-09 11:47:20 -07:00
Pieter De BaetsandFacebook GitHub Bot 6e701ce080 Fix crash on arm32 when configuring eventEmitterCallback (#50592)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50592

For unclear reasons this is crashing on some devices when dereferencing the module ref. Instead we can just access the existing global_ref to the module instance and avoid any deallocation timing issues.

Also added some additional safeguards and validation against incorrect JNI invocations.

Changelog: [Android][Fixed] Fix crash when TurboModule event emitters are used on arm32

Reviewed By: cortinico

Differential Revision: D72716972

fbshipit-source-id: 3803329048d8388b3d30c9cb55a857e399569eea
2025-04-09 11:10:31 -07:00
David VaccaandFacebook GitHub Bot 029d41dd13 Mark ReactVirtualTextViewManager as @LegacyArchitecture (#50595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50595

Mark ReactVirtualTextViewManager as LegacyArchitecture

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D72594213

fbshipit-source-id: 623ff2aa1712bea716d9c69c20ab8797abd08a6e
2025-04-09 10:41:50 -07:00
David VaccaandFacebook GitHub Bot a649100299 Use ReactNativeFeatureFlagsForTests in uimanager tests (#50594)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50594

Some tests are failing due to unsatisfied error when looking for C++ classes of feature flags, we fix this by calling ReactNativeFeatureFlagsForTests.setup()

changelog: [internal] internal

Reviewed By: yungsters, sbuggay

Differential Revision: D72721786

fbshipit-source-id: c41c05428b1f99db9b03bb67cd9ddc47ebec84b5
2025-04-09 10:41:50 -07:00
Fabrizio CucciandFacebook GitHub Bot 06ad33b511 Kotlinify TransformHelper
Summary:
As per title.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72574855

fbshipit-source-id: b10e6e9d0c3dc5ae674d37c9c69b7748c77d09e1
2025-04-09 10:22:42 -07:00
Gijs WeteringsandFacebook GitHub Bot 25f5b4aafc Actually mark DynamicFromArray.java as nullsafe
Summary:
Forgot to actually apply the annotation in the previous diff.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72703917

fbshipit-source-id: d8f1374ebb9e11e6d67ee23541da71f8cfbd1574
2025-04-09 10:21:57 -07:00
Rubén NorteandFacebook GitHub Bot 33f4d49dcf Add linting for markdown with markdownlint (#50591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50591

Changelog: [internal]

This implements linting for Markdown files in React Native via `markdownlint`. We already have Prettier support for Markdown, but this adds some missing functionality, especially validation of local links.

Reviewed By: cortinico

Differential Revision: D72649666

fbshipit-source-id: 5e2c369332b270850d6d04d8960e6ce717f5ba7a
2025-04-09 10:21:03 -07:00
Pieter De BaetsandFacebook GitHub Bot 97ddd17e5e fix nullsafe FIXMEs for FabicUIManager.java and mark nullsafe [reland]
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made FabricUIManager.java nullsafe

Reviewed By: cortinico

Differential Revision: D72705994

fbshipit-source-id: 56786a5df78322e833401c94dafae4e9335feefe
2025-04-09 09:31:31 -07:00
Gijs WeteringsandFacebook GitHub Bot 623dcc3902 fix nullsafe FIXMEs for TextAttributeProps.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TextAttributeProps.java nullsafe

Reviewed By: rshest

Differential Revision: D72460127

fbshipit-source-id: b5b098d8763ed45579c50068033374dfc88afa86
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot ff7da1d6d8 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72460132

fbshipit-source-id: 4ff177555f4d035be82ec6a134227f9ed2076fb9
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 1929ebd00e fix nullsafe FIXMEs for ReactTextViewManager.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextViewManager.java nullsafe

Reviewed By: javache

Differential Revision: D72460124

fbshipit-source-id: a75705ac4ab486ccaa9162dee5bfd8cae77967c7
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot e03607fa5f Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: arushikesarwani94

Differential Revision: D72460133

fbshipit-source-id: 7673e962e50946b504e3bd9446b3aef962271241
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 021491bf51 Fix nullsafe FIXMEs for ReactTextView.java and mark nullsafe
Summary:
https://developer.android.com/reference/android/widget/TextView#onFocusChanged(boolean,%20int,%20android.graphics.Rect)

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextView.java nullsafe

Reviewed By: javache

Differential Revision: D72460125

fbshipit-source-id: b68c19dbb37f1f1f5a549fd979329ec9b32be9e3
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 2a330e0112 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72460130

fbshipit-source-id: fbc073e7b644326e85a05227c1e2e72e3dd5b870
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 3857aa8baf Fix nullsafe FIXMEs for ReactTextShadowNode and mark nullsafe
Summary:
https://developer.android.com/reference/android/text/BoringLayout#make(java.lang.CharSequence,%20android.text.TextPaint,%20int,%20android.text.Layout.Alignment,%20float,%20float,%20android.text.BoringLayout.Metrics,%20boolean,%20android.text.TextUtils.TruncateAt,%20int)

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextShadowNode.java nullsafe

Reviewed By: javache

Differential Revision: D72460126

fbshipit-source-id: bcf2808ac0df3f33080924a31752e83cedf24ccf
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 854cb6254d Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72460128

fbshipit-source-id: 5165055b1023a9eab86b97ef6cdfa9553c063ec0
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot e04b5b3ecf fix nullsafe FIXMEs for ReactTextAnchorViewManager.java and mark nullsafe
Summary:
https://developer.android.com/reference/android/widget/TextView#setEllipsize(android.text.TextUtils.TruncateAt) explicitly allows setting setEllipsize's argument in TextView to null to turn off ellipsizing, which is what we want for `clip`

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextAnchorViewManager.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72460123

fbshipit-source-id: 26d91d273ead5906060772f65a32fbf4389d0db3
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot c174c11336 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72460131

fbshipit-source-id: d2b82fe1abcfd828490820f31862339bce9785b6
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot dbb5a23cad fix nullsafe FIXMEs for ReactBaseTextShadowNode.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactBAseTeextShadowNode.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72460122

fbshipit-source-id: 772b19016fa1558b549d73ad2b23f891ce2f57f6
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 6409ed5ef4 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72460134

fbshipit-source-id: b5e8864ddd7454ef23c5632dc2c8e502050dfe2b
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot af516266db fix nullsafe FIXMEs for ViewManagerRegistry.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ViewManagerRegistry.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384049

fbshipit-source-id: dbca38ee6379e2e64b37c1d265c001585344661d
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 95f0ee6660 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384050

fbshipit-source-id: ac88074a45752a5512daa09fce8c385b256b3d41
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 02fc3bd58c fix nullsafe FIXMEs for TouchTargetHelper.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TouchTargetHelper.java nullsafe

Reviewed By: rshest

Differential Revision: D72384076

fbshipit-source-id: 344d93484cb465f4841256d302a6d9eec1467643
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 01fb82343f Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D72384058

fbshipit-source-id: 543da56ed4410625f17d143b127aa5cc882e0327
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 552338ce9f fix nullsafe FIXMEs for ThemedReactContext.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ThemedReactContext.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384053

fbshipit-source-id: 39ce998cfce1de358f13b4f068f180dfd1d88378
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 952435ef13 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384062

fbshipit-source-id: 70b7b4490e002016a83746336b9bb397e917a858
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot c025bf6c72 fix nullsafe FIXMEs for JSPointerDispatcher.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JSPointerDispatcher.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384071

fbshipit-source-id: 474671024632f7cdce7547855d0631c6a7005e8b
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 85d66e96f6 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSPointerDispatcher.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72384057

fbshipit-source-id: fd10242d14dd3e9cc2f6cd72dcac693b0f52c818
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 4c8ea858a5 fix nullsafe FIXMEs for PromiseImpl.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made PromiseImpl.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384070

fbshipit-source-id: 142a0e001af42ebb8cc1c8301b3ec7f586191d92
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot cad6f78f12 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384080

fbshipit-source-id: f859a21826bd1dd9d6fa0da82df5a4f0e9e79264
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 8aaccef2ee fix nullsafe FIXMEs for NativeModuleRegistry.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made NativeModuleRegistry.java nullsafe

Reviewed By: javache

Differential Revision: D72384075

fbshipit-source-id: bebc637a757c9f86d6260f9076010de9d7c80d4a
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 695df351ba Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleRegistry.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384051

fbshipit-source-id: 6cc3ab112a676fe6dfcfa1a4aa74e0dcd0e53e4a
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot d97aba5cd7 fix nullsafe FIXMEs for ModuleHolder.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ModuleHolder.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384056

fbshipit-source-id: 42bfdd9b73bdb599ab67b6fe8759c80665156d22
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 3ece14ebaa Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleHolder.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384081

fbshipit-source-id: a45f551089f9484d11d0701c98a06467da667b36
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 30da6ca84a fix nullsafe FIXMEs for JsonWriterHelper.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JsonWriterHelper.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384060

fbshipit-source-id: ce41674cc5dbadcd70029396607ac046100e2be7
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot c921732423 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JsonWriterHelper.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384061

fbshipit-source-id: 7a238fae907398ad785b169db7232068eef5617b
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot a0e3490ff5 fix nullsafe FIXMES for DynamicFromObject.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromObject.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384066

fbshipit-source-id: 6f187f8a87a2c5d239c671880404eb81f0e22d3e
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot c692a1185a Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromObject.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384067

fbshipit-source-id: b9cc92e41f29cd5af4d277ee8ec0cb3c432bdeec
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot dcb2dbb2c3 fix nullsafe FIXMEs for DynamicFromMap.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromMap.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384077

fbshipit-source-id: 70fb921fed06e9f89eb69c558692d1d7705fe2e5
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot fe2c8fc057 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromMap.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384073

fbshipit-source-id: fb9cc4d6da6ee78785e70c8b298434f61c60c1dd
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 3665046c14 fix nullsafe FIXMEs for DynamicFromArray.java and mark nullsafe
Summary:
D65596278 marked the non-primitive return types from ReadableArray as optional, so we have to follow suit

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromArray.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384069

fbshipit-source-id: c67dc5bfb540af9190f740d565e5bda63d1caaa8
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 6e5eef9158 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromArray.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384068

fbshipit-source-id: 83f4b75b19dcccf752e53fd301ccda7b42a5c611
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 77ea9fd1f8 [Nullsafe fix nullsafe FIXMEs for BaseJavaModule.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BaseJavaModule.java nullsafe

Reviewed By: alanleedev

Differential Revision: D72384078

fbshipit-source-id: aba0f261f3b3e77133ff2a148bf4903c73c54691
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot 34b1edfa1e Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseJavaModule.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D72384074

fbshipit-source-id: de616024dcca4c2d14b329aa020267c8a3d0ee56
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot c8f01ffc3e fix nullsafe FIXMEs for Arguments.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made Arguments.java nullsafe

Reviewed By: cortinico

Differential Revision: D72384054

fbshipit-source-id: 87ad373d8663d8342d2ec8b757cec2a756210f45
2025-04-09 09:07:30 -07:00
Gijs WeteringsandFacebook GitHub Bot f0a7c76516 Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/Arguments.java
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72384064

fbshipit-source-id: 12272e3b1b0a7900515071cee9d95469e4d95d6c
2025-04-09 09:07:30 -07:00
Kewin WereszczynskiandFacebook GitHub Bot 5c9883b018 refactor: ReactEditTextInputConnectionWrapper implemented in kotlin (#50573)
Summary:
Implemented ReactEditTextInputConnectionWrapper in Kotlin as part of Kotlin-ifying RN

## Changelog:
- Removed ReactEditTextInputConnectionWrapper.java
- Added ReactEditTextInputConnectionWrapper.kt

Pick one each for the category and type tags:
[ANDROID] [CHANGED] - Kotlinify ReactEditTextInputConnectionWrapper

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

Test Plan: Run RN-Tester and interacted with TextInputs with both new architecture enabled and disabled

Reviewed By: rshest

Differential Revision: D72704246

Pulled By: cortinico

fbshipit-source-id: fec358d157c6ba09fecfa98bf431b18eee7824b0
2025-04-09 07:45:47 -07:00
Mateo GuzmánandFacebook GitHub Bot 0617accecd RNTester: Fix playground icon & test details button (#50530)
Summary:
Some minor fixes in the RNTester that were bugging me a bit:

- Playground tab icon is not displaying the correct icon when the tab is active.
- The RNTTestDetails button is being displayed when there is nothing to display.
- Export the data for the Playground tab correctly to display the description.

## Changelog:

[INTERNAL] - RNTester: Fix playground icon & test details button

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

Test Plan:
<details>
<summary>Screenshots</summary>

| Before                           | After                          |
|------------------------------------|------------------------------------|
| ![Screenshot_1744044385](https://github.com/user-attachments/assets/d4a08423-531b-49a8-b3c5-314e0bd55b4c) | ![Screenshot_1744044377](https://github.com/user-attachments/assets/c36cde64-d48d-4f80-95db-2e4f9765b350) |

</details>

Reviewed By: NickGerleman

Differential Revision: D72576804

Pulled By: cortinico

fbshipit-source-id: 8555677a5121fe908c18d349e80ce8097d144fe5
2025-04-09 06:36:36 -07:00
Rubén NorteandFacebook GitHub Bot 163a3732a0 Enable prettier for markdown files in __docs__ (#50588)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50588

Changelog: [internal]

This configures Prettier to format all markdown files in `__docs__`.

Reviewed By: lenaic

Differential Revision: D72706239

fbshipit-source-id: 67b4c82528c89e497c0ff1aacbc30d76f4d29a3e
2025-04-09 05:42:48 -07:00
Rubén NorteandFacebook GitHub Bot 97d6442a7d Prettify markdown files in __docs__ (#50587)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50587

Changelog: [internal]

This does an initial formatting of all Markdown files that are going to be formatted by prettier from now on.

Reviewed By: lenaic

Differential Revision: D72706240

fbshipit-source-id: b365a94e5d74945a121966fddcb43776ebc534e0
2025-04-09 05:42:48 -07:00
Pieter De BaetsandFacebook GitHub Bot c97af95a7f Cleanup EventBeatManager
Summary:
* EventBeatManager's deprecated constructor is removed
* No need to keep a ref to jhybridobject_ (it's invalid to keep an alias_ref like this anyway)
* Use HybridClassBase to reduce the number of objects

Changelog: [Android][Removed] Removed deprecated EventBeatManager(ReactApplicationContext) constructor

Reviewed By: mdvacca

Differential Revision: D71984490

fbshipit-source-id: 01482ddd3128ef5f495682e75897e2a6549274a5
2025-04-09 05:20:20 -07:00
Nick LefeverandFacebook GitHub Bot dc898cc5d8 Add high resolution CPU time support on macOS (#50553)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50553

Adding nanosecond resolution for macOS to the NativeCPUTime native module. This allows for running Fantom benchmarks on macOS with high resolution CPUTime counters.

This change adds the internal `getCPUTimeConversionFactor` function which is needed to convert the output from `mach_absolute_time` to a double representing time in nanoseconds. The native module calls `getCPUTTimeConversionFactor` once in the constructor and stores the result for future calls. The conversion factor defaults to 1.0 for all other platforms.

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D72631963

fbshipit-source-id: 33fa1bfc576e634187091bfa668106e31cc62214
2025-04-09 04:53:23 -07:00
Mateo GuzmánandFacebook GitHub Bot 752086c08b Make PointerEventHelper internal (#50577)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.events.PointerEventHelper).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.events.PointerEventHelper internal

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

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

Reviewed By: rshest

Differential Revision: D72696372

Pulled By: cortinico

fbshipit-source-id: a1def6bf75397e0a03d5abc76279bb9a94ff110e
2025-04-09 03:41:46 -07:00
Nicola CortiandFacebook GitHub Bot 9da485b54c Migrate to Kotlin - DevSupportManagerBase.kt (#50559)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50559

This diff migrates the following file to Kotlin - DevSupportManagerBase.kt
as part of our ongoing effort of migrating the codebase to Kotlin

This file was 1000LOC+ so its migration is quite involved.
I had to look into nullability of various parameters. Most notably the `Array<StackFrame?>` -> `Array<StackFrame>`.

This also is the last file left in the devsupport package that needs to be migrated to Kotlin.

Changelog:
[Android] [Breaking] - DevSupportManagerBase is now converted to Kotlin. If you're subclassing this class, you will have to adjust some of the parameters as types have changed during the migration.

Reviewed By: javache, mdvacca

Differential Revision: D72637098

fbshipit-source-id: b87d5f17e30d69fe9c09ec9b49f96818df34ea3b
2025-04-09 03:39:19 -07:00
Nicola CortiandFacebook GitHub Bot dd0cd07405 Migrate to Kotlin - DevServerHelper (#50558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50558

This diff migrates the following file to Kotlin - DevServerHelper
as part of our ongoing effort of migrating the codebase to Kotlin

Changelog:
[Internal] [Changed] - DevServerHelper to Kotlin.

Reviewed By: javache

Differential Revision: D72632266

fbshipit-source-id: 5dab7206dcf11de042d9e274e33a38a4491f1d17
2025-04-09 03:39:19 -07:00
Mateo GuzmánandFacebook GitHub Bot be46391654 Make EventDispatcherProvider internal (#50574)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.events.EventDispatcherProvider).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.events.EventDispatcherProvider internal

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

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

Reviewed By: rshest

Differential Revision: D72696358

Pulled By: cortinico

fbshipit-source-id: ef88245f2c7d8194be55ca97ad1bf2373493bad0
2025-04-09 03:31:57 -07:00
Mateo GuzmánandFacebook GitHub Bot 154ad42811 Make LayoutMetricsConversions internal (#50575)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.fabric.mounting.LayoutMetricsConversions).

## Changelog:

[INTERNAL] - Make com.facebook.react.fabric.mounting.LayoutMetricsConversions internal

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

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

Reviewed By: javache

Differential Revision: D72696380

Pulled By: cortinico

fbshipit-source-id: 629854e17094aec3c0e0e949aa786ae09ae15b06
2025-04-09 03:27:42 -07:00
Nicola CortiandFacebook GitHub Bot 2da062f9d1 Enable INTERPROCEDURAL_OPTIMIZATION for libappmodules.so in OSS (#50580)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50580

This follow ups to us enabling INTERPROCEDURAL_OPTIMIZATION to libreactnative.so and enables
INTERPROCEDURAL_OPTIMIZATION for the app module as well.

Changelog:
[Android] [Changed] - Enable INTERPROCEDURAL_OPTIMIZATION for libappmodules.so in OSS

Reviewed By: rshest

Differential Revision: D72696658

fbshipit-source-id: ec07c7df9a639b5c3df8923ec384db90a78463e9
2025-04-09 03:22:00 -07:00
Jakub PiaseckiandFacebook GitHub Bot 423d4fd7dc Remove Animated nodes from StyleSheet types (#50452)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50452

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72308559

fbshipit-source-id: 0d8a505da6c80a9014667183a19585dd89f1db43
2025-04-09 02:16:09 -07:00
Nicola CortiandFacebook GitHub Bot 2d7b59c669 Make class internal - com.facebook.react.animated.AnimatedNode
Summary:
This diff makes the following file internal - AnimatedNode
as part of our ongoing effort of reducing the API surface.

This class has no meaningful usages in OSS so we can safely make it internaly:
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.animated.AnimatedNode

Changelog:
[Internal] [Changed] -

Reviewed By: arushikesarwani94

Differential Revision: D72647209

fbshipit-source-id: 175406ed007abecaae0fa46aa8bdc8cfc938c3b3
2025-04-09 00:56:52 -07:00
Nicola CortiandFacebook GitHub Bot 12dbfaf958 Make class internal - Anything systrace related (#50569)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50569

This diff makes all the *Systrace files internal.
as part of our ongoing effort of reducing the API surface.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D72646992

fbshipit-source-id: d085da9cf841fc2e8a026b8d09d8a17550505c7a
2025-04-09 00:56:52 -07:00
Nicola CortiandFacebook GitHub Bot f42dae1267 Make class internal - Package com.facebook.react.views.text.internal.span (#50563)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50563

This diff makes all the classes inside `com.facebook.react.views.text.internal.span` internal.

Those classes are already inside an `.internal` package. By making them `internal` with the Kotlin keyword
we're making harder for them to be accidentally referenced outside React Native.

as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] - com.facebook.react.views.text.internal.span is now internal

Reviewed By: mdvacca

Differential Revision: D72644962

fbshipit-source-id: dbb5a45e6121cb49509469d1d40c3b278cc62368
2025-04-09 00:56:52 -07:00
Peter AbbondanzoandFacebook GitHub Bot 27a68616c6 Throw original exception from FabricUIManager
Summary: Changelog: [Internal] Throw original exception in FabricUIManager

Reviewed By: alanleedev

Differential Revision: D72588073

fbshipit-source-id: 5b708b93030b15f7d8d2a9ccc70e25ebdcd42b82
2025-04-08 19:10:59 -07:00
David VaccaandFacebook GitHub Bot 672e04371b Mark NativeModuleRegistry as LegacyArchitecture
Summary:
Mark NativeModuleRegistry as LegacyArchitecture

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D72673777

fbshipit-source-id: 46c375304a4ff4e3657cd9fcd9c8051f63295be7
2025-04-08 19:00:09 -07:00
Zeya PengandFacebook GitHub Bot de9b4f3642 Convert NativeAnimatedModule to kotlin (#50576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50576

## Changelog:

[Android] [Changed] - Convert NativeAnimatedModule to kotlin

Reviewed By: javache

Differential Revision: D72648251

fbshipit-source-id: 0bdaca024707564b2ebda607b6fe619ff5a6048f
2025-04-08 17:52:07 -07:00
Nicola CortiandFacebook GitHub Bot 1408c69fd8 Correctly deprecate ReactContextBaseJavaModule.getCurrentActivity() method
Summary:
Users should not be using `getCurrentActivity()` method on `ReactContextBaseJavaModule`.
Instead they should use `getReactApplicationContext.getCurrentActivity()`

This correctly deprecates this method for 0.80.x

Changelog:
[Android] [Deprecated] - Correctly deprecate ReactContextBaseJavaModule.getCurrentActivity() method

Reviewed By: mdvacca

Differential Revision: D72449062

fbshipit-source-id: f74bf94980447497e7e9049ede2b44c1d1f0d48b
2025-04-08 17:34:59 -07:00
Nicola CortiandFacebook GitHub Bot f107c28d2f Enable INTERPROCEDURAL_OPTIMIZATION for React Native (#50529)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50529

This enables INTERPROCEDURAL_OPTIMIZATION for the CMake build of React Native.

Changelog:
[Android] [Changed] - Enable INTERPROCEDURAL_OPTIMIZATION for React Native

Reviewed By: NickGerleman

Differential Revision: D72574119

fbshipit-source-id: e414a61fee13e61f15044d93f5ad28f26aba4ed5
2025-04-08 16:41:36 -07:00
Nicola CortiandFacebook GitHub Bot f866a8d800 Migrate to Kotlin - BundleDownloader (#50557)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50557

This diff migrates the following file to Kotlin - BundleDownloader
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BundleDownloader to Kotlin

Reviewed By: javache

Differential Revision: D72627995

fbshipit-source-id: 9d65473c4d4a0962f78b0f71fc24530415a0e908
2025-04-08 16:37:46 -07:00
Nicola CortiandFacebook GitHub Bot 655a86c348 Migrate to Kotlin - StackTraceHelper (#50560)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50560

This diff migrates the following file to Kotlin - StackTraceHelper
as part of our ongoing effort of migrating the codebase to Kotlin

I've moved the method `convertProcessedError` to `internal` because it was already using a parameter of type `ProcessedError` which is itself internal.

Changelog:
[Internal] [Changed] - StackTraceHelper to Kotlin

Reviewed By: rshest

Differential Revision: D72569103

fbshipit-source-id: 8c544b83deda82c7a3d1a04d8cd0c9e12c9b6d46
2025-04-08 16:37:46 -07:00
Zeya PengandFacebook GitHub Bot 744a0f8385 Move rncxx scheduler to oss (#50535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50535

## Changelog:

[General] [Added] - Move rncxx scheduler to oss

Reviewed By: rshest

Differential Revision: D72588228

fbshipit-source-id: 428c60e20351b9fed49fcbdbd617b5b5940b8a2c
2025-04-08 16:10:52 -07:00
David VaccaandFacebook GitHub Bot 79389191da Remove usage of getShadowNodeClass() on new architecture
Summary:
This diff removes the usage of getShadowNodeClass() on apps that are purely running on the new architecture.

The implications of this change are:
- all shadow node classes will be stripped-out by proguard
- props exposed in shadow Nodes won't be included in the native view configs, this is fine becuase all core components are already using static view configs, props included in LayoutShadow node are covered by: BaseViewConfig.android.js

changelog: [internal] internal

Reviewed By: javache, cortinico, rshest

Differential Revision: D72602551

fbshipit-source-id: caada701f80253830df0085fdbbac47a2aa6d71b
2025-04-08 15:40:47 -07:00
David VaccaandFacebook GitHub Bot b0953360ad Introduce ReactNativeFeatureFlags.disableShadowNodeOnNewArchitectureAndroid()
Summary:
In this diff I'm introducing the ReactNativeFeatureFlags.disableShadowNodeOnNewArchitectureAndroid() feature flag, this will be used to control the usage of shadow nodes in apps that are purely running on the new architecture.

The default value for this feature flag is true because we are assuming this is the right value long term (this is just a toggle)

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D72602553

fbshipit-source-id: 3eb1a151e74c1728374a1d37b4151a0928801de5
2025-04-08 15:40:47 -07:00
Nicola CortiandFacebook GitHub Bot ee7e6e2b22 Make class internal - package com.facebook.react.internal (#50566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50566

This diff makes the following file internal - package com.facebook.react.internal
as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] - com.facebook.react.internal pakcage is now internal

Reviewed By: mdvacca

Differential Revision: D72645991

fbshipit-source-id: 406c922b06ad883e00c63116e8efccd29e088ced
2025-04-08 15:37:51 -07:00
Zeya PengandFacebook GitHub Bot 196031352e remove synchronouslyUpdateViewOnUIThread (ILcom/facebook/react/bridge/ReadableNativeMap;) (#50578)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50578

## Changelog:

[Android] [Internal] - remove synchronouslyUpdateViewOnUIThread (ILcom/facebook/react/bridge/ReadableNativeMap;)

Differential Revision: D72672210

fbshipit-source-id: 7ac4360febf9aa30bcc7a2c61c3da4efd37d1c10
2025-04-08 14:55:53 -07:00
Nicola CortiandFacebook GitHub Bot 41f6f6c448 Remove unused ReactInvalidPropertyException (#50567)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50567

This exception is unused, let's remove it.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D72646262

fbshipit-source-id: 728a81633d8c8f7c183b16cfd3a8c4ba68690c42
2025-04-08 14:01:20 -07:00
Nicola CortiandFacebook GitHub Bot 216b297ab8 Make class internal - BridgelessCatalystInstance (#50564)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50564

This diff makes the following file internal - BridgelessCatalystInstance
as part of our ongoing effort of reducing the API surface.

I've verified that there are no meaningful OSS usage of this class:
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.runtime.BridgelessCatalystInstance

Changelog:
[Internal] [Changed] - BridgelessCatalystInstance to internal

Reviewed By: mdvacca

Differential Revision: D72644963

fbshipit-source-id: 7eead85753ce65d6933fcfdf55f7dbb50a34af0b
2025-04-08 14:00:55 -07:00
Nicola CortiandFacebook GitHub Bot 788213f91a Make class internal - ReactRawText* (#50570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50570

This diff makes the following file internal - ReactRawTextShadowNode and ReactRawTextManager
as part of our ongoing effort of reducing the API surface.

The only meaningful user of this API is this library:
https://github.com/iyegoroff/react-native-text-gradient

Which is umaintained (last supported version is RN 0.59) so I'm not considering this breaking.

Changelog:
[Android] [Changed] - Make ReactRawTextManager internal. We verified no popular libraries are impacted by this change

Reviewed By: mdvacca

Differential Revision: D72647702

fbshipit-source-id: 59a3646fdbc8f11907b4cf5056ff88c6dcec1cf8
2025-04-08 14:00:07 -07:00
Chang HuaandFacebook GitHub Bot aa05943610 Revert D71979601: fix nullsafe FIXMEs for FabicUIManager.java and mark nullsafe
Differential Revision:
D71979601

Original commit changeset: 599d87f0783a

Original Phabricator Diff: D71979601

fbshipit-source-id: e1f88e18bb3cf0d99de00b750c399eb0a4221e13
2025-04-08 13:47:49 -07:00
Pieter De BaetsandFacebook GitHub Bot ea2fbd453f fix nullsafe FIXMEs for FabicUIManager.java and mark nullsafe (#50365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50365

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FabricUIManager.java nullsafe

Reviewed By: GijsWeterings

Differential Revision: D71979601

fbshipit-source-id: 599d87f0783a566c837aa70975a62f5f908a2294
2025-04-08 12:56:38 -07:00
Pieter De BaetsandFacebook GitHub Bot dc5b8405ac Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java (#50371)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50371

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979591

fbshipit-source-id: 77369affbe4fd7411f149a4a2de869b48a1faa1a
2025-04-08 12:56:38 -07:00
riteshshukla04andFacebook GitHub Bot 1033584c20 Migrate UiThreadUtil to Kotlin (#50536)
Summary:
This PR aims to migrate UiThreadUtil  from Java to kotlin as part of https://github.com/facebook/react-native/issues/50513

## 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][CHANGED]Migrate UiThreadUtil to Kotlin

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

Test Plan: Tested on RN tester with both new and old arch

Reviewed By: cortinico

Differential Revision: D72602041

Pulled By: arushikesarwani94

fbshipit-source-id: 9f45a139805819a21039eb640a0bd1583a3acde9
2025-04-08 12:11:32 -07:00
Zeya PengandFacebook GitHub Bot 7b01943337 Enable direct manipulation for c++ NativeAnimated for Android (#50568)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50568

## Changelog:

[Android] [Internal] - Enable direct manipulation for c++ NativeAnimated for Android

Reviewed By: javache

Differential Revision: D71668422

fbshipit-source-id: 4be4472378b43ec09eeb3f73d449991885b3f2a2
2025-04-08 11:44:15 -07:00
Nicola CortiandFacebook GitHub Bot 9ad964b054 Remove unused @KeepGettersAndSetters annotation (#50565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50565

This annotation is unused. It was referenced in the past with Buck1 OSS but now we can safely remove it.

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D72645219

fbshipit-source-id: 0327fa562276193ad9f48dc81ea7a9fa0da19eee
2025-04-08 10:17:51 -07:00
Dawid MałeckiandFacebook GitHub Bot 6fc52b61bb Add ScrollViewBaseProps and small type changes to align Flow with TS (#50374)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50374

This diff breaks down ScrollView props into ScrollViewBaseProps to generate more readable TS types, re-exports AnimatedComponent and sets the default SectionList Item type to `any`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D72061941

fbshipit-source-id: 439fcdb1540288d6e610cd535b1fed82243c3b7c
2025-04-08 10:05:27 -07:00
Andrew DatsenkoandFacebook GitHub Bot 522e8e74d5 move rncxx nativemodule (#50561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50561

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D72573989

fbshipit-source-id: 92c99fefa68d8fdf0ca88d1e3a27a76eb5feca21
2025-04-08 09:55:01 -07:00
Ruslan LesiutinandFacebook GitHub Bot af5074509e Refactor RuntimeSamplingProfileTraceEventSerializer: use smart pointers, split code, add tests (#50531)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50531

# Changelog: [Internal]

This should not have any functional changes, mostly refactoring the previous code, splitting it into smaller methods, better documentation and added tests.

Main changes are:
1. We are going to use smart pointers for `ProfileTreeNode`
2. Split single static method into multiple smaller methods of one class, less cognitive load and smaller context window

Reviewed By: robhogan

Differential Revision: D72401690

fbshipit-source-id: a1eed5501349dcd811661d91f3bf126a0daaacf2
2025-04-08 09:40:50 -07:00
Peter AbbondanzoandFacebook GitHub Bot 6609ba98e5 Resolve sendIntent call, reject on exception thrown (#50538)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50538

Promises created from `Linking.sendIntent` calls never resolve, leaving them dangling. This change fixes the issue in two spots:
1. By calling promise.resolve directly after the startActivity call
1. By wrapping startActivity in a try/catch so any exceptions thrown are forwarded to the promise as a rejection

Changelog: [Android][Fixed] - Ensure Linking.sendIntent promises resolve or reject

Reviewed By: NickGerleman

Differential Revision: D72606918

fbshipit-source-id: cd437bf65bb631bc04f99b4d2e3d637f7e98b25e
2025-04-08 08:54:33 -07:00
Nicola CortiandFacebook GitHub Bot a6f1c71dc5 Remove unused JSDebuggerWebSocketClient (#50556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50556

This class is effectively unused, I'm removing it.
It was package private also so no one in OSS could easily use it.

Changelog:
[Internal] [Changed] - Remove unused JSDebuggerWebSocketClient

Reviewed By: GijsWeterings

Differential Revision: D72567055

fbshipit-source-id: aa2fa62c05488d1560c0acfa0b21e2d934c34be2
2025-04-08 08:07:42 -07:00
Jakub PiaseckiandFacebook GitHub Bot c2fbf040f8 Add feature flag enableFontScaleChangesUpdatingLayout (#50515)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50515

Changelog: [Internal]

Adds `enableFontScaleChangesUpdatingLayout` feature flag

Reviewed By: NickGerleman

Differential Revision: D72558888

fbshipit-source-id: a55b3f99f39cf5626ef3d9d49475a32f6c9fa7fa
2025-04-08 07:58:20 -07:00
Gijs WeteringsandFacebook GitHub Bot 25b1883164 Fix xplat/endtoend/jest-e2e/apps/facebook_xplat/ReactNativeCoreE2E/__tests__/Border-transform-e2e.js E2E tests
Summary:
Looks like Jest E2E had significant issues with this test on both android and ios RNTester. I think it's because the view with the testID did not have any contents, which means the accessibility tools have trouble getting the proper context from it. By changing it to a nested view (with some padding to better inspect the borders, since that's what's important in this test) I think we have a better, more stable test case this way

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D72571911

fbshipit-source-id: a85266cf4a1696fdaedcc97ed2a7a05f086d35bd
2025-04-08 07:51:09 -07:00
Fabrizio CucciandFacebook GitHub Bot 453c5e8f48 Fix verifyPublishedTemplate after failure for 0.79.0 (#50554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50554

This should fix the issue found during the 0.79.0 release.

https://github.com/facebook/react-native/actions/runs/14329766551/job/40166165007

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D72637751

fbshipit-source-id: 1b3ccbab162f484c96e5ff768766848f82acd818
2025-04-08 06:35:02 -07:00
Fabrizio CucciandFacebook GitHub Bot bd2a449abc Add changelog entry for 0.79.0 (#50552)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50552

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72631598

fbshipit-source-id: 356984440193fee20a68eb67ae856af4e7c4cb3f
2025-04-08 06:01:08 -07:00
Rubén NorteandFacebook GitHub Bot 710da788cd Create basic documentation for Event Loop (#50550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50550

Changelog: [internal]

This creates the basic documentation for the Event Loop, adapting some of the content of the original RFC: https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0744-well-defined-event-loop.md

bypass-github-export-checks

Reviewed By: lenaic

Differential Revision: D72632590

fbshipit-source-id: fbe30334a567dc642a4b817abb0c535b633277e7
2025-04-08 05:51:33 -07:00
Pieter De BaetsandFacebook GitHub Bot ee85957fd6 Fix SurfaceHandler.setProps is nullable (#50549)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50549

As part of D72558674, I made SurfaceHandlerBinding.setProps nullable, to align with D71979601 - but I didn't realize this wasn't properly handled on the JNI side.

Changelog: [Android][FIxed] Fix crash when passing null initialProps

Reviewed By: lenaic

Differential Revision: D72632625

fbshipit-source-id: 82db1791ceb7c96248b6eea2eb1e6395edc308a0
2025-04-08 04:27:48 -07:00
Rubén NorteandFacebook GitHub Bot 03e0dfa074 Create basic documentation for IntersectionObserver (#50528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50528

Changelog: [internal]

This adds basic documentation for the IntersectionObserver Web API implementation in React Native.

Reviewed By: lenaic

Differential Revision: D72573107

fbshipit-source-id: 14ed318ae3691550bbe14a6da1184013ce0c60a9
2025-04-08 03:42:09 -07:00
Rubén NorteandFacebook GitHub Bot dfd45cab80 Define initial docs structure (#50527)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50527

Changelog: [internal]

This just defines an outline for the expected docs to be added to RN.

Reviewed By: GijsWeterings

Differential Revision: D72573497

fbshipit-source-id: a8e1c2cc0c6b966656d1089cd33b547174ace873
2025-04-08 03:42:09 -07:00
Rubén NorteandFacebook GitHub Bot 20a74e6351 Rename DOCS.md as GUIDELINES.md (#50525)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50525

Changelog: [internal]

Just a rename of the file and moving relevant documentation to the README.

Reviewed By: GijsWeterings

Differential Revision: D72562795

fbshipit-source-id: d675037376a0345dd7d178cf5863f4093eb74542
2025-04-08 03:42:09 -07:00
Nicola CortiandFacebook GitHub Bot 5491be6fe6 Migrate to Kotlin - CxxInspectorPackagerConnection
Summary:
This diff migrates the following file to Kotlin - CxxInspectorPackagerConnection
as part of our ongoing effort of migrating the codebase to Kotlin

Changelog:
[Internal] [Changed] - CxxInspectorPackagerConnection to Kotlin

Reviewed By: rshest

Differential Revision: D72566596

fbshipit-source-id: 046e7549841f64d73fed56d8bc8d70f2d3ea63e8
2025-04-08 02:59:28 -07:00
Nicola CortiandFacebook GitHub Bot d12bcaac3b Migrate to Kotlin - MultipartStreamReader (#50519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50519

This diff migrates the following file to Kotlin - MultipartStreamReader
as part of our ongoing effort of migrating the codebase to Kotlin

Changelog:
[Internal] [Changed] - MultipartStreamReader to Kotlin

Reviewed By: rshest

Differential Revision: D72561124

fbshipit-source-id: d616bfc547ea6a773ebc1c45f97111ae7c7ec85a
2025-04-08 02:59:28 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 890b8f7ea3 Automate the rotation of issue trage squad (#50526)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50526

This change wants to automate the rotation of the issue triaging squad on Discord.
This is taking us a few minutes every week to rotate the oncall.

This change can save us some time.

The configuration file format is supposed to be like this:
```
{
  "userMap": {
     "discord-username1": "discord-id1",
     "discord-username2": "discord-id2",
     "discord-username3": "discord-id3",
     "discord-username4": "discord-id4"
   },
  "schedule": {
    "date1": ["discord-username1", "discord-username2"],
    "date2": ["discord-username3", "discord-username4"],
  }
}
```

## Changelog
[Internal] - Automate the issue triage oncall rotation

Reviewed By: cortinico

Differential Revision: D72569435

fbshipit-source-id: 435c13350cf503e99302775674e78a20e328e68d
2025-04-08 02:43:44 -07:00
Nicola CortiandFacebook GitHub Bot c3c7f9300f Migrate to Kotlin - BridgeDevSupportManager (#50518)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50518

This diff migrates the following file to Kotlin - BridgeDevSupportManager
as part of our ongoing effort of migrating the codebase to Kotlin

Changelog:
[Internal] [Changed] - BridgeDevSupportManager to Kotlin

Reviewed By: arushikesarwani94

Differential Revision: D72558373

fbshipit-source-id: 07a16dc479e967677b1aab8a6d4a4366994fd490
2025-04-08 01:25:16 -07:00
Nicola CortiandFacebook GitHub Bot 7aebb3a1be Migrate to Kotlin - BridgelessDevSupportManager (#50522)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50522

This diff migrates the following file to Kotlin - BridgelessDevSupportManager
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BridgelessDevSupportManager to Kotlin

Reviewed By: arushikesarwani94

Differential Revision: D72558016

fbshipit-source-id: 9c84f89dfca03991b1feb6f8c9ffe846350aafed
2025-04-08 01:25:16 -07:00
Nicola CortiandFacebook GitHub Bot 878b61a3ca Migrate to Kotlin - DebugOverlayController (#50520)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50520

This diff migrates the following file to Kotlin - DebugOverlayController
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - DebugOverlayController.java to Kotlin

Reviewed By: arushikesarwani94

Differential Revision: D72557349

fbshipit-source-id: dd4a1c7204206189c176b36f81c6d54f5f780b10
2025-04-08 01:25:16 -07:00
Nicola CortiandFacebook GitHub Bot f87ae249c9 Migrate to Kotlin - DebugCorePackage (#50521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50521

This diff migrates the following file to Kotlin - DebugCorePackage
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - Migrate to Kotlin - DebugCorePackage

Reviewed By: javache

Differential Revision: D72556867

fbshipit-source-id: dc37538da7089f532dc3a617a8e7dbccc6e187e3
2025-04-08 01:25:16 -07:00
Peter AbbondanzoandFacebook GitHub Bot 833ab6fe1b Fix onPointerLeave computation by comparing button presses (#50402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50402

While investigating pointer events, I noticed that all Android views fire `onPointerLeave`/`onPointerEnter` in rapid succession on every button press. This is because Android fires `ACTION_HOVER_EXIT` on every frame before firing `ACTION_DOWN` (in the same frame). The logic in JSPointerDispatcher needed to be updated to account for this.

Unfortunately, `ACTION_HOVER_EXIT` events have no means of distinguishing between whether they were driven by the mouse actually leaving the view's bounds or by a button press. Some OS implementations fire this event on the frame just before leaving the view's boundaries while others fire after, so pure X/Y position isn't helpful enough. The button state property on `ACTION_HOVER_EXIT` also never gets set in some OS.

To work around this issue, this change posts a callback to the very next frame after receiving `ACTION_HOVER_EXIT`. If no `ACTION_DOWN` event was received in the same frame, it calls all the way through the existing logic. But, if an `ACTION_DOWN` event *is* received, we compare the event timestamps and if they match we don't post `onPointerLeave`.

Changelog: [Android][Fixed] - Prevent onPointerLeave from dispatching during button presses

Reviewed By: vincentriemer

Differential Revision: D72078450

fbshipit-source-id: dcc7cfa4086963ed8599147d60d8406c54cd5d69
2025-04-07 17:54:03 -07:00
Pieter De BaetsandFacebook GitHub Bot 22eb457c94 Remove unneeded SurfaceHandler interface
Summary:
Since we've made SurfaceHandler internal, there's no need to maintain a separate interface between it and the actual Binding implementation class.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D72558674

fbshipit-source-id: d7ac15b0e608c3aa7d05e46f1078cef1e154f846
2025-04-07 16:04:04 -07:00
Mateo GuzmánandFacebook GitHub Bot 03026b0b60 Make SurfaceHandler internal (#50502)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.interfaces.fabric.SurfaceHandler).

## Changelog:

[INTERNAL] - Make com.facebook.react.interfaces.fabric.SurfaceHandler internal

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

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

Reviewed By: arushikesarwani94

Differential Revision: D72549674

Pulled By: javache

fbshipit-source-id: 6a8cf34e902e4b4faf88929e7c3406993fc940f6
2025-04-07 16:04:04 -07:00
Joe VilchesandFacebook GitHub Bot 9cd8efa897 Expose accessibility order (#50481)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50481

It's here! kinda...this only works internally right now, so no OSS usage which is explicitly gated to be off. We can't really avoid exposing the types so here we are.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D72428425

fbshipit-source-id: 9642e5db46f9bd34ff505b0e37987da52857b6e9
2025-04-07 14:46:29 -07:00
Joe VilchesandFacebook GitHub Bot f75f2617ac Gate accessibilityOrder on iOS and Android (#50303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50303

This feature is being tested internally right now. We cannot really avoid exposing the type but we are going to make this no-op for now in OSS until we are confident we can roll it out fully

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D71919847

fbshipit-source-id: b1730b8af5180c4513ce1f0d58b3a6526fffed84
2025-04-07 14:46:29 -07:00
Joe VilchesandFacebook GitHub Bot 83fae860df Allow links that encorporate entire <Text> to be keyboard accessible
Summary:
I was helping a team with some keyboard link accessibility and they had this strange bug where a link was not keyboard accessible despite having `accessible={true}`. Something that fixed it for them was adding an `accessibilityLabel`, which makes no sense.

Turns out there is a bug when the link encompasses the entirety of the `Text` component. We have a special case for handling links of this manner, and right now we are not setting the `frame` property which is responsible for outlining the element when it takes focus.

This property is not one defined by UIKit, rather it is defined in RCTAccessibilityElement. We use it to derive the accessibilityFrame which has to be in screen coordinates. If you do not set the frame property then it is supposed to use the bounds of the container. This does not work properly, seemingly bc the name "frame" gets mangled internally in UIKit leading to UB. I changed the name the "something" and it works.

To remedy this lets just change the name

Changelog: [iOS] [Fixed]

Reviewed By: javache

Differential Revision: D72338838

fbshipit-source-id: da91d0c28baeb6765d4d604f3e47c91952167f9d
2025-04-07 14:24:15 -07:00
Zeya PengandFacebook GitHub Bot b0f2083d9d UIManager::add/RemoveEventListener (#50453)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50453

## Changelog:

[General] [Added] - add UIManager::add/RemoveEventListener

Reviewed By: rshest

Differential Revision: D72200640

fbshipit-source-id: 707540bdcb1178c2fab8260ce73b634c4f974b56
2025-04-07 13:48:32 -07:00
Nicola CortiandFacebook GitHub Bot 0bd0635be6 Migrate to Kotlin - DevSupportManagerFactory (#50516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50516

This diff migrates the following file to Kotlin - DevSupportManagerFactory
as part of our ongoing effort of migrating the codebase to Kotlin

Changelog:
[Android] [Changed] - Migrate to Kotlin - DevSupportManagerFactory - We couldn't find any implementation of this class in OSS. Some Kotlin implementers might have to change the method signatures. However this interface is not supposed to be extended in OSS.

Reviewed By: javache

Differential Revision: D72556310

fbshipit-source-id: 35d1ed3c332296d3be5244fdab92a890d7ea3c40
2025-04-07 11:26:54 -07:00
Nicola CortiandFacebook GitHub Bot 09492075e8 Migrate to Kotlin - ReactInstanceDevHelper (#50517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50517

This diff migrates the following file to Kotlin - ReactInstanceDevHelper
as part of our ongoing effort of migrating the codebase to Kotlin

Changelog:
[Android] [Changed] - Migrate to Kotlin - ReactInstanceDevHelper. Some users implementing this class in Kotlin could have breakages. As this is a devtools/frameworks API we're not marking this as breaking.

Reviewed By: javache

Differential Revision: D72555226

fbshipit-source-id: e7e5523c56de8697def0a509c03e9fe89c6d5839
2025-04-07 11:26:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 0f534293af Avoid build failure on Catalyst (x86_64) (#50514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50514

When building React Native for mac catalyst on intel architecture, we are observing a build failure in RCTInstance.
See issue: https://github.com/facebook/react-native/issues/50388

Apparently, the compiler don't understand that `errorData[@"isFatal"]` is a BOOL, so we are helping it by extracting the `boolValue`.

## Changelog:
[iOS][Fixed] -  Avoid build failure on Catalyst (x86_64)

Reviewed By: cortinico

Differential Revision: D72558024

fbshipit-source-id: 152d89b02ae250a8ae54fe2df658c018d5f63f45
2025-04-07 11:23:11 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 26a6ae0e89 Collect nightlies results (#50488)
Summary:
This change adds a job to collect nightlies results so we can then post on discord or internally

## Changelog:
[Internal] - Add a job to collect nightlies results

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

Test Plan: GHA - tested as a job on PRs: https://github.com/facebook/react-native/actions/runs/14283415968/job/40035831913

Reviewed By: cortinico

Differential Revision: D72555358

Pulled By: cipolleschi

fbshipit-source-id: 35ec7e571992f5f27179256570b5d143e0d76586
2025-04-07 09:55:14 -07:00
Fabrizio CucciandFacebook GitHub Bot 1853957773 Kotlinify ViewGroupDrawingOrderHelper
Summary:
As per title.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72566036

fbshipit-source-id: ac3156b247df3818073e31aa44d5c96f62f7b881
2025-04-07 09:03:23 -07:00
Rubén NorteandFacebook GitHub Bot 91acacc218 Ship fixMountingCoordinatorReportedPendingTransactionsOnAndroid feature flag by default
Summary:
Changelog: [internal]

This is stable after the last couple of fixes, so we can enable it by default. Enabling this just improves the accuracy of `IntersectionObserver` and the Event Timing API, and we still haven't shipped those to stable.

Reviewed By: GijsWeterings

Differential Revision: D72561256

fbshipit-source-id: 4b505f1df9c7c495d316e6fbf1498af94aaca959
2025-04-07 08:38:12 -07:00
Gijs WeteringsandFacebook GitHub Bot 9b30cdd008 fix nullsafe FIXMEs for NetworkingModule.java and mark nullsafe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made NetworkingModule.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979590

fbshipit-source-id: 0ddf764f4707d2ee76ab99bc1a09a4e2a7e6b794
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot 70b4265ea0 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java (#50347)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50347

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979581

fbshipit-source-id: 4ed264ff43794b6aafc2a0ee419a660a6b5b0440
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot c80ac8fcf2 Fix nullsafe FIXMEs for BlobModule.java and mark nullsafe (#50366)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50366

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BlobModule.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979598

fbshipit-source-id: bbef5548d05e0b77ea03cf72f41a384fe7294d59
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot 842591e480 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.java (#50364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50364

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979588

fbshipit-source-id: f5ec8bced87ea0c6c1c193be51ebc78396388d0e
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot 419b68f38a Fix nullsafe FIXMEs for TurboModuleManager and mark nullsafe (#50370)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50370

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TurboModuleManager.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979605

fbshipit-source-id: b8da8f1ad12f5f6d63e7bd876d7c4912d69a4c4d
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot 4664db138f Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManager.java (#50358)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50358

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979595

fbshipit-source-id: 19bfcea537b7b62536eafa8e1d0b3f8b50666e22
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot 90184d20e1 Fix nullsafe FIXMEs for TurboModuleInteropUtils and mark nullsafe (#50357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50357

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TurboModuleInteropUtils.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979599

fbshipit-source-id: ffd7006f28db4daf8cd47ce1cd8ff6e3192c0ad1
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot c5132f485f Throw errors in TuboModuleInteropUtils for improperly constructed turbomodules
Summary:
Per discussion in D71979599

Changelog: [General][Fixed] Throw ParsingException when  ReactModule doesn't conform to TurboModule invariants

Reviewed By: cortinico

Differential Revision: D72383857

fbshipit-source-id: 2d0282b136312d414234246584d2ae60858955b6
2025-04-07 06:33:09 -07:00
Gijs WeteringsandFacebook GitHub Bot 207fc3f5d3 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleInteropUtils.java (#50367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50367

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979600

fbshipit-source-id: be36f4c409a0423b3d3ccdf2c28d96c7a3f50201
2025-04-07 06:33:09 -07:00
Intl SchedulerandFacebook GitHub Bot e6fc1ecb6f translation auto-update for batch 0/58 on master
Summary:
Chronos Job Instance ID: 1125907957107836
Sandcastle Job Instance ID: 22517999905036196

Processed xml files:
android_res/com/facebook/common/util/res/values/strings.xml
android_res/rendercore/res/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml
android_res/com/facebook/content/res/values/strings.xml
android_res/com/facebook/common/i18n/res/values/strings.xml
android_res/com/facebook/common/timeformat/res/values/strings.xml
android_res/com/facebookpay/widget/res/values/strings.xml
android_res/com/facebookpay/ecpexception/res/values/strings.xml
android_res/com/facebookpay/expresscheckout/res/values/strings.xml
android_res/com/fbpay/auth/res/values/strings.xml
android_res/com/facebook/common/strings/external/res/values/strings.xml
android_res/com/facebook/common/strings/res/values/strings.xml
android_res/com/facebook/fbui/widget/pagerindicator/res/values/strings.xml
android_res/com/facebook/fbui/widget/contentview/res/values/strings.xml
android_res/com/facebook/resources/res/values/strings.xml
android_res/com/facebook/widget/res/values/strings.xml
android_res/com/facebook/config/appspecific/res/values/strings.xml
android_res/com/facebook/ui/mainview/res/values/strings.xml
android_res/com/facebook/audience/stories/storysurface/activity/main/res/values/strings.xml
android_res/com/facebook/ui/emoji/res/values/strings.xml
android_res/com/facebook/ui/emoji/common/res/values/strings.xml
android_res/com/facebook/nativetemplates/res/values/strings.xml
android_res/com/facebook/iorg/common/upsell/res/values/strings.xml
android_res/com/facebook/iorg/common/res/values/strings.xml
android_res/com/facebook/dialtone/res/values/strings.xml
android_res/com/facebook/zero/messenger/semi/res/values/strings.xml
android_res/com/facebook/zero/res/values/strings.xml
android_res/com/facebook/zero/common/res/values/strings.xml
android_res/com/facebook/widget/facepile/res/values/strings.xml
android_res/com/facebook/tabbar/res/values/strings.xml
android_res/com/facebook/ui/toolbar/res/values/strings.xml
android_res/com/facebook/dialtone/messenger/res/values/strings.xml
android_res/com/facebook/feedback/reactions/res/values/strings.xml
android_res/com/facebook/ufiservices/res/values/strings.xml
android_res/com/facebook/ui/edithistory/res/values/strings.xml
android_res/com/facebook/pages/common/userinviter/res/values/strings.xml
android_res/com/facebook/pages/common/bannedusers/res/values/strings.xml
android_res/com/facebook/friending/common/res/values/strings.xml
android_res/com/facebook/messaging/ui/stickerstore/res/values/strings.xml
android_res/com/facebook/stickers/res/values/strings.xml
android_res/com/facebook/messaging/shared/res/values/strings.xml
android_res/com/facebook/caspian/res/values/strings.xml
android_res/com/facebook/timeline/widget/actionbar/res/values/strings.xml
android_res/com/facebook/showpages/res/values/strings.xml
android_res/com/facebook/nux/res/values/strings.xml
android_res/com/facebook/facecast/common/badge/res/values/strings.xml
android_res/com/facebook/feedbase/res/values/strings.xml
android_res/com/facebook/feedback/ui/res/values/strings.xml
android_res/com/facebook/video/player/res/values/strings.xml
android_res/com/facebook/spherical/res/values/strings.xml
android_res/com/facebook/saved/common/res/values/strings.xml
android_res/com/facebook/video/comments/res/values/strings.xml
android_res/com/facebook/messaging/media/picker/res/values/strings.xml
android_res/com/facebook/messaging/media/res/values/strings.xml
android_res/com/facebook/messaging/res/values/strings.xml
android_res/com/facebook/ui/media/contentsearch/res/values/strings.xml
android_res/com/facebook/transliteration/res/values/strings.xml
android_res/com/facebook/bookmark/res/values/strings.xml
android_res/com/facebook/orca/res/values/strings.xml
android_res/com/facebook/workshared/userstatus/donotdisturb/res/values/strings.xml
android_res/com/facebook/widget/tokenizedtypeahead/res/values/strings.xml
android_res/com/facebook/widget/refreshableview/res/values/strings.xml
android_res/com/facebook/rtc/common/res/values/strings.xml
android_res/com/facebook/payments/ui/res/values/strings.xml
android_res/com/facebook/fig/mediagrid/res/values/strings.xml
android_res/com/facebook/pages/app/clicktomessengerads/messagesuggestion/ui/res/values/strings.xml
android_res/com/facebook/messagingneue/res/values/strings.xml
android_res/com/facebook/messaging/widget/toolbar/res/values/strings.xml
android_res/com/facebook/messaging/users/username/res/values/strings.xml
android_res/com/facebook/messaging/tincan/messenger/res/values/strings.xml
android_res/com/facebook/messaging/threadview/quickpromotion/res/values/strings.xml
android_res/com/facebook/messaging/threadview/message/res/values/strings.xml
android_res/com/facebook/messaging/threadview/games/res/values/strings.xml
android_res/com/facebook/messaging/xma/res/values/strings.xml
android_res/com/facebook/messaging/threadview/admin/res/values/strings.xml
android_res/com/facebook/messaging/reactions/res/values/strings.xml
android_res/com/facebook/messaging/threadview/attachment/video/res/values/strings.xml
android_res/com/facebook/messaging/settings/res/values/strings.xml
android_res/com/facebook/messaging/searchnullstate/res/values/strings.xml
android_res/com/facebook/messenger/login/res/values/strings.xml
android_res/com/facebook/messaging/promotion/res/values/strings.xml
android_res/com/facebook/messaging/presence/res/values/strings.xml
android_res/com/facebook/messaging/polling/adminmessage/res/values/strings.xml
android_res/com/facebook/messaging/photos/view/res/values/strings.xml
android_res/com/facebook/messaging/omnipicker/res/values/strings.xml
android_res/com/facebook/messaging/livelocation/shared/res/values/strings.xml
android_res/com/facebook/messaging/permissions/res/values/strings.xml
android_res/com/facebook/messaging/invites/res/values/strings.xml
android_res/com/facebook/messaging/groups/threadactions/res/values/strings.xml
android_res/com/facebook/messaging/groups/nullstate/res/values/strings.xml
android_res/com/facebook/messaging/groups/admin/res/values/strings.xml
android_res/com/facebook/messaging/extensions/res/values/strings.xml
android_res/com/facebook/messaging/ephemeral/res/values/strings.xml
android_res/com/facebook/messaging/emoji/res/values/strings.xml
android_res/com/facebook/messaging/customthreads/res/values/strings.xml
android_res/com/facebook/messaging/contacts/picker/res/values/strings.xml
android_res/com/facebook/messaging/search/picker/res/values/strings.xml
android_res/com/facebook/contacts/res/values/strings.xml
android_res/com/facebook/messaging/connectivity/res/values/strings.xml

allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D72564442

fbshipit-source-id: 4c49fc8f3798c3442b7ac81cbeda3b6d1406cb80
2025-04-07 06:13:47 -07:00
Mateo GuzmánandFacebook GitHub Bot 183b0d49fd Make ReactJsExceptionHandler internal (#50503)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.interfaces.exceptionmanager.ReactJsExceptionHandler).

## Changelog:

[INTERNAL] - Make com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler internal

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

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

Reviewed By: javache

Differential Revision: D72549787

Pulled By: cortinico

fbshipit-source-id: f24bcab2412a58b59f249b8bef03df75ebbd16a4
2025-04-07 06:13:40 -07:00
Mateo GuzmánandFacebook GitHub Bot 9d7aac35a5 Make ReactIgnorableMountingException internal (#50504)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.ReactIgnorableMountingException).

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.ReactIgnorableMountingException internal

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

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

Reviewed By: cortinico

Differential Revision: D72549687

Pulled By: javache

fbshipit-source-id: 33e1df926ab92711d1b98a50295dac3263b04f56
2025-04-07 05:55:20 -07:00
Nicola CortiandFacebook GitHub Bot 82a40b6f5f Rename assertWhenLegacyArchitectureMinifyingEnabled to assertLegacyArchitecture (#50512)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50512

Reland of D72389708

This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.

I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D72552028

fbshipit-source-id: 2594df9ef8056f9931960117770c4b7cddd4e922
2025-04-07 05:38:41 -07:00
Nicola CortiandFacebook GitHub Bot 28ed958af6 Move ReactMarker to reactnativejni_common as it's used in NewArch also (#50511)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50511

Reland of D72384347

ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.

I'm cleaning this up by moving it inside `reactnativejni_common`.

Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also

Reviewed By: javache

Differential Revision: D72552075

fbshipit-source-id: bbc75aada1564f6f54ea70a8dd4f5145d4a3ffaa
2025-04-07 05:38:41 -07:00
Rubén NorteandFacebook GitHub Bot bcfe8f2e76 Remove unnecessary Event and CustomEvent polyfills (#50495)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50495

Changelog: [internal]

This migrates the last remaining usages of these polyfills to the built-in classes.

Reviewed By: yungsters

Differential Revision: D67828652

fbshipit-source-id: 5ff039d7413aed49d882ff03e722531cdd195488
2025-04-07 05:15:37 -07:00
Rubén NorteandFacebook GitHub Bot 0173839f42 Remove dependency on event-target-shim (#50494)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50494

Changelog: [internal]

Removes the dependency on the `event-target-shim` npm package now that we're using a custom implementation within `react-native`.

Reviewed By: yungsters

Differential Revision: D67828636

fbshipit-source-id: 8727f8caa2bd4badd7162eb7b993dcc768e74b85
2025-04-07 05:15:37 -07:00
Rubén NorteandFacebook GitHub Bot d33ff5353c Ship refactor of XHR, FileReader and WebSocket to use the built-in EventTarget implementation (#50485)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50485

Changelog: [internal]

This cleans up the experiment to test the new implementations of `XMLHttpRequest`, `FileReader` and `WebSocket` using the built-in `EventTarget` definition.

This effectively replaces the legacy implementations with the ones using the built-in `EventTarget` class in stable.

Reviewed By: yungsters

Differential Revision: D68625225

fbshipit-source-id: 7ccefe5d8612baca283146cdbca7f7f1d51b4ffa
2025-04-07 05:15:37 -07:00
Mateo GuzmánandFacebook GitHub Bot cbf11699d9 Make ViewGroupClickEvent internal (#50505)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.view.ViewGroupClickEvent).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.view.ViewGroupClickEvent internal

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

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

Reviewed By: cortinico

Differential Revision: D72549704

Pulled By: javache

fbshipit-source-id: 8c90192bc088ab52e709e87870eb1c2353cf1e85
2025-04-07 03:37:19 -07:00
Nicola CortiandFacebook GitHub Bot 22baacd6fb Correctly update the warning message for OSS vs Internal (#50486)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50486

Those 2 messages are inverted. Let's fix it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D72451355

fbshipit-source-id: 6aa0636d2cfaf7bf017c376d4d984afb351e1cd8
2025-04-07 03:09:59 -07:00
Mateo GuzmánandFacebook GitHub Bot 786c6e8043 Make FontMetricsUtil internal (#50506)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.views.text.FontMetricsUtil).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.text.FontMetricsUtil internal

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

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

Reviewed By: javache

Differential Revision: D72549765

Pulled By: cortinico

fbshipit-source-id: b7e29dfb716ce7c93620b14adec1425345b13ac1
2025-04-07 02:59:30 -07:00
Mateo GuzmánandFacebook GitHub Bot ad3308928d Make ViewAtIndex internal (#50501)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.ViewAtIndex).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.ViewAtIndex internal

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

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

Reviewed By: javache

Differential Revision: D72549751

Pulled By: cortinico

fbshipit-source-id: 8fec0e0b0516575ea5a815cfd2786c61a8c62d37
2025-04-07 02:58:41 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c0d96a5bc6 Avoid crashes when RCTInstance is ready but modules are loaded (#50499)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50499

We enocuntered an issue internally where the `RCTInstance` was ready before the modules were done registering statically.
When this happens, it can occur that we iterate over an array that is going to be modified.

With this change, we are introducing several changes:
- By default the logs are not outputted, so the array is not going to be populated
- we are making a copy of the array before we start iterating, so even if the original reference is updated, the iteration is safe
- we are not emitting logs if in release mode. This will protect production from this issue. Also, these warns are not going to be useful in production anyway.

## Changelog:
[Internal] - fix crash when RCTInstance is ready while modules are initialized

## Facebook:
This fixes T220205371

Reviewed By: Abbondanzo

Differential Revision: D72512518

fbshipit-source-id: 32e561111d034455a6a778d05af4a96602b74bfb
2025-04-06 02:23:30 -07:00
David VaccaandFacebook GitHub Bot f0ad394464 Unmark ReactMethod as LegacyArchitecture
Summary:
ReactMethod will remain to be supported in the New Architecture, we are unmarking it

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D72491698

fbshipit-source-id: 656b36711dcdfc0a776ac05b1f7f431d6416f9dd
2025-04-04 20:13:26 -07:00
generatedunixname89002005287564andFacebook GitHub Bot a20b02efbf Fix CQS signal. Id] 32912214 -- modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactCommon/logger
Reviewed By: dtolnay

Differential Revision: D72449910

fbshipit-source-id: d246d83f19b374c5fe1260ce8bbe974ccd7ffa15
2025-04-04 18:24:46 -07:00
Tim YungandFacebook GitHub Bot 45a9279c2e Fantom: Make Object Arguments $ReadOnly
Summary:
Changing these object arguments to `$ReadOnly` permits passing in values that are `$ReadOnly` (e.g. `payload` argument to `enqueueNativeEvent`).

Changelog:
[Internal]

Reviewed By: lyahdav

Differential Revision: D72474879

fbshipit-source-id: 27341131724f4f572b78563975774a5b20dee8f8
2025-04-04 16:15:42 -07:00
Thanich JuthapisuthandFacebook GitHub Bot 512e680d72 Revert D72384347: Move ReactMarker to reactnativejni_common as it's used in NewArch also
Differential Revision:
D72384347

Original commit changeset: 83965c3e4eb7

Original Phabricator Diff: D72384347

fbshipit-source-id: 47cfe95479ce749ebb8e102d147bd5da4fa26e31
2025-04-04 14:22:56 -07:00
Thanich JuthapisuthandFacebook GitHub Bot 91c6cf2aed Revert D72389708: Rename assertWhenLegacyArchitectureMinifyingEnabled to assertLegacyArchitecture
Differential Revision:
D72389708

Original commit changeset: 23830df2f71c

Original Phabricator Diff: D72389708

fbshipit-source-id: 3dd074102cf75c03fa11ad5daf8ddc2f748e7879
2025-04-04 14:22:56 -07:00
Pieter De BaetsandFacebook GitHub Bot a5a71f115f Fix leaked ParagraphState when recycling (#50489)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50489

ParagraphState is shared between ParagraphTextView and ParagraphComponentView, but we only need one copy. We were forgetting to clear this on ParagraphTextView when recyling.

Changelog: [iOS][Fixed] ParagraphState is correctly deallocated when recycling Text

Reviewed By: cipolleschi

Differential Revision: D72454038

fbshipit-source-id: 43afa4eaea183cc66b64d16870c1403debff985a
2025-04-04 14:14:31 -07:00
Ruslan LesiutinandFacebook GitHub Bot 971fb6453c Disallow copying RuntimeSamplingProfile and Sample
Summary:
# Changelog:  [Internal]

We should avoid allocating multiple of these, since they can get really big.

`RuntimeSamplingProfile` may contain up to 10k of `Sample` for every second of sampling. Every `Sample` may contain up to 500 of call frames, each of which may have a copy of strings like `functionName` and `url`.

> NOTE: The actual logic for deduplicating strings and not allocating too many of them is not part of this diff and will be published separately. Even with deduplication, there is a reason to avoid copying the profile.

Reviewed By: javache

Differential Revision: D72254364

fbshipit-source-id: fa7907fb5cabbd2ac99d3e4e05a93bcb07f7f7c7
2025-04-04 14:06:40 -07:00
Ruslan LesiutinandFacebook GitHub Bot 45c678b36f Remove trailing zeroes from trace event ids
Summary:
# Changelog: [Internal]

This was changed in D70402439.

Since these hexadecimal numbers are serialized as strings, we don't need to includes empty bits, this could save us few kilobytes of the trace in json format.

Also, this is the default for Chromium, so we shouldn't probably diverge.

`0x00000001` -> `0x1`

Reviewed By: robhogan

Differential Revision: D72459307

fbshipit-source-id: 5cc4ccbe25cdc16946e745184ad17dfcd51c6449
2025-04-04 14:06:40 -07:00
Ruslan LesiutinandFacebook GitHub Bot cbd335569a Don't copy TraceEvent before serialization
Summary:
# Changelog: [Internal]

`"ProfileChunk"` trace events can actually be big, depending on the number of the unique nodes reported in a single chunk.

We should avoid copying it for memory and performance reasons.

Reviewed By: robhogan

Differential Revision: D72459306

fbshipit-source-id: db3583c6c6397bb6ee8a0eb33a06a48bc10e82b8
2025-04-04 14:06:40 -07:00
Nicola CortiandFacebook GitHub Bot 2dab453f34 Rename assertWhenLegacyArchitectureMinifyingEnabled to assertLegacyArchitecture
Summary:
This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.

I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D72389708

fbshipit-source-id: 23830df2f71cc816c7ca178b735a930e794efe47
2025-04-04 12:16:44 -07:00
Nicola CortiandFacebook GitHub Bot 87e78ec75d Move ReactMarker to reactnativejni_common as it's used in NewArch also (#50471)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50471

ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.

I'm cleaning this up by moving it inside `reactnativejni_common`.

Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also

Reviewed By: javache

Differential Revision: D72384347

fbshipit-source-id: 83965c3e4eb7847184856485d1cc1c478b2888d5
2025-04-04 12:16:44 -07:00
Liron YahdavandFacebook GitHub Bot 280caaecfd Remove unused feature flag related to TurboModule deadlock (#50479)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50479

In D72273163 the only reference to RN feature flag `throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS` was removed, so this diff removes the feature flag. Also it removes remnants of D69922771 which are no longer needed.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D72427164

fbshipit-source-id: 398583ac14910a396839140c06011efa084fe04d
2025-04-04 11:33:27 -07:00
Nicola CortiandFacebook GitHub Bot f0dbb2d969 Unbreak ci due to missing import in Android's helloworld app. (#50497)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50497

I forgot to add this import inside helloworld's MainApplication.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D72464030

fbshipit-source-id: 8cb0982c8ec922bf46c0392a1ca2aed3d1bd9202
2025-04-04 11:23:28 -07:00
Nicola CortiandFacebook GitHub Bot 7ca2811750 Add a legacyWarningsEnabled property to enable Legacy Warnings on NewArch (#50470)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50470

This diff introduces a new property called `legacyWarningsEnabled` for `gradle.properties` that
toggles the Legacy Arch warnings for users.

I've also introduced a new `ReactNativeApplicationEntryPoint` that is generated by RNGP. This class
effectively wrap `DefaultNewArchitectureEntryPoint` by setting warnings and also invoking SoLoader.
It will reduce the errors in the user space.

As of now warnigns appear in Logcat, but I'm looking into adding some UI in a subsequent diff.

Changelog:
[Android] [Added] - Add a `legacyWarningsEnabled` property to enable Legacy Warnings on NewArch

Reviewed By: mdvacca

Differential Revision: D72383907

fbshipit-source-id: bcd659a23ec5b468958124f0f6650ff72d01ce81
2025-04-04 08:17:07 -07:00
Rubén NorteandFacebook GitHub Bot e17a6caf0a Replace module-relative paths with RN package-relative paths in some tests (#50490)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50490

Changelog: [internal]

This follows the good practice in Fantom tests.

Reviewed By: javache

Differential Revision: D72454795

fbshipit-source-id: 412ee53f61073c63295a23fd7decd6f19a72bf99
2025-04-04 07:44:44 -07:00
Mateo GuzmánandFacebook GitHub Bot 3f8134880c Make ClassFinder internal (#50482)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.common.ClassFinder).

## Changelog:

[INTERNAL] - Make com.facebook.react.common.ClassFinder internal

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

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

Reviewed By: cortinico

Differential Revision: D72445636

Pulled By: javache

fbshipit-source-id: 678327173afbbd5140eef163782051203b4f175b
2025-04-04 06:45:32 -07:00
Rubén NorteandFacebook GitHub Bot 150b1ccaba Clean up enableUIConsistency feature flag (#50484)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50484

Changelog: [internal]

This cleans up the `enableUIConsistency` feature flag (shipping the feature) after we verified it was stable and performance in production.

Reviewed By: yungsters

Differential Revision: D72387602

fbshipit-source-id: 11d225d962f7e3a47e858d039b7fd5c70a6cadfd
2025-04-04 05:38:29 -07:00
Mateo GuzmánandFacebook GitHub Bot 76cfce768d Make DevMenuModule internal (#50483)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.debug.DevMenuModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.debug.DevMenuModule internal

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

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

Reviewed By: cortinico

Differential Revision: D72445725

Pulled By: javache

fbshipit-source-id: 6bace7a31b0b27e5a36e20106ac81d6059553adb
2025-04-04 04:30:55 -07:00
Mateo GuzmánandFacebook GitHub Bot d0ae2d62b8 Remove unused SendAccessibilityEvent class (#50478)
Summary:
Found this unused class with static code analysis. It is internal and has no OSS usages, so it seems like it can be safely deleted.

## Changelog:

[INTERNAL] - Remove unused com.facebook.react.fabric.mounting.mountitems.SendAccessibilityEvent class

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

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

Reviewed By: fabriziocucci

Differential Revision: D72445544

Pulled By: javache

fbshipit-source-id: ebbb035da22111e41b04131596d3ec61d4e1423c
2025-04-04 03:44:10 -07:00
Pieter De BaetsandFacebook GitHub Bot 007cefd94e Cache performanceNow method
Summary: Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D72410946

fbshipit-source-id: 7097e7bf6ac613adccce7fe1267fb70785f976b3
2025-04-04 03:21:08 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 43a0bddd74 Add integration of OSS libraries used internally (#50477)
Summary:
This PR adds a bunch of OSS libraries to the testing matrix.
We use these OSS libraries internally in our Meta application, so we want to make sure that our changes don't break them.

## Changelog:
[Internal] - Add OSS libraries used internally to the testing matrix

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

Test Plan: GHA - Tested in a sample job firts:

Reviewed By: cortinico

Differential Revision: D72401647

Pulled By: cipolleschi

fbshipit-source-id: c0c2f4b2525b58822c2cc6225fe64210a9513275
2025-04-04 02:22:34 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 915319f075 Test reanimated using nightlies (#50428)
Summary:
Use nightlies to test reanimated with RN nightlies

## Changelog:
[Internal] - use reanimated nightlies together with react native nightlies to spot breaking changes

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

Test Plan: GHA - Tested triggering it from a PR in this job: https://github.com/facebook/react-native/actions/runs/14197051228?pr=50428

Reviewed By: cortinico

Differential Revision: D72243345

Pulled By: cipolleschi

fbshipit-source-id: 297ec0073dfc32ec5a5e90630b93867fac0b564f
2025-04-04 02:22:34 -07:00
Joe VilchesandFacebook GitHub Bot 4b89096cda Fix tons of extra whitespace in OSS feature flag files (#50480)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50480

The map in the script has an if in it checking for proper release channel. For feature flags that do not pass this if, they do not have an alternative return, so `map` just maps this to `undefined`. That means there is still an element in this array which gets joined by 2 new lines. As a result every new feature flag will add 2 new lines of white space making these files look rather silly.

Fix is to filter undefined out.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D72427349

fbshipit-source-id: 87e1d63c8854652296ce9160ab7171a948983d54
2025-04-03 23:53:13 -07:00
Jakub PiaseckiandFacebook GitHub Bot 3579a89c15 Create a transform for sorting types inside a union (#50468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50468

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72381049

fbshipit-source-id: 9b72f6617b8ac090be9bfd3503d66d89bb701029
2025-04-03 22:45:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot 87f08ca6e9 Create a transform for sorting the object properties and methods (#50467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50467

Changelog: [Internal]

Adds a transform that is able to divide properies of interaces, types and classes into sections:
- properties
- properties typed as functions
- methods
ands sorts them alphabetically within the groups.

Reviewed By: huntie

Differential Revision: D72381050

fbshipit-source-id: 20781dc44e19e63cbb5706a02e513fc0e9bb2412
2025-04-03 22:45:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot 847757cd27 Create a transform for dividing type definitions into exported and non-exported sections (#50466)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50466

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72314520

fbshipit-source-id: 3a3cf5852768c1f0937f11b3fa7e7d4c442a54b9
2025-04-03 22:45:54 -07:00
Jiawei LüandFacebook GitHub Bot ad37783615 Back out "Fix nullsafe FIXMES for Task.java and mark nullsafe"
Summary:
The original diff caused some breakages.

Changelog: Backout [Android][Fixed] Made Task.java nullsafe

Differential Revision: D72433889

fbshipit-source-id: 53f7e730455ccaadde197a0f400fc6e834c1ffdd
2025-04-03 21:13:56 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 725d9683b3 Fix CQS signal. Id] 31464309 -- modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/runtime/jni
Reviewed By: dtolnay

Differential Revision: D72376833

fbshipit-source-id: 68e5e4130914631442072a868b75c03260d80b35
2025-04-03 17:48:28 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot e3f7c8f456 Fix <Image> components not being able to be set as focusable for Voice Over
Summary:
Image component was missing an override which enables setting accessibility values and properties.

The main issue is the lack of this prevented Image component from being accessed by VoiceOver.

Changelog: [iOS][Fixed] - Fixed accessible prop no-opts on Image components

Reviewed By: joevilches

Differential Revision: D72410952

fbshipit-source-id: 5612205aca1710fe4bfed6132efeb59065ebf0b3
2025-04-03 17:23:17 -07:00
Sam ZhouandFacebook GitHub Bot 70260f4d8b Replace $Rest in react-native
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D72413524

fbshipit-source-id: 2b9d2b5addb6660fd63ee8fe1a0e13d94cc1968f
2025-04-03 16:13:09 -07:00
David VaccaandFacebook GitHub Bot 793001a39b Unmark LegacyArchitecture from ReactContextBaseJavaModule
Summary:
Unmark LegacyArchitecture from ReactContextBaseJavaModule

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D72405195

fbshipit-source-id: 1ae96db72b5a1258e923ebbc9469eb0e9d6b13d1
2025-04-03 15:05:36 -07:00
David VaccaandFacebook GitHub Bot 7826dc379d Mark concrete classes of shadow node as @LegacyArchitecture
Summary:
Mark concrete classes of shadow node as LegacyArchitecture

These classes won't be included in legacy architecture apks

changelog: [internal] internal

Reviewed By: joevilches, mlord93, Abbondanzo

Differential Revision: D72351188

fbshipit-source-id: 4727cdd1486b2fafb87fe3b512440af3264ad189
2025-04-03 13:03:01 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ce7a602edf Add flag to turn off legacy warning (#50249)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50249

This change introduces a flag to turn off the legacy architecture warning if they become too annoying.

The flag can be set in the Info.plist of the React Native architecture and it is controlled by the key: `RCTLegacyWarningsEnabled`.

* If the key is missing or with a value of `YES`, logs are enabled
* If the key has a value of `NO`, react native will not output any log.

We decided to use the Info.plist file to configure the logs because in that way it will work also with React Native prebuilds.

## Changelog:
[iOS][Added] - Add flag to enable or disable legacy warning.

Reviewed By: cortinico

Differential Revision: D71814001

fbshipit-source-id: b6ae6b032ff7add6bae3d73dba490adeaceffa1f
2025-04-03 12:22:17 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 8acc53da57 Add warning when a component is loaded with the interop layer (#50244)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50244

This change adds warning to React Native whenever a component is loaded using the interop layer.

The warning is emitted only once per component.

## Changelog:
[iOS][Added] - Add warnings when components are loaded using the interop layer.

Reviewed By: cortinico

Differential Revision: D71808323

fbshipit-source-id: ce864f73c7789512d4e5e67368b5aa67f94e0570
2025-04-03 12:22:17 -07:00
Arushi KesarwaniandFacebook GitHub Bot 20a12f6025 Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flag (#50441)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50441

When useFabricInterop is disabled, deleting component descriptors in Component Registry is failing since  https://github.com/facebook/react-native/pull/47321 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in https://github.com/facebook/react-native/pull/42294
Adding back the logic of Fallback component descriptor and error for the same.

Changelog:
[General][Fixed] Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flags.

Reviewed By: javache

Differential Revision: D72266017

fbshipit-source-id: 1f3093d37dbe2b96ca26aa80c0a59d5c3026e9cf
2025-04-03 11:25:33 -07:00
Arushi KesarwaniandFacebook GitHub Bot 3fe24910c1 Altering useFabricInterop definition for handling Twilight + Fb4a (#50440)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50440

Making the following changes to definition of `useFabricInterop` feature flag:

1. Changing default value to True for both internal and OSS.
2. Changing expected Release Value to false since aiming at disabling interop finally with new architecture strict mode.
3. Hence changed the `ossReleaseStage` from `canary` to `none`
4. Removing all existing over-rides of `useFabricInterop` to True now that the default is True itself.
5. Adding the over-ride to false for Facebook since that doesn't need the interop as is already in new architecture without interop mode.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D72266336

fbshipit-source-id: ff16c5b9d0f39837706a86bd0d178a66a8f2e920
2025-04-03 11:25:33 -07:00
Alex HuntandFacebook GitHub Bot 1bb929baed Add explicit compatibility for platform specific files under "exports" (#50426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50426

Prepares [platform-specific extensions](https://reactnative.dev/docs/platform-specific-code) compatibility for subpath imports ahead of D72228547 (`"exports"` field reattempt).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D72235790

fbshipit-source-id: 8e76999c632460fdc4795d56e19db75f327ea126
2025-04-03 09:22:50 -07:00
Mateo GuzmánandFacebook GitHub Bot 403d609d83 Make LogBoxModule internal (#50456)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.devsupport.LogBoxModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.devsupport.LogBoxModule internal

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

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

Reviewed By: javache, cortinico

Differential Revision: D72344264

Pulled By: zeyap

fbshipit-source-id: 56eccb026da5d435198d85dada641c18e241ba6a
2025-04-03 08:32:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 91622459ce Add Changelog for 0.76.9 (#50475)
Summary:
Add changelog for 0.76.9

## Changelog:
[Internal] - Add changelog for 0.76.9

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D72388443

Pulled By: cipolleschi

fbshipit-source-id: 41c8aac00a0ac11fdfab2a3032d86f04a86a0d7e
2025-04-03 08:31:45 -07:00
Alex HuntandFacebook GitHub Bot d32ca8e899 Move build-types config into own module (#50450)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50450

Intends to be reused by the incoming `buildApiSnapshot` behaviour.

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D72306509

fbshipit-source-id: 9e03c95f2469e10c05bdd0be39d4e217a6cc197f
2025-04-03 08:31:23 -07:00
Alex HuntandFacebook GitHub Bot 293e89e7f6 Move build-types script into separate dir (#50448)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50448

In preparation for API snapshot generation and README documentation, move into dedicated dir.

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D72306094

fbshipit-source-id: 3663f9ba9987a59918bae54cfc5a27555b90a9f9
2025-04-03 08:31:23 -07:00
Gijs WeteringsandFacebook GitHub Bot eba9ebe0a9 Fix nullsafe FIXMES for Task.java and mark nullsafe (#50355)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50355

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made Task.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979582

fbshipit-source-id: f4104e5deb1d0538fe8b4968dc1411036a3e9634
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot af4f0d0cff Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Task.java (#50361)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50361

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979592

fbshipit-source-id: 07f3b74362b85803eec90c0c974a88d061d8e816
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot ff6601bfb7 Fix nullsafe FIXMES for ReconnectingWebSocket.java and mark nullsafe (#50354)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50354

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReconnectingWebSocket.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979606

fbshipit-source-id: d71e26fe37bdf5abbe7b933d0fee25e05d0da87d
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot f94174f2dc Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/ReconnectingWebSocket.java (#50368)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50368

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979580

fbshipit-source-id: 0eaeaf327421db47a8499a9b6154fa6d5ab8a4fd
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot 4e7d09ceff FIx nullsafe FIXMEs for DialogModule and mark nullsafe (#50353)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50353

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DialogModule.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979604

fbshipit-source-id: 556b2b10ef0879bf7cd4eac6eaf3c9c3cc1c5413
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot 6d96f70abc Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java (#50351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50351

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979584

fbshipit-source-id: 52e29ac578edcbcd9bd14de4d327564d54f421cf
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot 8f5aaf13b2 Fix Nullsafe FIXMEs for FileReaderModule.java and mark nullsafe (#50352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50352

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FileReaderModule.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979585

fbshipit-source-id: 3bef5ff48d1d27838d2668367785a85b2b863f05
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot b9ad9966e6 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/FileReaderModule.java (#50360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50360

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979587

fbshipit-source-id: 50c248def66360f2a063d9eb213cfae5d6787943
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot 020db409a2 Fix Nullsafe FIXMEs for BlobProvider.java and mark nullsafe (#50363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50363

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BlobProvider.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979597

fbshipit-source-id: a6fba0d83f3558b3bed21de484b59ee6b17bb643
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot 0702e74277 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.java (#50350)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50350

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979586

fbshipit-source-id: 155fc505d131acc1fa3444692928448b8567cbd5
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot 7aaf0cb3f1 Fix Nullsafe FIXMES for MountingManager.java and mark nullsafe (#50362)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50362

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountingManager.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979607

fbshipit-source-id: 0a41e3a6405500c29ec4710ea3ed57e6705f1b4a
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot 141060a230 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java (#50356)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50356

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979593

fbshipit-source-id: 4dbe6ae7f44694b77ebf64170cb71393b532b981
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot e957bdb8fa Fix Nullsafe FIXMEs for MountItemDispatcher.java and mark nullsafe (#50348)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50348

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountItemDispatcher.java nullsafe

Reviewed By: cortinico

Differential Revision: D71979589

fbshipit-source-id: 0133fa6bd56d5595e8397029517b43d0a95b260b
2025-04-03 08:01:59 -07:00
Gijs WeteringsandFacebook GitHub Bot a98e15cf5d Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java (#50349)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50349

Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D71979596

fbshipit-source-id: a463b916328d4aecb6b8d91c37be170a8f6fb355
2025-04-03 08:01:59 -07:00
Jakub PiaseckiandFacebook GitHub Bot 939d1a37f6 Update ScrollView symbols (#50469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50469

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72383377

fbshipit-source-id: 4381d9d692de011e4872c27b55d77c10cb848e02
2025-04-03 07:53:58 -07:00
Mateo GuzmánandFacebook GitHub Bot 2be407cd97 Make SoundManagerModule internal (#50457)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.sound.SoundManagerModule).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.sound.SoundManagerModule internal

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

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

Reviewed By: javache, cortinico

Differential Revision: D72344289

Pulled By: zeyap

fbshipit-source-id: a7303dfa7353e66b7c369cf34f6f0e018c25d9cf
2025-04-03 07:46:22 -07:00
Nicola CortiandFacebook GitHub Bot 1786912263 Decouple NativeMap and NativeArray from reactnativejni (#50437)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50437

Currently we do have `NativeArray`, `NativeMap` being tightly coupled with the old arch (i.e. everything inside `libreactnativejni.so`).
Those classes however are primitives used also by the New Arch and they should be accessible even without the bridge infra.

I've noticed this dependency while working on the Legacy Arch warnings.

Here I'm refactoring those primitives to live in a separate `libreactnativejni_common` module that can be loaded indipendently.

Changelog:
[Internal] [Changed] - Decouple NativeMap and NativeArray from `reactnativejni`

Reviewed By: javache, mdvacca

Differential Revision: D71635967

fbshipit-source-id: 64b0fc26491977a0e6c5be4688ff91969c81d680
2025-04-03 06:49:59 -07:00
Vitali ZaidmanandFacebook GitHub Bot adff5fcd35 log time since last communication (#50436)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50436

Changelog: [Internal]

`is_idle` was a confusing concept that I didn't find useful when researching why disconnections happen. Instead, I'd like to know when the last communication with inspector proxy took place.

Reviewed By: hoxyq

Differential Revision: D72251072

fbshipit-source-id: 10f83bde6c8f3ed4b661bcfbef57f86f34039e5d
2025-04-03 05:47:05 -07:00
Vitali ZaidmanandFacebook GitHub Bot ca7baa1d17 also report message size in inspector proxy cdp traffic reporter (#50435)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50435

Changelog: [Internal] when reporting how many cdp messages passed inspector proxy, also report their total size

Reviewed By: hoxyq

Differential Revision: D72245498

fbshipit-source-id: 777274527b7e180c984b11414bec54d0e6f9d27b
2025-04-03 05:47:05 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e14230267c Pin cmake version to 3.31.6 (#50464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50464

Runners in GHA has been updated by github and they now ship with CMake 4.0. (actions/runner-images#11926)

This version is not compatible with React Native, so we are pinning cmake to 3.36.1

## Changelog:
[Internal] - Pin cmake to 3.36.1

Reviewed By: cortinico

Differential Revision: D72379834

fbshipit-source-id: ab09009102118e6590f02cf57fa6f9149482f62b
2025-04-03 05:05:38 -07:00
Mateo GuzmánandFacebook GitHub Bot f02607badb Make DeviceInfoModule internal (#50458)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.modules.deviceinfo.DeviceInfoModule).

All GH search results are forks – there is only one relevant case for the repository [renavigation2/renavigation2](https://github.com/renavigation2/renavigation2/blob/82582c11a9eb2e4e7c56d84d53fbc4e575cb0174/packages/navigation/android/src/main/java/com/navigation/reactnative/SceneView.java#L17), but the repo has no been updated for 4 years, marked as work in progress and its packages have 0 downloads, so this won't break OSS but I'm marking it as breaking just in case (let me know if you think we should open an issue on their side).

## Changelog:

[ANDROID][BREAKING] - Make com.facebook.react.modules.deviceinfo.DeviceInfoModule internal

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

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

Reviewed By: cortinico

Differential Revision: D72377448

Pulled By: javache

fbshipit-source-id: 974146474f649ce2bc80d74c3eb8d6d8f987c372
2025-04-03 04:56:05 -07:00
Alex HuntandFacebook GitHub Bot 7b5ba57255 Move ToastAndroid fallback to separate module, copy doc comments (#50427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50427

Move non-Android implementation into `ToastFallback.js`. The added `Platform.OS` check allows compatibility when this import subpath is specified in package.json `"exports"`.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D72238079

fbshipit-source-id: 6ccc5c17a36015a3d76573b447b61467f47fb419
2025-04-03 03:26:38 -07:00
Nicola CortiandFacebook GitHub Bot d13be5723f Exclude __mocks__ folder from codegen podspec generation
Summary:
We should not be adding files inside Jest's __mocks__ folder inside the generated podspec.
This takes care of it.

Context: https://github.com/reactwg/react-native-new-architecture/discussions/282

Changelog:
[Internal] [Changed] - Exclude __mocks__ folder from codegen podspec generation

Reviewed By: fabriziocucci

Differential Revision: D72318736

fbshipit-source-id: 73a8c3f3cd84794ead9e7ce622f7ac4299d943f1
2025-04-03 02:53:49 -07:00
Aliaksei AndreyeuandFacebook GitHub Bot e6ae02a6db Report JS events as instant track markers
Summary:
Currently markers are ignored in RN apps. Utilizing newly added instant track event type for sytrace so the markers are displayed nicely on the timeline. The time delta decoding will be addressed separately for proper timestamp assignment during backend processing.

## Changelog:

[Internal] [Added] - Support for logging mark events with fbsystrace

Reviewed By: javache

Differential Revision: D72094455

fbshipit-source-id: 4cd8f53ddd0b40dfded8d6d8df367698515588c7
2025-04-02 23:57:54 -07:00
Sam ZhouandFacebook GitHub Bot fae1532f4b Remove $PropertyType shim
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D72347503

fbshipit-source-id: 11d00394a0b0e50a28aefdbb984a55ebdbc5bb58
2025-04-02 17:27:55 -07:00
Ramanpreet NaraandFacebook GitHub Bot 3af66fd423 RFC: Mitigate main queue js execution deadlocks now and forever
Summary:
Make RCTScreenSize and RCTScreenScale initialize during React Native init.

After this diff, there shouldn't be any sync dispatches to the main queue. So, we can just introduce an error into RCTUnsafeExecuteOnMainQueueSync.

## Note
If people manually dispatch to the main queue like so, react native can still deadlock:

```
dispatch_sync(dispatch_get_main_queue(), ^{});
```

Changelog: [Internal]

Reviewed By: lyahdav

Differential Revision: D72273163

fbshipit-source-id: 6211851b380b4f5cd556f48f4d717a6f53d65d32
2025-04-02 16:45:18 -07:00
Ramanpreet NaraandFacebook GitHub Bot a74649d285 Convert RCTUtils into objc++
Summary:
I'll need to use feature flags in this file. And those are only accessible from c++.

Changelog: [Internal]

Reviewed By: lyahdav

Differential Revision: D72326982

fbshipit-source-id: 4c9dfd0e5baa69d979b12914f289d58be6e123a8
2025-04-02 16:45:18 -07:00
Dawid MałeckiandFacebook GitHub Bot 1b24182a17 Reexport NativeMethodsMixin type from the root
Summary:
Reexport `NativeMethodsMixin` type to align closer with manual types.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D72150912

fbshipit-source-id: 91a09297df7f609741dcf7e7506cc7dc07375de1
2025-04-02 09:12:34 -07:00
Alex HuntandFacebook GitHub Bot 3587f57192 Add error code exit for build-types with nonempty errors (#50449)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50449

Productionisation step before we enable in CI.

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D72303190

fbshipit-source-id: 15dcd85a817549a3a20aa8a56cb8855a68ed5839
2025-04-02 07:50:22 -07:00
Jakub PiaseckiandFacebook GitHub Bot b4e64546fd Add a post transform to rename the default export names (#50397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50397

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72170157

fbshipit-source-id: 9067a83c5e941ef8ade7b846799d9a09f7dc4e62
2025-04-02 07:03:15 -07:00
Dawid MałeckiandFacebook GitHub Bot 0615b056e6 Add lint rule preventing importing React as default (#50432)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50432

This diff adds lint rule to keep React imports consistent across the react native repo. There is a fix suggestion in case if only React is imported.

Changelog:
[internal]

Reviewed By: NickGerleman

Differential Revision: D72244838

fbshipit-source-id: b783d6320520d76c2e5d5ce5c5b7c2a4548d50fe
2025-04-02 06:59:33 -07:00
Dawid MałeckiandFacebook GitHub Bot 83399e245b Migrate import React to import * as React (#50433)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50433

Make React imports consistent across react-native source code to also align with Flow tooling.

flow-api-translator adds `import * as React from 'react';` if there is no React import and React namespace has to be used after translation.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D72238732

fbshipit-source-id: 5f8cfeab26f397684b1d802731729be7071b5da7
2025-04-02 06:59:33 -07:00
Jakub PiaseckiandFacebook GitHub Bot a7c38ddd34 Update type names to reduce symbol duplication (#50443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50443

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72298410

fbshipit-source-id: dd1b0fdfe63f64e97cc5001b8e7baeaf37c0d5d9
2025-04-02 05:39:33 -07:00
Jakub PiaseckiandFacebook GitHub Bot 53b210079b Remove leftover ignored entrypoints (#50445)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50445

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72302085

fbshipit-source-id: 6d35452a8b2f630388080bbfa56ef50abf048221
2025-04-02 03:45:58 -07:00
Jakub PiaseckiandFacebook GitHub Bot 7325512219 Reduce duplication of TextInput props (#50430)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50430

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72244423

fbshipit-source-id: 6ab76d32b269c0c33390b2e84a745549bcf9a66e
2025-04-02 00:45:29 -07:00
Ramanpreet NaraandFacebook GitHub Bot 094876367f Delete RCTComputeScreenScale
Summary:
This method is redundant. You could just call RCTScreenScale()

Changelog: [iOS][Removed] Delete RCTComputeScreenScale

Reviewed By: philIip

Differential Revision: D72258778

fbshipit-source-id: 0b469169efc4f2def85b2e6b736f3c4570e6b428
2025-04-01 19:49:45 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 1c21ec21e7 Changelog for 0.78.2 (#50434)
Summary:
Add changelog for RN 0.78.2

## Changelog:
[Internal] - Add changelog for RN 0.78.2

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D72247395

Pulled By: cipolleschi

fbshipit-source-id: c9852fe7f1fb6d1f87e7523719e9e6ae160b74be
2025-04-01 19:40:40 -07:00
Ramanpreet NaraandFacebook GitHub Bot dc97df10a2 Delete RCTFloorPixelValue
Summary:
This is dead code. Let's remove this for now.

This api is unsafe: if it's called from a non-ui thread, it may dispatch to the ui thread synchronously.

Changelog: [iOS][Removed] - Remove RCTFloorPixelValue

Reviewed By: NickGerleman

Differential Revision: D72260694

fbshipit-source-id: d032917643c957a395ee380ef925a047abd5dace
2025-04-01 19:39:19 -07:00
Ramanpreet NaraandFacebook GitHub Bot 61bd649c93 RCTTextLayoutManager: Migrate off screen scale access
Summary:
## Problem
If RCTScreenScale() is called from a non-ui thread, it will synchronously dispatch to the ui thread.

If the calling thread is the javascript thread, this could deadlock React Native.

## Changes
Move the method calls to the ui thread.

In the future, once all call-sites are migrated to the ui thread, we will just make these methods assert that they're being called from the ui thread.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72177192

fbshipit-source-id: daadf713f059d33e8fff4559b4184f9d4b6b420d
2025-04-01 19:28:08 -07:00
Nicola CortiandFacebook GitHub Bot 526f6cbe07 Delete unnecessary NativeModuleSoLoader (#50199)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50199

We don't really need another wrapper around SoLoader to decide when to load a library. SoLoader already does this for us. See:
https://github.com/facebook/SoLoader/blob/62c2028a07f146bbc56c0337dacf226fcd6f95ef/java/com/facebook/soloader/SoLoader.java#L1070-L1139
I'm removing this extra unnecessary class.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D71637449

fbshipit-source-id: 33a146b56f8027fdb7fc48fd6f68bdbcf0b34fd6
2025-04-01 19:19:04 -07:00
Jakub PiaseckiandFacebook GitHub Bot 597c457b68 Update types exported from the root package (#50418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50418

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72223744

fbshipit-source-id: 00abe0e5a83f3625f53e4386cf7a8b8e25cfa180
2025-04-01 19:18:22 -07:00
Mateo GuzmánandFacebook GitHub Bot 1012445ef5 Fix unresolved KDoc references (#50403)
Summary:
Static code analysis detected some unresolved KDoc references. In this PR, I’m addressing a few of them.

## Changelog:

[INTERNAL] - Fix some unresolved KDoc references

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

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

Reviewed By: cortinico

Differential Revision: D72234349

Pulled By: javache

fbshipit-source-id: 0877992cce5d76124b83c5261ec680683caadc9c
2025-04-01 12:19:01 -07:00
Alan HughesandFacebook GitHub Bot 9eb75d4bd5 Change exception handele type in ReleaseDevSupportManager (#50400)
Summary:
In expo-updates, we would like to handle exceptions on app launch. We used to do this by reassigning our own `DefaultJSExceptionHandler` to the property on the  `ReleaseDevSupportManager `.  This class has been migrated to kotlin and is now final so we can no longer do this. Instead of having the `defaultJSExceptionHandler` typed as `DefaultJSExceptionHandler` we'd like to change it to the interface, `JSExceptionHandler` so we can do this https://github.com/expo/expo/blob/93b7e9b1724a7be11b9d79c0313a2e5a2fd5e5bf/packages/expo-updates/android/src/main/java/expo/modules/updates/errorrecovery/ErrorRecovery.kt#L118C82-L118C97

## Changelog:

[ANDROID] [CHANGED] Change `defaultJSExceptionHandler`'s type to  `JSExceptionHandler` on the `ReleaseDevSupportManager`

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

Test Plan: RNTester runs without issue in a release build.

Reviewed By: huntie

Differential Revision: D72173667

Pulled By: cortinico

fbshipit-source-id: 978fd696322432e638a90014ff3c8c2b09fae761
2025-04-01 07:42:37 -07:00
Jakub PiaseckiandFacebook GitHub Bot 09d21955ac Update Keyboard instantiation to align with other singletons (#50420)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50420

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72223852

fbshipit-source-id: 3a131153cd329347250d81e1fc2043fbbd6e687e
2025-04-01 07:12:56 -07:00
Mateo GuzmánandFacebook GitHub Bot ecd902a9f1 Make MessageQueueThreadHandler internal (#50375)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.queue.MessageQueueThreadHandler).

All GH search results for this class point to error trace files.

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.queue.MessageQueueThreadHandler internal

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

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

Reviewed By: cortinico

Differential Revision: D72076724

Pulled By: javache

fbshipit-source-id: fa49f62c8d6b8efaeb1831ef2c69e293cf418520
2025-04-01 06:20:40 -07:00
Jakub PiaseckiandFacebook GitHub Bot 30fd5a3c05 Update Accessibility, Animated and Appearance type exports (#50421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50421

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72224821

fbshipit-source-id: 604fcdcabc1b6eeca7df3a32faf2505ddf268547
2025-04-01 03:54:49 -07:00
Jakub PiaseckiandFacebook GitHub Bot f446ac346d Make selected props not required (#50417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50417

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72223589

fbshipit-source-id: 7a88d585edca4dd9c028244c7bd456afc87e0faf
2025-04-01 03:50:38 -07:00
Jakub PiaseckiandFacebook GitHub Bot ad5f5a332a Make VirtualizedList use ScrollViewProps directly (#50416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50416

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72223126

fbshipit-source-id: 8598a02c31e16302a3f2ce8678602a33fc090c8a
2025-04-01 03:46:00 -07:00
Evghenii NicolaevandFacebook GitHub Bot d3daabfe2b Revert D71805075: Update hermes-parser and related packages in fbsource to 0.27.0
Differential Revision:
D71805075

Original commit changeset: 685194c12ac0

Original Phabricator Diff: D71805075

fbshipit-source-id: b28f0f83ad8b4f4f6b5e62fdc9ff323af79c1d43
2025-04-01 03:45:23 -07:00
Iwo PlazaandFacebook GitHub Bot be8393c41b Limit @react-native/virtualized-lists subpath imports (#50392)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50392

## This diff
Defines an exports field for the "react-native/virtualized-lists" package. Limits internal use of subpath
imports to virtualized-lists package, and exports all currently used APIs one the root level.

Changelog:
[General][Breaking] - Subpath imports to the internal react-native/virtualized-lists package are not allowed.

Reviewed By: huntie

Differential Revision: D72162344

fbshipit-source-id: 828dab8e569f019fc48084af475e152b898f5bb5
2025-04-01 03:26:25 -07:00
Fabrizio CucciandFacebook GitHub Bot 9a87bb2223 Add changelog entry for v0.79.0-rc.4 (#50424)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50424

As per title.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D72233212

fbshipit-source-id: c0d78d06dbb1dd697a86cdae4c21038dba7c3ae4
2025-04-01 03:14:16 -07:00
Pieter De BaetsandFacebook GitHub Bot fdf396b964 Remove unique_ptr for globalRootComponentDescriptor (#50391)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50391

No need for the indirection here of a heap allocated pointer.

Since we have the RootComponentDescriptor we generally don't need it in any other component registry.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D72058916

fbshipit-source-id: 0c29f26f4c56c4353eda251fe06a475e3b6085da
2025-04-01 02:18:44 -07:00
Alex HuntandFacebook GitHub Bot f13c8a7417 Update hermes-parser and related packages in fbsource to 0.27.0 (#50241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50241

Bump hermes-parser and related packages to [0.27.0](https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71805075

fbshipit-source-id: 685194c12ac037f74cc4fd54eb0d777a74507727
2025-04-01 01:01:05 -07:00
generatedunixname89002005232357andFacebook GitHub Bot 411af39f97 Revert D71908601 (#50409)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50409

Reviewed By: rozele

Differential Revision: D72190428

fbshipit-source-id: 00d2be5eda7fd6b89883a27c5ccb463b76428258
2025-03-31 20:05:04 -07:00
generatedunixname89002005232357andFacebook GitHub Bot 0670e382a5 Revert D71582553 (#50410)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50410

Reviewed By: rozele

Differential Revision: D72190404

fbshipit-source-id: c24fe997ccad22bef018b635140126b3d729a00c
2025-03-31 20:05:04 -07:00
Peter AbbondanzoandFacebook GitHub Bot ad8be9ada6 Remove Android image prefetching feature flag (#50412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50412

Removes the `enableImagePrefetchingAndroid` feature flag.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D72198491

fbshipit-source-id: bd9bb9ecc7b58ac1fe6a507ec9caf1ce99e0ba63
2025-03-31 18:50:54 -07:00
Zeya PengandFacebook GitHub Bot 4912958812 synchronouslyUpdateViewOnUIThread on UIManager (#50379)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50379

## Changelog:

[Android] [Added] - Allow invoking `synchronouslyUpdateViewOnUIThread` from c++ via `UIManager`
implementation is provided by SchedulerDelegate on the platform

Reviewed By: javache

Differential Revision: D71648772

fbshipit-source-id: bba0f7e9e2deafd074d28ff5cece6b7738c4d123
2025-03-31 13:17:56 -07:00
Jakub PiaseckiandFacebook GitHub Bot 97324abc0e Type Animated.event listener argument (#50390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50390

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D72151986

fbshipit-source-id: 26c9b6dff669fac6fcb8db1f6a0b23648f6f4afb
2025-03-31 09:36:57 -07:00
Tim YungandFacebook GitHub Bot bff5c30118 Revert D71968187: Define "exports" field on main package
Differential Revision:
D71968187

Original commit changeset: 28ff941692d1

Original Phabricator Diff: D71968187

fbshipit-source-id: a6843ab57da7b8a2c436dbdf23644fe2d8954520
2025-03-31 09:21:06 -07:00
InneiandFacebook GitHub Bot ce47d6a131 fix(typo): RCTBridgeProxy.mm methid to method (#50394)
Summary:
Fix typo

## Changelog:
[Internal] - typo `RCTBridgeProxy.mm` `methid` to `method`

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

Test Plan: N/A

Reviewed By: NSProgrammer, cortinico

Differential Revision: D72168477

Pulled By: cipolleschi

fbshipit-source-id: 6442aa87e90b9be9c18a2e2535939630848907d9
2025-03-31 08:58:56 -07:00
Adam ErnstandFacebook GitHub Bot ac23323da1 RCTDeviceInfo: fix crash due to failure to get AccessibilityManager (#50398)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50398

Reviewed By: philIip

Differential Revision: D72020801

fbshipit-source-id: 556e6d5a3e8492e8283ee10aa5829186d172b28f
2025-03-31 08:43:06 -07:00
Mateo GuzmánandFacebook GitHub Bot 8985c6be48 Make CallbackImpl internal (#50378)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.CallbackImpl).

All GH search results are forks.

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.CallbackImpl internal

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

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

Reviewed By: cortinico

Differential Revision: D72159376

Pulled By: javache

fbshipit-source-id: 1a3335431d46615262747e3d5b8cf6e8cab192a3
2025-03-31 06:35:39 -07:00
Mateo GuzmánandFacebook GitHub Bot c094f924dc Make InvalidIteratorException internal (#50383)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.bridge.InvalidIteratorException).

All GH search results are forks.

## Changelog:

[INTERNAL] - Make com.facebook.react.bridge.InvalidIteratorException internal

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

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

Reviewed By: cortinico

Differential Revision: D72159343

Pulled By: javache

fbshipit-source-id: 7ed30a4691fe8d7646e64b382b3459e7ab76508e
2025-03-31 06:23:16 -07:00
Andrew WangandFacebook GitHub Bot 63160341d9 Revert D70615310: Collection of small type updates
Differential Revision:
D70615310

Original commit changeset: 11dc833aeeeb

Original Phabricator Diff: D70615310

fbshipit-source-id: 6508f8e27e1a17f6086fdecb5177472233dc3480
2025-03-31 06:14:37 -07:00
Jakub PiaseckiandFacebook GitHub Bot f8a4f80b6e Collection of small type updates (#50312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50312

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70615310

fbshipit-source-id: 11dc833aeeeb67e03808b18b50ff79ae6aa956ec
2025-03-31 04:13:04 -07:00
Pieter De BaetsandFacebook GitHub Bot d4778e31ab Add diagram of Android event lifecycle (#50324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50324

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D71976930

fbshipit-source-id: 5bfaccfd1e1967c691cfbf3f5584d6052c0bec2c
2025-03-31 03:53:58 -07:00
Alex HuntandFacebook GitHub Bot 9fc2a9b9e6 Define "exports" field on main package (#50320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50320

Define `"exports"` field on the main `react-native` package.

**Notes**

Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible).

- Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged )
    - These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)
        - Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged )
- Exports `./package.json` (unchanged )
- TypeScript should:
    - fall back to the `"types"` field (unchanged )
    - OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged )

Changelog:
[General][Breaking] - The `react-native` package now defines package.json `"exports"`.
- While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools.
- Imports from `src/` and `src/private/` directories are disallowed.

Reviewed By: robhogan

Differential Revision: D71968187

fbshipit-source-id: 28ff941692d1822a916457c4fb891e200e3bca61
2025-03-31 02:37:13 -07:00
Sam ZhouandFacebook GitHub Bot 398ac1f716 Deploy 0.266.1 to xplat (#50387)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50387

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D72133412

fbshipit-source-id: f7719284db67537a2c652ea56d9f9050210da7d4
2025-03-30 11:01:43 -07:00
David VaccaandFacebook GitHub Bot 46cd9165c1 Remove @LegacyArchitecture annotation from CxxCallbackImpl class (#50308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50308

CxxCallbackImpl is used in new architecture, in this diff i'm removing LegacyArchitecture annotation from CxxCallbackImpl class

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71820292

fbshipit-source-id: 54748cc23aa7091841a025e41ad43dcaa60923cd
2025-03-28 21:36:54 -07:00
David VaccaandFacebook GitHub Bot a90bc9a766 Mark SingleThreadAsserter as @LegacyArchitecture (#50307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50307

Mark SingleThreadAsserter as LegacyArchitecture

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71820293

fbshipit-source-id: a974ee65b2659028d14f73504f73db2b3ae63f70
2025-03-28 21:36:54 -07:00
Panos VekrisandFacebook GitHub Bot 6d5dde6393 pre-suppress errors for natural_inference.local_primitive_literals=partial in fbsource (#50380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50380

Pre-suppresses errors in xplat/js and arvr/js for phase 1 of Natural Inference for Primitive Literals

See https://fb.workplace.com/groups/floweng/permalink/28092444257044156/

Reviewed By: gkz

Differential Revision: D72088386

fbshipit-source-id: 0827822199cb31a80afbca2a16f74aea4b6c4957
2025-03-28 20:35:51 -07:00
Alex Taylor (alta)andFacebook GitHub Bot 798c3dd842 Deploy 0.266.0 to xplat (#50373)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50373

Changelog: [Internal]

Reviewed By: jbrown215, SamChou19815, panagosg7

Differential Revision: D72061660

fbshipit-source-id: a6862fe0e1f62992b76145006b3f8bc3ad788258
2025-03-28 13:07:06 -07:00
Nick GerlemanandFacebook GitHub Bot e861949ccd Make SafeReleaseJniRef more generic (#50376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50376

This makes a couple of tweaks to `SafeReleaseJniRef` to let it be used in more places:

1. Add a default ctor for null state
2. Bridge `get()` to return raw JNI ref, for use when calling Java functions directly (compared to current use case of hybrid objects)
3. Keep JNI environment attached to thread longer term, instead of repeated attach/detach, to allow use for higher frequency objects.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D71933838

fbshipit-source-id: 622cc70d2d7483475406314abcbcf92d3d2ff227
2025-03-28 12:32:20 -07:00
zhongwuzwandFacebook GitHub Bot 7441127040 Added slash of alpha support using rgb() (#50281)
Summary:
Fixes https://github.com/facebook/react-native/issues/50207

Added slash alpha support like `rgb(255 122 127 / 0.2);`, currently seems we don't support it.

## Changelog:

[GENERAL] [ADDED] - Added slash of alpha support using rgb()

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

Test Plan: `rgb(255 122 127 / 0.2)` can shows correctly.

Reviewed By: cipolleschi

Differential Revision: D72009174

Pulled By: NickGerleman

fbshipit-source-id: f53e550cfdc8f481785a1fb134cd0fab810f8f38
2025-03-28 11:46:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a29d5a2401 Automate the draft release creation (#50346)
Summary:
This PR automates the creation of Draft releases on Github that we have to do manually every time we create a new release.

## Changelog:
[Internal] - Automate the creation of draft releases on Github

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

Test Plan:
GHA - tested as a separate workflow: https://github.com/facebook/react-native/actions/runs/14132774202/job/39597050776?pr=50346

The drafted release is at: https://github.com/facebook/react-native/releases/tag/untagged-e78c788fe9c861ad28ff

Reviewed By: cortinico

Differential Revision: D72061067

Pulled By: cipolleschi

fbshipit-source-id: ddcdae701e272a59c18f58ba431d1eb3b8cd5b36
2025-03-28 10:57:31 -07:00
Ritesh ShuklaandFacebook GitHub Bot af1f1e4fe5 Implementation of URLSearchParams Methods (#50043)
Summary:
This PR addresses the following issues and enhances the functionality of `URLSearchParams`:

1. Extended Initialization Parameters: Previously, only `Record<string, string>` was supported while initialising  URLSearchParams. Now supports `string`, `Record<string, string>`, and `Array<[string, string]>` (aligning with web standards).

2. Added Implementation for `delete()`, `get()`, `getAll()`, `has()`, `sort()`, and `set()`.

3. Addition of Iteration Methods: Added  `keys()`, `values()`, `entries()`, and `forEach()`  methods.  Outputs are identical to web.

4. Bug Fix: Incorrect Initialization from URL. Previously, `URLSearchParams` was initialized with an empty value when accessed via `url.searchParams`, even if the `URL` contained search parameters.

## Changelog:
[General][Added] Implementation for URLSearchParams

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

Test Plan:
Can be tested by below code
```js
  const isHermes = () => !!global.HermesInternal;
  const params = new URLSearchParams("");
  console.log("Is Hermes Enabled:-",isHermes())
  console.log("Values:", Array.from(params.values())); //  ["value1", "value2"]
  console.log("Keys:", Array.from(params.keys())); //  ["key1", "key2"]
  console.log("Entries:", Array.from(params.entries())); //  [["key1", "value1"], ["key2", "value2"]]
  params.forEach((value, key) => {
      console.log(`${key}: ${value}`);
  });
  console.log("Has 'key1'", params.has("key1")); //  true
  console.log("Has 'key3'", params.has("key3")); //  false
  console.log("Get 'key1':", params.get("key1")); //  "value1"
  console.log("Get 'key3':", params.get("key3")); //  null
```

Tested on both hermes and JSC.

Hermes:-
![image](https://github.com/user-attachments/assets/9a467001-693a-4e38-b349-e8d92f961808)

JSC:-
![image](https://github.com/user-attachments/assets/e5f89375-ede4-4ea0-9c62-f98f63c67188)

Reviewed By: cipolleschi

Differential Revision: D71965101

Pulled By: huntie

fbshipit-source-id: c0a0f965ac1ff9577cdc8b3c11f0dd0ced538868
2025-03-28 10:18:59 -07:00
Vitali ZaidmanandFacebook GitHub Bot aadb1f1116 improve error reporting when a debugger for an unknown device is opened (#50330)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50330

Changelog: [Internal]

Make the error reported when a debugger is created for a device that does not exist generic, and not including any specific details to make them easier to aggregate

Reviewed By: hoxyq

Differential Revision: D71979796

fbshipit-source-id: 88badc51043e35ff91d7db81c5966ed5ffce9109
2025-03-28 09:16:49 -07:00
zhongwuzwandFacebook GitHub Bot 44810f7498 Reland: avoid race condition crash in [RCTDataRequestHandler invalidate (#50342)
Summary:
Reland https://github.com/facebook/react-native/commit/6bc5ddea3ea3ca20060ea0181630539931948085, the reason the previous commit has an issue is `weakOp` would always `nil` when captured in block :https://github.com/facebook/react-native/blob/6bc5ddea3ea3ca20060ea0181630539931948085/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm#L52-L54

Now, we can create an `NSBlockOperation` and use `addExecutionBlock` instead. `weakOp` can be captured correctly.

## Changelog:

[IOS] [FIXED] - Reland: avoid race condition crash in [RCTDataRequestHandler invalidate

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D72047232

Pulled By: javache

fbshipit-source-id: c3a5a9fca909f7eac16d78b650c9ea9f5b8e64e4
2025-03-28 09:05:01 -07:00
Tim YungandFacebook GitHub Bot da1bf8d1d1 RN: Ship scheduleAnimatedCleanupInMicrotask (#50341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50341

Ships tge `scheduleAnimatedCleanupInMicrotask` feature flag, which changes the cleanup of `AnimatedProps` to occur in a microtask instead of synchronously during effect cleanup (for unmount) or subsequent mounts (for updates).

Changelog:
[General][Changed] - When an `Animated` component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase.

Reviewed By: javache

Differential Revision: D71942778

fbshipit-source-id: cbe636d5cff84dfeca2f21ead374609c536e91ad
2025-03-28 08:13:39 -07:00
Tim YungandFacebook GitHub Bot e704f8ac2f RN/Metro: Set reactRuntimeTarget on Hermes Parser (#50339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50339

Explicitly sets the default `reactRuntimeTarget` when invoking `require('hermes-parser').parse` so that it'll be easier to find these configurations when upgrading to `'19'`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D72006705

fbshipit-source-id: 4994917152a2a4a767b871d4a36092c0c5391324
2025-03-28 08:02:09 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7f550e2c62 Bump Podfile.lock automatically (#50345)
Summary:
This workflow bumps the Podfile.lock automatically when a new release happens.
I decided not to use a js script in this case because all the commands are bash commands for git or cocoapods, therefore wrapping them all in a JS file would have added little to no benefit and only overheads.

## Changelog:
[Internal] - Bumps podfile.lock automatically

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

Test Plan:
GHA - tested as a separate workflow first, hardcoding the latest RC
https://github.com/facebook/react-native/actions/runs/14127895380/job/39581024861?pr=50345

The flow correctly fails as the Podfile.lock has already been bumped in the release branch.

Reviewed By: fabriziocucci

Differential Revision: D72050261

Pulled By: cipolleschi

fbshipit-source-id: 5c0666e80b037319c365fcf4d52e8e367c3445ea
2025-03-28 07:00:12 -07:00
Ruslan LesiutinandFacebook GitHub Bot 6b72fd2dbf Send Profile in smaller chunk to prevent WebSocket disconnections on android (#50337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50337

# Changelog: [Internal]

This should not have any functional changes, it only prevents the WebSocket from being killed on Android, when we are sending Profile-related Trace Events.

For large traces, a single message could be more than 16MB, because we send a unique string url for every call frame.

Reviewed By: huntie

Differential Revision: D71993748

fbshipit-source-id: f0bfddfb0bb87631e72b573142abdf0d7d87ba48
2025-03-28 05:43:41 -07:00
Rubén NorteandFacebook GitHub Bot c6eb714035 Add basic documentation for MutationObserver (#50335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50335

Changelog: [internal]

This defines the internal technical documentation for the MutationObserver API, as an example of how to define docs using the new strategy and structure.

Reviewed By: javache

Differential Revision: D71890748

fbshipit-source-id: 3ef19c784dff7aea7a2e2d08302640d5eefacc30
2025-03-28 05:28:44 -07:00
Rubén NorteandFacebook GitHub Bot 435d58d215 Align feature flags documentation with new guidelines (#50334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50334

Changelog: [internal]

This updates the documentation for the feature flag system to adhere to the new documentation strategy and structure.

Reviewed By: javache, rshest

Differential Revision: D71889753

fbshipit-source-id: 7ff47cf613ac01012e7329485d2b97e997a97c07
2025-03-28 05:28:44 -07:00
Rubén NorteandFacebook GitHub Bot 6d415d6202 Define root README.md for technical docs (#50333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50333

Changelog: [internal]

This defines a placeholder for the main entrypoint for the React Native internal technical documentation.

Reviewed By: javache, mdvacca, rshest

Differential Revision: D71889755

fbshipit-source-id: 453518a0b7ec2cf433884a87446a7a622418d0b2
2025-03-28 05:28:44 -07:00
Rubén NorteandFacebook GitHub Bot 907185333a Define technical documentation guidance and template (#50332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50332

Changelog: [internal]

This defines a detailed strategy on how to approach internal technical documentation in React Native, including defining a template for subsystem documentation.

Reviewed By: javache, rshest

Differential Revision: D71889754

fbshipit-source-id: 5ce630b2e71f8c7b6aaf027a5833bcbdf0dfa5de
2025-03-28 05:28:44 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2c343d18a7 Generate the changelog automatically (#50323)
Summary:
This change implements the automatic generation of the Changelog in CI while doing a release.
The output is a PR opened by the react-native-bot that can be manipulated and imported by Meta engineers

## Changelog:
[Internal] - Generate the changelog automatically

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

Test Plan:
Tested as a separated workflow first:
<img width="1624" alt="Screenshot 2025-03-27 at 17 44 47" src="https://github.com/user-attachments/assets/b8877cdb-f63b-4d82-b340-54f612ac0cd4" />
this generated the PR:
https://github.com/facebook/react-native/pull/50328

I also added jest tests:
<img width="516" alt="Screenshot 2025-03-27 at 17 45 39" src="https://github.com/user-attachments/assets/7ebbc310-e41e-48fc-997e-21366c7306cf" />

Reviewed By: cortinico

Differential Revision: D71986909

Pulled By: cipolleschi

fbshipit-source-id: 10ffaf342bb0642a6992a107185b6704815b16e3
2025-03-28 04:25:06 -07:00
Pieter De BaetsandFacebook GitHub Bot 6dd5a838c3 Do not crash when event is emitted when ReactInstance is reloaded
Summary:
Regression introduced in D71735505 where I tried to ensure fabricEventEmitter was always non-null. Instead log a soft error when this happens, so we don't drop the event silently.

Changelog: [Android][Fixed] Fixed crash when event is emitted after instance is shutdown

Reviewed By: mdvacca

Differential Revision: D71967092

fbshipit-source-id: 990b6414b41a2709d70a6deae38f5aa043203a20
2025-03-28 04:17:20 -07:00
Dawid MałeckiandFacebook GitHub Bot 6877263003 Align Flow with TS types and export relevant modules (#50322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50322

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D71973327

fbshipit-source-id: ef3a6ad4c0ba6d32bfd1e4cc2ac8e0afac51e9fe
2025-03-28 02:47:22 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 1f8d824e67 Ignore unexisting nativeIDs on accessibilityOrder (#50325)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50325

axOrderViews is an optimization I came up with so that we could find and queue all the views on a single tree traversal. It initializes the array with the size of the accessibilityOrder array and places each view where its nativeID is. If there is no view corresponding to the nativeID then that axOrderViews element will be null. So to fully ignore nativeIDs that don't correspond to any View we can just filter the nulls

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D71977739

fbshipit-source-id: a3f2138eebe06808ce413355df5d9beb2f4ff388
2025-03-27 16:02:55 -07:00
Tim YungandFacebook GitHub Bot 05fe502821 Animated: Manually Manage Connected viewTag (#50230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50230

Currently, `AnimatedProps` invokes `findNodeHandle` to both connect and disconnect the native `AnimatedNode` instances to corresponding `viewTag`s.

Not only is this slow and wasteful (because `findNodeHandle` requires traversing the fiber tree), but it prevents deferring disconnection to after the fiber tree has been unmounted.

Disconnecting after unmount is necessary when the `scheduleAnimatedCleanupInMicrotask` feature flag is enabled, which is necessary to avoid invoking animation completion callbacks in the commit phase that unmounts animated views.

I have verified that `disconnectAnimatedNodeFromView` is needed and handles being called after fibers are unmounted.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71745805

fbshipit-source-id: ce8c2c95d38c4d5adbb79bac3c07b0872211cf51
2025-03-27 15:41:39 -07:00
Sam ZhouandFacebook GitHub Bot 185c809afd Move jest libdef in react-native (#50329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50329

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71986203

fbshipit-source-id: 5ec9d9238da54277faef6af09fed3ff2c9a8ac3f
2025-03-27 14:21:17 -07:00
David VaccaandFacebook GitHub Bot 6f8a27d0c3 Fix AssertionError:com.facebook.react.views.text.ReactTextView.onLayout in legacy architecture (#50336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50336

This diff is fixin an assertion error being triggered in ReactTextView:

`
AssertionError:com.facebook.react.views.text.ReactTextView.onLayout
`

changelog: [internal] internal

Reviewed By: Abbondanzo

Differential Revision: D71990566

fbshipit-source-id: f94b27252ae62472544369ab285d72bc35ec8afc
2025-03-27 13:26:19 -07:00
Alex SteinandFacebook GitHub Bot 24ba7dfe6f Update TS docs for contentInsetAdjustmentBehavior (#50069)
Summary:
Update the TS docs to reflect the default value for `contentInsetAdjustmentBehavior`. The TS docs suggest it will be `automatic` however it's actually `never`.

The default behaviour is correctly specified in the JS docs: https://github.com/facebook/react-native/blob/850760ab6112d1f38a5a9014282ae5186ab814d6/packages/react-native/Libraries/Components/ScrollView/ScrollView.js#L306

It's also documented as the default in the native module: https://github.com/facebook/react-native/blob/main/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm#L34

## Changelog:

[General] [Fixed] - Fix TS docs for `contentInsetAdjustmentBehavior`

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

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

Reviewed By: NickGerleman

Differential Revision: D71491433

Pulled By: lunaleaps

fbshipit-source-id: 08b3f273824be570589095bf0640d7d0b7c93e7d
2025-03-27 12:25:44 -07:00
Joe VilchesandFacebook GitHub Bot d509bb5824 Add experimental prefix to accessibilityOrder (#50311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50311

We are going to initially expose this with the `experimental_` prefix to indicate that it has not been battle tested yet.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D71939365

fbshipit-source-id: e9481b6bd4f253fb97c11fc9d7bf3708ffe79635
2025-03-27 12:07:17 -07:00
Mateo GuzmánandFacebook GitHub Bot 402b93dd0c Internalize classes exposed for TextInputEventsTestCase (#50305)
Summary:
TextInputEventsTestCase is a test that no longer exists; it seems like in the past, some classes/methods were made public to allow this file to use them. We can clean this up by removing its reference from the codebase and internalizing what's not used in OSS.

Internalized classes:
- [ReactContentSizeChangedEvent](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.views.textinput.ReactContentSizeChangedEvent)
- [ReactTextChangedEvent](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.views.textinput.ReactTextChangedEvent)

Both classes above are used only in gutenberg aztec (archived repo)

Internalized methods:
- ReactEditText.maybeSetText (method only used within the class itself)

## Changelog:

[INTERNAL] - Internalize classes exposed for TextInputEventsTestCase

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

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

Reviewed By: Abbondanzo

Differential Revision: D71964410

Pulled By: javache

fbshipit-source-id: fa6476ed12cc71a28498479f3c56eb143a51c6bc
2025-03-27 10:25:10 -07:00
Sam ZhouandFacebook GitHub Bot 11e532de4f Make JestMockFn's TArguments type parameter bound by $ReadOnlyArray<mixed> instead of $ReadOnlyArray<any> (#50326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50326

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71978753

fbshipit-source-id: 52774ca29f6019b5a1382cc76f6c387ea36532e4
2025-03-27 10:23:12 -07:00
Pieter De BaetsandFacebook GitHub Bot 902f82656e Make NativeModuleSoLoader and FabricSoLoader internal (#50316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50316

This should only be used internally

Changelog: [Android][Removed] Remove FabricSoLoader from public API

Reviewed By: Abbondanzo

Differential Revision: D71965740

fbshipit-source-id: 41c2377a9efcaa21378b2ac49af0c1a544589371
2025-03-27 09:40:35 -07:00
Pieter De BaetsandFacebook GitHub Bot f477dbcfde Rename ReactBridge to BridgeSoLoader (#50315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50315

Make it clearer that the only purpose of this class is to manage the soloading of the core bridge so file.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D71965759

fbshipit-source-id: d333f3e768a2359b082d4df279548cbd4b58ec76
2025-03-27 09:40:35 -07:00
Sam ZhouandFacebook GitHub Bot d24db7b0ae Replace $PropertyType with indexed access type in ReactNativeTypes (#32733)
Summary: DiffTrain build for [b59f18601179bb06a2c32a76547fd4929aa1ce9c](https://github.com/facebook/react/commit/b59f18601179bb06a2c32a76547fd4929aa1ce9c)

Reviewed By: jackpope

Differential Revision: D71788054

fbshipit-source-id: 1b1263018e4d9f349c64a5dcc22a86c71da9d7ca
2025-03-27 09:25:15 -07:00
Mateo GuzmánandFacebook GitHub Bot 9ba47b8852 Migrate ReactCxxErrorHandler to Kotlin (#50300)
Summary:
Migrate com.facebook.react.bridge.ReactCxxErrorHandler to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.ReactCxxErrorHandler to Kotlin

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

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

Reviewed By: huntie

Differential Revision: D71964503

Pulled By: javache

fbshipit-source-id: f7cb2de8bdeae52680ef2fd72bd052d67e727a1a
2025-03-27 08:14:53 -07:00
Alex HuntandFacebook GitHub Bot 68741d74ee Delete react-native/android/ directory (#50319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50319

Originally removed in 0.71, leaving a README file as an FYI, which is now removed.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71968498

fbshipit-source-id: 81d380570df346f709a35727090c8e3b8b043183
2025-03-27 07:50:29 -07:00
Kudo ChienandFacebook GitHub Bot 7786805337 fix React-jsitooling build error for use_frameworks build (#50252)
Summary:
to resolve use_frameworks build error. this is an edge case happening only when there's objective-c files import to `React_RCTAppDelegate`. Xcode will have `include of non-modular header inside framework module` error originally. this is the generated umbrella header for jsitooling is incorrect. even the header path are correct, they are not modular headers.

~this pr adds a workaround to import header from outside the module.~ updates: this pr uses a forward declaration to prevent exposing the dependency in umbrella header.

## Changelog:

[IOS] [FIXED] - `JSRuntimeFactoryCAPI.h` build error for  `use_frameworks` build

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

Test Plan:
to reproduce the build error, we can build `USE_FRAMEWORKS=static bundle exec pod install` from rn-tester. we also need to import `React_RCTAppDelegate` from objective-c files. in this case, we can add `import React_RCTAppDelegate;` in rn-tester's main.m

```diff
 --- a/packages/rn-tester/RNTester/main.m
+++ b/packages/rn-tester/RNTester/main.m
@@ -8,6 +8,9 @@
 #import <UIKit/UIKit.h>

 #import "AppDelegate.h"
+@import React_RCTAppDelegate;
+// This also triggers the error
+//#import <React_RCTAppDelegate/React-RCTAppDelegate-umbrella.h>

 int main(int argc, char *argv[])
 {
```

Reviewed By: fabriziocucci

Differential Revision: D71963188

Pulled By: cipolleschi

fbshipit-source-id: 5d566ae5aadb9efc032aacfe32862ea289134f87
2025-03-27 06:39:30 -07:00
Vitali ZaidmanandFacebook GitHub Bot 041014b8de track situations where devices are not reporting a valid debug page (#50314)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50314

Changelog:
[General][Internal] track situations where devices are not reporting a valid debug page

Reviewed By: robhogan

Differential Revision: D71898522

fbshipit-source-id: 5ab83472148c20bd3376915a80834c42b5fff26e
2025-03-27 05:14:12 -07:00
Vitali ZaidmanandFacebook GitHub Bot e52f251284 Add hints about why devices running in the background might not report debuggable pages (#50288)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50288

Add hints about why devices running in the background might not report debuggable pages:
- Taking them from background might be enough
- Force killing them to restart them properly might be needed on Android.

Changelog:
[General][Internal]

Reviewed By: huntie

Differential Revision: D71888615

fbshipit-source-id: dda54b15daa7eebd1bc28a4d327a9b3d006397a4
2025-03-27 05:14:12 -07:00
Dawid MałeckiandFacebook GitHub Bot fc1e73470a Use intersection of AnimatedProps and PassThroughProps to generate correct TS type (#50287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50287

Using keys intersection to iterate over Props and PassThroughProps is not legal in TS. The issue can be mitigated by using intersection of AnimatedProps and PassThroughProps.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D71898246

fbshipit-source-id: 8505989f60622654034e5a775b884945dd9388ca
2025-03-27 04:09:15 -07:00
Arushi KesarwaniandFacebook GitHub Bot 529c24ad92 Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flag (#50186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50186

When `useFabricInterop` is disabled, deleting component descriptors in Component Registry is failing since  https://github.com/facebook/react-native/pull/47321 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in https://github.com/facebook/react-native/pull/42294

Adding back the logic of Fallback component descriptor and error for the same.

**Changelog:**
[General][Fixed] Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flags.

**Facebook:**
Upon deleting component descriptors in [CatalystRegistry](https://www.internalfb.com/code/fbsource/fbandroid/java/com/facebook/fbreact/fabric/components/jni/CatalystRegistry.cpp) D71426627 & [TwilightRegistry](https://www.internalfb.com/code/fbsource/fbandroid/java/com/oculus/twilight/crossapp/reactpackage/fabric/components/jni/TwilightRegistry.cpp) D71206103 the apps weren't erroring or causing crash as expected even upon disabling `useFabricInterop` and this was because D65192744 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in D52663244

Reviewed By: cipolleschi

Differential Revision: D71582553

fbshipit-source-id: 0e87a789e5f0f8acba1958f74f9552dba1fe95c0
2025-03-26 22:14:50 -07:00
Arushi KesarwaniandFacebook GitHub Bot aef1f9ba1d Enable useFabricInterop by default for internal apps (#50295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50295

Enabling `useFabricInterop` by default for internal apps since before D71582553 iOS wasn't using useFabricInterop in it's codebase and old architecture with Interop enabled is harmless.

This is to keep the current behaviour consistent.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D71908601

fbshipit-source-id: 825338db486d8f64c44c2d4c28394d8b789c4195
2025-03-26 22:14:50 -07:00
Arushi KesarwaniandFacebook GitHub Bot 21c858ce3e Enable useFabricInterop for Stable in OSS (#50237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50237

Enabling `useFabricInterop` for Stable in OSS just as done in Android here:

https://github.com/facebook/react-native/blob/26ca802e8462e978282180e6cfd65e644d67bbc7/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt#L15

**Changelog:**
[iOS][Added]  Enabled `useFabricInterop` by default in OSS

Reviewed By: cipolleschi

Differential Revision: D71751048

fbshipit-source-id: 8d3bfb4fde04ba9262d07e349a27aea5cc8c8aaa
2025-03-26 22:14:50 -07:00
Joe VilchesandFacebook GitHub Bot 27b7512d85 Back out "Finish adding accessibilityOrder to ReactNative"
Summary:
This isn't ready yet, we shouldn't expose it.

Original commit changeset: 110ba4c42adc

Original Phabricator Diff: D71420768

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D71938547

fbshipit-source-id: 5026dcc11c151ad16386c1f11a702b46308a0e51
2025-03-26 21:45:27 -07:00
Michael LeeandFacebook GitHub Bot 0b1d0e84ee Add missing folly header (#50299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50299

## Changelog
[General] [Fixed] – Add explicit `folly/dynamic.h` include where it is actually used

## Internal
This symbol is used in the file, so ensure we actually declare it. That way we do not need to depend on some other header to provide the symbol

Reviewed By: NickGerleman

Differential Revision: D71910330

fbshipit-source-id: 4fbb584cafc688bd58f6863370efc1ede3a4c5f1
2025-03-26 21:45:17 -07:00
Alex HuntandFacebook GitHub Bot 4f709afa6d Add type exports to index.js.flow (#50225)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50225

Updates `index.js.flow` to export (what should be) all public types for `react-native`, closely matching the resolved exported types of `types/index.d.ts` (current manual TS defs).

- Note that this first pass doesn't have to be exhaustive (not yet load bearing) — however, I've done a best-effort scan, which passes our current `__typetests__` fixtures.

**Approach: Explicit type imports in `index.js.flow`**

We have a number of options for how we organise and re-export values and types from the new index file — for now, we're opting for explicitly exporting each symbol here.

- While this clutters the index file somewhat, it also provides a single scannable source of truth — without introducing / altering each contributing module's type exports (we might want to do this eventually, but we're far from having strong organisation denoting the public API boundary). It's self-documenting that the index file contains all root exports by name.
- At the same time, we currently have some exceptions that use `export [type] *` to line up with TypeScript `namespace`s. We aim to review and update these within this release cycle, to enforce the above system.

Changelog: [Internal] - The `react-native` package now exports all public types in Flow (fbsource)

Reviewed By: rubennorte

Differential Revision: D71741575

fbshipit-source-id: 770e2b490e494ee195f4240358fec39f69145a94
2025-03-26 20:46:41 -07:00
Eric RozellandFacebook GitHub Bot c12fdc0fcf Back out "Allow listeners in EventEmitter" (#50298)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50298

Given EventDispatcher already synchronously calls EventListener, this convenience method for listening to events directly from EventEmitter was short-sighted. We will revisit how to handle JS vs. UI dispatched events for NativeAnimated purposes in future diffs. For now, this reverts https://github.com/facebook/react-native/pull/49998

This change is not being marked as breaking since the change that added this API has not yet been shipped to stable.

## Changelog

[General][Removed] - EventEmitter addListener and removeListener APIs

Reviewed By: zeyap

Differential Revision: D71909828

fbshipit-source-id: 9246de5c7a33368d182369a2d6eb57aa960b415b
2025-03-26 20:42:10 -07:00
Mateo GuzmánandFacebook GitHub Bot d49ec1d79c Migrate CxxModuleWrapperBase to Kotlin (#50251)
Summary:
Migrate com.facebook.react.bridge.CxxModuleWrapperBase to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.CxxModuleWrapperBase to Kotlin

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

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

Reviewed By: alanleedev

Differential Revision: D71830747

Pulled By: arushikesarwani94

fbshipit-source-id: 174dff86f6d1ad8228491c15e226986dad2edb1b
2025-03-26 20:35:13 -07:00
Tim YungandFacebook GitHub Bot 4a7946bef5 Animated: Pass Target into {dis,}connectAnimatedView (#50229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50229

Makes a few internal improvements to `AnimatedProps`:

- Change `__connectAnimatedView` and `__disconnectAnimatedView` to be private methods, so that we can confidently change their type signatures.
- Pass `#targetInstance` into those methods, so that the responsibility of verifying `#targetInstance`'s non-nullability is hoisted to the call sites.

There should be no observable runtime behavior change.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71740601

fbshipit-source-id: 6abc6faf63f3c3274fd2d92baf0958d2471d4a63
2025-03-26 20:05:28 -07:00
Tim YungandFacebook GitHub Bot c9ff9570ab Animated: Type #animatedView in AnimatedProps (#50228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50228

Properly annotate the type of `#animatedView` in `AnimatedProps` and rename it to `#targetInstance`.

Otherwise, no runtime behavior change.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71739606

fbshipit-source-id: c97e4bd323ad9b1c08fd4976f13b6b20e8fe4793
2025-03-26 20:05:28 -07:00
Danny SuandFacebook GitHub Bot f3a5d1957a Don't throw again in JsErrorHandler
Summary:
JsErrorHandler throwing again masks what the real problem is.

Changelog: [Internal]

Reviewed By: tmikov

Differential Revision: D71920942

fbshipit-source-id: 1697f6f4c779d5c896df1be8e696a185f1c2c828
2025-03-26 19:35:02 -07:00
Nick GerlemanandFacebook GitHub Bot 177b8b4c40 Move CornerRadii resolution logic out of LengthPercentage (#50306)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50306

`LengthPercentage` is a class representing a length, or a percentage of a reference length.

Having a function on it, specific to resolving asymetrical corner radius is the wrong organization. Let's move it to where it belongs.

Very technically breaking, but I would be shocked if anyone is using this API.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D71922893

fbshipit-source-id: 4660c861e21c1dffae15d3f463c135a494124e2a
2025-03-26 19:29:24 -07:00
Tim YungandFacebook GitHub Bot a8a4ab10d0 RN: Ship disableInteractionManager (#50233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50233

Ships the `disableInteractionManager` feature flag, which disables `InteractionManager` and replaces its scheduler with `setImmediate`.

Changelog:
[General][Changed] - InteractionManager is deprecated and will be removed in a future release. Its behavior has been changed to be the same as `setImmediate`, and callers should migrate away from it.

Reviewed By: javache

Differential Revision: D71766877

fbshipit-source-id: 36710fdf17c92f8cdee141e43a3c4d0bd9ef0e81
2025-03-26 17:59:40 -07:00
Alex HuntandFacebook GitHub Bot 116437e46e Support CDP Response.statusText (#50174)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50174

Add `httpReasonPhrase` util and use to populate CDP `Response.statusText` value.

AFAIK, neither platform, and none of our dependencies, reliably provide this mapping — so this is implemented directly.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D71470037

fbshipit-source-id: f3f6437d0fb3227858b5910a71170e3a634aa962
2025-03-26 15:40:42 -07:00
Alex HuntandFacebook GitHub Bot 4a055e4812 Configure prod version of NetworkReporter (#50286)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50286

Configures a thinner version of `NetworkReporter.cpp` (the entry point to `jsinspector_network`) in production builds (i.e. dev or profiling build, as gated by `REACT_NATIVE_DEBUGGER_ENABLED`).

Even though enabling the CDP Network domain isn't reachable in prod, this will reduce the compiled code footprint of `jsinspector_network`.

We also don't need `glog` here any more — remove dep.

**Implementation notes**

The reason to gate the logic within each method, with inline `#ifdefs`, rather than swapping between complete implementation files, is because each `report*` function will also have load-bearing logic (for the Performance API) in all prod builds. Therefore, this will reduce duplication (and file switching) down the line — and can be understood at a glance with this pattern.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71636694

fbshipit-source-id: 50e7c008bb6fd128fe1248d767832b36ccb0219b
2025-03-26 15:40:42 -07:00
Alex HuntandFacebook GitHub Bot c91cafae32 Refactor NetworkReporter internals (#50173)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50173

Refactors the internals of `NetworkReporter` (and the `jsinspector_network` library) to better organise concepts before we scale to more Network CDP events.

- Introduces `cdp::network` structs modelling CDP `Network` domain events and data types.
- Moves implementation details in converting input data objects to CDP types into `CdpNetwork.cpp` and `HttpUtils.cpp`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D71470039

fbshipit-source-id: 0c04ffb40efbbb6d6d9782959f5adb33c9097ccb
2025-03-26 15:40:42 -07:00
Ramanpreet NaraandFacebook GitHub Bot 7d739ae89c Migrate modules off lazy main queue setup
Summary:
These modules don't actually use ui things in their setup. So, they don't need to be set up on the main queue.

Changelog: [Internal]

Reviewed By: lyahdav

Differential Revision: D71849447

fbshipit-source-id: d9d6ee043cac112731c27ff920e857fccdd54bc0
2025-03-26 15:16:45 -07:00
Ramanpreet NaraandFacebook GitHub Bot b432e4cb16 Make Appearance use main queue setup (#50110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50110

## Rationale
Rendering can now include main -> js sync calls.

If we allow js -> main sync calls during rendering, react native can deadlock.

So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D71347452

fbshipit-source-id: 894f21c703981c633fc0966e1edd647251d0fe2c
2025-03-26 15:16:45 -07:00
Tim YungandFacebook GitHub Bot 6346689c3d RN: Remove eslint-config-prettier Overrides (#50302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50302

Changes `eslint-config-react-native` to stop overriding rules that are disabled by `eslint-config-prettier`, which disables rules that conflict with Prettier formatting.

This also adds a Jest unit test to enforce that this invariant even as the configs change.

Changelog:
[General][Changed] - `eslint-config-react-native` now respects rules disabled by `eslint-config-prettier`.

Reviewed By: kassens

Differential Revision: D71922014

fbshipit-source-id: 55ba46e880d6129a417e864ab2fbb5704c57997b
2025-03-26 15:10:22 -07:00
zhongwuzwandFacebook GitHub Bot 62536db8c7 Fabric: Fixes color hash type to prevent bits truncation (#50285)
Summary:
I made a mistake before, it seems we should use std::size_t to prevent bits truncation.

## Changelog:

[IOS] [FIXED] - Fabric: Fixes color hash type to prevent bits truncation

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

Test Plan: N/A

Reviewed By: javache

Differential Revision: D71895413

Pulled By: cipolleschi

fbshipit-source-id: 26cc036bee851902e11abfa8ed5c5c8222421b09
2025-03-26 14:13:19 -07:00
Gabriel DonadelandFacebook GitHub Bot 0f4e93987e Update Changelog for 0.76.8 (#50296)
Summary:
Update changelog for the 0.76.8 release:

[All commits: https://github.com/facebook/react-native/compare/v0.77.1...0.77-stable](https://github.com/facebook/react-native/compare/v0.76.7...v0.76.8)

## Changelog:

[INTERNAL] [ADDED] - Changelog for 0.76.8

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

Test Plan: N/A

Reviewed By: shwanton

Differential Revision: D71911064

Pulled By: arushikesarwani94

fbshipit-source-id: 515f48d0cf6525c56024e5791b45a3c1f8a12186
2025-03-26 13:48:14 -07:00
Alex HuntandFacebook GitHub Bot 1c04cf5ca0 Minimize operations in RCTInspectorNetworkReporter in prod (#50242)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50242

Similar to D71636694, adds conditional compile to `RCTInspectorNetworkReporter.mm` to minimize code size and operations performed in production builds.

Specifically:

- Expensive copy of `httpBody` is eliminated.
- Other optional fields that are only mapped when CDP support is enabled are also omitted.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D71637716

fbshipit-source-id: 6c7688b1ac82d2b1047b42a812834a7dfb37cd0f
2025-03-26 12:25:00 -07:00
Alex HuntandFacebook GitHub Bot 793094fc0f Implement core Network CDP events on iOS (#50142)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50142

This is a first pass at integrating `NetworkReporter` in our networking stack on iOS (`RCTNetworking.mm`).

**Implemented events**

Wires up minimal events sufficient to populate the Chrome DevTools Network panel:

- `Network.requestWillBeSent`
- `Network.responseReceived`
- `Network.loadingFinished`

**Other notes**

`RCTNetworking` is used (tentatively) as the integration point since it:

- Is the default implementation for the network stack on iOS.
    - Should allow us to pair with originating JS call site down the line.
- Intercepts Blob requests (at least `RCTImageLoader`).
- Sits outside the user-configurable `RCTNetworkingResponseHandler` and `RCTNetworkingRequestHandler` concepts.
- Is where network events are currently sent to JavaScript (`sendEventWithName`).

NOTE: Reminder: `NetworkReporter` is currently a no-op without the `fuseboxNetworkInspectionEnabled` experiment set.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D71470038

fbshipit-source-id: 069d77473c333a98f796b3dffa670a39b3016b2b
2025-03-26 12:25:00 -07:00
Rubén NorteandFacebook GitHub Bot bcce235841 Add basic tests for Event Timing API (#50289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50289

Changelog: [internal]

Adding basic Fantom tests for the new Event Timing API.

Reviewed By: huntie

Differential Revision: D71734778

fbshipit-source-id: b5da3162fade64eadede72346af50df68b4facd9
2025-03-26 11:09:42 -07:00
Rubén NorteandFacebook GitHub Bot 499eef1fc8 Rename LongTask as LongTasks in test (#50290)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50290

Changelog: [internal]

Small rename as the official name of the API is LongTasks.

Reviewed By: yungsters

Differential Revision: D71734777

fbshipit-source-id: fac085e3b0d304f7d05087143c15d32cf2b0971b
2025-03-26 11:09:42 -07:00
Joe VilchesandFacebook GitHub Bot 33bd90e07c Improve accessibilityOrder algo on iOS (#50265)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50265

This is a fun one!

"Improvements" consist of
* Performance is better now. Previously we did a tree walk for each ID in the array, now its just one :)
* Properly handles coopting (more on that below)

**Performance**
The previous implementation naively walked the tree until it found the right nativeId for each nativeId in the prop. This new algo just does a single tree walk and collects the views that have the right nativeIds as we are doing that walk.

**Coopting**
Our iOS code implements a form of accessibility coopting, where an element can "speak for" a descendant. This happens when some parent element does not have an accessibility label but a descendant does. We look at the subtree and grab every node that has a label and lift it up to the aforementioned element without a label. This enables some nice a11y features like wrapping `Text` in a `View` and letting the `View` just read all the `Text` inside (imagine a button with a label, you would only want to focus the button and just read the text instead of the text itself).

This feature is nice but it becomes buggy when we introduce `accessibilityOrder`. Previously, there was no way to access nested elements on iOS, the platform prohibits this. However, you can get around this by using `accessibilityElements`, which our `accessibilityOrder` prop maps to. So you could define the order as `['parent', 'child']` and access both elements just fine. However, if that `parent` is a `View` that coopts `Text`, we have some issues. The `View` will read the `Text` but then when the user swipes we focus the `Text` and read it again!

To get around this we check up the superview chain in RCTParagraphViewComponentView looking for Views that might coopt us and a cooresponding accessibilityElements with said candidates. If there is such a View we do not announce ourselves. Performance is iffy here, we need to iterate up to root for all text focusing, but this should be fairly fast for all intents and purposes and I have not noticed any lag when changing focus ordering.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D71562476

fbshipit-source-id: 31fd935df0764459403464bd645aae2e664c69cb
2025-03-26 11:08:36 -07:00
Alex HuntandFacebook GitHub Bot 701859b397 Deprecate *EventData types in favour of *Event (#50215)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50215

Backwards compatible updates to `CoreEventTypes`, `Image`, `Switch`, `TextInput` to align types and reduce root exports.

The effects of this change can be seen in `packages/react-native/types/__typetests__/index.tsx` (smoke test file against current manual TypeScript definitions).

Under Flow, exports on each `*EventData` type are directly removed (unreferenced).

Changelog:
[General][Deprecated] - Deprecate `*EventData` types on `Image`, `Switch`, `TextInput` components. These can be substituted for `*Event`, e.g. `NativeSyntheticEvent<ImageLoadEventData>` becomes `ImageLoadEvent`.

Reviewed By: NickGerleman

Differential Revision: D71734361

fbshipit-source-id: 287c775e840319242984d248169c267abf8f032b
2025-03-26 09:55:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 4b82896390 Automate checking for artifacts on Maven (#50275)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50275

This change adds a check to automate a step in the release process: https://github.com/reactwg/react-native-releases/blob/main/docs/guide-release-process.md#verify-assets-have-been-uploaded-to-maven

The script will poll maven for 90 minutes and return when the artifacts are available. If, after 90 minutes, artifacts are not available, it exits with code 1 that should fail the Release workflow. The Release Crew should have a look at what's happened.

## Changelog:
[Internal] - Automate the check for artifacts being on Maven

Reviewed By: fabriziocucci

Differential Revision: D71825014

fbshipit-source-id: 8879bf9c8fc4519e86b55ad8f9bd3ecf3f8ecfb7
2025-03-26 08:26:01 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 515976cb4a Have react-hermes and React-renderercss define modules (#50283)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50283

In OSS we have some libraries written in Swift, like Flashlist, that depends on these pods.

However, if a pod is not configured to define modules, those pods cannot be imported by Swift. Therefore, the libraries above will failed to be installed in a project.

This change adds the defines_modules directive to those pods and make the library work again.

This fixes https://github.com/facebook/react-native/issues/50246

## Changelog
[Internal] - Make React-hermes and React-renderercss defines modules

Reviewed By: fabriziocucci

Differential Revision: D71892679

fbshipit-source-id: b03b65986fbdbe781b616f31dfb6bceb38b8b3b7
2025-03-26 08:25:25 -07:00
Tim YungandFacebook GitHub Bot 2abe623d9f Animated: Omit allowlist in avoidStateUpdateInAnimatedPropsMemo Experiment (#50232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50232

While reviewing the `avoidStateUpdateInAnimatedPropsMemo` experiment, I noticed that the control and test groups were invoking `areCompositeKeysEqual` differently:

- Test group was passing in `allowlist`.
- Control group was not passing in `allowlist`.

Passing it in is technically more correct, but let's restore the control group behavior for now to isolate the tested changes.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71746745

fbshipit-source-id: aa34db0532ef53ead08bbd632aab0994b31b9340
2025-03-26 08:07:53 -07:00
Saad NajmiandFacebook GitHub Bot 4789744164 chore: add jest-config to monorepo dependencies (#50280)
Summary:
The React Native monorepo depends on `jest-config` in `jest.config.js` but does not specify it as a dependency. This means we got it as a phantom / transitive dependency. In React Native macOS, I am testing using Yarn 4 with pnpm layout to protect against such dependencies (See https://github.com/microsoft/react-native-macos/pull/2366). The simplest way to fix this is to just declare it as a dependency.

## Changelog:

[INTERNAL] [FIXED] - Add jest-config as a dependency

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

Test Plan: This change should be a no-op in React Native, we already had the package in our lock.

Reviewed By: yungsters, huntie

Differential Revision: D71891841

Pulled By: robhogan

fbshipit-source-id: 5b4720e9e09e25b2f1eebb80675bfe4f3a48e2dc
2025-03-26 08:02:00 -07:00
Mateo GuzmánandFacebook GitHub Bot 8b449c2694 Migrate GuardedRunnable to Kotlin (#50259)
Summary:
Migrate com.facebook.react.bridge.GuardedRunnable to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.GuardedRunnable to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71846384

Pulled By: Abbondanzo

fbshipit-source-id: b465ce107f9a32e273442644ef6079347fe7e401
2025-03-26 07:30:22 -07:00
Mateo GuzmánandFacebook GitHub Bot c372dc1ec8 Migrate GuardedAsyncTask to Kotlin (#50254)
Summary:
Migrate com.facebook.react.bridge.GuardedAsyncTask to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.GuardedAsyncTask to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71846375

Pulled By: Abbondanzo

fbshipit-source-id: e4befe99333512312d1930b09b1edd9501a2f80a
2025-03-26 07:25:09 -07:00
Mateo GuzmánandFacebook GitHub Bot 9a5a67912b Migrate CallbackImpl to Kotlin (#50263)
Summary:
Migrate com.facebook.react.bridge.CallbackImpl to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.CallbackImpl to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71855490

Pulled By: Abbondanzo

fbshipit-source-id: 72f15083010601b56f415493d58fc557f3ab35ef
2025-03-26 07:20:15 -07:00
Vitali ZaidmanandFacebook GitHub Bot 2bc0fe621d Update debugger-frontend from 46feed4...26e19a4 (#50277)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50277

Changelog: [Internal] - Update `react-native/debugger-frontend` from 46feed4...26e19a4

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/46feed41c15bcaafa086c1397562fa2af7cc503b...26e19a44bd2a55668effe4fdf7c0fef42b1944b7).

Reviewed By: hoxyq

Differential Revision: D71888932

fbshipit-source-id: e968d2a4bbb325354bc9ab265f0e8c1d48eef7d4
2025-03-26 05:50:22 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 8184ed634e Add OnHierarchyChangeListener to accessibilityOrder parent to track changes in hierarchy (#50261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50261

Since now we have the optimization of only running the custom accessibility order when we define the tree as dirty we need to add a hierarchy change listener on all ViewGroups within the parent to notify accessibility services of potential changes in hierarchy and so mark the subtree as dirty.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D71821636

fbshipit-source-id: 25649efa1679024a205e94c340511dc58783d575
2025-03-26 05:42:16 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 8cf4d5b531 Finish adding accessibilityOrder to ReactNative (#50255)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50255

Few details where missing for fully enabling accessibilityOrder on ReactNative

Changelog: [General][Added] Add accessibilityOrder to iOS and Android

Reviewed By: joevilches

Differential Revision: D71420768

fbshipit-source-id: 110ba4c42adc193b34e200aab5dd059badbc2e62
2025-03-26 05:42:16 -07:00
Rob HoganandFacebook GitHub Bot f60e2cad62 Update Changelog for 0.77.2 (#50239)
Summary:
Update changelog for the 0.77.2 release:

All commits: https://github.com/facebook/react-native/compare/v0.77.1...0.77-stable

## Changelog:

[INTERNAL] [ADDED] - Changelog for 0.77.2

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

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D71815842

Pulled By: robhogan

fbshipit-source-id: c5040dd0673aa1c7d61e1a03daa8ba64c4f9aeec
2025-03-26 04:37:47 -07:00
Dawid MałeckiandFacebook GitHub Bot 0a58bb569b Align flattenStyle to accept animated styles (#50250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50250

Aligned flattenStyle to also accept Animated styles.

Changelog:
[Internal] - Aligned flattenStyle to accept animated styles.

Reviewed By: huntie

Differential Revision: D71814372

fbshipit-source-id: 3bfb5f1dcd8e6dd3d38dca547b69a3c43b87b356
2025-03-26 03:02:52 -07:00
Dawid MałeckiandFacebook GitHub Bot 5ba3aacaf7 Remove StrictAnimatedComponentType from createAnimatedComponent (#50240)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50240

StrictAnimatedComponentType was introduced to incrementally adopt sctricter animated types at the time. After aligning AnimatedProps it is no longer necessary and can be swapped with AnimatedProps.

Changelog:
[Internal] - Removed StrictAnimatedComponentType from createAnimatedComponent.

Reviewed By: huntie

Differential Revision: D71804845

fbshipit-source-id: e8adbfde1a48fd3f4fc94f4cc0938bd64384c418
2025-03-26 01:22:32 -07:00
Vitali ZaidmanandFacebook GitHub Bot 590426da14 don't strip IWebSocket or it's members in release builds
Summary:
Changelog:
[General][Internal]

Reviewed By: Abbondanzo

Differential Revision: D71815485

fbshipit-source-id: cba6d4907ccdd366b31edfb74ca1f6001f970739
2025-03-25 23:56:38 -07:00
Sam ZhouandFacebook GitHub Bot 171c6808b9 Align react-native jest definition with internal jest definition (#50272)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50272

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71849789

fbshipit-source-id: 5b600c4371a21a28272538022234e2cc01e8d92b
2025-03-25 19:13:58 -07:00
Zeya PengandFacebook GitHub Bot e7b3424cce Add feature flag useCxxNativeAnimated (#50038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50038

Changelog: [Internal]

Creating a new feature flag to gate change for integrating c++ native animated

Reviewed By: rozele

Differential Revision: D71216797

fbshipit-source-id: 9669628a0789701ab6d447a8561027f3a335ef4f
2025-03-25 18:51:52 -07:00
Sam ZhouandFacebook GitHub Bot a70fe45370 Shim $PropertyType in react-native for now (#50271)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50271

In the next version of Flow, support for `$PropertyType` will be removed in favor of indexed access types. The final 2 usages in react-native is in `ReactNativeTypes`, which is synced from upstream react. Sync of https://github.com/facebook/react/pull/32733 is currently blocked by test failures, so I will add the temporary shim to unblock releases.

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71849353

fbshipit-source-id: d4787fe17ae52aa50d54f9fb7fb8b14c149aa1e6
2025-03-25 18:08:26 -07:00
Rubén NorteandFacebook GitHub Bot 7d8ac6639f Move ensureInstance and isUnreachable to tests utilities directory (#50260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50260

Changelog: [internal]

Created new directory `react-native/src/private/__tests__/utilities` and moved `ensureInstance` and `isUnreachable` to it.

Reviewed By: yungsters

Differential Revision: D71826787

fbshipit-source-id: 50a50a54ab928c9060282a9f2256ad97dd856ba4
2025-03-25 17:09:18 -07:00
Rubén NorteandFacebook GitHub Bot 3331218b84 Fix several tests and grouping in Fantom-itest (#50258)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50258

Changelog: [internal]

Minor reordering of tests in `Fantom-itest`, fix of describe block for  `enqueueScrollEvent` and fix incorrect usage of `enqueueScrollEvent` instead of `scrollTo` in `scrollTo` tests.

Reviewed By: yungsters

Differential Revision: D71820977

fbshipit-source-id: 07637e2d18cde96c78c83285ba28201260e42f3c
2025-03-25 17:09:18 -07:00
Rubén NorteandFacebook GitHub Bot b12ab7a3d4 Enforce that WeakRef.deref() is always called within the event loop (#50257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50257

Changelog: [internal]

## Context

We have some tests that make sure certain objects are deallocated/released at the right times, but those are generally hard to get right. The main reason is that WeakRefs semantics are tied to the tasks and microtasks in JS, but we handle them both inside and outside the Event Loop in Fantom tests.

This leads to some surprising behavior where things we expect to have been deallocated weren't because of some innocent looking code.

## Changes

This introduces a safety mechanism in Fantom to enforce that WeakRefs are always dereferenced inside the Event Loop, by patching the method in `WeakRef` and checking if we're in the Event Loop using Fantom APIs.

It also updates the existing test using WeakRefs to fix the new errors thrown by this patch, and to serve as a "good example" on how to use WeakRefs to do memory testing.

Reviewed By: yungsters

Differential Revision: D71815397

fbshipit-source-id: 8faab1898d9112ec365b41867179abb8b251e337
2025-03-25 17:09:18 -07:00
Pieter De BaetsandFacebook GitHub Bot d1c0f57073 Simplify event emitter layering (#50219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50219

* Make FabricEventDispatcher private, we already have a public EventDispatcher interface
* Rename ReactEventEmitter to EventEmitterImpl, to make it clearer it aligned with EventDispatcherImpl
* Update docs to make it clearer what's part of the old architecture

Changelog:

[Android][Removed] Removed FabricEventDispatcher from public Android API
[Android][Removed] Removed (un)registerEventEmitter from EventDispatcher interface

Reviewed By: lenaic

Differential Revision: D71735505

fbshipit-source-id: f0b56298cc38d08101ccdcdf0bda5487204e7bdc
2025-03-25 14:53:36 -07:00
Mateo GuzmánandFacebook GitHub Bot 175c969148 Migrate ReactRawTextShadowNode to Kotlin (#50234)
Summary:
Migrate com.facebook.react.views.text.ReactRawTextShadowNode to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.text.ReactRawTextShadowNode to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D71803869

Pulled By: javache

fbshipit-source-id: dba9eea7aa8453b9372cbeb54a7f86b35fd30905
2025-03-25 14:46:06 -07:00
Sam ZhouandFacebook GitHub Bot cbd2ee55ef Eliminate $PropertyType and $ElementType in react-native (#50262)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50262

Prepare for their removal in Flow

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71823860

fbshipit-source-id: e1e18424ae731cd323999316a7f3a5d42f4b5b91
2025-03-25 14:00:17 -07:00
Eric RozellandFacebook GitHub Bot c920b7f54a Do not register RCTSurfacePresenterObserver for animatedShouldSignalBatch (#50247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50247

Rather than nooping the RCTSurfacePresenterObserver in RCTNativeAnimatedTurboModule, we should just not register the observer when using ReactNativeFeatureFlags::animatedShouldSignalBatch.

## Changelog

[Internal]

Reviewed By: shwanton

Differential Revision: D71735004

fbshipit-source-id: 5176497197314a9b07fc9bd77828f7a2af2650ea
2025-03-25 13:19:36 -07:00
Joe VilchesandFacebook GitHub Bot bffb414291 Allow link role to be announced if its set on entire text in nested text (#50236)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50236

If you do something like

```
<Text>
  <Text accessibilityRole="link">
    I am a link!
  </Text>
</Text>
```

we do not announce "link".

We skip any sort of spans on the entire text on iOS, which I feel like is not ideal. This case would be common enough, and users may not have access to the top level text component.

Note Android correctly handles this already.

Changelog: [iOS] [Fixed] - Correctly announce "link" on nested text if its the entire text element

Reviewed By: javache

Differential Revision: D71770798

fbshipit-source-id: 4a0781a95cb27cf244d6d2b1d1df8a0451964301
2025-03-25 12:56:47 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 0437c4071b Fix CQS signal. Id] 22447575 -- modernize-use-nullptr in xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/jni (#50256)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50256

Reviewed By: dtolnay

Differential Revision: D71798310

fbshipit-source-id: 233822abac4288ab5871718671936bbbd6d571ff
2025-03-25 12:34:59 -07:00
Alex HuntandFacebook GitHub Bot a0bc9a84d9 Use UIDevice systemName for inspector metadata (#50245)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50245

Follows D69867335, but uses the system `[[UIDevice currentDevice] systemName]` API to get the case sensitive OS name (as opposed to the `RCTPlatformName` concept, which is lowercase "ios").

Ultimately, this value is displayed as a user facing label in the debugger.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D71809427

fbshipit-source-id: 3f62bba94df16329c934a7671bcaa489c6797cb6
2025-03-25 11:55:17 -07:00
Jakub PiaseckiandFacebook GitHub Bot b2d88d33b7 Align SectionList types with OSS (#50074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50074

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71318882

fbshipit-source-id: ac26820bd4a9200c4156b703dce036535f677025
2025-03-25 11:03:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot e27c97bc56 Update StyleSheet and Platform exports (#50169)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50169

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71548325

fbshipit-source-id: b0c6cc0dc3b15757f0630d7ef8398161a46c51a8
2025-03-25 10:28:13 -07:00
Dawid MałeckiandFacebook GitHub Bot 3bb86b0ecf Change Animated re-export to generate correct namespace in TS (#50222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50222

The flow-api-translator will generate

```ts
export * as default from './AnimatedExports';
```

in TS which preserves the namespace. Previous import, export translated to:

```ts
declare const $$EXPORT_DEFAULT_DECLARATION$$: typeof Animated;
declare type $$EXPORT_DEFAULT_DECLARATION$$ =
  typeof $$EXPORT_DEFAULT_DECLARATION$$;
export default $$EXPORT_DEFAULT_DECLARATION$$;
```

which dropped the `Animated` namespace.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D71737199

fbshipit-source-id: a46a7ddddd023fa831cd4bb50f17a0641f328066
2025-03-25 03:47:30 -07:00
Dawid MałeckiandFacebook GitHub Bot 9c5cf4e9c4 Align AnimateProps to match TS types (#50214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50214

This diff is a second step toward the TS AnimatedProps alignment. In this change the rest of the extended types and recursions in `WithAnimatedValue` are applied.

Changelog:
[Internal] - Aligned AnimateProps to match TS types.

Reviewed By: huntie

Differential Revision: D71623036

fbshipit-source-id: d4777e25c3bf3119608938ee4cd246cdc4c4f7ee
2025-03-25 03:47:30 -07:00
Dawid MałeckiandFacebook GitHub Bot eb2d9c1ac0 Check for Builtin and Nullable types in WithAnimatedValue to align closer to TS types (#50195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50195

In Flow, all AnimatedProps properties are set to `any` and misaligned with Typescript definitions. This diff is a first step toward the TS AnimatedProps. The problem can be broken down into a few parts, at each point more types will be extended in WithAnimatedValue and the rest will be set to `any`. This approach enables smoother migration and validation.

Changelog:
[Internal] - Check for Builtin and Nullable types in WithAnimatedValue to align closer to TS types.

Reviewed By: huntie

Differential Revision: D71551006

fbshipit-source-id: 9316227f4ba32bdaa5be8097483a03ae19bf516f
2025-03-25 03:47:30 -07:00
Pieter De BaetsandFacebook GitHub Bot e104532357 Cleanup fixDifferentiatorEmittingUpdatesWithWrongParentTag (#50221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50221

This was already rolled out by default previously, but we wanted to complete further testing internally before cleaning up the flag.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D71735311

fbshipit-source-id: b9d32787081fbe3d7fb740067d3709624028fa23
2025-03-24 20:25:19 -07:00
Sam ZhouandFacebook GitHub Bot be7abbcf3f Minor fixes for jest libdef (#50235)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50235

- Remove duplicate definition for `toBeCalledWith` and `lastCalledWith`.
- Replace `typeof undefined` with `void`
- Make some Array types readonly where we can.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71762238

fbshipit-source-id: 5c20bd7e941a8c36084e291f23cd6caa27f07eb9
2025-03-24 15:32:25 -07:00
Sam ZhouandFacebook GitHub Bot 26ca802e84 Remove __REACT_DEVTOOLS_GLOBAL_HOOK__ from react-native libdef (#50223)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50223

This is an implementation detail of React and better not make it leak everywhere. It's not used quite often even in react-native codebase, so it's better to just suppress the error on each call site. Currently it's typed as any, so there is not much type safety lost anyways.

Changelog: [Internal]

Reviewed By: alexmckenley

Differential Revision: D71687426

fbshipit-source-id: 7373bcd9bedcfcb95a10fa02e6a04399ccab91f0
2025-03-24 12:31:58 -07:00
Yurii NakonechnyiandFacebook GitHub Bot 2cb49eeaa3 LayoutData - added explicit default fields values initialization (#50227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50227

Explicit defaults add 'strictness' and take the guesswork out of what's going on in places like this:

https://github.com/facebook/yoga/blob/6455a848a76f433bdb48b2640b7f4644774c76fd/yoga/algorithm/CalculateLayout.cpp#L2345

Changelog: [Internal]

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

Reviewed By: javache

Differential Revision: D71687310

Pulled By: NickGerleman

fbshipit-source-id: f11d18aa68ce7ccd17fb1d5af0e729e8c0711cf9
2025-03-24 12:23:46 -07:00
Pieter De BaetsandFacebook GitHub Bot 7056d20984 Remove deprecated RCTModernEventEmitter.receiveTouches (#50216)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50216

Call TouchesHelper directly from TouchEvent and remove the need for `RCTModernEventEmitter.receiveTouches`. This enables `Animated.Event` to process these events too, since they are now being delivered just like any other event.

Changelog:

[Android][Fixed] Enables Animated.Event to be used with onTouchMove in the new architecture.
[Android][Removed] Removed deprecated EventDispatcher#receiveTouches

Reviewed By: Abbondanzo

Differential Revision: D71114177

fbshipit-source-id: 61ca43ef5334b5514c4980a05b61b674d9a52c5b
2025-03-24 11:55:13 -07:00
Phillip PanandFacebook GitHub Bot 90fce6398f weakly hold key window for KVO frame listener (#50231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50231

Changelog: [Internal]

RCTDeviceInfo uses KVO to listen to frame changes in the application's keyWindow. On initialization, it reads the global keyWindow and adds itself as a listener. When RCTDeviceInfo is cleaned up, it reads the global keyWindow again, and removes itself as an observer.

However, this makes an assumption that the keyWindow is always the same. This is not always true - for example, when a UIAlert is presented, the OS creates a new temporary keyWindow to host the alert in order to make sure it is the first responder. If the cleanup is called then, the app will crash because there is no RCTDeviceInfo observing it. Another example is the LogBox, which also temporarily creates a new keyWindow.

The fix is simple, we can capture a reference to the application's keyWindow on initialization, but make sure it is weakly held as the keyWindow is usually managed by iOS. Then, when we remove the listener, it is always guaranteed it is the window that we are observing.

Reviewed By: javache, cipolleschi, realsoelynn

Differential Revision: D71667722

fbshipit-source-id: 103baf980b79b413fb29e6c3deff81dae33671c0
2025-03-24 11:49:07 -07:00
Pieter De BaetsandFacebook GitHub Bot 8f43ae9370 Add accessibilityOrder to base view config (#50218)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50218

These were added in D70129295 to BaseViewManager but did not exist in the JS interface.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D71737288

fbshipit-source-id: 751d26fb9116daf45d09f3853fe37cad29a8903a
2025-03-24 11:47:34 -07:00
Mateo GuzmánandFacebook GitHub Bot 4a9e9a8e77 Migrate ReactTextInputBlurEvent to Kotlin (#50202)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputBlurEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputBlurEvent to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71681495

Pulled By: arushikesarwani94

fbshipit-source-id: 899687bd9dfcd861c49156fee82304ddc1d9ea82
2025-03-24 11:05:18 -07:00
Mateo GuzmánandFacebook GitHub Bot 7c7d64496d Migrate ReactContentSizeChangedEvent to Kotlin (#50204)
Summary:
Migrate com.facebook.react.views.textinput.ReactContentSizeChangedEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactContentSizeChangedEvent to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71681505

Pulled By: arushikesarwani94

fbshipit-source-id: f4d63251afc48652032e9beaf60073797f2bb246
2025-03-24 10:45:31 -07:00
Mateo GuzmánandFacebook GitHub Bot cd04aae1a3 Migrate ReactTextChangedEvent to Kotlin (#50203)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextChangedEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextChangedEvent to Kotlin

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

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

Reviewed By: javache, Abbondanzo

Differential Revision: D71681502

Pulled By: arushikesarwani94

fbshipit-source-id: 9639740a41bbebf943bc716c495c3593461346a6
2025-03-24 10:37:59 -07:00
Mateo GuzmánandFacebook GitHub Bot e797b1659e Migrate ReactTextInputEndEditingEvent to Kotlin (#50201)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputEndEditingEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputEndEditingEvent to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71681473

Pulled By: arushikesarwani94

fbshipit-source-id: 4a1e3f3b56fa425e8e2bbcf8251eb05a572b329f
2025-03-24 10:35:21 -07:00
Fabrizio CucciandFacebook GitHub Bot 795e573f00 Add changelog entry for v0.79.0-rc.3 (#50224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50224

As per title.

Changelog: [Internal]

Reviewed By: cortinico, Abbondanzo

Differential Revision: D71740110

fbshipit-source-id: edf60f1413a5a33fadbb6716432126c4e905f356
2025-03-24 10:06:43 -07:00
Vitali ZaidmanandFacebook GitHub Bot 71dec84d43 dev-middleware: Remove redundant async queuing (#49982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49982

In D68708899, we removed dataURI inlining of sources and source maps into `Debugger.scriptParsed` CDP notifications.

After that, all message handling for which we need to preserve order is implemented completely synchronously, so there's no need for a promise queue to preserve order.

This removes the redundant queue.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71036230

fbshipit-source-id: d17fb7d06a038b379fe45b4e1c742dbf8ff12f78
2025-03-24 08:43:50 -07:00
Jakub PiaseckiandFacebook GitHub Bot a4282a7cc3 Add pre-transform that replaces nullable types with undefined for object types (#50213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50213

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71730936

fbshipit-source-id: c126d461fda4ab9758a41421d8300dd92a5cd9af
2025-03-24 07:21:58 -07:00
Nicola CortiandFacebook GitHub Bot f760c11f65 Doing a round of yarn lint --fix (#50036)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50036

This is my friday round of fixing some warnings in our codebase.
Those are all minor bits that should be fixed.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D71209124

fbshipit-source-id: 40aa231e049025bbff9dff8a572784bb1a9f324b
2025-03-24 06:55:03 -07:00
Nicola CortiandFacebook GitHub Bot 4435d7b8dc Delete unnecessary DevSupportSoLoader (#50198)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50198

We don't really need another wrapper around SoLoader to decide when to load a library. SoLoader already does this for us. See:
https://github.com/facebook/SoLoader/blob/62c2028a07f146bbc56c0337dacf226fcd6f95ef/java/com/facebook/soloader/SoLoader.java#L1070-L1139

I'm removing this extra unnecessary class.

Changelog:
[Internal] [Changed] - Delete unnecessary DevSupportSoLoader

Reviewed By: huntie

Differential Revision: D71636985

fbshipit-source-id: b6df35b61d4e376503c158e921ca970ad77a6deb
2025-03-24 05:06:53 -07:00
Jakub PiaseckiandFacebook GitHub Bot ca4b82a629 Rename one of GestureResponderHandlers to make them unambiguous (#50136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50136

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71472943

fbshipit-source-id: 53d4a17098bafbfb7ded7b6f072b63b04e488d8c
2025-03-24 04:37:14 -07:00
Nick GerlemanandFacebook GitHub Bot d1a090b0af Fix animated images missing from offscreen render (#50187)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50187

D70668516 broke some SSTs, where asset that previously was black, showed up as clear.

I was assuming that was because we fixed a separate bug where assets could erroneously show as black layer, but these tests were actually just using a black asset.

Real bug here, is that the change led to only setting image when we have a displayLink, ie showing on screen, where before, we set image (implicitly at first frame) as layer content.

This change fixes that behavior, so first frame is rendered as part of off-screen view rendering, for images considered animatable.

Changelog:
[iOS][Fixed] - Fix animated images missing from offscreen render

Reviewed By: cipolleschi

Differential Revision: D71590856

fbshipit-source-id: f5da690b27f2da0f6979f25ece031ff0d418cca6
2025-03-21 13:27:50 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dfde51e469 Convert to JSException only NSException from sync methods (#50193)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50193

This fix makes sure that we convert to JSException only NSException thrwn by sync methods.
Currently, nothing in the stack will be capable of understanding that js error if it is triggered by an exception raised by an asyc method.

See https://github.com/reactwg/react-native-new-architecture/discussions/276 for further details

We need to cherry pick this in 0.78 and 0.79

## Changelog:
[iOS][Fixed] - Make sure the TM infra does not crash on NSException when triggered by async method

Reviewed By: fabriziocucci

Differential Revision: D71619229

fbshipit-source-id: b87aef5dd2720a2641c8da0904da651866370dc6
2025-03-21 10:08:12 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7b500b8522 Add warning when a module tries to invoke a method using the interop layer (#50175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50175

This change logs warning in the RN Dev Tools and in the Xcode console when a legacy module is used through the interop layer.

The `moduleName.methodName` warning is logged only once per usage not to flood the users with Warnings.

## Changelog:
[iOS][Added] - Add warnings when a legacy module is used in the Interop Layer.

Reviewed By: cortinico

Differential Revision: D71561348

fbshipit-source-id: f3ec830ddb07c4d0ab34534ad2baf95e75b1a3b3
2025-03-21 09:55:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 4d40882172 Add warning when RCT_EXPORT_MODULE is used in New Arch (#49897)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49897

This change introduces the first warning for the New Architecture warning.

When modules are registered through the RCT_EXPORT_MODULE (or its variants) a warning is emitted.

Note: currently it is only emitted on the Xcode console.
I'm looking into ways to emit it also in the RN DevTools console.

## Changelog:
[iOS][Added] - Show warnings in the New Architecture when modules are loaded using RCT_EXPORT_MODULE

Reviewed By: cortinico

Differential Revision: D70789672

fbshipit-source-id: 06cb6cafbe7f65142a92d2e1ab9bc4ff59d0312a
2025-03-21 09:55:00 -07:00
Mateo GuzmánandFacebook GitHub Bot 345403f042 Migrate ReactTextInputKeyPressEvent to Kotlin (#50184)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputKeyPressEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputKeyPressEvent to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71588770

Pulled By: arushikesarwani94

fbshipit-source-id: 53354d9cd8cc24b9ec6f84de689ea4b2839e49ce
2025-03-21 09:43:49 -07:00
Mateo GuzmánandFacebook GitHub Bot d9876d8dc9 Migrate ReactTextInputFocusEvent to Kotlin (#50185)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputFocusEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputFocusEvent to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71588274

Pulled By: arushikesarwani94

fbshipit-source-id: cbdabca31c5bfc6b2b5e4b6bf40dda4c591db1f2
2025-03-21 09:43:45 -07:00
Mateo GuzmánandFacebook GitHub Bot 7358fcf10f Migrate ReactTextInputLocalData to Kotlin (#50183)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputLocalData to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputLocalData to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71589108

Pulled By: arushikesarwani94

fbshipit-source-id: e460518ffca43346f32ea0742ef656d72f5ed2d5
2025-03-21 09:40:39 -07:00
Mateo GuzmánandFacebook GitHub Bot a670c9aeb3 Migrate ReactTextInputSelectionEvent to Kotlin (#50182)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputSelectionEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputSelectionEvent to Kotlin

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

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

Reviewed By: javache

Differential Revision: D71589613

Pulled By: arushikesarwani94

fbshipit-source-id: 5a93834b8e450e63629f409cd7711b7b0850e288
2025-03-21 09:39:55 -07:00
Rubén NorteandFacebook GitHub Bot c72d4c5ee9 Improve architecture diagram for feature flag system (#50194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50194

Changelog: [internal]

Just a small improvement of the diagram to make it more symmetrical and expand on what parts of the system are used within the rest of the RN repo.

Reviewed By: javache

Differential Revision: D71620577

fbshipit-source-id: 6b9398f416fd529eea192e82cad844212278492c
2025-03-21 07:49:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot cc12caa0a9 Add React-renderercss dependency for 3p libs (#50192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50192

Third party libraries depend transitively agains the React-renderercss modules because it is imported by Fabric.
Without this change, the use_frameworks on iOS does not works when a 3P library is imported.

This changes fix the behavior and we need to cherry pick them in 0.79.

## Changelog:
[iOS][Fixed] - Make sure 3p libraries depends on React-renderercss to work with use_frameworks

Reviewed By: fabriziocucci

Differential Revision: D71618395

fbshipit-source-id: 70c12dcbeb2dfa5fd7513c27d5c069a1f3c95966
2025-03-21 07:09:25 -07:00
Pieter De BaetsandFacebook GitHub Bot 08aeffa929 Cleanup lazyAnimationsCallback feature flag (#50191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50191

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D71616196

fbshipit-source-id: 9ff7169d99211a34e55ede6f22f0e4ffdda39330
2025-03-21 06:08:08 -07:00
Mateo GuzmánandFacebook GitHub Bot 424dbf66dd Migrate ReactTextInputSubmitEditingEvent to Kotlin (#50181)
Summary:
Migrate com.facebook.react.views.textinput.ReactTextInputSubmitEditingEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.views.textinput.ReactTextInputSubmitEditingEvent to Kotlin

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

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

Reviewed By: Abbondanzo

Differential Revision: D71589831

Pulled By: arushikesarwani94

fbshipit-source-id: bf4bb35f3de1934195f1c5a7c9ad7b1264c15bef
2025-03-21 01:42:44 -07:00
Alex HuntandFacebook GitHub Bot 094a22fa16 Split out CdpJson into separate library (#50170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50170

This is needed in D71470038 and later, where submodules of `jsinspector-modern` need to operate with CDP message payloads. We functionally split out these files as a library to avaoid a dependency cycle.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D71551561

fbshipit-source-id: 527479399d7563883c1b6599f884b7857e79bd77
2025-03-20 20:07:37 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 3a8f51e02e Implement accessibleElements Focusing Order (#49824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49824

The way this works is each element on the list of `accessibilityElements` says that each element should go before the next element in its list. For example:

Imagine the default focus order:
```
[A, B, C, D, E]
```
If I set `accessibilityElements` to be:
```
[E, D, C, B, A]
```
That's just re ordering the focus order to be reversed, but what happens if I miss elements?
If I set `accessibilityElements` to be:
```
[D, B]
- D should go before B
```
Then my resulting order will be:
```
[A, D, B, C, E]
```

Because we follow the default order, then we find `B` but `D` should go before `B` so we first go to `D` and then finally go back to `B` and then continue our default order

This algorithm works with nested elements and it doesn't need to be exhaustive

We are also borrowing the concepts of Containers and elements from iOS.

We will disable views according to iOS logic to facilitate code shareability

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D70129295

fbshipit-source-id: 5ada03c7e5eb71a7b0a9d205296c2fa4366a3643
2025-03-20 18:19:16 -07:00
Mateo GuzmánandFacebook GitHub Bot ad0205a122 Migrate AbstractLayoutAnimation to Kotlin (#50145)
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.AbstractLayoutAnimation to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.AbstractLayoutAnimation to Kotlin

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

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

Reviewed By: alanleedev

Differential Revision: D71541347

Pulled By: javache

fbshipit-source-id: 5b53f9076a732afc68911f2ace7209f0fee46292
2025-03-20 17:00:55 -07:00
Ramanpreet NaraandFacebook GitHub Bot 45fa563d3a Remove RCTUnsafeExecuteOnMainQueueSync from sample modules (#50149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50149

Let's just remove RCTUnsafeExecuteOnMainQueueSync from the examples.

That way, people don't copy-paste it, thinking it's okay to use.

Changelog: [Internal]

Reviewed By: lyahdav

Differential Revision: D71505823

fbshipit-source-id: f8d51b1a16bfdd6abdf62a6ba09ffff49d79a3f1
2025-03-20 16:25:15 -07:00
David VaccaandFacebook GitHub Bot 81dfaad871 Annotate ReactNativeFeatureFlags.setAccessorProvider as visibileForTesting (#50107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50107

Annotate ReactNativeFeatureFlags.setAccessorProvider as visibileForTesting

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71353954

fbshipit-source-id: 4f3256c209087ccb46020d5762ef0da332e648dc
2025-03-20 15:17:39 -07:00
David VaccaandFacebook GitHub Bot 0cb99cf6e3 Fix typos on ReactNativeFeatureFlags definitions (#50108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50108

Fix typos on ReactNativeFeatureFlags definitions

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D71353956

fbshipit-source-id: 697c9ae5cf11e50a6a33be239952f7ef5af6f4a6
2025-03-20 15:17:39 -07:00
David VaccaandFacebook GitHub Bot 194ae45b80 Rename ReactNativeFeatureFlagsProviderHolder -> ReactNativeFeatureFlagsJavaProvider (#50080)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50080

I'm renaming ReactNativeFeatureFlagsProviderHolder -> ReactNativeFeatureFlagsJavaProvider to make naming consistent with documentation and remove the concept of "Holder" which is not part of the original design

changelog: [internal] internal

Reviewed By: rubennorte

Differential Revision: D71333170

fbshipit-source-id: be89c3aafe5d9b1c9699aff224c7c8511bdf9327
2025-03-20 15:17:39 -07:00
David VaccaandFacebook GitHub Bot 92c6ba6ed5 Fix typos on ReactNativeFeatureFlags system (#50079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50079

Fix typos on ReactNativeFeatureFlags system

changelog: [internal] internal

Reviewed By: shwanton, NickGerleman

Differential Revision: D71331170

fbshipit-source-id: 25ffed7cf2d003fa9071723c975e69f464d62b79
2025-03-20 15:17:39 -07:00
Sam ZhouandFacebook GitHub Bot 4f14499013 Fix issues in react-native ahead of making React.ComponentType an alias of component(...Props) (#50180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50180

Prepare for the change that makes `React.ComponentType` an alias of `component(...Props)`, which comes with stricter checking and making the props automatically readonly.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71566900

fbshipit-source-id: cefcc10fda9a9777532f25b325412b0d50ebb9b8
2025-03-20 15:05:28 -07:00
Zeya PengandFacebook GitHub Bot 1acd45950b TurboModuleWithJSIBindings (#50106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50106

## Changelog:

[General] [Added] - Create TurboModuleWithJSIBindings interface

So c++ TurboModules can initialize some private members with reference to `jsi::Runtime`

Reviewed By: lenaic

Differential Revision: D71396842

fbshipit-source-id: 59d32e4cbf2c5081912a4c828acc66ceb8702855
2025-03-20 14:49:29 -07:00
David VaccaandFacebook GitHub Bot ceff2e8c37 Update JavaScriptContextHolder documentation to not mention CatlaystInstance (#50163)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50163

Update JavaScriptContextHolder documentation to not mention CatlaystInstance

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D71508657

fbshipit-source-id: 379be65c8a4afdfb0ed994fd1189b1285c246eec
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 06325d5411 Compile-out methods using Context.isBridgeless() (#50176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50176

Compile-out methods using Context.isBridgeless()

changelog: [internal] internal

Reviewed By: arushikesarwani94

Differential Revision: D71079164

fbshipit-source-id: a610e2406d92e254bb5b11d692c0a5f5a6a0e4cb
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot ce9471051c Compile-out UIManagerModule from FpsDebugFrameCallback (#50158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50158

Compile-out UIManagerModule from FpsDebugFrameCallback

The setViewHierarchyUpdateDebugListener does not exists on Bridgeless and NotThreadSafeViewHierarchyUpdateDebugListener is deprecated and marked for deletion on the new architecture.

The new architecture exposes a different API called ItemDispatchListener that's a sort of replacement for NotThreadSafeViewHierarchyUpdateDebugListener. Although it's not the same.

FpsView is broken in old/new arch and needs to be rebuild, I believe this behavior needs to be rethinked in the future. For now I'm excluding usages of NotThreadSafeViewHierarchyUpdateDebugListener and setViewHierarchyUpdateDebugListener for apps running on the new arch enabled by default.

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D71050642

fbshipit-source-id: 662deb064ffc2322b560618fac3203ab4e86c277
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 8d1278eb1a Assert if NativeModuleRegistry.onBatchComplete() is used in new architecture (#50164)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50164

Based on analysis this method is only used by legacy architecture, this diff adds an assert if NativeModuleRegistry.onBatchComplete() is used in new architecture

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71050638

fbshipit-source-id: 7a9791230880d2431e6b136735653a8ab4c34d7d
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 7dd6e25861 Compile-out UIManagerModule from ReactSafeAreaView (#50161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50161

Compile-out UIManagerModule from ReactSafeAreaView

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71050640

fbshipit-source-id: e6675064a0e34bb581b495b3a6412f42372d223d
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 6f5d6a5990 Remove UIManagerModule from NativeAnimatedModule (#50160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50160

In this diff we are removing UIManagerModule from NativeAnimatedModule
This code wasn't executing when fabric is enabled, with this change the code that references UIManagerModule will be stripped out

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71050641

fbshipit-source-id: fbedd5b9e1a9efb45c2fb7558d97fc639897c28c
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 204ca2ec95 Rename MaintainVisibleScrollPositionHelper.getUIManagerModule() -> MaintainVisibleScrollPositionHelper.getUIManager() (#50177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50177

This diff renames MaintainVisibleScrollPositionHelper.getUIManagerModule() -> MaintainVisibleScrollPositionHelper.getUIManager() to move away from the UIManagerModule naming

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D71050639

fbshipit-source-id: 4d9aaf66af0f2a881146a83ec170344adc1bad7b
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 5e2eedc116 Remove UIManager dependency out of ReactInstance class (#50162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50162

In this diff I'm removing UIManager dependency out of ReactInstance class

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71003821

fbshipit-source-id: 8ee46619f5a598a03990d0677b47e8ec60902f10
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 4f8d215d8e Ensure UIManagerHelper does not access UIManagerModule (#50159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50159

Ensure UIManagerHelper does not access UIManagerModule

changelog: [internal] internal

Reviewed By: cortinico, alanleedev

Differential Revision: D70742205

fbshipit-source-id: f7eabfb7d28b4debc667a9b0cfd55741b373380b
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 73b220f483 Compile-out UIManagerModule from ReactModalHostView (#50155)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50155

Compile-out UIManagerModule from ReactModalHostView

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70742206

fbshipit-source-id: f2ce2b1d039dd09d482830cdb92fd9db84c604d4
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 4ca670e5ca Compile-out UIManagerModule from ReactHostImpl (#50156)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50156

Compile-out UIManagerModule from ReactHostImpl

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70742208

fbshipit-source-id: ae915ee41681b9e4275ecc6c7cfd475f42a03333
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot a8668319ad Deprecate UIManagerType.DEFAULT and introduce UIManagerType.LEGACY (#50157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50157

UIManagerType.DEFAULT is becoming confusings As we are expanding the usage of the New architecture everywhere.

That's why I'm depreacting this constant and introducing UIManagerType.LEGACY.

changelog: [Android][Deprecated] Deprecate UIManagerType.DEFAULT, replaced by UIManagerType.LEGACY

Reviewed By: alanleedev

Differential Revision: D70738948

fbshipit-source-id: 9793a6cce3b931f9c0de4e0c2026852119f392b2
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot a8c675d460 Compile out UIManagerModule from ReactTextView (#50154)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50154

Compile out UIManagerModule from ReactTextView

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D70738949

fbshipit-source-id: 1f15d1f305bbe1e8b933558acc96a59fcfff8ced
2025-03-20 13:08:29 -07:00
David VaccaandFacebook GitHub Bot 89eaf661f9 Remove UIManagerModule from comments (#50153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50153

Remove UIManagerModule from comments

changelog: [internal] internal

Reviewed By: cortinico, alanleedev

Differential Revision: D70738950

fbshipit-source-id: 13286c1c451fcf4fd4b4c7693f755c33577d12bf
2025-03-20 13:08:29 -07:00
Nicola CortiandFacebook GitHub Bot 38a7ba7c2a Do not warn for JSC deprecation on react-native-github (#50172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50172

This specific warning is only for React Native users.

We don't need this warning on console for RNtester so I'm excluding react-native-github
project from the list of project where this warning gets fired.

Changelog:
[Internal] [Changed] - Do not warn for JSC deprecation on react-native-github

Reviewed By: mdvacca

Differential Revision: D71556035

fbshipit-source-id: 8ab625eb2c090416119903dbc9c29afac51c91bd
2025-03-20 10:48:12 -07:00
Vitali ZaidmanandFacebook GitHub Bot a6e5a9fc9d raise event when trying to open the debugger on opt builds (#50104)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50104

Changelog:
[General][Internal] raises an event report when an attempt to open the debugger for not supported apps is made

Reviewed By: robhogan

Differential Revision: D71398802

fbshipit-source-id: 66b90a0286ee0844ced4319381e3a0581ce540b5
2025-03-20 10:23:07 -07:00
Olivier BouilletandFacebook GitHub Bot d32ea66e6a fix(ios): selection range not respected when changing text or selection when selection is forced (#50166)
Summary:
fix: https://github.com/facebook/react-native/issues/50132
The goal of this PR is to ensure selected TextInput scrolls to the selected range when text or selection change.
The background of this feature check is to implement a rich text editor.

## Changelog:

[IOS][FIXED] - Selection range not respected when changing text or selection when selection is forced

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

Test Plan:
Tested with the sample linked to this pull request.
As TextInput is a controlled component

Here is a video of the sample with the patch: https://drive.google.com/file/d/1lS9_70quNqND_E8MjLFcRG6HoHcDkfmv/view?usp=drive_link

First TextInput shows the initial issue reported in the ticket.
Second TextInput shows the global behavior of the controlled component, the 2 buttons allows to force focus and the force text values

I have also backport this part on 0.77.1 and test it in my app, it works fine for me (let's see if I have QA feedback)

Reviewed By: javache

Differential Revision: D71544064

Pulled By: cipolleschi

fbshipit-source-id: ca49a3a2ca0f5f87307054efda31b0c779c31496
2025-03-20 09:53:11 -07:00
Maciej JastrzębskiandFacebook GitHub Bot ddbb5fda09 feat(iOS): allow eager initialization of RCTRootViewFactory (#49986)
Summary:
Expose eager initialization method on `RCTRootViewFactory` (iOS) so that application can prepare `ReactHost`/Bridge before actually creating a root view. Then creating a root view is significantly faster.

## Changelog:
[IOS] [ADDED] - allow eager initialization of `RCTRootViewFactory`

<!-- 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/49986

Test Plan:
Invoke `initializeReactHostWithLaunchOptions:` before calling `viewWithModuleName:` and measure the time difference vs not using eager initilization:

Before
- calling `viewWithModuleName:`: 63.39ms, 47.91 ms, 60.18ms

After:
- calling `initializeReactHostWithLaunchOptions`: 52.41 ms, 81.03 ms, 60.52 ms
- calling `viewWithModuleName`: 0.49 ms,  0.63 ms, 0.47 ms

Test run 3 times on iPhone simulator on M1 mac.

Reviewed By: javache

Differential Revision: D71548601

Pulled By: cipolleschi

fbshipit-source-id: 86ecfb8bec4c2657537caf32af49545b21d3656b
2025-03-20 09:52:53 -07:00
Alex HuntandFacebook GitHub Bot a8745324c6 Scaffold NetworkReporter methods (#50131)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50131

Outlines and stubs methods on the `NetworkReporter` class, and the `Network.getResponseBody` CDP request on `NetworkIOAgent`. Together, these form the APIs to implement for CDP network debugging.

Also updates internal mutex use to `std::atomic<bool>`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D70708526

fbshipit-source-id: f44bd0d246a38883dd591752fb2d3ed4567de4a0
2025-03-20 06:46:13 -07:00
Eric RozellandFacebook GitHub Bot 12e5df844b Convert folly::dynamic event dispatch to r-value (#50133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50133

Allow move semantics for folly::dynamic event dispatching to avoid copying the folly::dynamic when dispatched.

## Changelog

[General][Breaking] - Dispatch folly::dynamic events with r-value instead of l-value

Reviewed By: NickGerleman

Differential Revision: D71423497

fbshipit-source-id: 5435772e14b025aab97d34df9983b91fd7285fd0
2025-03-20 04:57:36 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 146d809b6b Bump cache keys for Xcode which was restoring an old Pods folder (#50134)
Summary:
Bump the xcode keys to make sure that we use the newly created artifacts

## Changelog:
[Internal] - bump keys to use the right artifacts

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

Test Plan: GHA - Verified that CI passes the critical point in https://github.com/facebook/react-native/actions/runs/13948665701/job/39044363180?pr=50134

Reviewed By: NickGerleman

Differential Revision: D71473229

Pulled By: cipolleschi

fbshipit-source-id: 09b097a6b0c576705585a5584481a2abe63ab034
2025-03-20 03:25:02 -07:00
Ramanpreet NaraandFacebook GitHub Bot 886319b4bc Make AppState use main queue setup (#50115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50115

## Rationale
Rendering can now include main -> js sync calls.

If we allow js -> main sync calls during rendering, react native can deadlock.

So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71348561

fbshipit-source-id: 1c57ba1d40b062712fd53b9dac0bc8ecd60b425d
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot b4775ebb39 Make StatusBarManager use main queue setup (#50113)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50113

## Rationale
Rendering can now include main -> js sync calls.

If we allow js -> main sync calls during rendering, react native can deadlock.

So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71348559

fbshipit-source-id: 918f145d817866a5d08087c1a4a0e151f783109e
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot 2b03fd74cb Make AccessibilityManager use main queue setup (#50112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50112

## Rationale
Rendering can now include main -> js sync calls.

If we allow js -> main sync calls during rendering, react native can deadlock.

So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71347448

fbshipit-source-id: f62a92a35011a7c8de0a7ee35047cc94f23106d1
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot 6fa638799a Make DeviceInfo use main queue setup (#50109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50109

## Rationale
Rendering can now include main -> js sync calls.

If we allow js -> main sync calls during rendering, react native can deadlock.

So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71347449

fbshipit-source-id: 1fa010fd08a2d0b809f36a4c8df973b86e4610f9
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot 06c88be6e3 Make PlatformConstants use main queue setup (#50111)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50111

## Rationale
Rendering can now include main -> js sync calls.

If we allow js -> main sync calls during rendering, react native can deadlock.

So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71480047

fbshipit-source-id: e36a4dd317bbbf46a6766f01fbf4d69a83a45c17
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot ed8749ce59 Revert uikit proxies
Summary:
We will use main queue setup of native modules to solve this problem instead.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71341038

fbshipit-source-id: 77e2064c732a5572d063a240f769fa7a79530f1b
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot 061174c150 Bridgeless: Implement main queue setup api in turbo modules (#50040)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50040

This diff implements main queue module setup.

Sometimes, people need to capture uikit things, and use them from javascript. In those cases, people can write main queue modules. These modules will be eagerly initialized on the main queue, during react native init.

## On Necessity
**Sync** dispatches to the main thread from the js thread can deadlock react native. And **async** dispatches to the main thread from the js thread sometimes might not be enough: it could lead to flickery rendering. So, we need to allow people to capture ui thread things, before any js executes.

## Caveat
This api is dangerous and discouraged. All react native surfaces will pay the cost of one surface introducing a main queue module. It could also slow down common/critical interactions in your app, if you're not careful.

We will introduce performance logging for this infrastructure. So that we can monitor and file tasks, when main queue module init starts taking "too long."

Changelog: [General][Breaking]: Introduce beforeload callback arg into ReactInstance::loadScript

Reviewed By: mdvacca

Differential Revision: D71084243

fbshipit-source-id: 8fdb84761ac69468afc428f4f79eff6322449e3c
2025-03-19 21:16:05 -07:00
Ramanpreet NaraandFacebook GitHub Bot 636665c1c2 Bridgeless: Introduce main queue setup api in turbo modules (#49957)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49957

## Changes
This diff introduces the api for "main queue modules" into turbo modules.

This will occur occurs before any rendering.

## Rationale

Rendering can now include main -> js sync calls. If we allow js -> main sync calls during rendering, react native can deadlock.

With this diff, we can move the js -> main sync calls to before any rendering happens.

## APIs
**Buck API:**
Plugin:
```
react_module_plugin_providers(
    name = "AccessibilityManager",
    native_class_func = "RCTAccessibilityManagerCls",
    unstable_requires_main_queue_setup = True,
)
```

**OSS API:**
[codegenConfig](https://reactnative.dev/docs/the-new-architecture/using-codegen) in package.json:
```
"codegenConfig": {
    "name": "<SpecName>",
    "type": "<types>",
    "jsSrcsDir": "<source_dir>",
    "android": {
      "javaPackageName": "<java.package.name>"
    },
    "ios": {
      "modules": {
        "AccessibilityManager": {
          "className": "RCTAccessibilityManager",
          "unstableRequiresMainQueueSetup": true
         }
      }
    }
  },
```

Changelog: [iOS][Added] Introduce unstableRequiresMainQueueSetup api to modules

Reviewed By: cipolleschi

Differential Revision: D70413478

fbshipit-source-id: 78d89437c2869a979ae5c94f08b01087686dfae7
2025-03-19 21:16:05 -07:00
Tim YungandFacebook GitHub Bot 0448cf2567 RN: Support .fb Suffix in Native Codegen (#50140)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50140

Extends `react-native-codegen` to support the `.fb` filename suffix used to gate source code that is only relevant for Meta internal use cases.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D70808462

fbshipit-source-id: a6772d6504f76724b8474df6799bc69a76a2f81b
2025-03-19 20:21:02 -07:00
Tim YungandFacebook GitHub Bot 4de592756b RN/Relay: Upgrade to eslint-plugin-react-hooks@5.2.0 (#50146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50146

Upgrades React Native and Relay to `eslint-plugin-react-hooks` from v4.6.0 to v5.2.0. ([CHANGELOG](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md))

Changelog:
[General][Breaking] Updated `eslint-config-react-native` to depend on `eslint-plugin-react-hooks` v5.2.0 from v4.6.0. This includes a breaking change in which ESLint will no longer recognize component names that start with 1 or more underscores followed by a capital letter. (https://github.com/facebook/react/pull/25162)

Reviewed By: captbaritone

Differential Revision: D71483664

fbshipit-source-id: 6c78e196a9ea8dca9c285cb43909cfe3749ddd28
2025-03-19 19:43:17 -07:00
Nick GerlemanandFacebook GitHub Bot 7136be22fa Fixes for AttributedString Comparison (#50147)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50147

Noticed a couple bugs here, around a crash from assertion internal to the caching map which hashes on the AttributedString, that may or may not be related.

1. We are missing `baseTextAttributes` for both hashing and equality (which is mostly innocuous, but still wrong)
2. We were not hashing or comparing `textAlignVertical`
3. For equality, we were comparing parent shadow view tag and metrics, but for hashing, we were hashing the whole ShadowView.

I think #3 could cause issues, since we could see different hash despite equality, which could break invariants.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D71500246

fbshipit-source-id: 462749d5ca10d10bf0dab88089253a2bb8e603fb
2025-03-19 19:42:30 -07:00
Yurii NakonechnyiandFacebook GitHub Bot 7488f66fe5 fatalWithMessage() - added warning suppression: unused 'message' argument (#50148)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50148

## Changelog:

[Internal] - suppression: unused 'message' argument

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

Reviewed By: NickGerleman

Differential Revision: D71492528

Pulled By: lunaleaps

fbshipit-source-id: 6fc7a665066351d15e09f0b6c82ed1fe3f688a94
2025-03-19 19:06:50 -07:00
Regina TukandFacebook GitHub Bot 6df938c72e adding onPressMove to Pressable (#50139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50139

adding this event to Pressable because it is going to be consumed after to track if pressable location is moved

Changelog:
[General] [Added] - Expose `onPressMove` as base prop for `Pressable`

Reviewed By: thurn

Differential Revision: D71429258

fbshipit-source-id: 79acaa735764a47a21d89042d3e4b9c114c72950
2025-03-19 16:53:20 -07:00
qnnpandFacebook GitHub Bot c2864c160d Added type definitions for Colors object in LaunchScreen module (#50118)
Summary:
## Changelog:

[GENERAL] [ADDED] - Added type definitions for Colors object in LaunchScreen module to enhance code readability and type safety.

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

Reviewed By: NickGerleman

Differential Revision: D71491870

Pulled By: lunaleaps

fbshipit-source-id: 48205fb4d03098f9bea32c1c18c5b18deb4fd7f0
2025-03-19 15:31:10 -07:00
Eli WhiteandFacebook GitHub Bot 69ccbc3943 Allow union changes when the new element is in the middle of the union (#50117)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50117

D70870978 failed the compat check because it modified a union by removing an element in the middle:

```
'global' | 'self'
```

from
```
'global' | 'application' | 'self'
```

This caused the compat check to complain that index 1 in both unions: `self` didn't match `application` and thus it was a type incompatibility.

We should have been comparing these as an unsorted array of options, which first sorts, then treats differences as added/removed elements instead of incompatbile elements.

If in the example above the removed element was the last one from the union, it would have been fine.

Once these are classified as added/removed, the VersionDiffer is able to check whether that change is allowed in fromNative or toNative.

Changelog: [General][Fixed] Compatibility Check: Allow union changes when the new element is in the middle of the union

Reviewed By: makovkastar

Differential Revision: D71433054

fbshipit-source-id: 20a73f0ba0576daf30cec97bae969b31baf7f468
2025-03-19 11:33:08 -07:00
Joe VilchesandFacebook GitHub Bot 2facea6e20 Rename accessibilityElements to accessibilityOrder for iOS (#50135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50135

We settled on a different name here so gotta change some code with the old name. This is not exposed yet so this change is chill

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D71471884

fbshipit-source-id: c30384802ef51e5aae830b27299859db05f2520b
2025-03-19 09:50:10 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 65bcfdab62 Build JSI, React-Debug, React-logger, React-MapBuffer with SPM (#50075)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50075

This is an exploratory change to see how it will look like to build core from SPM.

In this change we are building three pieces of React native (using the Podspec names for simplicity):
- React-jsi
- React-debug
- React-logger
- React-MapBuffer

They depends on a local ReactNativeDependency.xcframework we can build using the prebuild-io script.

## CHANGELOG:
[INTERNAL] - set up initial Swift PM configuration

Reviewed By: cortinico

Differential Revision: D70567840

fbshipit-source-id: 3f65a3e7c3dd39f71f6d4c04726712a5968e0a97
2025-03-19 09:26:15 -07:00
Jakub PiaseckiandFacebook GitHub Bot 80c26b5ffa Export TransformsStyle from StyleSheet (#50126)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50126

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71467141

fbshipit-source-id: 20077e4748abfd623cf0cb0b4852ba7c6f3973f8
2025-03-19 08:33:38 -07:00
Jakub PiaseckiandFacebook GitHub Bot 84499bf70b Update reference path to global definitions (#50124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50124

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71465394

fbshipit-source-id: 17f5cee4533de8d16b2a5d164eef7c295af7b00b
2025-03-19 08:23:36 -07:00
Jakub PiaseckiandFacebook GitHub Bot 1ebf83d149 Add missing exports from Animated namespace (#50103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50103

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D71398771

fbshipit-source-id: a6cf790a35dd51857df5bf441fec6eca7bc0c3aa
2025-03-19 08:03:42 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6cbd6ff0a0 Add Changelog for 0.78.1 (#50128)
Summary:
Changelog for 0.78.1

## Changelog:
[Internal] - Changelog for 0.78.1

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D71469118

Pulled By: cipolleschi

fbshipit-source-id: afbab9f2d23539ba7306d2d95964876be8a35190
2025-03-19 07:43:16 -07:00
AjitandFacebook GitHub Bot 81e47af764 fix performance and memory usage of creating blob on Android (#50121)
Summary:
This PR fixes https://github.com/facebook/react-native/issues/48657
- Memory usage for creating a blob lowered from _( nearest 2^N greater than the file size)+1KB_ previously To _(file size)+1KB_. This is achieved by avoiding internal calls to java.io.ByteArrayOutputStream.ensureCapacity by creating a buffer based on file size.
- Increases the max file size a Blob can be  created from before hitting a OutOfMemoryException.
- Major performance increase by avoiding buffer copying

## Changelog:

[ANDROID] [CHANGED] - Speed and Memory usage improvements to Android Blob support
[ANDROID] [FIXED] - Creating of Blobs from large files now works. File size can now be upto available (free) heap size.

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

Test Plan: Used the App here to test Android Blob creation. https://github.com/giantslogik/blob-large-file-fetch.

Reviewed By: cortinico

Differential Revision: D71464835

Pulled By: javache

fbshipit-source-id: 38de7d83bcaee265fc6e7183f6b1160027cd4cb2
2025-03-19 06:03:26 -07:00
Christian FalchandFacebook GitHub Bot fd1e57b0c0 moved resources to correct location (#50101)
Summary:
In the final XCFramework we no longer need to place resource bundles in a subfolder called Resources - they should be located directly in the framework folder.

This commit fixes this by removing copying to the Resources folder. I also removed a few unneeded tests since we know that we are in a valid folder at this point.

bypass-github-export-checks

## Changelog:

[INTERNAL]  - Moved resource bundles up one level

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

Test Plan: Run RNTester with RCT_USE_RN_DEP=1 and verify that it launches

Reviewed By: cortinico

Differential Revision: D71464608

Pulled By: cipolleschi

fbshipit-source-id: 6cfdda0c6785ffeb13c170f9fd2dd9f5b889d490
2025-03-19 05:07:36 -07:00
Luna WeiandFacebook GitHub Bot df300387e6 Create IntersectionObserver benchmark (#50023)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50023

Changelog: [Internal] - Add benchmarks for Intersection Observer

Reviewed By: rubennorte

Differential Revision: D66847629

fbshipit-source-id: 01cb7994ddb007ecce29593b6ab4b1d359d68bd0
2025-03-19 00:01:35 -07:00
Eric RozellandFacebook GitHub Bot ff4537c15e Allow listeners in EventEmitter (#49998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49998

We have listeners for EventDispatcher, but we don't have any listener capabilities for synchronous hooks from events on the UI thread.

This proposal adds an affordance for generic event listeners that can be attached by the host platform mounting manager, e.g., to wire events to NativeAnimated event drivers.

## Changelog

[General][Added] - EventEmitter `addListener` and `removeListener` APIs

Reviewed By: javache

Differential Revision: D71050838

fbshipit-source-id: a7f298c71bd882a573781c2fe1fb5a1ae79f301c
2025-03-18 12:12:03 -07:00
Eric RozellandFacebook GitHub Bot 9d7cdfef17 Allow value extraction from folly::dynamic events (#50032)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71198197

fbshipit-source-id: 5e49e3b0fb01079870fbc7fc7e74ca0db354cda5
2025-03-18 12:12:03 -07:00
Eric RozellandFacebook GitHub Bot be92588a7f Add EventPayload::extractValue for NativeAnimated (#49988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49988

NativeAnimated currently depends on folly::dynamic event payloads for event-driven animations. While some events (e.g., ScrollEvent.h) have an `asDynamic` implementation, not all events do. In practice, NativeAnimated just needs to be able to extract an numeric value from a path to drive an animation.

Rather than converting events to dynamic, or otherwise special casing event handling, this change allows arbitrary payloads to implement `EventPayload::extractValue` to retrieve JS property path values directly from events, without intermediate conversions to dynamic.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71046682

fbshipit-source-id: 3544335ff9d50da87ced015de587b97204173b57
2025-03-18 12:12:03 -07:00
Peter AbbondanzoandFacebook GitHub Bot c99e3a8e60 Remove packager settings preference on empty host information (#49848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49848

Adds a new method to reset the server host in PackageConnectionSettings to its default state rather than relying on providing a blank string

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D70584220

fbshipit-source-id: 2862eee5f71bfe318da7199f2288367433d6f887
2025-03-18 11:59:12 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 88155fd0c4 Avoid generating <appname>, folders when running pod install (#50100)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50100

While moving the generation of `ReactCodegen.podspec` from Cocoapods to Codegen, we wrongly copied some parts of the script and now it is generating folders with a `,` as a suffix.

This change fixes the problem and prevent the generation of such folders.

## Changelog:
[Internal] -  Avoid generating `ios,` folders

Reviewed By: fabriziocucci

Differential Revision: D71395049

fbshipit-source-id: 1e6024af6e24834a682865792e64d056fb94e027
2025-03-18 09:18:07 -07:00
Alex HuntandFacebook GitHub Bot a00963d1d5 Update debugger-frontend from 97e9912...46feed4 (#50094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50094

Changelog: [Internal] - Update `react-native/debugger-frontend` from 97e9912...46feed4

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/97e9912605ce73b06f67fc607c1a5c434a67d6de...46feed41c15bcaafa086c1397562fa2af7cc503b).

Reviewed By: hoxyq

Differential Revision: D71391122

fbshipit-source-id: f7c201c407d417ec84509ae05a881bfc770009a0
2025-03-18 07:23:02 -07:00
Gijs WeteringsandFacebook GitHub Bot adbcaef1e1 Fix Nullsafe FIXMEs for DevSupportManagerBase.java (#50068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50068

Note: this involved tightening up some signatures in Kotlin files

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made DevSupportManagerBase.java nullsafe

Reviewed By: mdvacca

Differential Revision: D71126381

fbshipit-source-id: 01c08e2fc61eff885911fa9c295d504fa7ea334c
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot a00f884496 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java (#50067)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50067

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126382

fbshipit-source-id: d90966e62372395e864425c82321dc1fc04c1413
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot 61d4b04159 Fix Nullsafe FIXMES for BundleDownloader.java (#50066)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50066

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made BundleDownloader.java nullsafe

Reviewed By: alanleedev

Differential Revision: D71126383

fbshipit-source-id: 94e9e9dfc1db83d32046e370c895fa889dabf116
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot bdfa0085b7 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/BundleDownloader.java (#50065)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50065

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126388

fbshipit-source-id: a9f08b4ce101202cebe13107cc9c6a660deaf58f
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot e9e4c2adaf Fix Nullsafe FIXMEs for DebugOverlayController.java and mark nullsafe (#50064)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50064

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made DebugOverlayController.java nullsafe

Reviewed By: mdvacca

Differential Revision: D71126394

fbshipit-source-id: 77bba33f4f14566e133fa9e9649631bcffa3f0c9
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot cc00722b4a Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DebugOverlayController.java (#50063)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50063

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126397

fbshipit-source-id: b1cdea896d6cd9d25f9075e0bf35b9e16bf6ef65
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot fd23a08a3a Fix Nullsafe FIXMEs for CxxInspectorPackagerConnection.java and mark nullsafe (#50062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50062

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made CxxInspectorPackagerConnection.java nullsafe

Reviewed By: mdvacca

Differential Revision: D71126386

fbshipit-source-id: 94b6fca6972e5f08c22df7bebe6f853b5ceb20a7
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot 0ba17b49f8 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.java (#50061)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50061

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126390

fbshipit-source-id: 8ab63944b0e6ce3c78b14414e8a992c1321114f1
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot 311cef3c0d Fix Nullsafe FIXMEs for DevServerHelper.java and mark nullsafe (#50060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50060

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made DevServerHelper.java nullsafe

Reviewed By: rshest

Differential Revision: D71126391

fbshipit-source-id: 0d39b23d0d96f32f25ac1003d849428000777852
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot e9af9a1793 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java (#50059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50059

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126395

fbshipit-source-id: fb42b12dae542bde6e0e9e58baeaab054ed8c49e
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot 3289569747 Fix Nullsafe FIXMEs for JSDebuggerWebSocketClient.java and mark nullsafe (#50058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50058

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made JSDebuggerWebsocketClient.java nullsafe

Reviewed By: mdvacca

Differential Revision: D71126385

fbshipit-source-id: 8707e8c6b8092c0c301dc81a363758b60f38086a
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot 34a9ed049f Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSDebuggerWebSocketClient.java (#50057)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50057

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126392

fbshipit-source-id: 96464734a2edc7ec242cd3f3646222587d89eb2c
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot b40b1e679e Fix Nullsafe FIXMEs for MultipartStreamReader.java (#50056)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50056

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made MultipartStreamReader.java nullsafe

Reviewed By: mdvacca

Differential Revision: D71126393

fbshipit-source-id: 3b621be82cd874c608cb610ba35dff0be7cbd195
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot aa9dc3e924 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/MultipartStreamReader.java (#50055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50055

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126389

fbshipit-source-id: f41d3fbdfdfcde28a8bfc1d52efaca6a8b0fcb1a
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot 14de1c1cba Fix Nullsafe FIXMEs for StackTraceHelper.java and mark Nullsafe (#50054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50054

Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.

Changelog: [Android][Fixed] Made StackTraceHelper.java nullsafe

Reviewed By: javache

Differential Revision: D71126387

fbshipit-source-id: 3456dde049b50e48ad703fe8312cf57b8d849515
2025-03-18 06:08:17 -07:00
Gijs WeteringsandFacebook GitHub Bot 3c795e4ac6 Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/StackTraceHelper.java (#50053)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50053

Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D71126384

fbshipit-source-id: 6a2e348f75b0b589de080bf060c4669db82a69c6
2025-03-18 06:08:17 -07:00
Fabrizio CucciandFacebook GitHub Bot ff518d799b Fix changelog entry for v0.79.0-rc.2 (#50093)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50093

As per title.

Reviewed By: cortinico

Differential Revision: D71387134

fbshipit-source-id: a2705d448a1e81412c29405459428f8c6fa2d994
2025-03-18 06:02:50 -07:00
Rubén NorteandFacebook GitHub Bot 17da3cbbf4 Avoid errors when dispatching mount operations within mount hooks (#50091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50091

Changelog: [internal]

If a library uses mount hooks to perform mount operations, it's possible to get concurrent modifications of the list of pending surface IDs to report.

This fixes that potential error by making a copy of the list before dispatching the mount notifications.

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

Reviewed By: javache

Differential Revision: D71387739

fbshipit-source-id: 96c723ef2d6bcc659c4452434b7a4d5af26117ef
2025-03-18 05:59:50 -07:00
Rubén NorteandFacebook GitHub Bot e4d51cd866 Correctly batch reportMount calls (#50090)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50090

Changelog: [internal]

I refactored `FabricUIManager` in D54547194 / https://github.com/facebook/react-native/pull/43337 and accidentally removed setting this flag to avoid scheduling redundant tasks in the UI thread to report mount. This fixes it.

Reviewed By: javache

Differential Revision: D71387374

fbshipit-source-id: cad8a3ead2434738325560902cbab817e5d5dde7
2025-03-18 05:59:50 -07:00
Christian FalchandFacebook GitHub Bot b7e046e345 change header structure rn deps in XCFrameworks (#50085)
Summary:
Headers are currently copied into each arch in the final xcframework. This is not necessary and will cause a lot of duplication since these files are the same for all archs.

This commit fixes this by only copying headers when we build the final XCFramework:

- ReactNativeDependencies.podspec: Changed the prepare script to be more resilient to different header structs, since we have multiple ways of packaging our tarballs locally and on the servers
- build.js: Removed copying headers when building frameworks
- compose-framework.js: Added copying headers once to the root of the XCFramework.
- rndependencies.rb: updated docs with correct ENV vars

bypass-github-export-checks

## Changelog:

[INTERNAL] - Changes the header structure in our XCFramework to avoid duplication

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

Test Plan: Run RNTester with RCT_USE_RN_DEPS=1 to use prebuilt RN Deps.

Reviewed By: javache

Differential Revision: D71385183

Pulled By: cipolleschi

fbshipit-source-id: 160d56dea7f61d1b8d0a45b80f6c0789647358e6
2025-03-18 05:24:56 -07:00
Christian FalchandFacebook GitHub Bot 9cf138310d fixed inclusion of resources in swift package (#50050)
Summary:
We had some issues with the Swift package build step where we saw an error message when we included resources and couldn't find out why this was happening.

After systematically going through the generated swift package file and looking for a reason I found a mistake.

When we generate the Package.swift file we pass all compilerFlags from the configuration of the target to both cpp/c flags - which in the case of the folly target ends up being passed to the dependency scanner which isn't too happy about this c++ flag.

The solution was to split `compilerFlags` into `cCompilerFlags` and `cxxCompilerFlags`.

This commit fixes this by:
- split `compilerFlags` into `cCompilerFlags` and `cxxCompilerFlags`.
- Updated configuration with correct settings
- Updated Package.swift generation to use these new flags
- Fixed issue with the copy bundles step that didn't copy the directory in some cases.

## Changelog:

[INTERNAL]  - Fixed processing resources in the generated swift package for the RN Dependencies/prebuild

## Test-plan

Test by prebuilding RNDependencies, include the XCFramework in a new app and try to load resource bundles:

```obj-c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  std::string input = "3.1416 xyz ";
  double_conversion::DoubleToStringConverter::EcmaScriptConverter();
  LOG(INFO) << "Hello from GLOG";
  fmt::print("Hello, world from FMT!\n");
  BOOST_ASSERT(100 == 100);
  double result;
  fast_float::from_chars(input.data(), input.data() + input.size(), result);
  LOG(INFO) << "Answer :" << result;

  NSArray *frameworks = [NSBundle allFrameworks];

  for (NSBundle *framework in frameworks) {
    NSString *frameworkName = framework.bundleURL.lastPathComponent;
    if ([frameworkName isEqualToString: @"ReactNativeDependencies.framework"]) {
      [self loadBundle:framework bundleName:@"ReactNativeDependencies_glog"];
      [self loadBundle:framework bundleName:@"ReactNativeDependencies_boost"];
      [self loadBundle:framework bundleName:@"ReactNativeDependencies_folly"];
      break;
    }
  }
  return YES;
}

- (void) loadBundle:(NSBundle*)framework bundleName: (NSString*)bundleName {
  NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
  NSURL *bundleURL = [bundle URLForResource:bundleName withExtension:@"bundle"];
  NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
  NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
  if (url == nil) {
    LOG(ERROR) << "Could not find PrivacyInfo.xcprivacy in the " << [bundleName UTF8String] << " bundle";
  } else {
    LOG(INFO) << "Found PrivacyInfo.xcprivacy in " << [bundleName UTF8String] << ".";
  }
}
```

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

Reviewed By: javache

Differential Revision: D71316215

Pulled By: cipolleschi

fbshipit-source-id: 53093f962874101f5618997fdac3dd4550768da5
2025-03-18 05:24:56 -07:00
Pieter De BaetsandFacebook GitHub Bot fab7fa88e3 Correctly compare oldProps in RCTPullToRefreshViewComponentView (#50092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50092

`oldProps` can be null, so this is an unsafe dereference. We also typically compare with `_props`, which represents the previous state of the component.

Changelog: [General][Fixed] Fixed crash in RCTPullToRefreshViewComponentView#updateProps

Reviewed By: cipolleschi

Differential Revision: D71388015

fbshipit-source-id: deff9c581ee207c4481056a720c10dfd661f088d
2025-03-18 05:23:29 -07:00
Rubén NorteandFacebook GitHub Bot 1f0b27ae86 Fix crash in fixMountingCoordinatorReportedPendingTransactionsOnAndroid feature flag (#50088)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50088

Changelog: [internal]

This fixes a crash when using the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag. The problem was that we were accessing the surface handler registry safely, but there were cases where invalid surface handler references were being kept in the registry.

Reviewed By: javache

Differential Revision: D71387111

fbshipit-source-id: 643fcdf10c4c5751d77e276efb37795b7af726bb
2025-03-18 05:22:12 -07:00
Mateo GuzmánandFacebook GitHub Bot ac97177651 Migrate ShadowNodeRegistry to Kotlin (#50081)
Summary:
Migrate com.facebook.react.uimanager.ShadowNodeRegistry to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.ShadowNodeRegistry to Kotlin

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

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

Reviewed By: cortinico, rshest

Differential Revision: D71385038

Pulled By: javache

fbshipit-source-id: 155c9d5b60e3e4b4436424577c1868d60dfb4014
2025-03-18 04:33:24 -07:00
Mateo GuzmánandFacebook GitHub Bot d6ca25b0c1 Migrate UIManagerModuleConstants to Kotlin (#50045)
Summary:
Migrate com.facebook.react.uimanager.UIManagerModuleConstants to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.UIManagerModuleConstants to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D71307448

Pulled By: javache

fbshipit-source-id: 63b8e54a0020d68d127c07f605a91a0dda403975
2025-03-18 04:29:19 -07:00
Mateo GuzmánandFacebook GitHub Bot 00105b8054 Migrate OnLayoutEvent to Kotlin (#50082)
Summary:
Migrate com.facebook.react.uimanager.OnLayoutEvent to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.OnLayoutEvent to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D71385027

Pulled By: javache

fbshipit-source-id: 19985a494a68e63a2e3404ce2972c03161d61527
2025-03-18 04:22:48 -07:00
Fabrizio CucciandFacebook GitHub Bot 2259db6d4b Add changelog entry for v0.79.0-rc.2 (#50084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50084

As per title.

Reviewed By: cortinico

Differential Revision: D71375255

fbshipit-source-id: 6f346d94d7189314852bf9409919d879a05d5c95
2025-03-18 01:39:52 -07:00
Sam ZhouandFacebook GitHub Bot 796cc43ec4 Deploy 0.265.3 to xplat (#50083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50083

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71354083

fbshipit-source-id: 33fe2c11ad8cba88d3d206a15976510991d3663e
2025-03-17 19:58:21 -07:00
Tim YungandFacebook GitHub Bot cf67427406 RN: Trim Leading Slash in DevServerHelper (#50077)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50077

Currently, `DevServerHelper` will fetch malformed URLs if the supplied `resourcePath` has a leading slash.

This diff adds a warning and automatically trims the leading slash when this happens.

Changelog:
[Android][Changed] - Leading slash supplied to `DevServerHelper.downloadBundleResourceFromUrlSync` will now be trimmed and emit a warning.

Reviewed By: robhogan

Differential Revision: D71333088

fbshipit-source-id: 636c9c6c6919d1e9d4a829ed5ae7253f829e549c
2025-03-17 15:58:45 -07:00
Vitali ZaidmanandFacebook GitHub Bot f4d2d39ccb add dev middleware ws socket close reasons (#50071)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50071

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

Changelog:
[General][Internal] Send code and close reasons when we close the connection to any websockets from the dev middleware

This should improve the debuggability of our code.

Reviewed By: robhogan

Differential Revision: D71314509

fbshipit-source-id: 1d6fc57a8601bcea78e95a87d423c7c46c51e799
2025-03-17 10:41:47 -07:00
zhongwuzwandFacebook GitHub Bot a802be0224 iOS: Fixes Switch component incorrectly renders as toggled on even though value prop is hardcoded to false (#50049)
Summary:
Fixes https://github.com/facebook/react-native/issues/50026

## Changelog:

[IOS] [FIXED] - [Fabric] iOS: Fixes Switch component incorrectly renders as toggled on even though value prop is hardcoded to false

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

Test Plan: Repro please see https://github.com/facebook/react-native/issues/50026.

Reviewed By: javache

Differential Revision: D71307864

Pulled By: cipolleschi

fbshipit-source-id: 57238296842229cf2f23a3f44134f43e27b54609
2025-03-17 09:10:58 -07:00
Jakub PiaseckiandFacebook GitHub Bot 5349b7c7b5 Update codegen to support namespaced types (#49950)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49950

Changelog: [GENERAL][CHANGED] - Changed `react-native-codegen` to support types under `CodegenTypes` namespace

## Summary

Currently, codegen relies on deep importing types under `react-native/Libraries/Types/CodegenTypes` to be properly type-checked. Updating codegen to support types under a single namespace will enable us to provide a single import from the package with access to all relevant types.

Reviewed By: huntie

Differential Revision: D70967809

fbshipit-source-id: 41241dcc51965f4243acd34e8b63475cb56ca67a
2025-03-17 07:26:17 -07:00
Dawid MałeckiandFacebook GitHub Bot 321efa9448 Add lint rule preventing "Node" imports from react and migrate "Node" types to use React namespace in react-native (#50030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50030

In Flow importing Node from react is equivalent importing ReactNode in Typescript. During translation Node is not translated to ReactNode but React.Node is translated to React.ReactNode. The easiest solution is to migrate all "Node" types to "React.Node"  so that the translation is correct. To make sure that everyone follow the lint rule is added that checks for Node imports from react.

Changelog:
[Internal] - Added lint rule preventing "Node" imports from react and migrated "Node" types to use React namespace in react-native

Reviewed By: javache, huntie

Differential Revision: D71189533

fbshipit-source-id: baea8feb46be3dc30b6e58bcefe140655ec0530a
2025-03-17 06:47:23 -07:00
Mateo GuzmánandFacebook GitHub Bot 8ae4bbc9a5 Migrate ReactAndroidHWInputDeviceHelper to Kotlin (#50046)
Summary:
Migrate com.facebook.react.ReactAndroidHWInputDeviceHelper to Kotlin.

## Changelog:

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

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

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

Reviewed By: cortinico

Differential Revision: D71307536

Pulled By: javache

fbshipit-source-id: 60c458127b7a7e99d9c8bbb4715cab04452984da
2025-03-17 06:14:18 -07:00
Jakub PiaseckiandFacebook GitHub Bot 850760ab61 Overwrite betterHitTest in RCTScrollViewComponentView instead of changing layout metrics of the container view (#50027)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50027

Changelog: [IOS][CHANGED] - Overwrite betterHitTest in RCTScrollViewComponentView instead of changing layout metrics of the container view

## Summary:

In https://github.com/facebook/react-native/pull/49855 I changed the container view of `RCTScrollViewComponentView` to be `RCTViewComponentView` instead of `UIView` so the touches would bass through its `betterHitTest` implementation (along with udating its layout metrics so the right path in the function is chosen). This resulted in some issues and the alternative approach of customizing the hit testing of the ScrollView itself might be a better approach.

This PR changes overwrites the `betterHitTest` method in a way that the `containerView` is entirely skipped during hit testing, instead forwarding the call to its children. This way, it won't prevent touches outside its frame from being delivered to children that extend out of the frame.

Reviewed By: cipolleschi

Differential Revision: D71187882

fbshipit-source-id: 9d0c79048f389b9bee37dea1e59226b54ddbe6f2
2025-03-17 05:03:25 -07:00
Mateo GuzmánandFacebook GitHub Bot d350b69608 Migrate MemoryPressureRouter to Kotlin (#50048)
Summary:
Migrate com.facebook.react.MemoryPressureRouter to Kotlin.

## Changelog:

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

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

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

Reviewed By: cortinico

Differential Revision: D71307420

Pulled By: javache

fbshipit-source-id: f85efe0a0dc2828cdc128eed952d5298c546b116
2025-03-17 04:42:37 -07:00
Jakub PiaseckiandFacebook GitHub Bot 77cdaa8733 Remove the workaround used for measuring multiline text on iOS (#50028)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50028

Changelog: [IOS][CHANGED] - Replace a workaround for measuring multiline text with `maximumNumberOfLines` on iOS with a proper solution

## Summary:

In https://github.com/facebook/react-native/pull/49549 support for `numberOfLines` was added to iOS `TextInput`. Along that, a workaround for measuring multiline text with limited number of lines was added to avoid an edge case coming from `NSTextContainer` measuring empty lines even if they are over the line limit.

This PR handles that case properly by counting and measuring individual lines to properly handle the offending edge case.

Reviewed By: NickGerleman

Differential Revision: D71111841

fbshipit-source-id: 6adb4450a13fcc845604622ea76576658a7537aa
2025-03-17 00:14:29 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot fc7385c1ea Back out "Fix keyboard navigation for FlatList with removeClippedSubviews enabled"
Summary:
Original commit changeset: 1df7f90066df

Original Phabricator Diff: D69618406

Original diff caused unintended scrolling on some interactions that trigger focus searching

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D71217683

fbshipit-source-id: faa977ba0fddbf776868d6204d283555e169ba96
2025-03-14 15:15:01 -07:00
Sam ZhouandFacebook GitHub Bot bcd6b5fbd9 Deploy 0.265.2 to xplat (#50041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50041

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71200832

fbshipit-source-id: a2f267c5b2beabe527f958bfc4557bafc04d27de
2025-03-14 14:57:39 -07:00
David VaccaandFacebook GitHub Bot 7ce628277e Fix typos on featureflags/types.js (#50037)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50037

Fix typos on featureflags/types.js

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D71210260

fbshipit-source-id: 4a4eabf7ab6b73dca2bdcb42dcd36f2168b2f0e0
2025-03-14 12:46:24 -07:00
Nicola CortiandFacebook GitHub Bot c6be72a28d Cleanup changelog for a specific breaking change
Summary:
As discussed with huntie, this is not a breaking change.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: huntie

Differential Revision: D71201094

fbshipit-source-id: 3a27e621ac7718e4574c7981e5d64802e36e74cd
2025-03-14 11:44:01 -07:00
Samuel SuslaandFacebook GitHub Bot 9d19992088 add documentation for Fantom public APIs (#50034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50034

changelog: [internal]

add documentation for Fantom public APIs.

Reviewed By: rubennorte

Differential Revision: D71197744

fbshipit-source-id: dc7f97732eb6437bc0a33dec9fe2430e38c49e66
2025-03-14 11:12:15 -07:00
Samuel SuslaandFacebook GitHub Bot 0f45d332d4 move Fantom's API to regular functions (#50035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50035

changelog: [internal]

to make it easier to write JSDocs, let's export functions directly from index.js instead of using proxy object.

Reviewed By: rubennorte

Differential Revision: D71200977

fbshipit-source-id: 0b53c0d3f73577c19253537b9e884459a4920643
2025-03-14 11:12:15 -07:00
Danny SuandFacebook GitHub Bot 827db0a88b Explicitly include hermes.h in RCTHostTests.mm (#50022)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50022

RCTHostTests.mm calls `makeHermesRuntime`, which is from `hermes.h`. Explicitly include the header so that RCTHostTests isn't getting it indirectly.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D71146426

fbshipit-source-id: 5a5f5a466e1920797c4531773ca23f53eb1203b7
2025-03-14 11:08:25 -07:00
Mateo GuzmánandFacebook GitHub Bot 8eaa8f5adb Migrate JSPackagerClient to Kotlin (#50018)
Summary:
Migrate com.facebook.react.packagerconnection.JSPackagerClient to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.packagerconnection.JSPackagerClient to Kotlin

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

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

Reviewed By: cortinico, rshest

Differential Revision: D71153096

Pulled By: arushikesarwani94

fbshipit-source-id: c9a15bb0d45c381b6897842a35dc5ccd712ee3a1
2025-03-14 10:49:29 -07:00
Vitali ZaidmanandFacebook GitHub Bot c07334ca03 logging- log socket connection uptime in dev middleware (#50016)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50016

Changelog:
[General][Internal] logging- log socket connection uptime in dev middleware

Reviewed By: robhogan

Differential Revision: D71126344

fbshipit-source-id: 026bac9620ffb933d90db255b59fbf79bfed902b
2025-03-14 09:16:30 -07:00
Samuel SuslaandFacebook GitHub Bot 6e6e2ea0ca add tests for Fantom.scheduleTask (#50033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50033

changelog: [internal]

All public APIs should be covered with tests, this diff adds tests for Fantom.scheduleTask.

Reviewed By: rubennorte

Differential Revision: D71195921

fbshipit-source-id: dc7f0f889b9633b1e641dc8887fd506bc4753fe5
2025-03-14 09:03:12 -07:00
Zeya PengandFacebook GitHub Bot 01eafef8b4 Add updateShadowTree to UIManager (#50020)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50020

Changelog: [Internal]
[General][Added] - Add `updateShadowTree` to UIManager

We have an internal method `updateShadowTree` that does similar thing as `ReanimatedModuleProxy::cloneShadowTreeWithNewProps` in reanimated (https://github.com/software-mansion/react-native-reanimated/blob/6516b2e4e12c0186cdf00e7f85b8fef820b97088/packages/react-native-reanimated/Common/cpp/reanimated/Fabric/ShadowTreeCloner.cpp#L67 it's logically similar but not copied over), with which we can efficiently commit props for multiple shadowNodes onto ShadowTree. it guarantees every ShadowNode that needs to be updated in this commit is only cloned once.

Reviewed By: javache

Differential Revision: D71129150

fbshipit-source-id: 92156114ec6c2694e1639cf2ecf153d243ade769
2025-03-14 08:42:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 54b22211dc Remove CGFLOAT_IS_DOUBLE macro (#50017)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50017

[From iOS 11 onwards and from MacOS 10.15](https://developer.apple.com/documentation/uikit/updating-your-app-from-32-bit-to-64-bit-architecture?language=objc), Apple only supports 64 bit architectures.

Hence, [`CGFloat` is now always mapped to a Double](https://developer.apple.com/documentation/corefoundation/cgfloat-swift.struct?language=objc#overview) and it is now safe to remove the macro.

## Changelog
[Internal] - Remove usages of `CGFLOAT_IS_DOUBLE`

Reviewed By: javache

Differential Revision: D71128583

fbshipit-source-id: bad805b941451ab84a68912f6d72149bfd7753ec
2025-03-14 06:46:00 -07:00
Vitali ZaidmanandFacebook GitHub Bot a6e854efe9 extract heartbeat mechanics from inspector proxy to its own file (#49993)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49993

Changelog:
[General][Internal] extract heartbeat mechanics from inspector proxy to its own file

Reviewed By: robhogan

Differential Revision: D70970405

fbshipit-source-id: 22565853a426f3156c9eed0dfd22492dd8e31407
2025-03-14 06:38:16 -07:00
Ritesh Kumar ShuklaandFacebook GitHub Bot 3dac90006f Implementing url Methods (#49955)
Summary:
Implemented Methods in URL which were not implemented yet
The methods output are identical to outputs of window.url .

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

## Changelog:

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

Pick one each for the category and type tags:

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

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General][Added] URL accessors for unimplemented Methods

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

Test Plan:
Code:-
<img width="558" alt="image" src="https://github.com/user-attachments/assets/a75e5429-0e03-4392-9fde-138c63b96ce5" />

Tested with Hermes
![image](https://github.com/user-attachments/assets/0075826a-df3a-4eae-a8f2-bec26be42fbf)

Tested with JSC
![image](https://github.com/user-attachments/assets/bcdbd430-5ee3-48a2-873f-7d823c9072f6)

Reviewed By: rshest

Differential Revision: D71113046

Pulled By: cortinico

fbshipit-source-id: 58093c61d2e7bb732d2f1af6b19508a100c86333
2025-03-14 05:22:48 -07:00
Dawid MałeckiandFacebook GitHub Bot ef0de0e848 Move event-target-shim types to react-native package (#50013)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50013

The diff incorporates event-target-shim types that will be referenced by generated TS types to make sure that the public API does not change unexpectedly. The generated tsconfig contains path property which tells Typescript to use copied types instead of the downloaded event-target-shims types.

Changelog:
[internal] - Moved event-target-shim types to react-native package.

Reviewed By: huntie

Differential Revision: D71044389

fbshipit-source-id: b2837cc880a2161f7ff716470fd6eb4644d514e2
2025-03-14 01:54:14 -07:00
Pieter VanderwerffandFacebook GitHub Bot 934c4465ae Deploy 0.265.0 to fbsource (#50025)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50025

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D71158296

fbshipit-source-id: db3e5678c97536517cdb0375843f2c882d5213f9
2025-03-13 17:18:45 -07:00
David VaccaandFacebook GitHub Bot 920f0f8fbe Avoid debug crash when SendAccessibilityEventMountItem fails due to view dissapearing (#50021)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50021

Avoid debug crash when SendAccessibilityEventMountItem fails due to view dissapearing

changelog: [internal] internal

Reviewed By: makovkastar

Differential Revision: D71135286

fbshipit-source-id: b75f048ac241d2001eade8f0dd19234bdd55178f
2025-03-13 13:28:08 -07:00
Rubén NorteandFacebook GitHub Bot 5d10012106 Add Fantom test for requestIdleCallback (#50019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50019

Changelog: [internal]

This adds some basic tests for the API to show that it's working correctly.

This was in response to https://github.com/facebook/react-native/issues/49684. If there are use cases that we think are incorrectly handled, we should add them to this test.

Reviewed By: cortinico

Differential Revision: D71128943

fbshipit-source-id: 73876ba514c23ec8f829723500fa408512b90222
2025-03-13 12:09:12 -07:00
Eric RozellandFacebook GitHub Bot 8673294806 Add option for deterministic Animated batching on iOS (#49942)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49942

iOS flushes NativeAnimated operations to the UI thread in one of two ways:
1. Some operations flush immediately when the operation is queued, namely startAnimation, stopAnimation, and setValue.
2. Other operations rely on flushing from one of the previous operation types, or a UIManager mount callback.

This behavior leads to non-determinism in flushing of some operations like `setOffset` or `startListeningToAnimatedNodeValue`, where if these operations are created, out-of-band from "flushed" operations, they will not take affect until the next React commit.

This change wires up the `animatedShouldSignalBatch` feature flag to queue operations on the JS thread, and flush them after `NativeAnimated.finishOperationBatch` is called.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D70904592

fbshipit-source-id: 6bc7a8614cbe5e275d4d7bf5310da9f0090c0e10
2025-03-13 11:52:26 -07:00
Rubén NorteandFacebook GitHub Bot 6838d46b70 Clean up feature flag for TextInput state synchronization (#49989)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49989

Changelog: [internal]

This experiment didn't yield any significant wins and there are some failing e2e tests which seem suspicious, so better be safe and keep the current version.

Reviewed By: javache

Differential Revision: D71050517

fbshipit-source-id: da14fdd49e8d39cdcdc1dd579a50af3bf894d08a
2025-03-13 11:11:05 -07:00
Pieter De BaetsandFacebook GitHub Bot 2196597e2b Makes TouchesHelper internal (#50014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50014

This was unintentionally made public during the Kotlin migration (D67791375), revert back to internal visibility, and update some of the deprecation comments.

Changelog: [Android][Removed] TouchesHelper is no longer part of the public API

Reviewed By: Abbondanzo

Differential Revision: D71114176

fbshipit-source-id: 2bd8882039fb972e1c2632a503292080c56a2f22
2025-03-13 09:48:01 -07:00
Joseph NieldsandFacebook GitHub Bot 86911003dc Add compact option (#49979)
Summary:
If you use this preset to create library code, it is often helpful to be able to still read the transpiled code, even when sourcemaps are available.

This change adds a compact option which allows for disabling the default behavior that removes whitespace from the transpiled files.

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Add `compact` option to `react-native/babel-preset` to allow disabling whitespace removal

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

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

Reviewed By: rshest

Differential Revision: D71109024

Pulled By: robhogan

fbshipit-source-id: ab205cca2a82b56955d1e1c55e288dcbe7754f8f
2025-03-13 09:22:23 -07:00
Tim YungandFacebook GitHub Bot 2a40010215 Animated: Avoid Invalidation of Ref Callback (#50002)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50002

Creates a new feature flag, `avoidAnimatedRefInvalidation`, to experiment with changing `useAnimatedProps`, so that the returned ref callback is no longer invalidated when `props` changes.

When we introduced `useAnimatedPropsMemo` and stabilized `AnimatedProps` (which is only invalidated when `AnimatedValue` and shallow `AnimatedEvent` instances are changed in an update), we should have also made this change. It was an oversight that we did not do this.

Avoiding unnecessary invalidation of the ref callback is important to reduce extra work and unpredictable semantics associated with unnecessary detaching and re-attaching of refs.

Changelog:
[Internal]

Reviewed By: lunaleaps, jbrown215

Differential Revision: D71074781

fbshipit-source-id: 82386a79b8e9bed0b74d9b85978af66f453a7ad0
2025-03-13 08:52:50 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dd7dccd88b Add Nightly support for prebuilds (#49991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49991

This change adds nightly support for prebuilds.

t works the same way hermes works: if the react native version contains nightly, we try to use that version to download the right tarball.

To work, it needs to use the `RCT_USE_RN_DEP` env variable.

## Changelog
[Internal] - Add Nightly support to consume ReactNativeDependencies

Reviewed By: cortinico

Differential Revision: D71050926

fbshipit-source-id: 9f461b5f17fde960d92b4082bc60f76959e82cdf
2025-03-13 08:40:14 -07:00
Riccardo CipolleschiandFacebook GitHub Bot b8ab4c8d96 Connect ReactNativeDependencies with ios jobs (#49978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49978

This change connects the RNDependencies we prebuild in CI with the other iOS jobs we have.

By doing so, we aim to speed up the build time in CI, saving time and money.

## Changelog:
[Internal] - Connect the ReactNativeDependencies in CI

Reviewed By: cortinico

Differential Revision: D71034587

fbshipit-source-id: 14f1237f4fb57ee103a80be1718042d66ff7b0d7
2025-03-13 08:40:14 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a663731ddd Add Support for local tarball to ReactNativeDependencies (#49970)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49970

This change add supports to pass a tarball from a local file to the ReactNativeDependencies podspec, so that we can build React Native using a local copy or the RNDependencies and we can use it also in CI.

## Changelog:

[INTERNAL] - Add support for local tarballs

Reviewed By: cortinico

Differential Revision: D71032641

fbshipit-source-id: d83c96c8c12f3add45f8f5ea15fa0eac06d0bedf
2025-03-13 08:40:14 -07:00
Christian FalchandFacebook GitHub Bot 4c9431adda Update podspecs to use the ReactNativeDependencies or build from source (#49968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49968

Updates all the core podspec to use the new `ReactNativeDependencies` podspec

## Changelog:

[INTERNAL] - Updates Modules in core to use the new dependencies.

Test Plan:
 Run Rn-Tester and  verify that it works as expected both building deps from source and using prebuilt tarballs
 Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities

Reviewed By: cortinico

Differential Revision: D71032639

Pulled By: cipolleschi

fbshipit-source-id: e53179a8c1b47ee2b945f5cb5dfaf3f6f2755af2
2025-03-13 08:40:14 -07:00
Christian FalchandFacebook GitHub Bot 1e13ad64d8 Configure the Cocoapods infrastructure to use the ReactNativeDependencies.podspec (#49971)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49971

Updated the Cocoapods infrastructure to use the new  the `ReactNativeDependencies.podspec`

## Changelog:

[INTERNAL] - Configured the Cocoapods infra to use the new `ReactNativeDependencies.podspec`

Test Plan:
 Run Rn-Tester and  verify that it works as expected both building deps from source and using prebuilt tarballs
 Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities

Reviewed By: javache, cortinico

Differential Revision: D71032638

Pulled By: cipolleschi

fbshipit-source-id: 154c8891d5b8b4b84952274c169479122a4800b1
2025-03-13 08:40:14 -07:00
Christian FalchandFacebook GitHub Bot 6bde3ce715 Add ReactNativeDependencies.podspec and replace script. (#49812)
Summary:
There are two environment variables that is related to ReactNativeDependencies:
- `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source.
- `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used.
bypass-github-export-checks
## Changelog:

[INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods

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

Test Plan:
 Run Rn-Tester and  verify that it works as expected both building deps from source and using prebuilt tarballs
 Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities

Reviewed By: javache

Differential Revision: D70968672

Pulled By: cipolleschi

fbshipit-source-id: bb93e763bd71cec7314565b5a751b226735b404e
2025-03-13 08:40:14 -07:00
Christian FalchandFacebook GitHub Bot e876e4926f Improve RCT-Folly so that other dependencies don't have to specify the folly flags (#49969)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49969

Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies.

## Changelog:

[INTERNAL] - Configure folly in a prepare step

Test Plan:
 Run Rn-Tester and  verify that it works as expected both building deps from source and using prebuilt tarballs
 Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities

Reviewed By: javache

Differential Revision: D71032640

Pulled By: cipolleschi

fbshipit-source-id: a34a9b38fa5d5b37a0a193a73659f0d45dd3d660
2025-03-13 08:40:14 -07:00
Dawid MałeckiandFacebook GitHub Bot c50465c637 Add support for triple-slash directives in generated .d.ts files (#50008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50008

The diff adds extraction of triple-slash directives using regex to match and retrieve following reference.

Changelog:
[internal] - Added support for triple-slash directives in generated .d.ts files

Reviewed By: huntie

Differential Revision: D71113674

fbshipit-source-id: 2207d5b455515c44ba585ffecc063914e0818e58
2025-03-13 08:00:59 -07:00
Samuel SuslaandFacebook GitHub Bot 65ffc588fb introduce convenience method Fantom.scrollTo (#50011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50011

changelog: [internal]

Majority of time, you want to simply scroll. This diff introduces a convenience method Fantom.scrollTo.

Previously, you would have to write:
```
  Fantom.runOnUIThread(() => {
    Fantom.enqueueScrollEvent(element, {
      x: 0,
      y: 60,
    });
  });
  Fantom.runWorkLoop();
```

Now, you can just do:
```
 Fantom.scrollTo(element, {
    x: 0,
    y: 60,
  });
```

Reviewed By: rubennorte

Differential Revision: D71113680

fbshipit-source-id: aed49a2f12be8ab30be549235cc7a2b3e35faadb
2025-03-13 07:42:32 -07:00
Samuel SuslaandFacebook GitHub Bot b275a318a6 rename fantom.scrollTo to fantom.enqueueScrollEvent (#50009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50009

changelog: [internal]

rename method `scrollTo` to `enqueueOnScrollEvent` to make it obvious that event is only enqueued and not executed.

Reviewed By: rubennorte

Differential Revision: D71027761

fbshipit-source-id: 8a22babc2f5e86196c0b0af75ab65d539048dc72
2025-03-13 07:42:32 -07:00
Alex HuntandFacebook GitHub Bot bf35a00ba2 Align organisation of index exports (#49975)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49975

Removes the "Plugins" category from the non-structural grouping of exports in `index.js`, `index.js.flow`, aligning these with the "APIs" and "Components" categories in our docs.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D71033295

fbshipit-source-id: bd39bb6ff5e30c1ed0a8d56d1ed61d52120fb776
2025-03-13 06:53:17 -07:00
Jakub PiaseckiandFacebook GitHub Bot e4721332a8 Align AppRegistry namespace with Animated (#49928)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49928

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70894716

fbshipit-source-id: cb0d2f6405a1ceabdd1f0fb89bf936e2e8c83e3c
2025-03-13 06:26:44 -07:00
Rubén NorteandFacebook GitHub Bot 1e38964e91 Clean up enableDOMDocumentAPI feature flag (#49990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49990

Changelog: [internal]

This cleans up the flag and makes the Document API essentially part of the DOM APIs flag, after we've verified this is stable in a production experiment.

Reviewed By: sammy-SC

Differential Revision: D68772174

fbshipit-source-id: 3b3d0c4369a648faab3dc7caed8eec2c95fa05b3
2025-03-13 05:50:59 -07:00
Mateo GuzmánandFacebook GitHub Bot a9babf9bc9 Migrate ViewAtIndex to Kotlin (#49963)
Summary:
Migrate com.facebook.react.uimanager.ViewAtIndex to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.ViewAtIndex to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D71031245

Pulled By: javache

fbshipit-source-id: eb9d4fd59a6017b9ef65b239ee73697b476df8f2
2025-03-13 05:28:50 -07:00
Vitali ZaidmanandFacebook GitHub Bot b226049a4a Update tests to support new didOpen delegate fn (#50006)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50006

Changelog: [Internal]

Reviewed By: robhogan, huntie

Differential Revision: D71111802

fbshipit-source-id: 733a601007125b6aed4411ba95a41845823a26da
2025-03-13 04:22:14 -07:00
Andrew KnappandFacebook GitHub Bot 313d7d79d4 Fix 49958: Close a view leak due to lossy onAnimationEnd callback (#49959)
Summary:
Android's onAnimationEnd callback is lossy and ocasionally just does not fire.  However the LayoutAnimationController maintains a sparse array of animations (with Strong View refs) that is only cleaned when the onAnimationEnd callback is invoked.  This results in a leak of Android View objects over time.

To avoid this, the Strong View refs are migrated to WeakReference's and the associated sparse array is cleaned of any invalid layout animations in response to the reset() call.

This closes two leaks:
1. Unbound growth in LayoutAnimationController::mLayoutHandlers
2. Pinning View objects into memory as the sole remaining GC root

## Changelog:

1. Made OpacityAnimation and PositionAndSizeAnimation classes hold weak refs to views only
2. Added a method to LayoutHandlingAnimation to surface if their view ref is gone
3. Added cleanup for Animation with bad view refs

Pick one each for the category and type tags:

[ANDROID] [Fixed]- Fixes memory leak

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

Test Plan: * Primarily code inspection and regression given the intermittent nature of Android's failure to execute the callback.

Reviewed By: alanleedev

Differential Revision: D71037262

Pulled By: javache

fbshipit-source-id: 1fa4eaa2ca839f347a55cb37e2648db972748586
2025-03-13 04:17:17 -07:00
Vitali ZaidmanandFacebook GitHub Bot e2eed3984e update the npm package "debug" flow types to v4.4.x (#49980)
Summary:
X-link: https://github.com/facebook/metro/pull/1462

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

Changelog:
[General][Internal] update the npm package "debug" flow types to v4.4.x

Reviewed By: robhogan

Differential Revision: D70976838

fbshipit-source-id: 7ca7daf5e7677721b0464c66dd482a40cea3ae61
2025-03-13 04:10:38 -07:00
Tim YungandFacebook GitHub Bot 1bb7446993 RN: Set react.runtime=automatic in Flow Config (#50001)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50001

Updates `react-native/.flowconfig` with the following option:

```
react.runtime=automatic
```

This adjusts Flow to model the current behavior of React and JSX, relaxing the requirement that JSX elements have `React` within scope.

Changelog:
[General][Changed] - Changed Flow for the React Native monorepo, so that `React` no longer has to be in scope when using JSX.

Reviewed By: javache

Differential Revision: D71096283

fbshipit-source-id: 65762ac39206c682b7be5d3f512b2b83f7eb1b49
2025-03-13 04:09:43 -07:00
Nick GerlemanandFacebook GitHub Bot 5e7c0d2096 Add Jest E2E Tests for S462299 (#50000)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50000

This adds some tests that verify that controlled textinput, via text prop, or children creating attributedstring, does not jumble text, so long as JS side does not mutate underlying text content.

The rewriting/max length example does still run into problems here.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D71076703

fbshipit-source-id: 85995e8cc087533b1115f158ba5dad67ed008289
2025-03-12 19:45:29 -07:00
Luna WeiandFacebook GitHub Bot da3b98bbcd Call RCTScreenSize early (#49999)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49999

Changelog: [Internal]

Early initialize call to RCTScreenSize which is used by Modal and will read screen size off the UI Thread to avoid main thread deadlocks

Reviewed By: sammy-SC

Differential Revision: D70999156

fbshipit-source-id: 47fb8666c3330ee67cbcb430060f0cec37ec3c7c
2025-03-12 18:26:48 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 7583897b9f Add nullptr checks for findNextFocusableView
Summary:
We were missing some null checks that could cause a crash.

There seems to be some cases where either the parent or the currently focused View are present on Android's hierarchy but not present on the Shadow Tree, in this cases we can just return a nullptr to fall back to default focusing behavior on Android.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D71050870

fbshipit-source-id: a4b4e533c4e9a59c53190feb4b23db4b436b8ae9
2025-03-12 18:14:52 -07:00
Nicola CortiandFacebook GitHub Bot e69f829a3f Beautify Changelog for 0.79 (#49987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49987

I went through the whole changelog for 0.79 and applied categories to all the entries + did some significant cleanup (remove some entries that were actually internals, grouped and sorted various items)..

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D71003373

fbshipit-source-id: 5a95e619f1cf2ffc84263b92104efee16fd74e53
2025-03-12 15:45:34 -07:00
Arushi KesarwaniandFacebook GitHub Bot d8b0e050c4 Making RN Codegen generate ComponentDescriptors.cpp (#49939)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49939

Making RNCodegen.js generate the ComponentDesciptors.cpp and https://github.com/facebook/react-native/pull/42962 adds all entries, just missed this one.

Changelog:
[Android] [Fixed] - Fix RNCodegen.js for generating ComponentDescriptors.cpp

Reviewed By: shwanton

Differential Revision: D70925850

fbshipit-source-id: 2e2eae64f5371b0bc5a452d4bd0c9269e9253bb1
2025-03-12 15:44:46 -07:00
Ramanpreet NaraandFacebook GitHub Bot 76436d35c7 package.json: Introduce annotations as a way to declare modules/components (#49941)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49941

This diff introduces annotations into the ios codegen config!

## Before
In the new architecture, people can declare module/component codegen config in [package.json](https://reactnative.dev/docs/the-new-architecture/using-codegen#configuring-codegen)

This config contains the following maps:
- modulesConformingToProtocol
- modulesProvider
- componentProvider

```
"codegenConfig": {
    "name": "HelloWorldSampleModule",
    "type": "all",
    "jsSrcsDir": "specs",
    "android": {
      "javaPackageName": "com.helloworld"
    },
    "ios": {
      "modulesConformingToProtocol": {
        "RCTImageURLLoader": [
          "RCTHelloWorldImageURLLoader"
        ],
        "RCTURLRequestHandler": [
          "RCTHelloWorldURLRequestHandler"
        ],
        "RCTImageDataDecoder": [
          "RCTHelloWorldImageDataDecoder"
        ]
      },
      "modulesProvider": {
        "HelloWorldImageURLLoader": "RCTHelloWorldImageURLLoader",
        "HelloWorldURLRequestHandler": "RCTHelloWorldURLRequestHandler",
        "HelloWorldImageDataDecoder": "RCTHelloWorldImageDataDecoder"
      },
      "componentProvider": {
        "FooComponent": "RCTFooComponentClass"
      }
    }

```

## After
This information is a little bit easier to understand if we group it by module/component (into **annotations**):

(that's what this diff does!)

```
"codegenConfig": {
    "name": "HelloWorldSampleModule",
    "type": "all",
    "jsSrcsDir": "specs",
    "android": {
      "javaPackageName": "com.helloworld"
    },
    "ios": {
      "modules": {
        "HelloWorldImageURLLoader": {
          "conformsToProtocols": ["RCTImageURLLoader"],
          "className": "RCTHelloWorldImageURLLoader"
        },
        "HelloWorldURLRequestHandler": {
          "conformsToProtocols": ["RCTURLRequestHandler"],
          "className": "RCTHelloWorldURLRequestHandler"
        },
        "HelloWorldImageDataDecoder": {
          "conformsToProtocols": ["RCTImageDataDecoder"],
          "className": "RCTHelloWorldImageDataDecoder"
        }
      },
      "components": {
        "FooComponent": {
          "className": "RCTFooComponent"
        }
      },
    }

```

## Migration
The old way is still supported (for now). We will deprecate it soon, and eventually remove it from react native!

Changelog: [iOS][Added] - Codegen: Introduce module/component annotations inside package.json

Reviewed By: mdvacca

Differential Revision: D70822061

fbshipit-source-id: 87ec5664a551c54b9300ba92987f237a601ccfbf
2025-03-12 14:55:13 -07:00
Ramanpreet NaraandFacebook GitHub Bot 9ea07cfb02 generate-artifacts-executor: decompose into smaller files (#49905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49905

This diff breaks down generate-artifacts-executor into smaller files.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D70795042

fbshipit-source-id: 1235f4ecf5f87c320719b622e546780823920fd3
2025-03-12 14:55:13 -07:00
Ramanpreet NaraandFacebook GitHub Bot 8afdbebf9d Add snapshot tests for generate-artifacts-executor (#49940)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49940

This will just make sure that we don't unintentionally break this script.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D70919549

fbshipit-source-id: 6d9f2acca46486f1c920afed69609c70f53e6b18
2025-03-12 14:55:13 -07:00
Vitali ZaidmanandFacebook GitHub Bot b899a0013b track maximum cdp proxy messages from device queue size (#49945)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49945

Changelog:
[General][Internal] track maximum cdp messages from device queue size

Reviewed By: robhogan

Differential Revision: D70404011

fbshipit-source-id: 0191301b27f25ab91b2e9549dd14fd9e40bd825e
2025-03-12 13:43:43 -07:00
Samuel SuslaandFacebook GitHub Bot 2aeccf2b90 fix crash in view culling when unflattening ScrollView's contents (#49992)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49992

changelog: [internal]

View culling does not play along with view flattening/unflattening. This diff adds a test case for it + fix. Previously, view culling would crash.

There are still untested branches of view flattening/unflattening where I am trying to come up with test cases.

Reviewed By: rubennorte

Differential Revision: D71047032

fbshipit-source-id: 9f52473743755e49e4bfda0783803cb79591ca27
2025-03-12 13:28:00 -07:00
Vitali ZaidmanandFacebook GitHub Bot 9783e65122 extract event loop perf tracking to its own file (#49985)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49985

Changelog:
[General][Internal] extract event loop perf tracking to its own file

Reviewed By: robhogan

Differential Revision: D70970397

fbshipit-source-id: 2b944bf07f32b0bdb68187c77ce19fb4738a8dc5
2025-03-12 12:52:18 -07:00
Eric RozellandFacebook GitHub Bot 05e720adfb Add feature flag for universal calls to start|finishOperationBatch (#49908)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49908

There are various batching mechanisms across react-native platforms. The NativeAnimated startOperationBatch and finishOperationBatch methods are a useful way to signal that complete animation graphs are established for atomic flushes to the UI thread.

Setting up this feature flag for use across non-Android React Native platforms.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D70827938

fbshipit-source-id: 4c4a74e9a11f75090152637d6195092f5af866a0
2025-03-12 11:55:15 -07:00
Kirill NovikovandFacebook GitHub Bot 91d034533e Allow the .pnpm folder to be discovered during code generation (#49983)
Summary:
This PR (https://github.com/facebook/react-native/pull/48182) introduced skipping hidden folders during Codegen generation.

However, when using pnpm, all files are stored in the `.pnpm` folder (see explanation here: https://pnpm.io/symlinked-node-modules-structure).

As a result, some libraries that support the new architecture but lack the `ios.codegenConfig.componentProvider` field - like [FlashList](https://github.com/Shopify/flash-list/blob/main/package.json) - will be skipped during Codegen generation.

This PR explicitly includes `.pnpm` to prevent this issue.

## Changelog:

[iOS][Fixed] - Check .pnpm folder when looking for third-party components.

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

Test Plan:
Tested on:

RN 0.78.0
PNPM: 10
Flashlist: 1.7.3

Reviewed By: cipolleschi

Differential Revision: D71047936

Pulled By: cortinico

fbshipit-source-id: fa9caab23dea8c92ef5f23c997812d348eb19e08
2025-03-12 11:55:00 -07:00
Rubén NorteandFacebook GitHub Bot 0f2a53d04b Fix crashes in MutationObserver caused by commit hooks in main thread (#49981)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49981

Changelog: [internal]

(because MutationObserver isn't a public API yet)

## Context

`MutationObserver` is a [JavaScript API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) used to report mutations in the DOM tree. The mutations available on Web are: changing children, changing attributes and changing text. In React Native, only changing children is supported.

Mutation detection needs to happen synchronously when mutations happen (in ShadowTree commits) and the notification is dispatched as a microtask in JS, which means we can only report mutations happening in JavaScript.

There's an assumption that only React (in JS) can change the structure of the tree in Fabric, so we implemented `MutationObserver` considering this assummption.

Unfortunately, while the assumption is correct (we can only mutate children from React) the implementation didn't take into account that commit hooks were triggered from multiple threads, even if the structure doesn't change (e.g.: with Fabric state updates). In this case, we do the checks but we never dispatch the notifications. This can cause crashes (see T217617393) if we try to check for mutations from the main thread while we add new observers in the JS thread (because that logic wasn't thread safe).

This fixes that crash by, in MutationObserver, not only preventing notifications from commits not coming from React, but also preventing the determination altogether.

In order to do this, this modifies the signature of the commit hooks to also pass the commit options, and adds a new field in the commit options with the source of the commit (for now, just "React" or "Unknown").

In `MutationObserver`, before accessing the data structures of the observer, we check if the commit is coming from React, and return early otherwise.

Reviewed By: javache

Differential Revision: D71036705

fbshipit-source-id: 985c8f903375cbf876dce5174e04563f74d7621a
2025-03-12 11:17:46 -07:00
Alex HuntandFacebook GitHub Bot 24957ac248 Bump CLI to 17 (RNTester) (#49973)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49973

We still depend on the Community CLI directly, supporting local development in  `packages/rn-tester`. Bump to latest — contains a number of build improvements, and will align us closer to prod/next.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D71033085

fbshipit-source-id: ddbf7df5a35951b77c36d111cfd12ad64c3b73f7
2025-03-12 11:07:20 -07:00
Joe VilchesandFacebook GitHub Bot 11c8c5394e Clean up usage of rn_stable_api_modules_ios_universe.enable_image_manager_queue (#49956)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49956

This is no longer being used internally so I think we can just remove this for less complexity

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D70983663

fbshipit-source-id: 61ca5212cb45dd1c8b96aee62964ad62b410d6f1
2025-03-12 11:01:20 -07:00
Nicola CortiandFacebook GitHub Bot a0528d834c RNGP - Better compatibility with Kotlin 2.1.x (#49977)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49977

See: https://github.com/facebook/react-native/issues/48274
This makes our integration with Kotlin 2.1.x easier.

Changelog:
[Android] [Changed] - Better compatibility with Kotlin 2.1.x

Reviewed By: cipolleschi

Differential Revision: D71034044

fbshipit-source-id: 9a26ed28ae4770a5c05a4113f4d86c1b97063db3
2025-03-12 10:10:46 -07:00
Peter AbbondanzoandFacebook GitHub Bot 5f12d01ff5 Fix app lagging while attempting a connection to Metro (#49949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49949

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D70965365

fbshipit-source-id: 91f9debe7783d855493281f96aef2f3f8cdb5053
2025-03-12 10:00:47 -07:00
Jakub PiaseckiandFacebook GitHub Bot c7aa3f3fe7 Export codegen functions and types from the main package (#49854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49854

Changelog: [GENERAL][ADDED] - Codegen utility functions and types are now exported from the root package

Up to this point, third-party libraries needed to use deep imports to access codegen utilities and types This diff exports them from the main entry point, as we want to move away from supporting deep imports in OSS as a part of JS Stable API project.

Reviewed By: huntie

Differential Revision: D70628408

fbshipit-source-id: 5a6e1cb870465ede0fbc9eb8912d255aa90aa2a8
2025-03-12 09:20:55 -07:00
Sam ZhouandFacebook GitHub Bot 2cdd79f4fc Pre-suppress errors ahead of next release
Reviewed By: gkz

Differential Revision: D71039278

fbshipit-source-id: 5d42ee1707335bfb579fa49beeb597d98eba70c5
2025-03-12 09:10:02 -07:00
Mateo GuzmánandFacebook GitHub Bot 43fe9f3d88 Migrate ActivityEventListener & BaseActivityEventListener to Kotlin (#49910)
Summary:
Migrate com.facebook.react.bridge ActivityEventListener & BaseActivityEventListener to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge ActivityEventListener & BaseActivityEventListener to Kotlin

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

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

Reviewed By: alanleedev

Differential Revision: D70871037

Pulled By: Abbondanzo

fbshipit-source-id: ebb784db5ea58598f483f9775629666716de39f0
2025-03-12 08:12:29 -07:00
Mateo GuzmánandFacebook GitHub Bot 6c5a9e8257 Migrate BaseLayoutAnimation to Kotlin (#49962)
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.BaseLayoutAnimation to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.BaseLayoutAnimation to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D71031224

Pulled By: javache

fbshipit-source-id: c74d72b85dcc37a48a2ebb795a29ff317511d5ed
2025-03-12 07:56:06 -07:00
Vitali ZaidmanandFacebook GitHub Bot 2d7356193f report high ping and event loop delay even when debug is not enabled (#49976)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49976

Changelog:
[General][Internal]

Reviewed By: robhogan

Differential Revision: D70962431

fbshipit-source-id: 74c0fcc67e1785f213629db235fbf18bcd5a5f95
2025-03-12 06:49:54 -07:00
Rubén NorteandFacebook GitHub Bot 6356a85b98 Do not log errors when the native module is missing if TurboModules are not used (#49974)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49974

Changelog: [internal]

The feature flag system currently logs an error when trying to access common feature flags (flags accessible from everywhere but defined in native) from JS if the native module isn't available.

This forces a pattern in code to check if the module is available before accessing certain feature flags, to avoid showing that error to users in the legacy architecture.

This removes the need for that pattern by adding the check in the feature flag infra itself. If TM infra isn't available, we return default values and don't log the error.

Reviewed By: rozele

Differential Revision: D70975412

fbshipit-source-id: 5544bd96aaaf046ef90ca69bc549bef4e54eb98b
2025-03-12 05:37:22 -07:00
Jakub PiaseckiandFacebook GitHub Bot 39f051aeb6 Add a test case ensuring touch events are dispatched to views overflowing ScrollView content container (#49967)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49967

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D71030561

fbshipit-source-id: 4d73a0c4d3dc22b83c47091ba8de1d5261ab9ed5
2025-03-12 05:18:43 -07:00
Alex HuntandFacebook GitHub Bot e70961e05c Bump packages for next release (#49972)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49972

Follows the recent `0.79-stable` branch cut.

Changelog: [Internal] - Bump all packages to `0.80.0-main`

Reviewed By: cortinico

Differential Revision: D70976555

fbshipit-source-id: e81e4c45c6a510e114d02853c5bb90a715b7df8b
2025-03-12 05:11:16 -07:00
Jakub PiaseckiandFacebook GitHub Bot 6ecd9a43f1 Fix touch events not being dispatched to ScrollView's children when they overflow content container (#49855)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49855

Changelog: [IOS][FIXED] - Fixed touch events not being dispatched to ScrollView's children when they overflow the content container

Closes https://github.com/facebook/react-native/issues/47740.

Changes the ScrollView's container view to be `RCTViewComponentView` instead of `UIView` and sets custom layout metrics to it in a way that it will propagate touch events to all children, even if they overflow its bounds.

Reviewed By: sammy-SC

Differential Revision: D70619894

fbshipit-source-id: 348a1a369489d5208d6037c8d76b223c4ab2d5f7
2025-03-12 03:50:07 -07:00
Joe VilchesandFacebook GitHub Bot 0ade23d34f accessibleElements impl on iOS (#49582)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49582

TSIA, this is a fairly straightforward implementation since iOS likes the shape the data is already in. Note I form a stacking context since I need the native view that has `accessibilityElements` to actually be an ancestor of everything under it

Note I am not exposing anything yet on the JS side, since we need to do Android also

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D69625269

fbshipit-source-id: 836f1bb631646408a5726f126be61c0ff6afe1d0
2025-03-11 20:20:16 -07:00
Nick GerlemanandFacebook GitHub Bot 99f962627f Fix New Arch handling of inline views when text truncated (#49960)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49960

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

RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform.

`line-clamp`: https://jsfiddle.net/7xgdke1b/
`text-overflow`: https://jsfiddle.net/7xgdke1b/2/

Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used.

This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`.

Changelog:
[General][Fixed] - Fix New Arch handling of inline views when text truncated

Reviewed By: mdvacca

Differential Revision: D70922174

fbshipit-source-id: 8c1f4aadbf53ff64ce55b44d6c7953d9b2e40bc5
2025-03-11 18:03:56 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot c068c599c6 Fix keyboard navigation for FlatList with removeClippedSubviews enabled (#49543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49543

When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.

This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.

With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.

Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled

Reviewed By: joevilches

Differential Revision: D69618406

fbshipit-source-id: 1df7f90066dfc685e74a89b29222937777714b87
2025-03-11 17:08:51 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 81405b450c Prevent the currently focused View from getting clipped (#49961)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49961

As preparation for fixing focus on FlatList we need to prevent the currently focused view from getting clipped. This is because in Android, if the currently focused view gets clipped before transferring focus we crash.

Changelog: [Android][Changed] - Prevent currently focused child from getting clipped when `removeClippedSubviews` is enabled

Reviewed By: NickGerleman

Differential Revision: D70994348

fbshipit-source-id: 8c68eeebd7df8e7d8f788e50a3bbe46b0335ace3
2025-03-11 17:08:51 -07:00
Pieter De BaetsandFacebook GitHub Bot ade41c851b Make missing parent view state in updateLayout a soft error (#49951)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49951

We previously fixed Differentiator generating an incorrect parentTag (https://github.com/facebook/react-native/pull/48055), but this can lead to crashes in Android UI due to reordering that happens in the Android mounting layer. While we have an experiment to disable this reordering (https://github.com/facebook/react-native/pull/46702) this currently has a negative performance impact which needs to be addressed.

As a mitigation, we can make the lookup of parentTag's ViewManager state nullable. We only require this to support `needsCustomLayoutForChildren`, which is not commonly used, and seems acceptable to drop in this scenario.

Changelog: [Android][Changed] Do not crash when parent view state can't be found

Reviewed By: NickGerleman

Differential Revision: D70966621

fbshipit-source-id: 33d0b6a90860788a4c9a8c6cea36c2c72c1392e1
2025-03-11 14:11:15 -07:00
Nick LefeverandFacebook GitHub Bot 1482dd9e99 Add assert for recycled views with parent (#49937)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49937

Adding an assert for recycled views still attached to their parent, which would lead to an exception when the view would be added to a new parent.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D70922503

fbshipit-source-id: 7d4daf427306203d603c31999ab138b3aee08e83
2025-03-11 12:42:46 -07:00
Pieter De BaetsandFacebook GitHub Bot 54e8bd44bd Suppress deprecation error in ProgressResponseBody (#49954)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49954

We have a different version of OkHttp internally and in OSS so we need to suppress these for now.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D70975145

fbshipit-source-id: cd2a3ab5cdc52f25c78cb608e917fa3ca378e4f1
2025-03-11 12:31:28 -07:00
Samuel SuslaandFacebook GitHub Bot cf39e6164c delete feature flag excludeYogaFromRawProps (#49817)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49817

changelog: [internal]

Remove feature flag excludeYogaFromRawProps. It did not yield any performance wins and the code to support the feature is spread across multiple classes. Removal simplifies complexity.

Reviewed By: javache

Differential Revision: D70389071

fbshipit-source-id: 21751f56aec8de501ff1e1efafda035069d8ef48
2025-03-11 09:10:22 -07:00
Mateo GuzmánandFacebook GitHub Bot ff84ae9188 Migrate OpacityAnimation to Kotlin (#49822)
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.OpacityAnimation to Kotlin.

I moved out `OpacityAnimationListener` as well in this PR to separate concerns and align more with the codebase.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.OpacityAnimation to Kotlin

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

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

Reviewed By: javache

Differential Revision: D70588884

Pulled By: alanleedev

fbshipit-source-id: 1b70f5e5facd5f47b828090e7c63a218229000cb
2025-03-11 08:40:10 -07:00
Mateo GuzmánandFacebook GitHub Bot bf7a0e5798 Migrate ProgressResponseBody to Kotlin (#49752)
Summary:
Migrate com.facebook.react.modules.network.ProgressResponseBody to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.modules.network.ProgressResponseBody to Kotlin

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

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

Reviewed By: javache

Differential Revision: D70592532

Pulled By: alanleedev

fbshipit-source-id: 2680951a3b5290314d0632eb55b69c9bcf44b96a
2025-03-11 08:28:25 -07:00
Dawid BartczakandFacebook GitHub Bot c6a075bcc7 Fix missing type for login-password alert prompt (#49757)
Summary:
When using the `login-password` prompt type, there is a TypeScript type mismatch issue. The `callbackOrButtons` parameter returns an object with `{login: string, password: string}` structure, but this type variation is not properly included in the **AlertType** type definition. This causes TypeScript to show type errors when using callback functions that expect credentials in the format `(credentials: {login: string, password: string}) => void`.

## Changelog:
- [General] [Fixed] Add missing type variation `{login: string, password: string}` to **AlertType** type definition to properly support `login-password` prompt callbacks

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

Test Plan: This change is purely type-related and doesn't affect runtime behavior.

Reviewed By: NickGerleman

Differential Revision: D70797036

Pulled By: alanleedev

fbshipit-source-id: 8e27a39f0c8f49083730c683b41b69173715bd68
2025-03-11 08:10:11 -07:00
zhongwuzwandFacebook GitHub Bot 8d7aca30e7 Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac (#49320)
Summary:
Fixes https://github.com/facebook/react-native/issues/48544. We can make `RCTWeakEventEmitterWrapper` to subclass `NSDictionary` that Textinput supports encode it.

System allowed classes are:
```
Allowed classes are:
 {(
    "'NSMorphology' (0x20088b6d8) [/System/Library/Frameworks/Foundation.framework]",
    "'NSString' (0x2003f4738) [/System/Library/Frameworks/Foundation.framework]",
    "'NSInflectionRule' (0x20088d348) [/System/Library/Frameworks/Foundation.framework]",
    "'UIColor' (0x2006c0520) [/System/iOSSupport/System/Library/PrivateFrameworks/UIKitCore.framework]",
    "'NSTextAttachment' (0x20042af98) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSShadow' (0x20042ae30) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSTextEncapsulation' (0x200897e50) [/System/Library/Frameworks/CoreText.framework]",
    "'NSTextAlternatives' (0x20042af70) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSFont' (0x20042a9f8) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSAttributedString' (0x2003f3838) [/System/Library/Frameworks/Foundation.framework]",
    "'NSData' (0x2003ed528) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSURL' (0x2003ed938) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSAdaptiveImageGlyph' (0x2008ae538) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSNumber' (0x2003f4238) [/System/Library/Frameworks/Foundation.framework]",
    "'NSParagraphStyle' (0x20042ad40) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSDictionary' (0x2003ed5a0) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'UIFont' (0x20042c668) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSColor' (0x200412350) [/System/Library/Frameworks/AppKit.framework]",
    "'NSGlyphInfo' (0x20042aa98) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
    "'NSArray' (0x2003ed460) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSPresentationIntent' (0x20088da28) [/System/Library/Frameworks/Foundation.framework]"
)}
```

## Changelog:

[IOS] [FIXED] -  Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac

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

Test Plan:
Run RNTester on apple silicon mac, and entered some text in textinput, no crash occured. Also, verified that the caret was not jumping around, thus preserving the original fix.

https://github.com/user-attachments/assets/6304f6e7-c663-4351-ace8-ab1842ee545f

Reviewed By: javache

Differential Revision: D69981500

Pulled By: cipolleschi

fbshipit-source-id: 2af9b280e42f621446efda9b101af50525e8fef7
2025-03-11 06:06:55 -07:00
Vojtech NovakandFacebook GitHub Bot 0cc1ac18cf fix(ios): enable use of multiple RCTAppDependencyProvider instances (#49889)
Summary:
instantiating multiple `RCTAppDependencyProvider` instances creates problems with their internal state, because the internal fields such as [`_thirdPartyFabricComponents` are populated once](https://github.com/facebook/react-native/blob/f5feb73022f9340583ebcf576eaedd3ca5677e1a/packages/react-native/scripts/codegen/templates/RCTAppDependencyProviderMM.template#L60) for the entire app (see [`dispatch_once`](https://developer.apple.com/documentation/dispatch/1447169-dispatch_once)).

That means when you create 2 instances, and call `thirdPartyFabricComponents` on them, the first instance will respond with a dictionary and the second with `nil`. This is unexpected.

## Changelog:

[IOS] [FIXED] - enable use of multiple `RCTAppDependencyProvider` instances

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

Test Plan:
`rnTester` - the templates are used by codegen. Running `pod install`, the files were generated correctly from the `.template` files.

I was able to verify that accessing `thirdPartyFabricComponents` on multiple instances of `RCTAppDependencyProvider` returns valid result.

<details>
<summary>screenshot</summary>

<img width="789" alt="Screenshot 2025-03-07 at 15 11 22" src="https://github.com/user-attachments/assets/9270ba90-ae7f-491a-a53a-f7e1f4606438" />

</details>

Reviewed By: javache

Differential Revision: D70892779

Pulled By: cipolleschi

fbshipit-source-id: 27c7c8fd9982b6427daec02e0de59b08ad20bfad
2025-03-11 05:57:40 -07:00
Nicola CortiandFacebook GitHub Bot 40203e21a6 Add Changelog for 0.79.0-rc.1 (#49946)
Summary:
Just the changelog for 79 RC1

## Changelog:

[Internal] [Changed] -

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

Test Plan: NA

Reviewed By: cipolleschi

Differential Revision: D70962117

Pulled By: cortinico

fbshipit-source-id: 7423c4562695f16398d39169e7b2072b6ce0b164
2025-03-11 05:56:56 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 3b3d502ccf Automate setting the RCTNewArchEnabled flag (#49927)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49927

This change automates updating App's Info.plist with the new `RCTNewArchEnabled` boolean entry. The value depends on how the pod install is set up. In this way, we maintain the previous UX to enable/disable the New Arch.

## Context
The RCT_NEW_ARCH_ENABLE flag is a compile time flag we used for almost two years to configure the iOS apps and to determine whether the app should build with the New Arch or not.

However, given that we are looking into prebuilding React Native, we have to get rid of all the compilation flags, because they would require us to prebuild a combinatorial number of artifacts for react native. For example:

- New Arch / Hermes
- Old Arch / Hermes
- New Arch / JSC
- Old Arch / JSC
- ...

## Backward compatibility
We are going to keep adding the RCT_NEW_ARCH_ENABLED flag in all the dependencies, through the cocoapods inrastructure, so libraries, which are not prebuilt, will be build for the right architecture by the app itself.

## Changelog:
[iOS][Added] -

Reviewed By: cortinico

Differential Revision: D70888212

fbshipit-source-id: 541a818e02ccb96c822de29b0714646d1e69a5a9
2025-03-11 05:05:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6dd721b258 Deprecate RCT_NEW_ARCH_ENABLED (#49924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49924

This change deprecates the RCT_NEW_ARCH_ENABLEd flag to toggle the New Architecture.

The new approach bring iOS closer to Android: to diasable the New Architecture, user needs to modify the App's Info.plist and add a `RCTNewArchEnabled` boolean entry and set it to `NO`.

The absence of the entry implies that the New Arch is enabled. (Defaults to enabled)

This also deprecates the `RCTSetNewArchEnabled` function because it makes no sense now

## Context
The RCT_NEW_ARCH_ENABLE flag is a compile time flag we used for almost two years to configure the iOS apps and to determine whether the app should build with the New Arch or not.

However, given that we are looking into prebuilding React Native, we have to get rid of all the compilation flags, because they would require us to prebuild a combinatorial number of artifacts for react native. For example:

- New Arch / Hermes
- Old Arch / Hermes
- New Arch / JSC
- Old Arch / JSC
- ...

## Backward compatibility
We are going to keep adding the RCT_NEW_ARCH_ENABLED flag in all the dependencies, through the cocoapods inrastructure, so libraries, which are not prebuilt, will be build for the right architecture by the app itself.

## Changelog:
[iOS][Deprecated] - deprecate the `RCT_NEW_ARCH_ENABLED` and the `RCTSetNewArchEnabled`

Reviewed By: cortinico

Differential Revision: D70885454

fbshipit-source-id: 4b8404ead4900d9787049ebd0b8b3c29b272f913
2025-03-11 05:05:49 -07:00
Vitali ZaidmanandFacebook GitHub Bot 70c3ffe984 Use builtin libdefs from flow-typed (#49929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49929

X-link: https://github.com/facebook/metro/pull/1459

In the next version of Flow, we will stop bundling many of the builtin libdefs, and they have been moved to flow-typed. This diff checks in them to prepare for the deployment of the next version of Flow.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D70896122

fbshipit-source-id: aa6bd0b1e653b983a345b0e202c8dad5058a0001
2025-03-11 04:46:33 -07:00
Vitali ZaidmanandFacebook GitHub Bot a27ec64a00 report an event tracking the event loop perf in metro dev middleware (#49674)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49674

Changelog:
[General][Internal] - report an event tracking the event loop perf in metro dev middleware

Reviewed By: hoxyq

Differential Revision: D69988265

fbshipit-source-id: 89cb427215b0034d545305cccfcee542af8c0367
2025-03-11 04:41:50 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 10bbdb8679 Fix verifyReleaseOnNPM by dropping the v in the version (#49944)
Summary:
GHA passes the version to the script with a `v` prefix. However, when we receive the version from NPM, the `v` prefix is not here.
We can fix the script by dropping the `v` when it is passed to the function.

bypass-github-export-checks

## Changelog:
[Internal] - Fix verifyPackageOnNPM

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

Test Plan: GHA

Reviewed By: cortinico, fabriziocucci

Differential Revision: D70960414

Pulled By: cipolleschi

fbshipit-source-id: 4234103ebe49cf715aea4a1473a8a60978f07a9f
2025-03-11 04:05:11 -07:00
David VaccaandFacebook GitHub Bot d24e5acb26 Ensure LegacyArchitectureLogger.assertWhenLegacyArchitectureMinifyingEnabled is called only once per class loading in kotlin (#49936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49936

Ensure LegacyArchitectureLogger.assertWhenLegacyArchitectureMinifyingEnabled is called only once per class loading in kotlin

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D70922132

fbshipit-source-id: ce4d68dc2ab0f61266e4bb5cddfc175c364f568a
2025-03-10 23:46:25 -07:00
Nick LefeverandFacebook GitHub Bot 3b07fb7426 Disable clipped view removal on recycle (#49938)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49938

Recycling a `ReactViewGroup` will lead to all child views being removed from the view. To avoid having view recycling corrupt the clipping state set for the child views, ahead of base view recycling preparation this diff disables `removeClippedSubviews` so that layout changes don't run over all child views that will end up being removed anyway.

The bug reported earlier should already have been resolved by D70672120 since the view recycling of a child view would remove the view from the parent. Meaning the ReactViewGroup can only have subviews that are not prepared for recycling, any recycled view would have been removed from their parent (the ReactViewGroup)

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D70921641

fbshipit-source-id: a8b311169b268c09400d2b62008184e379f6fe79
2025-03-10 19:00:36 -07:00
Sam ZhouandFacebook GitHub Bot d98fc9de2d Align internal and external definition of describe function from jest (#49934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49934

The typing of internal version of jest and the libdef in react-native has diverged a bit. This diff aligns the typing for `describe`

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D70917375

fbshipit-source-id: 9c2ab98a08394aa187712f4966748a8a60e202b1
2025-03-10 15:19:38 -07:00
Eric RozellandFacebook GitHub Bot 34ae9facd5 Fix issue with zIndex child removal (#49900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49900

This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in `onViewRemoved` prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was [added](https://github.com/facebook/react-native/pull/43389) to fix a bug in Reanimated. cc bartlomiejbloniarz to confirm if [this Reanimated issue](https://github.com/software-mansion/react-native-reanimated/issues/5715) resurfaces from this change.

Fixes #49838

## Changelog

[Android][Fixed] Fixes issue with z-indexed sibling removal

Reviewed By: NickGerleman, cipolleschi

Differential Revision: D70795631

fbshipit-source-id: 500af92226be29af73f36f911ffff27a0c083ae9
2025-03-10 13:43:10 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot e1464c0975 fix(iOS): provide useful error message about dependency provider (#49843)
Summary:
Currently, when integrating into a native app using ReactNativeFactory, when we forget to set `dependencyProvider` we get a random crash exception instructing us (depending on native modules in our app) about an unrecognized selector:

![CleanShot 2025-03-05 at 15 21 53@2x](https://github.com/user-attachments/assets/04b8d4fe-1e40-4023-af1b-1825a3a99f33)

After this change we get a proper error informing us that we for got to set dependencyProvider:

![CleanShot 2025-03-05 at 15 22 16@2x](https://github.com/user-attachments/assets/39bb1c2a-3efc-4689-a92e-ca2ee54cb6a4)

## Changelog:

[IOS] [ADDED] - Useful error message about setting dependency provider

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

Test Plan: CI Green

Reviewed By: cortinico

Differential Revision: D70631515

Pulled By: cipolleschi

fbshipit-source-id: d99c8fa12fdb0624a01fe16c50fe0f2d10554f94
2025-03-10 12:09:52 -07:00
zhongwuzwandFacebook GitHub Bot 22cd3b1023 Fabric: Fixes Modal snapshot when closing it (#48252)
Summary:
Fixes https://github.com/facebook/react-native/issues/48245 . The reason is we reuse the modal component and also reuse the snapshot of previous modal.

## Changelog:

[IOS] [FIXED] - Fabric: Fixes Modal snapshot when closing it

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

Test Plan: Repro repo please see Fixes https://github.com/facebook/react-native/issues/48245

Reviewed By: rshest

Differential Revision: D70629570

Pulled By: cipolleschi

fbshipit-source-id: fe97184d2f27283a9c7e6df09e9df35630429ff1
2025-03-10 11:20:33 -07:00
Mateo GuzmánandFacebook GitHub Bot 0b2b91d532 Migrate JavaScriptContextHolder & JavaScriptExecutor to Kotlin (#49909)
Summary:
Migrate com.facebook.react.bridge JavaScriptContextHolder & JavaScriptExecutor to Kotlin.

In this PR I also marked the return of HermesExecutor.initHybridDefaultConfig as non-nullable to keep the conversion without logic changes. I checked that this was changed unintentionally to nullable in 12e321daf0 but I think it was not supposed to be.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge JavaScriptContextHolder & JavaScriptExecutor to Kotlin

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

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

Reviewed By: javache

Differential Revision: D70871012

Pulled By: Abbondanzo

fbshipit-source-id: 1c15927056baf166e520e896e92bebf664fa0229
2025-03-10 11:08:44 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 8b33668c43 Add missing loadFromSource method in the DefaultRNFactoryDelegate (#49931)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49931

This change fixes the app startup in the Old Architecture by implementing the loadSourceForBridge:onProgress:onComplete method in the RCTDefaultReactNativeFactoryDelegate object.

The method was missing here, so the Bridge was never trying to load the JS bundle from Metro, resulting in an empty app.

## Changelog:
[iOS][Fixed] - Implement the loadSourceForBridge:onProgress:onComplete in the RCTDefaultReactNativeFactoryDelegate.

Reviewed By: cortinico

Differential Revision: D70898811

fbshipit-source-id: 3e5d519a1965e92ace91ca6d5b316a9069279448
2025-03-10 11:05:39 -07:00
Vitali ZaidmanandFacebook GitHub Bot 52b02a6077 track event loop delay in metro dev middleware (#49660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49660

Changelog:
[General][Internal] - track event loop delay in metro dev middleware

Reviewed By: robhogan

Differential Revision: D69988266

fbshipit-source-id: 042511bd68a8d6f24a8a2036f604c12ca923027a
2025-03-10 09:52:45 -07:00
Jakub PiaseckiandFacebook GitHub Bot c04b4a92d1 Update modal wrapper to be translatable to TypeScript (#49923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49923

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70887822

fbshipit-source-id: 729e91245cfb750cf1de4f4532925ff7263b3d82
2025-03-10 08:40:37 -07:00
Jakub PiaseckiandFacebook GitHub Bot e7c44b2a26 Add depth limit to StyleSheet.flatten type (#49925)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49925

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70888318

fbshipit-source-id: ded13e64bde87803ce79a8c9272bcb5b6f4ab321
2025-03-10 08:23:33 -07:00
Pieter De BaetsandFacebook GitHub Bot d8181721f6 Inline Task.call without Executor (#49906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49906

Task.call is equivalent to a try-catch and wrapping the result in a Task. Inlining this is cheaper than creating a TaskCompletionSource and a Runnable.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D70803554

fbshipit-source-id: 0886176be974eff67c983ce1475ad685a8021b14
2025-03-10 07:51:23 -07:00
Nicola CortiandFacebook GitHub Bot d998b7b330 Remove stale BUCK setup for Android pre-builts (#49926)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49926

Those files can be fully removed as it's not referenced at all in OSS/Internal

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D70888664

fbshipit-source-id: 4cacc449aa141e0465f771bf8c52d573d4227ef5
2025-03-10 07:28:20 -07:00
Vitali ZaidmanandFacebook GitHub Bot d50cb768c9 instead of sampling report high ping events (#49922)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49922

Spamming the DB with "heartbeat" events with close to 0 ping didn't give us any useful information. Instead, report high ping situations.

Changelog:
[General][Internal] Remove reporting all device and debugger heartbeat events, only report heartbeats with high round trip latency

Reviewed By: GijsWeterings

Differential Revision: D70707457

fbshipit-source-id: 6bc8a55fd32dfa60fb4f7764ac00a6218417dcb5
2025-03-10 07:07:49 -07:00
Mateo GuzmánandFacebook GitHub Bot 0928406530 Make DispatchCommandMountItem, MountItemFactory, MountItem & BatchMountItem internal (#49893)
Summary:
As part of the initiative to reduce the public API surface, these classes under com.facebook.react.fabric.mounting.mountitems can be internalized. I've checked there are no relevant OSS usages:

- [DispatchCommandMountItem](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.mountitems.DispatchCommandMountItem) (all GH results are forks)
- [MountItemFactory](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.mountitems.MountItemFactory)
- [MountItem](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.mountitems.MountItem) (a lot of GH results, but all are forks)
- [BatchMountItem](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.mountitems.BatchMountItem) (all GH results are forks)

## Changelog:

[INTERNAL] - Make DispatchCommandMountItem, MountItemFactory, MountItem & BatchMountItem internal

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

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

Reviewed By: cortinico

Differential Revision: D70788076

Pulled By: javache

fbshipit-source-id: 34b8c5e0a716365d5905dfb846c6467b0ae9fc09
2025-03-10 06:54:42 -07:00
Pieter De BaetsandFacebook GitHub Bot c2b49d446a Fix disabled ReactHost tests (#49907)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49907

These tests have been disabled for a while due to feature flags being introduced, fusebox flags with native dependencies, and the removal of Powermock.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D70803553

fbshipit-source-id: d1ae6e4ca6c0d22e6a8c89bf01b28333929fa8a6
2025-03-10 06:07:25 -07:00
Rubén NorteandFacebook GitHub Bot 7cff19b55d Migrate all imports from react-native to package imports instead of relative in Fantom tests (#49912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49912

Changelog: [internal]

This migrates all Fantom tests to use package-relative imports from `react-native` instead of relative paths.

Note that a lot of the current deep imports (e.g.: `import ReactNativeElement from 'react-native/src/private/webapis/dom/nodes/ReactNativeElement'`) will not be necessary when we release those APIs as public.

Reviewed By: sammy-SC

Differential Revision: D70779722

fbshipit-source-id: f0d28e00ca9881dc2a3cd151b75327b26711277e
2025-03-10 06:05:44 -07:00
Rubén NorteandFacebook GitHub Bot bc808a5a35 Disable no-react-native-imports rule in Fantom tests (#49911)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49911

Changelog: [internal]

The approach in Fantom tests is to use the public API as much as we can, but forcing us to use relative imports in tests makes it harder to see what's the public API and what's not. This disables the lint rule so we can use package imports in Fantom tests without warnings/errors.

Reviewed By: sammy-SC

Differential Revision: D70779721

fbshipit-source-id: b244e6a36060e6bc60318fe285ffcf3a81a78acd
2025-03-10 06:05:44 -07:00
Phil PluckthunandFacebook GitHub Bot b52f0d8391 chore(react-native-codegen): Remove fixtures and outdated transforms from build output (#49916)
Summary:
- Update ignore micromatch pattern to filter out `__test_fixtures__` from build output
- Remove `babel/plugin-transform-object-rest-spread`
- Remove `babel/plugin-transform-async-to-generator`
- Remove `babel/plugin-transform-destructuring`

The `package.json:engines:node` field is already set to `>=18` which makes the three Babel transforms that were removed redundant.

## Changelog:

[INTERNAL] [CHANGED] - Remove fixtures files and outdated Babel transforms from `react-native/codegen` build output

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

Test Plan: - Ran against Node 18

Reviewed By: robhogan

Differential Revision: D70885090

Pulled By: cortinico

fbshipit-source-id: 328b75a6031a7ca6a9b3ed170061ffb0a47d6d93
2025-03-10 05:44:32 -07:00
Rubén NorteandFacebook GitHub Bot 41181bb434 Simplify Fantom test (#49899)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49899

Changelog: [internal]

Just a minor refactor.

Reviewed By: sammy-SC

Differential Revision: D70792753

fbshipit-source-id: 09ec415df376600bb5e9f913d7df8881b2b0755e
2025-03-10 05:37:09 -07:00
Rubén NorteandFacebook GitHub Bot ddbebacea7 Fix documentElement methods for element not working correctly (#49898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49898

Changelog: [internal]

In the method to access the native node reference from elements, we weren't considering the case where the element is the `documentElement`, which is a special case we were handling correctly in the case of native node references from nodes (where we also handle it possibly being a document node).

Because of this, methods in `Element` and `ReactNativeElement` weren't working correctly on the `documentElement`. We didn't catch this initially because we only tested the traversal methods defined in node in the test for `ReactNativeDocument`.

This fixes the issue.

Reviewed By: javache

Differential Revision: D70792748

fbshipit-source-id: c42d05a066efaffccade94e9d3835fb7172e2335
2025-03-10 05:37:09 -07:00
Mateo GuzmánandFacebook GitHub Bot 4046441997 Make WritableMapBuffer internal (#49914)
Summary:
This class can be internalized as part of the initiative to reduce the public API surface. 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.common.mapbuffer.WritableMapBuffer).

## Changelog:

[INTERNAL] - Make com.facebook.react.common.mapbuffer.WritableMapBuffer internal

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

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

Reviewed By: javache

Differential Revision: D70884414

Pulled By: cortinico

fbshipit-source-id: de1a298f7c7d5da8edf029e8d4dd31a9b334b853
2025-03-10 05:27:04 -07:00
LeonandFacebook GitHub Bot ddb8c27ab3 Add TS definition for inputAccessoryViewButtonLabel (#49754)
Summary:
Add TS definition for inputAccessoryViewButtonLabel. `inputAccessoryViewButtonLabel` was implemented in https://github.com/facebook/react-native/pull/47441

## Changelog:

[INTERNAL] [CHANGED] - Add TS definition for inputAccessoryViewButtonLabel

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

Test Plan: -

Reviewed By: cortinico

Differential Revision: D70797497

Pulled By: alanleedev

fbshipit-source-id: c1d9b7d11c31e556289a0ebadd386566b9af7856
2025-03-10 03:26:21 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 9abdd619da Fix bug that prevents the Old Arch from being enabled (#49896)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49896

This change makes possible to opt-out from the New Architecture.

Env variables are always `string`s in ruby and the check was always failing because it was comparing it with a number (always false)

## Changelog:
[iOS][Fixed] - enable back the opt-out from the New Architecture

Reviewed By: cortinico

Differential Revision: D70789827

fbshipit-source-id: 7d3f96c3db22f2715dec2b649534b20e3273ea3e
2025-03-10 03:08:11 -07:00
Samuel SuslaandFacebook GitHub Bot eeef060762 add fantom test for view culling inside <Modal /> (#49860)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49860

changelog: [internal]

now that Fantom supports tests with <Modal />, add a test to cover scenario where <ScrollView /> is inside of <Modal />.

Reviewed By: rubennorte, rshest

Differential Revision: D70696834

fbshipit-source-id: 5f51917ac5c6a2cf451906e302ee2b62c15449ea
2025-03-08 05:50:14 -08:00
Samuel SuslaandFacebook GitHub Bot faafd8c2a8 add enqueueModalSizeUpdate to Fantom (#49862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49862

changelog: [internal]

add method enqueueModalSizeUpdate to allow for setting size of Modal.

Reviewed By: rshest

Differential Revision: D70696524

fbshipit-source-id: 9e22d95e62ee52a66f888503d070fcbff1307d21
2025-03-08 05:50:14 -08:00
Samuel SuslaandFacebook GitHub Bot 9f7b8457ec expose ref to <Modal />'s native component (#49859)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49859

changelog: [internal]

this will be used for testing purposes in Fantom.

This diff also cleans up `ModalInjection.js` which is unused.

Reviewed By: rubennorte

Differential Revision: D69883384

fbshipit-source-id: 4ff278ef174c95fd5a93f70519f14c5190a5ada5
2025-03-08 05:50:14 -08:00
Ellis HoagandFacebook GitHub Bot 486d38c024 Remove (more) unused variables from AtWork (#49904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49904

X-link: https://github.com/facebookincubator/SocketRocket/pull/702

Remove or suppress unused variables.

Changelog: Remove an unused variable

Reviewed By: r-barnes

Differential Revision: D70801115

fbshipit-source-id: 5d0cffeee5e2b2a3729c34dcc19f81d582154d65
2025-03-07 16:55:58 -08:00
Sam ZhouandFacebook GitHub Bot a0c2474e11 Move explicit type argument into function parameter (#49901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49901

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D70802763

fbshipit-source-id: 1a31d2bb99a21bb56352156da6bf52fb0a624c00
2025-03-07 14:07:00 -08:00
Rob HoganandFacebook GitHub Bot aa92fa9dff Update lockfile @babel/ dependencies, regenerate Flow types, unbreak Meta-internal test (#49894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49894

Update `babel` entries in `yarn.lock` and run:

`yarn update-babel-flow-lib-defs`

...from Metro, to regenerate our Flow definitions from Babel source, then sync to RN.

Changelog: [Internal]

Facebook
D70778791 updated some `xplat/js/yarn.lock` Babel entries, which caused `xplat/js/tools/metro/scripts/__tests__/babel-lib-defs-test.js` to start failing only when Yarn had *not* been run in `xplat/js/tools/metro`, because the hoisted `xplat/js` Babel deps were a greater version than the locked `xplat/js/tools/metro` Babel deps.

This realigns them and updates the types to unbreak the test both internally an in OSS.

Reviewed By: vzaidman

Differential Revision: D70785807

fbshipit-source-id: 59ee8adc296f9ca155dde04c1429273656a26244
2025-03-07 10:47:55 -08:00
Rob HoganandFacebook GitHub Bot 0967a821b1 Test fixtures - don't reference Metro versions (#49895)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49895

Minor thing, but the fact that these fixture `package.json`s for testing a release script reference real Metro packages and versions always trips me up when I'm updating Metro (grepping, etc).

There's no need for them to mention Metro - any non-RN package is sufficient to test that the script preserves other dependencies. This swaps them for dummy packages.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D70789598

fbshipit-source-id: 32f394bf1f783534b76d260908538d7b5716ef1f
2025-03-07 10:29:38 -08:00
Rob HoganandFacebook GitHub Bot 0ad192003e Update Metro dependencies to 0.82.0 (#49885)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49885

Updates all `metro*` dependencies to the latest `^0.82.0`.

The breaking changes in this release apply only to frameworks and integrators.

This update brings `package.json#exports` resolution enabled by default, and lazy hashing for much faster Metro startup.

Release notes:
https://github.com/facebook/metro/releases/tag/v0.82.0

Changelog:
[General][Changed] Update Metro to ^0.82.0

Reviewed By: vzaidman

Differential Revision: D70778791

fbshipit-source-id: ffb55ed384d721205aa4d7f528c63c0b0a38abc5
2025-03-07 10:09:22 -08:00
Jakub PiaseckiandFacebook GitHub Bot d3a27f27a0 Refactor AppRegistry to generate a TS namespace (#49882)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49882

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70627137

fbshipit-source-id: a68524bdd6481f1df2a3529c72f0b5e5b17c521b
2025-03-07 08:16:58 -08:00
Iwo PlazaandFacebook GitHub Bot fef7933f63 Align Animated/Easing with OSS types (#49842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49842

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70623703

fbshipit-source-id: c02a0b17d257fa4eb0dbb38db8842c1755384239
2025-03-07 07:19:01 -08:00
Jakub PiaseckiandFacebook GitHub Bot c131c91eaf Move private property initialization to constructors (#49880)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49880

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70772773

fbshipit-source-id: 6abb4f4f2dba2b9685a0e376581bf9dd4b4ed9e6
2025-03-07 05:27:53 -08:00
Michail StrokinandFacebook GitHub Bot 2a58201322 marked acquireWakeLockNow as static as it was static before (#49875)
Summary:
acquireWakeLockNow was static before but wasn't marked as static in https://github.com/facebook/react-native/commit/9afad527b831ec0c5d50e88daacbaacbc476d478  when changing code to Kotlin.

This breaks react-native-firebase but I've submitted the bug report there as I guess it might be fixed there too.

## Changelog:

[ANDROID] [FIXED] - Marked acquireWakeLockNow as static

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

Test Plan: No tests as it reverts the broken change

Reviewed By: rshest

Differential Revision: D70773675

Pulled By: javache

fbshipit-source-id: d7363702dfec078b7e6d2693d05b8ab87e818522
2025-03-07 04:29:36 -08:00
Riccardo CipolleschiandFacebook GitHub Bot b33bc012dc Add step to sign the XCFramework in CI (#49871)
Summary:
This PR adds a step in CI to sign the xcframework if we have a certificate available
bypass-github-export-checks
## Changelog:
[Internal] - Sign XCFrameworks in CI

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D70734340

Pulled By: cipolleschi

fbshipit-source-id: 244422bdf9a8e0a2075a727a91805f762d4f95c9
2025-03-07 04:28:07 -08:00
Jakub PiaseckiandFacebook GitHub Bot 1174cff2c2 Update createAnimatedComponent type to be correctly translatable to TypeScript (#49881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49881

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70707147

fbshipit-source-id: 84c4f866646ba30cdea43f3d6c2e9d8836d41738
2025-03-07 04:24:45 -08:00
MazurDorianandFacebook GitHub Bot 01881017d3 fix: typo in React-cxxreact.podspec (#49879)
Summary:
This pull request includes a minor change to the `React-cxxreact.podspec` file in the `ReactCommon/cxxreact` package. The change corrects a typo in the `HEADER_SEARCH_PATHS` configuration.

## Changelog:

[IOS] [FIXED] - Corrected the path from `"$(PODS_ROOT)/fas_float/include"` to `"$(PODS_ROOT)/fast_float/include"` in the `HEADER_SEARCH_PATHS` configuration.

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

Reviewed By: rshest

Differential Revision: D70773742

Pulled By: javache

fbshipit-source-id: 0823732bf45c8c17ee7d4c0c3542be5c286445ba
2025-03-07 04:19:09 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 619d5dfbb2 Handle null params in the Interop TM layer (#49873)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49873

In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS.

After my changes in [d4236791e2](https://github.com/facebook/react-native/commit/d4236791e238a614d2fadf5c5659874d983ab029), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil.

This was breaking those modules which started crashing or observing undesired behavior.

This change fixes the issue by making sure that, in those cases, a `nil` value is passed.

Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already.

## Changelog:
[iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules

Reviewed By: javache

Differential Revision: D70723460

fbshipit-source-id: 384f48b6dbb3f54c369b31b6d2ee06069fa3591c
2025-03-07 03:27:21 -08:00
Alex HuntandFacebook GitHub Bot d4c326411c Scope Network Inspection to the New Architecture (#49874)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49874

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D70723808

fbshipit-source-id: dddc75f6329a2e7062a7d0f15dcfcf299e77f037
2025-03-07 03:24:40 -08:00
Bruno AybarandFacebook GitHub Bot c0a5c2c3cb Fix issue with extraModulesForBridge callback (#49849)
Summary:
Fixes https://github.com/facebook/react-native/issues/49819 . Details about how the issue was introduced in the issue description.
bypass-github-export-checks
## Changelog:

[IOS] [FIXED] - Fixed: extraModulesForBridge callback not called when New Architecture enabled

<!-- 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/49849

Test Plan:
Without the change:
1. Open `packages/rn-tester` project
2. In `AppDelegate.mm`, implement `extraModulesForBridge` and add a breakpoint / output something
3. Run the app in iOS <-- Verify that the method is not executed

With the change:

1-3. Same as above <-- verify that the method is called correctly

> [!NOTE]
> As far as I could tell, there is no test suite for this specific codepath, so I didn't write a test for this change. Happy to write one if someone can guide me a little bit.

Reviewed By: rshest

Differential Revision: D70724196

Pulled By: cipolleschi

fbshipit-source-id: cc08798d08cdbd6883347810c7d2697c358770fb
2025-03-07 03:16:49 -08:00
Vitali ZaidmanandFacebook GitHub Bot edf95eb6fa minor log rewording from "received" to "sent" (#49870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49870

Changelog:
[General][Internal] minor log rewording from "received" to "sent"

Reviewed By: huntie

Differential Revision: D70707308

fbshipit-source-id: 8a28b093ebc3dd374e98cfad23996982a48bab8d
2025-03-07 02:31:54 -08:00
Nick GerlemanandFacebook GitHub Bot 1a9adfba16 Fix Recycling of Animated Images (#49850)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49850

`RCTUIImageViewAnimated` has some bugs around reuse.

1. Recycling will set `image` to null, which will no-op on comparison to `self.image`, but `self.image` is always null when the image is animated, because  `RCTUIImageViewAnimated` handles rendering the frames itself. This means we don't properly do things like invalidating the DisplayLink when the image is first recycled.

2. If we ever set superclass image to nil, we make some change to the underlying CALayer, which causes the content to remain black, even though we customize our own `displayLayer`. Diffing layer descriptions, we seem to afterward have a `contentsMultiplyColor` and `contentsSwizzle` on the layer that aren't public.

The solution I have in this diff is to, instead of drawing layers ourselves, update backing UIImage image to the frame. I think this would fix some other bugs as well, like tintColor not applying to animated images. My guess is that this shouldn't add too much extra work, since `UIImageView` should just be propagating the `UIImage` to the layer in a same way that we were before. This same bug may have also been possible before when switching between animated and non-animated image sources I think.

Changelog:
[iOS][Fixed] - Fix Recycling of Animated Images

Reviewed By: cipolleschi, joevilches

Differential Revision: D70668516

fbshipit-source-id: f1127da3e03ebab2b6f7584ba492b3e13448c13b
2025-03-06 12:14:52 -08:00
Riccardo CipolleschiandFacebook GitHub Bot e23d7106d5 Add function to sign XCFramework (#49863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49863

After the creation of the XCFramework, that needs to be signed. After the XCFramework is signed, no further modification can happen or they would break the signature.

## Changelog:
[Internal] - Add function to sign the XCFramework

Reviewed By: cortinico

Differential Revision: D70697279

fbshipit-source-id: c2411ca7d12d4679ba55f124cbb445367b15945a
2025-03-06 12:04:23 -08:00
Pieter De BaetsandFacebook GitHub Bot c08e16afee Correctly propagate prepareToRecycleView return value (#49858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49858

`prepareToRecycleView` returns nullable, since we may decide a view is not recyclable. We should respect that and return the view returned by super.

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: fabriziocucci

Differential Revision: D70696246

fbshipit-source-id: a8e12320611a3b6a3d05353e4b7556c4da416aea
2025-03-06 11:58:36 -08:00
Alex HuntandFacebook GitHub Bot ab9f501c24 Update Community CLI Flow types (#49866)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49866

Scope down type definitions to the subset of CLI we are currently explicitly referencing. Rename/bump to `19.x`.

Related to:
- https://github.com/facebook/react-native/pull/45380
- https://github.com/react-native-community/cli/pull/2584
- (others)

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D70699083

fbshipit-source-id: 43af1b529d9b95f3d8ba955588af6a09367cdcea
2025-03-06 10:29:27 -08:00
Dawid MałeckiandFacebook GitHub Bot 2cbb54e956 Add TextInput to buildTypes and align Flow with TS types (#49720)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49720

Changelog:
[Internal] - Added TextInput to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D70180918

fbshipit-source-id: 2ea815153cbff47af534d80faec5db98e4a4a0e8
2025-03-06 08:54:21 -08:00
Nick LefeverandFacebook GitHub Bot 1114f4c35a Remove views from their parent on recycle (#49851)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49851

Android doesn't allow to mount a view that already has a parent. View recycling removes all children from a view. But if some views don't support recycling, they'll keep a reference to their children. Children being recycled will cause an exception when being mounted.

This diff removes the view from its parent when it is being recycled. This guarantees that whatever the parent, the view can be mounted after being recycled.

bypass-github-export-checks

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D70672120

fbshipit-source-id: 023d8fb48982d6d9ae7f9c537f7f2bb21cf15066
2025-03-06 08:34:02 -08:00
zhongwuzwandFacebook GitHub Bot a51fa6c002 Call RCTInitializeUIKitProxies before bridge create (#49776)
Summary:
In bridge mode, we missed the call of `RCTInitializeUIKitProxies`, leading to UI API called on a background thread.  bridgeless is ok because we call it when create host https://github.com/facebook/react-native/pull/49600 .

```

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication connectedScenes]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x000000010695c700 RCTKeyWindow + 84
5   React                               0x0000000106942a44 -[RCTTraitCollectionProxy init] + 120
6   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
7   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
9   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
10  CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
11  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
12  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
13  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
14  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
15  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
16  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
17  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
18  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
19  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
20  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
21  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
22  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
23  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
24  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
25  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
26  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
27  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
28  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
29  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_G
Main Thread Checker: UI API called on a background thread: -[UIApplication connectedScenes]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x000000010695c700 RCTKeyWindow + 84
5   React                               0x0000000106942a44 -[RCTTraitCollectionProxy init] + 120
6   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
7   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
9   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
10  CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
11  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
12  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
13  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
14  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
15  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
16  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
17  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
18  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
19  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
20  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
21  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
22  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
23  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
24  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
25  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
26  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
27  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
28  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
29  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_G
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIScene activationState]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x000000010695c808 RCTKeyWindow + 348
5   React                               0x0000000106942a44 -[RCTTraitCollectionProxy init] + 120
6   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
7   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
9   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
10  CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
11  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
12  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
13  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
14  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
15  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
16  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
17  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
18  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
19  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
20  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
21  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
22  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
23  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
24  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
25  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
26  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
27  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
28  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
29  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_GLOBAL
Main Thread Checker: UI API called on a background thread: -[UIScene activationState]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x000000010695c808 RCTKeyWindow + 348
5   React                               0x0000000106942a44 -[RCTTraitCollectionProxy init] + 120
6   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
7   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
9   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
10  CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
11  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
12  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
13  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
14  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
15  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
16  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
17  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
18  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
19  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
20  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
21  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
22  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
23  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
24  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
25  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
26  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
27  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
28  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
29  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_GLOBAL
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIWindowScene keyWindow]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x000000010695c968 RCTKeyWindow + 700
5   React                               0x0000000106942a44 -[RCTTraitCollectionProxy init] + 120
6   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
7   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
9   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
10  CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
11  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
12  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
13  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
14  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
15  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
16  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
17  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
18  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
19  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
20  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
21  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
22  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
23  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
24  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
25  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
26  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
27  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
28  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
29  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_GLOBAL
Main Thread Checker: UI API called on a background thread: -[UIWindowScene keyWindow]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x000000010695c968 RCTKeyWindow + 700
5   React                               0x0000000106942a44 -[RCTTraitCollectionProxy init] + 120
6   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
7   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
8   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
9   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
10  CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
11  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
12  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
13  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
14  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
15  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
16  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
17  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
18  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
19  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
20  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
21  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
22  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
23  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
24  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
25  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
26  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
27  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
28  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
29  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_GLOBAL
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIWindow traitCollection]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x0000000106942a64 -[RCTTraitCollectionProxy init] + 152
5   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
6   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
7   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
8   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
9   CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
10  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
11  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
12  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
13  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
14  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
15  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
16  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
17  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
18  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
19  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
20  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
21  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
22  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
23  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
24  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
25  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
26  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
27  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
28  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_GLOBAL__N_115ReentrancyCheckENS0_7RuntimeES5_E18evaluateJavaScriptERKNSt3__110share
Main Thread Checker: UI API called on a background thread: -[UIWindow traitCollection]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x0000000106942a64 -[RCTTraitCollectionProxy init] + 152
5   React                               0x00000001069429ac __41+[RCTTraitCollectionProxy sharedInstance]_block_invoke + 36
6   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
7   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
8   React                               0x0000000106942960 +[RCTTraitCollectionProxy sharedInstance] + 88
9   CoreModules                         0x000000010538c488 -[RCTPlatform getConstants] + 80
10  CoreModules                         0x000000010538c42c -[RCTPlatform constantsToExport] + 32
11  React                               0x00000001068f2440 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 752
12  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
13  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
14  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
15  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
16  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
17  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
18  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
19  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
20  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
21  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
22  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
23  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
24  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
25  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
26  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
27  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shared_ptrIKNS0_6BufferEEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE + 64
28  reacthermes                         0x00000001094736f4 _ZN8facebook3jsi20WithRuntimeDecoratorINS_5react12_GLOBAL__N_115ReentrancyCheckENS0_7RuntimeES5_E18evaluateJavaScriptERKNSt3__110share
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x00000001068dc7bc -[RCTKeyWindowValuesProxy init] + 196
5   React                               0x00000001068dc6d8 __41+[RCTKeyWindowValuesProxy sharedInstance]_block_invoke + 36
6   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
7   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
8   React                               0x00000001068dc68c +[RCTKeyWindowValuesProxy sharedInstance] + 88
9   CoreModules                         0x0000000105369ce8 -[RCTDeviceInfo init] + 124
10  React                               0x00000001068ef440 __115-[RCTModuleData initWithModuleClass:bridge:moduleRegistry:viewRegistry_DEPRECATED:bundleManager:callableJSModules:]_block_invoke + 36
11  React                               0x00000001068efca4 -[RCTModuleData setUpInstanceAndBridge:] + 1440
12  React                               0x00000001068f1e40 -[RCTModuleData instance] + 1168
13  React                               0x00000001068f2300 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 432
14  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
15  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
16  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
17  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
18  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
19  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
20  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
21  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
22  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
23  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
24  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
25  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
26  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
27  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
28  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
29  reacthermes                         0x0000000109476514 _ZN8facebook3jsi16RuntimeDecoratorINS0_7RuntimeES2_E18evaluateJavaScriptERKNSt3__110shar
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 91600, TID: 2326173, Thread name: com.facebook.react.JavaScript, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   React                               0x00000001068dc7bc -[RCTKeyWindowValuesProxy init] + 196
5   React                               0x00000001068dc6d8 __41+[RCTKeyWindowValuesProxy sharedInstance]_block_invoke + 36
6   libdispatch.dylib                   0x0000000107bd65d0 _dispatch_client_callout + 16
7   libdispatch.dylib                   0x0000000107bd8088 _dispatch_once_callout + 84
8   React                               0x00000001068dc68c +[RCTKeyWindowValuesProxy sharedInstance] + 88
9   CoreModules                         0x0000000105369ce8 -[RCTDeviceInfo init] + 124
10  React                               0x00000001068ef440 __115-[RCTModuleData initWithModuleClass:bridge:moduleRegistry:viewRegistry_DEPRECATED:bundleManager:callableJSModules:]_block_invoke + 36
11  React                               0x00000001068efca4 -[RCTModuleData setUpInstanceAndBridge:] + 1440
12  React                               0x00000001068f1e40 -[RCTModuleData instance] + 1168
13  React                               0x00000001068f2300 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 432
14  React                               0x00000001068f26c4 -[RCTModuleData exportedConstants] + 40
15  React                               0x00000001068fd6e8 _ZN8facebook5react15RCTNativeModule12getConstantsEv + 200
16  cxxreact                            0x00000001090e55d0 _ZN8facebook5react14ModuleRegistry9getConfigERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 1280
17  jsireact                            0x0000000108fb742c _ZN8facebook5react16JSINativeModules12createModuleERNS_3jsi7RuntimeERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 188
18  jsireact                            0x0000000108fb7120 _ZN8facebook5react16JSINativeModules9getModuleERNS_3jsi7RuntimeERKNS2_10PropNameIDE + 332
19  jsireact                            0x0000000108f9ff88 _ZN8facebook5react11JSIExecutor17NativeModuleProxy3getERNS_3jsi7RuntimeERKNS3_10PropNameIDE + 292
20  reacthermes                         0x0000000109478644 _ZN8facebook3jsi19DecoratedHostObject3getERNS0_7RuntimeERKNS0_10PropNameIDE + 92
21  hermes                              0x0000000109edb344 _ZN8facebook6hermes17HermesRuntimeImpl8JsiProxy3getEN6hermes2vm8SymbolIDE + 88
22  hermes                              0x0000000109fc5590 _ZN6hermes2vm8JSObject27getComputedWithReceiver_RJSENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_ + 712
23  hermes                              0x0000000109fb0e90 _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 10024
24  hermes                              0x0000000109fae734 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
25  hermes                              0x0000000109fe92d8 _ZN6hermes2vm7Runtime11runBytecodeEONSt3__110shared_ptrINS_3hbc14BCProviderBaseEEENS0_18RuntimeModuleFlagsEN4llvh9StringRefENS0_6HandleINS0_11EnvironmentEEENSB_INS0_11HermesValueEEE + 1420
26  hermes                              0x0000000109ecde7c _ZN8facebook6hermes17HermesRuntimeImpl26evaluatePreparedJavaScriptERKNSt3__110shared_ptrIKNS_3jsi18PreparedJavaScriptEEE + 220
27  hermes                              0x0000000109ecdd04 _ZN8facebook6hermes17HermesRuntimeImpl31evaluateJavaScriptWithSourceMapERKNSt3__110shared_ptrIKNS_3jsi6BufferEEES9_RKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 116
28  hermes                              0x0000000109ecec9c _ZN8facebook6hermes17HermesRuntimeImpl18evaluateJavaScriptERKNSt3__110shared_ptrIKNS_3jsi6BufferEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 32
29  reacthermes                         0x0000000109476514
```

## Changelog:

[IOS] [FIXED] - Call RCTInitializeUIKitProxies before bridge create

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

Test Plan:
Run RNTester in bridge mode. no UI main thread checker issue.

1. Test Headset pairing through Twilight app.
2. Test going to Horizon Worlds

|pictures of successful pairing| going into Horizon world|
|{F1975774792}{F1975774799}|{F1975774801}

Reviewed By: cipolleschi

Differential Revision: D70557608

Pulled By: sammy-SC

fbshipit-source-id: 2cbc09e126dc6f942a63b966ff32ff5801a24ec3
2025-03-06 05:15:43 -08:00
Alex HuntandFacebook GitHub Bot 900b625ee9 Bootstrap Fusebox NetworkReporter API (#49837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49837

Bootstraps the `NetworkReporter` API and `jsinspector_network` library. This will form the common C++ logic for Network Inspection in React Native DevTools.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D70554862

fbshipit-source-id: 862e255f61e21871c35b1a848caec3f34e843823
2025-03-06 01:24:22 -08:00
David VaccaandFacebook GitHub Bot b987101fdd Log class loading for subset of classes annotated with @LegacyArchitecture (#49831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49831

Log class loading for classes annotated with LegacyArchitecture
changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D70608476

fbshipit-source-id: 1efd37ec824c9d48b2e85439b23ca2caf62d0b20
2025-03-05 23:22:37 -08:00
David VaccaandFacebook GitHub Bot 3f1f5b08c8 Log class loading for bridge classes annotated with @LegacyArchitecture (#49830)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49830

Log class loading for classes annotated with LegacyArchitecture
changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70608265

fbshipit-source-id: dec93b9b40fa46b3157af9275081e58d6ff53e8d
2025-03-05 23:22:37 -08:00
David VaccaandFacebook GitHub Bot 932fd86b74 Log class loading for subset of bridge and uimanager classes annotated with @LegacyArchitecture (#49829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49829

Log class loading for bridge and uimanager classes annotated with LegacyArchitecture
changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D70607960

fbshipit-source-id: e35666b48e63c784217c0b35ad1b5d4328944527
2025-03-05 23:22:37 -08:00
David VaccaandFacebook GitHub Bot 7596173c13 Log class loading for subset of classes annotated with @LegacyArchitecture (#49828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49828

Log class loading for subset of classes annotated with LegacyArchitecture
changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D70593617

fbshipit-source-id: e95155e19118ae9b2a9fabd96ef245cbf4ff954c
2025-03-05 23:22:37 -08:00
David VaccaandFacebook GitHub Bot 85cd552fb1 Log class loading for uimanager and layoutaninations classes annotated with @LegacyArchitecture (#49827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49827

Log class loading for uimanager and layoutaninations classes annotated with LegacyArchitecture

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D70607606

fbshipit-source-id: 5e0dd9059a77bc4cc6a61ec68bb7b9f539a22b81
2025-03-05 23:22:37 -08:00
Vitali ZaidmanandFacebook GitHub Bot b30538d804 update and dedupe the npm package "debug" (#49816)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49816

Previously, we had different versions of "debug" installed in different packages, mostly because of messed up `yarn.lock` entries.

Also, updated the package, receiving some performance improvements (no relevant breaking changes).

Changelog:
[General][Internal] update and dedupe the npm package "debug"

Reviewed By: huntie

Differential Revision: D70402368

fbshipit-source-id: 5e21bc6d92e0cb45ac1d862f100ef6dc0f21dbc1
2025-03-05 20:52:30 -08:00
Peter AbbondanzoandFacebook GitHub Bot f8f95b9612 Back out "Fix app lagging while attempting a connection to Metro" (#49820)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49820

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D70561362

fbshipit-source-id: 3e46d33641b121c1bff33f44cfbb6d1f46009e35
2025-03-05 18:54:05 -08:00
Peter AbbondanzoandFacebook GitHub Bot 6b38c53d6d Back out "Update tests to support new didOpen delegate fn" (#49821)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49821

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D70561364

fbshipit-source-id: ca70b8bfcdefefff91d02c6e470610a2e0045cec
2025-03-05 18:54:05 -08:00
Phil PluckthunandFacebook GitHub Bot 8f19201c5e refactor(react-native-codegen): Replace jscodeshift with @babel/core (#49641)
Summary:
`jscodeshift` is only used in one module (`src/generators/components/GenerateViewConfigJs.js`, but depends on a rather complex dependency chain and has a rather large maintenance burden relative to what it's used for and the value it adds in the codebase.

Since the `GenerateViewConfigJs` module creates simple templates, using `babel/core` (and implicitly `babel/template` and `babel/types`) is a lot simpler and changes little code. The only change this introduces to the output are formatting changes (`singleQuote` and `trailingCommas` options are discarded). The code is otherwise functionally identical.

## Changelog:

[INTERNAL] [CHANGED] - Drop jscodeshift dependency from react-native/codegen

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

Test Plan:
This was tested against a React Native build with the `react-native/babel-plugin-codegen` plugina active and using the snapshots in the repo itself. While the snapshots have changed in formatting, none of the outputs change the code's AST.

<details>
<summary>
Example output from <code>react-native/babel-plugin-codegen</code> to supplement the snapshot tests
</summary>

This is the example bundling output of `AndroidSwipeRefreshLayout`. This demonstrates that both the view config output and the `Commands` export continue to be generated correctly.

```js
var _interopRequireDefault = require(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.__INTERNAL_VIEW_CONFIG = exports.Commands = undefined;
var _codegenNativeCommands = _interopRequireDefault(require(_dependencyMap[1]));
var _codegenNativeComponent = _interopRequireDefault(require(_dependencyMap[2]));
var React = _interopRequireWildcard(require(_dependencyMap[3]));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var NativeComponentRegistry = require(_dependencyMap[4]);
var _require = require(_dependencyMap[5]),
  ConditionallyIgnoredEventHandlers = _require.ConditionallyIgnoredEventHandlers;
var _require2 = require(_dependencyMap[6]),
  dispatchCommand = _require2.dispatchCommand;
var nativeComponentName = 'AndroidSwipeRefreshLayout';
var __INTERNAL_VIEW_CONFIG = exports.__INTERNAL_VIEW_CONFIG = {
  uiViewClassName: "AndroidSwipeRefreshLayout",
  directEventTypes: {
    topRefresh: {
      registrationName: "onRefresh"
    }
  },
  validAttributes: {
    enabled: true,
    colors: {
      process: (req => 'default' in req ? req.default : req)(require(_dependencyMap[7]))
    },
    progressBackgroundColor: {
      process: require(_dependencyMap[8]).default
    },
    size: true,
    progressViewOffset: true,
    refreshing: true,
    ...ConditionallyIgnoredEventHandlers({
      onRefresh: true
    })
  }
};
var _default = exports.default = NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
var Commands = exports.Commands = {
  setNativeRefreshing(ref, value) {
    dispatchCommand(ref, "setNativeRefreshing", [value]);
  }
};
```

</details>

Reviewed By: yungsters

Differential Revision: D70580474

Pulled By: elicwhite

fbshipit-source-id: 85bc6578b685f19a1565ded8d7e56dc2a1ff1999
2025-03-05 14:06:46 -08:00
David VaccaandFacebook GitHub Bot db8afb0f96 Annotate NullSafe(LOCAL) for classes in java/com/facebook/react/text (#49772)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49772

Nullsafety scripts and analysis determine it's safe to annotate these classes as NullSafe(LOCAL)

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D70464133

fbshipit-source-id: d3734957dde5b097980fb2c5feb00aa248566bda
2025-03-05 12:17:21 -08:00
David VaccaandFacebook GitHub Bot 4e35676149 Annotate NullSafe(LOCAL) for classes in java/com/facebook/react/modules (#49769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49769

Nullsafety scripts and analysis determine it's safe to annotate these classes as NullSafe(LOCAL)

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70464130

fbshipit-source-id: b6819efc06e0a25a5de32842536175177c42c7b6
2025-03-05 12:17:21 -08:00
Fabrizio CucciandFacebook GitHub Bot 8f209acb3f Fix out of sync state in ScrollView after animation
Summary:
It seems that if we update the scroll state when the state wrapper is null we can get into an out of sync state.

I've replicated the issue in HelpCenter and confirmed with a video this seems to be the case (i.e. when gazing on some cards, their corresponding frame is incorrect)

https://www.internalfb.com/intern/px/p/6xWgl

NOTE: I have accidentally stumbled upon this fix but I could really use a review from someone who has more context around the `ReactScrollViewHelper` because this change might have bigger implications I'm not aware of!

    Changelog:
    [Android][Fixed] - Fix occasional syncronization issue in ScrollView when rendering dynamic content with content offset

Commits affecting the React Native open source repository must have a changelog
entry in the commit summary. Every React Native release has almost 1000 commits,
and manually categorizing these commits is very time consuming.

In your diff summary, please add a `Changelog:` entry using the format:

The "Category" field may be one of:

  - **Android**, for changes that affect Android.
  - **iOS**, for changes that affect iOS.
  - **General**, for changes that do not fit any of the other categories.
  - **Internal**, for changes that would not be relevant to developers consuming
    the release notes.

The "Type" field may be one of:

  - **Breaking**, for breaking changes.
  - **Added**, for new features.
  - **Changed**, for changes in existing functionality.
  - **Deprecated**, for soon-to-be removed features.
  - **Removed**, for now removed features.
  - **Fixed**, for any bug fixes.
  - **Security**, in case of vulnerabilities.

If your change does not modify React Native's public interface, you can use:

    Changelog: [Internal]

For more details, please read the wiki: https://fburl.com/react-native/changelog

Reviewed By: javache

Differential Revision: D70484547

fbshipit-source-id: c314b958eeed4dd96755539f5bbfb8f03e17a525
2025-03-05 11:47:52 -08:00
Samuel SuslaandFacebook GitHub Bot f5682d64eb fix a crash in Fabric View Culling when wrapping view is unflattened (#49845)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49845

changelog: [internal]

Fixes a crash that occurs when culled view's ancestor is flattened/unflattened.

Reviewed By: lenaic

Differential Revision: D70620103

fbshipit-source-id: 20b7f9acd59c5e74e768d31ff1f96bdd06747389
2025-03-05 11:18:46 -08:00
Rubén NorteandFacebook GitHub Bot cc761e42c8 Clean up "enablePreciseSchedulingForPremountItemsOnAndroid" feature flag (#49841)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49841

Changelog: [internal]

This effectively reverts D62962341 / https://github.com/facebook/react-native/pull/46563 as the experiments didn't provide the expected wins and we don't have bandwidth to iterate on this.

Reviewed By: rshest

Differential Revision: D70622429

fbshipit-source-id: c53c9437448c0a7be8f5b4f04d6369efbd99105a
2025-03-05 10:02:36 -08:00
Dawid MałeckiandFacebook GitHub Bot ed81081a77 Align StyleSheet Flow with TS types (#49809)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49809

Changelog:
[Internal] - Aligned StyleSheet Flow with TS types

Reviewed By: huntie

Differential Revision: D70489975

fbshipit-source-id: fe7748aa9759bb8417c13fc11aa6118915a041c3
2025-03-05 09:17:40 -08:00
Dawid MałeckiandFacebook GitHub Bot f63bd3a8e4 Create implicit StyleSheet namespace to better align Flow and TS types (#49810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49810

Changelog:
[Internal]

Migrated StyleSheet namespace content to StyleSheetExport.js to recreate it by importing * as StyleSheet, which aligns with TS namespace definition. Added .flow files that specify base type declarations and will be digested by the flow tooling.

Reviewed By: huntie

Differential Revision: D70391322

fbshipit-source-id: dd974ef282cb984a1e57d5732e3b5bdab6db4564
2025-03-05 09:17:40 -08:00
Iwo PlazaandFacebook GitHub Bot dc689aa415 Skip redundant reparsing when translating Flow defs to TS defs (#49840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49840

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70620551

fbshipit-source-id: d526c1de733f19ab6106ae586632709fd1a389dc
2025-03-05 05:39:22 -08:00
Dawid MałeckiandFacebook GitHub Bot f5feb73022 Move PlatformColorValueTypesIOS comments from .d.ts to .js (#49834)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49834

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D70615477

fbshipit-source-id: 4f042d05a1c487ace87af07809c70e6a2582d652
2025-03-05 03:30:42 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 290257e76d Fix Sonatype publishing (#49836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49836

We were passing the path to the `RegularFile` instead of the `PublishingArtifacts` to the gradle script.

cortinico why this is not checked at build time? This should be a typing issue that should be caught at build time, also during the test-all jobs, not just when the nightly run...

## Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D70617638

fbshipit-source-id: 67ff1aea2bd827fb110db7a0d2f3651b88a1e8cc
2025-03-05 03:30:32 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 908146caa5 Fix TMManager moduleProviderForName (#49835)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49835

The implementation of moduleProviderForName is slightly off.

This method was supposed to replace the previous ternary expression and to enhance with the module provider call.

The ternary expression used to be
```
!RCTTurboModuleInteropEnabled() || [self _isTurboModule:moduleName] ? [self _provideObjCModule:moduleName] : nil
```

However, as you can see from the current implementation, instead of calling `RCTTurboModuleInteropEnabled()` we are calling `RCTTurboModuleEnabled()` which is clearly a mistake.

On top of that, I'm also updating the guard around the `getModuleProvider` selector as it was bypassing the other checks, and that's wrong.

## Changelog:
[Internal] - Fix moduleProviderForName method

Reviewed By: RSNara

Differential Revision: D70569552

fbshipit-source-id: ed4055da9ea385ed10323ed8d7a8772010b3a105
2025-03-05 03:24:07 -08:00
Dawid MałeckiandFacebook GitHub Bot a1ed5f9014 Add type tests for process color (#49832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49832

Changelog:
[Internal] - Added type tests for process color

Reviewed By: huntie

Differential Revision: D70561282

fbshipit-source-id: b410459233348fe584bee29b74b72804013f170f
2025-03-05 02:44:20 -08:00
Sam ZhouandFacebook GitHub Bot 12ac3e7273 Deploy 0.263.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D70606997

fbshipit-source-id: bd89ea370fbc408fbc22a4ac2f7463a09bdb1ffd
2025-03-04 22:04:46 -08:00
Sam ZhouandFacebook GitHub Bot 7c5995df4a Deploy 0.263.0 to xplat (#49825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49825

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D70595199

fbshipit-source-id: a3be1b74cca99f0ff79aca4dd51059b3b09facb2
2025-03-04 21:35:46 -08:00
David VaccaandFacebook GitHub Bot bf72322912 Annotate NullSafe(LOCAL) for classes in java/com/facebook/react (#49768)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49768

Nullsafety scripts and analysis determine it's safe to annotate these classes as NullSafe(LOCAL)

changelog: [internal] internal

Reviewed By: javache, rshest

Differential Revision: D70464135

fbshipit-source-id: a430a6a04bbb49b3f830dbe68a46d3268afe628b
2025-03-04 19:56:16 -08:00
David VaccaandFacebook GitHub Bot 835d2079fd Introduce LegacyArchitectureLogger class (#49823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49823

Introduce LegacyArchitectureLogger class, which provides logging functionality to help track and debug usage of legacy architecture components when an app is running on the new architecture. The data provided by this class will  help identify classes and methods that are still being used in the new architecture when they shouldn't.

changelog: [Internal] Internal

Reviewed By: rshest

Differential Revision: D70543605

fbshipit-source-id: 56262170c03bb0fd375b8dc3cb34a7c15a69a810
2025-03-04 18:21:55 -08:00
Mateo GuzmánandFacebook GitHub Bot f60a48c9f3 Migrate PositionAndSizeAnimation to Kotlin (#49756)
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.PositionAndSizeAnimation to Kotlin.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.PositionAndSizeAnimation to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D70493553

Pulled By: Abbondanzo

fbshipit-source-id: 48b57901e93c32a8bc1ba40988eeae12bfc4aea1
2025-03-04 13:00:19 -08:00
Janic DuplessisandFacebook GitHub Bot b614c966ab Setup a Macrobenchmark for RNTester (#49486)
Summary:
Benchmark to test changes from https://github.com/facebook/react-native/issues/49449

Might be nice to have some version of this in the repo.

## Changelog:

[INTERNAL] [ADDED] - Setup a Macrobenchmark for RNTester

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

Test Plan:
### Methodology

Picked various JS file from websites (facebook, instagram) to artificially grow RN tester bundle somewhat realistically. The files are required lazily from a button press callback to simulate the code being included, but not executed, as it would be in a large app that uses lazy requires for the different screens.

I've also made the RN tester screens lazy so all their code is not loaded initially. This is more representative of real apps. Note this is implemented in a hacky way just for the purpose of this test. It would actually be nice to implement this properly.

The tests were made using low end device Samsung Galaxy A03s.

### Compression ON with 10.5 mb bundle

#### Peak allocated memory

60.9 mb

#### ReactInstance.loadJSBundler

148.64 ms

#### Benchmark

timeToFullDisplayMs      min 1,825.0,   median 1,911.1,   max 1,994.8
timeToInitialDisplayMs   min   834.9,   median   860.9,   max   903.9

#### APK

Size: 22.9 mb
Download size: 14.5 mb

### Compression OFF with 10.5 mb bundle

#### Peak allocated memory

51.5 mb

#### ReactInstance.loadJSBundler

946 us

#### Benchmark

timeToFullDisplayMs      min 1,752.8,   median 1,827.2,   max 1,977.5
timeToInitialDisplayMs   min   837.7,   median   881.3,   max   937.2

#### APK

Size: 28 mb
Download size: 14.5 mb

Reviewed By: rshest

Differential Revision: D70002286

Pulled By: cortinico

fbshipit-source-id: 436597f439ba244649373870c1facefdb12297d9
2025-03-04 12:56:07 -08:00
Alex HuntandFacebook GitHub Bot f94dbb30ee Exclude HostAgent implementation in release builds (#49813)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49813

Making use of the recently standardised `REACT_NATIVE_DEBUGGER_ENABLED` preprocessor flag, conditionally swap out `HostAgent` for a stub in production (non dev, non profiling) builds. This uses the same private implementation idiom as `HermesRuntimeTargetDelegate`.

This results in a **42.2kiB** size reduction (uncompressed) in production builds, due to excluding the CDP agent components of `jsinspector-modern`.

- Intentionally, we're gating just this logic, rather than several outer integration points/native bindings for `jsinspector-modern`. This is for predictability and maintenance — the Fusebox subsystem is always loaded/bound, but can fork to an empty implementation.

 {F1975625351}

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D70495853

fbshipit-source-id: 00253ac71444819a917a3781efe38365acb91e85
2025-03-04 10:17:04 -08:00
Pieter De BaetsandFacebook GitHub Bot 6bf6cebcf0 Remove usage of folly::to (#49786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49786

Most of these call-sites are only used for exceptional scenarios, so we can just rely on std::to_string and do string concatenation. For a few others that may be more perf-sensitive, I switched over to `snprintf`.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D70402439

fbshipit-source-id: 3b90ebb13a7bf1c6cf30722ef636e5e8498a5b26
2025-03-04 10:07:09 -08:00
Vitali ZaidmanandFacebook GitHub Bot 86b1f9ac07 fix type on the flow types for "chalk" (#49814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49814

`bgWhiteBrigh + t = bgWhiteBright`
seems like no one was using `chalk.bgWhiteBright` before me :)

Changelog:
[General][Internal] fix type on the flow types for "chalk"

Reviewed By: huntie, hoxyq

Differential Revision: D70403987

fbshipit-source-id: 34f65e57fbb2eeadd6030557e0499db0b2603b38
2025-03-04 10:05:30 -08:00
Riccardo CipolleschiandFacebook GitHub Bot fc264400ec Fix PullToRefresh props casting (#49815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49815

The pull to refresh component props's casting is imprecise.
This change uses the more precise type for the props.

## Changelog:
[Internal] - cast props to `PullToRefreshViewProps`

Reviewed By: sammy-SC

Differential Revision: D70559080

fbshipit-source-id: c42d3d41a22683a3392813c2af25828781a68401
2025-03-04 10:04:36 -08:00
Ruslan LesiutinandFacebook GitHub Bot ed7dbce799 Increase Hermes Sampling rate to 10kHz (#49795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49795

# Changelog: [Internal]

I've been able to reliably and consistently record samples with an interval between 2 consecutive ones to be ~0.1-0.2ms, lets bump the sampling frequency to have more frames.

On Windows, Hermes Sampler peaks at ~500Hz, so this won't have much effect.

Reviewed By: huntie

Differential Revision: D70395983

fbshipit-source-id: 9a9e619d75096a3ee75e0e1a2f8b8fff33130268
2025-03-04 08:10:41 -08:00
Ruslan LesiutinandFacebook GitHub Bot df4433c40e Serialize and send Profile trace events after emitting the buffer (#49794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49794

# Changelog: [Internal]

Before, we would store all User Timings and Timeline Events in the PerformanceTracer's buffer, and then add Profile event to it as well.

On larger apps, the amount of events buffered could reach ~100k, which inevitably would cause OOM.

With this approach, we will flush out buffered events from PerformanceTracer first, then do JavaScript Profile serialization, then send it over CDP straight away.

Reviewed By: huntie

Differential Revision: D70395982

fbshipit-source-id: 2c17abba421fa9c4afc4d4ca36afd98b1db50905
2025-03-04 08:10:41 -08:00
Mateo GuzmánandFacebook GitHub Bot 71fbf51979 Migrate ReactNativeVersion Android template to Kotlin (#49758)
Summary:
Added a new template `ReactNativeVersion.kt-template.js` to be used to generate the Kotlin template for Android. Updating also the set-rn-artifacts-version script to use this template instead of the Java one.

## Changelog:

[INTERNAL] - Migrate ReactNativeVersion Android template to Kotlin

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

Test Plan:
```bash
yarn test-android
yarn android
node ./scripts/releases/set-version.js 1000.0.0
```

Reviewed By: huntie, rshest

Differential Revision: D70486775

Pulled By: cortinico

fbshipit-source-id: 5dd1e0e2ecf4d848dc24e6c47df243a1259ab559
2025-03-04 07:38:18 -08:00
Fabrizio CucciandFacebook GitHub Bot e85079219f Add changelog for 0.79.0-rc.0 (#49808)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49808

As per title.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D70553252

fbshipit-source-id: ce8721017cbfa8d114f3d3acc5aa67762924c4d9
2025-03-04 07:32:51 -08:00
Pieter De BaetsandFacebook GitHub Bot 5411b143ef Use fast_float in CSS parser (#49751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49751

fast_float promises significant improvements in float parsing performance and is already what's being used in folly internally. Unifying all percentage parsing on the new css parser logic, which can use fast_float internally.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D70392268

fbshipit-source-id: 56147e5478d008bc2c34579df035ec7acf8744bb
2025-03-04 07:25:59 -08:00
Pieter De BaetsandFacebook GitHub Bot 3dc78f804a Update fast_float dependency to 8.0.0 (#49775)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49775

Upgrading this dependency to match folly and to enable using this for number parsing across Fabric.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D70482373

fbshipit-source-id: 64429595c1126e6a06436701a7562bdf6dd962d5
2025-03-04 07:25:59 -08:00
Riccardo CipolleschiandFacebook GitHub Bot a8e25733dd Use the right file for dSYM (#49807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49807

This change fixes a copy-and-paste mistake in passing the right parameter for publishing the ReactNativeDependencies dSYMs.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D70552858

fbshipit-source-id: fc103814420d94180d26c89ba9b405693864a64b
2025-03-04 06:24:32 -08:00
Vitali ZaidmanandFacebook GitHub Bot 49af871af4 reduce the space occupied by initial metro logs (#49805)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49805

Changelog:
[General][Internal] reduce the space occupied by initial metro logs

Reviewed By: huntie

Differential Revision: D70488459

fbshipit-source-id: 23865e117c372a8c4a25ec89fbd5c4daacb6a596
2025-03-04 05:46:00 -08:00
Alex HuntandFacebook GitHub Bot 9c6af97ff8 Include root entry point, switch to excludes (#49806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49806

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D70488623

fbshipit-source-id: 72f10da4082754dea7d8675f09559607ac96905e
2025-03-04 05:35:34 -08:00
Alex HuntandFacebook GitHub Bot ec851ccf4f Simplify type source file resolution logic (#49785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49785

Changelog: [Internal]

Reviewed By: cipolleschi, iwoplaza

Differential Revision: D70487265

fbshipit-source-id: ed4654e975f5fec0fe76f8d5f156fef611e24d14
2025-03-04 05:35:34 -08:00
Nicola CortiandFacebook GitHub Bot 3132cc88dd Enable RTTI to fix exception pointer issue on React Native
Summary:
X-link: https://github.com/facebook/yoga/pull/1791

Disabling RTTI for Yoga is causing std::exception to don't work properly in OSS.
Fixes: https://github.com/facebook/react-native/issues/48027

Not sure why we originally disabled RTTI for Yoga, but we have it enable for the whole
React Native build so it probably makes sense to have it enabled for Yoga as well.

Changelog:
[Internal] [Changed] - Enable RTTI to fix exception pointer issue on React Native

bypass-github-export-checks

Reviewed By: javache, NickGerleman

Differential Revision: D70386744

fbshipit-source-id: 36e3a1ddb38346d31979d5c1b77d6e9796d6a855
2025-03-04 04:51:38 -08:00
Nicola CortiandFacebook GitHub Bot 25949b361c Refactor ReactCommon to use target_compile_reactnative_options (#49803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49803

This refactors the whole ReactCommon to use the `target_compile_reactnative_options` macro we just introduced.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386740

fbshipit-source-id: 1f15ea7e182d79bbb0bedce653284808e3309e4f
2025-03-04 04:51:38 -08:00
Facebook Community BotandGitHub 88fb0218fb Re-sync with internal repository (#49811) 2025-03-04 11:55:38 +00:00
Fabrizio CucciandFacebook GitHub Bot a58aae46df Fix destructuring error in Verify Release is on NPM step
Summary:
Found this issue while releasing 0.79.0-rc.0 (see [job](https://github.com/facebook/react-native/actions/runs/13649159968/job/38156418752)).

bypass-github-export-checks

```
SyntaxError: Invalid destructuring assignment target
    at new AsyncFunction (<anonymous>)
    at callAsyncFunction (/__w/_actions/actions/github-script/v6/dist/index.js:15143:16)
    at main (/__w/_actions/actions/github-script/v6/dist/index.js:15236:26)
    at /__w/_actions/actions/github-script/v6/dist/index.js:15217:1
    at /__w/_actions/actions/github-script/v6/dist/index.js:15268:3
    at Object.<anonymous> (/__w/_actions/actions/github-script/v6/dist/index.js:15271:12)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
```

## Changelog:
[Internal] -

Reviewed By: cipolleschi

Differential Revision: D70552301

fbshipit-source-id: b50e3d76c7497cc218e379400d5870531669abe1
2025-03-04 03:17:46 -08:00
David VaccaandFacebook GitHub Bot 25d501df7e Annotate LegacyArchitecture classes for com/facebook/react/uimanager package (#49764)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49764

Annotate LegacyArchitecture classes for com/facebook/react/uimanager package

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441495

fbshipit-source-id: fd3e5b3a40dffc31197df2153cde528bc723a2ab
2025-03-03 17:31:27 -08:00
David VaccaandFacebook GitHub Bot 8254758f74 Annotate Legacy Architecture classes of com/facebook/react (#49765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49765

Annotate Legacy Architecture classes of com/facebook/react

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441494

fbshipit-source-id: bc677ce508a0d119258819fc6a02d339dc5d8e9a
2025-03-03 17:31:27 -08:00
David VaccaandFacebook GitHub Bot 7d71f5d2de Mark Bridge classes as LegacyArchitecture (#49763)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49763

Mark Bridge classes as LegacyArchitecture

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D70429646

fbshipit-source-id: 12b4ff95f337b046a9f377529d92eac70c16e7ea
2025-03-03 17:31:27 -08:00
David VaccaandFacebook GitHub Bot a8c4b3a274 Mark all LayoutAnination classes as LegacyArchitecture (#49761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49761

LayoutAnination classes are not used on the new architecture, this diff marks the as LegacyArchitecture to drive its removal

Changelog: [Internal] internal

Reviewed By: rshest

Differential Revision: D70410096

fbshipit-source-id: cda84958985c4133c926455a5c9611773a0d32ec
2025-03-03 17:31:27 -08:00
David VaccaandFacebook GitHub Bot 9915cf0811 Annotate as LegacyArchitecture classes from devSupport, internal and jsexecutor (#49766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49766

Annotate as LegacyArchitecture classes from devSupport, internal and jsexecutor

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70441497

fbshipit-source-id: bfb4f5ce7dc4c73e120bdf00ebc21ffd07b5b43b
2025-03-03 17:08:21 -08:00
David VaccaandFacebook GitHub Bot 40b38d0a44 Delete Deprecated classs StandardCharsets (#49762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49762

Delete Deprecated classs StandardCharsets

changelog: [Android][Breaking] Delete Deprecated classs StandardCharsets

Reviewed By: rshest

Differential Revision: D70441496

fbshipit-source-id: f8f9cf9fc5a90d73d79a6493c7343a80f683c237
2025-03-03 17:08:21 -08:00
Nicola CortiandFacebook GitHub Bot c4c3d3bfbe Do not use $ in identifiers for event emitters. (#49792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49792

This removes the `$` from the `event` and `payload` identifier inside codegen.
This is causing the `-Wdollar-in-identifier-extension` warning to fire.

As I'm looking into enabling `-Wall -Werror` for React Common, this should be addressed as well.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D70500543

fbshipit-source-id: c593680961b1b98561c3985f92ade5d6ba448ac9
2025-03-03 16:47:46 -08:00
Nicola CortiandFacebook GitHub Bot a724b27301 Remove _Nullable from jni_lib_merge.
Summary:
This is causing the `-Wno-nullability-extension` warning to fire.
As I'm looking into enabling `Wall Werror` for ReactCommon, this should be fixed as it's causing the build to fail.

We don't use nullability extensions at all in the other JNI_OnLoad files, so it's fine (and probably better) we
replace them with a function that also doens't specify a Nullability annotation.

This is impacting only the OSS So Merging toolchain.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D70500544

fbshipit-source-id: 2d5b52d8f34ec026a25e8625bd0c6a1812221dea
2025-03-03 16:47:46 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 53eaf3e4e4 Back out "fix: avoid race condition crash in [RCTDataRequestHandler invalidate]" (#49797)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49797

Backing D70314889 as it was breaking some internal tests.

I verified that before the backout the tests were failing and after the backout they were not.

## Changelog:
[iOS][Changed] - Reverted  fix: avoid race condition crash in [RCTDataRequestHandler invalidate].

Reviewed By: Abbondanzo

Differential Revision: D70511155

fbshipit-source-id: 276f6947aa6bb648c9c9eeb5c342f336acc8a26f
2025-03-03 15:25:46 -08:00
Samuel SuslaandFacebook GitHub Bot 5e39bd6131 move initialisation of UIKit proxies to RCTHost initialisation (#49790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49790

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D70399708

fbshipit-source-id: f9883616377343f6c29eaa0ccee8681967fa570c
2025-03-03 10:24:28 -08:00
Jorge Cabiedes AcostaandFacebook GitHub Bot df282a0538 Add prerelease staging API for iOS (#49650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49650

- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages iOS
- Overload initWithDelegate to add optional releaseLevel parameter
- Add Obj-C enum for Release Level
- Use static variables to keep the context on whether a ReactNative Factory has been created and with which flags it has been created.
- Crash in case we try to create multiple factories with different feature flags.
- Creating multiple factories with the same feature flags is allowed

Changelog: [iOS] [Added] - On `RCTReactNativeFactory` add `initWithDelegate` overload with argument to specify release level for an application

Reviewed By: cipolleschi

Differential Revision: D70106210

fbshipit-source-id: 14fe4c8571621a75a7064f1ffd02a07270cea43a
2025-03-03 09:52:26 -08:00
Nicola CortiandFacebook GitHub Bot 5f0c857c0e Move react-native-flags.cmake to ReactCommon (#49745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49745

It turns out we want those flags to be available also inside ReactCommon so I'm moving it there.
This will allow us to reference them also inside ReactCommon and will make sure Common does not depend on Android

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386742

fbshipit-source-id: 3675c01f5e3f6515af6423d75e3fe145ba3d8936
2025-03-03 09:41:24 -08:00
Nicola CortiandFacebook GitHub Bot d8b714488b Use target_compile_reactnative_options for the remaining third-party libs (#49743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49743

Those 3rd party CMake libraries were not using our compiler flags correctly.
This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386743

fbshipit-source-id: e35688f7eb3fa9bcdda1180023006d267782ceaf
2025-03-03 09:41:24 -08:00
Nicola CortiandFacebook GitHub Bot 87466a2025 Use target_compile_reactnative_options on all the remaining ReactAndroid targets (#49744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49744

Those targets inside ReactAndroid were not setting the compiler flags correctly for React Native.
This change fixes them.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386747

fbshipit-source-id: 424e93c444347db88c941d442e0eaeedf2b1bee1
2025-03-03 09:41:24 -08:00
Nicola CortiandFacebook GitHub Bot fb55ab9c84 Introduce the target_compile_reactnative_options function (#49747)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49747

I'm adding the `target_compile_reactnative_options` to centralize the management
of compilation flags for React Native CMake build.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D70386746

fbshipit-source-id: aefbd5a073d9fab48d09ebbba6507377ef626d73
2025-03-03 09:41:24 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 42052940ea Fix caches for RNTester (#49791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49791

The cache for RNTester is broken because the matrix parameters used to test RNTester are not part of the job_id that is used to create the cache keys to restore the Podfile.lock.

This means that we have a race condition on which job of the matrix manages to save the cache. However, those caches are not always valid for the other jobs that presents different matrix parameters.

This change should fix the issue.

## Changelog:
[Internal] - Fix test-rn-tester cache Cache

Reviewed By: cortinico

Differential Revision: D70493507

fbshipit-source-id: 1db6e00507b3e9abe4400831ee1b048c620b9102
2025-03-03 09:05:28 -08:00
Pieter De BaetsandFacebook GitHub Bot d3b203f2cb Cleanup enableAnimatedClearImmediateFix (#49787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49787

We're not experimenting with this, so cleanup the code.

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D70488980

fbshipit-source-id: 12e93b7f8fb89e3bb1f06c8f734b782286f3fad3
2025-03-03 08:04:27 -08:00
Rob HoganandFacebook GitHub Bot 035142e62d metro-config: Don't always assert import/require with unstable_enablePackageExports (#49780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49780

Now that we're using a minimum Metro version of 0.81.3, Metro will dynamically assert `import` or `require` based on the style of the import at source.

Asserting both is likely to cause issues with `babel/runtime` and potentially other packages - see https://github.com/facebook/metro/pull/1447.

Changelog:
[Internal] metro-config: Assert import/require dynamically when using `unstable_enablePackageExports` with Metro.

Reviewed By: hoxyq

Differential Revision: D70473577

fbshipit-source-id: b3e6fbd78e2b6fc0f9a16ec3db2c19698848e6d1
2025-03-03 07:58:20 -08:00
Rob HoganandFacebook GitHub Bot 6606a1da84 Update Metro ^0.81.0 -> ^0.81.3 || ^0.82.0 (#49779)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49779

Changelog:
[General][Changed] Bump minimum Metro from 0.81.0 to ^0.81.3 || ^0.82.0

Reviewed By: hoxyq

Differential Revision: D70473389

fbshipit-source-id: aee3cb073fef420fd7bc1efedb0b48411b038c44
2025-03-03 07:58:20 -08:00
Riccardo CipolleschiandFacebook GitHub Bot b8a0499ce4 Publish dSYMs for RN Dependencies (#49782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49782

This commit adds the configuration to upload the ReactNativeDependencies.dSYM files to maven

## Changelog:
[Internal] - Add code to upload dSYMs to Maven

Reviewed By: cortinico

Differential Revision: D70485966

fbshipit-source-id: 129dea1c75181f22e9bf304e39ac91835bb87b39
2025-03-03 07:26:36 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 70c3b2dcff Fix release scripts to check npm packages (#49788)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49788

Release of 0.78 was successful but it failed to verify the package of NPM because of some error in the JS files.

Preparing for 0.79, I discovered some other issues in the NPM checking scripts.

This change should fix them.

## Changelog:
[Internal] - Fix publishing scripts

Reviewed By: fabriziocucci

Differential Revision: D70489717

fbshipit-source-id: 02a37d9a86fe108c7f7d2d634b8c0727dabb153d
2025-03-03 06:54:54 -08:00
Nicola CortiandFacebook GitHub Bot cee63397bf Remove unnecessary -Wno-error=cpp (#49746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49746

This flag is no longer necessary since RN 0.73 so I'm cleaning it up.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest

Differential Revision: D70386741

fbshipit-source-id: c2c8f998fa7b97985396b26345cfcf3474effc7b
2025-03-03 06:52:22 -08:00
4239 changed files with 208085 additions and 103495 deletions
-1
View File
@@ -13,7 +13,6 @@ packages/*/dist
packages/*/types_generated
packages/debugger-frontend/dist/**/*
packages/react-native-codegen/lib
tools/eslint/rules/sort-imports.js
**/Pods/*
**/*.macos.js
**/*.windows.js
+42 -22
View File
@@ -4,21 +4,18 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @format
*/
'use strict';
const path = require('node:path');
require('eslint-plugin-lint').load(path.join(__dirname, 'tools/eslint/rules'));
module.exports = {
root: true,
extends: ['@react-native'],
plugins: ['@react-native/eslint-plugin-specs', 'lint'],
plugins: ['@react-native/monorepo', '@react-native/specs'],
overrides: [
// overriding the JS config from @react-native/eslint-config to ensure
@@ -27,22 +24,34 @@ module.exports = {
files: ['*.js', '*.js.flow', '*.jsx'],
parser: 'hermes-eslint',
rules: {
'@react-native/monorepo/sort-imports': 'warn',
'eslint-comments/no-unlimited-disable': 'off',
'ft-flow/require-valid-file-annotation': ['error', 'always'],
'no-extra-boolean-cast': 'off',
'no-void': 'off',
// These rules are not required with hermes-eslint
'ft-flow/define-flow-type': 0,
'ft-flow/use-flow-type': 0,
'lint/sort-imports': 1,
// flow handles this check for us, so it's not required
'no-undef': 0,
'ft-flow/define-flow-type': 'off',
'ft-flow/use-flow-type': 'off',
// Flow handles these checks for us, so they aren't required
'no-undef': 'off',
'no-unreachable': 'off',
},
},
{
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
'@react-native/no-deep-imports': 'off',
},
},
{
files: [
'./packages/react-native/**/*.{js,flow}',
'./packages/react-native/Libraries/**/*.{js,flow}',
'./packages/react-native/src/**/*.{js,flow}',
'./packages/assets/registry.js',
],
parser: 'hermes-eslint',
rules: {
'lint/no-commonjs-exports': 1,
'@react-native/monorepo/no-commonjs-exports': 'warn',
},
},
{
@@ -52,15 +61,17 @@ module.exports = {
{
files: ['package.json'],
rules: {
'lint/react-native-manifest': 2,
'@react-native/monorepo/react-native-manifest': 'error',
},
},
{
files: ['flow-typed/**/*.js'],
files: ['flow-typed/**/*.js', 'packages/react-native/flow/**/*'],
rules: {
'lint/valid-flow-typed-signature': 2,
'no-unused-vars': 0,
quotes: 0,
'@react-native/monorepo/valid-flow-typed-signature': 'error',
'ft-flow/require-valid-file-annotation': 'off',
'no-shadow': 'off',
'no-unused-vars': 'off',
quotes: 'off',
},
},
{
@@ -69,11 +80,14 @@ module.exports = {
'packages/react-native/src/**/*.js',
],
rules: {
'@react-native/platform-colors': 2,
'@react-native/specs/react-native-modules': 2,
'lint/no-haste-imports': 2,
'lint/no-react-native-imports': 2,
'lint/require-extends-error': 2,
'@react-native/monorepo/no-haste-imports': 'error',
'@react-native/monorepo/no-react-default-imports': 'error',
'@react-native/monorepo/no-react-named-type-imports': 'error',
'@react-native/monorepo/no-react-native-imports': 'error',
'@react-native/monorepo/no-react-node-imports': 'error',
'@react-native/monorepo/require-extends-error': 'error',
'@react-native/platform-colors': 'error',
'@react-native/specs/react-native-modules': 'error',
},
},
{
@@ -124,5 +138,11 @@ module.exports = {
],
},
},
{
files: ['**/__tests__/**'],
rules: {
'@react-native/monorepo/no-react-native-imports': 'off',
},
},
],
};
+11 -4
View File
@@ -2,11 +2,14 @@
; Ignore build cache folder
<PROJECT_ROOT>/packages/react-native/sdks/.*
; Ignore fb_internal modules
<PROJECT_ROOT>/packages/react-native/src/fb_internal/.*
; Ignore the codegen e2e tests
<PROJECT_ROOT>/packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js
; Ignore the Dangerfile
<PROJECT_ROOT>/packages/react-native-bots/dangerfile.js
<PROJECT_ROOT>/private/react-native-bots/dangerfile.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
@@ -24,7 +27,7 @@
<PROJECT_ROOT>/packages/.*/dist
; helloworld
<PROJECT_ROOT>/packages/helloworld/ios/Pods/
<PROJECT_ROOT>/private/helloworld/ios/Pods/
; Ignore rn-tester Pods
<PROJECT_ROOT>/packages/rn-tester/Pods/
@@ -41,11 +44,11 @@
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
packages/react-native/src/types/
[options]
enums=true
casting_syntax=both
component_syntax=true
emoji=true
@@ -67,6 +70,10 @@ module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-nat
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
module.system.haste.module_ref_prefix=m#
react.runtime=automatic
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
@@ -96,4 +103,4 @@ untyped-import
untyped-type-import
[version]
^0.262.0
^0.273.1
+1
View File
@@ -0,0 +1 @@
*.js.flow linguist-language=JavaScript
+5 -5
View File
@@ -19,10 +19,10 @@ body:
* Please [search for similar issues](https://github.com/facebook/react-native/issues) in our issue tracker.
Make sure that your issue:
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
- type: textarea
id: description
attributes:
@@ -83,7 +83,7 @@ body:
path: /bin/zsh
Binaries:
Node: ...
version: 18.14.0
version: 22.14.0
...
render: text
validations:
@@ -109,8 +109,8 @@ body:
- type: input
id: reproducer
attributes:
label: Reproducer
description: A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
label: MANDATORY Reproducer
description: A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
placeholder: "https://github.com/<myuser>/<myreproducer>"
validations:
required: true
@@ -62,7 +62,7 @@ body:
path: /bin/zsh
Binaries:
Node: ...
version: 18.14.0
version: 22.14.0
...
render: text
validations:
@@ -16,10 +16,10 @@ body:
Do not attempt to open a bug in this category if you're not using the New Architecture as your bug will be closed.
Make sure that your issue:
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
- type: textarea
id: description
attributes:
@@ -95,7 +95,7 @@ body:
path: /bin/zsh
Binaries:
Node: ...
version: 18.14.0
version: 22.14.0
...
render: text
validations:
@@ -121,8 +121,8 @@ body:
- type: input
id: reproducer
attributes:
label: Reproducer
description: A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
label: MANDATORY Reproducer
description: A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
placeholder: "https://github.com/<myuser>/<myreproducer>"
validations:
required: true
+4 -18
View File
@@ -86,27 +86,13 @@ runs:
if: ${{ always() }}
uses: actions/upload-artifact@v4.3.4
with:
name: rntester-hermes-debug
path: packages/rn-tester/android/app/build/outputs/apk/hermes/debug/
name: rntester-debug
path: packages/rn-tester/android/app/build/outputs/apk/debug/
compression-level: 0
- name: Upload RNTester APK - hermes-release
if: ${{ always() }}
uses: actions/upload-artifact@v4.3.4
with:
name: rntester-hermes-release
path: packages/rn-tester/android/app/build/outputs/apk/hermes/release/
compression-level: 0
- name: Upload RNTester APK - jsc-debug
if: ${{ always() }}
uses: actions/upload-artifact@v4.3.4
with:
name: rntester-jsc-debug
path: packages/rn-tester/android/app/build/outputs/apk/jsc/debug/
compression-level: 0
- name: Upload RNTester APK - jsc-release
if: ${{ always() }}
uses: actions/upload-artifact@v4.3.4
with:
name: rntester-jsc-release
path: packages/rn-tester/android/app/build/outputs/apk/jsc/release/
name: rntester-release
path: packages/rn-tester/android/app/build/outputs/apk/release/
compression-level: 0
@@ -10,6 +10,8 @@ inputs:
runs:
using: composite
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
@@ -14,8 +14,12 @@ runs:
shell: bash
run: |
sudo apt update
sudo apt install -y git openssh-client cmake build-essential \
sudo apt install -y git openssh-client build-essential \
libreadline-dev libicu-dev jq zip python3
# Install cmake 3.28.3-1build7
sudo apt-get install cmake=3.28.3-1build7
sudo ln -sf /usr/bin/cmake /usr/local/bin/cmake
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Linux cache
@@ -25,7 +25,7 @@ runs:
- name: Windows cache
uses: actions/cache@v4
with:
key: v2-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
key: v3-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
path: |
D:\tmp\hermes\win64-bin\
D:\tmp\hermes\hermes\icu\
@@ -39,6 +39,9 @@ runs:
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
- name: Downgrade CMake
shell: powershell
run: choco install cmake --version 3.31.6 --force
- name: Build HermesC for Windows
shell: powershell
run: |
@@ -60,7 +63,7 @@ runs:
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
cmake -S hermes -B build_release -G 'Visual Studio 17 2022' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
if (-not $?) { throw "Failed to configure Hermes" }
echo "Running windows build..."
cd build_release
@@ -107,6 +107,12 @@ runs:
pattern: ReactNativeDependencies*
path: ./packages/react-native/ReactAndroid/external-artifacts/artifacts
merge-multiple: true
- name: Download ReactCore artifacts
uses: actions/download-artifact@v4
with:
pattern: ReactCore*
path: ./packages/react-native/ReactAndroid/external-artifacts/artifacts
merge-multiple: true
- name: Print Artifacts Directory
shell: bash
run: ls -lR ./packages/react-native/ReactAndroid/external-artifacts/artifacts/
@@ -121,6 +127,9 @@ runs:
- name: Build packages
shell: bash
run: yarn build
- name: Build types
shell: bash
run: yarn build-types
# Continue with publish steps
- name: Set npm credentials
if: ${{ inputs.release-type == 'release' ||
+13 -4
View File
@@ -4,7 +4,7 @@ inputs:
node-version:
description: "The node.js version to use"
required: false
default: "20"
default: "22"
github-token:
description: "The GitHub token used by pull-bot"
required: true
@@ -26,12 +26,12 @@ runs:
- name: Lint code
shell: bash
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
- name: Lint java
- name: Lint file structure
shell: bash
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint-java --check
run: ./.github/workflow-scripts/lint_files.sh
- name: Verify not committing repo after running build
shell: bash
run: yarn run build --check
run: yarn run build --validate
- name: Run flowcheck
shell: bash
run: yarn flow-check
@@ -44,3 +44,12 @@ runs:
- name: Check formatting
shell: bash
run: yarn run format-check
- name: Lint markdown
shell: bash
run: yarn run lint-markdown
- name: Build types
shell: bash
run: yarn build-types
- name: Run typescript check of generated types
shell: bash
run: yarn test-generated-typescript
+4 -11
View File
@@ -1,5 +1,5 @@
name: Maestro E2E Android
description: Runs E2E Tests on iOS using Maestro
description: Runs E2E Tests on Android using Maestro
inputs:
app-path:
required: true
@@ -7,9 +7,6 @@ inputs:
app-id:
required: true
description: The id of the app to test
jsengine:
required: true
description: The js engine we are using
maestro-flow:
required: true
description: the folder that contains the maestro tests
@@ -25,17 +22,13 @@ inputs:
required: false
default: "."
description: The directory from which metro should be started
architecture:
required: false
default: "NewArch"
description: The react native architecture to test
runs:
using: composite
steps:
- name: Installing Maestro
shell: bash
run: export MAESTRO_VERSION=1.39.7; curl -Ls "https://get.maestro.mobile.dev" | bash
run: export MAESTRO_VERSION=1.40.0; curl -Ls "https://get.maestro.mobile.dev" | bash
- name: Set up JDK 17
if: ${{ inputs.install-java == 'true' }}
uses: actions/setup-java@v4
@@ -79,7 +72,7 @@ runs:
uses: actions/upload-artifact@v4.3.4
if: always()
with:
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.flavor }}_NewArch
path: |
report.xml
screen.mp4
@@ -87,5 +80,5 @@ runs:
if: steps.run-tests.outcome == 'failure'
uses: actions/upload-artifact@v4.3.4
with:
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.flavor }}-NewArch
path: /tmp/MaestroLogs
+9 -16
View File
@@ -7,9 +7,6 @@ inputs:
app-id:
required: true
description: The id of the app to test
jsengine:
required: true
description: The js engine we are using
maestro-flow:
required: true
description: the folder that contains the maestro tests
@@ -21,17 +18,13 @@ inputs:
required: false
default: "."
description: The directory from which metro should be started
architecture:
required: false
default: "NewArch"
description: The react native architecture to test
runs:
using: composite
steps:
- name: Installing Maestro
shell: bash
run: export MAESTRO_VERSION=1.39.7; curl -Ls "https://get.maestro.mobile.dev" | bash
run: export MAESTRO_VERSION=1.40.0; curl -Ls "https://get.maestro.mobile.dev" | bash
- name: Installing Maestro dependencies
shell: bash
run: |
@@ -66,24 +59,24 @@ runs:
"${{ inputs.app-path }}" \
"${{ inputs.app-id }}" \
"${{ inputs.maestro-flow }}" \
"${{ inputs.jsengine }}" \
"Hermes" \
"${{ inputs.flavor }}" \
"${{ inputs.working-directory }}"
- name: Store video record
if: always()
uses: actions/upload-artifact@v4.3.4
with:
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.flavor }}_NewArch
path: |
video_record_${{ inputs.jsengine }}_1.mov
video_record_${{ inputs.jsengine }}_2.mov
video_record_${{ inputs.jsengine }}_3.mov
video_record_${{ inputs.jsengine }}_4.mov
video_record_${{ inputs.jsengine }}_5.mov
video_record_1.mov
video_record_2.mov
video_record_3.mov
video_record_4.mov
video_record_5.mov
report.xml
- name: Store Logs
if: failure() && steps.run-tests.outcome == 'failure'
uses: actions/upload-artifact@v4.3.4
with:
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.flavor }}-NewArch
path: /tmp/MaestroLogs
+1 -1
View File
@@ -4,7 +4,7 @@ inputs:
node-version:
description: 'The node.js version to use'
required: false
default: '20'
default: '22'
runs:
using: "composite"
steps:
@@ -4,25 +4,29 @@ 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: Prepare Xcodebuild cache
shell: bash
run: |
WEEK=$(date +"%U")
YEAR=$(date +"%Y")
echo "$WEEK-$YEAR" > /tmp/week_year
- name: Cache podfile lock
uses: actions/cache@v4
with:
path: packages/rn-tester/Podfile.lock
key: v11-podfilelock-${{ github.job }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ hashfiles('/tmp/week_year') }}-${{ inputs.hermes-version }}
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: v13-cocoapods-${{ github.job }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}
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}}
+1 -1
View File
@@ -4,7 +4,7 @@ inputs:
xcode-version:
description: 'The xcode version to use'
required: false
default: '15.2'
default: '16.2.0'
runs:
using: "composite"
steps:
+35 -33
View File
@@ -1,15 +1,9 @@
name: test-ios-helloworld
description: Test iOS Hello World
inputs:
jsengine:
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
default: Hermes
use-frameworks:
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
default: StaticLibraries
architecture:
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup. Must be one of "OldArch" or "NewArch"
default: OldArch
ruby-version:
description: The version of ruby that must be used
default: 2.6.10
@@ -43,47 +37,55 @@ runs:
- name: Run yarn
uses: ./.github/actions/yarn-install
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/third-party
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }};
shell: bash
run: |
cd packages/helloworld
cd private/helloworld
args=()
if [[ ${{ inputs.architecture }} == "OldArch" ]]; then
args+=(--arch old)
fi
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
args+=(--frameworks dynamic)
fi
if [[ ${{ inputs.jsengine }} == "JSC" ]]; then
args+=(--jsvm jsc)
yarn bootstrap ios "${args[@]}" | cat
else
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
# Let's ensure that the tarballs have the right names
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
# Let's ensure that the tarballs have the right names
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
fi
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
fi
BUILD_TYPE="${{ inputs.flavor }}"
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
HERMES_ENGINE_TARBALL_PATH="$HERMES_PATH" yarn bootstrap ios "${args[@]}" | cat
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
fi
- name: Build HelloWorld project
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
fi
BUILD_TYPE="${{ inputs.flavor }}"
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"
yarn bootstrap ios "${args[@]}" | cat
- name: Run Helloworld tests
shell: bash
run: |
cd packages/helloworld
cd private/helloworld
yarn test
- name: Build HelloWorld project
shell: bash
run: |
cd private/helloworld
args=()
if [[ ${{ inputs.flavor }} == "Release" ]]; then
+15 -17
View File
@@ -1,15 +1,9 @@
name: test-ios-rntester
description: Test iOS RNTester
inputs:
jsengine:
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
default: Hermes
use-frameworks:
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
default: StaticLibraries
architecture:
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup
default: NewArch
ruby-version:
description: The version of ruby that must be used
default: 2.6.10
@@ -48,7 +42,7 @@ runs:
name: hermes-darwin-bin-${{ inputs.flavor }}
path: ${{ inputs.hermes-tarball-artifacts-dir }}
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- name: Prepare IOS Tests
@@ -92,27 +86,31 @@ runs:
else
echo 'No Hermes tarball found.'
fi
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/third-party/
- 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
with:
hermes-version: ${{ inputs.hermes-version }}
use-frameworks: ${{ inputs.use-frameworks }}
flavor: ${{ inputs.flavor }}
ruby-version: ${{ inputs.ruby-version }}
- name: Install CocoaPods dependencies
shell: bash
run: |
if [[ ${{ inputs.jsengine }} == "JSC" ]]; then
export USE_HERMES=0
else
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
fi
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
export USE_FRAMEWORKS=dynamic
fi
if [[ ${{ inputs.architecture }} == "OldArch" ]]; then
export RCT_NEW_ARCH_ENABLED=0
fi
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
cd packages/rn-tester
bundle install
@@ -156,7 +154,7 @@ runs:
if: ${{ inputs.use-frameworks == 'StaticLibraries' && inputs.ruby-version == '2.6.10' }} # This is needed to avoid conflicts with the artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: RNTesterApp-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
name: RNTesterApp-NewArch-${{ inputs.flavor }}
path: ${{ env.app-path }}
- name: Store test results
if: ${{ inputs.run-unit-tests == 'true' }}
+1 -1
View File
@@ -4,7 +4,7 @@ inputs:
node-version:
description: "The node.js version to use"
required: false
default: "20"
default: "22"
runs:
using: composite
steps:
@@ -21,6 +21,10 @@ runs:
cd /tmp/RNApp
yarn add ${{ inputs.library-npm-package }}
# iOS
- name: Setup xcode
if: ${{ inputs.platform == 'ios' }}
uses: ./.github/actions/setup-xcode
- name: Build iOS
shell: bash
if: ${{ inputs.platform == 'ios' }}
@@ -32,6 +36,8 @@ runs:
-workspace RNApp.xcworkspace \
-scheme RNApp \
-sdk iphonesimulator
# Android
- name: Setup Java for Android
if: ${{ inputs.platform == 'android' }}
uses: actions/setup-java@v2
@@ -0,0 +1,305 @@
/**
* 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
*/
const {
_verifyTagExists,
_extractChangelog,
_computeBody,
_createDraftReleaseOnGitHub,
} = require('../createDraftRelease');
const fs = require('fs');
const silence = () => {};
const mockFetch = jest.fn();
jest.mock('../utils.js', () => ({
log: silence,
}));
global.fetch = mockFetch;
describe('Create Draft Release', () => {
beforeEach(jest.clearAllMocks);
describe('#_verifyTagExists', () => {
it('throws if the tag does not exists', async () => {
const token = 'token';
mockFetch.mockReturnValueOnce(Promise.resolve({status: 404}));
await expect(_verifyTagExists('0.77.1')).rejects.toThrowError(
`Tag v0.77.1 does not exist`,
);
expect(mockFetch).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
);
});
});
describe('#_extractChangelog', () => {
it(`extracts changelog from CHANGELOG.md`, async () => {
const mockedReturnValue = `# Changelog
## v0.77.2
- [PR #1234](https://github.com/facebook/react-native/pull/1234) - Some change
- [PR #5678](https://github.com/facebook/react-native/pull/5678) - Some other change
## v0.77.1
### Breaking Changes
- [PR #9012](https://github.com/facebook/react-native/pull/9012) - Some other change
#### Android
- [PR #3456](https://github.com/facebook/react-native/pull/3456) - Some other change
- [PR #3457](https://github.com/facebook/react-native/pull/3457) - Some other change
#### iOS
- [PR #3436](https://github.com/facebook/react-native/pull/3436) - Some other change
- [PR #3437](https://github.com/facebook/react-native/pull/3437) - Some other change
### Fixed
- [PR #9012](https://github.com/facebook/react-native/pull/9012) - Some other change
#### Android
- [PR #3456](https://github.com/facebook/react-native/pull/3456) - Some other change
#### iOS
- [PR #3437](https://github.com/facebook/react-native/pull/3437) - Some other change
## v0.77.0
- [PR #3456](https://github.com/facebook/react-native/pull/3456) - Some other change
## v0.76.0
- [PR #7890](https://github.com/facebook/react-native/pull/7890) - Some other change`;
jest.spyOn(fs, 'readFileSync').mockImplementationOnce(func => {
return mockedReturnValue;
});
const changelog = _extractChangelog('0.77.1');
expect(changelog).toEqual(`## v0.77.1
### Breaking Changes
- [PR #9012](https://github.com/facebook/react-native/pull/9012) - Some other change
#### Android
- [PR #3456](https://github.com/facebook/react-native/pull/3456) - Some other change
- [PR #3457](https://github.com/facebook/react-native/pull/3457) - Some other change
#### iOS
- [PR #3436](https://github.com/facebook/react-native/pull/3436) - Some other change
- [PR #3437](https://github.com/facebook/react-native/pull/3437) - Some other change
### Fixed
- [PR #9012](https://github.com/facebook/react-native/pull/9012) - Some other change
#### Android
- [PR #3456](https://github.com/facebook/react-native/pull/3456) - Some other change
#### iOS
- [PR #3437](https://github.com/facebook/react-native/pull/3437) - Some other change`);
});
it('does not extract changelog for rc.0', async () => {
const changelog = _extractChangelog('0.77.0-rc.0');
expect(changelog).toEqual('');
});
it('does not extract changelog for 0.X.0', async () => {
const changelog = _extractChangelog('0.77.0');
expect(changelog).toEqual('');
});
});
describe('#_computeBody', () => {
it('computes body for release', async () => {
const version = '0.77.1';
const changelog = `## v${version}
### Breaking Changes
- [PR #9012](https://github.com/facebook/react-native/pull/9012) - Some other change
#### Android
- [PR #3456](https://github.com/facebook/react-native/pull/3456) - Some other change
- [PR #3457](https://github.com/facebook/react-native/pull/3457) - Some other change
#### iOS
- [PR #3436](https://github.com/facebook/react-native/pull/3436) - Some other change
- [PR #3437](https://github.com/facebook/react-native/pull/3437) - Some other change`;
const body = _computeBody(version, changelog);
expect(body).toEqual(`${changelog}
---
Hermes dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-release.tar.gz)
ReactNativeDependencies dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-release.tar.gz)
---
You can file issues or pick requests against this release [here](https://github.com/reactwg/react-native-releases/issues/new/choose).
---
To help you upgrade to this version, you can use the [Upgrade Helper](https://react-native-community.github.io/upgrade-helper/) ⚛️.
---
View the whole changelog in the [CHANGELOG.md file](https://github.com/facebook/react-native/blob/main/CHANGELOG.md).`);
});
});
describe('#_createDraftReleaseOnGitHub', () => {
it('creates a draft release on GitHub', async () => {
const version = '0.77.1';
const url = 'https://api.github.com/repos/facebook/react-native/releases';
const token = 'token';
const headers = {
Accept: 'Accept: application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${token}`,
};
const body = `Draft release body`;
const latest = true;
const fetchBody = JSON.stringify({
tag_name: `v${version}`,
name: `${version}`,
body: body,
draft: true,
prerelease: false,
make_latest: `${latest}`,
});
mockFetch.mockReturnValueOnce(
Promise.resolve({
status: 201,
json: () =>
Promise.resolve({
html_url:
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
}),
}),
);
const response = await _createDraftReleaseOnGitHub(
version,
body,
latest,
token,
);
expect(mockFetch).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
`https://api.github.com/repos/facebook/react-native/releases`,
{
method: 'POST',
headers: headers,
body: fetchBody,
},
);
expect(response).toEqual(
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
);
});
it('creates a draft release for prerelease on GitHub', async () => {
const version = '0.77.0-rc.2';
const url = 'https://api.github.com/repos/facebook/react-native/releases';
const token = 'token';
const headers = {
Accept: 'Accept: application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${token}`,
};
const body = `Draft release body`;
const latest = true;
const fetchBody = JSON.stringify({
tag_name: `v${version}`,
name: `${version}`,
body: body,
draft: true,
prerelease: true,
make_latest: `${latest}`,
});
mockFetch.mockReturnValueOnce(
Promise.resolve({
status: 201,
json: () =>
Promise.resolve({
html_url:
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
}),
}),
);
const response = await _createDraftReleaseOnGitHub(
version,
body,
latest,
token,
);
expect(mockFetch).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
`https://api.github.com/repos/facebook/react-native/releases`,
{
method: 'POST',
headers: headers,
body: fetchBody,
},
);
expect(response).toEqual(
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
);
});
it('throws if the post failes', async () => {
const version = '0.77.0-rc.2';
const url = 'https://api.github.com/repos/facebook/react-native/releases';
const token = 'token';
const headers = {
Accept: 'Accept: application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${token}`,
};
const body = `Draft release body`;
const latest = true;
const fetchBody = JSON.stringify({
tag_name: `v${version}`,
name: `${version}`,
body: body,
draft: true,
prerelease: true,
make_latest: `${latest}`,
});
mockFetch.mockReturnValueOnce(
Promise.resolve({
status: 401,
}),
);
await expect(
_createDraftReleaseOnGitHub(version, body, latest, token),
).rejects.toThrowError();
expect(mockFetch).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
`https://api.github.com/repos/facebook/react-native/releases`,
{
method: 'POST',
headers: headers,
body: fetchBody,
},
);
});
});
});
@@ -0,0 +1,83 @@
/**
* 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
*/
const {extractIssueOncalls} = require('../extractIssueOncalls');
const userMap = {
'@g': '1785',
'@c': '1781',
'@s': '1272',
'@d': '1332',
'@m': '9555',
'@p': '6097',
'@f': '7565',
};
const schedule = {
'2025-04-01': ['@m', '@f'],
'2025-04-08': ['@g', '@d'],
};
describe('extractIssueOncalls', () => {
beforeEach(() => {
jest.clearAllMocks();
jest.useFakeTimers('modern');
});
afterEach(() => {
jest.useRealTimers();
});
it('extracts m and f on 6 of April', () => {
jest.setSystemTime(new Date(2025, 3, 6));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@m'], userMap['@f']]);
});
it('extracts m and f on 7 of April', () => {
jest.setSystemTime(new Date(2025, 3, 7));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@m'], userMap['@f']]);
});
it('extracts g and d on 8 of April', () => {
jest.setSystemTime(new Date(2025, 3, 8));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@g'], userMap['@d']]);
});
it('extracts g and d on 9 of April', () => {
jest.setSystemTime(new Date(2025, 3, 9));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@g'], userMap['@d']]);
});
it('extracts g and d on 10 of April', () => {
jest.setSystemTime(new Date(2025, 3, 10));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@g'], userMap['@d']]);
});
it('extracts g and d on 11 of April', () => {
jest.setSystemTime(new Date(2025, 3, 11));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@g'], userMap['@d']]);
});
it('extracts g and d on 12 of April', () => {
jest.setSystemTime(new Date(2025, 3, 12));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@g'], userMap['@d']]);
});
it('extracts g and d on 13 of April', () => {
jest.setSystemTime(new Date(2025, 3, 13));
const oncalls = extractIssueOncalls(schedule, userMap);
expect(oncalls).toEqual([userMap['@g'], userMap['@d']]);
});
});
@@ -0,0 +1,251 @@
/**
* 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
*/
const {
generateChangelog,
_computePreviousVersionFrom,
_generateChangelog,
_pushCommit,
_createPR,
} = require('../generateChangelog');
const silence = () => {};
const mockGetNpmPackageInfo = jest.fn();
const mockExecSync = jest.fn();
const mockRun = jest.fn();
const mockFetch = jest.fn();
const mockExit = jest.fn();
jest.mock('../utils.js', () => ({
log: silence,
run: mockRun,
getNpmPackageInfo: mockGetNpmPackageInfo,
}));
process.exit = mockExit;
global.fetch = mockFetch;
describe('Generate Changelog', () => {
beforeEach(jest.clearAllMocks);
describe('_computePreviousVersionFrom', () => {
it('returns rc.0 when rc is 1', async () => {
const currentVersion = '0.78.0-rc.1';
const expectedVersion = '0.78.0-rc.0';
const receivedVersion = await _computePreviousVersionFrom(currentVersion);
expect(receivedVersion).toEqual(expectedVersion);
});
it('returns previous rc version when rc is > 1', async () => {
const currentVersion = '0.78.0-rc.5';
const expectedVersion = '0.78.0-rc.4';
const receivedVersion = await _computePreviousVersionFrom(currentVersion);
expect(receivedVersion).toEqual(expectedVersion);
});
it('returns previous patch version when rc is 0', async () => {
const currentVersion = '0.78.0-rc.0';
const expectedVersion = '0.77.1';
mockGetNpmPackageInfo.mockReturnValueOnce(
Promise.resolve({version: '0.77.1'}),
);
const receivedVersion = await _computePreviousVersionFrom(currentVersion);
expect(receivedVersion).toEqual(expectedVersion);
});
it('returns patch 0 when patch is 1', async () => {
const currentVersion = '0.78.1';
const expectedVersion = '0.78.0';
const receivedVersion = await _computePreviousVersionFrom(currentVersion);
expect(receivedVersion).toEqual(expectedVersion);
});
it('returns previous patch when patch is > 1', async () => {
const currentVersion = '0.78.5';
const expectedVersion = '0.78.4';
const receivedVersion = await _computePreviousVersionFrom(currentVersion);
expect(receivedVersion).toEqual(expectedVersion);
});
it('returns null when patch is 0', async () => {
const currentVersion = '0.78.0';
const receivedVersion = await _computePreviousVersionFrom(currentVersion);
expect(receivedVersion).toBeNull();
});
it("throws an error when the version can't be parsed", async () => {
const currentVersion = '0.78.0-rc0';
await expect(
_computePreviousVersionFrom(currentVersion),
).rejects.toThrow();
});
});
describe('_generateChangelog', () => {
it('calls git in the right order', async () => {
const currentVersion = '0.79.0-rc5';
const previousVersion = '0.79.0-rc4';
const token = 'token';
expectedCommandArgs = [
'@rnx-kit/rn-changelog-generator',
'--base',
`v${previousVersion}`,
'--compare',
`v${currentVersion}`,
'--repo',
'.',
'--changelog',
'./CHANGELOG.md',
'--token',
`${token}`,
];
_generateChangelog(previousVersion, currentVersion, token);
expect(mockRun).toHaveBeenCalledTimes(4);
expect(mockRun).toHaveBeenNthCalledWith(1, 'git checkout main');
expect(mockRun).toHaveBeenNthCalledWith(2, 'git fetch');
expect(mockRun).toHaveBeenNthCalledWith(3, 'git pull origin main');
expect(mockRun).toHaveBeenNthCalledWith(
4,
`npx ${expectedCommandArgs.join(' ')}`,
);
});
});
describe('_pushCommit', () => {
it('calls git in the right order', async () => {
const currentVersion = '0.79.0-rc5';
_pushCommit(currentVersion);
expect(mockRun).toHaveBeenCalledTimes(4);
expect(mockRun).toHaveBeenNthCalledWith(
1,
`git checkout -b changelog/v${currentVersion}`,
);
expect(mockRun).toHaveBeenNthCalledWith(2, 'git add CHANGELOG.md');
expect(mockRun).toHaveBeenNthCalledWith(
3,
`git commit -m "[RN][Changelog] Add changelog for v${currentVersion}"`,
);
expect(mockRun).toHaveBeenNthCalledWith(
4,
`git push origin changelog/v${currentVersion}`,
);
});
});
describe('_createPR', () => {
it('throws error when status is not 201', async () => {
const currentVersion = '0.79.0-rc5';
const token = 'token';
mockFetch.mockReturnValueOnce(Promise.resolve({status: 401}));
const headers = {
Accept: 'Accept: application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${token}`,
};
const content = `
## Summary
Add Changelog for ${currentVersion}
## Changelog:
[Internal] - Add Changelog for ${currentVersion}
## Test Plan:
N/A`;
const body = {
title: `[RN][Changelog] Add changelog for v${currentVersion}`,
head: `changelog/v${currentVersion}`,
base: 'main',
body: content,
};
await expect(_createPR(currentVersion, token)).rejects.toThrow();
expect(mockFetch).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://api.github.com/repos/facebook/react-native/pulls',
{
method: 'POST',
headers: headers,
body: JSON.stringify(body),
},
);
});
it('Returns the pr url', async () => {
const currentVersion = '0.79.0-rc5';
const token = 'token';
const expectedPrURL =
'https://github.com/facebook/react-native/pulls/1234';
const returnedObject = {
status: 201,
json: () => Promise.resolve({html_url: expectedPrURL}),
};
mockFetch.mockReturnValueOnce(Promise.resolve(returnedObject));
const headers = {
Accept: 'Accept: application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${token}`,
};
const content = `
## Summary
Add Changelog for ${currentVersion}
## Changelog:
[Internal] - Add Changelog for ${currentVersion}
## Test Plan:
N/A`;
const body = {
title: `[RN][Changelog] Add changelog for v${currentVersion}`,
head: `changelog/v${currentVersion}`,
base: 'main',
body: content,
};
const receivedPrURL = await _createPR(currentVersion, token);
expect(mockFetch).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://api.github.com/repos/facebook/react-native/pulls',
{
method: 'POST',
headers: headers,
body: JSON.stringify(body),
},
);
expect(receivedPrURL).toEqual(expectedPrURL);
});
});
});
@@ -0,0 +1,189 @@
/**
* 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 {
prepareFailurePayload,
sendMessageToDiscord,
} = require('../notifyDiscord');
describe('prepareFailurePayload', () => {
it('should handle undefined failures', () => {
const message = prepareFailurePayload(undefined);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should handle empty failures array', () => {
const message = prepareFailurePayload([]);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should format a single failure correctly', () => {
const failures = [
{
library: 'react-native-reanimated',
platform: 'iOS',
},
];
const message = prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] react-native-reanimated',
});
});
it('should sort multiple failures by platform and library name', () => {
const failures = [
{
library: 'react-native-reanimated',
platform: 'iOS',
},
{
library: 'react-native-gesture-handler',
platform: 'Android',
},
{
library: 'react-native-screens',
platform: 'iOS',
},
{
library: 'react-native-svg',
platform: 'Android',
},
];
const message = prepareFailurePayload(failures);
// The failures should be sorted: first Android (alphabetically), then iOS
// Within each platform, libraries should be sorted alphabetically
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [Android] react-native-gesture-handler\n❌ [Android] react-native-svg\n❌ [iOS] react-native-reanimated\n❌ [iOS] react-native-screens',
});
});
it('should handle failures with missing properties', () => {
const failures = [
{
// Missing library
platform: 'iOS',
},
{
library: 'react-native-gesture-handler',
// Missing platform
},
{
// Both missing
},
];
const message = prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] Unknown\n❌ [Unknown] react-native-gesture-handler\n❌ [Unknown] Unknown',
});
});
});
describe('sendMessageToDiscord', () => {
// Store the original fetch function
const originalFetch = global.fetch;
// Setup and teardown for each test
beforeEach(() => {
// Mock the global fetch function
global.fetch = jest.fn();
// Silence console logs during tests
jest.spyOn(console, 'log').mockImplementation(() => {});
jest.spyOn(console, 'error').mockImplementation(() => {});
});
afterEach(() => {
// Restore the original fetch function
global.fetch = originalFetch;
// Restore console functions
jest.restoreAllMocks();
});
it('should throw an error if webhook URL is missing', async () => {
await expect(sendMessageToDiscord(null, {})).rejects.toThrow(
'Discord webhook URL is missing',
);
});
it('should send a message successfully', async () => {
// Mock a successful response
global.fetch.mockResolvedValueOnce({
ok: true,
status: 200,
});
const webhook = 'https://discord.com/api/webhooks/123/abc';
const message = {content: 'Test message'};
await expect(sendMessageToDiscord(webhook, message)).resolves.not.toThrow();
// Verify fetch was called with the right arguments
expect(global.fetch).toHaveBeenCalledWith(webhook, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(message),
});
// Verify console.log was called
expect(console.log).toHaveBeenCalledWith(
'Successfully sent message to Discord',
);
});
it('should throw an error if the response is not ok', async () => {
// Mock a failed response
global.fetch.mockResolvedValueOnce({
ok: false,
status: 400,
text: jest.fn().mockResolvedValueOnce('Bad Request'),
});
const webhook = 'https://discord.com/api/webhooks/123/abc';
const message = {content: 'Test message'};
await expect(sendMessageToDiscord(webhook, message)).rejects.toThrow(
'HTTP status code: 400',
);
// Verify console.error was called
expect(console.error).toHaveBeenCalledWith(
'Failed to send message to Discord: 400 Bad Request',
);
});
it('should throw an error if fetch fails', async () => {
// Mock a network error
const networkError = new Error('Network error');
global.fetch.mockRejectedValueOnce(networkError);
const webhook = 'https://discord.com/api/webhooks/123/abc';
const message = {content: 'Test message'};
await expect(sendMessageToDiscord(webhook, message)).rejects.toThrow(
'Network error',
);
});
});
@@ -22,10 +22,13 @@ jest.mock('../utils.js', () => ({
log: silence,
run: mockRun,
sleep: mockSleep,
verifyPublishedPackage: mockVerifyPublishedPackage,
getNpmPackageInfo: mockGetNpmPackageInfo,
}));
jest.mock('../verifyPublishedPackage.js', () => ({
verifyPublishedPackage: mockVerifyPublishedPackage,
}));
const getMockGithub = () => ({
rest: {
actions: {
@@ -0,0 +1,87 @@
/**
* 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
*/
const {verifyArtifactsAreOnMaven} = require('../verifyArtifactsAreOnMaven');
const mockSleep = jest.fn();
const silence = () => {};
const mockFetch = jest.fn();
const mockExit = jest.fn();
jest.mock('../utils.js', () => ({
log: silence,
sleep: mockSleep,
}));
process.exit = mockExit;
global.fetch = mockFetch;
describe('#verifyArtifactsAreOnMaven', () => {
beforeEach(jest.clearAllMocks);
it('waits for the packages to be published on maven when version has no v', async () => {
mockSleep.mockReturnValueOnce(Promise.resolve()).mockImplementation(() => {
throw new Error('Should not be called again!');
});
mockFetch
.mockReturnValueOnce(Promise.resolve({status: 404}))
.mockReturnValueOnce(Promise.resolve({status: 200}));
const version = '0.78.1';
await verifyArtifactsAreOnMaven(version);
expect(mockSleep).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
);
});
it('waits for the packages to be published on maven, when version starts with v', async () => {
mockSleep.mockReturnValueOnce(Promise.resolve()).mockImplementation(() => {
throw new Error('Should not be called again!');
});
mockFetch
.mockReturnValueOnce(Promise.resolve({status: 404}))
.mockReturnValueOnce(Promise.resolve({status: 200}));
const version = 'v0.78.1';
await verifyArtifactsAreOnMaven(version);
expect(mockSleep).toHaveBeenCalledTimes(1);
expect(mockFetch).toHaveBeenCalledWith(
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
);
});
it('passes immediately if packages are already on Maven', async () => {
mockFetch.mockReturnValueOnce(Promise.resolve({status: 200}));
const version = '0.78.1';
await verifyArtifactsAreOnMaven(version);
expect(mockSleep).toHaveBeenCalledTimes(0);
expect(mockFetch).toHaveBeenCalledWith(
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
);
});
it('tries 90 times and then exits', async () => {
mockSleep.mockReturnValue(Promise.resolve());
mockFetch.mockReturnValue(Promise.resolve({status: 404}));
const version = '0.78.1';
await verifyArtifactsAreOnMaven(version);
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',
);
});
});
@@ -13,6 +13,11 @@ const mockVerifyPublishedPackage = jest.fn();
const silence = () => {};
jest.mock('../utils.js', () => ({
log: silence,
sleep: silence,
}));
jest.mock('../verifyPublishedPackage.js', () => ({
verifyPublishedPackage: mockVerifyPublishedPackage,
}));
+1 -7
View File
@@ -95,12 +95,6 @@ module.exports = async (github, context, labelWithContext) => {
);
await requestAuthorFeedback();
return;
case 'Newer Patch Available':
await addComment(
`> [!TIP]\n` +
`> **Newer version available**: You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.`,
);
return;
case 'Needs: Version Info':
await addComment(
`> [!WARNING]\n` +
@@ -111,7 +105,7 @@ module.exports = async (github, context, labelWithContext) => {
case 'Needs: Repro':
await addComment(
`> [!WARNING]\n` +
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Please provide either: <br/><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li><li>Otherwise send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li></ul>`,
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Reproducers are **mandatory** and we can accept only one of those as a valid reproducer: <br/><ul><li>For majority of bugs: send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li></ul><br/>You can read more about about it on our website: [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug).`,
);
await requestAuthorFeedback();
return;
+10 -5
View File
@@ -4,12 +4,16 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
GITHUB_OWNER=-facebook
GITHUB_REPO=-react-native
export GITHUB_OWNER
export GITHUB_REPO
export GITHUB_OWNER=-facebook
export GITHUB_REPO=-react-native
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow-check --silent --json; echo google-java-format; node scripts/lint-java.js --diff) | node packages/react-native-bots/code-analysis-bot.js
{
echo eslint
npm run lint --silent -- --format=json
echo flow
npm run flow-check --silent --json
} | node private/react-native-bots/code-analysis-bot.js
STATUS=$?
if [ $STATUS == 0 ]; then
@@ -17,3 +21,4 @@ if [ $STATUS == 0 ]; then
else
echo "Code analysis failed, error status $STATUS."
fi
exit $STATUS
@@ -41,6 +41,11 @@ module.exports = async (github, context) => {
// Look for Snack or a GH repo associated with the user that added an issue or comment
const hasValidReproducer = entities.some(entity => {
const hasPullRequestRepoLink = containsPattern(
entity.body,
`https?:\/\/github\.com\/facebook\/react-native\/pull\/\d+\/?`,
);
const hasExpoSnackLink = containsPattern(
entity.body,
`https?:\\/\\/snack\\.expo\\.dev\\/[^\\s)\\]]+`,
@@ -50,7 +55,7 @@ module.exports = async (github, context) => {
entity.body,
`https?:\\/\\/github\\.com\\/(${entity.user.login})\\/[^/]+\\/?\\s?`,
);
return hasExpoSnackLink || hasGithubRepoLink;
return hasPullRequestRepoLink || hasExpoSnackLink || hasGithubRepoLink;
});
if (hasValidReproducer) {
@@ -0,0 +1,121 @@
/**
* 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
*/
const fs = require('fs');
const path = require('path');
const {
prepareFailurePayload,
sendMessageToDiscord,
} = require('./notifyDiscord');
function readOutcomes() {
const baseDir = '/tmp';
let outcomes = [];
fs.readdirSync(baseDir).forEach(file => {
const fullPath = path.join(baseDir, file);
if (fullPath.endsWith('outcome') && fs.statSync(fullPath).isDirectory) {
fs.readdirSync(fullPath).forEach(subFile => {
const subFullPath = path.join(fullPath, subFile);
if (subFullPath.endsWith('outcome')) {
const [library, status] = String(fs.readFileSync(subFullPath, 'utf8'))
.trim()
.split(':');
const platform = subFile.includes('android') ? 'Android' : 'iOS';
console.log(
`[${platform}] ${library} completed with status ${status}`,
);
outcomes.push({
library: library.trim(),
platform,
status: status.trim(),
});
}
});
} else if (fullPath.endsWith('outcome')) {
const [library, status] = String(fs.readFileSync(fullPath, 'utf8'))
.trim()
.split(':');
const platform = file.includes('android') ? 'Android' : 'iOS';
console.log(`[${platform}] ${library} completed with status ${status}`);
outcomes.push({
library: library.trim(),
platform,
status: status.trim(),
});
}
});
return outcomes;
}
function printFailures(outcomes) {
console.log('Printing failures...');
let failedLibraries = [];
outcomes.forEach(entry => {
if (entry.status !== 'success') {
console.log(
`❌ [${entry.platform}] ${entry.library} failed with status ${entry.status}`,
);
failedLibraries.push({
library: entry.library,
platform: entry.platform,
});
}
});
return failedLibraries;
}
/**
* Sends a message to Discord with the list of failures.
* @param {string} webHook - The Discord webhook URL
* @param {Array<Object>} failures - List of failures to report
* @returns {Promise<void>} - A promise that resolves when the message is sent
*/
async function notifyDiscord(webHook, failures) {
if (!webHook) {
console.error('Discord webhook URL is missing');
return;
}
if (!failures || failures.length === 0) {
console.log('No failures to report to Discord');
return;
}
try {
// Use the prepareFailurePayload function to format the message
const message = prepareFailurePayload(failures);
// Use the sendMessageToDiscord function to send the message
await sendMessageToDiscord(webHook, message);
} catch (error) {
console.error('Error in notifyDiscord function:', error);
throw error;
}
}
async function collectResults(discordWebHook) {
const outcomes = readOutcomes();
const failures = printFailures(outcomes);
if (failures.length > 0) {
if (discordWebHook) {
console.log('Sending to discord');
await notifyDiscord(discordWebHook, failures);
} else {
console.log('Web hook not set');
}
process.exit(1);
}
console.log('✅ All tests passed!');
}
module.exports = {
collectResults,
notifyDiscord,
};
@@ -0,0 +1,137 @@
/**
* 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
*/
const {log, run} = require('./utils');
const fs = require('fs');
function _headers(token) {
return {
Accept: 'Accept: application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${token}`,
};
}
function _extractChangelog(version) {
if (version.endsWith('.0')) {
// for RC.0 and for the release of a new stable minor, the changelog is too long
// to be added in a release. The release body is usually something shorter.
// See for example the release for 0.76.0 or 0.77.0:
// 0.76: https://github.com/facebook/react-native/releases/tag/v0.76.0
// 0.77: https://github.com/facebook/react-native/releases/tag/v0.77.0
return '';
}
const changelog = String(fs.readFileSync('CHANGELOG.md', 'utf8')).split('\n');
const changelogStarts = changelog.indexOf(`## v${version}`);
let changelogEnds = changelogStarts;
// Scan the changelog to find the next version
for (var line = changelogStarts + 1; line < changelog.length; line++) {
if (changelog[line].startsWith('## ')) {
changelogEnds = line;
break;
}
}
return changelog.slice(changelogStarts, changelogEnds).join('\n').trim();
}
function _computeBody(version, changelog) {
return `${changelog}
---
Hermes dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-release.tar.gz)
ReactNativeDependencies dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-release.tar.gz)
---
You can file issues or pick requests against this release [here](https://github.com/reactwg/react-native-releases/issues/new/choose).
---
To help you upgrade to this version, you can use the [Upgrade Helper](https://react-native-community.github.io/upgrade-helper/) ⚛️.
---
View the whole changelog in the [CHANGELOG.md file](https://github.com/facebook/react-native/blob/main/CHANGELOG.md).`;
}
async function _verifyTagExists(version) {
const url = `https://github.com/facebook/react-native/releases/tag/v${version}`;
const response = await fetch(url);
if (response.status === 404) {
throw new Error(`Tag v${version} does not exist`);
}
}
async function _createDraftReleaseOnGitHub(version, body, latest, token) {
const url = 'https://api.github.com/repos/facebook/react-native/releases';
const method = 'POST';
const headers = _headers(token);
const fetchBody = JSON.stringify({
tag_name: `v${version}`,
name: `${version}`,
body: body,
draft: true, // NEVER CHANGE this value to false. If false, it will publish the release, and send a GH notification to all the subscribers.
prerelease: version.includes('-rc.') ? true : false,
make_latest: `${latest}`,
});
const response = await fetch(url, {
method,
headers,
body: fetchBody,
});
if (response.status !== 201) {
throw new Error(
`Failed to create the release: ${response.status} ${response.statusText}`,
);
}
const data = await response.json();
return data.html_url;
}
function moveToChangelogBranch(version) {
log(`Moving to changelog branch: changelog/v${version}`);
run(`git checkout -b changelog/v${version}`);
}
async function createDraftRelease(version, latest, token) {
if (version.startsWith('v')) {
version = version.substring(1);
}
_verifyTagExists(version);
moveToChangelogBranch(version);
const changelog = _extractChangelog(version);
const body = _computeBody(version, changelog);
const release = await _createDraftReleaseOnGitHub(
version,
body,
latest,
token,
);
log(`Created draft release: ${release}`);
}
module.exports = {
createDraftRelease,
// Exported for testing purposes
_verifyTagExists,
_extractChangelog,
_computeBody,
_createDraftReleaseOnGitHub,
};
@@ -0,0 +1,61 @@
/**
* 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
*/
const fs = require('fs');
const MSEC_IN_DAY = 1000 * 60 * 60 * 24;
function formatUsers(users) {
console.log(`${users[0]} ${users[1]}`.trim());
}
function extractUsersFromScheduleAndDate(schedule, userMap, date) {
const year = date.getFullYear();
const month = date.getMonth() + 1; // 0 is January, 1 is February
const day = date.getDate();
const dateStr = `${year}-${month < 10 ? `0${month}` : month}-${day < 10 ? `0${day}` : day}`;
const user1 = userMap[schedule[dateStr][0]];
const user2 = userMap[schedule[dateStr][1]];
return [user1, user2];
}
function main() {
const configuration = process.argv[2];
const {userMap, schedule} = JSON.parse(configuration);
extractIssueOncalls(schedule, userMap);
}
function extractIssueOncalls(schedule, userMap) {
const now = new Date();
const dayOfTheWeek = now.getDay(); // 0 is Sunday, 1 is Monday, etc.
let users;
if (dayOfTheWeek === 2) {
// exact match in the schedule
users = extractUsersFromScheduleAndDate(schedule, userMap, now);
} else if (dayOfTheWeek < 2) {
// sunday
// go to the tuesday of the last week
const lastWeekTuesday = new Date(now - (5 + dayOfTheWeek) * MSEC_IN_DAY);
users = extractUsersFromScheduleAndDate(schedule, userMap, lastWeekTuesday);
} else if (dayOfTheWeek > 1) {
// go to the previous tuesday
const thisWeekTuesday = new Date(now - (dayOfTheWeek - 2) * MSEC_IN_DAY);
users = extractUsersFromScheduleAndDate(schedule, userMap, thisWeekTuesday);
}
formatUsers(users);
return users;
}
if (require.main === module) {
void main();
}
module.exports = {
extractIssueOncalls,
};
@@ -0,0 +1,120 @@
/**
* 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
*/
const {log, getNpmPackageInfo, run} = require('./utils');
async function _computePreviousVersionFrom(version) {
log(`Computing previous version from: ${version}`);
const regex = /^0\.(\d+)\.(\d+)(-rc\.(\d+))?$/;
const match = version.match(regex);
if (!match) {
throw new Error(`Invalid version format: ${version}`);
}
const minor = match[1];
const patch = match[2];
const rc = match[4];
if (rc) {
if (Number(rc) > 0) {
return `0.${minor}.${patch}-rc.${Number(rc) - 1}`;
}
//fetch latest version on NPM
const latestPkg = await getNpmPackageInfo('react-native', 'latest');
return latestPkg.version;
} else {
if (Number(patch) === 0) {
// No need to generate the changelog for 0.X.0 as we already generated it from RCs
log(
`Skipping changelog generation for ${version} as we already have it from the RCs`,
);
return null;
}
return `0.${minor}.${Number(patch) - 1}`;
}
}
function _generateChangelog(previousVersion, version, token) {
log(`Generating changelog for ${version} from ${previousVersion}`);
run('git checkout main');
run('git fetch');
run('git pull origin main');
const generateChangelogComand = `npx @rnx-kit/rn-changelog-generator --base v${previousVersion} --compare v${version} --repo . --changelog ./CHANGELOG.md --token ${token}`;
run(generateChangelogComand);
}
function _pushCommit(version) {
log(`Pushing commit to changelog/v${version}`);
run(`git checkout -b changelog/v${version}`);
run('git add CHANGELOG.md');
run(`git commit -m "[RN][Changelog] Add changelog for v${version}"`);
run(`git push origin changelog/v${version}`);
}
async function _createPR(version, token) {
log('Creating changelog pr');
const url = 'https://api.github.com/repos/facebook/react-native/pulls';
const body = `
## Summary
Add Changelog for ${version}
## Changelog:
[Internal] - Add Changelog for ${version}
## Test Plan:
N/A`;
const response = await fetch(url, {
method: 'POST',
headers: {
Accept: 'Accept: application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({
title: `[RN][Changelog] Add changelog for v${version}`,
head: `changelog/v${version}`,
base: 'main',
body: body,
}),
});
if (response.status !== 201) {
throw new Error(
`Failed to create PR: ${response.status} ${response.statusText}`,
);
}
const data = await response.json();
return data.html_url;
}
async function generateChangelog(version, token) {
if (version.startsWith('v')) {
version = version.substring(1);
}
const previousVersion = await _computePreviousVersionFrom(version);
if (previousVersion) {
log(`Previous version is ${previousVersion}`);
_generateChangelog(previousVersion, version, token);
_pushCommit(version);
const prURL = await _createPR(version, token);
log(`Created PR: ${prURL}`);
}
}
module.exports = {
generateChangelog,
// Exported only for testing purposes:
_computePreviousVersionFrom,
_generateChangelog,
_pushCommit,
_createPR,
};
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# 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.
set -e
if git ls-files | grep -E '\.npmignore$'; then
echo "Error: Found unexpected .npmignore file(s). Please use package.json#files instead."
exit 1
fi
+90
View File
@@ -0,0 +1,90 @@
/**
* 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
*/
/**
* Sends a message to Discord using the webhook URL.
* @param {string} webHook - The Discord webhook URL
* @param {Object} message - The message to send
* @returns {Promise<void>} - A promise that resolves when the message is sent
*/
async function sendMessageToDiscord(webHook, message) {
if (!webHook) {
throw new Error('Discord webhook URL is missing');
}
// Send the request using fetch
const response = await fetch(webHook, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(message),
});
// Handle the response
if (response.ok) {
console.log('Successfully sent message to Discord');
return;
} else {
const errorText = await response.text();
console.error(
`Failed to send message to Discord: ${response.status} ${errorText}`,
);
throw new Error(`HTTP status code: ${response.status}`);
}
}
/**
* 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 = [...failures].sort((a, b) => {
// First sort by platform
const platformA = a.platform || 'Unknown';
const platformB = b.platform || 'Unknown';
if (platformA !== platformB) {
return platformA.localeCompare(platformB);
}
// Then sort by library name
const libraryA = a.library || 'Unknown';
const libraryB = b.library || 'Unknown';
return libraryA.localeCompare(libraryB);
});
// Format the failures into a message
const formattedFailures = sortedFailures
.map(failure => {
const library = failure.library || 'Unknown';
const platform = failure.platform || 'Unknown';
return `❌ [${platform}] ${library}`;
})
.join('\n');
return {
content: `⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n${formattedFailures}`,
};
}
// Export the functions using CommonJS syntax
module.exports = {
prepareFailurePayload,
sendMessageToDiscord,
};
+5 -1
View File
@@ -7,7 +7,8 @@
* @format
*/
const {run, sleep, log, verifyPublishedPackage} = require('./utils.js');
const {run, sleep, log} = require('./utils.js');
const {verifyPublishedPackage} = require('./verifyPublishedPackage.js');
const TAG_AS_LATEST_REGEX = /#publish-packages-to-npm&latest/;
@@ -68,6 +69,9 @@ module.exports.verifyPublishedTemplate = async (
retries = MAX_RETRIES,
) => {
try {
if (version.startsWith('v')) {
version = version.slice(1);
}
await verifyPublishedPackage(
TEMPLATE_NPM_PKG,
version,
+8 -8
View File
@@ -9,13 +9,7 @@
const {execSync} = require('child_process');
function run(cmd) {
return execSync(cmd, 'utf8').toString().trim();
}
async function sleep(seconds) {
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
}
const log = (...args) => console.log(...args);
async function getNpmPackageInfo(pkg, versionOrTag) {
return fetch(`https://registry.npmjs.org/${pkg}/${versionOrTag}`).then(resp =>
@@ -23,7 +17,13 @@ async function getNpmPackageInfo(pkg, versionOrTag) {
);
}
const log = (...args) => console.log(...args);
async function sleep(seconds) {
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
}
function run(cmd) {
return execSync(cmd, 'utf8').toString().trim();
}
module.exports = {
log,
@@ -0,0 +1,42 @@
/**
* 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
*/
const {log, sleep} = require('./utils');
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/';
async function verifyArtifactsAreOnMaven(version, retries = MAX_RETRIES) {
if (version.startsWith('v')) {
version = version.substring(1);
}
const artifactUrl = `${ARTIFACT_URL}${version}`;
for (let currentAttempt = 1; currentAttempt <= retries; currentAttempt++) {
const response = await fetch(artifactUrl);
if (response.status !== 200) {
log(
`${currentAttempt}) Artifact's for version ${version} are not on maven yet.\nURL: ${artifactUrl}\nLet's wait a minute and try again.\n`,
);
await sleep(SLEEP_S);
} else {
return;
}
}
log(
`We waited 90 minutes for the artifacts to be on Maven. Check https://status.maven.org/ if there are issues wth the service.`,
);
process.exit(1);
}
module.exports = {verifyArtifactsAreOnMaven};
@@ -42,7 +42,7 @@ async function verifyPublishedPackage(
}
log(
`🐌 ${packageName}@${tag}${pkg.version} on npm and not ${version} as expected, retrying...`,
`🐌 ${packageName}@${tag}${json.version} on npm and not ${version} as expected, retrying...`,
);
} catch (e) {
log(`Nope, fetch failed: ${e.message}`);
@@ -7,7 +7,8 @@
* @format
*/
const {run, sleep, log, verifyPublishedPackage} = require('./utils.js');
const {run, sleep, log} = require('./utils.js');
const {verifyPublishedPackage} = require('./verifyPublishedPackage.js');
const REACT_NATIVE_NPM_PKG = 'react-native';
const MAX_RETRIES = 3 * 6; // 18 attempts. Waiting between attempt: 10 s. Total time: 3 mins.
/**
@@ -22,5 +23,8 @@ module.exports.verifyReleaseOnNpm = async (
retries = MAX_RETRIES,
) => {
const tag = version.includes('-rc.') ? 'next' : latest ? 'latest' : null;
if (version.startsWith('v')) {
version = version.slice(1);
}
await verifyPublishedPackage(REACT_NATIVE_NPM_PKG, version, tag, retries);
};
-28
View File
@@ -45,18 +45,6 @@ module.exports = async (github, context) => {
if (!isVersionSupported(issueVersion, latestVersion)) {
return {label: 'Type: Unsupported Version'};
}
// We want to encourage users to repro the issue on the highest available patch for the given minor.
const latestPatchForVersion = getLatestPatchForVersion(
issueVersion,
recentReleases,
);
if (latestPatchForVersion > issueVersion.patch) {
return {
label: 'Newer Patch Available',
newestPatch: `${issueVersion.major}.${issueVersion.minor}.${latestPatchForVersion}`,
};
}
};
/**
@@ -87,22 +75,6 @@ function isVersionTooOld(actualVersion, latestVersion) {
);
}
// Assumes that releases are sorted in the order of recency (i.e. most recent releases are earlier in the list)
// This enables us to stop looking as soon as we find the first release with a matching major/minor version, since
// we know it's the most recent release, therefore the highest patch available.
function getLatestPatchForVersion(version, releases) {
for (releaseName of releases) {
const release = parseVersionFromString(releaseName);
if (
release &&
release.major == version.major &&
release.minor == version.minor
) {
return release.patch;
}
}
}
function getReactNativeVersionFromIssueBodyIfExists(issue) {
if (!issue || !issue.body) return;
const rnVersionRegex = /React Native Version[\r\n]+(?<version>.+)[\r\n]*/;
+41
View File
@@ -0,0 +1,41 @@
name: Bump Podfile.lock
on:
workflow_call: # this directive allow us to call this workflow from other workflows
jobs:
bump-podfile-lock:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Configure git
run: |
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Extract branch name
run: |
TAG="${{ github.ref_name }}";
BRANCH_NAME=$(echo "$TAG" | sed -E 's/v([0-9]+\.[0-9]+)\.[0-9]+(-rc\.[0-9]+)?/\1-stable/')
echo "Branch Name is $BRANCH_NAME"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Checkout release branch
run: |
git checkout "$BRANCH_NAME"
git fetch
git pull origin "$BRANCH_NAME"
- name: Bump podfile.lock
run: |
cd packages/rn-tester
bundle install
bundle exec pod update hermes-engine --no-repo-update
- name: Commit changes
run: |
git add packages/rn-tester/Podfile.lock
git commit -m "[LOCAL] Bump Podfile.lock"
git push origin "$BRANCH_NAME"
+2 -2
View File
@@ -14,7 +14,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Trim the cache
run: node scripts/clean-gha-cache.js
+3 -1
View File
@@ -1,6 +1,6 @@
# This jobs runs every day 2 hours after the nightly job and its purpose is to report
# a failure in case the nightly failed to be published. We are going to hook this to an internal automation.
name: Check Nigthlies
name: Check Nightlies
on:
workflow_dispatch:
@@ -30,3 +30,5 @@ jobs:
test-libraries:
uses: ./.github/workflows/test-libraries-on-nightlies.yml
needs: check-nightly
secrets:
discord_webhook_url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
@@ -0,0 +1,29 @@
name: Create Draft Release
on:
workflow_call:
jobs:
create-draft-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Configure Git
shell: bash
run: |
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Create draft release
uses: actions/github-script@v6
with:
script: |
const {createDraftRelease} = require('./.github/workflow-scripts/createDraftRelease.js');
const version = '${{ github.ref_name }}';
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
await createDraftRelease(version, isLatest(), '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}');
+3 -1
View File
@@ -18,10 +18,12 @@ jobs:
if: github.repository == 'facebook/react-native'
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Danger
run: yarn danger ci --use-github-checks --failOnErrors
working-directory: packages/react-native-bots
working-directory: private/react-native-bots
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
+28
View File
@@ -0,0 +1,28 @@
name: Generate Changelog
on:
workflow_call:
jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Configure Git
shell: bash
run: |
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Generate Changelog
uses: actions/github-script@v6
with:
script: |
const {generateChangelog} = require('./.github/workflow-scripts/generateChangelog');
const version = '${{ github.ref_name }}';
await generateChangelog(version, '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}');
+23 -5
View File
@@ -5,14 +5,32 @@ on:
- cron: "0 0,6,12,18 * * *"
workflow_dispatch:
# Reminder for when we have to update the schedule (before Jan 2026):
# the secrets.ONCALL_SCHEDULE secret must be on a single line and must have all the `"` escaped as `\"`.
# Only a meta engineer can update it through the OSS internal portal.
jobs:
monitor-issues:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
uses: ./.github/actions/setup-node
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Extract next oncall
run: |
ONCALLS=$(node ./.github/workflow-scripts/extractIssueOncalls.js "${{ secrets.ONCALL_SCHEDULE }}")
ONCALL1=$(echo $ONCALLS | cut -d ' ' -f 1)
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:
@@ -23,5 +41,5 @@ jobs:
repo_owner: "facebook"
repo_name: "react-native"
discord_webhook_url: "${{ secrets.DISCORD_WEBHOOK_URL }}"
discord_id_type: "role"
discord_ids: "1339243367841927228"
discord_id_type: "user"
discord_ids: "${{ env.oncall1 }},${{ env.oncall2 }}"
+11 -4
View File
@@ -40,7 +40,7 @@ jobs:
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
build_hermesc_apple:
runs-on: macos-13
runs-on: macos-14
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
@@ -80,7 +80,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermes_macos:
runs-on: macos-13
runs-on: macos-14
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
@@ -101,7 +101,13 @@ jobs:
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
uses: ./.github/workflows/prebuild-ios.yml
uses: ./.github/workflows/prebuild-ios-dependencies.yml
secrets: inherit
prebuild_react_native_core:
uses: ./.github/workflows/prebuild-ios-core.yml
secrets: inherit
needs: [prebuild_apple_dependencies, build_hermes_macos]
build_hermesc_linux:
runs-on: ubuntu-latest
@@ -119,7 +125,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2019
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
@@ -169,6 +175,7 @@ jobs:
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
prebuild_react_native_core,
]
container:
image: reactnativecommunity/react-native-android:latest
+212
View File
@@ -0,0 +1,212 @@
name: Prebuild iOS Dependencies
on:
workflow_call: # this directive allow us to call this workflow from other workflows
jobs:
build-rn-slice:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
flavor: ['Debug', 'Release']
slice: [
'ios',
'ios-simulator',
'mac-catalyst',
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore cache if present
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') }}
path: packages/react-native/
- name: Setup node.js
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-node
- name: Setup xcode
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.2.0'
- name: Yarn Install
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
- name: Download Hermes
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin
- name: Extract Hermes
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
shell: bash
run: |
HERMES_TARBALL_ARTIFACTS_DIR=/tmp/hermes/hermes-runtime-darwin
if [ ! -d $HERMES_TARBALL_ARTIFACTS_DIR ]; then
echo "Hermes tarball artifacts dir not present ($HERMES_TARBALL_ARTIFACTS_DIR)."
exit 0
fi
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "${{ matrix.flavor }}")
TARBALL_PATH=$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME
echo "Looking for $TARBALL_FILENAME in $HERMES_TARBALL_ARTIFACTS_DIR"
echo "$TARBALL_PATH"
if [ ! -f $TARBALL_PATH ]; then
echo "Hermes tarball not present ($TARBALL_PATH). Build Hermes from source."
exit 0
fi
echo "Found Hermes tarball at $TARBALL_PATH"
echo "HERMES_ENGINE_TARBALL_PATH=$TARBALL_PATH" >> $GITHUB_ENV
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
path: /tmp/third-party/
- name: Extract ReactNativeDependencies
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
shell: bash
run: |
# Extract ReactNativeDependencies
tar -xzf /tmp/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz -C /tmp/third-party/
# Create destination folder
mkdir -p packages/react-native/third-party/
# 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)
echo "$VERSION-${{matrix.flavor}}" > "packages/react-native/third-party/version.txt"
cat "packages/react-native/third-party/version.txt"
# Check destination directory
ls -lR packages/react-native/third-party/
- name: Setup the workspace
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
shell: bash
run: |
cd packages/react-native
node scripts/ios-prebuild.js -s -f "${{ matrix.flavor }}"
- name: Build React Native
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
shell: bash
run: |
# This is going to be replaced by a CLI script
cd packages/react-native
node scripts/ios-prebuild -b -f "${{ matrix.flavor }}" -p "${{ matrix.slice }}"
- name: Upload headers
uses: actions/upload-artifact@v4
with:
name: prebuild-ios-core-headers-${{ matrix.flavor }}-${{ matrix.slice }}
path:
packages/react-native/.build/headers
- name: Upload artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }}
path: |
packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
- name: Save Cache
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') }}
path: |
packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
packages/react-native/.build/headers
compose-xcframework:
runs-on: macos-14
needs: [build-rn-slice]
strategy:
fail-fast: false
matrix:
flavor: ['Debug', 'Release']
env:
REACT_ORG_CODE_SIGNING_P12_CERT: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT }}
REACT_ORG_CODE_SIGNING_P12_CERT_PWD: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore cache if present
id: restore-ios-xcframework
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') }}
- name: Setup node.js
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-node
- name: Setup xcode
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.2.0'
- name: Yarn Install
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
- name: Download slice artifacts
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
pattern: prebuild-ios-core-slice-${{ matrix.flavor }}-*
path: packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
merge-multiple: true
- name: Download headers
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
pattern: prebuild-ios-core-headers-${{ matrix.flavor }}-*
path: packages/react-native/.build/headers
merge-multiple: true
- name: Setup Keychain
if: ${{ steps.restore-ios-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT != '' }}
uses: apple-actions/import-codesign-certs@v3 # https://github.com/marketplace/actions/import-code-signing-certificates
with:
p12-file-base64: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT }}
p12-password: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }}
- name: Create XCFramework
if: ${{ steps.restore-ios-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT == '' }}
run: |
cd packages/react-native
node scripts/ios-prebuild -c -f "${{ matrix.flavor }}"
- name: Create and Sign XCFramework
if: ${{ steps.restore-ios-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT != '' }}
run: |
cd packages/react-native
node scripts/ios-prebuild -c -f "${{ matrix.flavor }}" -i "React Org"
- name: Compress and Rename XCFramework
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
run: |
cd packages/react-native/.build/output/xcframeworks/${{matrix.flavor}}
tar -cz -f ../ReactCore${{matrix.flavor}}.xcframework.tar.gz React.xcframework
- name: Compress and Rename dSYM
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
run: |
cd packages/react-native/.build/output/xcframeworks/${{matrix.flavor}}/Symbols
tar -cz -f ../../ReactCore${{ matrix.flavor }}.framework.dSYM.tar.gz .
- name: Upload XCFramework Artifact
uses: actions/upload-artifact@v4
with:
name: ReactCore${{ matrix.flavor }}.xcframework.tar.gz
path: packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.xcframework.tar.gz
- name: Upload dSYM Artifact
uses: actions/upload-artifact@v4
with:
name: ReactCore${{ matrix.flavor }}.framework.dSYM.tar.gz
path: packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.framework.dSYM.tar.gz
- name: Save cache if present
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
uses: actions/cache/save@v4
with:
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') }}
@@ -1,8 +1,9 @@
name: Prebuild iOS
name: Prebuild iOS Dependencies
on:
workflow_call: # this directive allow us to call this workflow from other workflows
jobs:
prepare_workspace:
name: Prepare workspace
@@ -17,7 +18,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: packages/react-native/third-party/
key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
enableCrossOsArchive: true
- name: Yarn Install
if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true'
@@ -39,7 +40,7 @@ jobs:
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
enableCrossOsArchive: true
path: packages/react-native/third-party/
@@ -73,7 +74,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: packages/react-native/third-party/.build/Build/Products
key: v1-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
- name: Yarn Install
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
@@ -106,7 +107,7 @@ jobs:
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v1-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
enableCrossOsArchive: true
path: |
packages/react-native/third-party/.build/Build/Products
@@ -119,6 +120,9 @@ jobs:
fail-fast: false
matrix:
flavor: [Debug, Release]
env:
REACT_ORG_CODE_SIGNING_P12_CERT: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT }}
REACT_ORG_CODE_SIGNING_P12_CERT_PWD: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -134,11 +138,17 @@ jobs:
with:
path: |
packages/react-native/third-party/
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
# If cache hit, we already have our binary. We don't need to do anything.
- name: Yarn Install
if: steps.restore-xcframework.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
- name: Restore workspace
if: steps.restore-xcframework.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: ios-prebuilds-workspace
path: packages/react-native/third-party/
- name: Download slices
if: steps.restore-xcframework.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
@@ -146,9 +156,18 @@ jobs:
pattern: prebuild-slice-${{ matrix.flavor }}-*
path: packages/react-native/third-party/.build/Build/Products
merge-multiple: true
- name: Setup Keychain
if: ${{ steps.restore-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT != '' }}
uses: apple-actions/import-codesign-certs@v3 # https://github.com/marketplace/actions/import-code-signing-certificates
with:
p12-file-base64: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT }}
p12-password: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }}
- name: Create XCFramework
if: steps.restore-xcframework.outputs.cache-hit != 'true'
if: ${{ steps.restore-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT == '' }}
run: node scripts/releases/prepare-ios-prebuilds.js -c
- name: Create and Sign XCFramework
if: ${{ steps.restore-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT != '' }}
run: node scripts/releases/prepare-ios-prebuilds.js -c -i "React Org"
- name: Compress and Rename XCFramework
if: steps.restore-xcframework.outputs.cache-hit != 'true'
run: |
@@ -180,4 +199,4 @@ jobs:
path: |
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
@@ -20,6 +20,8 @@ jobs:
uses: ./.github/actions/yarn-install
- name: Build packages
run: yarn build
- name: Build types
run: yarn build-types
- name: Set NPM auth token
run: echo "//registry.npmjs.org/:_authToken=$GHA_NPM_TOKEN" > ~/.npmrc
- name: Find and publish all bumped packages
+35 -27
View File
@@ -38,7 +38,7 @@ jobs:
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
build_hermesc_apple:
runs-on: macos-13
runs-on: macos-14
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
@@ -77,7 +77,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermes_macos:
runs-on: macos-13
runs-on: macos-14
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
@@ -96,8 +96,15 @@ jobs:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
uses: ./.github/workflows/prebuild-ios.yml
uses: ./.github/workflows/prebuild-ios-dependencies.yml
secrets: inherit
prebuild_react_native_core:
uses: ./.github/workflows/prebuild-ios-core.yml
secrets: inherit
needs: [prebuild_apple_dependencies, build_hermes_macos]
build_hermesc_linux:
runs-on: ubuntu-latest
@@ -115,7 +122,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2019
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
@@ -133,27 +140,6 @@ jobs:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_android:
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 }}
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Android
uses: ./.github/actions/build-android
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
build_npm_package:
runs-on: 8-core-ubuntu
needs:
@@ -163,8 +149,8 @@ jobs:
build_hermes_macos,
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
prebuild_react_native_core,
]
container:
image: reactnativecommunity/react-native-android:latest
@@ -226,6 +212,28 @@ jobs:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
const {verifyReleaseOnNpm} = require('./.github/workflow-scripts/verifyReleaseOnNpm.js');
const {isLatest()} = require('./.github/workflow-scripts/publishTemplate.js');
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
const version = "${{ github.ref_name }}";
await verifyReleaseOnNpm(version, isLatest());
- name: Verify that artifacts are on Maven
uses: actions/github-script@v6
with:
script: |
const {verifyArtifactsAreOnMaven} = require('./.github/workflow-scripts/verifyArtifactsAreOnMaven.js');
const version = "${{ github.ref_name }}";
await verifyArtifactsAreOnMaven(version);
generate_changelog:
needs: build_npm_package
uses: ./.github/workflows/generate-changelog.yml
secrets: inherit
bump_podfile_lock:
needs: build_npm_package
uses: ./.github/workflows/bump-podfile-lock.yml
secrets: inherit
create_draft_release:
needs: generate_changelog
uses: ./.github/workflows/create-draft-release.yml
secrets: inherit
+19
View File
@@ -0,0 +1,19 @@
name: Retry workflow
# Based on https://stackoverflow.com/a/78314483
on:
workflow_dispatch:
inputs:
run_id:
required: true
jobs:
rerun:
runs-on: ubuntu-latest
steps:
- name: rerun ${{ inputs.run_id }}
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
gh run rerun ${{ inputs.run_id }} --failed
+90 -85
View File
@@ -56,7 +56,7 @@ jobs:
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
build_hermesc_apple:
runs-on: macos-13
runs-on: macos-14
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
@@ -96,7 +96,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermes_macos:
runs-on: macos-13
runs-on: macos-14
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
@@ -117,12 +117,18 @@ jobs:
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
uses: ./.github/workflows/prebuild-ios.yml
uses: ./.github/workflows/prebuild-ios-dependencies.yml
secrets: inherit
prebuild_react_native_core:
uses: ./.github/workflows/prebuild-ios-core.yml
secrets: inherit
needs: [prebuild_apple_dependencies, build_hermes_macos]
test_ios_rntester_ruby_3_2_0:
runs-on: macos-13
runs-on: macos-14
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
[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
@@ -137,32 +143,29 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_rntester_dynamic_frameworks:
runs-on: macos-13
runs-on: macos-14
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
[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
matrix:
jsengine: [Hermes, JSC]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
jsengine: ${{ matrix.jsengine }}
use-frameworks: DynamicFrameworks
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_rntester:
runs-on: macos-13-large
runs-on: macos-14-large
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
[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
@@ -170,24 +173,13 @@ jobs:
strategy:
fail-fast: false
matrix:
jsengine: [Hermes, JSC]
architecture: [NewArch, OldArch]
flavor: [Debug, Release]
exclude: # We don't want to test the Old Arch in Release for E2E
- jsengine: Hermes
architecture: OldArch
flavor: Release
- jsengine: JSC
architecture: OldArch
flavor: Release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
jsengine: ${{ matrix.jsengine }}
architecture: ${{ matrix.architecture }}
run-unit-tests: "false"
use-frameworks: StaticLibraries
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
@@ -196,52 +188,49 @@ jobs:
test_e2e_ios_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: macos-13-large
runs-on: macos-14-large
needs:
[test_ios_rntester]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
continue-on-error: true
strategy:
fail-fast: false
matrix:
jsengine: [Hermes, JSC]
architecture: [NewArch]
flavor: [Debug, Release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Download App
uses: actions/download-artifact@v4
with:
name: RNTesterApp-${{ matrix.architecture }}-${{ matrix.jsengine }}-${{ matrix.flavor }}
name: RNTesterApp-NewArch-${{ matrix.flavor }}
path: /tmp/RNTesterBuild/RNTester.app
- name: Check downloaded folder content
run: ls -lR /tmp/RNTesterBuild
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Run E2E Tests
uses: ./.github/actions/maestro-ios
with:
app-path: "/tmp/RNTesterBuild/RNTester.app"
app-id: com.meta.RNTester.localDevelopment
jsengine: ${{ matrix.jsengine }}
maestro-flow: ./packages/rn-tester/.maestro/
flavor: ${{ matrix.flavor }}
test_e2e_ios_templateapp:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: macos-13-large
needs: build_npm_package
runs-on: macos-14-large
needs: [build_npm_package, 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
matrix:
jsengine: [Hermes, JSC]
flavor: [Debug, Release]
architecture: [OldArch, NewArch]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -252,7 +241,7 @@ jobs:
- name: Run yarn
uses: ./.github/actions/yarn-install
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
- name: Download Hermes
@@ -267,6 +256,14 @@ jobs:
path: /tmp/react-native-tmp
- name: Print /tmp folder
run: ls -lR /tmp/react-native-tmp
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
path: /tmp/third-party
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Prepare artifacts
run: |
REACT_NATIVE_PKG=$(find /tmp/react-native-tmp -type f -name "*.tgz")
@@ -287,10 +284,8 @@ jobs:
cd /tmp/RNTestProject/ios
bundle install
NEW_ARCH_ENABLED=1
if [[ ${{ matrix.architecture }} == "OldArch" ]]; then
echo "Disable the New Architecture"
NEW_ARCH_ENABLED=0
fi
export RCT_USE_LOCAL_RN_DEP=/tmp/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
xcodebuild \
@@ -305,23 +300,18 @@ jobs:
with:
app-path: "/tmp/RNTestProject/Build/Products/${{ matrix.flavor }}-iphonesimulator/RNTestProject.app"
app-id: org.reactjs.native.example.RNTestProject
jsengine: ${{ matrix.jsengine }}
maestro-flow: ./scripts/e2e/.maestro/
flavor: ${{ matrix.flavor }}
working-directory: /tmp/RNTestProject
architecture: ${{ matrix.architecture }}
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
continue-on-error: true
strategy:
fail-fast: false
matrix:
jsengine: [Hermes, JSC]
flavor: [debug, release]
architecture: [OldArch, NewArch]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -367,16 +357,6 @@ jobs:
cd /tmp/RNTestProject
echo "react.internal.mavenLocalRepo=$MAVEN_LOCAL" >> android/gradle.properties
if [[ ${{matrix.architecture}} == "OldArch" ]]; then
echo "Disabling the New Architecture"
sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties
fi
if [[ ${{matrix.jsengine}} == "JSC" ]]; then
echo "Using JSC instead of Hermes"
sed -i 's/hermesEnabled=true/hermesEnabled=false/' android/gradle.properties
fi
# Build
cd android
CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}')
@@ -388,12 +368,10 @@ jobs:
with:
app-path: /tmp/RNTestProject/android/app/build/outputs/apk/${{ matrix.flavor }}/app-${{ matrix.flavor }}.apk
app-id: com.rntestproject
jsengine: ${{ matrix.jsengine }}
maestro-flow: ./scripts/e2e/.maestro/
install-java: 'false'
flavor: ${{ matrix.flavor }}
working-directory: /tmp/RNTestProject
architecture: ${{ matrix.architecture }}
build_hermesc_linux:
runs-on: ubuntu-latest
@@ -411,7 +389,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2019
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'D:\tmp\hermes'
@@ -456,7 +434,6 @@ jobs:
strategy:
fail-fast: false
matrix:
jsengine: [hermes, jsc]
flavor: [debug, release]
steps:
- name: Checkout
@@ -468,17 +445,16 @@ jobs:
- name: Download APK
uses: actions/download-artifact@v4
with:
name: rntester-${{ matrix.jsengine }}-${{ matrix.flavor }}
path: ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.jsengine }}/${{ matrix.flavor }}/
name: rntester-${{ matrix.flavor }}
path: ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.flavor }}/
- name: Print folder structure
run: ls -lR ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.jsengine }}/${{ matrix.flavor }}/
run: ls -lR ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.flavor }}/
- name: Run E2E Tests
uses: ./.github/actions/maestro-android
timeout-minutes: 60
with:
app-path: ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.jsengine }}/${{ matrix.flavor }}/app-${{ matrix.jsengine }}-x86-${{ matrix.flavor }}.apk
app-path: ./packages/rn-tester/android/app/build/outputs/apk/${{ matrix.flavor }}/app-x86-${{ matrix.flavor }}.apk
app-id: com.facebook.react.uiapp
jsengine: ${{ matrix.jsengine }}
maestro-flow: ./packages/rn-tester/.maestro
flavor: ${{ matrix.flavor }}
@@ -493,6 +469,7 @@ jobs:
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
prebuild_react_native_core,
]
container:
image: reactnativecommunity/react-native-android:latest
@@ -529,8 +506,6 @@ jobs:
fail-fast: false
matrix:
flavor: [Debug, Release]
architecture: [NewArch, OldArch]
jsengine: [Hermes, JSC]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -555,17 +530,11 @@ jobs:
- name: Prepare the Helloworld application
shell: bash
run: node ./scripts/e2e/init-project-e2e.js --useHelloWorld --pathToLocalReactNative "$GITHUB_WORKSPACE/build/$(cat build/react-native-package-version)"
- name: Build the Helloworld application for ${{ matrix.flavor }} with Architecture set to ${{ matrix.architecture }}, and using the ${{ matrix.jsengine }} JS engine.
- name: Build the Helloworld application for ${{ matrix.flavor }} with Architecture set to New Architecture.
shell: bash
run: |
cd packages/helloworld/android
cd private/helloworld/android
args=()
if [[ ${{ matrix.architecture }} == "OldArch" ]]; then
args+=(--arch old)
fi
if [[ ${{ matrix.jsengine }} == "JSC" ]]; then
args+=(--jsvm jsc)
fi
if [[ ${{ matrix.flavor }} == "Release" ]]; then
args+=(--prod)
fi
@@ -573,13 +542,13 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4.3.4
with:
name: helloworld-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-${{ matrix.jsengine }}
path: ./packages/helloworld/android/app/build/outputs/apk/
name: helloworld-apk-${{ matrix.flavor }}-NewArch-hermes
path: ./private/helloworld/android/app/build/outputs/apk/
compression-level: 0
test_ios_helloworld_with_ruby_3_2_0:
runs-on: macos-13
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
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
env:
PROJECT_NAME: iOSTemplateProject
HERMES_WS_DIR: /tmp/hermes
@@ -590,23 +559,20 @@ jobs:
- uses: ./.github/actions/test-ios-helloworld
with:
ruby-version: 3.2.0
architecture: NewArch
flavor: Debug
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_helloworld:
runs-on: macos-13
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
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
strategy:
matrix:
flavor: [Debug, Release]
jsengine: [Hermes, JSC]
use_frameworks: [StaticLibraries, DynamicFrameworks]
exclude:
# This config is tested with Ruby 3.2.0. Let's not double test it.
- flavor: Debug
jsengine: Hermes
use_frameworks: StaticLibraries
env:
PROJECT_NAME: iOSTemplateProject
@@ -618,7 +584,6 @@ jobs:
- uses: ./.github/actions/test-ios-helloworld
with:
flavor: ${{ matrix.flavor }}
jsengine: ${{ matrix.jsengine }}
use-frameworks: ${{ matrix.use_frameworks }}
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
@@ -628,7 +593,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: ["22", "20", "18"]
node-version: ["24", "22"]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -644,7 +609,47 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run all the Linters
- name: Run all the linters
uses: ./.github/actions/lint
with:
github-token: ${{ env.GH_TOKEN }}
# This job should help with the E2E flakyness.
# In case E2E tests fails, it launches a new retry-workflow workflow, passing the current run_id as input.
# The retry-workflow reruns only the failed jobs of the current test-all workflow using
# ```
# gh run rerun ${{ inputs.run_id }} --failed
# ```
# From https://stackoverflow.com/a/78314483 it seems like that adding the extra workflow
# rather then calling directly this command should improve stability of this solution.
# This is exactly the same as rerunning failed tests from the GH UI, but automated.
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()
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rerun failed jobs in the current workflow
env:
GH_TOKEN: ${{ github.token }}
run: |
SHOULD_RETRY=${{fromJSON(github.run_attempt) < 3}}
if [[ $SHOULD_RETRY == "false" ]]; then
exit 0
fi
RNTESTER_ANDROID_FAILED=${{ needs.test_e2e_android_rntester.result == 'failure' }}
TEMPLATE_ANDROID_FAILED=${{ needs.test_e2e_android_templateapp.result == 'failure' }}
RNTESTER_IOS_FAILED=${{ needs.test_e2e_ios_rntester.result == 'failure' }}
TEMPLATE_IOS_FAILED=${{ needs.test_e2e_ios_templateapp.result == 'failure' }}
echo "RNTESTER_ANDROID_FAILED: $RNTESTER_ANDROID_FAILED"
echo "TEMPLATE_ANDROID_FAILED: $TEMPLATE_ANDROID_FAILED"
echo "RNTESTER_IOS_FAILED: $RNTESTER_IOS_FAILED"
echo "TEMPLATE_IOS_FAILED: $TEMPLATE_IOS_FAILED"
if [[ $RNTESTER_ANDROID_FAILED == "true" || $TEMPLATE_ANDROID_FAILED == "true" || $RNTESTER_IOS_FAILED == "true" || $TEMPLATE_IOS_FAILED == "true" ]]; then
echo "Rerunning failed jobs in the current workflow"
gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
fi
@@ -2,46 +2,25 @@ name: Test Libraries on Nightlies
on:
workflow_call:
secrets:
discord_webhook_url:
required: true
# We use the matrix.library entry to specify the dependency we want to use
# The key is used directly as the <pkg> in the `yarn add <pkg>` command.
jobs:
test-library-on-nightly-android:
name: "[Android] ${{ matrix.library }}"
runner-setup:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
library: [
"react-native-async-storage",
"react-native-blob-util",
"@react-native-clipboard/clipboard",
"@react-native-community/datetimepicker",
"react-native-gesture-handler",
"react-native-image-picker",
"react-native-linear-gradient",
"@react-native-masked-view/masked-view",
"react-native-maps",
"@react-native-community/netinfo",
"react-native-reanimated",
"react-native-svg",
"react-native-video",
"react-native-webview",
"react-native-mmkv",
"react-native-screens",
"react-native-pager-view",
"@react-native-community/slider"
]
outputs:
runners: '{"ios":"macos-14-large", "android": "ubuntu-latest"}'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test ${{ inputs.library-name }}
uses: ./.github/actions/test-library-on-nightly
with:
library-npm-package: ${{ matrix.library }}
platform: android
- run: echo no-op
test-library-on-nightly-ios:
name: "[iOS] ${{ matrix.library }}"
runs-on: macos-13-large
test-library-on-nightly:
name: "[${{ matrix.platform }}] ${{ matrix.library }}"
needs: runner-setup
runs-on: ${{ fromJSON(needs.runner-setup.outputs.runners)[matrix.platform] }}
continue-on-error: true
strategy:
matrix:
@@ -54,22 +33,68 @@ jobs:
"react-native-image-picker",
"react-native-linear-gradient",
"@react-native-masked-view/masked-view",
"react-native-maps",
# "react-native-maps", React Native Maps with the New Arch support has a complex cocoapods setup for iOS. It needs a dedicated workflow.
"@react-native-community/netinfo",
"react-native-reanimated",
"react-native-reanimated@nightly react-native-worklets@nightly", #reanimated requires worklet to be explicitly installed as a separate package
"react-native-svg",
"react-native-video",
"react-native-webview",
"react-native-mmkv",
"react-native-screens",
"react-native-pager-view",
"@react-native-community/slider"
"@react-native-community/slider",
# additional OSS libs used internally
"scandit-react-native-datacapture-barcode scandit-react-native-datacapture-core",
"react-native-contacts",
"react-native-device-info",
"react-native-email-link",
"@dr.pogodin/react-native-fs",
"react-native-permissions",
"react-native-vector-icons",
"react-native-masked-view",
"@react-native-community/image-editor",
]
platform: [ios, android]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test ${{ inputs.library-name }}
- name: Set up Node.js
uses: ./.github/actions/setup-node
- name: Test ${{ matrix.library }}
id: run-test
uses: ./.github/actions/test-library-on-nightly
with:
library-npm-package: ${{ matrix.library }}
platform: ios
platform: ${{ matrix.platform}}
- name: Save outcome
id: save-outcome
if: always()
run: |
LIB_FOLDER=$(echo "${{matrix.library}}" | tr ' ' '_' | tr '/' '_')
echo "${{matrix.library}}: ${{steps.run-test.outcome}}" > "/tmp/$LIB_FOLDER-${{ matrix.platform }}-outcome"
echo "lib_folder=$LIB_FOLDER" >> $GITHUB_OUTPUT
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ steps.save-outcome.outputs.lib_folder }}-${{ matrix.platform }}-outcome
path: /tmp/${{ steps.save-outcome.outputs.lib_folder }}-${{ matrix.platform }}-outcome
collect-results:
runs-on: ubuntu-latest
needs: [test-library-on-nightly]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore outcomes
uses: actions/download-artifact@v4
with:
pattern: '*-outcome'
path: /tmp
- name: Collect failures
uses: actions/github-script@v6
with:
script: |
const {collectResults} = require('./.github/workflow-scripts/collectNightlyOutcomes.js');
await collectResults('${{secrets.discord_webhook_url}}');
+20 -10
View File
@@ -30,6 +30,7 @@ project.xcworkspace
/packages/rn-tester/android/app/gradle/
/packages/rn-tester/android/app/gradlew
/packages/rn-tester/android/app/gradlew.bat
/packages/react-native/build/
/packages/react-native/ReactAndroid/build/
/packages/react-native/ReactAndroid/.cxx/
/packages/react-native/ReactAndroid/gradle/
@@ -39,8 +40,8 @@ project.xcworkspace
/packages/react-native/ReactAndroid/external-artifacts/artifacts/
/packages/react-native/ReactAndroid/hermes-engine/build/
/packages/react-native/ReactAndroid/hermes-engine/.cxx/
/packages/helloworld/android/app/build/
/packages/helloworld/android/build/
/private/helloworld/android/app/build/
/private/helloworld/android/build/
/packages/react-native-popup-menu-android/android/build/
/packages/react-native-test-library/android/build/
@@ -107,33 +108,42 @@ package-lock.json
# Ruby Gems (Bundler)
/packages/react-native/vendor
/packages/helloworld/vendor
/private/helloworld/vendor
.ruby-version
/**/.ruby-version
vendor/
# iOS / CocoaPods
/packages/helloworld/ios/build/
/packages/helloworld/ios/Pods/
/packages/helloworld/ios/Podfile.lock
/private/helloworld/ios/build/
/private/helloworld/ios/Pods/
/private/helloworld/ios/Podfile.lock
/packages/rn-tester/bin/
/packages/rn-tester/cache/
/packages/rn-tester/extensions/
/packages/rn-tester/gems/
/packages/rn-tester/specifications/
/packages/rn-tester/Gemfile.lock
/packages/**/RCTLegacyInteropComponents.mm
/packages/sourcemap.ios.map
# Ignore RNTester specific Pods, but keep the __offline_mirrors__ here.
/packages/rn-tester/Pods/*
!/packages/rn-tester/Pods/__offline_mirrors_hermes__
!/packages/rn-tester/Pods/__offline_mirrors_jsc__
# Swift Package build folder
/packages/react-native/.build
/packages/react-native/.swiftpm
# @react-native/codegen
/packages/react-native/React/FBReactNativeSpec/
/packages/react-native-codegen/lib
/packages/react-native-codegen/tmp/
/packages/react-native/ReactCommon/react/renderer/components/rncore/
/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec*
/**/RCTThirdPartyFabricComponentsProvider.*
# @react-native/codegen-typescript-test
/packages/react-native-codegen-typescript-test/lib
/private/react-native-codegen-typescript-test/lib
# Additional SDKs
/packages/react-native/sdks/download
@@ -160,8 +170,8 @@ fix_*.patch
.metro-health-check*
# Jest Integration
/packages/react-native-fantom/build/
/packages/react-native-fantom/tester/build/
/private/react-native-fantom/build/
/private/react-native-fantom/tester/build/
# [Experimental] Generated TS type definitions
/packages/**/types_generated/
+43
View File
@@ -0,0 +1,43 @@
/**
* 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
*/
import relativeLinksRule from 'markdownlint-rule-relative-links';
const config = {
config: {
default: false,
'heading-increment': true,
'no-reversed-links': true,
'no-missing-space-atx': true,
'no-duplicate-heading': {
siblings_only: true,
},
'single-title': true,
'no-trailing-punctuation': true,
'no-space-in-emphasis': true,
'no-space-in-code': true,
'no-space-in-links': true,
'fenced-code-language': true,
'first-line-heading': true,
'no-empty-links': true,
'no-alt-text': true,
'link-fragments': true,
'table-column-count': true,
// The rest of default rules are already handled by prettier
// Custom rules
'relative-links': true,
},
globs: ['**/__docs__/*.md'],
ignores: ['**/node_modules', '__docs__/README-template.md'],
customRules: [relativeLinksRule],
};
export default config;
+10
View File
@@ -21,6 +21,16 @@
"options": {
"parser": "hermes"
}
},
{
"files": [
"**/__docs__/*.md"
],
"options": {
"parser": "markdown",
"proseWrap": "always",
"requirePragma": false
}
}
]
}
+2 -2
View File
@@ -1174,7 +1174,7 @@ Heads-up: the Facebook internal team is [currently working on a rewrite of some
- Restrict `WebView` to only http(s) URLs: ([634e7e11e3](https://github.com/facebook/react-native/commit/634e7e11e3ad39e0b13bf20cc7722c0cfd3c3e28), [23f8f7aecb](https://github.com/facebook/react-native/commit/23f8f7aecb1f21f4f5e44fb9e4a7456ea97935c9))
- Node 8 is now the minimum required version ([c1e6f27823](https://github.com/facebook/react-native/commit/c1e6f278237e84c8ed26d3d2eb45035f250e2d40))
- Upgrade React to v16.4.1, sync React Renderer to revision ae14317 ([c749d951ad](https://github.com/facebook/react-native/commit/c749d951ada829c6f6fb76f35e68142e61054433))
- Update new project template's Flow config to fix `Cannot resolve module X` isse due to removal of `@providesModule` ([843a433e87](https://github.com/facebook/react-native/commit/843a433e87b0ccaa64ab70d07e22bffbabad8045))
- Update new project template's Flow config to fix `Cannot resolve module X` issue due to removal of `@providesModule` ([843a433e87](https://github.com/facebook/react-native/commit/843a433e87b0ccaa64ab70d07e22bffbabad8045))
- Upgrade Flow to v0.75 ([3bed272a62](https://github.com/facebook/react-native/commit/3bed272a620ac806a6142327013265ea8138641a), [bc2f12c68c](https://github.com/facebook/react-native/commit/bc2f12c68cf8cfdf8c060354e84392fd9a3645d8), [6264b6932a](https://github.com/facebook/react-native/commit/6264b6932a08e1cefd83c4536ff7839d91938730))
- Upgrade Flow definitions ([f8b4850425](https://github.com/facebook/react-native/commit/f8b4850425f115c8a23dead7ec0716b61663aed6))
- Upgrade Prettier to v1.13.6 ([29fb2a8e90](https://github.com/facebook/react-native/commit/29fb2a8e90fa3811f9485d4b89d9dbcfffea93a6), [bc2f12c68c](https://github.com/facebook/react-native/commit/bc2f12c68cf8cfdf8c060354e84392fd9a3645d8))
@@ -1745,7 +1745,7 @@ Below is a list of the remaining, low-level changes that made it into this relea
- Changes to RCTShadowView to increase RCTSurface performance ([f96f9c5fd6](https://github.com/facebook/react-native/commit/f96f9c5fd692000f561e87cba68642ef7daf43e7) by [@shergin](https://github.com/shergin))
- Designated methods to control dirty propagation ([af226ef949](https://github.com/facebook/react-native/commit/af226ef949f3a21ef68a6e6b9fbd4cc06fa05152) by [@shergin](https://github.com/shergin))
- Add missing tvOS header ([49cbca7464](https://github.com/facebook/react-native/commit/49cbca7464e27c34105122459ae29cc3b1247513) by [@grabbou](https://github.com/grabbou))
- On Android, seperate logic to initialize JS from starting the app ([4996b9aeb4](https://github.com/facebook/react-native/commit/4996b9aeb4127892b7579b45927dec14833b8b4d) by [@axe-fb](https://github.com/axe-fb))
- On Android, separate logic to initialize JS from starting the app ([4996b9aeb4](https://github.com/facebook/react-native/commit/4996b9aeb4127892b7579b45927dec14833b8b4d) by [@axe-fb](https://github.com/axe-fb))
- ♻️ JS linting was cleaned up: removed unused libs, strengthened the rules, removed unneeded rules, prevent disabled tests, and more ([2815ada238](https://github.com/facebook/react-native/commit/2815ada23872fc28dc8dd5a9833962cb73f452eb), [183c316f4c](https://github.com/facebook/react-native/commit/183c316f4c869804b88cffe40614c84ac0a472d0), [9c67e749d8](https://github.com/facebook/react-native/commit/9c67e749d8f63cf14ece201ec19eee4676f96a85), [79902f99b8](https://github.com/facebook/react-native/commit/79902f99b81f538042b38a857182c2e5adbfd006), [9a36872f0c](https://github.com/facebook/react-native/commit/9a36872f0c7ba03a92fabf65e4d659d6861ea786), [67a3c42d1a](https://github.com/facebook/react-native/commit/67a3c42d1a29b6fa1375f7445d1c9b4429939bae), [b826596700](https://github.com/facebook/react-native/commit/b82659670041d0e472f68c0a14b3ef5b962db09b), [a1a0a69546](https://github.com/facebook/react-native/commit/a1a0a6954635141ce6c167816b67674aa5c31062), and [11a495cb32](https://github.com/facebook/react-native/commit/11a495cb3235ebbc2ad890e92ec612fd5316bffb) by [@TheSavior](https://github.com/TheSavior))
- 👷 Separate JS lint and flow checks from tests ([5ea5683d01](https://github.com/facebook/react-native/commit/5ea5683d01487b49c814fca6e11a818b9a777239) by [@hramos](https://github.com/hramos))
- 👷 Fix Buck in build config to enable CI ([796122d8f3](https://github.com/facebook/react-native/commit/796122d8f3b825c0bf0c138c662f3477f8bab123), [7c3a61f3b6](https://github.com/facebook/react-native/commit/7c3a61f3b610e219fd798eccd330deb9a2471253), [82b123e744](https://github.com/facebook/react-native/commit/82b123e744b87cc59c96b4e82af9ed03981b4f42) by [@grabbou](https://github.com/grabbou))
+735
View File
@@ -1,5 +1,676 @@
# Changelog
## v0.80.0
### Breaking
- The `NewAppScreen` component is redesigned and moved to the `react-native/new-app-screen` package ([3cf0102007](https://github.com/facebook/react-native/commit/3cf01020071c76f40499878674cc7aaf5dbe168a) by [@huntie](https://github.com/huntie))
- The `react-native` package now defines package.json `"exports"`. ([319ba0afd2](https://github.com/facebook/react-native/commit/319ba0afd2f694bc70a20250f0b8c79a06a36dc6) by [@huntie](https://github.com/huntie))
- Subpath imports to the internal react-native/virtualized-lists package are not allowed. ([be8393c41b](https://github.com/facebook/react-native/commit/be8393c41b3d613385a2ee4632438030e80d6b2d) by [@iwoplaza](https://github.com/iwoplaza))
- Dispatch `folly::dynamic` events with r-value instead of l-value ([12e5df844b](https://github.com/facebook/react-native/commit/12e5df844bf60c19a825e5c5738d765a8562945c) by [@rozele](https://github.com/rozele))
- Introduce beforeload callback arg into `ReactInstance::loadScript` ([061174c150](https://github.com/facebook/react-native/commit/061174c150ad05e0ea3fad3cdddb44df9710c337) by [@RSNara](https://github.com/RSNara))
- Updated `eslint-config-react-native` to depend on `eslint-plugin-react-hooks` v5.2.0 from v4.6.0. This includes a breaking change in which ESLint will no longer recognize component names that start with 1 or more underscores followed by a capital letter. (https://github.com/facebook/react/pull/25162) ([4de592756b](https://github.com/facebook/react-native/commit/4de592756bb39d4fc99698c96d2f69dea46d82e1) by [@yungsters](https://github.com/yungsters))
#### Android specific
- Convert `ReactEditText` to Kotlin. If you're subclassing this type you'll need to adjust your signatures. ([cac27d15be](https://github.com/facebook/react-native/commit/cac27d15bef39e1a4bf7e3279e85a7bae4ee3a9c) by [@cortinico](https://github.com/cortinico))
- Convert `NetworkModule` to Kotlin, mark methods as final ([8726e26348](https://github.com/facebook/react-native/commit/8726e263486d07d71e0cd80eba5a4c52705fdb14) by [@Abbondanzo](https://github.com/Abbondanzo))
- Convert `ReactTextInputManager` to Kotlin ([ab47834eb1](https://github.com/facebook/react-native/commit/ab47834eb1910b4da1c594843cf1ab5dc02d23c1) by [@cortinico](https://github.com/cortinico))
- Convert `ColorPropConverter` ([57768bfbcd](https://github.com/facebook/react-native/commit/57768bfbcd84100e244bff4910d46643559c015d) by [@fabriziocucci](https://github.com/fabriziocucci))
- Convert `DevSupportManagerBase` to Kotlin. If you're subclassing this class, you will have to adjust some of the parameters as types have changed during the migration. ([9da485b54c](https://github.com/facebook/react-native/commit/9da485b54c2deec324775f59cb36080baee9d4c9) by [@cortinico](https://github.com/cortinico))
- Convert `ReactInstanceDevHelper` to Kotlin. Some users implementing this class in Kotlin could have breakages. As this is a devtools/frameworks API we're not marking this as breaking. ([09492075e8](https://github.com/facebook/react-native/commit/09492075e827f96d9ce9a5d689ac7d0a44380a33) by [@cortinico](https://github.com/cortinico))
- Make `ModuleDataCleaner` internal ([6fa1864d52](https://github.com/facebook/react-native/commit/6fa1864d52fc47c37aeb5e0f99d972dee92f6ede) by [@mateoguzmana](https://github.com/mateoguzmana))
- Make `DeviceInfoModule` internal ([f02607badb](https://github.com/facebook/react-native/commit/f02607badb5641ab235f41be8005ce62d2bd63d4) by [@mateoguzmana](https://github.com/mateoguzmana))
- Removed `loadSplitBundleFromServer` from `DevSupportManager` interface ([86cd31eb6b](https://github.com/facebook/react-native/commit/86cd31eb6bb72de0791a62b39b64a155c791f034) by [@javache](https://github.com/javache))
- Deleting `ChoreographerCompat`, Use `Choreographer.FrameCallback` instead ([f8b2956437](https://github.com/facebook/react-native/commit/f8b2956437c23dd63463becc704b569bd8fcb19e) by [@mdvacca](https://github.com/mdvacca))
- Deleting deprecated `StandardCharsets` ([40b38d0a44](https://github.com/facebook/react-native/commit/40b38d0a44c7c83d36e34c9689ec3a2ac5d85b6b) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- Cleanup queue configs for some native modules ([5b5cf0e199](https://github.com/facebook/react-native/commit/5b5cf0e1995b11336ed029a7afc8eba1f02ac9d1) by [@philIip](https://github.com/philIip))
- Delete `BridgeModuleBatchDidComplete` config helpers ([cbad8aafa5](https://github.com/facebook/react-native/commit/cbad8aafa541546c82e8079f6ef1a54ce8df83b3) by [@philIip](https://github.com/philIip))
### Added
- Add warning when the app runs with the legacy architecture ([706b6e878d](https://github.com/facebook/react-native/commit/706b6e878d7d503ed870d6635ae1f963a34e8ccd) by [@cipolleschi](https://github.com/cipolleschi))
- Added a custom Jest resolver to opt out from handling `"exports"` in tests ([ee9bd851ac](https://github.com/facebook/react-native/commit/ee9bd851acfc38150f434d676602865ba8cec591) by [@j-piasecki](https://github.com/j-piasecki))
- Support `minimumFontScale` in `paragraphAttributes` ([f53d066d26](https://github.com/facebook/react-native/commit/f53d066d26352e6abfdf2f727ea06425ea163039) by [@anupriya13](https://github.com/anupriya13))
- Configure the "react-native-strict-api" opt in for our next-gen TypeScript API ([6ea24f7bb9](https://github.com/facebook/react-native/commit/6ea24f7bb90829f0806210252dfce50ecee5666d) by [@huntie](https://github.com/huntie))
- Support headers [crossOrigin and referralPolicy] in Image without src and srcSet and only remote source.uri ([49ea9d80b8](https://github.com/facebook/react-native/commit/49ea9d80b883b50d242908bb47881b2680302291) by [@anupriya13](https://github.com/anupriya13))
- Add pan gesture animation example to rntester ([5ec00097b6](https://github.com/facebook/react-native/commit/5ec00097b6712897f8f456d63fc2459439e1dfd7) by [@zeyap](https://github.com/zeyap))
- Add `showsVerticalScrollIndicator` in ScrollViewProps.cpp `SetProp` ([bc90c839aa](https://github.com/facebook/react-native/commit/bc90c839aa8efb6f721a9b72a7b8248a0da3a219) by [@anupriya13](https://github.com/anupriya13))
- Adds JS changes for radial gradient ([1b45dc8033](https://github.com/facebook/react-native/commit/1b45dc8033e1064b2485c8b855a05634e2c1163f) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- CSS Added hwb(H W B / A) notation ([692b05e77d](https://github.com/facebook/react-native/commit/692b05e77d42c9b3ef6dfcbb31f6a11ba0f1e5a3) by [@zhongwuzw](https://github.com/zhongwuzw))
- Added `no-deep-imports` rule to `eslint-plugin-react-native`. ([87809d9326](https://github.com/facebook/react-native/commit/87809d9326f7463e30bbf78edca0ef2a2fa139d9) by [@coado](https://github.com/coado))
- Allow setting `SurfaceStartedCallback` on `UIManager` ([c5e9ef53ae](https://github.com/facebook/react-native/commit/c5e9ef53ae9bfe6ea06ddee54228ada0305e4df7) by [@zeyap](https://github.com/zeyap))
- Move rncxx scheduler to oss ([744a0f8385](https://github.com/facebook/react-native/commit/744a0f8385c0dacfbd25446d08cb6e1640a5a2f9) by [@zeyap](https://github.com/zeyap))
- Add `UIManager::add/RemoveEventListener` ([b0f2083d9d](https://github.com/facebook/react-native/commit/b0f2083d9d881c8b0629fa455f6eb0c963e7e531) by [@zeyap](https://github.com/zeyap))
- Added slash of alpha support using rgb() ([7441127040](https://github.com/facebook/react-native/commit/7441127040f6da52f04b3bccc37894e51d09c6b2) by [@zhongwuzw](https://github.com/zhongwuzw))
- Implementation for `URLSearchParams` ([af1f1e4fe5](https://github.com/facebook/react-native/commit/af1f1e4fe5cb6514d2e806fe0ad5b505e86c0f4b) by Ritesh Shukla)
- Add accessibilityOrder to iOS and Android ([8cf4d5b531](https://github.com/facebook/react-native/commit/8cf4d5b531647375b202130bd2d3b8b2f6dce8e3) by [@jorge-cab](https://github.com/jorge-cab))
- Create `TurboModuleWithJSIBindings` interface ([1acd45950b](https://github.com/facebook/react-native/commit/1acd45950bb85560e2578fa6feaa9e5666c1b65e) by [@zeyap](https://github.com/zeyap))
- Expose `onPressMove` as base prop for `Pressable` ([6df938c72e](https://github.com/facebook/react-native/commit/6df938c72eb9b71ad626462127164fbb6cd4947c) by Regina Tuk)
- Added type definitions for Colors object in LaunchScreen module to enhance code readability and type safety. ([c2864c160d](https://github.com/facebook/react-native/commit/c2864c160dac3253dc20c598865884f8b4c67163) by [@qnnp-me](https://github.com/qnnp-me))
- EventEmitter `addListener` and `removeListener` APIs ([ff4537c15e](https://github.com/facebook/react-native/commit/ff4537c15ecef319ff3dfc87613e4696d280c643) by [@rozele](https://github.com/rozele))
- URL accessors for unimplemented Methods ([3dac90006f](https://github.com/facebook/react-native/commit/3dac90006fe046fd7b1fcedd93955cc88eaaed6f) by [@riteshshukla04](https://github.com/riteshshukla04))
- Add `compact` option to `react-native/babel-preset` to allow disabling whitespace removal ([86911003dc](https://github.com/facebook/react-native/commit/86911003dc396afd3e2016b7435d56c2269c33ff) by [@jnields](https://github.com/jnields))
- Codegen utility functions and types are now exported from the root package ([c7aa3f3fe7](https://github.com/facebook/react-native/commit/c7aa3f3fe722731fa7383385bce541eac860feca) by [@j-piasecki](https://github.com/j-piasecki))
#### Android specific
- Expose Android's `screenReaderFocusable` prop ([4ce093154d](https://github.com/facebook/react-native/commit/4ce093154d8fe130fca1f8da57067a666171db7f) by [@jorge-cab](https://github.com/jorge-cab))
- Warn Legacy Arch users if they use a Component with a ShadowNode with `YogaMeasureFunction.measure()` function. That Component will stop working on NewArch. ([9345c88a61](https://github.com/facebook/react-native/commit/9345c88a619f36537e25cf28b79d2c01cd40f780) by [@cortinico](https://github.com/cortinico))
- Add new prop for filtering drag and drop targeting to text inputs ([d10dd7130c](https://github.com/facebook/react-native/commit/d10dd7130ccc61c3f183f96edb8fec1279ec8a9a) by [@Abbondanzo](https://github.com/Abbondanzo))
- Adds android changes for radial gradient ([a2409941c2](https://github.com/facebook/react-native/commit/a2409941c20f63d0339e2f2b1c9a2e942d29ca2e) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- Generate `keep.xml` to prevent resource shrinking ([864833fca9](https://github.com/facebook/react-native/commit/864833fca9334ba0b986243fce790e89ff64d932) by [@jakex7](https://github.com/jakex7))
- Create `UIManagerNativeAnimatedDelegate` to potentially drive per frame NativeAnimated update ([8d6098a645](https://github.com/facebook/react-native/commit/8d6098a645745fa964bac475ff14598d0cdfd11a) by [@zeyap](https://github.com/zeyap))
- Add a `legacyWarningsEnabled` property to enable Legacy Warnings on NewArch ([7ca2811750](https://github.com/facebook/react-native/commit/7ca28117507688864af0561a0350d46666410291) by [@cortinico](https://github.com/cortinico))
- Allow invoking `synchronouslyUpdateViewOnUIThread` from c++ via `UIManager` ([4912958812](https://github.com/facebook/react-native/commit/49129588123fe05c828fae036b9521f4ba6fe84c) by [@zeyap](https://github.com/zeyap))
- Collections DSL functions for Kotlin(`buildReadableMap`, `buildReadableArray`) ([78dbbaafdd](https://github.com/facebook/react-native/commit/78dbbaafdd4a732f6cbb1525816b38a51adcf1cf) by [@l2hyunwoo](https://github.com/l2hyunwoo))
#### iOS specific
- Expose iOS's `accessibilityRespondsToUserInteraction` as a prop ([fd8a3456ca](https://github.com/facebook/react-native/commit/fd8a3456cac72634cc149904e157e07257dbf364) by [@jorge-cab](https://github.com/jorge-cab))
- Add new prop for filtering drag and drop targeting to text inputs ([93f12eb71d](https://github.com/facebook/react-native/commit/93f12eb71d20feb0d7b96758df6c53b0277032f5) by [@Abbondanzo](https://github.com/Abbondanzo))
- Radial gradient ([d7533dce1c](https://github.com/facebook/react-native/commit/d7533dce1cdb4c0bc70deeab68f53752d13becf2) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- Add flag to enable or disable legacy warning. ([ce7a602edf](https://github.com/facebook/react-native/commit/ce7a602edfe1e7121b4e7b05b80e338304dcf579) by [@cipolleschi](https://github.com/cipolleschi))
- Add warnings when components are loaded using the interop layer. ([8acc53da57](https://github.com/facebook/react-native/commit/8acc53da57d3295cf76ae61e183e7c42973928f4) by [@cipolleschi](https://github.com/cipolleschi))
- Enabled `useFabricInterop` by default in OSS ([21c858ce3e](https://github.com/facebook/react-native/commit/21c858ce3ef55a9812c8e53d3a1b40836564dd6c) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- Add warnings when a legacy module is used in the Interop Layer. ([7b500b8522](https://github.com/facebook/react-native/commit/7b500b8522792b26b0afe8c33dedd460c6d99227) by [@cipolleschi](https://github.com/cipolleschi))
- Show warnings in the New Architecture when modules are loaded using RCT_EXPORT_MODULE ([4d40882172](https://github.com/facebook/react-native/commit/4d40882172a303cdb0f8ff96e0884749f4ebc840) by [@cipolleschi](https://github.com/cipolleschi))
- Allow eager initialization of `RCTRootViewFactory` ([ddbb5fda09](https://github.com/facebook/react-native/commit/ddbb5fda09ff3daaa69e195d2d872bc88480e707) by [@mdjastrzebski](https://github.com/mdjastrzebski))
- Introduce unstableRequiresMainQueueSetup api to modules ([636665c1c2](https://github.com/facebook/react-native/commit/636665c1c20d1ba51f16eea18664e3cd35308518) by [@RSNara](https://github.com/RSNara))
- Codegen: Introduce module/component annotations inside package.json ([76436d35c7](https://github.com/facebook/react-native/commit/76436d35c73772f161071066b98b640bf68094ea) by [@RSNara](https://github.com/RSNara))
- ([3b3d502ccf](https://github.com/facebook/react-native/commit/3b3d502ccfc163ecb8531fb465032e831980b8af) by [@cipolleschi](https://github.com/cipolleschi))
- Useful error message about setting dependency provider ([e1464c0975](https://github.com/facebook/react-native/commit/e1464c097550bb9251513ba64547f4c5afdc838d) by [@okwasniewski](https://github.com/okwasniewski))
- On `RCTReactNativeFactory` add `initWithDelegate` overload with argument to specify release level for an application ([df282a0538](https://github.com/facebook/react-native/commit/df282a0538224258a48ef77ebf9b9d2ed77ed5d5) by [@jorge-cab](https://github.com/jorge-cab))
### Changed
- Bump React to 19.1 ([0e11e6a28b](https://github.com/facebook/react-native/commit/0e11e6a28bf3a12e30b5c6a7e93f3a5653888375) by [@cipolleschi](https://github.com/cipolleschi))
- Re-expose `src/*` subpaths when not using the Strict TypeScript API ([1a46b203b8](https://github.com/facebook/react-native/commit/1a46b203b83d7cbe44185cd7e437e77b850e1af5) by [@huntie](https://github.com/huntie))
- TypeScript: Replace deprecated `React.ElementRef` usages to `React.ComponentRef` ([12147e3bee](https://github.com/facebook/react-native/commit/12147e3bee782a73c1560593912ad706d2262b0c) by [@mateoguzmana](https://github.com/mateoguzmana))
- Configured Hermes Parser for ReactNative to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls. ([68cad5d2d3](https://github.com/facebook/react-native/commit/68cad5d2d3c3b364a86767b0dfe4f92086223a7c) by [@yungsters](https://github.com/yungsters))
- Configured Hermes Parser for Metro to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls. ([f2518d4374](https://github.com/facebook/react-native/commit/f2518d43746fbf712b8cb0ca920f134005c1faec) by [@yungsters](https://github.com/yungsters))
- Replaced `let` with `const` where applicable for better code standards and micro-optimization. ([38fefb2771](https://github.com/facebook/react-native/commit/38fefb2771d7ff65568fa989f2ca4a5bf44e58ec) by [@sanjaiyan-dev](https://github.com/sanjaiyan-dev))
- Animated components' `ref` will now only reattach when receiving new props if the new props contain different `AnimatedValue` or `AnimatedEvent` instances. (Previously, Animated components' `ref` would always reattach when receiving new props.) ([eeab47e61a](https://github.com/facebook/react-native/commit/eeab47e61a32b5fe33352a58ad7b8ac0a652ba6b) by [@yungsters](https://github.com/yungsters))
- When an `Animated` component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase. ([da1bf8d1d1](https://github.com/facebook/react-native/commit/da1bf8d1d1b83b8cee76e94987d94d9ffba6db51) by [@yungsters](https://github.com/yungsters))
- InteractionManager is deprecated and will be removed in a future release. Its behavior has been changed to be the same as `setImmediate`, and callers should migrate away from it. ([a8a4ab10d0](https://github.com/facebook/react-native/commit/a8a4ab10d0ee6004524f0e694e9d5a41836ad5c4) by [@yungsters](https://github.com/yungsters))
- `eslint-config-react-native` now respects rules disabled by `eslint-config-prettier`. ([6346689c3d](https://github.com/facebook/react-native/commit/6346689c3d0420c1d6b85ca8db1e4f3fa115c5e9) by [@yungsters](https://github.com/yungsters))
- Changed `react-native-codegen` to support types under `CodegenTypes` namespace ([5349b7c7b5](https://github.com/facebook/react-native/commit/5349b7c7b586a86adcfa6f123aa138efac5811ce) by [@j-piasecki](https://github.com/j-piasecki))
- Changed Flow for the React Native monorepo, so that `React` no longer has to be in scope when using JSX. ([1bb7446993](https://github.com/facebook/react-native/commit/1bb7446993e5151b92367f33f5bed3f5783f471a) by [@yungsters](https://github.com/yungsters))
- Update Metro to ^0.82.0 ([0ad192003e](https://github.com/facebook/react-native/commit/0ad192003ef786c7dd1322762690d63730f17582) by [@robhogan](https://github.com/robhogan))
- Bump minimum Metro from 0.81.0 to ^0.81.3 || ^0.82.0 ([6606a1da84](https://github.com/facebook/react-native/commit/6606a1da8434a8d59d898a56e277f4130442d2ad) by [@robhogan](https://github.com/robhogan))
- deps: Update debugger-frontend from bc635fa...343405b ([647af1c4ca](https://github.com/facebook/react-native/commit/647af1c4ca219515ab00b442370b61346ba1edb1) by [@huntie](https://github.com/huntie))
- Replace hsr_core dependency for react profiling with hz_tracing dependency ([0f55ef7754](https://github.com/facebook/react-native/commit/0f55ef7754109c68a0bd10d958d8c81ead5e42e2) by [@metaadrianstone](https://github.com/metaadrianstone))
#### Android specific
- Gradle to 8.14.1 ([827a6851d0](https://github.com/facebook/react-native/commit/827a6851d0a61c048fec7a73ca3b293ef90ad2ae) by [@cortinico](https://github.com/cortinico))
- Incorporate maxLines and ellipsization into text layout ([b1367eeb81](https://github.com/facebook/react-native/commit/b1367eeb81078605a39959c49568b00fae7ea8e1) by [@NickGerleman](https://github.com/NickGerleman))
- Make mHybridData in `CxxReactPackage` protected ([0c58ccf501](https://github.com/facebook/react-native/commit/0c58ccf501c1478242c28122bdc87bcd7389e56b) by [@zeyap](https://github.com/zeyap))
- Migrate `ViewGroupManager` to kotlin ([761b15888d](https://github.com/facebook/react-native/commit/761b15888df3b0f47b84a2e29a330165bc7a9492) by [@riteshshukla04](https://github.com/riteshshukla04))
- Migrate `Inspector` to Kotlin ([93efaeb241](https://github.com/facebook/react-native/commit/93efaeb241fcf037b22a92b127d5ffd9fe8bde0c) by [@Vin-Xi](https://github.com/Vin-Xi))
- Gradle to 8.14 ([0e963aaa54](https://github.com/facebook/react-native/commit/0e963aaa54a0324b20795069bdf112e801ca2f62) by [@cortinico](https://github.com/cortinico))
- `ReactActivity` has been migrated to Kotlin. ([403feb9bc2](https://github.com/facebook/react-native/commit/403feb9bc25226120daf1daa1ec401b263b7e833) by [@rshest](https://github.com/rshest))
- Migrate `JSBundleLoader` to Kotlin ([de165a2cfd](https://github.com/facebook/react-native/commit/de165a2cfdb9967ae99237d8c9519cc2dd232855) by [@yogeshpaliyal](https://github.com/yogeshpaliyal))
- AGP to 8.9.2 ([e4bf88a076](https://github.com/facebook/react-native/commit/e4bf88a0765c765e27236199d8138233c4590047) by [@cortinico](https://github.com/cortinico))
- Migrate `JavaModuleWrapper` to Kotlin ([79d3eea0b7](https://github.com/facebook/react-native/commit/79d3eea0b72fc50dab44135d502be2fb39128520) by drrefactor)
- Migrate `BlobProvider` to Kotlin ([5d1febf7de](https://github.com/facebook/react-native/commit/5d1febf7def124ef84e2224923d2b26fcdb81236) by [@JatinDream11](https://github.com/JatinDream11))
- Change to use new Background and new Border drawables by default ([132a871b46](https://github.com/facebook/react-native/commit/132a871b465eb6509be0e3d9ae61d032b415f535) by [@jorge-cab](https://github.com/jorge-cab))
- Migrate `DynamicFromObject` to Kotlin ([867858df65](https://github.com/facebook/react-native/commit/867858df655445efca1bbfe3ddca55a30a11c7e5) by [@yasir6jan](https://github.com/yasir6jan))
- Kotlin to 2.1.20 ([a3d38d5722](https://github.com/facebook/react-native/commit/a3d38d57223dafac0c23c044bd78af020538591c) by [@cortinico](https://github.com/cortinico))
- Migrate `DynamicFromArray` to Kotlin ([74e8c78268](https://github.com/facebook/react-native/commit/74e8c7826864c166efc735b6d419f9005452942d) by [@BogiKay](https://github.com/BogiKay))
- Refactor class `FrescoBasedTextInlineImageSpan` from Java to Kotlin. ([cb51d25ba8](https://github.com/facebook/react-native/commit/cb51d25ba8bd6c4675efd58311891a40d83b4108) by [@gouravkhunger](https://github.com/gouravkhunger))
- Migrate `ReactLifecycleStateManager` to Kotlin ([800b12406f](https://github.com/facebook/react-native/commit/800b12406f8ea777bef93e98685aacfda0560d5b) by [@rohitverma-d11](https://github.com/rohitverma-d11))
- Migrate `ReactStylesDiffMap` to Kotlin ([a0f016ecad](https://github.com/facebook/react-native/commit/a0f016ecad4d577300e95de41be4e297b9c02c4f) by [@poonamjain96](https://github.com/poonamjain96))
- Migrate `ReactClippingViewGroupHelper` to Kotlin ([2834825b8b](https://github.com/facebook/react-native/commit/2834825b8ba01119b4ae3a01ec641defaea1a1f2) by priyanka.raghuvanshi)
- Migrate `FrescoBasedReactTextInlineImageShadowNode` to Kotlin ([30030c5a76](https://github.com/facebook/react-native/commit/30030c5a763280681782e27f26df1d451ff7f93c) by [@nitinshukla413](https://github.com/nitinshukla413))
- Migrate `DynamicFromMap.java` to Kotlin ([86a7388355](https://github.com/facebook/react-native/commit/86a738835555e3377f27ddee0e0083cae8c4804f) by [@artus9033](https://github.com/artus9033))
- Migrate `NativeAnimatedNodesManager` to kotlin ([bfb274c244](https://github.com/facebook/react-native/commit/bfb274c244a9744b6f8cfc9c6b95cc7edca83ef1) by [@zeyap](https://github.com/zeyap))
- Migrate `FileReaderModule` to Kotlin ([07a1fb8e6b](https://github.com/facebook/react-native/commit/07a1fb8e6b3ef8f5ab2b53bd2c5ffff15467f7ea) by [@devanshsaini11](https://github.com/devanshsaini11))
- Automatically use Metro bundler IP address when installing apps on Android ([d816ba0a70](https://github.com/facebook/react-native/commit/d816ba0a7005f413bc45510d34223f632e752c27) by [@hrastnik](https://github.com/hrastnik))
- Migrate `ReactEditTextInputConnectionWrapper` to Kotlin ([5c9883b018](https://github.com/facebook/react-native/commit/5c9883b01865f4cb880bf525de69f4ab5aaed008) by [@Q1w1N](https://github.com/Q1w1N))
- Enable `INTERPROCEDURAL_OPTIMIZATION` for `libappmodules.so` in OSS ([2da062f9d1](https://github.com/facebook/react-native/commit/2da062f9d19196c338191cbc85c2e893a82f4107) by [@cortinico](https://github.com/cortinico))
- Migrate `NativeAnimatedModule` to kotlin ([de9b4f3642](https://github.com/facebook/react-native/commit/de9b4f36425cb4df6642e29528da33880623844b) by [@zeyap](https://github.com/zeyap))
- Enable `INTERPROCEDURAL_OPTIMIZATION` for React Native ([f107c28d2f](https://github.com/facebook/react-native/commit/f107c28d2fe03bd10eada503aecf23fa966be9c5) by [@cortinico](https://github.com/cortinico))
- Make ReactRawTextManager internal. We verified no popular libraries are impacted by this change ([788213f91a](https://github.com/facebook/react-native/commit/788213f91accd38be90b53bca218cd6cd050daeb) by [@cortinico](https://github.com/cortinico))
- Migrate `UiThreadUtil` to Kotlin ([1033584c20](https://github.com/facebook/react-native/commit/1033584c203f41821d5802f56d66cae005ea9b77) by [@riteshshukla04](https://github.com/riteshshukla04))
- Migrate `DevSupportManagerFactory` to Kotlin - We couldn't find any implementation of this class in OSS. Some Kotlin implementers might have to change the method signatures. However this interface is not supposed to be extended in OSS. ([0bd0635be6](https://github.com/facebook/react-native/commit/0bd0635be6b9102a02e62d2be430b1dba218cd36) by [@cortinico](https://github.com/cortinico))
- Creating of Blobs from large files now works. File size can now be upto available (free) heap size. ([81e47af764](https://github.com/facebook/react-native/commit/81e47af7648c489e29982221552086db4a807b8d) by [@giantslogik](https://github.com/giantslogik))
- Leading slash supplied to `DevServerHelper.downloadBundleResourceFromUrlSync` will now be trimmed and emit a warning. ([cf67427406](https://github.com/facebook/react-native/commit/cf67427406426efc9e03b279577056e8692a764b) by [@yungsters](https://github.com/yungsters))
- Prevent currently focused child from getting clipped when `removeClippedSubviews` is enabled ([81405b450c](https://github.com/facebook/react-native/commit/81405b450c77ec66687db9ab62dcba9d6b869d4a) by [@jorge-cab](https://github.com/jorge-cab))
- Do not crash when parent view state can't be found ([ade41c851b](https://github.com/facebook/react-native/commit/ade41c851b2081278d37fd74bd4b9701ccdfbf15) by [@javache](https://github.com/javache))
#### iOS specific
- Enable `DEFINES_MODULE` in `React-jsc.podspec` ([473e42bbc3](https://github.com/facebook/react-native/commit/473e42bbc383fb01981bdfc7085ab923f0c786c0) by [@krozniata](https://github.com/krozniata))
- Update `RCTImageLoader.mm` to cast `loadHandler` to `RCTImageLoaderLoggable` before calling `shouldEnablePerfLogging` ([2562440385](https://github.com/facebook/react-native/commit/2562440385a4e2747df8f3bfb734a5c86976f514) by Aaron Coplan)
- Revert "Add warning when a component is loaded with the interop layer" ([bd64ec817d](https://github.com/facebook/react-native/commit/bd64ec817d4a8be87722122622d30f72e614b87c) by [@cipolleschi](https://github.com/cipolleschi))
- Overwrite betterHitTest in `RCTScrollViewComponentView` instead of changing layout metrics of the container view ([850760ab61](https://github.com/facebook/react-native/commit/850760ab6112d1f38a5a9014282ae5186ab814d6) by [@j-piasecki](https://github.com/j-piasecki))
- Replace a workaround for measuring multiline text with `maximumNumberOfLines` on iOS with a proper solution ([77cdaa8733](https://github.com/facebook/react-native/commit/77cdaa8733db7a7de25b8b0aef87a11f91be9efd) by [@j-piasecki](https://github.com/j-piasecki))
### Deprecated
- Deprecate `*EventData` types on `Image`, `Switch`, `TextInput` components. These can be substituted for `*Event`, e.g. `NativeSyntheticEvent<ImageLoadEventData>` becomes `ImageLoadEvent`. ([701859b397](https://github.com/facebook/react-native/commit/701859b397eddc0686fcdfe43e0244888168dc12) by [@huntie](https://github.com/huntie))
#### Android specific
- Correctly deprecate `ReactContextBaseJavaModule.getCurrentActivity()` method ([1408c69fd8](https://github.com/facebook/react-native/commit/1408c69fd8c5327bd3390fce8ed41e20299a5bfa) by [@cortinico](https://github.com/cortinico))
- Deprecate `UIManagerType.DEFAULT`, replaced by `UIManagerType.LEGACY` ([a8668319ad](https://github.com/facebook/react-native/commit/a8668319ad203cb3dc78f725f5544da6048d5b4e) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- Deprecate `loadImageForURL` in favor of new signature which uses completionHandlerWithMetadata ([43c9a609de](https://github.com/facebook/react-native/commit/43c9a609deb1b769c51751d61904a5d80f0bd05a) by Aaron Coplan)
- Deprecate the `RCT_NEW_ARCH_ENABLED` and the `RCTSetNewArchEnabled` ([6dd721b258](https://github.com/facebook/react-native/commit/6dd721b258ba775de945d9df25f8a9eca4c509b1) by [@cipolleschi](https://github.com/cipolleschi))
### Removed
#### Android specific
- Deprecated `ResourceDrawableIdHelper.instance` ([8de401c625](https://github.com/facebook/react-native/commit/8de401c62520fc0ef83e820b62e15714dc793b45) by [@javache](https://github.com/javache))
- Make `StateWrapperImpl` Internal ([9f941c50c9](https://github.com/facebook/react-native/commit/9f941c50c970e35ac6fcfa11848d1f7f5a0a9323) by [@NickGerleman](https://github.com/NickGerleman))
- Removed deprecated `EventBeatManager(ReactApplicationContext)` constructor ([c97af95a7f](https://github.com/facebook/react-native/commit/c97af95a7ffe2267f6d13f68c607fefac12d639b) by [@javache](https://github.com/javache))
- Remove `FabricSoLoader` from public API ([902f82656e](https://github.com/facebook/react-native/commit/902f82656edc6c092e074759a47dc46aad53a63e) by [@javache](https://github.com/javache))
- Removed `(un)registerEventEmitter` from `EventDispatcher` interface ([d1c0f57073](https://github.com/facebook/react-native/commit/d1c0f57073a083b787af6c78d662506c760acf4e) by [@javache](https://github.com/javache))
- `TouchesHelper` is no longer part of the public API ([2196597e2b](https://github.com/facebook/react-native/commit/2196597e2b602acdaecdfe04a6fb9046cb042f85) by [@javache](https://github.com/javache))
#### iOS specific
- Delete `RCTComputeScreenScale` ([094876367f](https://github.com/facebook/react-native/commit/094876367f2821edce16331f5a30f9edb303dbe9) by [@RSNara](https://github.com/RSNara))
- Remove `RCTFloorPixelValue` ([dc97df10a2](https://github.com/facebook/react-native/commit/dc97df10a2f243855b3c5c9135d01cbc0c543d87) by [@RSNara](https://github.com/RSNara))
### Fixed
- **NewAppScreen:** Fix Networking URL in New app screen ([89e6c72fd4](https://github.com/facebook/react-native/commit/89e6c72fd4ba6c0610e892069ee5b96092dfc192) by [@riteshshukla04](https://github.com/riteshshukla04))
- **Runtime:** Align timer IDs and timer function argument error handling with web standards. ([480a4642e5](https://github.com/facebook/react-native/commit/480a4642e5a644becf1c477d3d239f9b57efff3a) by [@kitten](https://github.com/kitten))
- **TypeScript:** Reference `global.d.ts` using `path` so they can be resolved by TSC ([6399caef63](https://github.com/facebook/react-native/commit/6399caef635b6aadc4c98ec37c9f007f81fa1f79) by [@krystofwoldrich](https://github.com/krystofwoldrich))
- **VirtualizeSectionList:** Fix VirtualizeSectionList generic arguments ([44b0f5560b](https://github.com/facebook/react-native/commit/44b0f5560b285dfd8e28e6056e9434d76734f3fd)) by [@coado](https://github.com/coado)
- Fix generated types in react-native/virtualized-lists being used without opt-in ([c9f2055097](https://github.com/facebook/react-native/commit/c9f20550972db2f94c5970948239312046a66a4e) by [@j-piasecki](https://github.com/j-piasecki))
- Made `DevServerHelper` and its method open so that they can be overridden. ([2a0c1e6a9e](https://github.com/facebook/react-native/commit/2a0c1e6a9e98c19101dc89b9adba4a990cd6902c) by [@chrfalch](https://github.com/chrfalch))
- Wrong `borderBottomEndRadius` on RTL ([68d6ada448](https://github.com/facebook/react-native/commit/68d6ada44893701b6006a6b1753131c7e880a30a) by [@riteshshukla04](https://github.com/riteshshukla04))
- Made function `removeView` open in Kotlin class ([9d11dcd3b0](https://github.com/facebook/react-native/commit/9d11dcd3b06641dc8780043067d6d4fbfcac71d1) by [@chrfalch](https://github.com/chrfalch))
- Fixed codegen breaking when a subset of `modulesConformingToProtocol` fields was specified or when the value was string ([e4ef685dd7](https://github.com/facebook/react-native/commit/e4ef685dd75f09f22b0122e83fc94bc9d2df8a97) by [@j-piasecki](https://github.com/j-piasecki))
- Fixed the generated type definitions for `Animated.FlatList` and `Animated.SectionList` to correctly infer item types. ([9be5ac1010](https://github.com/facebook/react-native/commit/9be5ac101051dd8121a48af1a29a60b7ba0b753e) by [@j-piasecki](https://github.com/j-piasecki))
- Fixed switches correctly reverting to controlled state ([aa8c072870](https://github.com/facebook/react-native/commit/aa8c072870f6f9740e567a0f455c0e500ff1400c) by [@javache](https://github.com/javache))
- Skip cloning `Fragments` in `ListEmptyComponent` to avoid onLayout warning ([2b0189b964](https://github.com/facebook/react-native/commit/2b0189b9649b58dc93ac79ad2bf709fd7bc8f117) by [@mateoguzmana](https://github.com/mateoguzmana))
- Fixed text not updating correctly after changing font scale in settings ([c008604e0a](https://github.com/facebook/react-native/commit/c008604e0a05460b440fcfaded70498594465916) by [@j-piasecki](https://github.com/j-piasecki))
- Do not generate Apple specific files for Android ([e83ece0d17](https://github.com/facebook/react-native/commit/e83ece0d17217c18a9b3dea53f261b9e0a45621a) by [@cipolleschi](https://github.com/cipolleschi))
- Outline now takes into account outline-offset to calculate its border-radius, same as web. ([b47bfcef5f](https://github.com/facebook/react-native/commit/b47bfcef5f85ed1b4d713bec9be76efd1b485d3d) by [@jorge-cab](https://github.com/jorge-cab))
- Throw ParsingException when ReactModule doesn't conform to TurboModule invariants ([c5132f485f](https://github.com/facebook/react-native/commit/c5132f485f6c5af51c6e8133eb5f029a389762dc) by [@GijsWeterings](https://github.com/GijsWeterings))
- Fix TS docs for `contentInsetAdjustmentBehavior` ([24ba7dfe6f](https://github.com/facebook/react-native/commit/24ba7dfe6feaacef76718491b8cb260d05afab9b) by [@steinalex](https://github.com/steinalex))
- Add explicit `folly/dynamic.h` include where it is actually used ([0b1d0e84ee](https://github.com/facebook/react-native/commit/0b1d0e84eed1714e4d5dbf67a01f8c25fd5445d8) by [@mzlee](https://github.com/mzlee))
- Compatibility Check: Allow union changes when the new element is in the middle of the union ([69ccbc3943](https://github.com/facebook/react-native/commit/69ccbc39438d599308b8d98c0dcf72d3bae1bf41) by [@elicwhite](https://github.com/elicwhite))
- Fixed crash in RCTPullToRefreshViewComponentView#updateProps ([fab7fa88e3](https://github.com/facebook/react-native/commit/fab7fa88e3bd3c84a0ffe0c027e14185b037120d) by [@javache](https://github.com/javache))
- Fix New Arch handling of inline views when text truncated ([99f962627f](https://github.com/facebook/react-native/commit/99f962627f1b88b8a48c2b64b1887652f784b624) by [@NickGerleman](https://github.com/NickGerleman))
- Add missing type variation `{login: string, password: string}` to **AlertType** type definition to properly support `login-password` prompt callbacks ([c6a075bcc7](https://github.com/facebook/react-native/commit/c6a075bcc72b984da787a94d30d38426a68cef80) by [@assynu](https://github.com/assynu))
#### Android specific
- **Layout:** Restored the possibility to extend `LayoutAnimationController` ([bca7c5a553](https://github.com/facebook/react-native/commit/bca7c5a55301398beaa6ca35c96ae7ad5426c297) by [@tomekzaw](https://github.com/tomekzaw))
- **TextInput:** Fix broken focus behavior for TextInput in older Android versions (< 9) ([fb62355555](https://github.com/facebook/react-native/commit/fb623555552075793086acdd1ddd0c1e3fba72c4)) by [@joevilches](https://github.com/joevilches)
- Assume full container width when ellipsizing line ([e565c662d7](https://github.com/facebook/react-native/commit/e565c662d7550b143930bf2e646a749bcaea026a) by [@NickGerleman](https://github.com/NickGerleman))
- Fix incorrect clip to padding box on new Background and Border drawables ([989b3f61a0](https://github.com/facebook/react-native/commit/989b3f61a070c68f30d36036925f54cb081da49e) by [@jorge-cab](https://github.com/jorge-cab))
- Can now focus `TextInput` with keyboard ([e00028f6bb](https://github.com/facebook/react-native/commit/e00028f6bb6c19de861f9a25f377295755f3671b) by [@joevilches](https://github.com/joevilches))
- Double selection with dataDetectorType and links ([70aced5eb1](https://github.com/facebook/react-native/commit/70aced5eb17c48e6b7201377e6068cf6558c7460) by [@joevilches](https://github.com/joevilches))
- Correctly Pass `SurfaceID` to `TextLayoutManager` ([6f0a0a5c2c](https://github.com/facebook/react-native/commit/6f0a0a5c2c7d678646be5af9a3c4ccf1ba9c9804) by [@NickGerleman](https://github.com/NickGerleman))
- Sync offset and value from native -> js in separate fields ([2efe8094c0](https://github.com/facebook/react-native/commit/2efe8094c0d4251213b5305ddaba11aaf76bfd56) by Martin Booth)
- Ensure latest offset value is synced to native ([3e3094c3dd](https://github.com/facebook/react-native/commit/3e3094c3dd57a83e167ffd163093c41f4cf6d8c5) by Martin Booth)
- Fix `BatchExecutionOpCodes.OP_CODE_SET_ANIMATED_NODE_OFFSET` mapping to call setAnimatedNodeOffset (rather than setAnimatedNodeValue) ([9efcdc091c](https://github.com/facebook/react-native/commit/9efcdc091c81c6ae6118ed78791096ca07fe0140) by Martin Booth)
- Fix fetch of content scheme uris failing on Android. ([87c54a7eba](https://github.com/facebook/react-native/commit/87c54a7ebab5530de4cec359440d2c5945244e07) by [@giantslogik](https://github.com/giantslogik))
- Fix Non-uniform border colors on TextInput ([42251ec0ed](https://github.com/facebook/react-native/commit/42251ec0eddaf42d0a89caeb75a92ef34c517a95) by [@NickGerleman](https://github.com/NickGerleman))
- `Settings.Global.TRANSITION_ANIMATION_SCALE` accepts comma as decimal separator ([8b11970adb](https://github.com/facebook/react-native/commit/8b11970adb7d09bc9a4be78cfaee04cb7e084177) by [@vzaidman](https://github.com/vzaidman))
- Fix `selectable` prop not working correctly on initial render (old-arch) ([5ed486cc8f](https://github.com/facebook/react-native/commit/5ed486cc8fb4aeef12c92a04619cc668427eee75) by [@mateoguzmana](https://github.com/mateoguzmana))
- Fix keyboard navigation on lists with `removeClippedSubviews` enabled ([bbff754db3](https://github.com/facebook/react-native/commit/bbff754db370a2d69926048e384ccaa6ff97c230) by [@jorge-cab](https://github.com/jorge-cab))
- Fix translucent borders on Android overlapping bug ([57779cebf0](https://github.com/facebook/react-native/commit/57779cebf066ee420fa861df8269e875ab1d21f4) by [@jorge-cab](https://github.com/jorge-cab))
- Fix keyboard navigation on lists with `removeClippedSubviews` enabled ([fc9f2fe0ea](https://github.com/facebook/react-native/commit/fc9f2fe0ea20d6e73be8fdf4eb47affaddea6427) by [@jorge-cab](https://github.com/jorge-cab))
- Fix inset shadow edge cases ([0929697a6d](https://github.com/facebook/react-native/commit/0929697a6df9ab5a3654c0077bb95427eae77b4c) by [@joevilches](https://github.com/joevilches))
- Fix crash when TurboModule event emitters are used on arm32 ([6e701ce080](https://github.com/facebook/react-native/commit/6e701ce080122f5b60633e3475651a0d2d9fe54a) by [@javache](https://github.com/javache))
- Ensure Linking.sendIntent promises resolve or reject ([6609ba98e5](https://github.com/facebook/react-native/commit/6609ba98e5f738cb8746c7ccfda1072cfa05f986) by [@Abbondanzo](https://github.com/Abbondanzo))
- Fix crash when passing null initialProps ([ee85957fd6](https://github.com/facebook/react-native/commit/ee85957fd68669d8887d0e03b96f91b807bc99ac) by [@javache](https://github.com/javache))
- Prevent onPointerLeave from dispatching during button presses ([833ab6fe1b](https://github.com/facebook/react-native/commit/833ab6fe1b252244bf7d8a2f158fa13470c27e76) by [@Abbondanzo](https://github.com/Abbondanzo))
- Fixed crash when event is emitted after instance is shutdown ([6dd5a838c3](https://github.com/facebook/react-native/commit/6dd5a838c340aabc1ad385ccfc5cc3b478d5fda3) by [@javache](https://github.com/javache))
- Removed deprecated EventDispatcher#receiveTouches ([7056d20984](https://github.com/facebook/react-native/commit/7056d20984dab1d0c965684acc2d7a2b13c66fac) by [@javache](https://github.com/javache))
- Fixes memory leak - Close a view leak due to lossy onAnimationEnd callback ([313d7d79d4](https://github.com/facebook/react-native/commit/313d7d79d4257efcce5f3a555e335a74ce56df53) by [@knappam](https://github.com/knappam))
- Fix `RNCodegen.js` for generating ComponentDescriptors.cpp ([d8b0e050c4](https://github.com/facebook/react-native/commit/d8b0e050c47ee7078ccc26bbabb4cf37d3ac9a37) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- Fix keyboard navigation on lists with `removeClippedSubviews` enabled ([c068c599c6](https://github.com/facebook/react-native/commit/c068c599c641491e735caf79e4e60a0fb3c04f83) by [@jorge-cab](https://github.com/jorge-cab))
- Fix occasional syncronization issue in ScrollView when rendering dynamic content with content offset ([8f209acb3f](https://github.com/facebook/react-native/commit/8f209acb3f7338448b0b7a26224fc4b2cfb722db) by [@fabriziocucci](https://github.com/fabriziocucci))
- Fix crash with nested FlatLists and fix edge case with nested views ([9526406fc2](https://github.com/facebook/react-native/commit/9526406fc24ed0df10c63c54869814a26d69ece0) by [@jorge-cab](https://github.com/jorge-cab))
- Made `ReactHostImpl.java` nullsafe ([568ba647cf](https://github.com/facebook/react-native/commit/568ba647cfbeaa676a84366a981a1cad65297893) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactApplicationContext.java` as nullsafe ([f86de9724b](https://github.com/facebook/react-native/commit/f86de9724b71b2e1fef6bd2d3447eccbbe7c1f1f) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `Inspector.java` as nullsafe ([8d72e5eeb9](https://github.com/facebook/react-native/commit/8d72e5eeb91911551b8fd7764e2b0d37d1d920aa) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JavaScriptModuleRegistry.java` as nullsafe ([bf911e1f92](https://github.com/facebook/react-native/commit/bf911e1f92438d27e20a0fe2bb4bec1a0d3c2838) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSBundleLoader.java` as nullsafe ([9d21f97ebe](https://github.com/facebook/react-native/commit/9d21f97ebeabe1f89e105280cb95fd5a5c6b2a56) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSONArguments.java` as nullsafe ([12b22dc57c](https://github.com/facebook/react-native/commit/12b22dc57cffe4669ea04ef751704aa56fe63d36) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ModuleSpec.java` as nullsafe ([1e4d016950](https://github.com/facebook/react-native/commit/1e4d01695000fba0605c7e4be04d825a570820f3) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactContextBaseJavaModule.java` as nullsafe ([27179a7cf2](https://github.com/facebook/react-native/commit/27179a7cf27463a87111454ba17e117f5898aae7) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactMarker.java` as nullsafe ([911c11f129](https://github.com/facebook/react-native/commit/911c11f1298c03cecf5777b052aa0139bf66adfc) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `NativeModule.java` as nullsafe ([005c11ea0a](https://github.com/facebook/react-native/commit/005c11ea0a1fafb62c3fbdea6c84a73789ea10b6) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `FabricUIManager.java` nullsafe ([97ddd17e5e](https://github.com/facebook/react-native/commit/97ddd17e5eaf38ac4138d96520cbdeeb9da98555) by [@javache](https://github.com/javache))
- Made `TextAttributeProps.java` nullsafe ([623dcc3902](https://github.com/facebook/react-native/commit/623dcc39025bf4d3e82d590637831e380f412397) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextViewManager.java` nullsafe ([1929ebd00e](https://github.com/facebook/react-native/commit/1929ebd00ee6a0429ea30c4ee940e57dd443f43b) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextView.java` nullsafe ([021491bf51](https://github.com/facebook/react-native/commit/021491bf51c7cc086aa5800e5548863bb14ad723) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextShadowNode.java` nullsafe ([3857aa8baf](https://github.com/facebook/react-native/commit/3857aa8bafb0e440a7a6590641b6c71284fa44d4) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactTextAnchorViewManager.java` nullsafe ([e04b5b3ecf](https://github.com/facebook/react-native/commit/e04b5b3ecf2d692d9a0f95db298ecb2a67a61eef) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReactBAseTeextShadowNode.java` nullsafe ([dbb5a23cad](https://github.com/facebook/react-native/commit/dbb5a23cadd5cfa0c0ad4dafaa17ee4992662b05) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ViewManagerRegistry.java` nullsafe ([af516266db](https://github.com/facebook/react-native/commit/af516266dbfbf72fb9954864931951bac702f4c8) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `TouchTargetHelper.java` nullsafe ([02fc3bd58c](https://github.com/facebook/react-native/commit/02fc3bd58c3da3e09150180fd9f8b04192b45bfd) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ThemedReactContext.java` nullsafe ([552338ce9f](https://github.com/facebook/react-native/commit/552338ce9ffb32500fb30c227953d5e426fc3f7f) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSPointerDispatcher.java` nullsafe ([c025bf6c72](https://github.com/facebook/react-native/commit/c025bf6c72c4d17247e11acc121f04710411b303) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `PromiseImpl.java` nullsafe ([4c8ea858a5](https://github.com/facebook/react-native/commit/4c8ea858a53a68af688c5a5755f4104c674fee0e) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `NativeModuleRegistry.java` nullsafe ([8aaccef2ee](https://github.com/facebook/react-native/commit/8aaccef2ee2d67756ce54f5819f0c3d8eab1fbf6) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ModuleHolder.java` nullsafe ([d97aba5cd7](https://github.com/facebook/react-native/commit/d97aba5cd72a7b42a279a1ef4e8eb450d9f68cd5) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JsonWriterHelper.java` nullsafe ([30da6ca84a](https://github.com/facebook/react-native/commit/30da6ca84a704d38c03a62da43597ce769a8bf3a) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DynamicFromObject.java` nullsafe ([a0e3490ff5](https://github.com/facebook/react-native/commit/a0e3490ff5ca9f1db6fadff1e4e1bfa666fc3a50) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DynamicFromMap.java` nullsafe ([dcb2dbb2c3](https://github.com/facebook/react-native/commit/dcb2dbb2c383c27f3e5ba83adcd40f2e77e0009c) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DynamicFromArray.java` nullsafe ([3665046c14](https://github.com/facebook/react-native/commit/3665046c140ecebb12f4f136fe3ca5386f20bffb) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BaseJavaModule.java` nullsafe ([77ea9fd1f8](https://github.com/facebook/react-native/commit/77ea9fd1f844f6b6fe6eba2ed1ac61dd8317b3e4) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `Arguments.java` nullsafe ([c8f01ffc3e](https://github.com/facebook/react-native/commit/c8f01ffc3ea2271e166ea6b8fecf53aa950b4c42) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `FabricUIManager.java` nullsafe ([ea2fbd453f](https://github.com/facebook/react-native/commit/ea2fbd453f319279d91f6770c14d11165223b68d) by [@javache](https://github.com/javache))
- Made `NetworkingModule.java` nullsafe ([9b30cdd008](https://github.com/facebook/react-native/commit/9b30cdd00881f52c6437d00048670041f5758b5d) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BlobModule.java` nullsafe ([c80ac8fcf2](https://github.com/facebook/react-native/commit/c80ac8fcf224d3f815b5182d2fb7164865cd6913) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `TurboModuleManager.java` nullsafe ([419b68f38a](https://github.com/facebook/react-native/commit/419b68f38aa31d1d7d2de939a47516143adaafdf) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `TurboModuleInteropUtils.java` nullsafe ([90184d20e1](https://github.com/facebook/react-native/commit/90184d20e1e5c128c532bd4a1f15bb3074bcd83a) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `Task.java` nullsafe ([eba9ebe0a9](https://github.com/facebook/react-native/commit/eba9ebe0a9145adb718b0ef522ad490b67593bac) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `ReconnectingWebSocket.java` nullsafe ([ff6601bfb7](https://github.com/facebook/react-native/commit/ff6601bfb78600e3ded170d4ee214a43175d0fc5) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DialogModule.java` nullsafe ([4e7d09ceff](https://github.com/facebook/react-native/commit/4e7d09ceff35757ffe29368701806d91c7c75fd1) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `FileReaderModule.java` nullsafe ([8f5aaf13b2](https://github.com/facebook/react-native/commit/8f5aaf13b2f67f84d8e189b175d9a830a5ab446c) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BlobProvider.java` nullsafe ([020db409a2](https://github.com/facebook/react-native/commit/020db409a2c05a99748523db2f3df08051bcc3af) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `MountingManager.java` nullsafe ([7aaf0cb3f1](https://github.com/facebook/react-native/commit/7aaf0cb3f1428bfd78b4a399b2ef235eee40f3c0) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `MountItemDispatcher.java` nullsafe ([e957bdb8fa](https://github.com/facebook/react-native/commit/e957bdb8fa8940ab405405098df1878037dd1314) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DevSupportManagerBase.java` nullsafe ([adbcaef1e1](https://github.com/facebook/react-native/commit/adbcaef1e1632eff29570cce878b65594096a694) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `BundleDownloader.java` nullsafe ([61d4b04159](https://github.com/facebook/react-native/commit/61d4b041593bd94a318fc71f8691711ff9d15af5) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DebugOverlayController.java` nullsafe ([e9e4c2adaf](https://github.com/facebook/react-native/commit/e9e4c2adaf0cf9e20734bfc54685b228d45b5d66) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `CxxInspectorPackagerConnection.java` nullsafe ([fd23a08a3a](https://github.com/facebook/react-native/commit/fd23a08a3a34cbfb4ff8d7215acde323cb4c943a) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `DevServerHelper.java` nullsafe ([311cef3c0d](https://github.com/facebook/react-native/commit/311cef3c0df8f112e4bfae4663ba9dd04e465d5e) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `JSDebuggerWebsocketClient.java` nullsafe ([3289569747](https://github.com/facebook/react-native/commit/3289569747f59aa3bf997758ccd2cd4d3451c8fa) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `MultipartStreamReader.java` nullsafe ([b40b1e679e](https://github.com/facebook/react-native/commit/b40b1e679e3a2622b5aeff940106888c41ffbdd9) by [@GijsWeterings](https://github.com/GijsWeterings))
- Made `StackTraceHelper.java` nullsafe ([14de1c1cba](https://github.com/facebook/react-native/commit/14de1c1cba7f49ff66c15eb80e422cbddf2c476d) by [@GijsWeterings](https://github.com/GijsWeterings))
#### iOS specific
- Skip codegen for selectively disabled libraries in react-native.config.js ([be8595b18a](https://github.com/facebook/react-native/commit/be8595b18a46635bf679d8e7473f2960c33530fa) by [@ismarbesic](https://github.com/ismarbesic))
- Fixed adding child views to a native view using the interop layer ([d53a60dd23](https://github.com/facebook/react-native/commit/d53a60dd23c5df8afca058a867c50df8b61f62e2) by [@chrfalch](https://github.com/chrfalch))
- Fix codegen crawling all library code with `componentProvider` defined in config ([65aa819811](https://github.com/facebook/react-native/commit/65aa8198116e1d23175358f75c9b23774d3522b4) by [@kkafar](https://github.com/kkafar))
- Skip codegen for selectively disabled libraries in react-native.config.js ([7681036537](https://github.com/facebook/react-native/commit/7681036537d8759673881843a9a8f6f5a1ae93e0) by [@aattola](https://github.com/aattola))
- Fix codegen extracting `.class` from complex component classes ([f2b19608cc](https://github.com/facebook/react-native/commit/f2b19608cca36c118786b4e3d22bf2468fced86d) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- Ignore `build/` and `DerivedData/` directories when reading `.plist` files. ([c783128f6e](https://github.com/facebook/react-native/commit/c783128f6e8541bb0b13c4f5c634e790ca854c23) by [@tjzel](https://github.com/tjzel))
- Remove deprecated ATOMIC_VAR_INIT macro in RCTProfile.m ([21bf7cf6cf](https://github.com/facebook/react-native/commit/21bf7cf6cf043de323c40edc001add4cd21256ce) by [@rmaz](https://github.com/rmaz))
- Fix disappearing redbox on initial load of an invalid bundle. ([4cc9db1cd5](https://github.com/facebook/react-native/commit/4cc9db1cd501b019e90bb540ce836e2a2c2bf2ff) by [@aleqsio](https://github.com/aleqsio))
- Properly check for debug schemes when building hermes from source ([bef5cc1007](https://github.com/facebook/react-native/commit/bef5cc100771c3b8bc5dffa565b7c24fef3eb34d) by [@WoLewicki](https://github.com/WoLewicki))
- Put back the `folly_compiler_flag` function to make libraries install pods ([3b17cdb643](https://github.com/facebook/react-native/commit/3b17cdb6435dcb975685672be0d29d2f73bf368f) by [@cipolleschi](https://github.com/cipolleschi))
- Make fmt and SocketRocket Swift friendly ([3f41fe2948](https://github.com/facebook/react-native/commit/3f41fe29488bbcf4fba620b18cace90de737c197) by [@cipolleschi](https://github.com/cipolleschi))
- Fix "on" and "off" announcements on `Switch` ([db6e000023](https://github.com/facebook/react-native/commit/db6e0000234530979594abf81c6bd0521b561068) by [@joevilches](https://github.com/joevilches))
- Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture ([5fd5188172](https://github.com/facebook/react-native/commit/5fd51881727b2d86f87abf04db032940ac0ec8c4) by [@j-piasecki](https://github.com/j-piasecki))
- Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call. ([fa9d082747](https://github.com/facebook/react-native/commit/fa9d082747cf286a112b869e763afff6df6ec9d4) by [@RSNara](https://github.com/RSNara))
- Generate `ReactCodegen.podspec` only for apps. ([18a7c8d57c](https://github.com/facebook/react-native/commit/18a7c8d57c5843267756fd9d2137964370dc5780) by [@cipolleschi](https://github.com/cipolleschi))
- Box shadows on iOS are faster ([52173ab701](https://github.com/facebook/react-native/commit/52173ab701094dcc84399cdf8a8769f5242de27d) by [@joevilches](https://github.com/joevilches))
- Allow links that encorporate entire <Text> to be keyboard accessible ([83fae860df](https://github.com/facebook/react-native/commit/83fae860df8d1ac2d89b3cddf8c595b2cc88a74f) by [@joevilches](https://github.com/joevilches))
- Avoid build failure on Catalyst (`x86_64`) ([0f534293af](https://github.com/facebook/react-native/commit/0f534293afe9981e463dae97f7ccb4c7abf0589c) by [@cipolleschi](https://github.com/cipolleschi))
- `ParagraphState` is correctly deallocated when recycling Text ([a5a71f115f](https://github.com/facebook/react-native/commit/a5a71f115ff9fb8156968451f11874a3c3096a4f) by [@javache](https://github.com/javache))
- Fixed accessible prop no-opts on Image components ([e3f7c8f456](https://github.com/facebook/react-native/commit/e3f7c8f45617d682c5934d4eeee8a7ada4689ce5) by [@jorge-cab](https://github.com/jorge-cab))
- Avoid race condition crash in `RCTDataRequestHandler` invalidate ([44810f7498](https://github.com/facebook/react-native/commit/44810f749841b8340cc06fecbf861c6390751c29) by [@zhongwuzw](https://github.com/zhongwuzw))
- Correctly announce "link" on nested text if its the entire text element ([bffb414291](https://github.com/facebook/react-native/commit/bffb414291cfbd3d6e3e51448dd68b7bddddf658) by [@joevilches](https://github.com/joevilches))
- Fix animated images missing from offscreen render ([d1a090b0af](https://github.com/facebook/react-native/commit/d1a090b0afe94ed5d5f55cf0b6f0ecc044ac332e) by [@NickGerleman](https://github.com/NickGerleman))
- Selection range not respected when changing text or selection when selection is forced ([d32ea66e6a](https://github.com/facebook/react-native/commit/d32ea66e6a945dd84092532401b265b12d482668) by Olivier Bouillet)
- Check .pnpm folder when looking for third-party components. ([91d034533e](https://github.com/facebook/react-native/commit/91d034533e9f52232b351bb88b2ae7b48704e68f) by [@kirill3333](https://github.com/kirill3333))
- Fixed touch events not being dispatched to ScrollView's children when they overflow the content container ([6ecd9a43f1](https://github.com/facebook/react-native/commit/6ecd9a43f16e76771e2f970972bcd067aa570cf7) by [@j-piasecki](https://github.com/j-piasecki))
- Corrected the path from `"$(PODS_ROOT)/fas_float/include"` to `"$(PODS_ROOT)/fast_float/include"` in the `HEADER_SEARCH_PATHS` configuration. ([01881017d3](https://github.com/facebook/react-native/commit/01881017d3d446355945779547215408309e6a36) by [@DorianMazur](https://github.com/DorianMazur))
- Fix Recycling of Animated Images ([1a9adfba16](https://github.com/facebook/react-native/commit/1a9adfba162151a3e8c2e7a5248e6b17e2eef195) by [@NickGerleman](https://github.com/NickGerleman))
- Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call. ([f4d99d6a23](https://github.com/facebook/react-native/commit/f4d99d6a23a08c2ef2c2fff78dc966961608683b) by [@RSNara](https://github.com/RSNara))
- RCTDeviceInfo: fix crash due to failure to get AccessibilityManager ([ac23323da1](https://github.com/facebook/react-native/commit/ac23323da1bda2ce271797aa58dd74ffb0a5992f) by Adam Ernst)
## v0.79.4
### Fixed
- **Codegen:** Backports fix: exclusion of selectively disabled libraries from codegen generation ([3acfe01382](https://github.com/facebook/react-native/commit/3acfe01382e67b16386bb04f7730abc479fec1cc) by [@cipolleschi](https://github.com/cipolleschi))
- **Flow:** Publish top-level Flow types for `react-native` ([50667eceb1](https://github.com/facebook/react-native/commit/50667eceb1be4771375d6a3cc2f4e42d4d8aad3a) by [@aswinandro](https://github.com/aswinandro))
- **Runtime:** Disabling `updateRuntimeShadowNodeReferencesOnCommit` by default. ([2cd074d77a](https://github.com/facebook/react-native/commit/2cd074d77a706f4fe4396ffdf87408f781e935a4) by [@lenaic](https://github.com/lenaic))
#### Android specific
- **TextInput:** Fix broken focus behavior for TextInput in older Android versions (< 9) ([0ebaaed281](https://github.com/facebook/react-native/commit/0ebaaed281fcfa01b20a17a461c1d0b489a7f0a2) by [@joevilches](https://github.com/joevilches))
#### iOS specific
- **Dimensions:** Fix Dimensions not changing when orientation changes ([235ac2cca0](https://github.com/facebook/react-native/commit/235ac2cca0b173934d329f3a797f136a219d315f) by [@riteshshukla04](https://github.com/riteshshukla04))
## v0.79.3
### Fixed
- **Runtime:** Align timer IDs and timer function argument error handling with web standards. ([480a4642e5](https://github.com/facebook/react-native/commit/480a4642e5a644becf1c477d3d239f9b57efff3a) by [@kitten](https://github.com/kitten))
- **Typescript:** Reference `global.d.ts` using path not types so they can be resolved by TSC ([af21f260a1](https://github.com/facebook/react-native/commit/af21f260a1cee460d11fc9c292aaa9f602cbd5a4) by [@krystofwoldrich](https://github.com/krystofwoldrich))
#### Android specific
- **Runtime:** Fixes issue with z-indexed sibling removal ([34ae9facd5](https://github.com/facebook/react-native/commit/34ae9facd52b5da28b5ced22110532bbcdad2cec) by [@rozele](https://github.com/rozele))
- **Style:** Wrong borderBottomEndRadius on RTL ([68d6ada448](https://github.com/facebook/react-native/commit/68d6ada44893701b6006a6b1753131c7e880a30a) by [@riteshshukla04](https://github.com/riteshshukla04))
#### iOS specific
- **Cocoapods:** enable DEFINES_MODULE in React-jsc ([c8fcac2765](https://github.com/facebook/react-native/commit/c8fcac2765e0f79f0e7bb3a422a65698aec62536) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Allow the .pnpm folder to be discovered during code generation ([ed7b4d86ab2b77b4cba6c2105e35047ac68c93e1](https://github.com/facebook/react-native/commit/ed7b4d86ab2b77b4cba6c2105e35047ac68c93e1) by [@kirill3333](https://github.com/kirill3333))
- **Codegen:** Exclude selectively disabled libraries from codegen generation ([e5c089669a](https://github.com/facebook/react-native/commit/e5c089669a82bd2075c1657d0291aa32a6b61966) by [@cipolleschi](https://github.com/cipolleschi))
- **Interop Layer:** Fixed adding child views to a native view using the interop layer ([d53a60dd23](https://github.com/facebook/react-native/commit/d53a60dd23c5df8afca058a867c50df8b61f62e2) by [@chrfalch](https://github.com/chrfalch))
- **RedBox:** Fix disappearing redbox on initial load of an invalid bundle. ([4cc9db1cd5](https://github.com/facebook/react-native/commit/4cc9db1cd501b019e90bb540ce836e2a2c2bf2ff) by [@aleqsio](https://github.com/aleqsio))
- **Switch:** Fixes Switch component incorrectly renders as toggled on even though value prop is hardcoded to false ([8d42fc40bc](https://github.com/facebook/react-native/commit/8d42fc40bc1b31efa7913198e23f39ac46532dc7) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.79.2
### Added
- **Runtime:** Add useShadowNodeStateOnClone and updateRuntimeShadowNodeReferencesOnCommit ([22a4e060d5](https://github.com/facebook/react-native/commit/22a4e060d5cf6b31d940f39f6e4776c14192d240) by [@lenaic](https://github.com/lenaic))
### Fixed
- **Blob:** Make sure that URLs are parsed following the node specs ([6d8a02a666](https://github.com/facebook/react-native/commit/6d8a02a66606bd0a3931626aff0e76f7c3b31caa) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Fix codegen ImageSource require ([4d7c4bd6e8](https://github.com/facebook/react-native/commit/4d7c4bd6e8bf79f069970ca4f54ae3f4c92b80e0) by [@jakex7](https://github.com/jakex7))
## v0.79.1
### Changed
#### Android specific
- **DevSupport:** Change `defaultJSExceptionHandler`'s type to `JSExceptionHandler` on the `ReleaseDevSupportManager` ([9eb75d4bd5](https://github.com/facebook/react-native/commit/9eb75d4bd553bdc166118110d095b98bef811d4e) by [@alanjhughes](https://github.com/alanjhughes))
#### iOS specific
- **TextInput:** Typing into TextInput now will not cause the caret position to update to the beginning when a zero-length selection is set. ([7771317e5c](https://github.com/facebook/react-native/commit/7771317e5cf49bda65275ea1149160a45c607803) by [@ouchuan](https://github.com/ouchuan))
### Fixed
#### Android specific
- **Codegen:** Do not generate Apple specific file for Android ([b2bacc4a9f](https://github.com/facebook/react-native/commit/b2bacc4a9f3b97a4f59126a229477d3c952b3f44) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **Codegen:** Do not generate ReactCodegen.podspec for libraries ([f3c280442d](https://github.com/facebook/react-native/commit/f3c280442dc49e13b24baa2348f6b8c802045178) by [@cipolleschi](https://github.com/cipolleschi))
## v0.79.0
### Added
- **Codegen:** Allow UnsafeMixed as Array value in codegen ([abd7259de4](https://github.com/facebook/react-native/commit/abd7259de4c11f2615788e8bb258b0459c57eeed) by [@javache](https://github.com/javache))
- **DevX:** Add inspector proxy events for debugger heartbeat (sampled) and abandoned connections ([84f3cf95ea](https://github.com/facebook/react-native/commit/84f3cf95ea9ad17ba5c0014ea35d0b8e98af56fe) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** Add inspector proxy info logs in regards to CDP connection to device and DevTools ([29419ce8f0](https://github.com/facebook/react-native/commit/29419ce8f095e3d763adb5073140b115fecb66e2) by [@vzaidman](https://github.com/vzaidman))
- **Flow:** Added explicit type for _lastNativeRefreshing and changed React import syntax in RefreshControl ([a24f9ef825](https://github.com/facebook/react-native/commit/a24f9ef825a0291b7fec20d9ab190c67c94f3260) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for _memoizedRenderer and changed React and View import in FlatList ([b634fa1edb](https://github.com/facebook/react-native/commit/b634fa1edb56bd01724d24dee4b0243c68ddc4d2) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for argument in _captureRef in SectionList ([e31ff4212b](https://github.com/facebook/react-native/commit/e31ff4212b62e4b7dc3ed746d790645e893fbd11) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for Symbol.iterator in URLSearchParams ([89af3e804f](https://github.com/facebook/react-native/commit/89af3e804f2da3874bc1c20ff1e3ba892efe3ea3) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type to supported commands in TextInputNativeCommands ([1126bbb149](https://github.com/facebook/react-native/commit/1126bbb1493dbea04addfdcc809ace01aecab604) by [@coado](https://github.com/coado))
- **Flow:** Added type for exported object in AssetRegistry ([44d84f2af6](https://github.com/facebook/react-native/commit/44d84f2af60392684d0ff4b4e65ae797fad5b456) by [@coado](https://github.com/coado))
- **Flow:** Added types in TouchHistoryMath ([b9df812b67](https://github.com/facebook/react-native/commit/b9df812b67a22d459e85511962ac507a80f67f29) by [@coado](https://github.com/coado))
- **Infra:** Open Sourcing React Native's Compatibility Check ([60e3921f9c](https://github.com/facebook/react-native/commit/60e3921f9cf0a91edd54c269f3157d81d0d4467a) by [@elicwhite](https://github.com/elicwhite))
- **Layout:** Linear gradient color transition hint syntax and `px` unit support. ([cc89ddd50b](https://github.com/facebook/react-native/commit/cc89ddd50bed869013082ad98eb0555a386cf7c9) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **Layout:** Support stylistic sets for fontVariant ([c09b71b990](https://github.com/facebook/react-native/commit/c09b71b99038bacfbc2a1dca521a9220afa3dcb4) by [@LeviWilliams](https://github.com/LeviWilliams))
- **LogBox:** Add full owner stack support to React Native ([967ef32154](https://github.com/facebook/react-native/commit/967ef321548321c184432221e38c2f0394d4e264) by [@rickhanlonii](https://github.com/rickhanlonii))
- **LogBox:** Add owner stack code frames to LogBox ([0affa544c3](https://github.com/facebook/react-native/commit/0affa544c334aa6804cc787324decac45ba82cce) by [@rickhanlonii](https://github.com/rickhanlonii))
- **Metro:** Add opt in for legacy Metro log streaming via `--client-logs` flag ([0d66c524cf](https://github.com/facebook/react-native/commit/0d66c524cfdf4f3abd742b3b8bc6b39f24f7c214) by [@huntie](https://github.com/huntie))
- **TextInput:** Adds the escape key to the key press event handler payload. ([e566c1ec06](https://github.com/facebook/react-native/commit/e566c1ec067188f36f36d7ffd087e7ac06c69617) by [@sbuggay](https://github.com/sbuggay))
#### Android specific
- **Docs:** Improve ToastAndroid jsdocs ([299a7a959d](https://github.com/facebook/react-native/commit/299a7a959d34cda9900acb7318aabf7262acc23e) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Gradle:** Add support for Gradle Configuration caching ([e41887e62f](https://github.com/facebook/react-native/commit/e41887e62fcaf5a8d6bfc2817f88298b49d1b7a5) by [@cortinico](https://github.com/cortinico))
- **Initialization:** On `DefaultNewArchitectureEntryPoint` class add property to specify the desired release level for an application ([19c18eb995](https://github.com/facebook/react-native/commit/19c18eb9957f711ab63a9e3a334972389162bde8) by [@jorge-cab](https://github.com/jorge-cab))
- **Initialization:** Set ReactSurface and ReactRootView to ReactDelegate when created via ReactNavigationActivityDelegate ([a302fbcaaf](https://github.com/facebook/react-native/commit/a302fbcaaf69c8f019a212f7b9b839fa1ddd6b2f) by Maddie Lord)
#### iOS specific
- **Initialization:** Encapsulate device info listeners ([7dc85d0e97](https://github.com/facebook/react-native/commit/7dc85d0e9765e7f633285843506b8832ff13db9f) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Inform users about JSC being moved to a different repo ([13177b3025](https://github.com/facebook/react-native/commit/13177b3025d06c93fb2634a19e0033b8ac4f67a7) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Js runtime C API for Swift ([a6607c07cd](https://github.com/facebook/react-native/commit/a6607c07cda6bb24c12b41761598b84ce8e028cd) by [@okwasniewski](https://github.com/okwasniewski))
- **Runtime:** Added custom load js block in bridge mode ([1e9ac296a5](https://github.com/facebook/react-native/commit/1e9ac296a59f3698ca656ef0161e93ba9dc941c8) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Missing nonnull annotations for RCTArchConfiguratorProtocol, RCTUIConfiguratorProtocol.h ([0141a44026](https://github.com/facebook/react-native/commit/0141a44026a62074d1288963d243a55216c2e4d7) by [@okwasniewski](https://github.com/okwasniewski))
- **TextInput:** Add support for `numberOfLines` prop on `TextInput` ([dcaa33e6d9](https://github.com/facebook/react-native/commit/dcaa33e6d9d59b7d32bbdc14a91b297b6d68cee1) by [@j-piasecki](https://github.com/j-piasecki))
### Breaking
- **APIs:** Deep imports to modules inside React Native libraries with `require` syntax will now require to append an explicit `.default`. Here the list of affected modules:
- `Libraries/Alert` and `Libraries/ActionSheetIOS` ([c89c5d7e3d](https://github.com/facebook/react-native/commit/c89c5d7e3d981e5e11ae926bdd83567cbe61201a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/BatchedBridge` and `Libraries/AppState` ([135277ace1](https://github.com/facebook/react-native/commit/135277ace118b1fbc11e222624f871221d1a3b72) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Blob` ([9a70bc0418](https://github.com/facebook/react-native/commit/9a70bc041889d961c2c5ee3f58d6a135111bc0a4) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/BugReporting`, `Libraries/vendor`, `Libraries/Vibration` and `Libraries/YellowBox` ([09700327f7](https://github.com/facebook/react-native/commit/09700327f7294ed5242fb6af7804e124183ebc64) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([9eeef22a67](https://github.com/facebook/react-native/commit/9eeef22a67ff74ccc2d20647624bee26211a3ab5) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([aac312da8e](https://github.com/facebook/react-native/commit/aac312da8e23b865027e89a93ecb9cc89bfb9860) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([ce412746b1](https://github.com/facebook/react-native/commit/ce412746b1635dce3162eb798f59f604dd1bbb03) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([da695f3a20](https://github.com/facebook/react-native/commit/da695f3a2084f9742d2c75e1b6c5dfa0dba23580) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/DevMenu` ([ce84922236](https://github.com/facebook/react-native/commit/ce849222365a5990b0127fe62739cb2794b31568) by [@j-piasecki](https://github.com/j-piasecki))
- `Libraries/EventEmitter` and `Libraries/Image/*.js` ([8783196ee5](https://github.com/facebook/react-native/commit/8783196ee540f8f78ce60ad20800338cc7645194) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Interaction` ([bdc23fa2b4](https://github.com/facebook/react-native/commit/bdc23fa2b44401c0c6e66d8cf9a0df542ee2c871) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/LayoutAnimation` and `Libraries/Linking` ([4d6785bdb5](https://github.com/facebook/react-native/commit/4d6785bdb53a94d650364ef7b5821fab16c39ae3) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Lists` ([e767dc3458](https://github.com/facebook/react-native/commit/e767dc3458c6665e9f63cf0723f12c9beab6724a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Modal` and `Libraries/Network` ([28945c68da](https://github.com/facebook/react-native/commit/28945c68da056ab2ac01de7e542a845b2bca6096) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/PermissionsAndroid` and `Libraries/PushNotificationIOS` ([e74246bd66](https://github.com/facebook/react-native/commit/e74246bd66fd434cefc8a5a0cc2b3ae7ea725816) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/ReactNative` ([c93bd436a5](https://github.com/facebook/react-native/commit/c93bd436a57c760461a269aced681854e5dd3f13) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/StyleSheet` ([4f20362b07](https://github.com/facebook/react-native/commit/4f20362b07c0b3daa14094a4b5d0dc41e2c956ca) by [@j-piasecki](https://github.com/j-piasecki))
- `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` ([156ee5bee7](https://github.com/facebook/react-native/commit/156ee5bee7d2588399f2b8c19fa01ce40b8335d8) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` ([1be7e1a95f](https://github.com/facebook/react-native/commit/1be7e1a95fed16c46767a7907ac864d5170ba540) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/BackHandler`, `Utilities/DevLoadingView.js` and `Utilities/HMRClient*.js` ([827a847791](https://github.com/facebook/react-native/commit/827a8477912f56e3d0d2b50007a4c06a6468a0bc) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/differ/...` ([2b30aa5cc8](https://github.com/facebook/react-native/commit/2b30aa5cc8fef42cf8bc110b8d48a201a3dc855a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/Platform` ([d98116aa44](https://github.com/facebook/react-native/commit/d98116aa44e4b90ccb19fd895433918396b0b932) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities` ([52ffda7e55](https://github.com/facebook/react-native/commit/52ffda7e55cf8330905d57869c0bb3b5793c0e58) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/WebSocket` ([7df73eebdc](https://github.com/facebook/react-native/commit/7df73eebdc9716819d59a27e4bc783cb853c9775) by [@iwoplaza](https://github.com/iwoplaza))
- `react-native/virtualized-lists` ([1cf4c84ba0](https://github.com/facebook/react-native/commit/1cf4c84ba0f6f630d55ba0bebde122d742c419e8) by [@j-piasecki](https://github.com/j-piasecki))
- `StyleSheet/` ([e4d969a4ab](https://github.com/facebook/react-native/commit/e4d969a4ab71693f38837271356361a3d9df8c5d) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/binaryToBase64`, `Utilities/DevSettings`, `Utilities/PolyfillFunctions` and `Utilities/RCTLog` ([152587cda0](https://github.com/facebook/react-native/commit/152587cda06ec3bb2274ec0182114c85c41507d3) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/deepFreezeAndThrowOnMutationInDev`, `Utilities/defineLazyObjectProperty`, `Utilities/DeviceInfo` and `Utilities/FeatureDetection` ([028c0b36f6](https://github.com/facebook/react-native/commit/028c0b36f637b31d013bab88e0c834ea8174b4e1) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` and `Utilities/SceneTracker.js` ([fc6ca26d3f](https://github.com/facebook/react-native/commit/fc6ca26d3f97e5a839313803635b38eb468b10b9) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/infoLog`, `Utilities/logError`, `Utilities/mapWithSeparator` and `Utilities/warnOnce` ([7aef81b984](https://github.com/facebook/react-native/commit/7aef81b9840074e85ef3a2e81d808009868cbbbf) by [@iwoplaza](https://github.com/iwoplaza))
([48d900b703](https://github.com/facebook/react-native/commit/48d900b703aa125f2bc6e7ab5a24de45572bc66b) by [@iwoplaza](https://github.com/iwoplaza))
- **APIs:** `Libraries/Core/ExceptionsManager` now exports a default `ExceptionsManager` object, and `SyntheticError` as a secondary export. ([e5818d92a8](https://github.com/facebook/react-native/commit/e5818d92a867dbfa5f60d176b847b1f2131cb6da) by [@iwoplaza](https://github.com/iwoplaza))
- **APIs:** Move `Libraries/Inspector/` modules to `src/private/` ([0bde08fe67](https://github.com/facebook/react-native/commit/0bde08fe67c57740118b2bda49fb1f6b427a118b) by [@huntie](https://github.com/huntie))
- **APIs:** Move `XHRInterceptor` API to `src/private/` ([389779c348](https://github.com/facebook/react-native/commit/389779c3482fac98f6ab9ad50ac194cabfe38a98) by [@huntie](https://github.com/huntie))
- **APIs:** Removed `Libraries/Animated/AnimatedWeb.js` file. ([ecae8a2908](https://github.com/facebook/react-native/commit/ecae8a29089130e0d30ef91c69077a17e9d2b67d) by [@iwoplaza](https://github.com/iwoplaza))
- **DevX:** Remove deprecated `unstable_enableLogBox` function. LogBox is enabled by default. ([7368265107](https://github.com/facebook/react-native/commit/7368265107ba31fbfc35bb481ab7fb5626bfe072) by [@huntie](https://github.com/huntie))
- **DevX:** Remove deprecated `YellowBox` and `console.ignoredYellowBox` APIs. Use `LogBox`. ([45a2d9c5a8](https://github.com/facebook/react-native/commit/45a2d9c5a80f93de907a73ee2d61518c4b528d9a) by [@huntie](https://github.com/huntie))
- **DevX:** Remove legacy Libraries/JSInspector modules ([9ba4dd81db](https://github.com/facebook/react-native/commit/9ba4dd81db08c401ef04fa60800585bf39c6dab3) by [@huntie](https://github.com/huntie))
- **DevX:** Remove some web debugging remnants ([9aae84a688](https://github.com/facebook/react-native/commit/9aae84a688b5af87faf4b68676b6357de26f797f) by [@NickGerleman](https://github.com/NickGerleman))
- **Libs:** Remove incorrect hwb() syntax support from normalize-color ([676359efd9](https://github.com/facebook/react-native/commit/676359efd9e478d69ad430cff213acc87b273580) by [@NickGerleman](https://github.com/NickGerleman))
- **StyleSheet:** Disallow invalid unitless lengths in box shadows ([8e2de303e3](https://github.com/facebook/react-native/commit/8e2de303e329e29728843dce4ff81177efca0a7a) by [@NickGerleman](https://github.com/NickGerleman))
- **StyleSheet:** Disallow invalid unitless lengths in filters ([b34e63539d](https://github.com/facebook/react-native/commit/b34e63539dc49b0b6586441f4df4d7d28fd47237) by [@NickGerleman](https://github.com/NickGerleman))
#### Android specific
- **APIs:** Make `ResponseUtil` internal ([360cbf7433](https://github.com/facebook/react-native/commit/360cbf7433f885522e2393802af5caf2b96d4595) by [@mateoguzmana](https://github.com/mateoguzmana))
- **APIs:** Removed `RuntimeConfig` class for Hermes which was unused. ([08ddc11269](https://github.com/facebook/react-native/commit/08ddc11269808da0adabb4139718d73310f2f2b7) by [@cortinico](https://github.com/cortinico))
- **APIs:** Reduce visibility of `FabricUIManager.setBinding()` method, unused outside of react native ([2a9a13d567](https://github.com/facebook/react-native/commit/2a9a13d567bb63dabcd698a2ad737ef3b5513a1f) by [@mdvacca](https://github.com/mdvacca))
- **APIs:** Remove `TLSSocketFactory` class ([e065411c91](https://github.com/facebook/react-native/commit/e065411c91f2592e172b1fa5e3c1348c04d513e6) by [@mateoguzmana](https://github.com/mateoguzmana))
- **API:** `RuntimeExecutor` and `RuntimeScheduler` constructors are now private, `MapBufferSoLoader` was removed as no longer required. ([6c8ace9b05](https://github.com/facebook/react-native/commit/6c8ace9b05898fd3bfd3673af1f99680d0c1ebb1) by [@javache](https://github.com/javache))
- **API:** Remove `DevSupportManagerFactory.launchJSDevtools` API ([514ec4192f](https://github.com/facebook/react-native/commit/514ec4192fbaa6922dac20a72c8902b921c5a97e) by [@huntie](https://github.com/huntie))
- **API:** Stable API - Make `AnimatedNodeWithUpdateableConfig` internal as it was not used in OSS ([54e0b69e7e](https://github.com/facebook/react-native/commit/54e0b69e7e325b667ef4b69eab0bfa123ce8e428) by [@cortinico](https://github.com/cortinico))
### Changed
- **Animated:** Introduced a feature flag to test an optimization in `Animated` to reduce memory usage. ([fb8a6a5bb0](https://github.com/facebook/react-native/commit/fb8a6a5bb08892d9d74c607ec99f4afc9c967b04) by [@yungsters](https://github.com/yungsters))
- **Animated:** The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects. ([e0c0476553](https://github.com/facebook/react-native/commit/e0c0476553912a864b1bf19a98678432afa57659) by [@yungsters](https://github.com/yungsters))
- **Animated:** When an Animated component is updated or unmounted, `AnimatedNode` instances will now detach in a microtask instead of synchronously in the commit phase of React. This will cause the completion callback of finished animations to execute after the commit phase instead of during it. ([50b75a74d1](https://github.com/facebook/react-native/commit/50b75a74d1d8f8f0237d044f6bf72d49ca9e5cf4) by [@yungsters](https://github.com/yungsters))
- **Codegen:** Replace jscodeshift with @babel/core ([8f19201](https://github.com/facebook/react-native/commit/8f19201c5edd7fd18ab1ada8d4df2a8c31be8d4d) by [@kitten](https://github.com/kitten))
- **Deps:** Bump Node 18 -> 20 to build React Native in OSS ([1fd3806ee9](https://github.com/facebook/react-native/commit/1fd3806ee9a8d463da9a2c29c6a8597da53a61e8) by [@cortinico](https://github.com/cortinico))
- **Deps:** Upgrade React DevTools to 6.1.0. ([07860545f5](https://github.com/facebook/react-native/commit/07860545f5994b1e1f395bec60012433d9abf2fe) by [@hoxyq](https://github.com/hoxyq))
- **Deps:** Upgrade React DevTools to 6.1.1. ([5c88633035](https://github.com/facebook/react-native/commit/5c886330359c04b953521a08e31eacd5aa399a9b) by [@hoxyq](https://github.com/hoxyq))
- **DevX:** `Debugger.scriptParsed` now includes the field `sourceMapURL` as a (rewritten) remote url as opposed to base64 data url ([ff2e40371e](https://github.com/facebook/react-native/commit/ff2e40371ec13d2fef54098c5391ca20292c572f) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** Removed a long-running loop causing the app to lag while attempting a connection to Metro ([9b977def6c](https://github.com/facebook/react-native/commit/9b977def6c228b3fdadc870ac0c34a422933560b) by [@EdmondChuiHW](https://github.com/Edmond
ChuiHW))
- **FeatureFlags:** Re-enable `enableFixForViewCommandRace` feature flag ([ae59702f8e](https://github.com/facebook/react-native/commit/ae59702f8ee89e7bddec971e0a041744cb91e65c) by [@okwasniewski](https://github.com/okwasniewski))
- **Flow:** Improved eventInitDict type in WebSocketEvent class ([fa2fac1372](https://github.com/facebook/react-native/commit/fa2fac137287781d5b582507251af0352e654cec) by [@coado](https://github.com/coado))
- **Flow:** Improved Props type in UnimplementedView ([b200c7cb2f](https://github.com/facebook/react-native/commit/b200c7cb2f714e162cfc1d45b59fca4a9253233a) by [@coado](https://github.com/coado))
- **Flow:** Improved types for exported Types and Properties in LayoutAnimation ([3c02738ec4](https://github.com/facebook/react-native/commit/3c02738ec4c36d8414493ef8f0016a809d849d33) by [@coado](https://github.com/coado))
- **Flow:** Improved types in AnimatedWeb ([647ca90a30](https://github.com/facebook/react-native/commit/647ca90a3007f4c8d1f93ee9c262022e04e76ff8) by [@coado](https://github.com/coado))
- **Flow:** Improved types in ScrollView ([1be2ba4597](https://github.com/facebook/react-native/commit/1be2ba4597fbe835ec461caa9dd838e4186b49eb) by [@coado](https://github.com/coado))
- **Flow:** Improved types in StatusBar by adding StackProps ([48cafc0b69](https://github.com/facebook/react-native/commit/48cafc0b6971f7e1ddf3b6b37a66fdf0b3f08a88) by [@coado](https://github.com/coado))
- **Flow:** Improved types in TextAncestor ([df9d43f02b](https://github.com/facebook/react-native/commit/df9d43f02b3605e40f068bf5ba424e978af17a8f) by [@coado](https://github.com/coado))
- **Flow:** Improved types in WebSockertInterceptor callbacks ([d2adb976ab](https://github.com/facebook/react-native/commit/d2adb976abebcb0f38750903d98fbb5a3f50924b) by [@coado](https://github.com/coado))
- **Flow:** Refactored `Libraries/Components/StaticRenderer` syntax ([0e6cb590ec](https://github.com/facebook/react-native/commit/0e6cb590eca4f31c466f82c278f1f38f6273ed62) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in CodegenTypes with Object type ([812c3b33cd](https://github.com/facebook/react-native/commit/812c3b33cde53b47bcc43f2dd70cc780da5a4ae0) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in InteractionManager to Function type ([cd7a30ce48](https://github.com/facebook/react-native/commit/cd7a30ce4842ed58775512d244b6a9ed18956d4d) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in NativeModules with any type ([286a360d9b](https://github.com/facebook/react-native/commit/286a360d9b13d37f43fde74b66318aa73a7bc1f7) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in RCTDeviceEventEmitter with any ([8df6cfa56b](https://github.com/facebook/react-native/commit/8df6cfa56be1a9b38fba30cc074f8147ebc05928) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe with PressEvent in ScrollViewNativeComponentType ([8befab1760](https://github.com/facebook/react-native/commit/8befab17604c7758358bc834beb5f9c02026e9ac) by [@coado](https://github.com/coado))
- **Metro:** Update Metro to ^0.82.0 ([8421b8a872](https://github.com/facebook/react-native/commit/8421b8a8723633da9806e2db37a43add5de8761c) by [@robhogan](https://github.com/robhogan))
- **TypeScript:** Improve TypeScript types for `global` objects ([094c5be42e](https://github.com/facebook/react-native/commit/094c5be42eace6eb83fabc1f46336745c6879401) by [@coado](https://github.com/coado))
- **TypeScript:** Increase minimum typescript version in index.d.ts ([721f85adf7](https://github.com/facebook/react-native/commit/721f85adf7336cb07dafbfd98f9612f2e2b43268) by [@coado](https://github.com/coado))
- **TypeScript:** Move view flattening props to cross platform type interface ([ecad90ad8b](https://github.com/facebook/react-native/commit/ecad90ad8b68c623d028938cf84d1dbccc45e45f) by [@okwasniewski](https://github.com/okwasniewski))
#### Android specific
- **Deps:** Bump AGP to 8.8.2 ([2062defb2d](https://github.com/facebook/react-native/commit/2062defb2d9ce218056f072fb7f1b00375336bcf) by [@cortinico](https://github.com/cortinico))
- **Deps:** Gradle to 8.13 ([b95424d159](https://github.com/facebook/react-native/commit/b95424d1596a5b562b4fc5a0da38b7d9efab2f19) by [@cortinico](https://github.com/cortinico))
- **Deps:** Update androidx app compat to 1.7.0 ([b0fd9c1556](https://github.com/facebook/react-native/commit/b0fd9c155697ebc105cee99ce79b84ca43e491a5) by [@janicduplessis](https://github.com/janicduplessis))
- **Gradle:** Better compatibility with Kotlin 2.1.x ([a0528d834c](https://github.com/facebook/react-native/commit/a0528d834c644766a78cff8b092ca1c5447e20b5) by [@cortinico](https://github.com/cortinico))
- **Gradle:** Add option to disable bundle compression to improve startup time ([778382ad3d](https://github.com/facebook/react-native/commit/778382ad3d8f5ecc4535ed44b2cd508475a97beb) by [@mrousavy](https://github.com/mrousavy))
- **Initialization:** Allow passing custom JSRuntimeFactory to DefaultReactHost ([cdc166709d](https://github.com/facebook/react-native/commit/cdc166709d247dbcff6b390d1f51840c9f330a69) by [@Kudo](https://github.com/Kudo))
- **JSC:** Add a build time JSC lean core warning ([90e27c2b4f](https://github.com/facebook/react-native/commit/90e27c2b4f6c831922e61b370342ced328cb705d) by [@Kudo](https://github.com/Kudo))
- **JSC:** Exclude `jsctooling` when `useThirdPartyJSC` gradle property is true ([66032f22b8](https://github.com/facebook/react-native/commit/66032f22b8cab9fb7ad4c26d508e2d9bba3ae308) by [@Kudo](https://github.com/Kudo))
- **Runtime:** Feature flags for recycling View, Text components separately ([ca5ce205f7](https://github.com/facebook/react-native/commit/ca5ce205f71f1af9cd42d4677c2b5a8dee684abb) by Thomas Nardone)
- **Runtime:** Introduces BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE to determine if the new architecture is fully enabled into an Android app ([b45a3e5cd8](https://github.com/facebook/react-native/commit/b45a3e5cd81997e11b763073daf0a7f5b78188f8) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- **CocoaPods:** Fix Gemfile versions ([2527d29a96](https://github.com/facebook/react-native/commit/2527d29a96216fbaafd4f98fd7a931b9330e0570) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Generate the ReactCodegen.podspec as part of codegen instead of as part of pod install. ([dab9b3b440](https://github.com/facebook/react-native/commit/dab9b3b44015acd1d2e462d3d0dc2597a99b16a9) by [@cipolleschi](https://github.com/cipolleschi))
- **Cocoapods:** Ignore deprecation warning when calling pod install through core-cli-utils ([4141560afc](https://github.com/facebook/react-native/commit/4141560afc06a38bc23cdcaa6a31e6f41e6e5408) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Invoke Codegen as part of the Core-cli-utils package ([cc1e8d1523](https://github.com/facebook/react-native/commit/cc1e8d1523bee3880f0a038c550b8e2131d5a535) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Stop running codegen when running pod install ([f15094ef88](https://github.com/facebook/react-native/commit/f15094ef880218a0517863e6cf7d11247be66bfb) by [@cipolleschi](https://github.com/cipolleschi))
- **JSC:** Decouple JSC when `USE_THIRD_PARTY_JSC=1` ([176bed79b4](https://github.com/facebook/react-native/commit/176bed79b4c69455f16527512feb87c67e6f89de) by [@Kudo](https://github.com/Kudo))
- **NativeModules:** Properly handle `null` values coming from NativeModules. ([d4236791e2](https://github.com/facebook/react-native/commit/d4236791e238a614d2fadf5c5659874d983ab029) by [@cipolleschi](https://github.com/cipolleschi))
- **Text:** Moved workaround for multiline text measurement with `maximumNumberOfLines` earlier in the pipeline ([167a1a30da](https://github.com/facebook/react-native/commit/167a1a30daab588982638dc878b434688653df47) by [@j-piasecki](https://github.com/j-piasecki))
### Deprecated
- **DevX:** Deprecated usage of `HERMES_ENABLE_DEBUGGER` build-time flag for enabling React Native debugger in favour of `REACT_NATIVE_DEBUGGER_ENABLED` and `REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY`. ([5fcb69e8b7](https://github.com/facebook/react-native/commit/5fcb69e8b7756434ee4bcd9e3d19cc3c719920c7) by [@hoxyq](https://github.com/hoxyq))
#### iOS specific
- **CocoaPods:** Deprecate calling `pod install` directly ([e3def00d7a](https://github.com/facebook/react-native/commit/e3def00d7a9567f5879a6cd0dfed161bc1aaa176) by [@cipolleschi](https://github.com/cipolleschi))
- **Initialization:** Deprecate RCTAppDelegate ([74de9526ab](https://github.com/facebook/react-native/commit/74de9526ab6c1fb1f627f340653cb78d898ca698) by [@okwasniewski](https://github.com/okwasniewski))
#### Android specific
- **Layout:** `ViewManagerPropertyUpdater.updateProps` is deprecated, use the related ViewManager APIs instead ([a18bc58645](https://github.com/facebook/react-native/commit/a18bc5864508e9073fa3190d786a68761fb45073) by [@javache](https://github.com/javache))
- **Layout:** Deprecated ViewManagerDelegate#setProperty and ViewManagerDelegate#receiveCommand ([5a290c4cab](https://github.com/facebook/react-native/commit/5a290c4cab6f58744a9252687feefd8b6a8d3305) by [@javache](https://github.com/javache))
### Fixed
- **C++:** Add default case to `displayModeToInt()` function ([8c06f57860](https://github.com/facebook/react-native/commit/8c06f57860278cd4ff4a03bf182d22a27fcd0779) by [@Yajur-Grover](https://github.com/Yajur-Grover))
- **C++:** Add explicit casts for pointerIds for PointerEvents in NativeDOM ([94ea10c693](https://github.com/facebook/react-native/commit/94ea10c6939f915251520b49aeb131917364c078) by [@jonthysell](https://github.com/jonthysell))
- **Codegen:** Fix codegen to avoid the creation of `<appName>,` folders ([9498b71438](https://github.com/facebook/react-native/commit/9498b714381d060109fa6a9673db264bc6659f64) by [@cipolleschi](https://github.com/cipolleschi))
- **DevX:** Always patch React DevTools first so StrictMode dim chars are excluded from logs/logbox. ([e015d1b19a](https://github.com/facebook/react-native/commit/e015d1b19a2d6894badbe5525c7e53f2c2e21742) by [@rickhanlonii](https://github.com/rickhanlonii))
- **DevX:** Disconnections of DevTools when the network is under significant strain. ([b0974135bf](https://github.com/facebook/react-native/commit/b0974135bf1c0946d4a85bdc1fd423ff7dc612c5) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** FindNodeAtPoint now considers overflow area of the parent node ([d8bc7c68c0](https://github.com/facebook/react-native/commit/d8bc7c68c0a6ea2dee73edc3270dbdcb3b132af9) by [@hoxyq](https://github.com/hoxyq))
- **JS:** Fix `react-native-community/cli-platform-*` packages not being found in monorepos ([7926d656b3](https://github.com/facebook/react-native/commit/7926d656b30667a026a5bc85da61696e915893bf) by [@tido64](https://github.com/tido64))
- **JS:** Fix `react-native-community/cli` not being found in pnpm setups ([a672a4d007](https://github.com/facebook/react-native/commit/a672a4d0073a282ba9de1ca24a563833530f0d60) by [@tido64](https://github.com/tido64))
- **JS:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([cdaa1aa9aa](https://github.com/facebook/react-native/commit/cdaa1aa9aa330bc6c58d902a89f515d30288698f) by [@robhogan](https://github.com/robhogan))
#### Android specific
- **Codegen:** Improve input files for codegen gradle task ([e9e0d8c2f7](https://github.com/facebook/react-native/commit/e9e0d8c2f79e4077445c28e459ba0e5981da478b) by [@janicduplessis](https://github.com/janicduplessis))
- **Image:** Fix Image defaultSource runtime error ([1c51b77868](https://github.com/facebook/react-native/commit/1c51b7786860fe364a115f7a4ed29228157f0f5c) by [@mateoguzmana](https://github.com/mateoguzmana))
- **JS:** GetAndroidResourceFolderName() should return raw folder for svg file ([3a4798cc30](https://github.com/facebook/react-native/commit/3a4798cc30a53ba5ca428845d56fbeca43ef4524) by [@sunnylqm](https://github.com/sunnylqm))
- **Layout:** Elevation prop on android has incorrect border-radius ([f7d78f81cc](https://github.com/facebook/react-native/commit/f7d78f81cc971be2dcf5476c790556df4220b2bc) by [@jorge-cab](https://github.com/jorge-cab))
- **Layout:** Fix inset boxShadow when blur < spread ([a3b29e1441](https://github.com/facebook/react-native/commit/a3b29e1441f86fab624f21d977681f39f9acf549) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fix issue where boxShadow crashes with small blur radius ([103f8b3885](https://github.com/facebook/react-native/commit/103f8b38856cad04e93d5b404024c28adbf52cee) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fixed anti-aliasing not showing on older Android versions ([6c6e0a9085](https://github.com/facebook/react-native/commit/6c6e0a90855ac070742ce1923204115cbf2528f8) by [@jorge-cab](https://github.com/jorge-cab))
- **Layout:** Make `setLayoutAnimationEnabledExperimental` a no-op in Bridgeless ([44da5d2ee0](https://github.com/facebook/react-native/commit/44da5d2ee07d06a0e11b626e2641e255f0ffde9f) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- **Libs:** Fix react-native/popup-menu-android not building for 3rd party developers ([e96396bd18](https://github.com/facebook/react-native/commit/e96396bd184471ff8d7a69b4775d851076231b47) by [@cortinico](https://github.com/cortinico))
- **Modal:** Fixed crash with Modal when trying to call syncSystemBarsVisibility() ([141fb23bba](https://github.com/facebook/react-native/commit/141fb23bba7120e515902f7bdebd87297d7aca92) by [@alanleedev](https://github.com/alanleedev))
- **Modal:** Sync Modal system bars visibility with current activity ([7016225062](https://github.com/facebook/react-native/commit/701622506248022c3a2fcea1c0066bba6e80232a) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Runtime:** Marked acquireWakeLockNow as static ([2a58201322](https://github.com/facebook/react-native/commit/2a582013228d7b729141c781ac98034f8a70578b) by [@mstrokin](https://github.com/mstrokin))
- **Runtime:** Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost ([07769d4d7e](https://github.com/facebook/react-native/commit/07769d4d7eb1d3000210c7a8dafd9a5411694444) by [@WoLewicki](https://github.com/WoLewicki))
- **Runtime:** Pass the bundle URL protocol when setting up HMR client on Android ([ba894c908a](https://github.com/facebook/react-native/commit/ba894c908a02a84596525872b6232accc1acfaea) by [@byCedric](https://github.com/byCedric))
- **ScrollView:** Scroll view throttle no longer impacts events other than `onScroll` ([bc810e5115](https://github.com/facebook/react-native/commit/bc810e5115256e4fb5330b21c3a5d9ee3dd9a00c) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Text:** Allow text links to be navigable via keyboard by default ([98b0991128](https://github.com/facebook/react-native/commit/98b0991128c902bbe273f519ac79ac0676cef1c0) by [@joevilches](https://github.com/joevilches))
- **Text:** Fix text link accessibility on state update removal ([c9e6567881](https://github.com/facebook/react-native/commit/c9e6567881b2a596677b1b14d1c1d2537fec507d) by [@joevilches](https://github.com/joevilches))
- **TextInput:** Avoid `ConcurrentModificationException` when iterating over `mListeners` `TextWatcher` array ([243aecc095](https://github.com/facebook/react-native/commit/243aecc095c20f8295fdefa8fc3e3ac8a7691043) by [@kirillzyusko](https://github.com/kirillzyusko))
- **TextInput:** TextInputs can now receive focus via external keyboard ([3420eb87b0](https://github.com/facebook/react-native/commit/3420eb87b01f42092c1691a1f6544f20d244cc60) by [@joevilches](https://github.com/joevilches))
#### iOS specific
- **C++:** Update deprecated enums in RCTTextPrimitivesConversions.h ([4121d24454](https://github.com/facebook/react-native/commit/4121d24454433ab007b664076ee00a951494fb4d) by [@joannaquu](https://github.com/joannaquu))
- **CocoaPods:** `JSRuntimeFactoryCAPI.h` build error for `use_frameworks` build ([7786805337](https://github.com/facebook/react-native/commit/7786805337526fa6e8ed758407b78884a37b89ef) by [@Kudo](https://github.com/Kudo))
- **CocoaPods:** Make sure 3p libraries depends on React-renderercss to work with use_frameworks ([cc12caa0a9](https://github.com/facebook/react-native/commit/cc12caa0a9dcb08d11fe18c9b34290352ca1909e) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Compatibility with Ruby 3.4.0 ([b1735bc593](https://github.com/facebook/react-native/commit/b1735bc5936ebe352b4ab27604a3ae85980121f1) by [@okwasniewski](https://github.com/okwasniewski))
- **CocoaPods:** Fix wrong cocoapods script on new_architecture.rb ([541e655832](https://github.com/facebook/react-native/commit/541e655832acaed7836c23326cfc62fd0ba5521f) by [@CHOIMINSEOK](https://github.com/CHOIMINSEOK))
- **Codegen:** Enable use of multiple `RCTAppDependencyProvider` instances ([0cc1ac18cf](https://github.com/facebook/react-native/commit/0cc1ac18cf7f2a99500ef6f315c4dccda7736ea0) by [@vonovak](https://github.com/vonovak))
- **DeviceInfo:** Data race related to read/write of RCTDeviceInfo._invalidated. ([2a18d83521](https://github.com/facebook/react-native/commit/2a18d83521b30642a7e403fd55a5afd4ef2d8cb4) by [@hakonk](https://github.com/hakonk))
- **DevX:** Issue where performance monitor would be hidden under newly presented views. ([e7556e921c](https://github.com/facebook/react-native/commit/e7556e921c07692012a4295dd7d84fe23f5838a5) by [@chrsmys](https://github.com/chrsmys))
- **DevX:** Remove private symbols for non-simulator and non-catalyst builds. ([9350d6f2f5](https://github.com/facebook/react-native/commit/9350d6f2f5473cddc6ea4c13602c9f80c9c40916) by [@EvanBacon](https://github.com/EvanBacon))
- **Infra:** Workaround for a iOS build app running on Apple Silicon Mac(in Xcode Destination: "Mac(Designed for iPad)") TextInput crash due to serialization attempt of WeakEventEmitter ([0511e2e49a](https://github.com/facebook/react-native/commit/0511e2e49a51ab32aa6f40df7c6b3dde92b09031) by [@iwater](https://github.com/iwater))
- **Initialization** Make React Native work without AppDelegate window property ([ae7bbe06c9](https://github.com/facebook/react-native/commit/ae7bbe06c9a4e47e1aa6cfa5cca7f6aa5a8ff83b) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Return nullptr when USE_THIRD_PARTY_JSC is set to true ([515ff1e626](https://github.com/facebook/react-native/commit/515ff1e626110116f272428d1d182eedcff2deab) by [@okwasniewski](https://github.com/okwasniewski))
- **Layout:** Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform ([acaf94dc21](https://github.com/facebook/react-native/commit/acaf94dc214867633a50b113d9925335a0d59099) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform ([f835b824f4](https://github.com/facebook/react-native/commit/f835b824f43ae54ee6d4e4b72101638bbd5f365d) by [@joevilches](https://github.com/joevilches))
- **Layout:** Improve detached keyboard detection, support Stage Manager on iOS ([c499ae1192](https://github.com/facebook/react-native/commit/c499ae1192ec178e4d20f8ed4ae03ff3e077bf65) by [@mhoran](https://github.com/mhoran))
- **Layout:** Layout direction changes are now honored on bundle reload. ([36f29beac4](https://github.com/facebook/react-native/commit/36f29beac47259768612bf56e5d9acfa4b94ab1a) by [@chrsmys](https://github.com/chrsmys))
- **Layout:** Suppressed iOS 13 deprecation warnings in RCTStatusBarManager ([fffd6d75b4](https://github.com/facebook/react-native/commit/fffd6d75b48ae1f6c78dbc0f7e9b6fe509df3394) by Ingrid Wang)
- **Native Module:** Add guard for custom module provider lookup in TMManager ([d0a101fbea](https://github.com/facebook/react-native/commit/d0a101fbeaec0bdace3a680078e0acc8635b5c3e) by [@shwanton](https://github.com/shwanton))
- **PullToRefresh:** Fix new arch recycled RefreshControl was missing its title ([e3d607fc2e](https://github.com/facebook/react-native/commit/e3d607fc2ea18c7ad9474d72cf18b1328d6647f7) by [@High5Apps](https://github.com/High5Apps))
- **Runtime:** Convert to JSException only NSException from sync methods ([9805a4f](https://github.com/facebook/react-native/commit/9805a4f89a8b23b5aa7201ed1013e5da5932e084) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Handle null params in the Interop TM layer ([6314925](https://github.com/facebook/react-native/commit/63149256c0e19ecbd008d1bf8f0ff1e79bb63cf2) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Call RCTInitializeUIKitProxies before bridge create ([a51fa6c002](https://github.com/facebook/react-native/commit/a51fa6c0028a5bc9afb89656f1aeb41847b7fe8e) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Fixed: extraModulesForBridge callback not called when New Architecture enabled ([c0a5c2c3cb](https://github.com/facebook/react-native/commit/c0a5c2c3cb883dc68e98d2720b194df17d0b9ee7) by Bruno Aybar)
- **Runtime:** Enable back the opt-out from the New Architecture ([9abdd619da](https://github.com/facebook/react-native/commit/9abdd619da110dbe227c387179a449623395c7b2) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Add missing loadFromSource method in the DefaultRNFactoryDelegate ([7739615e0d](https://github.com/facebook/react-native/commit/7739615e0d614a93f297b70ef0947dddf3d1ba6e) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** App crash caused by the `[RCTFileRequestHanlder invalidate]` method ([789ed7d5ad](https://github.com/facebook/react-native/commit/789ed7d5ad75ad4c20ecd1eb19d1fc18275fc500) by [@zhouzh1](https://github.com/zhouzh1))
- **Runtime:** Bridge: Fixes HostTarget use after free when deallocated bridge ([3e2e8ec757](https://github.com/facebook/react-native/commit/3e2e8ec7579fa72af09f016753c167952dffaf43) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([8d7aca30e7](https://github.com/facebook/react-native/commit/8d7aca30e7fb50c9c069931a7ed67d8d4a745a2a) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Text:** Fixed onPress for Text with nested View. ([6b2c40c64f](https://github.com/facebook/react-native/commit/6b2c40c64f8278785d7e37f908918e0344ba278f) by [@coado](https://github.com/coado))
- **TextInput:** Fix selection makes TextInput clear its content when using children ([e3b176a598](https://github.com/facebook/react-native/commit/e3b176a598bd47338b52522f05893f781e3a7744) by Olivier Bouillet)
- **TextInput:** Fixed TextInput's `onContentSizeChange` event being dispatched multiple times with the same size ([2bb65717b7](https://github.com/facebook/react-native/commit/2bb65717b7b86d19e4d35707003df7d5be31c2fb) by [@j-piasecki](https://github.com/j-piasecki))
- **TextInput:** Implement `dataDetectorTypes` in the same way as the old architecture ([2ae45ec3ce](https://github.com/facebook/react-native/commit/2ae45ec3ce50cb9d95782173f6dfca74e8110848) by [@VidocqH](https://github.com/VidocqH))
### Removed
- **C++:** Removed `RawProps::operator=` ([e4d1cf8ce9](https://github.com/facebook/react-native/commit/e4d1cf8ce994d39ed67a660888cbeef2fba83b36) by [@javache](https://github.com/javache))
- **JS**: Removed context from addEventListener arguments in Linking ([1536a7f196](https://github.com/facebook/react-native/commit/1536a7f1960f21e56d2e4730a5ca8524b49530df) by [@coado](https://github.com/coado))
#### iOS specific
- **JSC:** Clean up RCTBridgeDelegate to remove shouldBridgeUseCustomJSC method ([c8f1506f13](https://github.com/facebook/react-native/commit/c8f1506f13310ffafe370273805684e696d72d50) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Layout:** Remove no longer needed UISceneDelegate ([a033cf9d5e](https://github.com/facebook/react-native/commit/a033cf9d5e8ffbda8b6f86cf3ce152b4ccb73187) by [@okwasniewski](https://github.com/okwasniewski))
## v0.78.2
### Changed
- **Deps:** Metro minimum to 0.81.3, fix "_interopRequireDefault is not a function" ([23c9dbc563](https://github.com/facebook/react-native/commit/23c9dbc563637a6b8c22c1b9d86fa03b65bde520) by [@robhogan](https://github.com/robhogan))
### Fixed
#### Android specific
- **Runtime:** Fixes issue with z-indexed sibling removal ([34ae9facd5](https://github.com/facebook/react-native/commit/34ae9facd52b5da28b5ced22110532bbcdad2cec) by [@rozele](https://github.com/rozele))
#### iOS specific
- **RCTNetworking:** app crash caused by the `[RCTFileRequestHanlder invalidate]` method ([5861f7eea7](https://github.com/facebook/react-native/commit/5861f7eea79767f14a06719937cbdabed39be9c9) by [@zhouzh1](https://github.com/zhouzh1))
- **Runtime:** Implement the `loadSourceForBridge:onProgress:onComplete` in the `RCTDefaultReactNativeFactoryDelegate`. ([8b33668c43](https://github.com/facebook/react-native/commit/8b33668c4338d31c27e6bd90b2a0e6fc0a077588) by [@cipolleschi](https://github.com/cipolleschi))
- **Text:** Fix selection makes TextInput clear its content when using children ([301532b51fe33cd08152c7dde2b15d57105332dd](https://github.com/facebook/react-native/commit/301532b51fe33cd08152c7dde2b15d57105332dd) by [freeboub](https://github.com/freeboub))
- **TurboModules:** Make sure the TM infra does not crash on NSException when triggered by async method ([ae1841ac964](https://github.com/facebook/react-native/commit/ae1841ac9645c10d66aeef784579b94fa0169e03) by [@cipolleschi](https://github.com/cipolleschi))
## v0.78.1
### Fixed
- **Deps:** community-cli-plugin: resolve cli-server-api via peer dependency on cli ([9ffbeadf8a](https://github.com/facebook/react-native/commit/9ffbeadf8a1ecfef1c0ac08bc39157ac6e17796e) by [@robhogan](https://github.com/robhogan))
- **DevTools:** Fix disconnections of DevTools when the network is under significant strain ([9e47ed9a20](https://github.com/facebook/react-native/commit/9e47ed9a205184abf1d7eb422fb22ef27f18cae5) by [@vzaidman](https://github.com/vzaidman))
#### Android specific
- **Image:** Fix Android Image defaultSource runtime error ([665212e22c](https://github.com/facebook/react-native/commit/665212e22c310b1f0f9d1f1795d88622c711219a) by [@mateoguzmana](https://github.com/mateoguzmana))
- **style:** Fix elevation with border-radius set (#48982) ([68dc582305](https://github.com/facebook/react-native/commit/68dc582305e2568245380ddca2ceaee3b5ec752f) by [@polovi](https://github.com/polovi))
#### iOS specific
- **Initialization:** Call `extraModulesForBridge` callback in the New Architecture. ([97adbd897f](https://github.com/facebook/react-native/commit/97adbd897f88d108f0be21a5895dadc74189b6fc) by [@Bruno125](https://github.com/Bruno125))
- **Initialization:** Added custom load js block in bridge mode ([bdc83cb129](https://github.com/facebook/react-native/commit/bdc83cb129757d6adc373c11535d78055727e3fa) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Interop Layer:** Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules ([619d5dfbb2](https://github.com/facebook/react-native/commit/619d5dfbb280892fcc2a9f78d630eb88fb32960f) by [@cipolleschi](https://github.com/cipolleschi))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([282cdc9fb4](https://github.com/facebook/react-native/commit/282cdc9fb4a1ceac17b63584f9988d3192235885) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.78.0
### Breaking
@@ -141,6 +812,30 @@
- **Style:** Fixed `centerContent` losing taps and causing jitter ([fe7e97a2fd](https://github.com/facebook/react-native/commit/fe7e97a2fd272db0d9d9aa7d0561337a7c8e2c30) by [@gaearon](https://github.com/gaearon))
- **Xcode:** Properly escape paths in Xcode build script used when bundling an app. ([2fee13094b](https://github.com/facebook/react-native/commit/2fee13094b3d384c071978776fd8b7cff0b6530f) by [@kraenhansen](https://github.com/kraenhansen))
## v0.77.2
### Added
#### iOS specific
- **Codegen:** Add the `source` parameter to generate-codegen-artifacts to avoid generating files not needed by libraries. ([98b8f17811](https://github.com/facebook/react-native/commit/98b8f178110472e5fed97de80766c03b0b5e988c) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **DevTools:** Fix disconnections of DevTools when the network is under significant strain. ([b0974135bf](https://github.com/facebook/react-native/commit/b0974135bf1c0946d4a85bdc1fd423ff7dc612c5) by [@vzaidman](https://github.com/vzaidman))
- **CLI:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([1f002f9999](https://github.com/facebook/react-native/commit/1f002f9999fb2a225f8e2cb3844badc97313b45f) by [@robhogan](https://github.com/robhogan))
- **Metro:** Bump minimum Metro to 0.81.3, fix "_interopRequireDefault is not a function" with enablePackageExports ([b335436113](https://github.com/facebook/react-native/commit/b335436113aa11cc4f17eb696368e05708374c33) by [@robhogan](https://github.com/robhogan))
#### Android specific
- **Fabric:** Avoid NPE when touch event is triggered before SurfaceManager is initiated ([b8095f4692](https://github.com/facebook/react-native/commit/b8095f4692610c7f4631b851dc7d8dc9b149a277) by [@CHOIMINSEOK](https://github.com/CHOIMINSEOK))
- **Image:** Fix defaultSource runtime error ([1c51b77868](https://github.com/facebook/react-native/commit/1c51b7786860fe364a115f7a4ed29228157f0f5c) by [@fbp93](https://github.com/fbp93))
#### iOS specific
- **Interop Layer:** Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules ([619d5dfbb2](https://github.com/facebook/react-native/commit/619d5dfbb280892fcc2a9f78d630eb88fb32960f) by [@cipolleschi](https://github.com/cipolleschi))
- **TextInput:** Fix crashes when any text is entered while running as iOS app on apple silicon mac ([8d7aca30e7](https://github.com/facebook/react-native/commit/8d7aca30e7fb50c9c069931a7ed67d8d4a745a2a) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.77.1
### Fixed
@@ -516,6 +1211,46 @@ github.com/robhogan))
- **TextInput:** Workaround for Mac Catalyst TextInput crash due to serialization attempt of WeakEventEmitter ([e04738b7ec](https://github.com/facebook/react-native/commit/e04738b7ecec9e7da3aab49bb24a6336b9496b94) by [@rozele](https://github.com/rozele))
- **TextInput:** Fix `maxLength` not working in old arch ([4b3ef3b00c](https://github.com/facebook/react-native/commit/4b3ef3b00ce0026c0d1e1f2a5546fcec249255d8) by [@mateoguzmana](https://github.com/mateoguzmana))
## v0.76.9
### Changed
- **Deps:** Bump folly to 2024.10.18. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Bump fmt to 11.0.2. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Add dependency to fast_float v6.1.4, as it is required by folly. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
#### Android specific
- **Deps:** Move CMakeLists for fast_float to third-party folder ([71abbab169](https://github.com/facebook/react-native/commit/71abbab169960e7bd48f18ad72eafe042836ec7f) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Fix Folly CMakeLists ([21919be5ee](https://github.com/facebook/react-native/commit/21919be5ee646c0c6b6235298b66371d44cf153e) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **Runtime:** Fixed crash caused by the request operation canceling ([2bddb0012e](https://github.com/facebook/react-native/commit/2bddb0012e2e6b87d2c4ddb8ff788fc16f211f12) by [@zhouzh1](https://github.com/zhouzh1))
## v0.76.8
### Fixed
- **FormData:** Remove non compliant `filename*` attribute in a FormData `content-disposition` header ([9e846b4d11](https://github.com/facebook/react-native/commit/9e846b4d11a287977c05a77169d8775ab14474ca) by [@foyarash](https://github.com/foyarash))
- **DevX:** Disconnections of DevTools when the network is under significant strain. ([08c04147ba](https://github.com/facebook/react-native/commit/08c04147ba7664ad82dcb59184293bec8c0e728f) by [@vzaidman](https://github.com/vzaidman))
- **JS:** Fix `react-native-community/cli` not being found in pnpm setups ([9ba96ad79d6](https://github.com/facebook/react-native/commit/9ba96ad79d62a77dbf12b0012eaa4f61e4749ec0) by [@tido64](https://github.com/tido64))
- **JS:** Fix `react-native-community/cli-platform-*` packages not being found in monorepos ([ffe7bd1471](https://github.com/facebook/react-native/commit/ffe7bd147179d976b165f869cd8ae28d5de87286) by [@tido64](https://github.com/tido64))
#### Android specific
- **popup-menu-android:** Fix react-native/popup-menu-android not building for 3rd party developers ([ac637ff44](https://github.com/facebook/react-native/commit/ac637ff448e7d4f9bb4c16297fbd27ed94ab9803) by [@cortinico](https://github.com/cortinico))
- **DevTools:** Pass the bundle URL protocol when setting up HMR client on Android ([68055f2d8a](https://github.com/facebook/react-native/commit/68055f2d8a1f475a79651cdae81e6af1a32ddf6f) by [@byCedric](https://github.com/byCedric))
- **CLI:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([b9c4095e40](https://github.com/facebook/react-native/commit/b9c4095e40faed0f3ea06f1981b9a53c54a08291) by [@robhogan](https://github.com/robhogan))
#### iOS specific
- **layout:** Layout direction changes are now honored on bundle reload. ([23b888ff2d](https://github.com/facebook/react-native/commit/23b888ff2d5b877a88e3432e4a4af2836f0b8dca) by [@chrsmys](https://github.com/chrsmys))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([e2b081e66f](https://github.com/facebook/react-native/commit/e2b081e66f277948fcb8bc546c8184c8eaff4d17) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Convert to JSException only NSException from sync methods ([8eec35f134](https://github.com/facebook/react-native/commit/8eec35f134f353e99fa27935110cd33d4bd9c213) by [@cipolleschi](https://github.com/cipolleschi))
## v0.76.7
### Changed
+1 -1
View File
@@ -28,7 +28,7 @@ Examples of contributing to the release include being a [community releaser](htt
### Current partners:
* **[Coinbase](https://www.coinbase.com/):** Publishes [posts](https://blog.coinbase.com/tagged/react-native) advocating React Native usage. Supports `@react-native-community/datetimepicker` and other community modules to migrate to the new architecture. Supports releases in testing and feedback.
* **[Callstack](https://callstack.com/):** Maintains the [React Native CLI](https://github.com/react-native-community/react-native-cli) and [other community libraries](https://github.com/callstack), organizes [React Native EU](https://react-native.eu/) and hosts [The React Native Show podcast](https://www.callstack.com/podcast-react-native-show)
* **[Callstack](https://callstack.com/):** Maintains [React Native Community CLI](https://github.com/react-native-community/cli), develops [RNEF](https://rnef.dev), [Re.Pack](https://re-pack.dev) and [other community libraries](https://github.com/callstack). Hosts [React Universe Conf](https://www.reactuniverseconf.com/) and [React Universe On Air](https://www.callstack.com/podcast).
* **[Expo](https://expo.dev/):** Builds [Expo Go and SDK](https://github.com/expo/expo), [Snack](https://snack.expo.dev/), and [Expo Application Services](https://expo.dev/eas). Maintains [React Native Directory](https://reactnative.directory/), stewards [React Navigation](https://reactnavigation.org/) along with other partners.
* **[Infinite Red](https://infinite.red/):** Maintains the [ignite cli/boilerplate](https://github.com/infinitered/ignite), organizes [Chain React Conf](https://cr.infinite.red/), hosts the [React Native Radio podcast](https://reactnativeradio.com), publishes the [React Native Newsletter](https://reactnativenewsletter.com)
* **[Meta](https://opensource.fb.com/):** Oversees the React Native product and maintains the [React Native core repo](https://reactnative.dev/)
-3
View File
@@ -138,7 +138,4 @@ Larger discussions and proposals are discussed in [**@react-native-community/dis
React Native is MIT licensed, as found in the [LICENSE][l] file.
React Native documentation is Creative Commons licensed, as found in the [LICENSE-docs][ld] file.
[l]: https://github.com/facebook/react-native/blob/main/LICENSE
[ld]: https://github.com/facebook/react-native/blob/main/LICENSE-docs
+94
View File
@@ -0,0 +1,94 @@
# React Native Technical Documentation Guidelines
_This is a document about documentation (hence the file name)._
## Motivation
The goals of this documentation are:
1. To make it easier for people to understand and contribute to the React Native
architecture.
2. To ensure the architecture is easy to maintain, with clearly scoped
subsystems that are easy to reason about and change.
## Strategy
Our documentation supports the following use cases:
1. (Exploration based) I want to understand how React Native works and learn
about its different parts. I want to explore.
2. (Goal based) I want to solve a problem and change something specific, so I
want to understand what I should change and how the system I need to change
works. I need to understand how other systems depend on this.
To support the first case, we provide a single entrypoint for the whole
documentation, which will be the first step in a tree of docs with links to
parents and children:
- `<root>/__docs__/README.md` (with links to subsystems 1, 2, etc.)
- `Subsystem 1/__docs__/README.md` (with links to root and subsystems 1.1,
1.2, etc.)
- `Subsystem 1.1/__docs__/README.md` (with links to subsystem 1 and
subsystems 1.1.1, 1.1.2, etc.)
- `Subsystem 1.2/__docs__/README.md`
- `Subsystem 2/__docs__/README.md`
This structure will make it possible for the user to navigate across the
documentation organically, just following links within the documents themselves.
To support the second use case, focusing on a specific subsystem, we will
describe what are the relationships between that subsystem and others, to make
sure that changes to its API are understood, and that usages of other subsystems
are considered.
The use of the `__docs__` directory (inspired by Python) has 2 goals:
1. Make the documentation easy to find in the directory, by generally appearing
at the top of the directory (similar to `__tests__`).
2. Grouping the documentation itself and its assets (images, diagrams, etc.).
## Guidelines
### Content
Use [this template](./README-template.md) to write the documentation for a
subsystem, adding the appropriate subsections depending on what that
documentation requires. Only diverge from this structure if it is strictly
necessary (removing unnecessary or empty sections is fine).
Include supporting images and diagrams in the documentation. Those assets should
be placed in the same `__docs__` directory as the `README.md` file. Use relative
paths to link to the assets in those directories.
If you include Excalidraw diagrams, make sure to export an SVG image from the
website using the "Embedded scene" option, so the original diagram is included
in the file and can be re-uploaded to Excalidraw for future modifications. Use
the extension `.excalidraw.svg` to signal this.
### Granularity
The level of granularity in the definition of the subsystems should be enough to
correctly describe how React Native works, but not so detailed that any changes
in the code require changes in the documentation.
Examples:
- Requires updating the docs:
- Adding a new major feature or API.
- Adding a new relevant dependency. Adding a dependency to helper functions
does not count as relevant.
- Does NOT require updating the docs:
- Internal implementation details that do not change how the system works or
interacts with others.
- Making a minor API or feature change.
- Internal refactors, even if they create new modules or introduce
dependencies to external helpers.
### Location
When a specific subsystem exists in multiple directories (e.g.:
platform-specific ones, C++, JavaScript, etc.):
1. Choose one of them to place the canonical documentation (in order of
preference, JavaScript -> C++ -> platform).
2. Create specific files in the rest linking to the canonical one.
+36
View File
@@ -0,0 +1,36 @@
# _Subsystem name_
[🏠 Home](path/to/main/__docs__/README.md)
_Description of the subsystem with the necessary context._
## 🚀 Usage
_Explanation of how the subsystem is used._
## 📐 Design
_Explain how the subsystem is designed, relevant implementation details, etc.
Ideally include an Excalidraw diagram._
## 🔗 Relationship with other systems
### Part of
- _A single bullet for the parent subsystem. Link to the documentation of that
subsystem if it exists._
### Part of this
- _One bullet point for each subsystem that is part of this one. Link to the
documentation of those subsystems if it exists._
### Used by this
- _One bullet point for each subsystem used by this one, explaining why it uses
it and how. Link to the documentation of those subsystems if it exists._
### Uses this
- _One bullet point for each subsystem using this one, explaining why it uses it
and how. Link to the documentation of those subsystems if it exists._
+109
View File
@@ -0,0 +1,109 @@
# React Native Technical Documentation
The React Native technical documentation describes how React Native works
internally, the subsystems it is composed of, how they work and how they
interact with each other.
The intended audience is people who want to learn about the internals of React
Native and contribute to it. **End users of React Native are meant to use the
[public website](https://reactnative.dev) instead** (its code can be found
[here](https://github.com/facebook/react-native-website)).
For details on how we approach technical documentation in this repository, see
[GUIDELINES.md](./GUIDELINES.md).
## 🚀 Usage
This repository is not meant to be consumed directly by end users. Instead, it
creates several packages that are published to the NPM registry for direct
consumption by end users and frameworks.
This repository uses a monorepo approach, and public packages can be found in
the [`packages`](../packages/) directory (the ones that do not contain
`"private": true` in their `package.json` file).
The most important package is the
[`react-native`](https://www.npmjs.com/package/react-native) package, located in
[`packages/react-native`](../packages/react-native), which contains the public
JavaScript API.
This repository provides the Android and iOS versions of React Native. Versions
for other platforms are maintained in their own repositories.
## 📐 Design
TODO: Explain the different components of React Native at a high level.
## 🔗 Relationship with other systems
### Part of this
- Runtime
- Cross-platform
- [Feature Flags](../packages/react-native/src/private/featureflags/__docs__/README.md)
- Host / Instance / Bridgeless
- UI / Fabric
- Events
- Shadow Tree Lifecycle
- [Runtime Shadow Node Reference Update](../packages/react-native/ReactCommon/react/renderer/core/__docs__/RSNRU.md)
- [passChildrenWhenCloningPersistedNodes](../packages/react-native/ReactCommon/react/renderer/core/__docs__/passChildrenWhenCloning.md)
- Layout
- Mounting
- Native Modules / TurboModules
- JS Runtime
- [Event Loop](../packages/react-native/ReactCommon/react/renderer/runtimescheduler/__docs__/README.md)
- Globals and environment setup
- Error handling
- Developer Tools
- React DevTools
- LogBox
- Misc
- Web APIs
- DOM Traversal & Layout APIs
- [IntersectionObserver](../packages/react-native/src/private/webapis/intersectionobserver/__docs__/README.md)
- [MutationObserver](../packages/react-native/src/private/webapis/mutationobserver/__docs__/README.md)
- Performance & PerformanceObserver
- Timers
- Platform-specific
- Host Platform Interface
- Android
- UI
- [Events](../packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/events/__docs__/README.md)
- Mounting
- iOS
- UI
- Events
- Mounting
- Build system
- Android
- iOS
- C++
- JavaScript
- Metro
- Testing
- Android
- iOS
- C++
- JavaScript
- Flow
- TypeScript
- Jest
- ESLint
- Integration / E2E
- [Fantom](../private/react-native-fantom/__docs__/README.md)
- Tooling
- React Native DevTools
### Used by this
This repository has many different types of dependencies: build systems,
external packages to be used during development, external packages used at
runtime, etc.
### Uses this
The main use cases for this repository are:
1. Developing React Native itself.
2. Testing and releasing React Native.
3. Synchronizing forks like `react-native-windows` and `react-native-macos`.
+3
View File
@@ -12,6 +12,7 @@ plugins {
alias(libs.plugins.download) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.binary.compatibility.validator) apply true
alias(libs.plugins.android.test) apply false
}
val reactAndroidProperties = java.util.Properties()
@@ -54,6 +55,8 @@ nexusPublishing {
sonatype {
username.set(sonatypeUsername)
password.set(sonatypePassword)
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
+89 -9
View File
@@ -4,8 +4,8 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
* @oncall flow
*/
// Adapted from https://github.com/flow-typed/flow-typed/blob/main/definitions/environments/node/flow_v0.261.x-/node.js
@@ -2381,7 +2381,11 @@ declare class readline$Interface extends events$EventEmitter {
close(): void;
pause(): void;
prompt(preserveCursor?: boolean): void;
question(query: string, callback: (answer: string) => void): void;
question(
query: string,
optionsOrCallback: {|signal?: AbortSignal|} | ((answer: string) => void),
callback?: (answer: string) => void,
): void;
resume(): void;
setPrompt(prompt: string): void;
write(
@@ -2399,29 +2403,38 @@ declare class readline$Interface extends events$EventEmitter {
declare module 'readline' {
declare var Interface: typeof readline$Interface;
declare function clearLine(stream: stream$Stream, dir: -1 | 1 | 0): void;
declare function clearScreenDown(stream: stream$Stream): void;
declare function clearLine(
stream: stream$Stream,
dir: -1 | 1 | 0,
callback?: () => void,
): void;
declare function clearScreenDown(
stream: stream$Stream,
callback?: () => void,
): void;
declare function createInterface(opts: {
completer?: readline$InterfaceCompleter,
crlfDelay?: number,
escapeCodeTimeout?: number,
historySize?: number,
input: stream$Readable,
output?: ?stream$Stream,
completer?: readline$InterfaceCompleter,
terminal?: boolean,
historySize?: number,
prompt?: string,
crlfDelay?: number,
removeHistoryDuplicates?: boolean,
escapeCodeTimeout?: number,
terminal?: boolean,
...
}): readline$Interface;
declare function cursorTo(
stream: stream$Stream,
x?: number,
y?: number,
callback?: () => void,
): void;
declare function moveCursor(
stream: stream$Stream,
dx: number,
dy: number,
callback?: () => void,
): void;
declare function emitKeypressEvents(
stream: stream$Stream,
@@ -3216,6 +3229,73 @@ declare module 'util' {
isWebAssemblyCompiledModule: (value: mixed) => boolean,
...
};
declare type BackgroundColors =
| 'bgBlack'
| 'bgBlackBright'
| 'bgBlue'
| 'bgBlueBright'
| 'bgCyan'
| 'bgCyanBright'
| 'bgGray'
| 'bgGreen'
| 'bgGreenBright'
| 'bgGrey'
| 'bgMagenta'
| 'bgMagentaBright'
| 'bgRed'
| 'bgRedBright'
| 'bgWhite'
| 'bgWhiteBright'
| 'bgYellow'
| 'bgYellowBright';
declare type ForegroundColors =
| 'black'
| 'blackBright'
| 'blue'
| 'blueBright'
| 'cyan'
| 'cyanBright'
| 'gray'
| 'green'
| 'greenBright'
| 'grey'
| 'magenta'
| 'magentaBright'
| 'red'
| 'redBright'
| 'white'
| 'whiteBright'
| 'yellow'
| 'yellowBright';
declare type Modifiers =
| 'blink'
| 'bold'
| 'dim'
| 'doubleunderline'
| 'framed'
| 'hidden'
| 'inverse'
| 'italic'
| 'overlined'
| 'reset'
| 'strikethrough'
| 'underline';
declare function styleText(
format:
| ForegroundColors
| BackgroundColors
| Modifiers
| $ReadOnlyArray<ForegroundColors | BackgroundColors | Modifiers>,
text: string,
options?: $ReadOnly<{
stream?: ?stream$Stream,
validStream?: ?boolean,
}>,
): string;
}
type vm$ScriptOptions = {
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module '@react-native-community/cli-server-api' {
@@ -42,6 +41,4 @@ declare module '@react-native-community/cli-server-api' {
},
...
};
declare export const indexPageMiddleware: NextHandleFunction;
}
@@ -1,29 +0,0 @@
/**
* 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
* @format
* @oncall react_native
*/
declare module '@react-native-community/cli-tools' {
declare export class CLIError extends Error {
constructor(msg: string, originalError?: Error | mixed | string): this;
}
declare export const logger: $ReadOnly<{
debug: (...message: Array<string>) => void,
error: (...message: Array<string>) => void,
log: (...message: Array<string>) => void,
info: (...message: Array<string>) => void,
warn: (...message: Array<string>) => void,
...
}>;
declare export const version: $ReadOnly<{
logIfUpdateAvailable: (projectRoot: string) => Promise<void>,
}>;
}
@@ -6,19 +6,18 @@
*
* @flow
* @format
* @oncall react_native
*/
declare module '@react-native-community/cli-types' {
declare export type CommandFunction<Args = Object> = (
declare type CommandFunction<Args = Object> = (
argv: Array<string>,
ctx: Config,
args: Args,
) => Promise<void> | void;
declare export type OptionValue = string | boolean | number;
declare type OptionValue = string | boolean | number;
declare export type CommandOption<T = (ctx: Config) => OptionValue> = {
declare type CommandOption<T = (ctx: Config) => OptionValue> = {
name: string,
description?: string,
parse?: (val: string) => any,
@@ -8,6 +8,6 @@
* @format
*/
declare module '@tsconfig/node18/tsconfig.json' {
declare module '@tsconfig/node22/tsconfig.json' {
declare module.exports: any;
}
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict-local
* @format
* @oncall react_native
*/
declare module 'actual-request-url' {
+6 -1
View File
@@ -6,7 +6,6 @@
*
* @flow
* @format
* @oncall react_native
*/
// The sections between BEGIN GENERATED and END GENERATED are generated
@@ -1016,6 +1015,7 @@ declare module '@babel/traverse' {
isTSDeclareFunction(opts?: Opts): boolean;
isTSDeclareMethod(opts?: Opts): boolean;
isTSEntityName(opts?: Opts): boolean;
isTSEnumBody(opts?: Opts): boolean;
isTSEnumDeclaration(opts?: Opts): boolean;
isTSEnumMember(opts?: Opts): boolean;
isTSExportAssignment(opts?: Opts): boolean;
@@ -1053,6 +1053,7 @@ declare module '@babel/traverse' {
isTSSatisfiesExpression(opts?: Opts): boolean;
isTSStringKeyword(opts?: Opts): boolean;
isTSSymbolKeyword(opts?: Opts): boolean;
isTSTemplateLiteralType(opts?: Opts): boolean;
isTSThisType(opts?: Opts): boolean;
isTSTupleType(opts?: Opts): boolean;
isTSType(opts?: Opts): boolean;
@@ -1333,6 +1334,7 @@ declare module '@babel/traverse' {
assertTSDeclareFunction(opts?: Opts): void;
assertTSDeclareMethod(opts?: Opts): void;
assertTSEntityName(opts?: Opts): void;
assertTSEnumBody(opts?: Opts): void;
assertTSEnumDeclaration(opts?: Opts): void;
assertTSEnumMember(opts?: Opts): void;
assertTSExportAssignment(opts?: Opts): void;
@@ -1370,6 +1372,7 @@ declare module '@babel/traverse' {
assertTSSatisfiesExpression(opts?: Opts): void;
assertTSStringKeyword(opts?: Opts): void;
assertTSSymbolKeyword(opts?: Opts): void;
assertTSTemplateLiteralType(opts?: Opts): void;
assertTSThisType(opts?: Opts): void;
assertTSTupleType(opts?: Opts): void;
assertTSType(opts?: Opts): void;
@@ -1739,6 +1742,7 @@ declare module '@babel/traverse' {
TSDeclareFunction?: VisitNode<BabelNodeTSDeclareFunction, TState>,
TSDeclareMethod?: VisitNode<BabelNodeTSDeclareMethod, TState>,
TSEntityName?: VisitNode<BabelNodeTSEntityName, TState>,
TSEnumBody?: VisitNode<BabelNodeTSEnumBody, TState>,
TSEnumDeclaration?: VisitNode<BabelNodeTSEnumDeclaration, TState>,
TSEnumMember?: VisitNode<BabelNodeTSEnumMember, TState>,
TSExportAssignment?: VisitNode<BabelNodeTSExportAssignment, TState>,
@@ -1791,6 +1795,7 @@ declare module '@babel/traverse' {
TSSatisfiesExpression?: VisitNode<BabelNodeTSSatisfiesExpression, TState>,
TSStringKeyword?: VisitNode<BabelNodeTSStringKeyword, TState>,
TSSymbolKeyword?: VisitNode<BabelNodeTSSymbolKeyword, TState>,
TSTemplateLiteralType?: VisitNode<BabelNodeTSTemplateLiteralType, TState>,
TSThisType?: VisitNode<BabelNodeTSThisType, TState>,
TSTupleType?: VisitNode<BabelNodeTSTupleType, TState>,
TSType?: VisitNode<BabelNodeTSType, TState>,
+57 -17
View File
File diff suppressed because one or more lines are too long
-104
View File
@@ -1,104 +0,0 @@
/**
* 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
* @format
* @oncall react_native
*/
declare module 'chalk' {
declare type TemplateStringsArray = $ReadOnlyArray<string>;
declare type Level = $Values<{
None: 0,
Basic: 1,
Ansi256: 2,
TrueColor: 3,
...
}>;
declare type ChalkOptions = {
enabled?: boolean,
level?: Level,
};
declare type ColorSupport = {
level: Level,
hasBasic: boolean,
has256: boolean,
has16m: boolean,
};
declare type Chalk = {
(...text: string[]): string,
(text: TemplateStringsArray, ...placeholders: string[]): string,
Instance(options?: ChalkOptions): Chalk,
level: Level,
rgb(r: number, g: number, b: number): Chalk,
hsl(h: number, s: number, l: number): Chalk,
hsv(h: number, s: number, v: number): Chalk,
hwb(h: number, w: number, b: number): Chalk,
bgHex(color: string): Chalk,
bgKeyword(color: string): Chalk,
bgRgb(r: number, g: number, b: number): Chalk,
bgHsl(h: number, s: number, l: number): Chalk,
bgHsv(h: number, s: number, v: number): Chalk,
bgHwb(h: number, w: number, b: number): Chalk,
hex(color: string): Chalk,
keyword(color: string): Chalk,
+reset: Chalk,
+bold: Chalk,
+dim: Chalk,
+italic: Chalk,
+underline: Chalk,
+inverse: Chalk,
+hidden: Chalk,
+strikethrough: Chalk,
+visible: Chalk,
+black: Chalk,
+red: Chalk,
+green: Chalk,
+yellow: Chalk,
+blue: Chalk,
+magenta: Chalk,
+cyan: Chalk,
+white: Chalk,
+gray: Chalk,
+grey: Chalk,
+blackBright: Chalk,
+redBright: Chalk,
+greenBright: Chalk,
+yellowBright: Chalk,
+blueBright: Chalk,
+magentaBright: Chalk,
+cyanBright: Chalk,
+whiteBright: Chalk,
+bgBlack: Chalk,
+bgRed: Chalk,
+bgGreen: Chalk,
+bgYellow: Chalk,
+bgBlue: Chalk,
+bgMagenta: Chalk,
+bgCyan: Chalk,
+bgWhite: Chalk,
+bgBlackBright: Chalk,
+bgRedBright: Chalk,
+bgGreenBright: Chalk,
+bgYellowBright: Chalk,
+bgBlueBright: Chalk,
+bgMagentaBright: Chalk,
+bgCyanBright: Chalk,
+bgWhiteBrigh: Chalk,
supportsColor: ColorSupport,
};
declare module.exports: Chalk;
}
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'chrome-launcher' {
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'chromium-edge-launcher' {
+1 -2
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
* @generated
*/
@@ -317,7 +316,7 @@ declare module 'commander' {
*/
formatHelp(cmd: Command, helper: Help): string;
}
export type HelpConfiguration = $Rest<Help, {...}>;
export type HelpConfiguration = Partial<Help>;
export interface ParseOptions {
from: 'node' | 'electron' | 'user';
}
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'connect' {
+20
View File
@@ -0,0 +1,20 @@
/**
* 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
* @format
*/
declare module 'cross-spawn' {
import * as child_process from 'child_process';
type spawn = typeof child_process.spawn & {
spawn: spawn,
sync: typeof child_process.spawnSync,
};
declare module.exports: spawn;
}
-28
View File
@@ -1,28 +0,0 @@
/**
* 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
* @format
*/
// https://github.com/visionmedia/debug
// https://www.npmjs.com/package/debug
interface DebugFN {
(...args: Array<mixed>): void;
enable(match: string): void;
disable(): void;
enabled: () => boolean;
}
declare module 'debug' {
declare module.exports: {
(namespace: string): DebugFN,
enable(match: string): void,
disable(): void,
enabled: () => boolean,
};
}
+54
View File
@@ -0,0 +1,54 @@
/**
* 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
* @format
*/
// stubbed from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/451dc8fc19383bc12af59522020e571957f1684e/types/debug/index.d.ts
declare module 'debug' {
declare interface Formatters {
[formatter: string]: (v: mixed) => string;
}
declare type Debugger = {|
(format: mixed, ...args: Array<mixed>): void,
color: string,
diff: number,
enabled: boolean,
log: (format: mixed, ...args: Array<mixed>) => mixed,
namespace: string,
destroy: () => boolean,
extend: (namespace: string, delimiter?: string) => Debugger,
|};
declare type Debug = {|
(namespace: string): Debugger,
coerce: (val: mixed) => mixed,
disable: () => string,
enable: (namespaces: string) => void,
enabled: (namespaces: string) => boolean,
formatArgs: (args: Array<mixed>) => void,
log: (format: mixed, ...args: Array<mixed>) => mixed,
selectColor: (namespace: string) => string | number,
// this should be of type require('ms') but it doesn't play nicely with eslint
// unless we add ms to dependencies, which we don't want to do
humanize: $FlowFixMe,
names: RegExp[],
skips: RegExp[],
formatters: Formatters,
inspectOpts?: {
hideDate?: boolean | number | null,
colors?: boolean | number | null,
depth?: boolean | number | null,
showHidden?: boolean | number | null,
...
},
|};
declare module.exports: Debug;
}
@@ -8,12 +8,7 @@
* @format
*/
export default {
primary: '#1292B4',
white: '#FFF',
lighter: '#F3F3F3',
light: '#DAE1E7',
dark: '#444',
darker: '#222',
black: '#000',
};
// Types for Electron when required as a Node package.
declare module 'electron' {
declare module.exports: string;
}
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
// Modified from flow-typed repo:
-1
View File
@@ -3,7 +3,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'jest-diff' {
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'jest-snapshot' {
+37 -29
View File
@@ -4,18 +4,16 @@
* 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
* @flow
* @format
* @oncall react_native
*/
// Modified from https://raw.githubusercontent.com/flow-typed/flow-typed/master/definitions/npm/jest_v29.x.x/flow_v0.134.x-/jest_v29.x.x.js
// Modifications are explained inline by comments beginning with `// MODIFIED`.
// MODIFIED: Added ESLint suppression comment - no-unused-vars doesn't understand declaration files
/* eslint-disable no-unused-vars */
type JestMockFn<TArguments: $ReadOnlyArray<any>, TReturn> = {
type JestMockFn<TArguments: $ReadOnlyArray<mixed>, TReturn> = {
(...args: TArguments): TReturn,
/**
* An object for introspecting mock calls
@@ -219,7 +217,7 @@ type JestStyledComponentsMatcherValue =
| string
| JestAsymmetricEqualityType
| RegExp
| typeof undefined;
| void;
type JestStyledComponentsMatcherOptions = {
media?: string,
@@ -620,14 +618,16 @@ type SnapshotDiffType = {
...
};
type JestExpectNotType = JestExpectType &
EnzymeMatchersType &
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType &
SnapshotDiffType;
interface JestExpectType {
not: JestExpectType &
EnzymeMatchersType &
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType &
SnapshotDiffType;
not: JestExpectNotType;
/**
* If you have a mock function, you can use .lastCalledWith to test what
* arguments it was last called with.
@@ -755,13 +755,11 @@ interface JestExpectType {
* specific arguments.
*/
toHaveBeenCalledWith(...args: Array<any>): void;
toBeCalledWith(...args: Array<any>): void;
/**
* Use .toHaveBeenLastCalledWith to ensure that a mock function was last called
* with specific arguments.
*/
toHaveBeenLastCalledWith(...args: Array<any>): void;
lastCalledWith(...args: Array<any>): void;
/**
* Check that an object has a .length property and it is set to a certain
* numeric value.
@@ -812,6 +810,8 @@ interface JestExpectType {
toThrowErrorMatchingInlineSnapshot(snapshot?: string): void;
}
type JestRequireActual = <T>(m: $Flow$ModuleRef<T> | string) => T;
type JestRequireMock = (moduleName: string) => any;
type JestObjectType = {
/**
* Disables automatic mocking in the module loader.
@@ -854,6 +854,10 @@ type JestObjectType = {
* Returns the number of fake timers still left to run.
*/
getTimerCount(): number,
/**
* Returns the time in ms of the current clock.
*/
now(): number,
/**
* Set the current system time used by fake timers.
* Simulates a user changing the system clock while your program is running.
@@ -911,12 +915,12 @@ type JestObjectType = {
* Returns the actual module instead of a mock, bypassing all checks on
* whether the module should receive a mock implementation or not.
*/
requireActual<T>(m: $Flow$ModuleRef<T> | string): T,
requireActual: JestRequireActual,
/**
* Returns a mock module instead of the actual module, bypassing all checks
* on whether the module should be required normally or not.
*/
requireMock(moduleName: string): any,
requireMock: JestRequireMock,
/**
* Resets the module registry - the cache of all required modules. This is
* useful to isolate modules where local state might conflict between tests.
@@ -1040,10 +1044,12 @@ declare var describe: {
* @param {table} table of Test
*/
each(
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
...table:
| $ReadOnlyArray<$ReadOnlyArray<mixed> | mixed>
| [$ReadOnlyArray<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>,
fn?: (...args: $ReadOnlyArray<any>) => ?Promise<mixed>,
timeout?: number,
) => void,
...
@@ -1129,7 +1135,9 @@ declare var it: {
* @param {table} table of Test
*/
each(
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
...table:
| $ReadOnlyArray<$ReadOnlyArray<mixed> | mixed>
| [$ReadOnlyArray<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>,
@@ -1222,19 +1230,19 @@ type JestPrettyFormatPlugin = {
type JestPrettyFormatPlugins = Array<JestPrettyFormatPlugin>;
type JestExtendedExpectType = JestExpectType &
JestPromiseType &
EnzymeMatchersType &
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType &
SnapshotDiffType;
/** The expect function is used every time you want to test a value */
declare var expect: {
/** The object that you want to make assertions against */
(
value: any,
): JestExpectType &
JestPromiseType &
EnzymeMatchersType &
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType &
SnapshotDiffType,
(value: any): JestExtendedExpectType,
/** Add additional Jasmine matchers to Jest's roster */
extend(matchers: {[name: string]: JestMatcher, ...}): void,
/** Add a module that formats application-specific data structures. */
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
// Modified from flow-typed repo:
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'open' {
-1
View File
@@ -3,7 +3,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare type Print = (value: mixed) => string;
declare type Indent = (value: string) => string;
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict-local
* @format
* @oncall react_native
*/
declare module 'selfsigned' {
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'serve-static' {
+1 -1
View File
@@ -1,8 +1,8 @@
/**
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
* @flow strict
* @format
*/
declare module 'signedsource' {
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'tinybench' {
+5
View File
@@ -48,6 +48,11 @@ declare module 'typescript' {
file: SourceFile,
start?: number,
): $ReadOnly<{line: number, character: number}>,
convertCompilerOptionsFromJson(
jsonOptions: any,
basePath: string,
configFileName?: string,
): {options: Object, errors: Diagnostic[]},
ModuleResolutionKind: typeof ModuleResolutionKind,
...
};
-1
View File
@@ -6,7 +6,6 @@
*
* @flow strict-local
* @format
* @oncall react_native
*/
// Very incomplete types for the undici package.

Some files were not shown because too many files have changed in this diff Show More