Commit Graph

37220 Commits

Author SHA1 Message Date
Christian Falch a97e38029d Added missing define to target .reactRuntime
The target needs the HERMES_ENABLE_DEBUGGER flag in debug just like .reactHermes does.

This commit fixes this by adding the define.
2025-06-17 14:28:37 +02:00
Riccardo Cipolleschi 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 Cipolleschi 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 Duplessis 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 Yung 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 Yung 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 Yung 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 Nara 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 Corti 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 Datsenko 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 Corti 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án 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 Acthernoene 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án 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 Kesarwani 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 Corti 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án 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 Purrer 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 Cipolleschi 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 Corti 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 Vacca 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 Vacca 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 Vacca 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 Klotz 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
generatedunixname89002005287564 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 Andro 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 Gerleman 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śniewski 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 Nara 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 Corti 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án 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 Corti 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) Cohen 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 Corti 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 Kafara 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 Yung 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 Vanderwerff 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 Yung 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 Yung 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 Yung 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 Wei 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 Gerleman 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 Lesiutin 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án 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 Rozell 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 Corti 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 Cipolleschi 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łecki 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 Cipolleschi 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 Cipolleschi 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