Compare commits

...
2106 Commits
Author SHA1 Message Date
React Native Bot 99d714c22d Release 0.80.2
#publish-packages-to-npm&latest
2025-07-24 13:59:34 +00:00
Nick GerlemanandRiccardo Cipolleschi 95007080ff Fix build_android GHA Job (#52694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52694

build_android job is always failing, with this assertion. Seems like find/replace in D78484060 gone wrong?

Changelog: [Internal]

Reviewed By: sbuggay

Differential Revision: D78534334

fbshipit-source-id: 291bdd01b41fa6efea00ed63a0dee8bdb14cbc3a
2025-07-24 10:19:14 +01:00
Riccardo Cipolleschi cf48e47982 [LOCAL] Bump Hermes 2025-07-24 08:54:27 +01:00
Riccardo Cipolleschi 183be8e12c Add the ENTERPRISE_REPOSITORY env var to let user consume artifacts from their personal maven mirror 2025-07-24 08:50:21 +01:00
Nicola CortiandRiccardo Cipolleschi 8e47e5486f RNGP - Add support for exclusiveEnterpriseRepository (#52378)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52378

This adds a Gradle property called `exclusiveEnterpriseRepository`
that users can set in their `android/gradle.properties` as such:

```diff
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true

+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
```

This will remove all the existing Maven repositories and only use the internal mirror they have.

Changelog:
[Android] [Added] - RNGP - Add support for `exclusiveEnterpriseRepository` to specify an internal Maven mirror.

Reviewed By: mdvacca

Differential Revision: D77667573

fbshipit-source-id: 835004d2ae7aa4e250b6f7a88a41918b573f5bd5
2025-07-24 08:41:14 +01:00
Jay KoutavasandRiccardo Cipolleschi d8b5a5570e 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-07-24 08:40:33 +01:00
Riccardo Cipolleschi f40fd43c00 Fix Windows CI (#52666)
Summary:
As per [this issue](https://github.com/actions/runner-images/issues/12416), Windows machine doesn't have access to D: drive anymore

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: huntie

Differential Revision: D78484060

Pulled By: cipolleschi

fbshipit-source-id: 36d844f9d7d69f1d74a154b019307cc1e269ad66
2025-07-24 08:39:58 +01:00
Fabrizio Cucci fd8a0f323b Update Podfile.lock
Changelog: [Internal]
2025-07-03 11:30:27 +01:00
React Native Bot d0843bd53c Release 0.80.1
#publish-packages-to-npm&latest
2025-06-30 16:04:24 +00:00
buschcoandReact Native Bot b2cc82ba31 publish index.js.flow instead of index.flow.js (#52179)
Summary:
I think in https://github.com/facebook/react-native/commit/50667eceb1be4771375d6a3cc2f4e42d4d8aad3a the file name was mixed up. Instead of `index.flow.js` it should be `index.js.flow` (see https://github.com/facebook/react-native/blob/main/packages/react-native/index.js.flow)

Should fix https://github.com/facebook/react-native/issues/51885

## Changelog:

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

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

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

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

Test Plan:
Steps to reproduce

1. Setup a react-native project with flow (or clone https://github.com/buschco/react-native-flow + `cd ReproducerApp && npm i`)
2. `import {Alert} from 'react-native'` -> `Alert` has type `any`
3. add `index.js.flow` File (https://github.com/facebook/react-native/blob/v0.79.3/packages/react-native/index.js.flow) to `node_modules/react-native/index.js.flow` -> `Alert` no longer `any`

Reviewed By: christophpurrer

Differential Revision: D77052871

Pulled By: robhogan

fbshipit-source-id: 32b0052a9d96486aff66a1f6e4577ff62cbcd97e
2025-06-23 17:59:31 +00:00
Aswin AndroandReact Native Bot 2cb1f8e4e3 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-23 16:10:27 +00:00
Riccardo CipolleschiandFabrizio Cucci 1c39b2abc3 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-23 16:47:51 +01:00
Nicola CortiandReact Native Bot 4d346e2b2d 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-23 15:46:14 +00:00
Vladimir IlievandReact Native Bot 69a5ad5d8c 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-23 15:44:40 +00:00
Alex HuntandFabrizio Cucci aeab69a744 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-06-23 13:51:07 +01:00
Nicola Corti 6f3948fc48 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 13:58:52 +01:00
Nicola Corti 9fe0c1a2b7 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-16 10:41:23 +01:00
Nicola Corti bff874e7c7 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-16 10:41:23 +01:00
React Native Bot 6c92459434 [LOCAL] Bump Podfile.lock 2025-06-12 17:00:57 +00:00
React Native Bot 84ebbb54f5 Release 0.80.0
#publish-packages-to-npm&latest
2025-06-12 15:27:37 +00:00
React Native Bot effe3fd9e0 [LOCAL] Bump Podfile.lock 2025-06-09 17:51:31 +00:00
React Native Bot 6e8aa89830 Release 0.80.0-rc.5
#publish-packages-to-npm&next
2025-06-09 16:23:01 +00:00
Kacper KafaraandReact Native Bot 4b65d0ee34 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 14:02:39 +00:00
Leevi AattolaandReact Native Bot a1bad641bc 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-09 14:00:47 +00:00
Gabriel DonadelandReact Native Bot 4c9490c702 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-09 13:59:33 +00:00
Tomasz ŻelawskiandReact Native Bot 0a9ea3932a 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-09 13:57:31 +00:00
Nicola CortiandReact Native Bot 3d06f9e449 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-09 13:55:22 +00:00
React Native Bot c72f490766 [LOCAL] Bump Podfile.lock 2025-06-02 17:53:41 +00:00
React Native Bot dffb675e70 Release 0.80.0-rc.4
#publish-packages-to-npm&next
2025-06-02 16:25:27 +00:00
Jakub PiaseckiandReact Native Bot 302f3a4e5a 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-06-02 14:15:53 +00:00
Alex HuntandReact Native Bot 5cc63aa9ea 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-06-02 14:10:39 +00:00
React Native Bot baa421decc [LOCAL] Bump Podfile.lock 2025-05-26 17:22:43 +00:00
React Native Bot e7901a720b Release 0.80.0-rc.3
#publish-packages-to-npm&next
2025-05-26 15:55:04 +00:00
Nicola CortiandReact Native Bot cd8dec00a9 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 14:16:54 +00:00
Alex HuntandGitHub 647af1c4ca Update debugger-frontend from bc635fa...343405b (S523384 mitigation) (#51564) 2025-05-26 08:56:43 +01:00
Tomasz ZawadzkiandReact Native Bot 0dd583f40d 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-23 09:57:15 +00:00
Dawid MałeckiandReact Native Bot 869c03e923 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-23 09:55:22 +00:00
Phil PluckthunandReact Native Bot 24131c6812 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-23 09:53:20 +00:00
Krystof WoldrichandReact Native Bot ad1ce87b93 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-23 09:51:15 +00:00
Joe VilchesandGitHub fb62355555 Remove useEditTextStockAndroidBehavior and resolve old android blur issue (#51338) (#51462)
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-23 10:47:49 +01:00
riteshshukla04andReact Native Bot 068a6ba0fd 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-23 09:42:16 +00:00
Dawid MałeckiandRiccardo Cipolleschi f9a851fc31 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-20 14:00:19 +01:00
React Native Bot d1b5793c1b [LOCAL] Bump Podfile.lock 2025-05-19 20:09:16 +00:00
React Native Bot b35291cbb8 Release 0.80.0-rc.2
#publish-packages-to-npm&next
2025-05-19 18:06:14 +00:00
Dawid MałeckiandJorge Cohen 1cc46014d6 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-19 16:59:19 +01:00
Alan LeeandReact Native Bot 5b630d224a 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-19 15:52:23 +00:00
Christian FalchandReact Native Bot a49bf3722b 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-19 15:43:31 +00:00
Dawid MałeckiandReact Native Bot 9858e1e1dc 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-19 15:41:17 +00:00
Jakub PiaseckiandReact Native Bot 7749879647 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-19 15:39:22 +00:00
Alex HuntandReact Native Bot 2374d0ab36 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-19 15:33:35 +00:00
Alan LeeandReact Native Bot 0e3764c8aa 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-19 15:32:24 +00:00
Christian FalchandReact Native Bot 84cf4d8869 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 15:22:12 +00:00
Jakub PiaseckiandReact Native Bot 77021b600e 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 14:52:41 +00:00
Christian FalchandReact Native Bot 0a76d9fb87 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-16 14:15:12 +00:00
Ritesh ShuklaandReact Native Bot af85c4c810 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-16 10:14:04 +00:00
Christian FalchandReact Native Bot 51d10578dc 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-16 10:07:16 +00:00
React Native Bot 033e6b1f9c [LOCAL] Bump Podfile.lock 2025-05-12 17:41:07 +00:00
React Native Bot d2168e9415 Release 0.80.0-rc.1
#publish-packages-to-npm&next
2025-05-12 16:16:21 +00:00
Riccardo CipolleschiandGitHub 79e2298230 [RN][Release] Fix set-rn-version to consider also the codegen snapshot tests (#51156) 2025-05-12 15:17:36 +01:00
Jakub PiaseckiandReact Native Bot 619a0db17f 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-12 14:14:01 +00:00
Dawid MałeckiandReact Native Bot 241b1a6462 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-12 13:52:49 +00:00
Dawid MałeckiandReact Native Bot e8b14c7b06 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-12 13:51:37 +00:00
Dawid MałeckiandReact Native Bot 8b8e1055ae 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-12 13:50:13 +00:00
Riccardo CipolleschiandGitHub cdf7d76101 [RN][Releases] Fix draft creation (#51158) 2025-05-12 14:49:17 +01:00
Kacper RożniataandReact Native Bot 1c22a46cf6 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-12 13:41:22 +00:00
ismarbesicandReact Native Bot 7ce8f12549 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-12 13:39:24 +00:00
Jakub PiaseckiandReact Native Bot ce4d7e5d52 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 13:34:50 +00:00
Dawid MałeckiandReact Native Bot d5c6afaae0 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-12 13:18:20 +00:00
React Native Bot f70a146699 [LOCAL] Bump Podfile.lock 2025-05-07 11:41:41 +00:00
React Native Bot d9c2857e59 Release 0.80.0-rc.0
#publish-packages-to-npm&next
2025-05-07 10:17:06 +00:00
Jorge Cohen cbf1710fd5 Bump hermes version 2025-05-06 11:21:57 +01: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
Ruslan LesiutinandFacebook GitHub Bot 81e490164f Update debugger-frontend from 3adf51a...97e9912 (#49784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49784

Changelog: [Internal] - Update `react-native/debugger-frontend` from 3adf51a...97e9912

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/3adf51aa915c2deb26f5d373751a15b4d0c8f259...97e9912605ce73b06f67fc607c1a5c434a67d6de).

Reviewed By: huntie

Differential Revision: D70487787

fbshipit-source-id: 6f3b47a254f45b770798ff3af8ade1c9a6d7fc64
2025-03-03 06:08:30 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot 515ff1e626 fix: return nullptr when USE_THIRD_PARTY_JSC is set to true (#49781)
Summary:
When setting `USE_THIRD_PARTY_JSC=1`, we don't return anything from createJSRuntimeFactory function:

![CleanShot 2025-03-03 at 13 05 24@2x](https://github.com/user-attachments/assets/090ca47a-77f8-4a1b-9171-79b5e4ce91fb)

It's meant to be overwritten, but we must satisfy the compiler.

## Changelog:

[IOS] [FIXED] - return nullptr when USE_THIRD_PARTY_JSC is set to true

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

Test Plan: CI Green

Reviewed By: cortinico

Differential Revision: D70486837

Pulled By: cipolleschi

fbshipit-source-id: c09622f75608dc203d41167fc375a000a2f12e37
2025-03-03 06:01:23 -08:00
Saad NajmiandFacebook GitHub Bot 6bc5ddea3e fix: avoid race condition crash in [RCTDataRequestHandler invalidate] (#49705)
Summary:
Upstreaming a fix by ntre that fixes a crash we saw internally related to `[_queue cancelAllOperations]`.

>Calling [_queue cancelAllOperations] will release all references to any active operations.
>If the blocks of those operations have a reference to itself, it will result in dangling pointers, which could conceptually trigger a later crash if there's a race between the operation completing and it being pulled out of the queue.
>
>Add explicit strong reference while block is running.
>For good measure, fix same pattern also in RCTFileRequestHandler.
>
>Note: separately, that this code is passing the op itself as a requestToken to [delegate URLRequest:] methods is suspect. That delegate can retain said token.

## Changelog:

[IOS] [FIXED] - avoid race condition crash in [RCTDataRequestHandler invalidate]

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

Test Plan: Tested internally, we no longer saw the crash after this fix.

Reviewed By: javache

Differential Revision: D70314889

Pulled By: cipolleschi

fbshipit-source-id: ebcecb4675bd1dda3d9ee60d69967feb4e05e11b
2025-03-03 05:58:07 -08:00
Jakub PiaseckiandFacebook GitHub Bot 13ac1a9a88 Align FlatList types with OSS (#49713)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49713

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70317013

fbshipit-source-id: f131cb204135a2a41aa7d3bafe13fc7b44446036
2025-03-03 04:06:39 -08:00
Dawid MałeckiandFacebook GitHub Bot 569c01e141 Add Text to buildTypes and align Flow with TS (#49774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49774

Changelog:
[Internal] - Added Text to buildTypes and aligned Flow with TS

Reviewed By: huntie

Differential Revision: D70324061

fbshipit-source-id: 2a032317acdc0a119f5d33da86a40461f8c60ab1
2025-03-03 04:02:18 -08:00
Alex HuntandFacebook GitHub Bot 2acb407562 Update references to relocated react-native-devtools-frontend repo (#49777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49777

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D70485084

fbshipit-source-id: d6243b3bc607af39c67c3f1cebdf0b53a3502538
2025-03-03 03:49:04 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot ae7bbe06c9 fix: make React Native work without AppDelegate window property (#49748)
Summary:
This PR makes React Native not relying on the `window` property in AppDelegate. When running in SwiftUI lifecycle mode / SceneDelegate mode there is window property on AppDelegate. This PR fixes crashes that happen because RN asserts window property is there.

## Changelog:

[IOS] [FIXED] - make React Native work without AppDelegate window property

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

Test Plan: CI Green

Reviewed By: javache

Differential Revision: D70389691

Pulled By: cipolleschi

fbshipit-source-id: fe39f123b47014ba91a080239ccd298192c92a6a
2025-03-03 03:47:46 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 7ccb1e1fb0 Avoid the creation of separate folders for separate artifacts (#49760)
Summary:
When downloading artifacts using a pattern, GHA, by default, creates a folder for each artifacts and copies the artifacts in that folder.
This breaks the maven publishing which expects the artifacts in the `artifact` folder and not i a subfolder.

The `merge-multiple` option allow for the artifacts to be downloaded in the specified folder, without the extra folder in the path

## Changelog:
[Internal] - Avoid the creation of intermediate folder when downloading the artifacts

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

Test Plan:
GHA

<img width="791" alt="Screenshot 2025-03-02 at 11 08 33" src="https://github.com/user-attachments/assets/cfc85b27-117f-4d21-97ef-67493615a5a1" />

Reviewed By: fabriziocucci

Differential Revision: D70462254

Pulled By: cipolleschi

fbshipit-source-id: ed310a90bcdea55e466d4d71942a25abc6e6986a
2025-03-03 02:10:15 -08:00
Vitali ZaidmanandFacebook GitHub Bot 21c85ef52d batch debug logging for cdp messages (#49726)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49726

The `InspectorProxy` debug logging became incredibly spammy making it almost unuseful unless the output is manipulated so this commit batches all these cdp messages and only desplays how many were received in the span of 5s. If no messages are received, the throttle is not triggered.

To get the actual CDP messages logged, we still log these to `Metro:InspectorProxyCDPMessages`.

Changelog:
[General][Internal] batch debug logging for cdp messages

Reviewed By: robhogan

Differential Revision: D70324724

fbshipit-source-id: a269302f52e18af6c4be651758c042596abdbad8
2025-03-03 01:49:39 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 42a7c62a6a Ensure that the artifacts have the right extension (#49755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49755

The artifacts are uploaded without the .tar.gz extension and the gradle script fails to upload them to sonatype.

This change adds the extensions.

## Changelog:
[Internal] -

Reviewed By: sammy-SC

Differential Revision: D70443149

fbshipit-source-id: c16d1842688b82ac216ffb90ecf2b75f562cca64
2025-03-01 13:05:59 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 0bb6243550 Compress xcframework to let sonatype sign it (#49753)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49753

Sonatype cannot sign folders. It needs a file to be signed.
To make it happen, we are compressing the xcframeworks and the dSYM with tar, and we are uploading those files instead of the folders

I also observed that the cache keys were not computed correctly, so I'm fixing them.

## Changelog:
[Internal] - use tar.gz instad of folders for dSYM and xcframeworks

Reviewed By: bvanderhoof, mofeiZ

Differential Revision: D70409314

fbshipit-source-id: 20a5ee4f24b644f4f087974ad6b0831d5769b1d9
2025-02-28 14:00:43 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 33c0112b63 Configure gradle to publish RNDependencies to Maven (#49749)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49749

This change configures gradle and CI to properly publish the RNDependencies artifacts to Maven Central

## Changelog
[Internal] - Configure gradle to publish on Maven Central

Reviewed By: cortinico

Differential Revision: D70390191

fbshipit-source-id: fc1e1070325240584cb07fb17e58118c4c583fa9
2025-02-28 09:05:37 -08:00
Riccardo CipolleschiandFacebook GitHub Bot c99b2a4854 Connect the prebuild-ios workflow with other workflows (#49731)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49731

This change runs the prebuilds in all the workflows we need:
- test-all
- nightlies
- create-release

## Changelog:
[Internal] - connect the rebuild-ios workflow with the other workflows

Reviewed By: cortinico

Differential Revision: D70331579

fbshipit-source-id: 6505a32672d43d06e29e68d37bd0ceff21bd7386
2025-02-28 09:05:37 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 2ff0220c8e Add job to build the XCFramework for ios prebuilds (#49563)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49563

This change introduces a job to prebuild iOS XCFrameworks.

## Changelog:
[Internal] - Create prepare artifacts workflows

Reviewed By: cortinico

Differential Revision: D69924325

fbshipit-source-id: f2241b1db715ae7c42ce32eda55a54efa6985a9d
2025-02-28 09:05:37 -08:00
Riccardo CipolleschiandFacebook GitHub Bot da88bf0030 Add job to build the slices for ios prebuilds (#49528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49528

This change introduces a job to prebuild iOS slices.

## Changelog:
[Internal] - Create prepare artifacts workflows

Reviewed By: cortinico

Differential Revision: D69855542

fbshipit-source-id: 54d5b24b55f9e7bebdbb201073524dc4f3748e07
2025-02-28 09:05:37 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 3c03e2b9f5 Add prepare prebuild reusable workflow (#49530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49530

This change introduces the workflow to prebuild iOS artifacts.

This will be a reusable workflow, so we can then call it as it is from test-all, nightlies and publish-release

## Changelog:
[Internal] - Create prepare artifacts workflows

Reviewed By: cortinico

Differential Revision: D69854568

fbshipit-source-id: 5dc532fa564fe7e0987ba5d133da42e04237c3cc
2025-02-28 09:05:37 -08:00
Jakub PiaseckiandFacebook GitHub Bot 167a1a30da Improve text measurement for multiline TextInput on iOS (#49711)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49711

Changelog: [IOS][CHANGED] - Moved workaround for multiline text measurement with `maximumNumberOfLines` earlier in the pipeline

Reviewed By: huntie

Differential Revision: D70314397

fbshipit-source-id: ef7dbf0c4bb3d5053328d81b7d5b8208e92ee7f5
2025-02-28 07:52:03 -08:00
Samuel SuslaandFacebook GitHub Bot 2b93377a9c add e2e test for AppState module (#49680)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49680

changelog: [internal]

add an end to end test for AppState module.

Reviewed By: rshest

Differential Revision: D70184850

fbshipit-source-id: ead1388ceb1018e7615e50f846f3c95224be97d0
2025-02-28 07:41:47 -08:00
Iwo PlazaandFacebook GitHub Bot 5fc2484440 Align useAnimatedValue with OSS types (#49643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49643

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Aligns `useAnimatedValue.js` with its manual .d.ts types.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70096210

fbshipit-source-id: c3cd517eccf1cb68400772ddde6e5891861c927d
2025-02-28 06:33:21 -08:00
Vitali ZaidmanandFacebook GitHub Bot 0289e4061e fix race condition in getPages test for device disconnection (#49741)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49741

While the test delay `PAGES_POLLING_DELAY` is usually enough to be equal to `PAGES_POLLING_INTERVAL`, in some cases we need extra time to sync that with the polling in `Devices.js`.

Changelog:
[General][Internal] - fix test

Reviewed By: huntie

Differential Revision: D70384823

fbshipit-source-id: ccb18884d32dc27636dbbb3a9786412056f90830
2025-02-28 06:24:03 -08:00
Rubén NorteandFacebook GitHub Bot 84a1211773 Strip all "bom" types that are actually not defined in RN (#49730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49730

Changelog: [internal]

This removes all the types from "bom" that are actually not implemented in RN. For now, we're just stripping whole interfaces and not looking into specific methods/properties in interfaces that we do implement but not 100%.

`Performance`, `PerformanceObserver`, `MutationObserver` and `IntersectionObserver` are implemented but not stable yet, so they aren't exposed as globals in the types.

Reviewed By: huntie

Differential Revision: D70329185

fbshipit-source-id: 63bac619e100ca66b41df071df80dfa73d0f9651
2025-02-28 05:58:45 -08:00
Rubén NorteandFacebook GitHub Bot 52713eeff3 Refactor IntersectionObserver, MutationObserver and PerformanceObserver options as interfaces (#49737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49737

Changelog: [internal]

Just a minor change to align with similar other option bags and TypeScript definitions.

Reviewed By: huntie

Differential Revision: D70355669

fbshipit-source-id: 37c44338c7b358eb2d25e8a14c75a78545b34bf1
2025-02-28 05:58:45 -08:00
Rubén NorteandFacebook GitHub Bot eb877cba39 Remove references to service workers in RN globals (#49727)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49727

Changelog: [internal]

React Native doesn't define or use Service Workers, so this entire section for types is unnecessary.

Reviewed By: cortinico

Differential Revision: D70327703

fbshipit-source-id: b998eade21d19ed124824cb255a37cb9e805d151
2025-02-28 05:58:45 -08:00
Rubén NorteandFacebook GitHub Bot e808011b26 Move environment types (globals) from flow-typed/environment to src/types (#49724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49724

Changelog: [internal]

This moves the type definitions for the globals defined by React Native from the repository root to the `react-native` package, in the same directory as the existing TypeScript definitions. This will make it easier for end users to configure the globals from RN using the right source of truth.

Reviewed By: huntie

Differential Revision: D70322032

fbshipit-source-id: 932df75ded0c254f2acb32e865cbbb9474c94159
2025-02-28 05:58:45 -08:00
Jakub PiaseckiandFacebook GitHub Bot be59427448 Align ProgressBarAndroid types with OSS (#49663)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49663

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70176068

fbshipit-source-id: 0a1febb390affc2a3123e49e88b039b390a34387
2025-02-28 05:46:48 -08:00
Iwo PlazaandFacebook GitHub Bot 42cea2dc9c (reattempt) Use implicit namespace to better align Animated module with OSS types (#49685)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49685

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70237239

fbshipit-source-id: f552490cb6bb721c6163272689ec9b6c68386574
2025-02-28 05:03:55 -08:00
Nicola CortiandFacebook GitHub Bot c4e952ea84 Temporarily disable Configuration Caching on CI (#49742)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49742

Seems like publishing jobs are not happy with Gradle Config Caching.
I'm disabling it for now till we find out what's the root cause.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D70385662

fbshipit-source-id: 532c46ea1e578bab5f3e5d6814a7f7193e67a7ad
2025-02-28 04:25:58 -08:00
Dawid MałeckiandFacebook GitHub Bot 8919fc3243 Set optional ref on View and split View Props (#49725)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49725

Changelog:
[Internal] - Set optional ref on View and split View Props

Reviewed By: huntie

Differential Revision: D70327820

fbshipit-source-id: 2021125b0aff1497df50c2be73c2ecfc7e8f1157
2025-02-28 01:15:07 -08:00
Shawn DempseyandFacebook GitHub Bot d0a101fbea Add guard for custom module provider lookup in TMManager (#49738)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49738

**Context**

- D70012142 added TM module provider support
- This was causing RN MacOS to silently fail to load any platform modules since it didn't implement the delegate method

Changelog:
[iOS][Fixed] - Add guard for custom module provider lookup in TMManager

Reviewed By: sbuggay

Differential Revision: D70357542

fbshipit-source-id: 5b338616655ecb84cdb3c60e243fdb99444af657
2025-02-27 18:41:41 -08:00
generatedunixname89002005232357andFacebook GitHub Bot 587d849c23 Revert D70200854
Summary:
This diff reverts D70200854
To revert for S494669

#bypass-github-export-checks
bypass-github-export-checks

Reviewed By: NickGerleman

Differential Revision: D70347605

fbshipit-source-id: 454cb0a8f5a7562cd6602c32f4978b129821730c
2025-02-27 15:42:38 -08:00
Joe VilchesandFacebook GitHub Bot 144f44f653 Reorder the contents in ReactAccessibilityDelegate.java to be more logical (#49735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49735

I always get confused when I open this file. One of the main reasons is the order of contents is quite random, so I decided to reorder things. I tried to find a style guide on this but the [google ones](https://google.github.io/styleguide/javaguide.html#s3.4.2-ordering-class-contents) really just say do something that is logical so...

In general what I did was

* All instance variables, class variables, class constants, etc. are at the top of the class
* The constructor, `setDelegate`, `resetDelegate` methods are at the top of the class since these all deal with creating or destroying instances of this class
* Nested enums towards the bottom of the class so they are not in the way of people trying to reason about the methods and other contents (they are quite long)
* Delete random extra spaces / unneeded comments
* Move some private methods to be closer to the public methods that call them

Changelog: [Internal]

Reviewed By: mlord93

Differential Revision: D70345882

fbshipit-source-id: a8425c7b90c5d4fbea5ee5daa3c4ff9f7f189ce5
2025-02-27 15:38:15 -08:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 19c18eb995 Add prerelease staging API for Android (#49649)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49649

- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages
- Added a parameter to `DefaultNewArchitectureEntryPoint.kt` to select prerelease stage

Changelog: [Android] [Added] - On `DefaultNewArchitectureEntryPoint` class add property to specify the desired release level for an application

Reviewed By: rubennorte, mdvacca

Differential Revision: D69412971

fbshipit-source-id: 1a76ac723e1e06b40aad5910604e0384b208d3a5
2025-02-27 12:38:03 -08:00
David VaccaandFacebook GitHub Bot ee7514cf49 Ensure Synchronous events are always dispatched from the UIThread (#49732)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49732

Ensure Synchronous events are always dispatched from the UIThread

changelog: [internal] internal

Reviewed By: lunaleaps, NickGerleman

Differential Revision: D70203460

fbshipit-source-id: 04fa02ae731bce579a231052e5ed7953852f61bc
2025-02-27 11:08:01 -08:00
Ruslan LesiutinandFacebook GitHub Bot 8698ecad18 Emit synthetic Trace Events for non-bridgeless to fix trace representation (#49729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49729

# Changelog: [Internal]

The only data source for non-bridgeless setup is JavaScript samples.

Chrome DevTools frontend is built around an assumption that thread should have at least single timeline or user timing event to be represented on a timeline view. They do it for filtering out unnecessary workers threads and other.

We will emit 2 synthetic Trace Events that should cover these requirements and recorded traces that contain only JavaScript samples should now be displayed correctly.

This is where trace bounds are calculated - https://github.com/facebookexperimental/rn-chrome-devtools-frontend/blob/3adf51aa915c2deb26f5d373751a15b4d0c8f259/front_end/models/trace/handlers/MetaHandler.ts#L169-L173

Reviewed By: huntie

Differential Revision: D70328681

fbshipit-source-id: 8eca0017d85de9ecbfb49074b439d5c4fee4aa56
2025-02-27 10:38:38 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot 13177b3025 feat: warn about jsc moving to a separate repo (#49692)
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore

This PR warns about JavaScriptCore being moved in the postinstall phase:

![CleanShot 2025-02-26 at 13 35 54@2x](https://github.com/user-attachments/assets/f392f7a3-fb8b-4089-9375-2d88ba4cb60b)

as well as in the build logs:

![CleanShot 2025-02-26 at 13 35 45@2x](https://github.com/user-attachments/assets/481e44f2-c30e-43f2-8cbc-5006959a42fc)

## Changelog:

[IOS] [ADDED] - Inform users about JSC being moved to a different repo

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

Test Plan: CI Grene

Reviewed By: huntie

Differential Revision: D70321201

Pulled By: cipolleschi

fbshipit-source-id: 1a97f3bceb57079f0e63848745c1a973b6dd614d
2025-02-27 10:32:25 -08:00
Nick LefeverandFacebook GitHub Bot ed106640c3 Rename fantom_internal_flags pragma to fantom_react_fb_flags (#49728)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49728

See title.

Resolving https://www.internalfb.com/diff/D70242739?dst_version_fbid=1295747645054627&transaction_fbid=1285615715828636

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D70328653

fbshipit-source-id: c3e7377760f53bc37d1a6f3e25a0053e12d4f66e
2025-02-27 09:50:45 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 6312360268 Improve Codegen to support automatic registration of Cxx TM (#49624)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49624

This change improves the iOS infra so that there is no need to modify the Swift AppDelegate or to create a Bridging Header.

## Problem
As of today, it is not possible to create a pure C++ TM and to register it through a Swift AppDelegate

## Solution
We can create a pod that can be imported in a Swift AppDelegate and that offer some pure Objective-C classes.

These classes contains a provider that can be instantiated in Swift.

The TurboModule manager delegate will ask the AppDelegate about the presence of some provider that can instantiate a pure C++ turbomodule with a given name.

The provider has an empty interface, but the implementation contains a function that can actually instantiate the TM. The function is implemented in an Objective-C++ class that imports the pure C++ turbomodule and creates it.

The TMManager extends the provider through a category to attaach the signature of the function that is implemented by the provider.

The last diff in this stack contains an exaple on how to implement this.

## Changelog:
[iOS][Added] - Wire codegen to the new TM provider to automatically register CXX modules.

Reviewed By: javache

Differential Revision: D70082999

fbshipit-source-id: 11d829450e1d17984d6f22ee5b8907073c59d008
2025-02-27 09:12:36 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 5d5d3708df Connect the classes for C++ Module registration to TMManagerDelegate (#49611)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49611

This Change connects the pod created previously to the `RCTTuboModuleManager` so that it can ask the delegate about the CxxTurboModuleProviders.

We had to introduce a `RCTFullTurboModuleManagerDelegate` that implements both the old `TurboModuleManagerDelegate` and the new Swift compatible one.

## Problem
As of today, it is not possible to create a pure C++ TM and to register it through a Swift AppDelegate

## Solution
We can create a pod that can be imported in a Swift AppDelegate and that offer some pure Objective-C classes.

These classes contains a provider that can be instantiated in Swift.

The TurboModule manager delegate will ask the AppDelegate about the presence of some provider that can instantiate a pure C++ turbomodule with a given name.

The provider has an empty interface, but the implementation contains a function that can actually instantiate the TM. The function is implemented in an Objective-C++ class that imports the pure C++ turbomodule and creates it.

The TMManager extends the provider through a category to attaach the signature of the function that is implemented by the provider.

The last diff in this stack contains an exaple on how to implement this.

## Changelog:
[iOS][Added] - Added the React-SwiftCompatibleNativeModules pod

Reviewed By: javache

Differential Revision: D70012142

fbshipit-source-id: db96c4cd3cdd1062b12f11131b7c6c51ecd74bc7
2025-02-27 09:12:36 -08:00
Nicola CortiandFacebook GitHub Bot 2062defb2d Bump AGP to 8.8.2 (#49712)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49712

Just keeping AGP up to date to the latest patch version

Changelog:
[Android] [Changed] - Bump AGP to 8.8.2

Reviewed By: cipolleschi

Differential Revision: D70316244

fbshipit-source-id: 6e447bd04841d09717a1c6153b7e5c977a10787c
2025-02-27 09:05:55 -08:00
Alex Taylor (alta)andFacebook GitHub Bot daed8e2f8c Deploy 0.262.0 to xplat (#49708)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49708

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D70277654

fbshipit-source-id: e215e392aa6e06181f2df03ce8b9b873807f3b86
2025-02-27 08:55:49 -08:00
Kudo ChienandFacebook GitHub Bot 90e27c2b4f show JSC removal message on Android (#49709)
Summary:
show build time jsc removal warning. https://github.com/facebook/react-native/issues/49692 but for android

![Screenshot 2025-02-27 at 3 41 43 PM](https://github.com/user-attachments/assets/a4fe6d52-5e05-45b0-a403-c71372dfba06)

## Changelog:

[ANDROID] [CHANGED] - Add a build time JSC lean core warning

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

Test Plan: - test on rn-tester. rn-tester has a jsc build variant. it shows the warning anyway. commenting out `enableHermesOnlyInVariants` will suppress the warning.

Reviewed By: rshest

Differential Revision: D70323283

Pulled By: cortinico

fbshipit-source-id: 632a8b9086c5d90d7f14ea705464356a1292bcad
2025-02-27 08:38:35 -08:00
Ruslan LesiutinandFacebook GitHub Bot 13a0b4691a Use sampling profile serializer and emit profiles in traces (#48315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48315

# Changelog: [Internal]

> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.

Use newly added serializer and record Trace Events for profiles.

Reviewed By: huntie

Differential Revision: D67353586

fbshipit-source-id: f3738418ec1d47ef4435f00120823845ea5e2fe5
2025-02-27 08:32:12 -08:00
Ruslan LesiutinandFacebook GitHub Bot 87d4300f14 Implement sampling profile serializer (#49191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49191

# Changelog: [Internal]

In this diff we are adding another serializer, that will receive local sampling profile (in tracing domain), and will record corresponding Trace Events with `PerformanceTracer`.

It encapsulates the logic of transforming list of samples to `"Profile"` and `"ProfileChunk"` trace events, which will be parsed by Chrome DevTools later.

Reviewed By: huntie

Differential Revision: D68439735

fbshipit-source-id: 0b3f2b3aff5b79a921e0350759e93f5b05e34d8e
2025-02-27 08:32:12 -08:00
Ruslan LesiutinandFacebook GitHub Bot 290f237cfa Expose API for registering profiles and profile chunks (#49084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49084

# Changelog: [Internal]

> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.

Added public methods to `PerformanceTracer` instance for registering `Profile` and `ProfileChunk` Trace Events.

Also created data structs in `TraceEvent.h` to simplify serialization process for objects like call frames / samples / etc.

Reviewed By: huntie

Differential Revision: D68558805

fbshipit-source-id: f5eca0435c56828909f99ec0b47841d24ee907b6
2025-02-27 08:32:12 -08:00
Ruslan LesiutinandFacebook GitHub Bot 1aced32a1c Serialize Hermes Profile to Tracing Profile (#49082)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49082

# Changelog: [Internal]

> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.

In this diff we will:
- Call newly added API in Hermes from `HermesRuntimeTargetDelegate.cpp`
- Define format for local Sampling Profile that will be used in Tracing domain
- Implement formatter for Hermes Profile -> Tracign Profile

Reviewed By: bgirard

Differential Revision: D68414421

fbshipit-source-id: 05d76e9bcff46f88a2338490a9d858cb121f72cc
2025-02-27 08:32:12 -08:00
Ruslan LesiutinandFacebook GitHub Bot 067c5f9954 Record Event Loop tasks (#49436)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49436

# Changelog: [Internal]

We will record event loop ticks and register corresponding `"RunTask"` Trace Event with our Trace Event engine.

Since this is hot path, I've added some gating under macros that are being used for Fusebox initialization.

There are also plans to add a public method to `PerformanceTracer` to get tracing status, so we could avoid cost of serialization / saving timestamps if trace is not being recorded. I believe rubennorte had plans on this, we will add it on top of that.

> Q: Why not add this to TraceSection?

Long-term, we will have a solution that will be one layer above TraceSection and this `EventLoopTaskReporterRAII`, it is risky now to modify existing `TraceSection` and rely on event names and attempt to map them to Trace Events.

Reviewed By: rubennorte

Differential Revision: D69399955

fbshipit-source-id: b26ac0c376e7dcb5755f36a27bf00dcca6cbff60
2025-02-27 08:32:12 -08:00
Ruslan LesiutinandFacebook GitHub Bot bf6852db2e Report JavaScript thread (#49395)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49395

# Changelog: [Internal]

Adding a new method to `RuntimeTarget` that will register it for Tracing.

In our case, it will schedule a callback on JS executor that will register JavaScript thread with `PerformanceTracer`.

Reviewed By: huntie

Differential Revision: D69530984

fbshipit-source-id: 58cffe9e9c4482b494cfcfd3405f7bffa40cdc56
2025-02-27 08:32:12 -08:00
Ruslan LesiutinandFacebook GitHub Bot 72e745fc15 Scaffold support for Tracing by jsinspector (#48836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48836

# Changelog: [Internal]

When `Tracing.start` CDP method is received, here is what happens next:
- `TracingAgent`, which intercepts the event will propagate this status to `Instance` by calling `startTracing()` on `InstanceAgent`.
- `InstanceAgent` will propagate it to `Runtime` entities. The only difference, there is no concept of tracing for Runtime, it will only have an API for starting sampling profiler.

When `Tracing.end` CDP method is received, it is propagated in the same order.

There is also `collect*()` methods for collecting profiles.

This has multiple benefits:
- We can control when `Runtime` or `Instance` are recreated and can ask them to start recording trace profiles right away. This may be required when we would add support for Reload and Profile from Performance panel.
- We might leverage this setup in the future, once we add instrumentation for Network panel. `InstanceAgent` will get notified when tracing started and will correspondingly notify other part of the infrastructure that will be responsible for recording network calls.
- We remain being fully agnostic to the actual `Runtime`, see corresponding `RuntimeTargetDelegate` for `V8`. We don't have the capacity for implementing and maintaining sampling profiler capabilities for it, but this approach unblocks it from technical perspective, if someone would want to invest into this.

`InstanceProfile` is a superset of `RuntimeSamplingProfile`. In the future, `InstanceProfile` may also include things like `NetworkProfile`, or similar stuff.

The definition for `RuntimeSamplingProfile` will be added in D68414421 and relies on the availability of new API for sampling profiler in Hermes.

Reviewed By: huntie

Differential Revision: D68327630

fbshipit-source-id: f8446057f88d87b4394fb692c28b89f1b8ce4eea
2025-02-27 08:32:12 -08:00
zhongwuzwandFacebook GitHub Bot fa6d5ca572 Fabric: Fixes TurboModule method parameter Int32 type not work (#49710)
Summary:
Fixes https://github.com/facebook/react-native/issues/49688 .

## Changelog:

[IOS] [FIXED] - Fabric: Fixes TurboModule method parameter Int32 type not work

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

Test Plan: Repro please see  https://github.com/facebook/react-native/issues/49688.

Reviewed By: cortinico

Differential Revision: D70314804

Pulled By: cipolleschi

fbshipit-source-id: 4f305b14bb735bd343ef7477b969df237418615d
2025-02-27 07:23:10 -08:00
Mateo GuzmánandFacebook GitHub Bot 63dea206ff Migrate CxxModuleWrapper & DefaultJSExceptionHandler to Kotlin (#49706)
Summary:
Migrating two more classes from com.facebook.react.bridge to Kotlin, `CxxModuleWrapper` & `DefaultJSExceptionHandler`.

## Changelog:

[INTERNAL] - Migrate CxxModuleWrapper & DefaultJSExceptionHandler to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D70317975

Pulled By: javache

fbshipit-source-id: 642d96faa131dd859f18cd811a5a223acba4c722
2025-02-27 05:23:56 -08:00
Rubén NorteandFacebook GitHub Bot 3226c328bf Remove unnecessary package data-uri-to-buffer (#49714)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49714

Changelog: [internal]

This package was only needed for testing but it's actually not used.

Reviewed By: hoxyq

Differential Revision: D70318040

fbshipit-source-id: b57ec74932029368117520646972bfee83706017
2025-02-27 05:23:29 -08:00
Nick LefeverandFacebook GitHub Bot e2642d5567 Add support for setting internal feature flags (#49693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49693

Allow setting the ReactNativeInternalFeatureFlags from a Fantom test using the `fantom_internal_flags` pragma.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D70242739

fbshipit-source-id: 17a69edbd58b93f8b8060192b9881e62febf9635
2025-02-27 04:16:36 -08:00
Ruslan LesiutinandFacebook GitHub Bot d8bc7c68c0 fix[LayoutableShadowNode::findNodeAtPoint]: consider layoutMetrics.overflowInset (#49701)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49701

# Changelog:
[General] [Fixed] - findNodeAtPoint now considers overflow area of the parent node

This may happen when the child overflows the parent without resizing it. For example, when child has `position: 'absolute'` and absolute coordinates.

See
- https://fb.workplace.com/groups/rn.debugger.feedback/posts/1075015864052657/
- https://fb.workplace.com/groups/rn.debugger.feedback/permalink/1180445730176336/
- https://fb.workplace.com/groups/ford.eng.discussions/permalink/1961390260971262/

for more context

Reviewed By: NickGerleman

Differential Revision: D63328182

fbshipit-source-id: 9d5ed3ec8d88d8d65455aa3664588dc7d7273888
2025-02-27 03:20:01 -08:00
Nicola CortiandFacebook GitHub Bot b95424d159 Gradle to 8.13 (#49689)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49689

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

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

I'm bumping Gradle to the latest minor.
https://docs.gradle.org/8.13/release-notes.html

I'm also changing the distribution from `all` to `bin` as
this reduces the download time of the distribution.

Changelog:
[Android] [Changed] - Gradle to 8.13

Reviewed By: NickGerleman

Differential Revision: D70239710

fbshipit-source-id: 89808242a93344f540bfe82f4178cf6db72597d1
2025-02-27 03:13:26 -08:00
Rubén NorteandFacebook GitHub Bot a6dd18c2a6 Expose new DOM classes in the global scope (#49697)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49697

Changelog: [internal]

These classes cannot be instantiated directly, but having access to them allows users to do `instanceof` checks, e.g.:

```
if (ref.current instanceof Element) {
  ref.current.getBoundingClientRect();
}
```

Reviewed By: yungsters

Differential Revision: D70244966

fbshipit-source-id: 3c1e3698b8851ef9ce3c2865e7435b000984c8f0
2025-02-27 03:07:54 -08:00
Rubén NorteandFacebook GitHub Bot 66495830c0 Type Node.textContent as non-nullable string (#49696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49696

Changelog: [internal]

This is just a change for convenience, as Flow is currently typing `textContent` in `Node` as `string` instead of as `string | null` as we were doing.

Our behavior was more correct, as `Document` extends `Node` and it returns `null` in that case, but to ensure a smooth migration we'll adopt the existing definition.

Reviewed By: huntie

Differential Revision: D70244963

fbshipit-source-id: ad8325d6e00c221e858e4e2d45085666ff0a0ce7
2025-02-27 03:07:54 -08:00
Dawid MałeckiandFacebook GitHub Bot 38e1444162 Add TouchableOpacity to buildTypes and align Flow with TS types (#49700)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49700

Changelog:
[Internal] - Added TouchableOpacity to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69922731

fbshipit-source-id: 852b8afe99469512c0951d2fd3818fca744102fe
2025-02-27 03:02:16 -08:00
Jakub PiaseckiandFacebook GitHub Bot 2bb65717b7 Fix onContentSizeChange being dispatched too often on iOS (#49695)
Summary:
Solves the iOS part of https://github.com/facebook/react-native/issues/47186.

`onContentSizeChanged` event is sent inside the `updateLayoutMetrics` method every time it's invoked. A change in layout metrics doesn't mean that the content size also changes, like changing the position of the input.

This PR adds a condition that the content size must have changed before sending the event.

|Before this change|After this change|
|-|-|
|<video src="https://github.com/user-attachments/assets/743e1502-e13e-474e-b4a6-ef6873bf9619">|<video src="https://github.com/user-attachments/assets/fe3d3ef5-3951-4ba2-b9a1-c41439ab455c">|

In the reproducer from the issue, `SafeAreaView` is used, which at first renders its content without any insets until its state is updated with the correct insets. Both of these layouts change the layout metrics of the text input, resulting in two events before this change and a single one after.

## Changelog:

[IOS] [FIXED] - Fixed TextInput's `onContentSizeChange` event being dispatched multiple times with the same size

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

Test Plan: Tested on the reproducer from the issue

Reviewed By: NickGerleman

Differential Revision: D70247460

Pulled By: j-piasecki

fbshipit-source-id: 8a1e0d0f55b6b3f8a6d0bb176ed50e47e3b51035
2025-02-27 00:58:35 -08:00
Mateo GuzmánandFacebook GitHub Bot 8a4a6231b7 Internalize and migrate DimensionPropConverter to Kotlin (#49676)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.bridge.DimensionPropConverter).

In this PR I'm also converting this class to Kotlin as it's needed to make it internal as per https://github.com/facebook/react-native/pull/49676#issuecomment-2683579829.

## Changelog:

[INTERNAL] - Internalize and migrate com.facebook.react.bridge.DimensionPropConverter to Kotlin

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

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

Reviewed By: NickGerleman

Differential Revision: D70208912

Pulled By: arushikesarwani94

fbshipit-source-id: c74326ca1d82417457c2a438fa28e20f0a0eaa82
2025-02-26 17:48:07 -08:00
Rubén NorteandFacebook GitHub Bot 798f2e47aa Remove unnecessary extra prototype from ReactNativeElement (#49699)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49699

Changelog: [internal]

Just a minor optimization in `ReactNativeElement`, to stop creating an unnecessary object in the prototype chain for the `super()` removal optimization.

Reviewed By: huntie

Differential Revision: D70250804

fbshipit-source-id: 1f8104f8e17f12264326cd715e07877a371f9dc5
2025-02-26 13:22:00 -08:00
Sam ZhouandFacebook GitHub Bot bf17ace09a Move react type definitions back into global libdefs
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D70261002

fbshipit-source-id: 83c0f5b2e2717e19a211553bd4b07e9481ec7c65
2025-02-26 12:20:39 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot a6607c07cd feat: js runtime switching C API for Swift (#49489)
Summary:
This PR implements a C API to switch JS Engines that can be used from Swift.

Here is an example:

```swift
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider
import UIKit
import RCTRuntime

class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
  override func sourceURL(for bridge: RCTBridge) -> URL? {
    self.bundleURL()
  }

  override func bundleURL() -> URL? {
    #if DEBUG
    RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
    #else
    Bundle.main.url(forResource: "main", withExtension: "jsbundle")
    #endif
  }

  override func createJSRuntimeFactory() -> JSRuntimeFactory {
    jsrt_create_jsc_factory() // Easily switch engines here
  }
}
```

## Changelog:

[IOS] [ADDED] -  js runtime C API for Swift

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

Test Plan: CI Green

Reviewed By: huntie

Differential Revision: D69976988

Pulled By: cipolleschi

fbshipit-source-id: 9333ec62ca99a28c3121f558bbff1ce0457779e3
2025-02-26 10:56:31 -08:00
Sam ZhouandFacebook GitHub Bot 785249d05b Use builtin libdefs from flow-typed (#49702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49702

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

Differential Revision: D70256694

fbshipit-source-id: 44e0772cc982add44723c252ea547a9cea0641e6
2025-02-26 10:55:54 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 9e64099df6 Cleanup script and move the index to release (#49666)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49666

This change moves the index.js file to the `releases` folder, giving it a meaningful name.

It also rename the prebuild folder to ios-prebuild to be more descriptive.

It finally removes the old scripts that this refactoring supersedes.

bypass-github-export-checks

## Changelog:

[INTERNAL] - Move the infdex.js to the prepare-ios-prebuilds script.

Reviewed By: cortinico

Differential Revision: D70176043

fbshipit-source-id: e0c3f3bd53adf97fa388c37a746d274fd678f690
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot 8b984ca2c4 Glue all the scripts together. (#49671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49671

This change refactors the script to prebuild ios dependencies by adding a script that glues all the steps together.

bypass-github-export-checks

## Changelog:

[INTERNAL] - Add script to orchestrate all the steps

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```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"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70175842

Pulled By: cipolleschi

fbshipit-source-id: e4bb4ad5d12e7ceaaca0eeee7ce6dc7269aa7bad
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot 2fdb6c9832 Refactor compose-framework script (#49665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49665

This change refactors the script to prebuild ios dependencies by factoring out the code that creates the XCFrameworks

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out flow types, constants and gitignore

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```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"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70175797

Pulled By: cipolleschi

fbshipit-source-id: 8eb07fd3ff9f309d5f6e4b55156c5d5cbbd41235
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot 1cf751ed58 Refactor build script (#49669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49669

This change refactors the script to prebuild ios dependencies by factoring out the script that builds the frameworks

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out the script to build the frameworks.

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```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"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70175778

Pulled By: cipolleschi

fbshipit-source-id: 987ea8922ab566c6601a77084226df2b6456243f
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot f7970cddf2 Add code to generate the Swift Package
Summary:
This change refactors the script to prebuild ios dependencies by:
- remove the manually maintained Package.swift
- add script to generate it starting from the configurations that we have
bypass-github-export-checks
## Changelog:

[INTERNAL] - Factor out script to generate  Package.swift file

Reviewed By: cortinico

Differential Revision: D70175760

Pulled By: cipolleschi

fbshipit-source-id: a1b0fc6dcdc1860b04ab260697f259c297338f41
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot 7aa5df32a4 Refactor setupDependencies script (#49670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49670

This change refactors the script to prebuild ios dependencies by factoring out the code that setups native dependencies.

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out code to setup native dependencies

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```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"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70175729

Pulled By: cipolleschi

fbshipit-source-id: 4e1c19b5482b4335ab66c2b605abcb9db47091d3
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot 339b0b5653 Add utils: CLI arg validation and folders utils (#49668)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49668

This change refactors the script to prebuild ios dependencies by:
- factoring out CLI validation in a separate file
- factoring out the folder utilities in a separate file

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out CLI and folder utilities

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```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"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70175663

Pulled By: cipolleschi

fbshipit-source-id: 5c6653aed7054658c5e265675766a28415da3918
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot 6eac2bd5b9 Configure all the third party dependencies we need (#49667)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49667

This change refactors the script to prebuild ios dependencies by extracting all the dependencies' configurations in a separate file

bypass-github-export-checks

## Changelog:

[INTERNAL] - Factor out all the dependencies configurations in a separate file

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```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"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70175499

Pulled By: cipolleschi

fbshipit-source-id: c0eacb831e6551d39956c9835d15ab8d9e91d8f2
2025-02-26 08:19:39 -08:00
Christian FalchandFacebook GitHub Bot a860c55f38 Extract Flow types and constants (#49614)
Summary:
This change refactors the script to prebuild ios dependencies by:
- factoring out the constants
- factoring out the flow type definitions
- factoring out the .gitignore

bypass-github-export-check

## Changelog:

[INTERNAL] - Factor out flow types, constants and gitignore

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

Test Plan:
Tested in this `AppDelegate.mm`:

Imports:

```obj-c
#import "AppDelegate.h"
#import <glog/logging.h>
#import <double-conversion.h>
#include <fmt/core.h>
#include <boost/assert.hpp>
#include <fast_float/fast_float.h>
#include <string>
#import <SocketRocket/SRWebSocket.h>
```

Code:
```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"]) {
      NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
      NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"];
      NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
      NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
      if (url == nil) {
        throw [NSException exceptionWithName:@"ResourceNotFoundException"
                                       reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle"
                                     userInfo:nil];
      }
      break;
    }
  }
  return YES;
}
```

Reviewed By: cortinico

Differential Revision: D70172536

Pulled By: cipolleschi

fbshipit-source-id: 91589693fd24e2b0d6d67759fb9fbc86841f4d13
2025-02-26 08:19:39 -08:00
Ruslan LesiutinandFacebook GitHub Bot 5fcb69e8b7 cleanup usage of HERMES_ENABLE_DEBUGGER and define set of build-time flags for Fusebox (#49673)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49673

## Changelog:
[General] [Breaking] - 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`.

Reviewed By: huntie

Differential Revision: D70177232

fbshipit-source-id: 402adea7daa810c92015fd844430b26ae29bbf75
2025-02-26 07:47:03 -08:00
Pieter De BaetsandFacebook GitHub Bot 4a055f36eb Fallback to fbsystrace when Perfetto is not available (#49657)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49657

For some use-cases we still want to log using the internal fbsystrace API which allows backdating of events.

This feels a bit weird putting it in `ReactPerfettoLogger`, but maybe we should rename that to something like `TraceLogger` (like we have `TraceSection`).

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D70109680

fbshipit-source-id: 7757b81ec5032e3800446a88198c7da135afdd0e
2025-02-26 07:43:18 -08:00
Jakub PiaseckiandFacebook GitHub Bot 65242998ca Align Pressable types with OSS (#49631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49631

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70091770

fbshipit-source-id: 8a2fb448984fccf31c473002ffccd5ddb174b7e1
2025-02-26 07:21:43 -08:00
Rubén NorteandFacebook GitHub Bot f2c1f8b4e7 Provide access to document object in Fantom roots (#49691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49691

Changelog: [internal]

This adds a new getter for `document` in the `Root` class in Fantom tests to easily access the document instance for the root.

This isn't very useful at the moment, but will be very useful when we introduce `document.getElementById`, so we can access arbitrary nodes very easily.

Reviewed By: javache

Differential Revision: D69307130

fbshipit-source-id: 2650bc03e143ee9f0b29d0f284a2f9079ab9f765
2025-02-26 07:09:15 -08:00
Rubén NorteandFacebook GitHub Bot e3141308bb Enable DOM APIs by default in Fantom tests (#49690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49690

Changelog: [internal]

We're shipping this soon and most tests already using DOM APIs to make assertions, so it's easier if we just "ship" in tests.

Reviewed By: javache, sammy-SC

Differential Revision: D69307129

fbshipit-source-id: 75d0be013703cff7bc2bad5cd16c26bc6471e547
2025-02-26 07:09:15 -08:00
Mateo GuzmánandFacebook GitHub Bot 7e2487b6ce Migrate ProgressRequestBody to Kotlin (#49682)
Summary:
Migrate com.facebook.react.modules.network.ProgressRequestBody to Kotlin.

Note: To keep the logic the same as in Java, I had to make the params of RequestBodyUtil.createProgressRequest non-nullable again which were made nullable by mistake in https://github.com/facebook/react-native/pull/49584.

## Changelog:

[INTERNAL]- Migrate com.facebook.react.modules.network.ProgressRequestBody to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D70239855

Pulled By: cortinico

fbshipit-source-id: 03c5e0bd5c66a4d5df5e4304d4479ec576d350fd
2025-02-26 05:16:14 -08:00
Rubén NorteandFacebook GitHub Bot 1e4c0ded03 Rename INativeMethods as LegacyHostInstanceMethods (#49687)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49687

Changelog: [internal]

Just a minor type rename to better reflect what this type will become soon.

Reviewed By: cortinico

Differential Revision: D70185597

fbshipit-source-id: d5a67eda44dc88dd32a5290f1d0b292ed7014006
2025-02-26 05:13:08 -08:00
Rubén NorteandFacebook GitHub Bot cd072dca99 Migrate HostInstance to an interface (#49633)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49633

Changelog: [internal]

This replaces the definition of `HostInstance` to use an interface instead of an object, to better represent the underlying type (an instance of `ReactFabricHostComponent`) and simplify the migration to the new DOM API.

Reviewed By: huntie

Differential Revision: D70023947

fbshipit-source-id: bf312abf02fec48b2b5afb41053593ce542f7324
2025-02-26 05:13:08 -08:00
Nicola CortiandFacebook GitHub Bot 1fd3806ee9 Bump Node 18 -> 20 to build React Native in OSS (#49658)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49658

This bumps the version of Node that we use to build React Native from 18 to 20.
We'll still be supporting building with 20, but we'll moving our toolchain to Node 20 becuase 18 is at EOL soon.

Changelog:
[General] [Changed] - Bump Node 18 -> 20 to build React Native in OSS

Reviewed By: javache, cipolleschi

Differential Revision: D70168003

fbshipit-source-id: b64ee583b2d2e72d25393119ae9e9029a74d5b13
2025-02-26 04:08:12 -08:00
Dawid MałeckiandFacebook GitHub Bot dbbdb985f5 Add SafeAreaView to buildTypes and align Flow with TS types (#49664)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49664

Changelog:
[Internal] - Added SafeAreaView to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D70176107

fbshipit-source-id: 5da4ef4751c2d4a57b3ffd736294587836babecf
2025-02-26 03:15:02 -08:00
Iwo PlazaandFacebook GitHub Bot 9d92b277bf Optional post-transform pipeline for .d.ts files generated by build-types script (#49634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49634

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69992512

fbshipit-source-id: 7fc004e9460498de236a833aea5265a5fac5f490
2025-02-26 03:06:57 -08:00
Mateo GuzmánandFacebook GitHub Bot ac57ec4d0b Reland: Migrate ReactClippingViewGroup to Kotlin (#49413) (#49607)
Summary:
Reland of https://github.com/facebook/react-native/issues/49413 which was reverted due to an internal crash. I've attempted to do a solution to keep backwards compatibility but doesn't seem to work – keeping the original solution for now, perhaps something else can be cleaned up to avoid the breakage.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin

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

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

Verified that the update changes do not cause a crash.
Test flow:
- login to BizApp using Instagram account
- on home screen scroll down to Insights section
- it should show without crashing

Reviewed By: arushikesarwani94

Differential Revision: D70200000

Pulled By: alanleedev

fbshipit-source-id: 89bc948c1b91d9419d4b6e1885d949c4a3c20986
2025-02-26 00:32:01 -08:00
Samuel SuslaandFacebook GitHub Bot ca49b512ad Back out "remove use of RCTUnsafeExecuteOnMainQueueSync and main thread setup from RCTDeviceInfo" (#49681)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49681

changelog: [internal]

Original commit changeset: e8280d2f5025

Original Phabricator Diff: D69747829

Reviewed By: NickGerleman

Differential Revision: D70200854

fbshipit-source-id: cbdd3746be4d43d320bb0f708cc1a790c010218b
2025-02-25 20:39:07 -08:00
Mateo GuzmánandFacebook GitHub Bot 0f12f99d6c Make SurfaceHandlerBinding internal (#49677)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.fabric.SurfaceHandlerBinding).

## Changelog:

[INTERNAL] - Make com.facebook.react.fabric.SurfaceHandlerBinding internal

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

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

Reviewed By: mdvacca

Differential Revision: D70208973

Pulled By: arushikesarwani94

fbshipit-source-id: 12b548e97db27cdb1750c54ad52b8e656fa39446
2025-02-25 19:45:52 -08:00
Joe VilchesandFacebook GitHub Bot 375817402a Fix import lint in TextProps.js (#49675)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49675

tsia, lint warning

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D70189154

fbshipit-source-id: 6b4c18d6f677195c2a966c850165c44c72110bbb
2025-02-25 18:06:28 -08:00
Rubén NorteandFacebook GitHub Bot 52fb1dc3c7 Move definition of public instances to ReactNativePrivateInterface (#32446)
Summary:
## Summary

> [!NOTE]
> This only modifies types, so shouldn't have an impact at runtime.

Some time ago we moved some type definitions from React to React Native
in #26437.

This continues making progress on that so values that are created by
React Native and passed to the React renderer (in this case public
instances) are actually defined in React Native and not in React.

This will allow us to modify the definition of some of these types
without having to make changes in the React repository (in the short
term, we want to refactor PublicInstance from an object to an interface,
and then modify that interface to add all the new DOM methods).

## How did you test this change?

Manually synced `ReactNativeTypes` on top of
https://github.com/facebook/react-native/pull/49602 and verified Flow
passes.

DiffTrain build for [9dd378ff1222335ff133bab2d61001fcc84a1c56](https://github.com/facebook/react/commit/9dd378ff1222335ff133bab2d61001fcc84a1c56)

Reviewed By: poteto

Differential Revision: D70091830

fbshipit-source-id: 2cc49d8ed89e8ee2531dbc4094ef9720fc3040ad
2025-02-25 17:57:17 -08:00
Rubén NorteandFacebook GitHub Bot 3cd7359750 Suppress Flow errors that will be introduced by React sync
Summary: Changelog: [internal]

Reviewed By: huntie

Differential Revision: D70178780

fbshipit-source-id: 68a67a5fc3277df44a6ffffcc8989cd18fc4b83e
2025-02-25 17:57:17 -08:00
David VaccaandFacebook GitHub Bot 5019a2ec17 Fix lints and small refactor on sync events (#49679)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49679

Fix lints and small refactor on sync events

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D70196311

fbshipit-source-id: c4c3280b7f58f09073f084b71dbbb9ae66d71e67
2025-02-25 16:59:03 -08:00
David VaccaandFacebook GitHub Bot 8b4bba8305 Mark SynchronousEventReceiver as UnstableReactNativeAPI (#49678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49678

In this diff I'm undeprecating SynchronousEventReceiver and marking it as UnstableReactNativeAPI, to properly describe the status of this API.

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D70193235

fbshipit-source-id: c4818c89eecef135e9e1f82d35e7f1e2d46b1637
2025-02-25 16:59:03 -08:00
Sam ZhouandFacebook GitHub Bot 61890fe864 Cleanup uses of internal Flow types (#49683)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49683

Use of these types will trigger `[internal-type]` error in the next version of Flow. This diff cleans them up ahead of the time.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D70202028

fbshipit-source-id: 97b7217040b63514f20888fb20c86596235a82a6
2025-02-25 15:29:36 -08:00
Sam ZhouandFacebook GitHub Bot 7c2687ecc2 Eliminate usage of global React types in ReactNativeTypes.js (#32330)
Summary:
DiffTrain build for [70f1d766e8ae7ca3701193abb8c8a9f2fdbdaa9d](https://github.com/facebook/react/commit/70f1d766e8ae7ca3701193abb8c8a9f2fdbdaa9d)

bypass-github-export-checks

Reviewed By: rubennorte

Differential Revision: D69932024

fbshipit-source-id: 21a5973848c91373d2f528a88350fd04e998a4d2
2025-02-25 09:37:21 -08:00
Dawid MałeckiandFacebook GitHub Bot 7856ef8409 Add Image and ImageBackground to buildTypes and align Flow with TS defs (#49659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49659

Changelog:
[Internal] - Added Image and ImageBackground to buildTypes and aligned Flow with TS defs

Reviewed By: huntie

Differential Revision: D70099485

fbshipit-source-id: 6000fc7099a4f811c451a08c4d5cf505d84ec0c9
2025-02-25 09:12:52 -08:00
Samuel SuslaandFacebook GitHub Bot 659004f16b add a flag to control if RCTTurboModuleManager._turboModuleManagerDelegateMutex is used (#49632)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49632

changelog: [internal]

Add gating to experiment with removal of `_turboModuleManagerDelegateMutex`.

# Why remove _turboModuleManagerDelegateMutex?
- It is not consistently used in the class. Here is a case where access to _delegate is not protected by the mutex: https://fburl.com/code/9tay04fn
- From inspecting individual implementations of RCTTurboModuleManagerDelegates, it is not needed to synchronise access.
- It may lead to deadlocks under following conditions:
  - **A)** JavaScript thread gets hold of the `_turboModuleManagerDelegateMutex` and then tries to dispatch a block on the main thread synchronously (calling `RCTUnsafeExecuteOnMainQueueSync`). For example, when a new native module is created lazily because JavaScript used it and the native module requires main thread setup.-
  - **B)** The main thread tries to get hold of `_turboModuleManagerDelegateMutex` when it is creating a native module ([[RCTModuleRegistry moduleForName:lazilyLoadIfNecessary:]](https://fburl.com/code/lioi5zei)) from Obj-C.

Reviewed By: javache, cipolleschi

Differential Revision: D70087779

fbshipit-source-id: 1780b2f48537dd578260a96f8f498dbe11529689
2025-02-25 07:00:21 -08:00
Mateo GuzmánandFacebook GitHub Bot dcd103e122 Migrate ProgressiveStringDecoder to Kotlin (#49149)
Summary:
Migrate com.facebook.react.modules.network.ProgressiveStringDecoder to Kotlin

## Changelog:

[INTERNAL]- Migrate com.facebook.react.modules.network.ProgressiveStringDecoder to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D69114070

Pulled By: rshest

fbshipit-source-id: 9f6bfc606be0236fb64216f47d8945c73faf1d1f
2025-02-25 06:59:00 -08:00
Mateo GuzmánandFacebook GitHub Bot f7f3253998 Add ProgressResponseBody test cases (#48675)
Summary:
The class is still in Java and also lacks of some tests so adding them to make it safer to migrate or for future refactors.

## Changelog:

[INTERNAL]  - Add `ProgressResponseBodyTest` test cases

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

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

Reviewed By: alanleedev

Differential Revision: D68205423

Pulled By: rshest

fbshipit-source-id: edb1dcf4da34377b7b1dcfc68a6e08861421964b
2025-02-25 06:34:40 -08:00
Vitali ZaidmanandFacebook GitHub Bot 05e94848bb report proxy idle state in heartbeat events (#49635)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49635

Changelog:
[General][Internal] - report proxy idle state in heartbeat events

The proxy is considered Idle if it didn't receive any messages for 10 seconds.

Reviewed By: robhogan

Differential Revision: D70078637

fbshipit-source-id: 5b8d9a3a6e3e2568e40b3ada0a41e76b277fe66d
2025-02-25 06:29:08 -08:00
Jakub PiaseckiandFacebook GitHub Bot edfc73d1a1 Align DrawerLayoutAndroid type definitions with OSS (#49620)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49620

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70081361

fbshipit-source-id: 203a9a984fddef6dfd2fce7e84ae44e8e68e8fcc
2025-02-25 05:51:21 -08:00
Mateo GuzmánandFacebook GitHub Bot 4a0a10ba50 Make ValueAnimatedNode, AnimatedNodeValueListener & InterpolationAnimatedNode internal (#49644)
Summary:
As part of the initiative to reduce the public API surface, this classes can be internalized. I've checked there are no relevant OSS usages:

- [ValueAnimatedNode](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.ValueAnimatedNode)
- [AnimatedNodeValueListener](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.AnimatedNodeValueListener)
- [InterpolationAnimatedNode](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.InterpolationAnimatedNode)

## Changelog:

[INTERNAL] - Make ValueAnimatedNode, AnimatedNodeValueListener & InterpolationAnimatedNode internal

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

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

Reviewed By: javache

Differential Revision: D70100915

Pulled By: cortinico

fbshipit-source-id: e3068326034c4a050c12be4f886546486c570b16
2025-02-25 05:34:15 -08:00
Joanna QuandFacebook GitHub Bot 4121d24454 Update deprecated enums in RCTTextPrimitivesConversions.h (#49648)
Summary:
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are [deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash). Use their drop-in replacements (`NSUnderlineStylePatternDash` and `NSUnderlineStylePatternDot`) instead.

## Changelog:

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

Pick one each for the category and type tags:

[IOS] [DEPRECATED] - Update deprecated enums in RCTTextPrimitivesConversions.h

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

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

Test Plan: Local build

Reviewed By: cortinico

Differential Revision: D70153675

Pulled By: cipolleschi

fbshipit-source-id: e64c9df1a5282a3f33f742a455c64c002f0c8044
2025-02-25 05:31:49 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot a033cf9d5e fix: remove UISceneDelegate from AppDelegate (#49628)
Summary:
After this change: https://github.com/facebook/react-native/pull/49078 UIWindowSceneDelegate is no longer needed.

This wasn't removed in the original PR.

## Changelog:

[iOS] [Removed] - Remove no longer needed UISceneDelegate

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

Test Plan: CI GREEN

Reviewed By: cortinico

Differential Revision: D70102384

Pulled By: cipolleschi

fbshipit-source-id: e33185a4becd949a9f0ec1eabeeb4fe85ef3ee79
2025-02-25 05:03:12 -08:00
Intl SchedulerandFacebook GitHub Bot acc4c9ed57 translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907956139478
Sandcastle Job Instance ID: 4503601315782801
allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D70170466

fbshipit-source-id: de74b0d82d1ebf3a825acfdb228822f3166d0b8b
2025-02-25 04:42:22 -08:00
Peter HsiehandFacebook GitHub Bot 823ede1fab Backout D69745459 to resolve more Twilight headset pairing issues (#49656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49656

changelog: [internal]

Differential Revision: D70116923

fbshipit-source-id: ead8b1551acd6713372e1b500d921c8590bf6ac0
2025-02-25 04:34:25 -08:00
Parsa NasirimehrandFacebook GitHub Bot d8df3a68fc chore(Android): migrate most of the files under MessageQueue to Kotlin (#48748)
Summary:
A continuation of the work done in https://github.com/facebook/react-native/pull/48652, This PR migrates every other Java file other than `QueueThreadExceptionHandler` under `com.facebook.react.bridge.queue` to Kotlin

## Changelog:

[INTERNAL] [FIXED] - Migrate most of the message queue files to Kotlin

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

Test Plan:
./gradlew test:
<img width="1567" alt="Screenshot 2025-01-16 at 21 10 47" src="https://github.com/user-attachments/assets/5bd6824d-b31c-45f8-9398-9cde658f8ff7" />

Reviewed By: cortinico

Differential Revision: D68294382

Pulled By: rshest

fbshipit-source-id: 3d919b43fea1c3656097f7730194ee8e2ac644d3
2025-02-25 04:18:37 -08:00
Mateo GuzmánandFacebook GitHub Bot 514fccf8dc Migrate ReactMarkerConstants to Kotlin (#49645)
Summary:
Migrate com.facebook.react.bridge.ReactMarkerConstants to Kotlin

## Changelog:

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

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

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

Reviewed By: rshest

Differential Revision: D70120968

Pulled By: javache

fbshipit-source-id: c69ad2f3920ea877d51fd81c8b2a573844996e04
2025-02-25 04:13:59 -08:00
Samuel SuslaandFacebook GitHub Bot 91b4354fa0 add arguments to command logs (#49646)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49646

changelog: [internal]

- Log command arguments so they can be asserted against in tests.

Use this in a TextInput test and add a test to check whether view command accidentally resets TextInput value to empty.

Reported: https://github.com/facebook/react-native/issues/49368?fbclid=IwZXh0bgNhZW0CMTEAAR2KUbc5F17NIX_WSJ_ojyUHQrR5UyASfSbkPl05nTj1tRV9knPI7GIFNmE_aem_O2I1F5tZTsvRX9anpv7gMg

Reviewed By: NickGerleman

Differential Revision: D70098109

fbshipit-source-id: 03482278b7adb0fa42dbc9e02e636ea1df9e6be6
2025-02-25 02:58:11 -08:00
Julian TiglerandFacebook GitHub Bot e3d607fc2e Fix new arch refresh control not shown when refreshing on mount (#49240)
Summary:
- In the old architecture on iOS, it was possible to begin refreshing a [`RefreshControl`](https://reactnative.dev/docs/refreshcontrol) backed by  [`RCTRefreshControl.m`](https://github.com/facebook/react-native/blob/ea876054cfdcdfba1d8ded69ab359f20072aef6c/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m) on mount (see [old arch rn-tester video](https://github.com/user-attachments/assets/0a759072-8931-438b-b9af-698b5f8fa072)).
- In the new architecture on iOS, when attempting to refresh on mount, the `RefreshControl` backed by [`RCTPullToRefreshViewComponentView.mm`](https://github.com/facebook/react-native/blob/ea876054cfdcdfba1d8ded69ab359f20072aef6c/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm) is not shown. Additionally, recycled `RefreshControl`s are missing their [`title`s](https://reactnative.dev/docs/refreshcontrol#title-ios) (see [new arch rn-tester video](https://github.com/user-attachments/assets/22f87a82-4703-470b-9c00-6454eb9458dd)).
- This change fixes the new arch issues mentioned above, so that the new arch behaves the same as the old arch did (see [new arch rn-tester video with fix](https://github.com/user-attachments/assets/3ab6c90c-6ad4-4dc7-b2f5-7cf1378e50b9)).
- This change also updates the rn-tester [`RefreshControlExample`](https://github.com/facebook/react-native/blob/442a368af5bda653e84514b870084c73607645eb/packages/rn-tester/js/examples/RefreshControl/RefreshControlExample.js) to include a refresh-on-mount to prevent future regressions

## Changelog:

[IOS] [FIXED] - Fix new arch RefreshControl wasn't shown when refreshing on mount
[IOS] [FIXED] - Fix new arch recycled RefreshControl was missing its title
[INTERNAL] [CHANGED] - Update rn-tester RefreshControlExample to refresh on mount

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

Test Plan:
- I created a [video](https://github.com/user-attachments/assets/0a759072-8931-438b-b9af-698b5f8fa072) of the baseline old arch behavior by overriding [`new_arch_enabled`](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/cocoapods/new_architecture.rb#L163-L165) to return `false`
- I created a [video](https://github.com/user-attachments/assets/22f87a82-4703-470b-9c00-6454eb9458dd) of the broken new arch behavior by overriding [`new_arch_enabled`](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/cocoapods/new_architecture.rb#L163-L165) to return `true`
- I applied the changes in this PR and created a [video](https://github.com/user-attachments/assets/3ab6c90c-6ad4-4dc7-b2f5-7cf1378e50b9) that confirms that the new arch with fix now behaves the same as the old arch
- I also used [patch-package](https://github.com/ds300/patch-package) to verify that the changes in this PR work as expected in my production React Native app, running `react-native@0.77.0`, with the new arch now enabled by default. Note that this app uses [`react-navigation`](https://github.com/react-navigation/react-navigation) and [`react-native-screens`](https://github.com/software-mansion/react-native-screens), which I expected might complicate the fix. The changes in this PR continue to work as expected, even with the complications of those popular libraries.

## Details:
- All of my changes were inspired by the many years of fixes that are included in [`RCTRefreshControl.m`](https://github.com/facebook/react-native/blob/ea876054cfdcdfba1d8ded69ab359f20072aef6c/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m), which haven't yet been included in the new [`RCTPullToRefreshViewComponentView.mm`](https://github.com/facebook/react-native/blob/ea876054cfdcdfba1d8ded69ab359f20072aef6c/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm)
    - My `_isBeforeInitialLayout` is inspired by the old [`_isInitialRender`](https://github.com/facebook/react-native/blob/442a368af5bda653e84514b870084c73607645eb/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m#L17)
    - My `layoutSubviews` is inspired by the old [`layoutSubviews`](https://github.com/facebook/react-native/blob/442a368af5bda653e84514b870084c73607645eb/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m#L43-L59)
    - My `beginRefreshingProgrammatically` is inspired by the old [`beginRefreshingProgrammatically`](https://github.com/facebook/react-native/blob/442a368af5bda653e84514b870084c73607645eb/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m#L72-L107)
- I have tried to comment all of the unexpected changes. Some of these comments are taken directly from the old `RCTRefreshControl.m`
- In general, it seems like [`UIRefreshControl`](https://developer.apple.com/documentation/uikit/uirefreshcontrol) ignores many style updates, and even calls to `beginRefreshing`, until it's been added to the view hierarchy. That's why the `layoutSubviews` hack was needed in the old arch, and is similarly needed in this PR.
    - Here's a [Stack Overflow answer](https://stackoverflow.com/a/67758859) that hints at this, by saying that `beingRefreshing` needed to be called in a ViewController's `viewWillAppear` lifecycle callback
    - Here's a different [Stack Overflow answer](https://stackoverflow.com/a/32688124) that shows that `viewWillLayoutSubviews` (and by extension, all of the subviews' `layoutSubviews`) is indeed called after `viewWillAppear`
- Since `_refreshControl` effectively ignores updates until the first `layoutSubviews` call, I needed to buffer all calls to `updateProps:oldProps:` into my new `_initialProps` before finally re-calling `updateProps:oldProps:` with `_initialProps` against `PullToRefreshViewShadowNode::defaultSharedProps` in `layoutSubviews`
- Additionally, I needed to move the `if` block regarding refreshing from the top of `updateProps:oldProps:` to the bottom of it, because `_refreshControl` ignores updates that are made after the call to `beginRefreshing`

## Known issues:
- There is one small difference between the old arch and the new arch with this PR. The old arch [programmatically animates the pull down content offset](https://github.com/facebook/react-native/blob/442a368af5bda653e84514b870084c73607645eb/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m#L89-L102), whereas this PR does not. See `[scrollView setContentOffset:offset]` in the PR code.
    - I tried animating it with the block below, and this did work in the rn-tester app. However, it caused the fix to not work when used with the extremely popular `react-navigation` and `react-native-screens` libraries. In that case, the `RefreshControl` exhibited the same buggy behavior of not being shown when refreshing on mount.
    ```objective-c
    [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
        [_scrollViewComponentView.scrollView setContentOffset:offset];
    } completion:^(BOOL finished) {
        [_refreshControl beginRefreshing];
    }];
    ```
    - I thought it would be better to fix this for a larger number of real-world scenarios without animation than it would be to fix it for just the rn-tester app with animation.

Reviewed By: javache

Differential Revision: D69980100

Pulled By: cipolleschi

fbshipit-source-id: bbacd8ffffff5d87728a1c8c0063acc60215d1a6
2025-02-25 02:19:37 -08:00
Dawid MałeckiandFacebook GitHub Bot 094c5be42e Merge and align global.d.ts and globals.d.ts files (#49516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49516

Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations.

Changelog:
[General][Changed] - Improve TypeScript types for `global` objects

Reviewed By: huntie

Differential Revision: D69772463

fbshipit-source-id: 4771e27a97e1e9cbc33d8f75ba11cffd4d200124
2025-02-25 01:55:26 -08:00
Dawid MałeckiandFacebook GitHub Bot 721f85adf7 Set minimum typescript version to 4.9 (#49637)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49637

The dtslint requires that the minimum typescript version of 4.9 is used.

Changelog:
[General][Changed] - Increase minimum typescript version in index.d.ts

Reviewed By: huntie

Differential Revision: D69749044

fbshipit-source-id: be255d108c2e9e9452808ba3dea981a7fac0bc21
2025-02-25 01:55:26 -08:00
Dawid MałeckiandFacebook GitHub Bot 4e79ca4464 Add Touchable to buildTypes and align Flow with TS types (#49562)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49562

Changelog:
[Internal]: Added Touchable to buildTypes and aligned Flow with TS types.

Reviewed By: huntie

Differential Revision: D69843245

fbshipit-source-id: 578987a277c3407890a541e442bb347311f71efa
2025-02-25 01:49:28 -08:00
Jakub PiaseckiandFacebook GitHub Bot dee6168027 Align Keyboard types with OSS (#49623)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49623

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70083211

fbshipit-source-id: c91d3cd7e8f4ad8770bc686768103b43611d4ebb
2025-02-25 01:23:04 -08:00
Jakub PiaseckiandFacebook GitHub Bot 091f542a2e Add a pretransform replacing Stringish with string (#49636)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49636

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70094483

fbshipit-source-id: 3ec23f19af437e28e82f73f03541cbf38469d670
2025-02-25 01:22:31 -08:00
Jakub PiaseckiandFacebook GitHub Bot 4309a5d2b1 Fix URLSearchParams common interface definition (#49640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49640

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70096501

fbshipit-source-id: 33c6406beaab06285675fdb7c2ab75ebd2bb280f
2025-02-25 01:20:23 -08:00
Joe VilchesandFacebook GitHub Bot e6af7951f8 Remove some confusing comments in ReactAccessibilityDelegate (#49655)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49655

This tripped me up since this if hits for TextViews in general, not just EditText

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D70139349

fbshipit-source-id: 1993dda4c6472265c5e61fa4cad4f2beaf4a9930
2025-02-24 23:55:27 -08:00
Joe VilchesandFacebook GitHub Bot 0c6dcfdd48 Use isEmpty as opposed to .size() > 0 in BaseViewManager.java (#49654)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49654

This is a lint error, so figured I would fix it

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D70138099

fbshipit-source-id: 489bedc28ac15bed8f98cc3eceb9e393cd4598e7
2025-02-24 23:55:27 -08:00
Soe LynnandFacebook GitHub Bot cccd93b4ed Fix typo in RCTLegacyViewMangerInteropComponentView (#49652)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49652

Changelog [Internal]
Fixing simple typo

Reviewed By: shwanton

Differential Revision: D70136618

fbshipit-source-id: 994b0915c946449a7a01ab15304d35323b58b009
2025-02-24 18:29:31 -08:00
Liron YahdavandFacebook GitHub Bot 8c848b4293 Reland: Throw exception with name of TurboModule instead of deadlock during sync rendering (#49587)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49587

This is a reland diff for D69805065.

The problems with the original diff were:
- wrong header search path in the `React-NativeModuleApple.podspec`
- adding an implementation `RuntimeExecutor.cpp` file to implement a function that is used by an inline function in the `RuntimeExecutor.h`.

I believe that the last point specifically was creating issues to the linker which was not able to resolve the symbols properly in transitive dependencies.

The fix was to move the implementation of `getMainThreadMutex` to be `inline`.

## Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D69922771

fbshipit-source-id: 285ce1f232e8c94b99d80aafe1ffbc473921d52f
2025-02-24 17:00:17 -08:00
Maddie LordandFacebook GitHub Bot a302fbcaaf Set ReactSurface and ReactRootView to ReactDelegate when created via ReactNavigationActivityDelegate (#49580)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49580

Add setReactSurface and setReactRootView methods for custom delegates.

Reviewed By: arushikesarwani94

Differential Revision: D69925812

fbshipit-source-id: b2acd3e541bd34216d9f8cadbdf2fa5c04e46b98
2025-02-24 15:58:11 -08:00
Shawn DempseyandFacebook GitHub Bot f17c26437b Revert D69849314: Use implicit namespace to better align Animated module with OSS types
Differential Revision:
D69849314

Original commit changeset: cdaa605ba536

Original Phabricator Diff: D69849314

fbshipit-source-id: b97b049cf5f3728568a55abfb93dc67cadfa26ba
2025-02-24 15:40:33 -08:00
Rick HanlonandFacebook GitHub Bot ddf9338dfb enable owner stacks everywhere (#32376)
Summary:
this is now canary and on everywhere

DiffTrain build for [8a7b487e3b171c91f2fe18e9142af53f4dd83454](https://github.com/facebook/react/commit/8a7b487e3b171c91f2fe18e9142af53f4dd83454)

Reviewed By: jackpope, kassens

Differential Revision: D69784493

fbshipit-source-id: 363d28c1ffe3eb264ac78f55bac105dd14f571d1
2025-02-24 11:32:49 -08:00
Rubén NorteandFacebook GitHub Bot 8989bc24b9 Refactor tracing in performance.mark and performance.measure (#49639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49639

Changelog: [internal]

This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks).

It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock).

Reviewed By: bgirard

Differential Revision: D69246772

fbshipit-source-id: 141a13f609f12be7ab8ca00f7aa1892b34770bbb
2025-02-24 10:57:29 -08:00
Rubén NorteandFacebook GitHub Bot f424b68c37 Add basic benchmarks for the Performance API (#49638)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49638

Changelog: [internal]

This adds a basic benchmark for different use cases of the `performance` API.

Baseline:
| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '5692.08 ± 0.33%'    | '5590.00'           | '177735 ± 0.02%'           | '178891'                  | 175683  |
| 1       | 'mark (with custom startTime)'                            | '5775.21 ± 0.27%'    | '5690.00'           | '174880 ± 0.02%'           | '175747'                  | 173154  |
| 2       | 'measure (with start and end timestamps)'                 | '6842.61 ± 0.35%'    | '6730.00'           | '147672 ± 0.02%'           | '148588'                  | 146144  |
| 3       | 'measure (with mark names)'                               | '6828.01 ± 0.75%'    | '6700.00'           | '148371 ± 0.02%'           | '149254'                  | 146456  |
| 4       | 'clearMarks'                                              | '817.04 ± 0.03%'     | '800.00'            | '1233054 ± 0.01%'          | '1250000'                 | 1223933 |
| 5       | 'clearMeasures'                                           | '835.59 ± 0.03%'     | '820.00'            | '1203121 ± 0.01%'          | '1219512'                 | 1196758 |
| 6       | 'mark + clearMarks'                                       | '6137.42 ± 1.32%'    | '5920.00'           | '167661 ± 0.02%'           | '168919'                  | 162935  |
| 7       | 'measure + clearMeasures (with start and end timestamps)' | '7353.85 ± 0.60%'    | '7200.00'           | '138196 ± 0.02%'           | '138889'                  | 135984  |
| 8       | 'measure + clearMeasures (with mark names)'               | '7342.93 ± 0.66%'    | '7170.00'           | '138726 ± 0.02%'           | '139470'                  | 136186  |

Reviewed By: bgirard

Differential Revision: D66926182

fbshipit-source-id: b314b359147e758810598a241269d0c019f77466
2025-02-24 10:57:29 -08:00
zhongwuzwandFacebook GitHub Bot 929c8e4baa Fabric: disable React-Fabric stable_sort strict weak sort check in debug mode (#49422)
Summary:
Fixes assert crash in https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.

We can temporarily downgrade  _LIBCPP_HARDENING_MODE to _LIBCPP_HARDENING_MODE_EXTENSIVE, it disables strict weak ordering check in debug mode. Actually, when we sort animation mutations, we don't need it to satisfy strict weak ordering.

https://libcxx.llvm.org/Hardening.html#id3

Another solution is we make sort satisfy it, but we don't have any key to compare when two mutation is the same mutation type but not the same parentTag. Maybe we can use pointer of muation to compare?

## Changelog:

[IOS] [FIXED] - Fabric: disable  React-Fabric stable_sort strict weak sort check in debug mode

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

Test Plan: Fixes  https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.

Reviewed By: sammy-SC

Differential Revision: D69984937

Pulled By: cipolleschi

fbshipit-source-id: 2a3d17970def513c4ba915068f25338169db82d6
2025-02-24 10:25:52 -08:00
Sam ZhouandFacebook GitHub Bot 6f968f01eb Pre-suppress errors ahead of builtin libdef improvements (#49647)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49647

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D70103465

fbshipit-source-id: 24f3c9fa7c56ed88609e60202d2a8c865fe18b47
2025-02-24 10:23:14 -08:00
Iwo PlazaandFacebook GitHub Bot b56548969a Use implicit namespace to better align Animated module with OSS types (#49559)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49559

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69849314

fbshipit-source-id: cdaa605ba5361d3349c6dd0e84fd0fbfee263941
2025-02-24 09:20:04 -08:00
Jakub PiaseckiandFacebook GitHub Bot c66728dc35 Add ButtonProps export (#49593)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49593

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69984581

fbshipit-source-id: 1a9607866dee564718081a15f9f6740dfb8dd0e4
2025-02-24 08:50:19 -08:00
Ruslan LesiutinandFacebook GitHub Bot 8bce4a37e1 Change TouchedViewDataAtPoint type in ReactNativeTypes to use supported by Flow tooling syntax (#32382)
Summary:
## Summary

The `flow-api-translator` from the `hermes` repo does not support flow
type spreads. It is currently not able to digest the ReactNativeTypes
file as it contains unsupported syntax. The simplest solution is to
change the type of the `TouchedViewDataAtPoint` to equivalent, yet
supported by the Flow tooling. In this case the intersection can be used
as
the `TouchedViewDataAtPoint` and `InspectorData` have no common
property.

## How did you test this change?

Run yarn flow native

DiffTrain build for [e670e72fa076449e40172e20d17cc67c1c15419c](https://github.com/facebook/react/commit/e670e72fa076449e40172e20d17cc67c1c15419c)

Reviewed By: rickhanlonii

Differential Revision: D69661050

fbshipit-source-id: 1732bd9ac9c1af1e4c0b95758e92d9ccf3b807e6
2025-02-24 08:29:34 -08:00
Olivier BouilletandFacebook GitHub Bot e3b176a598 fix: set text position should not reset component text (#49450)
Summary:
fix: https://github.com/facebook/react-native/issues/49368
description is provided inside the ticket.
When we use TextInput on ios and manage selection with the selection prop, TextInput is reset when we change selection.

## Changelog:

[IOS] [FIXED] - Fix selection makes TextInput clear its content when using children

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

Test Plan:
Tested with sample provided in ticket.
I also test it with my app on both android and ios, but I cannot share video

Reviewed By: sammy-SC

Differential Revision: D69984616

Pulled By: cipolleschi

fbshipit-source-id: a17169608f9df0ea1cb579e6038345f8e48bbc27
2025-02-24 08:23:30 -08:00
Dawid MałeckiandFacebook GitHub Bot 92e21688db Add RefreshControl to buildTypes and align Flow with TS types (#49564)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49564

Changelog:
[Internal] - Added RefreshControl to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69924368

fbshipit-source-id: 1a01ede28f9d0729c483036f8d3f9c9eced58286
2025-02-24 07:08:03 -08:00
zhongwuzwandFacebook GitHub Bot 5c1e01fdfe Fabric: Fixes shouldRasterizeIOS prop of View not work on iOS (#49615)
Summary:
The js prop name is `shouldRasterizeIOS` https://reactnative.dev/docs/view#shouldrasterizeios-ios, so we should change the prop name when parsing the props.

## Changelog:

[IOS] [FIXED] - Fabric: Fixes shouldRasterizeIOS prop of View not work on iOS

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

Test Plan:
Enable `shouldRasterizeIOS` should work in Fabric:
```
      <View shouldRasterizeIOS={true}>
```

Reviewed By: rshest

Differential Revision: D70085480

Pulled By: javache

fbshipit-source-id: 499524b7812f932b0da4a4f239ff6a79043b2f87
2025-02-24 06:47:46 -08:00
Jakub PiaseckiandFacebook GitHub Bot f8627e5627 Align ActivityIndicator with OSS types (#49519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49519

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69661567

fbshipit-source-id: 35e3849eeea188f8bdfa0664c90d3d9e5328ef80
2025-02-24 06:36:56 -08:00
Pieter De BaetsandFacebook GitHub Bot 3f3066f72b Remove unused sample turbo cxx module variants (#49629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49629

I don't think `RCTSampleTurboCxxModule_v1` does anything useful anymore since we no longer use the `getTurboModuleWithJsInvoker:` API anywhere.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D70088150

fbshipit-source-id: 6391531c412dec18c63948db883aba07ab21499e
2025-02-24 06:32:00 -08:00
Jakub PiaseckiandFacebook GitHub Bot db4086de97 Align LayoutConformance types with OSS (#49625)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49625

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D70084487

fbshipit-source-id: f4f0a06f3d7cf87659696ac41a27be5f5972d99f
2025-02-24 06:19:45 -08:00
Rubén NorteandFacebook GitHub Bot dbc0bf34ea Prepare for removal of types in ReactNativeTypes (#49602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49602

Changelog: [internal]

This just prepares for the removal of some types from `ReactNativeTypes`, and defines some types in `ReactNativePrivateInterface` that `ReactNativeTypes` expects to be defined after https://github.com/facebook/react/pull/32446

Reviewed By: huntie

Differential Revision: D69996009

fbshipit-source-id: 3c156b4dede8e217d6a828ab310533a2f8bfd42c
2025-02-24 05:32:43 -08:00
Rubén NorteandFacebook GitHub Bot e630b2ca18 Create specific module in RN to define the types for host instances and host components that ReactNativeTypes defines (#49601)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49601

Changelog: [internal]

This creates a new module in React Native to define some of the types related to `HostInstance` that are currently defined in `ReactNativeTypes` (synced from the React repo).

We want to remove the types from `ReactNativeTypes` so this is a necessary initial step.

Reviewed By: huntie

Differential Revision: D69996010

fbshipit-source-id: 21cfed4c222e22332936e56aca895fe578809792
2025-02-24 05:32:43 -08:00
Vitali ZaidmanandFacebook GitHub Bot 14b0c27045 remove duplicate call to json stringify (#49621)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49621

Changelog:
[General][Internal] - remove duplicate call to json stringify

Reviewed By: robhogan

Differential Revision: D70082245

fbshipit-source-id: 01a4277a73978fcee1fc44b5bc6ae5a728e6b504
2025-02-24 05:07:22 -08:00
Jakub PiaseckiandFacebook GitHub Bot 0a87f0cf5c Align ScrollView with the OSS types (#49617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49617

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69981167

fbshipit-source-id: d4b2661b9ec746f30b512bad2c84d4dd0c1755c7
2025-02-24 05:03:18 -08:00
Jakub PiaseckiandFacebook GitHub Bot dcaa33e6d9 Add support for numberOfLines for TextInput on iOS (#49549)
Summary:
`TextInput` component has been missing support for `numberOfLines` prop on iOS, this PR adds it.

## Changelog:

[IOS] [ADDED] - Add support for `numberOfLines` prop on `TextInput`

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

Test Plan: Tested on RNTester and added a new case utilizing the prop

Reviewed By: cipolleschi

Differential Revision: D69915133

Pulled By: j-piasecki

fbshipit-source-id: b6a86bc64bd3c2129a64e99c9bcec9cf5bfde3bc
2025-02-24 04:23:58 -08:00
Nicola CortiandFacebook GitHub Bot 53ff6133a7 Re-land: Make RedBoxContentView internal (#49596)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49596

I'm relanding D69934543 as it was previsouly reverted.

I'm making this class internal as I've verified that there are no meaningful usages.

[Source](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+com.facebook.react.devsupport.RedBoxContentView)

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69987752

fbshipit-source-id: 191a5f5aacbe6ff642e98d4e8c621c17156e55de
2025-02-24 03:15:56 -08:00
Dawid MałeckiandFacebook GitHub Bot b060fbe99c Add StatusBar to buildTypes and align Flow with TS types (#49598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49598

Changelog:
[Internal] - Added StatusBar to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69990300

fbshipit-source-id: 684c3692fd3cc4862fd3cd3fe4731129887b9bcc
2025-02-24 03:11:31 -08:00
Vitali ZaidmanandFacebook GitHub Bot 4e7b77eb1a create a heartbeat for device, and not only for debugger (#49618)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49618

Changelog:
[General][Internal] - create a heartbeat for device, and not only for debugger.

Introducing a heartbeat for the connection between the proxy and the device similarly to the one between the proxy and the debugger. This will allow us to:
* Most importantly I'd like to track the ping-pong roundtrip to the device as well, to see if we have any anomalies there
* Terminate the connection if it is abandoned for 60seconds- this might have a real effect in some case where the device runs remotely
* Also keep that connection alive if the other side disconnects after a period of inactivity. While a no-op in our case, this is an implementation detail. It is a no-op because the WebSocket on the Device is implemented by us and is not supposed to drop connections like the browser does.

Reviewed By: robhogan

Differential Revision: D69990715

fbshipit-source-id: 6bb3a2ed3eaffff9535aa2d0fc8cff0262af022f
2025-02-24 01:57:34 -08:00
Dawid MałeckiandFacebook GitHub Bot 56ed15ee12 Add optional reference to the TouchableHighlight and new types test (#49591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49591

Changelog:
[Internal] - Added optional reference to the TouchableHighlight and new types test

Reviewed By: huntie

Differential Revision: D69984286

fbshipit-source-id: f6757720d0914ea3da3a32c824eb9aaeb5a1f39b
2025-02-24 01:32:38 -08:00
Jakub PiaseckiandFacebook GitHub Bot 7b5b7b20de Update VirtualizedSectionList props name (#49592)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49592

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69984225

fbshipit-source-id: 753917f31a803c3bc8ea2e4635ec1d58cecb9224
2025-02-23 23:59:51 -08:00
Mateo GuzmánandFacebook GitHub Bot 021167ea57 Remove MessageQueueThreadHandler.java to fix CI (#49613)
Summary:
MessageQueueThreadHandler was migrated to Kotlin in https://github.com/facebook/react-native/pull/49583 but during merging the Java file was kept, this is currently breaking the `build-android` action in CI. [See this action for example](https://github.com/facebook/react-native/actions/runs/13472084782/job/37646841097?pr=49607)

## Changelog:

[INTERNAL] - Remove MessageQueueThreadHandler.java implementation to fix CI

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

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

Reviewed By: fkgozali

Differential Revision: D70059045

Pulled By: arushikesarwani94

fbshipit-source-id: 93665a8ac4ccc1cb1b03908179e2fcd12c61b3dd
2025-02-23 12:52:35 -08:00
Devan BuggayandFacebook GitHub Bot 1fe8d587a8 Remove sharedApplication use in SafeAreaProxy (#49612)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49612

`[UIApplication sharedApplication]` is not allowed in Mac Catalyst. This #ifdef's it out which is a common pattern elsewhere.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D69971189

fbshipit-source-id: 89dbc0a02ed2a06936f910fbfc13e1fb91972540
2025-02-21 18:20:26 -08:00
Samuel SuslaandFacebook GitHub Bot 814e1ebff6 avoid sync dispatch with locked mutex in RCTKeyWindowValuesProxy (#49605)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49605

changelog: [internal]

Calling `RCTUnsafeExecuteOnMainQueueSync` while holding a lock can lead to a deadlock. In this diff, we remove it from RCTKeyWindowValuesProxy.

Reviewed By: javache

Differential Revision: D69997888

fbshipit-source-id: a09fc641c9fb2aec59aef34e4047e1ef11cdaf02
2025-02-21 16:41:30 -08:00
Joe VilchesandFacebook GitHub Bot a003be0f23 Allow text links to be navigatable via keyboard by default v2 (#49381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49381

A much improved version of my previous attempt in D68306316 (https://github.com/facebook/react-native/pull/48773).

Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D69551206

fbshipit-source-id: 6a88ccd507dc5534c1f494e3303c6bfc2bae5e9f
2025-02-21 16:10:03 -08:00
Joe VilchesandFacebook GitHub Bot c9e6567881 Fix issue where state updating text to remove link would break TalkBack
Summary:
Whenever we remove a link in some text we do not properly update the accessibility delegate to respond to this change. As a result we still think that there are nodes to access around the spans

Changelog: [Android][Fixed] - Fix text link accessibility on state update removal

Reviewed By: NickGerleman, mdvacca

Differential Revision: D69551906

fbshipit-source-id: f43fcf72219e76d2d0bbb29d31ab219d73413671
2025-02-21 16:10:03 -08:00
Joe VilchesandFacebook GitHub Bot d65d846ccf Move text-specific a11y logic in ReactAccessibilityDelegate to subclass (#49377)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49377

ReactAccessibilityDelegate exists to handle much of the accessibility tasks in the various Views in RN. There is quite a bit of text specific logic, mostly related to virtual views and nested links within a TextView.

I decided to subclass this into a TextView-specific version because I need this delegate to reference TextView or ReactClickableSpan, which live under `react/views` while ReactAccessibilityDelegate live under `react/uimanager`. The former depends on the latter, so making the latter depend on the former would for a dependency cycle that would break builds. I thought about making a separate package for this but both `react/views` and `react/uimanager` need to include ReactAccessibilityDelegate so we would still have a cycle.

mAccessibilityLinks is only set on ReactTextViewManager, so this is purely a text thing. Subclassing is not the most ideal as it extends the inheritance chain some more but I do not see a better option.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D69499115

fbshipit-source-id: 1720d20bb56ba1e1b5bd114d32bc70e80e3b4558
2025-02-21 16:10:03 -08:00
Nicola CortiandFacebook GitHub Bot 50878c248d Reland: Make PerftestDevSupportManager internal (#49595)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49595

This is a reland of D69934544 which was previously reverted.

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

I'm making this class internal as I verified that there are no meaningful OSS usages.

[Source](https://www.google.com/url?q=https://github.com/search?type%3Dcode%26q%3DNOT%2Bis%253Afork%2BNOT%2Borg%253Afacebook%2BNOT%2Brepo%253Areact-native-tvos%252Freact-native-tvos%2BNOT%2Brepo%253Anuagoz%252Freact-native%2BNOT%2Brepo%253A2lambda123%252Freact-native%2BNOT%2Brepo%253Abeanchips%252Ffacebookreactnative%2BNOT%2Brepo%253AfabOnReact%252Freact-native-notes%2BNOT%2Buser%253Ahuntie%2BNOT%2Buser%253Acortinico%2BNOT%2Brepo%253AMaxdev18%252Fpowersync_app%2BNOT%2Brepo%253Acarter-0%252Finstagram-decompiled%2BNOT%2Brepo%253Am0mosenpai%252Finstadamn%2BNOT%2Brepo%253AA-Star100%252FA-Star100-AUG2-2024%2BNOT%2Brepo%253Alclnrd%252Fdetox-scrollview-reproductible%2BNOT%2Brepo%253ADionisisChytiris%252FWorldWiseTrivia_Main%2BNOT%2Brepo%253Apast3l%252Fhi2%2BNOT%2Brepo%253AoneDotpy%252FCaribouQuest%2BNOT%2Brepo%253Abejayoharen%252Fdailytodo%2BNOT%2Brepo%253Amolangning%252Freversing-discord%2BNOT%2Brepo%253AScottPrzy%252Freact-native%2BNOT%2Brepo%253Agabrieldonadel%252Freact-native-visionos%2BNOT%2Brepo%253AGabriel2308%252FTestes-Soft%2BNOT%2Brepo%253Adawnzs03%252FflakyBuild%2BNOT%2Brepo%253Acga2351%252Fcode%2BNOT%2Brepo%253Astreeg%252Ftcc%2BNOT%2Brepo%253Asoftware-mansion-labs%252Freact-native-swiftui%2Bcom.facebook.react.devsupport.PerftestDevSupportManager&sa=D&source=editors&ust=1740080026490626&usg=AOvVaw2lrtsZSaLDgxSkejXVrRrp)

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69988162

fbshipit-source-id: 475b509417c4e6974d62bab01c089588625fcd8c
2025-02-21 14:57:12 -08:00
Nicola CortiandFacebook GitHub Bot 8cc772da9a Make PackagerStatusCheck Internal (#49575)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49575

I've verified that this class is not used in OSS so I'm making it internal.

[Source](https://www.google.com/url?q=https://github.com/search?type%3Dcode%26q%3DNOT%2Bis%253Afork%2BNOT%2Borg%253Afacebook%2BNOT%2Brepo%253Areact-native-tvos%252Freact-native-tvos%2BNOT%2Brepo%253Anuagoz%252Freact-native%2BNOT%2Brepo%253A2lambda123%252Freact-native%2BNOT%2Brepo%253Abeanchips%252Ffacebookreactnative%2BNOT%2Brepo%253AfabOnReact%252Freact-native-notes%2BNOT%2Buser%253Ahuntie%2BNOT%2Buser%253Acortinico%2BNOT%2Brepo%253AMaxdev18%252Fpowersync_app%2BNOT%2Brepo%253Acarter-0%252Finstagram-decompiled%2BNOT%2Brepo%253Am0mosenpai%252Finstadamn%2BNOT%2Brepo%253AA-Star100%252FA-Star100-AUG2-2024%2BNOT%2Brepo%253Alclnrd%252Fdetox-scrollview-reproductible%2BNOT%2Brepo%253ADionisisChytiris%252FWorldWiseTrivia_Main%2BNOT%2Brepo%253Apast3l%252Fhi2%2BNOT%2Brepo%253AoneDotpy%252FCaribouQuest%2BNOT%2Brepo%253Abejayoharen%252Fdailytodo%2BNOT%2Brepo%253Amolangning%252Freversing-discord%2BNOT%2Brepo%253AScottPrzy%252Freact-native%2BNOT%2Brepo%253Agabrieldonadel%252Freact-native-visionos%2BNOT%2Brepo%253AGabriel2308%252FTestes-Soft%2BNOT%2Brepo%253Adawnzs03%252FflakyBuild%2BNOT%2Brepo%253Acga2351%252Fcode%2BNOT%2Brepo%253Astreeg%252Ftcc%2BNOT%2Brepo%253Asoftware-mansion-labs%252Freact-native-swiftui%2Bcom.facebook.react.devsupport.PackagerStatusCheck&sa=D&source=editors&ust=1740079563838123&usg=AOvVaw09B3GTFOynL-bbMHF6M4m2)

Changelog:
[Internal] [Changed] -

Reviewed By: arushikesarwani94

Differential Revision: D69933995

fbshipit-source-id: 77e308bd01fb4d51d4cf54e4666f15b532b43453
2025-02-21 14:47:32 -08:00
Mateo GuzmánandFacebook GitHub Bot 4bb03f3549 Migrate com.facebook.react.bridge.queue.MessageQueueThreadHandler to Kotlin (#49583)
Summary:
Migrate com.facebook.react.bridge.queue.MessageQueueThreadHandler to Kotlin

## Changelog:

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

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

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

Reviewed By: javache

Differential Revision: D69950075

Pulled By: arushikesarwani94

fbshipit-source-id: ddca07860a57816b2ff3b2b8902151686700f5c2
2025-02-21 14:31:13 -08:00
Jack PopeandFacebook GitHub Bot 07d9cf3ed0 Back out "cleanup feature flag enableFabricCompleteRootInCommitPhase" (#49565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49565

Original commit changeset: 6ed54f0fab45

Original Phabricator Diff: D69473992

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D69924542

fbshipit-source-id: 6438d1f6e21728de662a060893b0f08f9285be73
2025-02-21 14:26:37 -08:00
Joe VilchesandFacebook GitHub Bot 441744a0eb Implement view finding by native id (#49581)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49581

I need to be able to find a View with a specific nativeId as part of my implementation of accessibility ordered children. This already exists in Android in `ReactFindViewUtil.kt`.

Not much to this implementation. Recursive tree searching. I do not think perf is a big deal here but if we want to optimize this we could implement some nativeId registry and try and get the UIView * from that at the expense of storing that map somewhere.

Changelog: [Internal]

Reviewed By: vincentriemer

Differential Revision: D69868430

fbshipit-source-id: b3648a8dca351bed50534cac2144d7e8ea0a207f
2025-02-21 14:10:01 -08:00
Mateo GuzmánandFacebook GitHub Bot 0aa8af906d Migrate com.facebook.react.modules.network.RequestBodyUtil to Kotlin (#49584)
Summary:
Migrate com.facebook.react.modules.network.RequestBodyUtil to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.modules.network.RequestBodyUtil to Kotlin

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

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

Reviewed By: arushikesarwani94

Differential Revision: D69980421

Pulled By: cortinico

fbshipit-source-id: aa66661b2b79afdfd41963e7896b9a01f12af5cb
2025-02-21 12:45:00 -08:00
Henry GarantandFacebook GitHub Bot f85cca0ee5 Back out D69855097 & D69874923 to unblock Twilight headset pairing/discovery (#49600)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49600

changelog: [internal]

# Context
Recent reports of unable to pair or connect to headsets in the Twilight app started ~1 day ago.

I used a bisect to narrow down the range of changes https://www.internalfb.com/mobile-bisect/Bi653128483872339, which lead to [changelog](https://www.internalfb.com/intern/changelog/?search=%7B%22key%22%3A%22AND%22%2C%22children%22%3A[%7B%22key%22%3A%22buck_target_is%22%2C%22field%22%3A%22buck_target%22%2C%22value%22%3A%22%2F%2Ffbobjc%2FApps%2FOculus%2FTwilight%3ATwilight%22%7D%2C%7B%22key%22%3A%22branch_first%22%2C%22field%22%3A%22branch%22%2C%22value%22%3A%22master%22%7D%2C%7B%22key%22%3A%22revision_first%22%2C%22field%22%3A%22revision%22%2C%22value%22%3A%22e835199c51fd1b55c3c13c5504f9b5527e201b41%22%7D%2C%7B%22key%22%3A%22branch_last%22%2C%22field%22%3A%22branch%22%2C%22value%22%3A%22master%22%7D%2C%7B%22key%22%3A%22revision_last%22%2C%22field%22%3A%22revision%22%2C%22value%22%3A%22d19e5a6cd5949d65aee30f7e8ce185979b7448af%22%7D]%7D)

From there I continued until I found the threshold
D69855097 (bad) and D69803512 (good).

I tried a direct revert of D69855097 but the changes we spread across another diff
D69874923.

Reverting the stack of these gets us to here.

Could use help understanding what's going on.

Reviewed By: sammy-SC

Differential Revision: D69987736

fbshipit-source-id: f9d16a460112374f163d235dc3e576d7ad506ebf
2025-02-21 10:56:37 -08:00
Dawid MałeckiandFacebook GitHub Bot 0d454285c7 Add Switch to buildTypes and align Flow with TS types. (#49597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49597

Changelog:
[Internal] - Added Switch to buildTypes and aligned Flow with TS types.

Reviewed By: huntie

Differential Revision: D69984618

fbshipit-source-id: 1fb978bb712be20f0e685af80bef0ac6d78b73ba
2025-02-21 09:09:01 -08:00
Nicola CortiandFacebook GitHub Bot 6dbc0558ff Cleanup enableEventEmitterRetentionDuringGesturesOnAndroid feature flag (#49590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49590

This feature flag was used to validate a fix for handling of events during
gesture on pressable. It can now be removed as the flag has been set to true for several
internal app (Twilight among others) for several months.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D69983235

fbshipit-source-id: 89b96b3e4c98ae258982341f56ddc13aa2fe51bd
2025-02-21 09:01:19 -08:00
Phil PluckthunandFacebook GitHub Bot 55acb42105 chore(community-cli-plugin): Remove extraneous @react-native/metro-babel-transformer (#49558)
Summary:
Opening this as a separate PR, since I'm not sure if I'm missing something, or if there's any intention behind this.

`react-native/metro-babel-transformer` is used by `react-native/metro-config` and is referenced in code there and as a dependency there. It's also sometimes mentioned as package for community CLI users to install directly. However, there's seemingly no reason `react-native/metro-babel-transformer` needs to depend on it, or any code that relies on it directly.

## Changelog:

[INTERNAL] [CHANGED] - Remove extraneous `react-native/metro-babel-transformer` dependency from community-cli-plugin

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

Test Plan: - n/a

Reviewed By: robhogan

Differential Revision: D69926109

Pulled By: huntie

fbshipit-source-id: b89b54890248de4954e5c0ce4afe3a5cb5bfa2c1
2025-02-21 08:43:56 -08:00
Janic DuplessisandFacebook GitHub Bot b0fd9c1556 Update androidx app compat to 1.7.0 (#49594)
Summary:
Update androidx app compat to the latest version.

This is needed as part of https://github.com/facebook/react-native/pull/49486 to have access to `fullyDrawnReporter`.

## Changelog:

[ANDROID] [CHANGED] - Update androidx app compat to 1.7.0

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

Test Plan: Tested in RN tester that it builds fine and works properly.

Reviewed By: Abbondanzo

Differential Revision: D69988202

Pulled By: cortinico

fbshipit-source-id: 0329aa84a76327db535ddba8acf059ebbf1dbdfc
2025-02-21 08:40:01 -08:00
Phil PluckthunandFacebook GitHub Bot 28458a0c79 chore(dev-middleware): Move selfsigned to package.json:devDependencies (#49556)
Summary:
This package does not seem to be referenced by anything but the tests in `packages/dev-middleware`, so seems like a pretty straightforward change to drop it from `dependencies`.

It only seems to be referenced in `packages/dev-middleware/src/__tests__/ServerUtils.js`

## Changelog:

[INTERNAL] [CHANGED] - Remove selfsigned from dev-middleware dependencies

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

Test Plan: - n/a

Reviewed By: cipolleschi

Differential Revision: D69925928

Pulled By: huntie

fbshipit-source-id: bba41f81dba054505ebf196ad37c7a718a6b16da
2025-02-21 07:50:03 -08:00
Mateo GuzmánandFacebook GitHub Bot 4bc2c5298c Make HermesMemoryDumper internal (#49585)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+com.facebook.hermes.instrumentation.HermesMemoryDumper).

## Changelog:

[INTERNAL] - Make com.facebook.hermes.instrumentation.HermesMemoryDumper internal

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

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

Reviewed By: javache

Differential Revision: D69980382

Pulled By: cortinico

fbshipit-source-id: 654d62e0961ab471d494fa9769fafa02d3808432
2025-02-21 07:28:21 -08:00
Samat OsmonovandFacebook GitHub Bot bd8c19739a Revert D69934544: Make PerftestDevSupportManager internal
Differential Revision:
D69934544

Original commit changeset: 00fc90907a27

Original Phabricator Diff: D69934544

fbshipit-source-id: 03aa1de1e594266b88b624dacec8891b1907a07f
2025-02-21 06:08:39 -08:00
Samat OsmonovandFacebook GitHub Bot e7d0271c67 Revert D69934543: Make RedBoxContentView internal
Differential Revision:
D69934543

Original commit changeset: 1fdf74a4aa34

Original Phabricator Diff: D69934543

fbshipit-source-id: 20a3f0011945fc5e1fb9efe25b81cd5e4fdd1b70
2025-02-21 06:07:03 -08:00
Phil PluckthunandFacebook GitHub Bot fd3b911533 chore(community-cli-plugin): Drop shadowed readline module (#49557)
Summary:
While `readline` is referenced in `packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js`, this references the `node:readline` module by default. The extra package seems to have been installed and included accidentally, as the `attachKeyHandlers` file uses an export from `node:readline` that's never been present in `npm:readline`.

Since the name matches but Node.js will always prefer built-in/code modules, this dependency is dangling and can never be reached, since it's name is shadowed (as also stated in their readme). This can be reproduced by comparing `require('readline')` and `require('../../node_modules/readline')` in `packages/community-cli-plugin`. The flow types also confirm this.

This overall seems highly safe to drop.

## Changelog:

[INTERNAL] [CHANGED] - Remove shadowed and unused readline npm package from community-cli-plugin

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

Test Plan:
Prior to changes applied:

```sh
$ node -e 'console.log(require("readline") === require("node:readline"))'
true
```

Reviewed By: cipolleschi

Differential Revision: D69925999

Pulled By: huntie

fbshipit-source-id: 802fdaa396630b44d5aacefeb9c2473fb53d167e
2025-02-21 05:56:51 -08:00
Jakub PiaseckiandFacebook GitHub Bot 289dba8cf2 Align InteractionManager and PanResponder types with OSS (#49517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49517

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69742877

fbshipit-source-id: ccd99b29aed4ec4ef8c0b7b2a57763f716be411e
2025-02-21 05:18:56 -08:00
Nicola CortiandFacebook GitHub Bot 5a01b0061d Make PerftestDevSupportManager internal (#49577)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49577

I'm making this class internal as I verified that there are no meaningful OSS usages.

[Source](https://www.google.com/url?q=https://github.com/search?type%3Dcode%26q%3DNOT%2Bis%253Afork%2BNOT%2Borg%253Afacebook%2BNOT%2Brepo%253Areact-native-tvos%252Freact-native-tvos%2BNOT%2Brepo%253Anuagoz%252Freact-native%2BNOT%2Brepo%253A2lambda123%252Freact-native%2BNOT%2Brepo%253Abeanchips%252Ffacebookreactnative%2BNOT%2Brepo%253AfabOnReact%252Freact-native-notes%2BNOT%2Buser%253Ahuntie%2BNOT%2Buser%253Acortinico%2BNOT%2Brepo%253AMaxdev18%252Fpowersync_app%2BNOT%2Brepo%253Acarter-0%252Finstagram-decompiled%2BNOT%2Brepo%253Am0mosenpai%252Finstadamn%2BNOT%2Brepo%253AA-Star100%252FA-Star100-AUG2-2024%2BNOT%2Brepo%253Alclnrd%252Fdetox-scrollview-reproductible%2BNOT%2Brepo%253ADionisisChytiris%252FWorldWiseTrivia_Main%2BNOT%2Brepo%253Apast3l%252Fhi2%2BNOT%2Brepo%253AoneDotpy%252FCaribouQuest%2BNOT%2Brepo%253Abejayoharen%252Fdailytodo%2BNOT%2Brepo%253Amolangning%252Freversing-discord%2BNOT%2Brepo%253AScottPrzy%252Freact-native%2BNOT%2Brepo%253Agabrieldonadel%252Freact-native-visionos%2BNOT%2Brepo%253AGabriel2308%252FTestes-Soft%2BNOT%2Brepo%253Adawnzs03%252FflakyBuild%2BNOT%2Brepo%253Acga2351%252Fcode%2BNOT%2Brepo%253Astreeg%252Ftcc%2BNOT%2Brepo%253Asoftware-mansion-labs%252Freact-native-swiftui%2Bcom.facebook.react.devsupport.PerftestDevSupportManager&sa=D&source=editors&ust=1740080026490626&usg=AOvVaw2lrtsZSaLDgxSkejXVrRrp)

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D69934544

fbshipit-source-id: 00fc90907a27026269592e4cdfa8aed6e70a7c6e
2025-02-21 04:56:43 -08:00
Nicola CortiandFacebook GitHub Bot 303d379144 Make RedBoxContentView internal (#49578)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49578

I'm making this class internal as I've verified that there are no meaningful usages.

[Source](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+com.facebook.react.devsupport.RedBoxContentView)

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D69934543

fbshipit-source-id: 1fdf74a4aa34a641974aae71534555b86fe02d9c
2025-02-21 04:46:50 -08:00
Nicola CortiandFacebook GitHub Bot ffd426aff4 Unbreak CI due to AP Kotlin code which fails to compile (#49589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49589

We should not be attempting to compile anything related to the annotation
processor in either Kotlin or Java.
This excludes those folders from the Kotlin compilation task as the
CI is currently red because of it.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D69981620

fbshipit-source-id: 7e2d534023ab1c00e5aadf8546440a4cc4c01ec0
2025-02-21 04:41:50 -08:00
Dawid MałeckiandFacebook GitHub Bot f5837bf9f4 Add TouchableHighlight to buildTypes and move comments from TS definitions (#49560)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49560

Changelog:
[Internal] - Added TouchableHighlight to buildTypes and moved comments from TS definitions

Reviewed By: huntie

Differential Revision: D69919248

fbshipit-source-id: 66b615df60862a53132bd7b2ae9f54065c444e22
2025-02-21 04:00:06 -08:00
Dawid MałeckiandFacebook GitHub Bot e96e0de756 Add TouchableNativeFeedback to buildTypes and align Flow types (#49561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49561

Changelog:
[Internal] - Added TouchableNativeFeedback to buildTypes and aligned Flow types

Reviewed By: huntie

Differential Revision: D69858177

fbshipit-source-id: 4bd55cba9a9eb1a1d304911cf929b363205a20d5
2025-02-21 04:00:06 -08:00
Dawid MałeckiandFacebook GitHub Bot b418aacd85 Add TouchableWithoutFeedback to buildTypes and align Flow with TS types (#49529)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49529

Changelog:
[Internal] - Added TouchableWithoutFeedback to buildTypes and aligned Flow with TS types

Reviewed By: huntie

Differential Revision: D69855221

fbshipit-source-id: a1de660e02a90f8e1c181b8e0c5dfdbaa4d2c75c
2025-02-21 04:00:06 -08:00
Rubén NorteandFacebook GitHub Bot f200b70354 Add Fantom test for synchronous state updates + UI consistency (#49572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49572

Changelog: [internal]

This adds a test to verify the behavior of 2 feature flags: synchronous state updates and UI consistency.

Reviewed By: javache

Differential Revision: D69932313

fbshipit-source-id: 341cfff3fa533503a293f6ccd0282442ba63d430
2025-02-21 03:21:07 -08:00
Vitali ZaidmanandFacebook GitHub Bot 4535e62414 add the event tracking when connection to debugger is closed (#49574)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49574

Changelog:
[General][Internal] add the event tracking when connection to debugger is closed

Reviewed By: huntie

Differential Revision: D69917816

fbshipit-source-id: 4a15288333c0d5b7fb821d046fa9c615bb25223e
2025-02-21 02:38:12 -08:00
Alan LeeandFacebook GitHub Bot bce6aa2828 Back out "Migrate ReactClippingViewGroup to Kotlin" (#49586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49586

Reverting https://github.com/facebook/react-native/pull/49413 as it was causing a crash with assertion failure in ReactViewGroup.addViewWithSubviewClippingEnabled()

Changelog:
[INTERNAL] revert Kotlin conversion due to crash

Reviewed By: sbuggay

Differential Revision: D69953848

fbshipit-source-id: b438fb928a4849f3dbad6a9d59d0f48449035fd6
2025-02-20 17:51:32 -08:00
David VaccaandFacebook GitHub Bot e6d0ef2832 Introduce script to generate list of legacy architecture types (#49579)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49579

Introduce script to generate list of legacy architecture types

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D69937113

fbshipit-source-id: 54ba2a982128dab402acec1c40d833c71df2fabb
2025-02-20 17:06:11 -08:00
David VaccaandFacebook GitHub Bot e8afcbbc38 Migrate ReactLegacyArchitectureProcessor to kotlin (#49571)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49571

Migrate ReactLegacyArchitectureProcessor to kotlin

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D69929877

fbshipit-source-id: 448c8de54cbb1f72eeee747edaf4cbb2a5fd365d
2025-02-20 17:06:11 -08:00
David VaccaandFacebook GitHub Bot 14bb32f4fc Create initial version of ReactLegacyArchitectureProcessor (#49570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49570

This diff creates a initial version of the annotation processor to output the list of types that are annotated with LegacyArchitecture

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D69929875

fbshipit-source-id: 90a8d299f4667ab8d103c061d287991dbdb291df
2025-02-20 17:06:11 -08:00
David VaccaandFacebook GitHub Bot c612662999 Mark subset of bridge classes as LegacyArchitecture (#49569)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49569

In this diff I'm annotating a subset of bridge classes with LegacyArchitecture

The goal is to test the annotation processor in next diffs

changelog: [internal] internal

Reviewed By: cortinico, Abbondanzo

Differential Revision: D69929878

fbshipit-source-id: 8be4d010f6519617d334da361983dce0fa66e3b4
2025-02-20 17:06:11 -08:00
David VaccaandFacebook GitHub Bot 339297f095 Introduce ReactLegacyArchitectureProcessor annotation processor (#49568)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49568

The goal of this annotation processor is to generate a file with all the types that belong to Legacy Architecture of React Native

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D69929876

fbshipit-source-id: c21bf1a868258b20be91721006d7fc8fa85adcd1
2025-02-20 17:06:11 -08:00
Douglas LowderandFacebook GitHub Bot 2c4a9d2a1b chore: make iOS glog script compatible with tvOS (#49539)
Summary:
This upstreams a change from [RNTV](https://github.com/react-native-tvos/react-native-tvos/) to allow the glog prepare script to work on both iOS and tvOS.

## Changelog:

[Internal][Changed] make iOS glog script compatible with tvOS

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

Test Plan:
- This change works well on the TV repo
- CI should pass, and iOS compilation and operation should be unchanged

Reviewed By: cortinico

Differential Revision: D69928586

Pulled By: cipolleschi

fbshipit-source-id: b5fec438151e659e98834a83effbc7e166df6aa5
2025-02-20 11:00:36 -08:00
Vitali ZaidmanandFacebook GitHub Bot a91cafd8cd add debuggerSessionIDs fields to debugger events (#49552)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49552

Changelog:
[General][Internal] - expand debugger events to have DebuggerSessionIDs

Also moved the handling of these to a shared function

Reviewed By: huntie

Differential Revision: D69917817

fbshipit-source-id: 2374ac5b5dc0040b0e15028ab89fbe78026bc296
2025-02-20 10:07:19 -08:00
Jakub PiaseckiandFacebook GitHub Bot c079d5218f Partially align Utilities with OSS types (#49471)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49471

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69747254

fbshipit-source-id: 70bfe94d0950d31e7f4f3c3bc4df47121e8be9c1
2025-02-20 09:12:43 -08:00
Samuel SuslaandFacebook GitHub Bot a5e853b812 initialise member variable in RCTWindowSafeAreaProxy startObservingSafeArea to prevent potential race (#49515)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49515

changelog: [internal]

_currentSafeAreaInsets should be initialised as part of `startObservingSafeArea` to make sure it is set before accessed.

Even though, right now _currentSafeAreaInsets is always set before it is read because notification RCTUserInterfaceStyleDidChangeNotification fires eagerly, it might change in the future and introduce a bug.

Reviewed By: lenaic

Differential Revision: D69846681

fbshipit-source-id: f8be8a53e82020112abd170b9f20429bf7ba7011
2025-02-20 08:28:39 -08:00
Jon ThysellandFacebook GitHub Bot 94ea10c693 Fix implicit cast from double to PointerIndentifier in NativeDOM.cpp (#48578)
Summary:
When building `react-native-windows` our code analysis tools complained about an implicit `double` to `PointerIdentifier` in NativeDOM.cpp.

This PR adds an explicit cast.

Temporary downstream patch: https://github.com/microsoft/react-native-windows/commit/5957d0af6944d64513cead28186dfbcc74bbfea0

## Changelog:

[GENERAL] [FIXED] - Add explicit casts for pointerIds for PointerEvents in NativeDOM

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

Test Plan: React Native Windows builds with this change and no more warnings.

Reviewed By: rubennorte

Differential Revision: D69920656

Pulled By: cipolleschi

fbshipit-source-id: 1d81f1fbfd91fadfb676d3e65c3c9cb729c1d3dd
2025-02-20 08:25:30 -08:00
Samuel SuslaandFacebook GitHub Bot 3d1c1b50fe remove incorrect call of removeObserver from RCTDeviceInfo (#49551)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49551

changelog: [internal]

in recent commit, https://github.com/facebook/react-native/commit/470bc4088957920aa55c8e5ccf3c9f4259c0694c, use of KVO was removed.
But `removeObserver` when `addObserver` was not called leads to a crash and must be removed as well.

Reviewed By: cipolleschi

Differential Revision: D69918158

fbshipit-source-id: ad65273e74545eba77ab35c5e22c28bddf072f9f
2025-02-20 08:25:29 -08:00
Mateo GuzmánandFacebook GitHub Bot 38190f530f Migrate StateWrapper to Kotlin (#49544)
Summary:
Migrate com.facebook.react.uimanager.StateWrapper to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.StateWrapper to Kotlin

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

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

Reviewed By: cortinico, NickGerleman

Differential Revision: D69890013

Pulled By: Abbondanzo

fbshipit-source-id: 859ae727167638a0ef7fa6158d27f5429921a9f9
2025-02-20 07:03:29 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 0b67218a8a Add dummy cpp for renderercss (#49553)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49553

The new React-renderercss pod is an header only pod. These are not allowed by Cocoapods, because it will not materialize the framework when building with then turned on.

the solution is to just add an empty source file to frorce cocoapods to materialize the .framework file and solve the dependency graph properly.

## Changelog:
[Internal] - Add dummy file to React-renderercss

Reviewed By: huntie

Differential Revision: D69920318

fbshipit-source-id: e5cc092a480f7c86eeb295ed966f85b6f55fdc54
2025-02-20 06:31:34 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 3eec4a3ea9 Back out "Throw exception with name of TurboModule instead of deadlock during sync rendering" (#49554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49554

For some reason, this diff completely breaks the linker on iOS.

I tried to look for a fix forward, but unsuccessfully.

I'm reverting this diff to get CI green again, but this requires more investigation.

## Changelog:
[Internal] - Revert D69805065

Reviewed By: sammy-SC, huntie

Differential Revision: D69920338

fbshipit-source-id: 8e1d34b5314d8ead51c127208ae2d2250f7d3724
2025-02-20 06:31:34 -08:00
Fabrizio CucciandFacebook GitHub Bot feb27cbf0f js1 publish react-native 0.79.0-main (#49550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49550

Align remaining packages.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69916099

fbshipit-source-id: d6f5c19c8b33e91ff0e2adac20cfe625a15e96b5
2025-02-20 06:04:34 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 3ab568d472 Add utility function to validate args (#49522)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49522

While testing the script, sometime I obtained undesired results because I was passing the wrong values for the arguments.

This change add a simple validation function to inform the user when the arguments that are passed are not valid.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851416

fbshipit-source-id: c378a3ca5db942cca5178274204a0d01d1eefdf7
2025-02-20 03:28:49 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 07f05cedd5 fix typo in configuration check (#49523)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49523

There was a typo when checking the configuration. The default parameter is `all`, not `All`.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851429

fbshipit-source-id: 7f16f5f89c90824ceb57f9980bc38a31be33ccfe
2025-02-20 03:28:49 -08:00
Riccardo CipolleschiandFacebook GitHub Bot b8af3ad599 Cleanup old xcframework (#49524)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49524

If there is already an XCFramework in the current location. xcodebuild fails to create and override the xcframework.

This change allows us to override an old xcframework and to iterate more quickly.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D69851428

fbshipit-source-id: 723b3035cec008e2bd177da4f960f2bb085ff493
2025-02-20 03:28:49 -08:00
Nicola CortiandFacebook GitHub Bot e49f2d5c50 Enable Gradle Configuration Caching on CI (#49514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49514

This attemps to enable Config Caching on CI. I'm curious to see how much time this is going to save.
There might be some problems with nigthlies so I want to make sure this is running for some days before the branch cut.

Changelog:
[Internal] [Changed] -

Reviewed By: NickGerleman

Differential Revision: D69846848

fbshipit-source-id: 0d5c292e65a6107df62f6494a1aae9abd0e8b6cc
2025-02-20 02:42:24 -08:00
Samuel SuslaandFacebook GitHub Bot 9ece93ea67 add unit test for view culling when parent has transform (#49535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49535

changelog: [internal]

Add a unit test to cover scenario where ScrollView's parent has a transform

Reviewed By: NickGerleman

Differential Revision: D69860855

fbshipit-source-id: 1b64665c5b15ad2e5e068d4c6d56f9694ac7cf03
2025-02-20 02:32:50 -08:00
Nick GerlemanandFacebook GitHub Bot c99b71780b Add validation to Fabric parsing for transform and transformOrigin objects (#49546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49546

Right now we rely on the ViewConfig processor to fire an invariant if the values are incorrect. We really don't want to redbox in the future on invalid properties, and this won't be around for the native CSS parsing path.

This code has some problems, like... radian parsing allowing potential out-of-bounds reads, firing a native assert for valid 9 digit matrices, or the layers in conjunction treating `0.5r.degoggos00` as a valid way to say 0.5 radians. Wheeee!

This change mostly just ports over the checks from `processTransform` to validate parameters before we use them, treating the whole transform list as invalid if any part of it is broken. I moved radian and percentage parsing the the CSS data type parsers as well.

I avoided changing props structures again here.

Changelog:

[General][Changed] - Add validation to Fabric parsing for transform options

Reviewed By: javache

Differential Revision: D69823064

fbshipit-source-id: 87c6da448a4b55e0507382b98aabd62ce3e4587f
2025-02-19 19:00:55 -08:00
Nick GerlemanandFacebook GitHub Bot 4631f6b061 Increase number tokenization precision (#49545)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49545

During tokenization we use 32 bit integers to store the digits before and after a decimal place.

Code interpolating strings may produce float strings with the part after digits being greater than max int, in which case we encounter integer overflow caught by UBSAN.

I was curious how libc functions for decoding floats handled this, and musl libc goes really out there, storing each intermediate digit in an array of 128 or more digits, and later using `long double`, in a shockingly complicated function. https://github.com/kraj/musl/blob/1880359b54ff7dd9f5016002bfdae4b136007dde/src/internal/floatscan.c#L63

We... probably don't need to go that far, but storing these intermediate digits as doubles should be precise enough and allow large enough values in the vast majority of cases.

Changelog: [Internal]

Reviewed By: sammy-SC, jorge-cab

Differential Revision: D69881560

fbshipit-source-id: b2158ce2c5d85157426cea9850c7f62c2eee5611
2025-02-19 19:00:55 -08:00
Liron YahdavandFacebook GitHub Bot 5e63f34ab0 Throw exception with name of TurboModule instead of deadlock during sync rendering (#49509)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49509

Currently if we hit a deadlock in sync rendering due to a TurboModule initialization that requires main queue setup we don't get any information about which TurboModule caused the issue.

To help us know which TurboModules we need to fix, this instead will crash with the name of the TurboModule.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D69805065

fbshipit-source-id: f75df44f9a603a5f53a008382d32b2b5285c1162
2025-02-19 18:45:23 -08:00
Marc RousavyandFacebook GitHub Bot 778382ad3d RNGP - Add option to disable bundle compression (was: Make all React Native apps start 12% faster) (#49449)
Summary:
Okay the title is a bit clickbaity, but this is actually true. (on Android)

We (Janic, Szymon, Ruby and Me) discovered something interesting. React Native uses `mmap` for mapping the JS bundle to RAM, to avoid having to load the entire thing instantly at app startup.
Ruby doubted that this was true - so we investigated.

Apparently on Android, resources are **compressed**. And if the JS bundle is stored compressed, it has to be uncompressed before it can be loaded into RAM, hence not allowing it to be mmapp'ed! (see [`_CompressedAsset::getBuffer`](https://cs.android.com/android/platform/superproject/+/master:frameworks/base/libs/androidfw/Asset.cpp;l=903?q=Asset.cpp))

So with this PR, we now add `.bundle` files to `noCompress` in the react-native gradle plugin, which disables compression for the JS bundle.

We discovered while improving the performance of one of our clients: **Discord**.
In our tests, **this improved the TTI of the Discord app by 400ms!! (or 12%)** 🤯🚀

NOTE: Yes, the .apk will now be bigger. But; Google Play compresses it anyways, so the **download size** of your .apk will likely not increase by much. It will be bigger on disk though.

## Changelog:

[ANDROID] [CHANGED] Add option to disable bundle compression to improve startup time

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

Test Plan:
### 1. Verify compression is disabled

Build two apps, one with this patch and one without. When I did this using the RN community template, the one without this patch was 47,6 MB, and the one with this patch was 48 MB in size. So the .apk got bigger, which is what we expected

### 2. Verify app startup is faster

Use tools like react-native-performance or custom markers to measure TTI. In our tests, we shaved off 400ms from the startup time, which was about 12% of Discord's total TTI. (on a low-end Android device)
In Expensify, we improved the TTI by 14-20% with this change (source: https://github.com/Expensify/App/pull/56930)

Reviewed By: javache, cipolleschi

Differential Revision: D69742221

Pulled By: cortinico

fbshipit-source-id: bd59d77662bd30a3acdbb2e9f8d8f23db922c3f2
2025-02-19 18:42:51 -08:00
Eric RozellandFacebook GitHub Bot 41b597c736 Move U+200E character to first fragment (#49534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49534

Moving the U+200E character ensures that it gets the same font style as other fragments in the LogBox inspector. This solves an issue where the line height differential is causing issues on some out-of-tree platforms (e.g., Windows).

## Changelog

[Internal]

Reviewed By: shwanton

Differential Revision: D69857916

fbshipit-source-id: 5bc70dc0282f3ef9e9b2767ab8094e9923638e99
2025-02-19 17:41:35 -08:00
Nicola CortiandFacebook GitHub Bot fc325cfee8 Remove all the redundant public visibility modifier (#49532)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49532

I've done a pass with Android Studio and removed automatically all the `public` modifier
that are not really needed.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D69857731

fbshipit-source-id: 5098a3454a66e5f1eb58ccf07006558cba360066
2025-02-19 17:40:14 -08:00
Nicola CortiandFacebook GitHub Bot fefa17aa37 Sort kotlin modifier to canonical order (#49533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49533

Android Studio is telling us that those modifiers are not sorted according to the 'canonical order'.
This is quite annoying while editing so I'm sorthing them all using the IDE inspection.
We should add a rule inside ktfmt for this, but that's another work.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D69857730

fbshipit-source-id: 3aae3d5b114cf4c629c8320a697d17fff686730b
2025-02-19 17:40:14 -08:00
Shawn DempseyandFacebook GitHub Bot 19c41f1dbd Use apple platform name for macOS instead of hardcoding iOS (#49542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49542

When fusebox loads, we display this static message on apple platforms:
```
Debugger integration: iOS Bridgeless (RCTHost)
```
We are running RN MacOS using the xplat `RCTHost` and want to show the correct platform

[Changelog] [Internal] - Use current apple platform name instead of hardcoding 'iOS'

Reviewed By: robhogan

Differential Revision: D69867335

fbshipit-source-id: 5973882c710447fdb7ef18e82ff304e4cd16a85c
2025-02-19 17:24:17 -08:00
Samuel SuslaandFacebook GitHub Bot 46ce79b08a move RCTInitializeUIKitProxies to RCTFabricSurface init (#49541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49541

changelog: [internal]

`RCTSurfacePresenter` may be initialised from a background thread. This breaks the requirement of `RCTInitializeUIKitProxies`, which must be always called on the main thread.

Differential Revision: D69874923

fbshipit-source-id: 098f543bd3a849ee9ee1b63b567290f67c0109cd
2025-02-19 15:24:41 -08:00
Mateo GuzmánandFacebook GitHub Bot e137a5280f Reland of: Make RCTLog & ExceptionDataHelper internal (#49536)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49536

This is a re-land of a previous diff D69836482 which was reverted due to a build failure.

As part of the initiative to reduce the public API surface, this classes can be internalized. I've checked there are no relevant OSS usages:

- [RCTLog](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+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+com.facebook.react.util.RCTLog)
- [ExceptionDataHelper](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+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+com.facebook.react.util.ExceptionDataHelper)

## Changelog:

[INTERNAL] - Make RCTLog & ExceptionDataHelper internal

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

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

Reviewed By: mdvacca

Differential Revision: D69863875

Pulled By: cortinico

fbshipit-source-id: 59f0ccbcbeba6e75b776d3bb8fd7c672f1b50994
2025-02-19 15:15:10 -08:00
chrsmysandFacebook GitHub Bot 36f29beac4 Fix force RTL support on new architecture. (#49455)
Summary:
This fixes an issue in Fabric where changing the layout direction and then reloading the JS bundle did not honor the layout direction until the app was restarted on iOS. This now calls  `_updateLayoutContext` whenever RCTSurfaceView is recreated which happens on bundle reload. This is not an issue on the old architecture because the layout direction is determined within the [SurfaceViews](https://github.com/facebook/react-native/blob/acdddef48eb60b002c954d7d2447cb9c2883c8b3/packages/react-native/React/Views/RCTRootShadowView.m#L18) which were recreated on bundle reload.

## Related Issues:
- https://github.com/react-native-community/discussions-and-proposals/issues/847
- https://github.com/facebook/react-native/issues/49451
- https://github.com/facebook/react-native/issues/48311
- https://github.com/facebook/react-native/issues/45661

## How can we take this further?
If we want to make it so that it doesn't require an entire bundle reload for RTL to take effect I believe these are the steps that would need to be taken:
- Make it so [RCTI18nManager](https://github.com/facebook/react-native/blob/acdddef48eb60b002c954d7d2447cb9c2883c8b3/packages/react-native/React/CoreModules/RCTI18nManager.mm#L52) exports isRTL as a method instead of consts
- Send Notification Center notif when RTL is forced on or off
- Listen for that notification RCTSurfaceView and call _updateLayoutContext similar to UIContentSizeCategoryDidChangeNotification.

## Changelog:

[iOS] [FIXED] - Layout direction changes are now honored on bundle reload.

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

Test Plan:
On the new architecture change force the layout direction and reload the bundle:
```
import React, { useCallback } from "react";
import { Button, I18nManager, StyleSheet, Text, View } from "react-native";
import RNRestart from "react-native-restart";

export default function Explore() {
    const onApplyRTL = useCallback(() => {
        if (!I18nManager.isRTL) {
            I18nManager.forceRTL(true);
            RNRestart.restart();
        }
    }, []);

    const onApplyLTR = useCallback(() => {
        if (I18nManager.isRTL) {
            I18nManager.forceRTL(false);
            RNRestart.restart();
        }
    }, []);

    return (
        <View style={styles.area}>
            <Text>Test Block</Text>
            <View style={styles.testBlock}>
                <Text>Leading</Text>
                <Text>Trailing</Text>
            </View>
            <Button title={"Apply RTL"} onPress={onApplyRTL} />
            <Button title={"Apply LTR"} onPress={onApplyLTR} />
        </View>
    );
}

const styles = StyleSheet.create({
    area: {
        marginVertical: 50,
        paddingHorizontal: 24,
    },
    testBlock: {
        paddingVertical: 10,
        flexDirection: "row",
        justifyContent: "space-between",
    },
});

```

https://github.com/user-attachments/assets/0eab0d79-de3f-4eeb-abd0-439ba4fe25c0

Reviewed By: cortinico, cipolleschi

Differential Revision: D69797645

Pulled By: NickGerleman

fbshipit-source-id: 97499621f3dd735d466f5119e0f2a0eccf1c3c05
2025-02-19 14:51:19 -08:00
Samuel SuslaandFacebook GitHub Bot d50a3b4433 do not call RCTUnsafeExecuteOnMainQueueSync with a lock in RCTWindowSafeAreaProxy (#49540)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49540

changelog: [internal]

it is dangerous to call RCTUnsafeExecuteOnMainQueueSync while holding a lock. We can avoid that by keeping only the checks into shared state under a lock and rest is without lock.

This also aligns implementation with other proxy objects.

Reviewed By: javache

Differential Revision: D69856171

fbshipit-source-id: 5f7fd1ebeb642796169d77a437fbc215c3c59795
2025-02-19 14:47:18 -08:00
Dark KnightandFacebook GitHub Bot a1952b6fb7 Revert D69836482: Multisect successfully blamed "D69836482: [react-native][PR] Make RCTLog & ExceptionDataHelper internal" for one build failure
Summary:
This diff reverts D69836482
D69836482: [react-native][PR] Make `RCTLog` & `ExceptionDataHelper` internal by cortinico causes the following build failure:

Tests affected:
- [automation_twilight_x86_debug](https://www.internalfb.com/intern/test/562950071241129/)

Here's the Multisect link:
https://www.internalfb.com/multisect/21397772
Here are the tasks that are relevant to this breakage:
T215694436: Some CI signals failing for oculus_twilight

The backout may land if someone accepts it.

If this diff has been generated in error, you can Commandeer and Abandon it.

bypass-github-export-checks

Reviewed By: cortinico

Differential Revision: D69860031

fbshipit-source-id: dedaba77f77467eebad279076add13bfcde45ef0
2025-02-19 11:47:35 -08:00
Mateo GuzmánandFacebook GitHub Bot 0c1e9ea983 Make DefaultDevSupportManagerFactory, InspectorFlags & JSDebuggerWebSocketClient internal (#49506)
Summary:
As part of the initiative to reduce the public API surface, this classes can be internalized. I've checked there are no relevant OSS usages:

- [DefaultDevSupportManagerFactory](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+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+com.facebook.react.devsupport.DefaultDevSupportManagerFactory)
- [InspectorFlags](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+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+com.facebook.react.devsupport.InspectorFlags)
- [JSDebuggerWebSocketClient](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+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+com.facebook.react.devsupport.JSDebuggerWebSocketClient)

## Changelog:

[INTERNAL] - Make DefaultDevSupportManagerFactory, InspectorFlags & JSDebuggerWebSocketClient internal

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

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

Reviewed By: cortinico

Differential Revision: D69811993

Pulled By: mdvacca

fbshipit-source-id: fef52de8c9c0d15b8efd3c5dd785be4e045d2d63
2025-02-19 11:32:31 -08:00
Samuel SuslaandFacebook GitHub Bot 470bc40889 remove use of RCTUnsafeExecuteOnMainQueueSync and main thread setup from RCTDeviceInfo (#49478)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49478

changelog: [internal]

Move all main thread resources that RCTDeviceInfo needs to RCTKeyWindowValuesProxy class. That way, RCTDeviceInfo does not needs to use RCTUnsafeExecuteOnMainQueueSync and doesn't require main thread setup.

Reviewed By: javache

Differential Revision: D69747829

fbshipit-source-id: e8280d2f50258ee59043b5c3865b8a95496be8b6
2025-02-19 10:29:24 -08:00
Samuel SuslaandFacebook GitHub Bot c5b926b57b move RCTAccessibilityManager away from main thread initialization (#49477)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49477

changelog: [internal]

Move all main thread resources from RCTAccessibilityManager to a proxy object: RCTInitialAccessibilityValuesProxy

Reviewed By: javache

Differential Revision: D69747648

fbshipit-source-id: 5ac717b397985545c5ce2cc92ad98d69b95f52ea
2025-02-19 10:29:24 -08:00
Rob HoganandFacebook GitHub Bot cdaa1aa9aa community-cli-plugin: resolve cli-server-api via peer dependency on cli (#49518)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49518

`react-native/community-cli-plugin` depends on `createDevServerMiddleware` from `react-native-community/cli-server-api`.

`react-native/community-cli-plugin` currently [declares an optional peer dependency](https://github.com/facebook/react-native/blob/bae895500052bda2f55e1832b0c8a63a1b449de3/packages/community-cli-plugin/package.json#L39-L45) on `react-native-community/cli-server-api`, however because the latter isn't a dependency of `react-native` or the community template, the peer dependency is not available to package managers that enforce isolated node_modules - see https://github.com/facebook/react-native/issues/47309.

Rather than add an unnecessary dependency to the template (like [this](https://github.com/react-native-community/template/pull/105)), my proposal is to switch to a peer dependency on only `react-native-community/cli`, because that *is* a dependency of the community template and therefore will be resolvable.

Because `react-native-community/cli` doesn't re-export `createDevServerMiddleware` from its dependency on `cli-server-api`, we need to resolve the latter through the former. This can be cleaned up once a re-export lands - https://github.com/react-native-community/cli/pull/2605.

Changelog:
[GENERAL][FIXED] Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules.

Reviewed By: huntie

Differential Revision: D69848688

fbshipit-source-id: 009b8ffd43b2ab2d84fcc71e9e48382eb8950bb1
2025-02-19 10:11:03 -08:00
Samuel SuslaandFacebook GitHub Bot 0f8ef32830 initialise RN proxy object in bridge (#49527)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49527

changelog: [internal]

fix a deadlock when app that doesn't use bridgeless uses UIKit proxy objects.

Reviewed By: jeffreyporter, Dawn-Top

Differential Revision: D69855097

fbshipit-source-id: a158daa2a6de1a0aebfb9fbf3d758ffa3afec7be
2025-02-19 09:29:26 -08:00
Andrew DatsenkoandFacebook GitHub Bot e85d70c8ac Create a CMake executable target (#49526)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49526

Changelog: [Internal]

Introduce a binary tester for Fantom that will be used in runner when ready so OSS can run integration tests.

Here:
- Add BUCK target
- Add CMake target

Reviewed By: cortinico

Differential Revision: D69800975

fbshipit-source-id: 57e135e2a1cbfb88e0141ddc7859b9a29365ee1f
2025-02-19 09:15:07 -08:00
Dawid MałeckiandFacebook GitHub Bot 3f9e474d23 Align Flow to TS types in Modal (#49521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49521

Changelog:
[Internal] - Aligned types of the Modal between Flow and iOS

Reviewed By: huntie

Differential Revision: D69786560

fbshipit-source-id: 3bf0999db5ad57a1b9b9dd95f2b77c994fe3af6e
2025-02-19 09:12:45 -08:00
Vitali ZaidmanandFacebook GitHub Bot 1a9ec07477 warn when user tries to open DevTools, when not in debug mode (#49499)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49499

Changelog:
[General][Internal] - warn when user tries to open DevTools, when not in debug mode

Reviewed By: huntie

Differential Revision: D69784836

fbshipit-source-id: aa60762f08f5dea1f91f4fd1ffc86eeb7f94e2fc
2025-02-19 08:52:05 -08:00
Mateo GuzmánandFacebook GitHub Bot 4bafd4734e Migrate ViewManagerResolver & UIManagerModuleListener to Kotlin (#49501)
Summary:
Migrate two more `com.facebook.react.uimanager` interfaces to Kotlin

## Changelog:

[INTERNAL] - Migrate ViewManagerResolver & UIManagerModuleListener to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D69836273

Pulled By: cortinico

fbshipit-source-id: cbdddc1ecf432127426fc07a9df6ed824db63e73
2025-02-19 07:30:31 -08:00
Samuel SuslaandFacebook GitHub Bot 236db59a26 Introduce EventBeat::unstable_setInduceCallback to batch sync state updates (#49520)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49520

changelog: [internal]

Adds a new callback to EventBeat that is triggered in EventBeat::induce (that is when the UI thread is about to go IDLE). This will make state updates applied synchronously before the OS has a chance to paint but they will be batched. If two state updates happen in single UI tick, the will be executed at the end of UI's run loop.

The state updates are still not batched into a single commit. If two state updates happen on the same component, they are coalesced. If two state updates happen on two different components, they will generate two transactions. This is a follow up optimisation.

This feature is hidden behind `ReactNativeFeatureFlags::enableSynchronousStateUpdates` which is a preexisting feature flag. The feature flag was not rolled out yet and is not being used in any QEs at the moment.

Reviewed By: rubennorte

Differential Revision: D69848997

fbshipit-source-id: 870fd21f1d9d73d84861ddeac95b932a7fe1f5fe
2025-02-19 07:10:22 -08:00
Mateo GuzmánandFacebook GitHub Bot e5f08c7ae0 Make RCTLog & ExceptionDataHelper internal (#49502)
Summary:
As part of the initiative to reduce the public API surface, this classes can be internalized. I've checked there are no relevant OSS usages:

- [RCTLog](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+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+com.facebook.react.util.RCTLog)
- [ExceptionDataHelper](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+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+com.facebook.react.util.ExceptionDataHelper)

## Changelog:

[INTERNAL] - Make RCTLog & ExceptionDataHelper internal

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

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

Reviewed By: rshest

Differential Revision: D69836482

Pulled By: cortinico

fbshipit-source-id: 16f37acbd77bf151126bff22a6010201d8174bea
2025-02-19 06:56:03 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 864d47822f Handle configurations and destinations in prepare-ios-prebuilds (#49498)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49498

This change handles the destinations and the configurations parameter when passed to the script.

## Changelog:
[Internal] - Handle `configuration` and `destination` parameters

Reviewed By: cortinico

Differential Revision: D69787469

fbshipit-source-id: 5c4ae766dad84640fbf5340efc296355c4944e1c
2025-02-19 06:19:48 -08:00
Pieter De BaetsandFacebook GitHub Bot 6c8ace9b05 Simplify MapBuffer constructor (#49492)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49492

Was looking at more places we could be using `HybridClassBase`, and figured out how to simplify ReadableMapBuffer constructors to remove the need for explicit soloading.

Changelog: [Android][Removed] `RuntimeExecutor` and `RuntimeScheduler` constructors are now private, `MapBufferSoLoader` was removed as no longer required.

Reviewed By: cortinico

Differential Revision: D69776110

fbshipit-source-id: 11eac4c59897a02283e021ac1457ef8299b6f480
2025-02-19 06:11:31 -08:00
Iwo PlazaandFacebook GitHub Bot ee90f2d97f Prefer common interface files when building the type graph (#49494)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49494

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69786939

fbshipit-source-id: 3b0481e83a528afbdf1d29734d2aea9cad740f58
2025-02-19 06:00:03 -08:00
Samuel SuslaandFacebook GitHub Bot f4927fc03c migrate RCTAppState away from main thread initialization (#49476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49476

changelog: [internal]

Introduce RCTInitialAppStateProxy to access app initial state in thread safe way.

Reviewed By: javache

Differential Revision: D69745459

fbshipit-source-id: f88a04774e064bf13904183aa3334f93cbcc5283
2025-02-19 05:37:54 -08:00
Samuel SuslaandFacebook GitHub Bot 0e540298ae remove requirement for main queue setup for RCTPlatform (#49474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49474

changelog: [internal]

Can move setup to the background setup:
1. Use RCTTraitCollectionProxy to access current trait collection to check if force touch is available.
2. UIDevice.currentDevice is thread safe and can be read safely from a background thread.

Reviewed By: rshest

Differential Revision: D69744257

fbshipit-source-id: 8857a827c3d3e03a9b2ced15e6970d728693a043
2025-02-19 05:37:54 -08:00
Samuel SuslaandFacebook GitHub Bot 29114dd914 migrate RCTAppearance away from RCTUnsafeExecuteOnMainQueueSync and main thread setup (#49473)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49473

changelog: [internal]

Add RCTTraitCollectionProxy which synchronises access to current trait collection. This way, RCTAppearance does not need main thread setup and RCTUnsafeExecuteOnMainQueueSync

Reviewed By: javache

Differential Revision: D69750211

fbshipit-source-id: 8457904fa1672d4bf811c04ef69969a8f8f4d87f
2025-02-19 05:37:54 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 11377d7cb6 Update changelog for 0.78 (#49469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49469

This PR updates the changelog for 0.78 by combining all the RC into 0.78.0 stable, in preparation of the release in a couple of days.

This also adds categories to the commits and sort them alphabetically.

## Changelog:
[Internal] - Update vchangelog for 0.78

Reviewed By: cortinico, fabriziocucci

Differential Revision: D69745703

fbshipit-source-id: 825190c7a9573939ec7f1e388448142f8a8caf25
2025-02-19 05:22:30 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 601b2ec353 Honor the task provided to prepare-ios-prebuilds (#49497)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49497

This change honors the task provided as an argument.

If `all` is passed, we execute all the commands.
If a specific task is passed, we only execute that command.

## Changelog:
[Internal] - Honor the task passed to the preopare-ios-script

Reviewed By: cortinico

Differential Revision: D69787470

fbshipit-source-id: 0dec13ad0b5f2cc23cc72b4a899405ac1acf4f86
2025-02-19 04:59:37 -08:00
Riccardo CipolleschiandFacebook GitHub Bot ca37f2b20a Add argument parsing and help function to prepare ios build (#49496)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49496

This change prepare the argument parsing to the prepare-ios-prebuilds so we can customise the behavior to simplify usage in CI.

It also adds the --help command to provide.

##changelog:
[Internal] - adds the help mfunction and argument parsing

Reviewed By: cortinico

Differential Revision: D69779877

fbshipit-source-id: d66bc19ee556229eb7167f2075b77bacce2ad5c4
2025-02-19 04:59:37 -08:00
Riccardo CipolleschiandFacebook GitHub Bot c0e43edd01 Extracted the dependencies array to separate file (#49495)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49495

This change extracts the dependencies array to a separate file. This is helpful because we can use this file as cache-key to determines whether we have to rebuild the artifacts or not.

This file is also bound to grow so it will make the script more manageable.

## Changelog:
[Internal] - Move the dependencies for ios prebuilds on a separate file

Reviewed By: cortinico

Differential Revision: D69779522

fbshipit-source-id: 7ce60e426d428859f6f759d8e7b1ea499c36eff9
2025-02-19 04:59:37 -08:00
Jakub PiaseckiandFacebook GitHub Bot bae8955000 Align press and scroll events with OSS (#49424)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49424

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69655561

fbshipit-source-id: c36036a2abb43dd75c41582f2a27e7f9d3509044
2025-02-19 03:43:07 -08:00
Samuel SuslaandFacebook GitHub Bot 1705f96322 RCTNetworking does not require main thread setup (#49475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49475

changelog: [internal]

RCTNetworking does not need main thread setup, it doesn't access any main thread only resources.

Reviewed By: rshest

Differential Revision: D69744400

fbshipit-source-id: 25652c28d178a9e26fa0ede9b03fb87072094fb0
2025-02-19 03:37:26 -08:00
Samuel SuslaandFacebook GitHub Bot d69874fa31 reset transformation when crossing ScrollView in Fabric View Culling (#49500)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49500

changelog: [internal]

When crossing ScrollView boundary, cullingContext.transform must be reset to Transform.identity. Views are only culled within scroll view.

Reviewed By: NickGerleman

Differential Revision: D69787820

fbshipit-source-id: 5d502f764a2b1885ee4b49fc0c9ebb9d27de65dd
2025-02-19 03:20:02 -08:00
Nick GerlemanandFacebook GitHub Bot 4fa516987c Filter and Box Shadow Conversion Tests and Fixes (#49418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49418

This adds some missing validation for negative blurs which should be considered parse error. Unit tests added for the forked props parsing code to validate more generally.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69628917

fbshipit-source-id: 1451b53cfa673443f01d38bd0097c4e85c83db8b
2025-02-18 18:56:12 -08:00
Nick GerlemanandFacebook GitHub Bot 05856b4681 Wire up native filter parsing (#49505)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49505

I want to go home 😭.

This is not very pretty, while we are both keeping the old path, and trying to keep the props data types undisturbed for now, and support some of the stranger syntax we ended up supporting as inputs to filters.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69562718

fbshipit-source-id: db8ff2c240b66e93a52ce2ac98e4a9ff2e7aeb4b
2025-02-18 18:56:12 -08:00
Nick GerlemanandFacebook GitHub Bot b91565dc5d Add box shadow examples which use objects and PlatformColor (#49504)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49504

We didn't have these cases before.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69433955

fbshipit-source-id: 3915b63ec6972412f1882d796ae60035bb5192f3
2025-02-18 18:56:12 -08:00
Nick GerlemanandFacebook GitHub Bot 8a2602fd69 Reland 2: Wire up native box shadow parsing (#49503)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49503

Relanding this change, now checking for the existing of FeatureFlags native module before checking it, with the assumption when the native module is unavailable (legacy arch) we will never do native processing, or even use the SVC.

This aligns with the approach taken in `setupTimers` for the event loop, but is probably not the right long term solution for flags API.

This also inlines a couple fixes originally up the stack, of missing propagation of inline state, and missing the gating in ReactNativeStyleAttributes.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69804412

fbshipit-source-id: 1f285994132cff75b6845b64cf26fceae37d4c92
2025-02-18 18:56:12 -08:00
Sam ZhouandFacebook GitHub Bot b53e86b4bd Deploy 0.261.2 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D69816782

fbshipit-source-id: c4d1e7bff3333fe8075816542d0b316408363f86
2025-02-18 18:11:49 -08:00
David VaccaandFacebook GitHub Bot 3442b3885a Implement getDelegateMethod on ReactPopupMenuManager (#49507)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49507

Implement getDelegateMethod on ReactPopupMenuManager

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D69807880

fbshipit-source-id: b0168454b24a1af4e99a46e8c70ebb70162c19d0
2025-02-18 16:43:13 -08:00
Joe VilchesandFacebook GitHub Bot a3b29e1441 Fix inset shadows when blur < spread (#49448)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49448

I noticed that when inset shadows have a smaller blur radius than spread its wrong and there is a gap between the edge of the box and the shadow. I think the outer rect is just defined incorrectly and we should be adjusting the paddingBox as opposed to the innerRect. The innerRect is just the padding box insetted by the spread, so that is why we see gaps if blur < spread

Changelog: [Android][Fixed] - Fix inset boxShadow when blur < spread

Reviewed By: jorge-cab

Differential Revision: D69688508

fbshipit-source-id: 911258edd9a8403c70992800c3e1a5ea044e1f3b
2025-02-18 13:11:53 -08:00
Samuel SuslaandFacebook GitHub Bot 7f6fe61299 migrate RCTSafeArea away from RCTUnsafeExecuteOnMainQueueSync (#49440)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49440

changelog: [internal]

move away from RCTUnsafeExecuteOnMainQueueSync in RCTSafeArea.

Reviewed By: javache, lenaic

Differential Revision: D69662510

fbshipit-source-id: c68e42d6787b1a60ecba46d774ada40163de83fe
2025-02-18 10:05:42 -08:00
Pieter De BaetsandFacebook GitHub Bot 1954f166c9 Consolidate mode files in xplat/mode/react-native (#49463)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49463

We've started accumulating mode-files in many different directories, group them all under xplat/mode/react-native for consistency

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69658995

fbshipit-source-id: 70c842d24886b9b0ef8432d105ca64cac68078db
2025-02-18 09:40:15 -08:00
Dawid MałeckiandFacebook GitHub Bot 8beae3ba52 Align types of the Libraries/PushNotificationIOS between Flow and TS (#49266)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49266

Changelog:
[Internal] - Aligned types of the PushNotificationIOS between Flow and TS

Reviewed By: huntie

Differential Revision: D69309391

fbshipit-source-id: 1e99f6aa6805c25db7ede6c65305b309590ebd6a
2025-02-18 09:03:55 -08:00
Nicola CortiandFacebook GitHub Bot e41887e62f Add support for Gradle Configuration caching (#49484)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49484

This is the last diff to add support for Gradle Configuration caching.
The last missing part here was the execution of the `config` command during Gradle configuration time.
Using Java processes API is not supported as the correct way to do external commands that are CC-friendly
is through the `.providers.exec` API which I'm using here.

Closes https://github.com/facebook/react-native/issues/45154

Changelog:
[Android] [Added] - Add support for Gradle Configuration caching

Reviewed By: cipolleschi

Differential Revision: D69753889

fbshipit-source-id: af1e844b38444659a908abce4029d43ad899c03d
2025-02-18 08:26:34 -08:00
Nicola CortiandFacebook GitHub Bot db679f7a20 Remove unused Gradle task packageReactNdkLibsForBuck (#49493)
Summary:
This task is unused, so we can safely remove it here.

## Changelog:

[INTERNAL] - Remove unused Gradle task `packageReactNdkLibsForBuck`

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D69781945

Pulled By: cortinico

fbshipit-source-id: cd6487faf1d169f44590a26c18a9f35eef803617
2025-02-18 08:23:59 -08:00
Jakub PiaseckiandFacebook GitHub Bot ce84922236 Convert DevMenu to use exports syntax (#49491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49491

Changelog: [General][Breaking] Deep imports to modules inside `Libraries/DevMenu` using `require` may need to be appended with `.default`

Reviewed By: cortinico

Differential Revision: D69778671

fbshipit-source-id: 19362fbb003e53609881fc19e8d2cb96677b3006
2025-02-18 08:18:58 -08:00
Mateo GuzmánandFacebook GitHub Bot 7f1edbdcb5 Migrate ReactClippingViewGroup to Kotlin (#49413)
Summary:
Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D69750532

Pulled By: cortinico

fbshipit-source-id: 50ec87a71b3bd523e1a9518b8bd683a027a4b422
2025-02-18 07:57:24 -08:00
Iwo PlazaandFacebook GitHub Bot e4e03bd909 Trace the import path that leads to an untranslatable file (#49480)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49480

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69752685

fbshipit-source-id: 94f70eeaec35c864c15b463f3afce929765f2c40
2025-02-18 07:37:57 -08:00
Jakub PiaseckiandFacebook GitHub Bot ebbb241bf8 Align layout event names with OSS (#49423)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49423

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69655570

fbshipit-source-id: bd9b3dbc70b93c5be49e6a2b1b0487d11bf5b3f1
2025-02-18 07:26:13 -08:00
Samuel SuslaandFacebook GitHub Bot b586f35292 ship fix for view commands race everywhere (#49465)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49465

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69744911

fbshipit-source-id: 27e24bb8f16ed4dd3f72bb9125332d208f39ad67
2025-02-18 05:22:17 -08:00
Zhi ZhouandFacebook GitHub Bot 789ed7d5ad fix: iOS app crash caused by the request operation canceling (#48350)
Summary:
Currently we observed many iOS app crashes caused by the `[RCTFileRequestHanlder invalidate]` method, just as the below screenshot.
<img width="1008" alt="image" src="https://github.com/user-attachments/assets/d2d6714f-63d9-40ae-8de5-742cfe718a36" />

## Changelog:

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

Pick one each for the category and type tags:

[IOS] [FIXED] - app crash caused by the `[RCTFileRequestHanlder invalidate]` method

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [FIXED] - app crash caused by the `[RCTFileRequestHanlder invalidate]` method

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

Test Plan: I am not able to reproduce this issue locally either, so the changes in this PR are totally from my inference, I am not sure if it really makes sense, so please help take a deeper look, thanks.

Reviewed By: javache

Differential Revision: D69751695

Pulled By: cipolleschi

fbshipit-source-id: aa4654a30f5dfac99b72ed1bda0dae1e0dc881c9
2025-02-18 05:03:27 -08:00
Samuel SuslaandFacebook GitHub Bot 944d8e6f3c remove redundant main thread dispatch in RCTDeviceInfo (#49479)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49479

changelog: [internal]

Notification UIApplicationDidBecomeActiveNotification is always delivered on the main thread, no need for dispatch.

Reviewed By: javache

Differential Revision: D69750103

fbshipit-source-id: 070fa7f95d8ecddff5d56ba317c8ed4f0ad880f8
2025-02-18 05:01:03 -08:00
Mateo GuzmánandFacebook GitHub Bot 0c4855afae Migrate RuntimeScheduler & RuntimeExecutor to Kotlin (#49485)
Summary:
Converting to Kotlin two classes from `com.facebook.react.bridge`

## Changelog:

[INTERNAL] - Migrate RuntimeScheduler & RuntimeExecutor to Kotlin

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

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

Reviewed By: sammy-SC

Differential Revision: D69775060

Pulled By: javache

fbshipit-source-id: 93f352be8b56876f99f86119e4c6a9636017a581
2025-02-18 04:00:05 -08:00
Dawid MałeckiandFacebook GitHub Bot 71bd096136 Add PermissionsAndroid to buildTypes and align Flow with TS types (#49352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49352

Changelog:
[Internal] - Added PermissionsAndroid to buildTypes and align Flow with TS types.

Reviewed By: huntie

Differential Revision: D69464744

fbshipit-source-id: 31591b2069d25a20bff569b296dcbda88d9f2148
2025-02-18 01:20:26 -08:00
Jakub PiaseckiandFacebook GitHub Bot 91edb9c184 Align LayoutAnimation types with OSS (#49467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49467

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69745571

fbshipit-source-id: 4c27b6c22126a2c8b0965e1a88f9dc310e5ff77c
2025-02-18 01:10:02 -08:00
Jakub PiaseckiandFacebook GitHub Bot 721c7fafa4 Add ReactNative to the list of translated modules (#49472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49472

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69748223

fbshipit-source-id: 97aed0dfc25de9117db3c359970dd94899dd1417
2025-02-18 00:41:51 -08:00
Alex HuntandFacebook GitHub Bot cda2d11c16 Split index.js types into index.js.flow (#49470)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49470

Adds a `packages/react-native/index.js.flow` file.

**Motivation**

This is on the critical path to generating TypeScript types, and a full API snapshot, from `index.js.flow`.

As we iterate, this new file will move to closely matching `types/index.d.ts` by adding type exports (missing today) — giving us an equivalent public API in both languages.

**Motivation for this pattern**

Having a type index file:

- Will become the entry point for `yarn build-types`.
- Enables us to bypass the `module.exports` pattern in `index.js` without a runtime breaking change.
    - This pattern is preferable because:
        - 1/ Aligns with existing manual TypeScript definitions (i.e. these are **already restricted** to `import` syntax in user code)
        - 2/ Allows doc comments on original types to propagate to IDEs/users.

**Implementation notes**

NOTE: This diff has **no effect** on compiled code at runtime, and **no effect** on the current manual TypeScript API of `react-native`. It only has an effect on Flow usage in fbsource — most of which are deep type imports today.

- Exports are grouped and sorted identically to each pre-existing getter in `index.js`.

Changelog: [Internal] - Redefine root `react-native` type exports, affecting Flow usages only

Reviewed By: rubennorte

Differential Revision: D69659837

fbshipit-source-id: c65e30d1ac5c4f322cfde9335dbee80a8c9efda8
2025-02-17 13:57:48 -08:00
Rubén NorteandFacebook GitHub Bot e57cd0916c ] Fix native module check when not using batched bridge (#49483)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49483

Changelog: [internal]

Reviewed By: fabriziocucci

Differential Revision: D69753755

fbshipit-source-id: fe267ed60b5f7d6baac7dee5d7be0f733b34e9e9
2025-02-17 12:49:32 -08:00
Sunny LuoandFacebook GitHub Bot 3a4798cc30 fix: Inconsistency SVG Handling between bundle command and Image.resolveAssetSource (#49452)
Summary:
ref: https://github.com/facebook/react-native/pull/28266

Currently, SVG is not recognized as an image in the CLI bundle command, as defined in [assetPathUtils.js](https://github.com/facebook/react-native/blob/main/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js#L43-L50) . This is the correct behavior, as it ensures that SVG files are copied to the raw folder for Android resources.

However, there is an inconsistency with Image.resolveAssetSource, which does not follow the same classification. Instead, it resolves SVG assets to the drawable folder, leading to blank svg rendering errors in some scenario (codepush).

## Changelog

[Android][Fixed] - getAndroidResourceFolderName() should return raw folder for svg file

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

Test Plan:
1. Use svg file this way `<LocalSvg asset={require('./react-logo.svg')} />`
2. Use `react-native bundle` command to make a bundle and sideload that bundle from sdcard. The svg file should render correctly.

Reviewed By: cortinico

Differential Revision: D69750779

Pulled By: Abbondanzo

fbshipit-source-id: 3af8d4a5da07213cdbb968b070d2507ed897d194
2025-02-17 11:04:39 -08:00
Ruslan LesiutinandFacebook GitHub Bot 13dae0601d Record React Native process (#49370)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49370

# Changelog: [Internal]

When we start tracing, we will record metadata event for current process.

We will base it off the assumption that the thread where we handle `Tracing.start` event is the main one.

We can't register the main thread yet:
1. We can't assume that CDP messages are handled on it - this is not the case for Windows and in a long term Inspector will be moved to its own thread
2. We don't have any similar mechanism as Runtime Executor, but for Main thread. This will require Host providing an executor for it.

I've validated at the top of the stack that not registering the main thread should not affect how trace is displayed in CDT.

Reviewed By: rozele

Differential Revision: D69465926

fbshipit-source-id: 103de1da9d00564bf201456ad04a465387c1d542
2025-02-17 09:34:33 -08:00
Ruslan LesiutinandFacebook GitHub Bot acebebfd21 Expose API for registering processes and threads (#49083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49083

# Changelog: [Internal]

> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.

Added 2 new public methods to `PerformanceTracer` instance for registering metadata Trace Events for processes and threads.

Reviewed By: huntie

Differential Revision: D68439733

fbshipit-source-id: dd9f0e72e2414b8c665c57a542cbbfe7df34a516
2025-02-17 09:34:33 -08:00
Ruslan LesiutinandFacebook GitHub Bot 71f0b4d5a0 Use real process id and thread ids (#49309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49309

# Changelog: [Internal]

Use newly added module to get real OS-level process and thread ids.

We will keep process id on an instance, because I don't think it could change over time? For thread id, we will get it at the time of event registration.

Reviewed By: rozele

Differential Revision: D69316094

fbshipit-source-id: e12f2ea147ee8bf5a0a13ef293b8d85a0b64fc02
2025-02-17 09:34:33 -08:00
Ruslan LesiutinandFacebook GitHub Bot 994d7cc2f7 Define OSCompat module (#49302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49302

# Changelog: [Internal]

Added OS-agnostic module that will implement 2 basic capabilities:
- Getting current process id
- Getting current thread id

Reviewed By: javache

Differential Revision: D69316093

fbshipit-source-id: 114d235f1137eaf9c41d95df76f15532766d1bc8
2025-02-17 09:34:33 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot 74de9526ab chore(iOS): deprecate RCTAppDelegate (#49078)
Summary:
Recently, I've introduced `RCTReactNativeFactory` in this PR: https://github.com/facebook/react-native/issues/46298, which is a good successor for `RCTAppDelegate`.

### Why?

`RCTAppDelegate` introduced strong coupling between React Native and AppDelegate pattern. From iOS 13+ there is a newer equivalent (Scene Delegate) which is not possible to achieve with current architecture. The proposed solution involves migration to a `RCTReactNativeFactory` a class that encapsulates initialization logic of React Native.

This migration will make brownfield initialization easier by making it more flexible and simpler to integrate into already established apps.

### Deprecation plan

The plan I've discussed with cipolleschi involves:

- Deprecation of `RCTAppDelegate` in 0.79 (current main)
- Migration off `RCTAppDelegate` to SceneDelegate + `RCTReactNativeFactory` in 0.80

## Changelog:

[IOS] [DEPRECATED] - deprecate RCTAppDelegate

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

Test Plan: Not needed

Reviewed By: cortinico

Differential Revision: D69061022

Pulled By: cipolleschi

fbshipit-source-id: b02a0ff3f26be9320da749f38c9cf083804f9f30
2025-02-17 09:12:17 -08:00
Kudo ChienandFacebook GitHub Bot cdc166709d Allow passing custom JSRuntimeFactory to DefaultReactHost (#49366)
Summary:
an effort of lean core for jsc: https://github.com/Kudo/discussions-and-proposals/blob/%40kudo/lean-core-jsc/proposals/0836-lean-core-jsc.md

## Changelog:

[ANDROID] [CHANGED] - Allow passing custom JSRuntimeFactory to DefaultReactHost

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

Test Plan:
- ci passed
- test from https://github.com/react-native-community/javascriptcore/pull/4

Reviewed By: cipolleschi

Differential Revision: D69656837

Pulled By: cortinico

fbshipit-source-id: ba8bf744c920a70c10fe5f6743f8dd182c88c4d4
2025-02-17 07:30:45 -08:00
Vitali ZaidmanandFacebook GitHub Bot 63080727a7 minor variable names and console message contents and timing refactors (#49464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49464

Changelog:
[General][Internal] - minor variable names and console message contents and timing refactors

Reviewed By: hoxyq

Differential Revision: D69667948

fbshipit-source-id: 2305b873c85cd193cbbb63b03819a8d360e11880
2025-02-17 07:01:33 -08:00
Nicola CortiandFacebook GitHub Bot bbfccd088b RNGP - Convert if to when in getPackagingOptionsForVariant (#49426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49426

This is a nit, but I'm following up on a review comment that was left behind.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69656370

fbshipit-source-id: 76de4d77d9993bd9a35d7df019a6cebcce13d632
2025-02-17 06:51:50 -08:00
Samuel SuslaandFacebook GitHub Bot 49b7ce0856 delete RCTUIUtils (#49453)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49453

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69716706

fbshipit-source-id: 46e786de85fbee142855384e2338529de6c8a644
2025-02-17 06:40:36 -08:00
Kudo ChienandFacebook GitHub Bot 176bed79b4 decouple jsc when USE_THIRD_PARTY_JSC=1 on ios (#49371)
Summary:
an effort of lean core for jsc: https://github.com/Kudo/discussions-and-proposals/blob/%40kudo/lean-core-jsc/proposals/0836-lean-core-jsc.md. this pr tries to decouple all jsc code when `USE_THIRD_PARTY_JSC=1` on ios

this pr includes these changes:
- exclude `React-jsc` pod and pod dependency when `USE_THIRD_PARTY_JSC=1`
- in objcpp code, remove `JSCExecutorFactory` / `RCTJscInstance` references when `USE_THIRD_PARTY_JSC=1`. it throws c++ errors like `No JSRuntimeFactory specified.` when no engine is specified (USE_HERMES=0 && USE_THIRD_PARTY_JSC=1). people need to override delegate methods to specify a JSRuntimeFactory.

## Changelog:

[IOS] [CHANGED] - Decouple JSC when `USE_THIRD_PARTY_JSC=1`

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

Test Plan:
- ci passed
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=1 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install`
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install`
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 bundle exec pod install`

Reviewed By: cortinico

Differential Revision: D69662457

Pulled By: cipolleschi

fbshipit-source-id: b272f46dde896d0981cfca75c9bfcf6775507307
2025-02-17 06:39:09 -08:00
Alex HuntandFacebook GitHub Bot 7368265107 Remove unstable_enableLogBox (#49427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49427

Also refine lint/`$FlowFixMe`s in `index.js`.

Changelog:
[General][Breaking] Remove deprecated `unstable_enableLogBox` function. LogBox is enabled by default.

Reviewed By: cortinico

Differential Revision: D69656713

fbshipit-source-id: 21ce775c84e17da036583f099a17f6524f9b9bf1
2025-02-17 05:48:06 -08:00
Alex HuntandFacebook GitHub Bot f940be1caa Remove index.js.flow shim from Node packages (#49461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49461

Flow now supports Package Exports 🎉. This means we can delete the compatiblity pattern in each of our build-enabled Node.js packages.

This simplifies the internal package structure needed to support Flow while developing from source in the monorepo — no prod impact.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69741143

fbshipit-source-id: 070715cb6beb00eb393186dbf95856ceb87fabef
2025-02-17 05:44:22 -08:00
Mateo GuzmánandFacebook GitHub Bot d41f56176c Make ReactOverflowViewWithInset & NativeKind internal (#49456)
Summary:
As part of the initiative to reduce the public API surface, this classes can be internalized. I've checked there are no relevant OSS usages:

- [NativeKind](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+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+com.facebook.react.uimanager.NativeKind)
- [ReactOverflowViewWithInset](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+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+com.facebook.react.uimanager.ReactOverflowViewWithInset&p=1)

## Changelog:

[INTERNAL] - Make ReactOverflowViewWithInset & NativeKind internal

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

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

Reviewed By: cipolleschi

Differential Revision: D69736740

Pulled By: cortinico

fbshipit-source-id: 493cd3c10c0a99126b0e9b5536468977bbe03ecc
2025-02-17 04:37:00 -08:00
Vitali ZaidmanandFacebook GitHub Bot 502033337e keep heartbeat between inspector proxy and debugger going even if not idle (#49441)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49441

Changelog:
[General][Internal] - keep heartbeat between inspector proxy and debugger going even if not idle

When heartbeat was only used to keep the connection alive and to detect debugger timeouts, it was enough to send a ping every time the connection was idle for 10 seconds.

Now, when we use the heartbeat as a way to track how good is the round trip time between the inspector proxy and the debugger, we would like to make this tracking more reliable by sending a ping 10 seconds after each pong, even if the connection is not idle.

It also simplifies the code and makes it more clear by removing the confusing `shouldSetTerminateTimeout` variable.

Reviewed By: hoxyq

Differential Revision: D69665738

fbshipit-source-id: c8175b54d2b3df32ee60b316ec7bcf7bc0f0a1ee
2025-02-17 04:29:33 -08:00
zhongwuzwandFacebook GitHub Bot 16a476c0ee Fabric: Fix over reporting trait changes (#49431)
Summary:
Fixes https://github.com/facebook/react-native/issues/49330. We can keep the same logic as paper arch , please see https://github.com/facebook/react-native/pull/39439.

## Changelog:

[IOS] [FIXED] - Fabric: Fix over reporting trait changes

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

Test Plan: Repro in https://github.com/facebook/react-native/issues/49330.

Reviewed By: rshest

Differential Revision: D69740128

Pulled By: javache

fbshipit-source-id: 2946df68ab7eb88809c21dfcf33ce23f4cd6cb41
2025-02-17 04:19:28 -08:00
Mateo GuzmánandFacebook GitHub Bot e065411c91 Remove com.facebook.react.modules.network.TLSSocketFactory class (#49457)
Summary:
As part of the initiative to reduce the public API surface, I found that this class is not used in the codebase and can be removed.

[GH search for TLSSocketFactory](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+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+com.facebook.react.modules.network.TLSSocketFactory) – this class has some OSS usages, but all the ones I found are from old/non-active repos so that's why I think it is safe to remove but should be marked as [BREAKING] at the same time.

## Changelog:

[ANDROID] [BREAKING] - Remove com.facebook.react.modules.network.TLSSocketFactory class

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

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

Reviewed By: javache

Differential Revision: D69736673

Pulled By: cortinico

fbshipit-source-id: 1e7abe289cd3894eff5967ae224c3fb8d0501f1a
2025-02-17 03:47:28 -08:00
Nicola CortiandFacebook GitHub Bot 43cffb96db Gradle Configuration Cache - Round 3 (#49439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49439

This is the next part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).

Here I'm removing the `onlyIf` lambdas to make some tasks CC friendly.

The problem is that some `onlyIf` lambdas can't easily be serialized. Here I'm cleaning up
the problematic one to move the condition checks at execution time

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69664732

fbshipit-source-id: a457b2fae8114568ec4e04d772c9944022b1e1a5
2025-02-17 03:35:43 -08:00
Nicola CortiandFacebook GitHub Bot 0014265795 Gradle Configuration Cache - Round 2 (#49438)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49438

This is the second part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).

Here I'm making the exec tasks CC friendly.

The problem is that previously we were using explicit streams which are not CC friendly
for stderr/stdout. The solution is to create a custom task and handle files as input
properties.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69662246

fbshipit-source-id: ad7e82e52b12d508ee15b68408882fdc3516d287
2025-02-17 03:35:43 -08:00
Nicola CortiandFacebook GitHub Bot e8b7772dc9 Gradle Configuration Cache - Round 1 (#49421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49421

This is a first part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).

Here I'm making all those tasks `prepare*` CC friendly.

Those tasks were not CC friendly as they were referencing an external variable inside their body.
We don't need to know the library version, we can just substring after the first folder
and the tasks will behave as before.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69655168

fbshipit-source-id: 801d7817c7e2d7380342f175565cc9b1ff30c5d0
2025-02-17 03:35:43 -08:00
Jakub PiaseckiandFacebook GitHub Bot f15f618503 Sort entry points, add clipboard and AccessibilityInfo (#49458)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49458

Changelog: [Internal]

Sorts the entry points in the TS generator script and adds `Clipboard` and `AccessibilityInfo` which, as far as I can see, require no changes for their types to align with OSS.

Reviewed By: huntie

Differential Revision: D69663092

fbshipit-source-id: cfdb9ab5c07105497a1cdf4ebdc8de1e34b510bd
2025-02-17 02:59:58 -08:00
shubhamguptadream11andFacebook GitHub Bot dc02c53c16 fix: cron timing updated and action upgrade (#49407)
Summary:
Problem: Duplicate issues were notified on discord channel in issue triaging section.

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Changed cron timings to run at fix schedule and upgraded action for better debugging

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL] [FIXED] - Changed cron timings to run at fix schedule and upgraded action for better debugging

Root cause:
- The cron job (cron: "0 /6 * *") is expected to run every 6 hours.
- Expected runs: 5:54 AM → 11:54 AM → 5:54 PM.
- However, the second run happened earlier at 11:37 AM instead of 11:54 AM.
- This caused duplicate pings for issues created around 5:42:24 AM.

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

Test Plan: Tested action locally

Reviewed By: cortinico, NickGerleman

Differential Revision: D69667174

Pulled By: cipolleschi

fbshipit-source-id: 3dcadc25783335c32cba8acdda26e1c755294629
2025-02-17 02:12:49 -08:00
Richard BarnesandFacebook GitHub Bot acdddef48e Enable -Wunused-variable in js/PACKAGE (#49454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49454

This diff enables compilation warning flags for the directory in question. Further details are in [this workplace post](https://fb.workplace.com/permalink.php?story_fbid=pfbid02XaWNiCVk69r1ghfvDVpujB8Hr9Y61uDvNakxiZFa2jwiPHscVdEQwCBHrmWZSyMRl&id=100051201402394).

This is a low-risk diff. There are **no run-time effects** and the diff has already been observed to compile locally. **If the code compiles, it work; test errors are spurious.**

Differential Revision: D68513114

fbshipit-source-id: 219e2b9f2961da76cec4d08cc9f77787e08a0a1e
2025-02-16 10:16:22 -08:00
Christoph PurrerandFacebook GitHub Bot 1498566c23 Align logic in BaseTextInputShadowNode to determine updateStateIfNeeded with AndroidTextInputShadowNode (#48585)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48585

[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to determine updateStateIfNeeded with AndroidTextInputShadowNode

As a preparation for https://github.com/facebook/react-native/pull/48165 this aligns the implementation of those 2 methods

Reviewed By: javache

Differential Revision: D68004755

fbshipit-source-id: 519247de0d081f37b5ef8ad6093b43d2c735a50e
2025-02-14 20:37:48 -08:00
Joe VilchesandFacebook GitHub Bot 103f8b3885 Fix bug where we can crash with small blurRadius
Summary:
An internal crash report notified us that we were getting an `IllegalArgumentException` in Android's `BlurMaskFilter` used in Box Shadows. The only requirement for the arguments there are that the blur radius is positive. We ensure that, but pass to `sigmaToRadius` afterwards, which does NOT ensure that. This updates that conversion so that

* We will never return negative numbers, regardless of what `PixelUtil.toDIPFromPixel` is doing
* Small enough numbers ( < 0.5) will just go through as 0.0, which is what Android does in https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/libs/hwui/utils/Blur.cpp;l=34
* Ensure shadows check that we have a POSITIVE blur radius AFTER conversion. sigmaToRadius can still return 0 which with also throw, so gotta make sure we change our checks. Filter blurs and dropShadow should be ok, renderEffect does not mention anything about being > 0 in the docs.

Changelog: [Android] [Fixed] - Fix issue where boxShadow crashes with small blur radius

Facebook
Post alerting us of this: https://fb.workplace.com/groups/rn.panelapps/permalink/1136446121310146/

Reviewed By: NickGerleman

Differential Revision: D69683031

fbshipit-source-id: 92f0938fea65e1af280bdb12b6c3d2b9014e89c0
2025-02-14 17:44:06 -08:00
David VaccaandFacebook GitHub Bot cf81abc45e Mark LayoutAnimations classes with @LegacyArchitecture (#49445)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49445

This diff marks a subset of LayoutAnimations classes with LegacyArchitecture, since these classes should not be called, loaded nor included in apk that are running in new archtictecture by default

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D69674674

fbshipit-source-id: 84c71c7491064abf8d70f52b14ddb81bd0515227
2025-02-14 14:53:25 -08:00
David VaccaandFacebook GitHub Bot 78744d4a85 Remove internal packages from public API (#49444)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49444

Remove internal packages from public API

changelog: [internal] internal

Reviewed By: arushikesarwani94, alanleedev

Differential Revision: D69675450

fbshipit-source-id: 392b9658e2ae44a2df6e39be384b6b820d48f110
2025-02-14 14:53:25 -08:00
David VaccaandFacebook GitHub Bot 3673725560 Introduce internal @LegacyArchitecture annotation (#49443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49443

This diff introduces an internal annotation called LegacyArchitecture that will be used to document what classes are part of Legacy or new architecture

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D69538444

fbshipit-source-id: 5037ba03cd3b1675544f432c3981503c28606f19
2025-02-14 14:53:25 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 11e53c0369 Setup Package.swift to consume the binaries (#49435)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49435

This change adds a Package.swift file that allows to consume the binary from a local path.

As soon as we publish this on Maven, we will update the path to the url.

## Changelog:
[Internal] - Add the Package.swift file to consume the binary

Reviewed By: cortinico

Differential Revision: D69660943

fbshipit-source-id: c76ff3272d106236b6cf713b7e054070a3d45176
2025-02-14 10:20:10 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 69a4d32028 Add function to package the xcframework (#49434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49434

This change adds a function to create the xcframework sarting from the various .framework's slice built before.

## Changelog:
[Internal] - Add function to create the xcframework

Reviewed By: cortinico

Differential Revision: D69660662

fbshipit-source-id: f58034c75cce3d242910d0ec1512be28059771ca
2025-02-14 10:20:10 -08:00
Riccardo CipolleschiandFacebook GitHub Bot f05ebd5d9d Add logic to copy headers to .framework (#49433)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49433

This change adds the logic to copy the Headers files from the dependency folder to the generated frameworks folder.

There is a slight possibility that this function will be implemented by the Swift PM build system, as I open [this question](https://forums.swift.org/t/xcodebuild-does-not-generate-headers-if-the-source-is-swift-pm/77856) on the Swift forums.

In that case, we would be able to drop this.

## Changelog:
[Internal] - Add function to copy headers over to the .frameworks

Reviewed By: cortinico

Differential Revision: D69656046

fbshipit-source-id: e9d4f0f53ea57bc0df86fc9194cdf9fc1f372730
2025-02-14 10:20:10 -08:00
Vitali ZaidmanandFacebook GitHub Bot 84f3cf95ea add event on debugger heartbeat and timeout (#49437)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49437

* Log every heartbeat with the same sampling as CDP commands (`debugger_heartbeat`)
* Log abandoned connections due to heartbeat timeout (`debugger_timeout`)

Changelog:
[General][Added] - add inspector proxy events for debugger heartbeat (sampled) and abandoned connections

Reviewed By: robhogan

Differential Revision: D69603217

fbshipit-source-id: f40721f5dc0cc0c33e71a0d29aa50ccf4e7fee3f
2025-02-14 08:42:39 -08:00
Jakub PiaseckiandFacebook GitHub Bot 0aa89e9f1c Align View prop types with OSS (#49430)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49430

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69658857

fbshipit-source-id: 55bb080f3197a7838e96e0e2cc488064881094c4
2025-02-14 08:22:51 -08:00
Mateo GuzmánandFacebook GitHub Bot deafa72682 Kotlinify ReactZIndexedViewGroup & ReactOverflowViewWithInset (#49384)
Summary:
Kotlinify 2 of the com.facebook.react.uimanager interfaces.

## Changelog:

[INTERNAL] - Kotlinify ReactZIndexedViewGroup & ReactOverflowViewWithInset

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

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

Reviewed By: javache

Differential Revision: D69600758

Pulled By: cortinico

fbshipit-source-id: e88d292a94c9676789da2f96b1395694e82386ee
2025-02-14 07:29:25 -08:00
Mateo GuzmánandFacebook GitHub Bot f58d931a32 Make com.facebook.react.views.debuggingoverlay classes internal (#49341)
Summary:
As part of the initiative to reduce the public API surface, this package can be internalized. I've checked there are no relevant OSS usages:

- [DebuggingOverlay](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+com.facebook.react.views.debuggingoverlay.DebuggingOverlay)
- [DebuggingOverlayManager](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+com.facebook.react.views.debuggingoverlay.DebuggingOverlayManager)
- [TraceUpdate](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+com.facebook.react.views.debuggingoverlay.TraceUpdate)

## Changelog:

[INTERNAL] - Make com.facebook.react.views.debuggingoverlay classes internal

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

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

Reviewed By: javache

Differential Revision: D69520424

Pulled By: cortinico

fbshipit-source-id: 55495329b46b7b28010ea3dcee05a5d8b10fa042
2025-02-14 07:24:32 -08:00
Vitali ZaidmanandFacebook GitHub Bot 29419ce8f0 add logs for inspector proxy connectivity (#49432)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49432

Changelog:
[General][Added] - add inspector proxy info logs in regards to CDP connection to device and DevTools

Reviewed By: robhogan

Differential Revision: D69598477

fbshipit-source-id: 6efe7be886501463acbeea1c97ec84064cd84878
2025-02-14 07:19:07 -08:00
Dawid MałeckiandFacebook GitHub Bot 893d1c5fed Add I18nManager and Vibration to buildTypes and align Flow with TS types (#49420)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49420

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69460878

fbshipit-source-id: 09cc702892ed93b6d413e1700e02151aa600bd18
2025-02-14 05:45:28 -08:00
Samuel SuslaandFacebook GitHub Bot b29232d75e add unit tests to AnimatedValue to cover native node subscriptions (#48724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48724

changelog: [internal]

A change in D68154908 caused issues where AnimatedValue would oversubscribe to native module, bring apps to halt.

This is unit test to prevent that.

Reviewed By: yungsters

Differential Revision: D68265033

fbshipit-source-id: 60cc93a619a5c654dc1bf77b00b2d9be2c482894
2025-02-14 05:30:54 -08:00
Iwo PlazaandFacebook GitHub Bot fc6ca26d3f Migrate Utilities/dismissKeyboard.js, Utilities/GlobalPerformanceLogger.js & Utilities/SceneTracker.js to use export syntax (#49402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49402

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` and `Utilities/SceneTracker.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` or `Utilities/SceneTracker.js` with `require` syntax need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D69599636

fbshipit-source-id: 0c450996f908d8139dd0c48677f58e07243d6150
2025-02-14 05:19:32 -08:00
Tommy NguyenandFacebook GitHub Bot a672a4d007 fix: fix @react-native-community/cli not being found in pnpm setups (#47304)
Summary:
Fix `react-native-community/cli` not being found in pnpm setups

## Changelog:

[GENERAL] [FIXED] - Fix `react-native-community/cli` not being found in pnpm setups

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

Test Plan:
1. Clone/check out this branch: https://github.com/microsoft/rnx-kit/pull/3409
2. Run `yarn react-native config`

Reviewed By: cortinico

Differential Revision: D65209065

Pulled By: robhogan

fbshipit-source-id: 2ceb73ad140b4afe193e879779c2d8a4b9adf3fc
2025-02-14 04:56:55 -08:00
Iwo PlazaandFacebook GitHub Bot ae1a33875e Re-include ActionSheetIOS and Share in automatic type def generation (#49411)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49411

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69606078

fbshipit-source-id: e5fa3b6a50a6f53436cc7429f224c9f8353d6c8c
2025-02-14 04:56:00 -08:00
Kudo ChienandFacebook GitHub Bot 66032f22b8 pull out jsctooling when useThirdPartyJSC is true (#49365)
Summary:
an effort of lean core for jsc: https://github.com/Kudo/discussions-and-proposals/blob/%40kudo/lean-core-jsc/proposals/0836-lean-core-jsc.md

## Changelog:

[ANDROID] [CHANGED] - exclude `jsctooling` when `useThirdPartyJSC` gradle property is true

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

Test Plan:
- ci passed
- test from https://github.com/react-native-community/javascriptcore/pull/4

Reviewed By: cipolleschi

Differential Revision: D69654289

Pulled By: cortinico

fbshipit-source-id: 148e07c7114dde05c2014522f9c56119f7f6f0ce
2025-02-14 03:52:30 -08:00
Jakub PiaseckiandFacebook GitHub Bot 7295a0b9df Align Blob types with OSS (#49390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49390

Na
Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69586908

fbshipit-source-id: 017c427f381e075e4f6a440ab30ae0df79573793
2025-02-14 03:18:48 -08:00
Nicola CortiandFacebook GitHub Bot e78a6d844c RNGP - Do not access .project inside GenerateCodegenArtifactsTask (#49400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49400

We should not invoke anything on the `project` property inside thet task.
That will break Gradle Configuration Caching which is becoming the default in the next version of Gradle.

This fixes it for the `GenerateCodegenArtifactsTask` task.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69592464

fbshipit-source-id: 72bab3f29299313875f2e7abd1b701c9d74bd2a1
2025-02-14 02:56:32 -08:00
Nicola CortiandFacebook GitHub Bot 0ce56ad953 RNGP - Do not access .project inside GenerateCodegenSchemaTask (#49399)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49399

We should not invoke anything on the `project` property inside thet task.
That will break Gradle Configuration Caching which is becoming the default in the next version of Gradle.

This fixes it for the `GenerateCodegenSchemaTask` task.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69592463

fbshipit-source-id: 56e78b1bdc113ae402cc90960faa05cd73d5b97d
2025-02-14 02:56:32 -08:00
Nicola CortiandFacebook GitHub Bot 0dd901701a RNGP - Do not access .project inside BuildCodegenCLITask (#49398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49398

We should not invoke anything on the `project` property inside thet task.
That will break Gradle Configuration Caching which is becoming the default in the next version of Gradle.

This fixes it for the `BuildCodegenCLITask` task.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69592465

fbshipit-source-id: fc69896b61968ace7b7762f873cfa7eaa50c8b17
2025-02-14 02:56:32 -08:00
David VaccaandFacebook GitHub Bot 8c80087c3e Create fantom benchmarking test to verify impact of props parsing (#49417)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49417

In this diff I'm introducing a fantom benchmarking test to verify impact of props parsing in Fabric (testing for 100, 1000 and 1500 nested views)

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D69624243

fbshipit-source-id: fe71668fe97558d2b6072fe49c9910cb978f7f78
2025-02-13 21:30:40 -08:00
David VaccaandFacebook GitHub Bot b3c41cef98 EZ refactor in ViewManager (#49415)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49415

Refactoring NAME -> TAG for consistency with other classes

changelog: [internal] internal

Reviewed By: Abbondanzo

Differential Revision: D69622546

fbshipit-source-id: 314db29ddfdbbd7fc614b355b9b18c0a8afe31df
2025-02-13 18:27:59 -08:00
Sam ZhouandFacebook GitHub Bot b45851aecf Deploy 0.261.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: alexmckenley

Differential Revision: D69622197

fbshipit-source-id: 3ddf9f8cb015825ea76be39a28525b75bbc8c03f
2025-02-13 18:13:15 -08:00
Christoph PurrerandFacebook GitHub Bot 629c289d74 Add missing break; in RCTEventDispatcher.mm (#49416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49416

[Changelog] [Internal] - Add missing break; in RCTEventDispatcher.mm

This fixes a compile error if a stricter warning setting is used as otherwise compilation fails with
```
react-native-github/packages/react-native/React/CoreModules/RCTEventDispatcher.mm:110:9: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
  110 |         default:
      |         ^
react-native-github/packages/react-native/React/CoreModules/RCTEventDispatcher.mm:110:9: note: insert 'break;' to avoid fall-through
  110 |         default:
      |         ^
      |         break;
1 error generated.
Interaction with installer failed.
```

Reviewed By: joevilches

Differential Revision: D69625062

fbshipit-source-id: 071ddf113afbc8d8d0870282fc83d762f1f80616
2025-02-13 17:03:44 -08:00
David VaccaandFacebook GitHub Bot b467a7453e Enforce that ViewManagers using codegen override getDelegate() method (#49414)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49414

In this we are enforcing that that ViewManagers using codegen override getDelegate() method.

For now we are logging a softException to get signal from production without crashing the app

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D69621301

fbshipit-source-id: 1434fb3f3c7e5ebebee172ec1d7ad6c21eb453ae
2025-02-13 16:33:37 -08:00
Nick GerlemanandFacebook GitHub Bot 8671529367 Back out "Back out "Back out "[RN][CSS] Wire up native box shadow parsing""" (#49412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49412

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D69619783

fbshipit-source-id: cffb2f45c30bf1f43914224bc2e46a2653bd0bdb
2025-02-13 16:05:32 -08:00
Riccardo CipolleschiandFacebook GitHub Bot dd0e1f24d1 Add build function to the prepare-ios-script (#49363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49363

This change adds the `build()` function that calls xcodebuild to prepare the ReactNativeDependencies.framework

This functio creates the frameworks in the /react-native/third-party/.build folder

## Changelog:
[Internal] - Add build folder to the `prepare-ios-script`

Reviewed By: cortinico

Differential Revision: D69533218

fbshipit-source-id: edc9281e9270970084aa0f56b52ced4579df3473
2025-02-13 13:55:51 -08:00
Riccardo CipolleschiandFacebook GitHub Bot dd4d4e2923 Add SwiftPM package to build dependencies for iOS (#49361)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49361

This change adds the Package.swift file that we will use to build the dependencies for React Native

## Changelog:
[Internal] - Swift PM file to build ReactNativeDependencies

Reviewed By: cortinico

Differential Revision: D69518776

fbshipit-source-id: 85006c3c5933cc6a5fd772f7b014a823d7bb99b3
2025-02-13 13:55:51 -08:00
Riccardo CipolleschiandFacebook GitHub Bot b98362e311 Add code to keep only required files for dependencies (#49360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49360

We don't need the whole dependencies archiveto build the dependencies. But usually we only need a subset of them.

This change add a functionality to the script to remove the unnecessary files.

## Changelog:
[Internal] - Add feature to remove unnecessary files from 3p dependencies.

Reviewed By: cortinico

Differential Revision: D69518656

fbshipit-source-id: b071626a1894261b75023023b7f7eeb2730282a2
2025-02-13 13:55:51 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 7db0abf61b [Download and patch Glog dependency (#49336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49336

This change adds the step to download the glog dependency and run the prepare_glog script that we have in the codebase

## Changelog:
[Internal] - Download Glog and patch it.

Reviewed By: cortinico

Differential Revision: D69466238

fbshipit-source-id: df0b4e29d4ff7d0d61f92a52141935472fa964fe
2025-02-13 13:55:51 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 9f23118716 Add function to download dependencies (#49335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49335

This change adds a function in the prebuild script to download a 3p dependency in the react native monorepo.

## Changelog:
[Internal] - Add function to download 3rd party dependencies

Reviewed By: cortinico

Differential Revision: D69464429

fbshipit-source-id: 2d035168c2390eb9fa9e2338976fce15d86fb68c
2025-02-13 13:55:51 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 47c2c01ded Prepare flow script for iOS prebuilds (#49334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49334

This diff adds a script in the `react-native/script/releases` folder that we will use as base to prepare prebuilds for iOS

The script can be invoked from the repository root with
```
node scripts/releases/prepare-ios-prebuilds.js
```

## Changelog:
[Internal] - Add scripts to prepare ios prebuilds

Reviewed By: cortinico

Differential Revision: D69461691

fbshipit-source-id: 8d33955dd799f95c43de565e48360558d7d946d4
2025-02-13 13:55:51 -08:00
Rob HoganandFacebook GitHub Bot 1a890a55de Add changelog for 0.77.1 (#49409)
Summary:
## Changelog:

[Internal] Changelog for 0.77.1

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

Reviewed By: cipolleschi

Differential Revision: D69603525

Pulled By: robhogan

fbshipit-source-id: 9ff79ce3c5d515d9684fc741829680f27a30b067
2025-02-13 13:54:31 -08:00
Iwo PlazaandFacebook GitHub Bot 028c0b36f6 Migrate Utilities/deepFreezeAndThrowOnMutationInDev.js, Utilities/defineLazyObjectProperty.js, Utilities/DeviceInfo.js & Utilities/FeatureDetection.js to use export syntax (#49408)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49408

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates Utilities/deepFreezeAndThrowOnMutationInDev.js, Utilities/defineLazyObjectProperty.js, Utilities/DeviceInfo.js & Utilities/FeatureDetection.js to use the export syntax.
- Updates deep-imports of files that were migrated to a single export default to use `.default`
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Utilities/deepFreezeAndThrowOnMutationInDev`, `Utilities/defineLazyObjectProperty`, `Utilities/DeviceInfo` or `Utilities/FeatureDetection` with `require` syntax may need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D69602536

fbshipit-source-id: 7ec06995a1d244b95d4f970551955d9e6013de13
2025-02-13 13:11:20 -08:00
Sam ZhouandFacebook GitHub Bot a1eb6de691 Pre-suppress errors ahead of 0.261.1 release in xplat
Summary: Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D69610953

fbshipit-source-id: 3eec28d72e26c2f48542523dd610590e298eba69
2025-02-13 13:04:53 -08:00
Iwo PlazaandFacebook GitHub Bot d98116aa44 Migrate Libraries/Utilities/Platform to use export syntax (#49306)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49306

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates `Libraries/Utilities/Platform.*.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Libraries/Utilities/Platform` with `require` syntax needs to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D69404025

fbshipit-source-id: f21501ca5b7e8e6a9e3e501781ed36e7d2bfd4a4
2025-02-13 11:58:41 -08:00
Iwo PlazaandFacebook GitHub Bot 7aef81b984 Migrate Utilities/infoLog, Utilities/logError, Utilities/mapWithSeparator & Utilities/warnOnce to use export syntax (#49406)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49406

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates Utilities/infoLog, Utilities/logError, Utilities/mapWithSeparator & Utilities/warnOnce to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Utilities/infoLog`, `Utilities/logError`, `Utilities/mapWithSeparator` or `Utilities/warnOnce` with `require` syntax need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D69601174

fbshipit-source-id: 821f9ae59d4f898c95631eb7a9aeed138ace3567
2025-02-13 11:16:27 -08:00
Iwo PlazaandFacebook GitHub Bot 152587cda0 Migrate Utilities/binaryToBase64, Utilities/DevSettings, Utilities/PolyfillFunctions & Utilities/RCTLog to use export syntax (#49403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49403

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates `Utilities/binaryToBase64`, `Utilities/DevSettings`, `Utilities/PolyfillFunctions` & `Utilities/RCTLog` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Utilities/binaryToBase64`, `Utilities/DevSettings`, `Utilities/PolyfillFunctions` or `Utilities/RCTLog` with `require` syntax need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D69600476

fbshipit-source-id: 3f8ac3a35031e8b20446abc8f52a2817cb31b6d2
2025-02-13 11:13:25 -08:00
Iwo PlazaandFacebook GitHub Bot 827a847791 Migrate Utilities/BackHandler.*.js, Utilities/DevLoadingView.js and Utilities/HMRClient*.js to use export syntax (#49369)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49369

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates `Libraries/Utilities/BackHandler.*.js`, `Utilities/DevLoadingView.js` and `Utilities/HMRClient*.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Libraries/Utilities/BackHandler`, `Utilities/DevLoadingView.js` or `Utilities/HMRClient*.js` with `require` syntax needs to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D69539527

fbshipit-source-id: c10b3523bbcc52bba5b6c27721c33b1e0d9d5104
2025-02-13 10:41:17 -08:00
David VaccaandFacebook GitHub Bot 6632d30678 Remove legacy codegen of $PropSetter classes for ShadowNode classes on apps running on new architecture by default (#49405)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49405

This diff removes legacy codegen of $PropSetter classes for ShadowNode classes when the app has UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE enabled

These classes are not used in the new architecture, let's just remove them from the apk.

This change won't affect OSS

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D69569205

fbshipit-source-id: 178051b9f10576226fd746f9eab1b56b2934ea0b
2025-02-13 10:31:42 -08:00
David VaccaandFacebook GitHub Bot a43c6b15bb Remove legacy codegen of $PropSetter classes for ViewManagers that are migrated to new architecture (#49404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49404

This diff disables codegen of legacy $PropSetter for viewManagers that implement the interface com.facebook.react.uimanager.ViewManagerWithGeneratedInterface.

This logic will only be enabled for apps that are configured with BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE = true

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D67412734

fbshipit-source-id: 682725714dc41f5f34d95d4d9a13ab09726b28f7
2025-02-13 10:31:42 -08:00
Alan LeeandFacebook GitHub Bot 141fb23bba fix Modal crash when calling syncSystemBarsVisibility() (#49386)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49386

It appears that `currentActivity.decorView` sometime is not attached to a window during the process of creating a Dialog for currently unknown reasons causing a crash.
Add check to skip call to `syncSystemBarsVisibility()` in such case as current code cannot function without valid RootWindowInsets.

Changelog:
[Android][Fixed] - fixed crash with Modal when trying to call syncSystemBarsVisibility()

Reviewed By: cortinico

Differential Revision: D69578581

fbshipit-source-id: de23e2ba9f485e38b7014dd7151253e56976ad43
2025-02-13 10:25:42 -08:00
DawidandFacebook GitHub Bot 6b2c40c64f Fix(iOS): onPress fails for Text with nested View (#49393)
Summary:
On the new architecture the `RCTParagraphTextView` is used to draw text on iOS but React doesn't know about it. The hit test stops propagation on the first encountered  UIView of this type. The suggested solution is to add a dummy hit test for `RCTParagraphTextView` that returns always `null`, allowing further search of the touch target.

## 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] - Fixed onPress for Text with nested View.

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

Test Plan:
| Before       | After        |
|--------------|--------------|
|<video src="https://github.com/user-attachments/assets/745f555a-d4b6-4285-91a7-0e9ea9f43d84"> | <video src="https://github.com/user-attachments/assets/9896848f-13ca-4b57-bcc9-bead478ab078">  |

<details>
 <summary>code</summary>

```ts
import {SafeAreaView, StyleSheet, Text, View, findNodeHandle} from 'react-native';

function App() {
  return (
    <SafeAreaView style={styles.container}>
      <Text
        ref={e => console.log(`Outer Text: ${findNodeHandle(e)}`)}
      >
        With Nested View
        <View ref={e => console.log(`View: ${findNodeHandle(e)}`)}>
          <Text
            ref={e => console.log(`Inner Text: ${findNodeHandle(e)}`)}
            onPress={() => {
              console.log('1. text pressed');
            }}
            style={styles.pressableText}
          >
            Pressable Text
          </Text>
        </View>
      </Text>
      <Text>
        Without Nested View
        <Text
          onPress={() => {
            console.log('2. text pressed');
          }}
          style={styles.pressableText}
        >
          Pressable Text
        </Text>
      </Text>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    gap: 10,
  },
  pressableText: {
    fontSize: 18,
    color: 'blue',
    backgroundColor: 'transparent',
  },
  nestedView: {
    backgroundColor: 'red',
    height: 100,
  },
  pressable: {
    backgroundColor: 'blue',
    height: 100,
    width: 100,
  },
});

export default App;

```

</details>

Reviewed By: cipolleschi

Differential Revision: D69591520

Pulled By: coado

fbshipit-source-id: eb75c2d8a01a82d4493a1a982e98ca74efc9d94f
2025-02-13 10:17:40 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot 31a8bb386d feat: add jsitooling package (#49348)
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore

This PR adds `jsitooling` package that third party JS engines can use (in that case javascriptcore). It's required because React-Runtime needs to depend on third-party engine on iOS, and the third-party engine needed to depend on React-Runtime to get access to the `JSRuntimeFactory` and Cocoapods doesn't support circular dependencies...

Now third-party engine can depenend on jsitooling package and provide JSRuntimeFactory

## Changelog:

[INTERNAL] [ADDED] - jsitooling package

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

Test Plan: CI Green

Reviewed By: cortinico

Differential Revision: D69535475

Pulled By: cipolleschi

fbshipit-source-id: f8d68b7957b7d69c13246ce3040a08256f2ebcd6
2025-02-13 08:49:42 -08:00
Alex HuntandFacebook GitHub Bot 41dd822762 Fix rn-tester convenience scripts (#49401)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49401

These scripts erroneously invoked `npm`, requiring `--` to forward args.

Discovered while testing https://github.com/facebook/react-native/pull/49353.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D69594024

fbshipit-source-id: a6e8cccaf994f1472b51155d36a49ed17cd291dc
2025-02-13 07:57:05 -08:00
Nicola CortiandFacebook GitHub Bot 6c3c8b7ca3 Do not reference react-native info in the Issue Template (#49367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49367

Users should use `npx react-native-community/cli info` instead.
This updates the issue template.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69533810

fbshipit-source-id: 7fd1718c96f1b160ed53cd17752f64d887143662
2025-02-13 07:37:00 -08:00
Fabrizio CucciandFacebook GitHub Bot 8bda8af7a7 Add changelog entry for 0.78.0-rc.5 (#49392)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49392

As per title

 Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D69590898

fbshipit-source-id: a1c1ff97a69de75ee7616e309d493de49565820b
2025-02-13 07:21:56 -08:00
Nicola CortiandFacebook GitHub Bot d8b95044d2 Cleanup react-native-info package (#49364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49364

We're not actively using/maintaining this package. Let's clean it up.
We can still restore if necessary.

Changelog:
[Internal] [Changed] -

bypass-github-export-checks

Reviewed By: cipolleschi

Differential Revision: D69533629

fbshipit-source-id: 940057df9a5fffa738435c92136e95a764ec98ff
2025-02-13 06:54:50 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot 7dc85d0e97 feat(ios): encapsulate device info listeners (#49162)
Summary:
This PR encapsulates device info listeners removing additional logic from RCTAppDelegate which is a prerequisite for https://github.com/facebook/react-native/pull/49078

Now we use KVO (Key Value Observation) to listen to window size changes making this module's logic encapsulated + allows to use it in brownfield scenarios.

To keep backward compatibility RCTDeviceInfo still emits `RCTWindowFrameDidChangeNotification`

## Changelog:

[IOS] [ADDED] - encapsulate device info listeners

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

Test Plan: Check if window size change listener is fired

Reviewed By: sammy-SC

Differential Revision: D69116660

Pulled By: cipolleschi

fbshipit-source-id: b9a57c70826b10cd27d102337eb1e35da1b365c9
2025-02-13 06:28:44 -08:00
Alex HuntandFacebook GitHub Bot f9bffef6c7 Remove Remote Debugging logs check (#49391)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49391

Further cleanup of Remote JS Debugging.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D69589296

fbshipit-source-id: 78c916d9419d839f01b8f31726d59fe9b7c970b7
2025-02-13 05:11:35 -08:00
Jakub PiaseckiandFacebook GitHub Bot 88fc9a3415 Align AppState types with TypeScript definitions (#49248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49248

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69176965

fbshipit-source-id: ffc82068dcf1451b858c3465c40f22427d4dd158
2025-02-13 04:14:15 -08:00
Jakub PiaseckiandFacebook GitHub Bot 43cf02336d Update ignore files and translate script (#49389)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49389

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69586220

fbshipit-source-id: a6c2f5e91055a6449087db3107c137dc49ea6d91
2025-02-13 03:59:37 -08:00
Jakub PiaseckiandFacebook GitHub Bot 4f20362b07 Migrate files in Libraries/StyleSheet to use export syntax (#49303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49303

Changelog: [General][Breaking] Deep imports to modules inside `Libraries/StyleSheet` using `require` may need to be appended with `.default`

Reviewed By: huntie

Differential Revision: D69400980

fbshipit-source-id: 053f40a8677ac877b93c27e87422ea0ef540c272
2025-02-13 03:45:13 -08:00
Mateo GuzmánandFacebook GitHub Bot 04b40852fa Make BlackHoleEventDispatcher & InterpolatorType internal (#49380)
Summary:
As part of the initiative to reduce the public API surface, this classes can be internalized. I've checked there are no relevant OSS usages:

- [BlackHoleEventDispatcher](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+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+com.facebook.react.uimanager.events.BlackHoleEventDispatcher)
- [InterpolatorType](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+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+com.facebook.react.uimanager.layoutanimation.InterpolatorType)

## Changelog:

[INTERNAL] - Make BlackHoleEventDispatcher & InterpolatorType internal

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

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

Reviewed By: cortinico

Differential Revision: D69558346

Pulled By: arushikesarwani94

fbshipit-source-id: 48b2f267f3efb78c6d66a67fb94c2d3271558df0
2025-02-13 02:46:39 -08:00
Vitali ZaidmanandFacebook GitHub Bot b0974135bf increase ping-pong timeout before killing WS connection to DevTools (#49358)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49358

When the network is under strain, the code responsible for detecting if the inspector proxy's connection to the client has been lost may incorrectly assume the connection is dead. This false positive occurs because the system assumes that if a pong is not received within 5 seconds of a ping, the other side has disconnected. However, I was able to consistently reproduce scenarios where a delay of more than 5 seconds (even more than 20 seconds) was followed by a return to normal ping-pong communication without any issues.

Since I can't think of any issues with increasing this number, I'm increasing it to 60s.

Changelog:
[General][Fixed] - Disconnections of DevTools when the network is under significant strain.

Reviewed By: robhogan, huntie

Differential Revision: D69523906

fbshipit-source-id: 50db1e7bbe690b42421bc226aa30fd6571ba2257
2025-02-12 23:45:01 -08:00
Panos VekrisandFacebook GitHub Bot 413730ecb3 Back out "Deploy 0.261.0 to xplat"
Summary:
Original commit changeset: cf5953b1afc2

Original Phabricator Diff: D69562137

Reviewed By: SamChou19815

Differential Revision: D69570236

fbshipit-source-id: 7cfa9cf51aa3662d4339e020f8ae5065c8f5c358
2025-02-12 19:14:21 -08:00
Sam ZhouandFacebook GitHub Bot 9a401c8103 Deploy 0.261.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D69562137

fbshipit-source-id: cf5953b1afc242bf2571ad7c4362ef9485d8e846
2025-02-12 18:12:54 -08:00
Nick GerlemanandFacebook GitHub Bot 1663dc1978 Back out "Back out "[RN][CSS] Wire up native box shadow parsing"" (#49376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49376

We can reland this now that D69520832 update feature flags infra.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D69548370

fbshipit-source-id: ec1187dffdca4d9d4064235e9ef6336e66521d26
2025-02-12 16:59:44 -08:00
Mateo GuzmánandFacebook GitHub Bot 1d8021d821 Fix up KDoc annotations post Kotlin migrations (#49375)
Summary:
When generating documentation using dokka, I found out that some references to classes in the comments were not linking correctly anymore after the files were migrated to Kotlin. In this PR I'm migrating the JavaDoc `link` references to Kotlin KDoc `[]` syntax.

## Changelog:

[INTERNAL] - Fix up KDoc annotations post Kotlin migrations

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

Test Plan: Manually review that the references link correctly in the Kotlin files

Reviewed By: arushikesarwani94

Differential Revision: D69549229

Pulled By: mdvacca

fbshipit-source-id: 6b7727f00a28ecfe2fca86948245d1f4e88e935c
2025-02-12 15:37:46 -08:00
David VaccaandFacebook GitHub Bot a0088d9f2b Migrate ReactStage to kotlin (#49378)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49378

Migrate ReactStage to kotlin

changelog: [internal] internal

Reviewed By: arushikesarwani94

Differential Revision: D69544706

fbshipit-source-id: 2c9ddae499f1110a3ed60e9cc02cddc19f4b306f
2025-02-12 15:26:23 -08:00
Jan KassensandFacebook GitHub Bot 14fcaf9791 cleanup feature flag enableFabricCompleteRootInCommitPhase (#49372)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49372

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D69473992

fbshipit-source-id: 6ed54f0fab45b95e47afa3ff343de061e7c40ce7
2025-02-12 13:12:07 -08:00
Mateo GuzmánandFacebook GitHub Bot 1b066bac9a Migrate BlobCollector to Kotlin (#49148)
Summary:
Migrate com.facebook.react.modules.blob.BlobCollector to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.modules.blob.BlobCollector to Kotlin

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

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

Reviewed By: cortinico, fabriziocucci

Differential Revision: D69522998

Pulled By: javache

fbshipit-source-id: a0255d1cdb51ee1f8aa73a07419e228871e56538
2025-02-12 09:04:48 -08:00
Mateo GuzmánandFacebook GitHub Bot c5b9e8e7d4 Migrate OkHttpClientProvider to Kotlin (#49108)
Summary:
Migrate com.facebook.react.modules.network.OkHttpClientProvider to Kotlin. Also, as follow up from https://github.com/facebook/react-native/pull/48958 I'm cleaning up the reflection on `OkHttpClientProviderTest` as we can make `sClient` and `sFactory` internal.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.modules.network.OkHttpClientProvider to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D69050956

Pulled By: javache

fbshipit-source-id: 62dcf8e8f999f3b687c57ed02e9ac1f2db8183ea
2025-02-12 09:04:48 -08:00
Eli WhiteandFacebook GitHub Bot 60e3921f9c Initial Open Sourcing of React Native Compatibility Check (#49340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49340

This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.

This is useful for:

- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native

Check out the Readme for more information

Changelog: [General][Added] Open Sourcing React Native's Compatibility Check

Reviewed By: panagosg7

Differential Revision: D69476742

fbshipit-source-id: 8af6039839c5475c1258fa82d9750a9320cf0751
2025-02-12 08:24:13 -08:00
Nicola CortiandFacebook GitHub Bot d11f622699 monitor-new-issues should ping the Issue Triager Oncall (#49359)
Summary:
This updates the Issue Triaging bot to ping the oncall

## Changelog:

[INTERNAL] -

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

Test Plan: Nothing to test

Reviewed By: cipolleschi

Differential Revision: D69527137

Pulled By: cortinico

fbshipit-source-id: 7291054a734bf9f7240002773b716b2057aa8eca
2025-02-12 08:15:43 -08:00
Jakub PiaseckiandFacebook GitHub Bot 2a99b22a44 Update module resolution for type generation (#49351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49351

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69521547

fbshipit-source-id: 5d37875da91341ad1882733f5ee842a819558f85
2025-02-12 07:34:36 -08:00
Alex HuntandFacebook GitHub Bot 0d66c524cf Restore Metro log streaming via CLI flag (#49353)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49353

This change adds an opt-in to restore JavaScript log streaming via the Metro dev server, [removed from React Native core in 0.77](https://reactnative.dev/blog/2025/01/21/version-0.77#removal-of-consolelog-streaming-in-metro).

Users can opt into this legacy behaviour by adding the `--client-logs` flag to `npx react-native-community/cli start`.

- The default experience remains without streamed JS logs.
- The existing "JavaScript logs have moved! ..." notice is printed in all cases, and we do not advertise the new flag for new users.
- Under non-Community CLI dev servers (i.e. Expo), log streaming is restored implicitly.

We will clean up this functionality again when we eventually remove JS log streaming over `HMRClient`, tasked in T214991636.

**Implementation notes**

- Logs are always sent over `HMRClient` (previous status quo), even with log streaming off in the dev server. This is a necessary evil to be able to flag this functionality in a user-accessible place, and to move fast for 0.78.
- Necessarily, emitting `fusebox_console_notice` moves to the dev server itself, on first device (Fusebox) connection.

Changelog:
[General][Added] - Add opt in for legacy Metro log streaming via `--client-logs` flag

Reviewed By: robhogan

Differential Revision: D69469039

fbshipit-source-id: be99d02a3b1c977a59bf7d2726f0e6cf2e60b28a
2025-02-12 07:17:15 -08:00
Pieter De BaetsandFacebook GitHub Bot 403719c371 Remove CountingOutputStream (#49275)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49275

This is a copied guava class and is only used in one spot.  Remove it and just count directly in ProgressRequestBody.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D69323277

fbshipit-source-id: 5260004a4431f03733882b6ee83a341d8bf29bb0
2025-02-12 06:21:45 -08:00
Iwo PlazaandFacebook GitHub Bot 2b30aa5cc8 Migrate Libraries/Utilities/differ/*.js to export syntax (#49332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49332

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates `Libraries/Utilities/differ/*.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates codegen with a compat layer
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to `Libraries/Utilities/differ/...` with `require` syntax need to be appended with '.default'.

Reviewed By: yungsters

Differential Revision: D69467423

fbshipit-source-id: 2e58a0b9711e9bdf5ca907a5b2252584f6fec9bc
2025-02-12 05:30:20 -08:00
Pieter De BaetsandFacebook GitHub Bot 9073817925 Add more test coverage for $ReadOnlyArray<UnsafeMixed> in component codegen (#49349)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49349

Follow-up on D69454101 to add more test coverage for `$ReadOnlyArray<UnsafeMixed>` as a component prop. The new type was missing from the CodegenSchema, which revealed some gaps in tests.

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D69488035

fbshipit-source-id: 19895e55e5ec4d89a790f1c388de9eea025a316c
2025-02-12 04:20:08 -08:00
Rubén NorteandFacebook GitHub Bot 96a8a3da48 Only log errors accessing feature flags in JS if the native module itself is not defined (#49350)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49350

Changelog: [internal]

Reviewed By: GijsWeterings

Differential Revision: D69520832

fbshipit-source-id: fb72103705c930eb5f0944c931b4fdeabde841ae
2025-02-12 04:07:10 -08:00
Jakub PiaseckiandFacebook GitHub Bot 1d7de4261f Add transform that replaces empty type with never (#49331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49331

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69465686

fbshipit-source-id: ef5e5eeedb6cd1bc89529d11bbf1ff7490daf704
2025-02-12 03:20:15 -08:00
Dawid MałeckiandFacebook GitHub Bot bf282146b6 Add UIManager to build-types and align Flow with TS defs (#49322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49322

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69241595

fbshipit-source-id: 00dafa499fe70f47395ab363f6565619e1877bae
2025-02-12 02:00:10 -08:00
Tommy NguyenandFacebook GitHub Bot 7926d656b3 fix: fix @react-native-community/cli-platform-* packages not being found in monorepos (#47308)
Summary:
Fix `react-native-community/cli-platform-*` packages not being found in monorepos.

Note that we are making the assumption that `process.cwd()` returns the project root. This is the same assumption that `react-native-community/cli` makes. Specifically, `findProjectRoot()` has an optional argument that defaults to `process.cwd()`:

- [`findProjectRoot()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli-tools/src/findProjectRoot.ts)
- Which gets called without arguments in [`loadConfig()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli-config/src/loadConfig.ts#L89)
- `loadConfig()` gets called from [`setupAndRun()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli/src/index.ts#L196), also without project root set

As far as I can see, the project root argument is only ever used in tests.

## Changelog:

[GENERAL] [FIXED] - Fix `react-native-community/cli-platform-*` packages not being found in monorepos

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

Test Plan:
1. Clone/check out this branch: https://github.com/microsoft/rnx-kit/pull/3409
2. Cherry-pick https://github.com/facebook/react-native/pull/47304
3. Cherry-pick https://github.com/facebook/react-native/pull/47308
4. Run `react-native config` inside `packages/test-app`
5. Verify that `projects` is populated

**Before:**

```js
  "healthChecks": [],
  "platforms": {},
  "assets": [],
  "project": {}
}
```

**After:**

```js
  "healthChecks": [],
  "platforms": {
    "ios": {},
    "android": {}
  },
  "assets": [],
  "project": {
    "ios": {
      "sourceDir": "/~/packages/test-app/ios",
      "xcodeProject": {
        "name": "SampleCrossApp.xcworkspace",
        "path": ".",
        "isWorkspace": true
      },
      "automaticPodsInstallation": false,
      "assets": []
    },
    "android": {
      "sourceDir": "/~/packages/test-app/android",
      "appName": "app",
      "packageName": "com.msft.identity.client.sample.local",
      "applicationId": "com.msft.identity.client.sample.local",
      "mainActivity": "com.microsoft.reacttestapp.MainActivity",
      "assets": []
    }
  }
}
```

Reviewed By: cortinico

Differential Revision: D69465533

Pulled By: robhogan

fbshipit-source-id: 3d6cf32752a7a41d9c7e84f35b0f26ae7d7a971f
2025-02-12 00:34:32 -08:00
Nick GerlemanandFacebook GitHub Bot d08f9accf0 Back out "Wire up native box shadow parsing" (#49345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49345

This diff is causing an error to be logged for every user. Even if it's noise, its more trouble than its worth. Let's revert until feature flags check fixed.

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D69504966

fbshipit-source-id: 13caf715cef9a4cc6c9b7c68d3003fbced870d34
2025-02-12 00:11:32 -08:00
Rick HanlonandFacebook GitHub Bot 578e99a013 Add a healthy number of inital e2e tests (#49338)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49338

This doesn't cover all cases, but is a good start.

Where relevant, I call out inline places where there are KPs with LogBox that will be fixed separately.

## Changelog

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69443040

fbshipit-source-id: 7281f30aa705ae812d5b5f5f9ad03b37358de059
2025-02-11 19:33:07 -08:00
Rick HanlonandFacebook GitHub Bot 1aa0ddd88b Update fantom test, add helpers (#49337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49337

*Note: This diff adds helpers and updates the one test we have. The next diff adds a bunch of tests, see that diff for how these helpers are used to scale to a large number of tests.*

-----

## Overview

Adds helpers for the LogBox e2e test to make it easier to write simple, readable, tests with a healthy level of abstraction over the e2e APIs.

## API
The helpers expose an ability to render a component, and return methods to get the UI state:

```
// Returns the LogBox inspector UI as an object.
getInspectorUI: () => ?InspectorUI,

// Returns the LogBox notification UI as an object.
getNotificationUI: () => ?NotificationUI,
```

These return objects that represent the main text elements in the UI like `title` and `message`.

The helpers also provide methods for interacting with the LogBox UI:

```
// True if the LogBox inspector is open.
isOpen: () => boolean,

// Tap the notification to open the LogBox inspector.
openNotification: () => void,

// Tap to close the notification.
dimissNotification: () => void,

// Tap the minimize button to collapse the LogBox inspector.
mimimizeInspector: () => void,

// Tap the dismiss button to close the LogBox inspector.
dismissInspector: () => void,

// Tap the next button to go to the next log.
nextLog: () => void,

// Tap the previous button to go to the previous log.
previousLog: () => void,
```

## Example test
This allows writing tests like:

```
test('should log error', () => {
  const logBox = renderLogBox(<ComponentThatErrors />);

  // Should show notification
  expect(logBox.isOpen()).toBe(false);
  expect(logBox.getNotifciationUI()).toEqual({
    count: '!',
    message: 'error message',
  });

  // Tap the notification
  logBox.openNotification();

  // Should show log
  expect(logBox.isOpen()).toBe(true);
  expect(logBox.getInspectorUI()).toEqual({
    header: 'Log 1 of 1',
    title: 'Console Error',
    message: 'error message',
    stackFrames: [
      'ComponentThatErrors'
    ],
    componentStackFrames: [
      '<ComponentThatErrors />',
    ],
    isDismissable: true,
  });
})
```

## Changelog

Changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69443041

fbshipit-source-id: c81ccd56a39d01d61814d29515b587096c0509c0
2025-02-11 19:33:07 -08:00
Samuel SuslaandFacebook GitHub Bot 00abe54707 account for tunnelled components like Modal in view culling (#49344)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49344

changelog: [internal]

restart culling context when coming across a component like Modal.

Reviewed By: alanleedev

Differential Revision: D69490655

fbshipit-source-id: bda67fd271134dceb2669d9d71c9de3041d085a9
2025-02-11 18:59:28 -08:00
David VaccaandFacebook GitHub Bot 46653fa548 Raise java source and target versions for ReactModuleSpecProcessor from 8 -> 11 (#49342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49342

Raise java source and target versions for ReactModuleSpecProcessor from 8 -> 11

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D69478204

fbshipit-source-id: 4059391041443d0418c363c1e627b6d4c38b9ff0
2025-02-11 18:53:05 -08:00
David VaccaandFacebook GitHub Bot 5cb71ef181 Raise source and target version of Prop annotation processor from 7 to 11 (#49343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49343

Raise source and target version of annotation processor from 7 to 11

This is unused in OSS

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D69478025

fbshipit-source-id: 28c6ed5889db423c43a36ccee396083ae7e78e5f
2025-02-11 18:53:05 -08:00
Joe VilchesandFacebook GitHub Bot a733930017 Add e2e tests for fixed transform cases (#49318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49318

tsia see previous diffs for fix. Added more tests to box shadow, filter, and borders

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D69416675

fbshipit-source-id: ae1e33750b56c1a4720e04e29fc110f1e11c0b3d
2025-02-11 15:44:59 -08:00
Nick GerlemanandFacebook GitHub Bot ba4a0cc23e Wire up native box shadow parsing (#49317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49317

This hooks into `enableNativeCSSParsing()` to optionally bypass viewconfig processor, and lets us parse the raw strings (or objects composed of string) in native.

Right now, to not disturb too much while this is in experimentation, this is  just a facade over existing types and props storage, and we ignore any non-px lengths.

Also need to prepend

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69337482

fbshipit-source-id: 6093e312e0d1dc1855713da20b72bf75b98af3ea
2025-02-11 13:20:32 -08:00
Nick GerlemanandFacebook GitHub Bot b1bd540045 <react/renderer/css> OSS build logic (#49316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49316

This hooks up some build logic for `react/renderer/css`. A bit funky right now since header only, and might need to change later (it isn't neccesarily guaranteed to be header only in the future).

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D69426450

fbshipit-source-id: 77e0ef409f34daf003d28a5cd70de935bd180440
2025-02-11 13:20:32 -08:00
Andrew DatsenkoandFacebook GitHub Bot 6ec1d9d843 Add .toMatch API (#49328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49328

Changelog: [Internal]
Add missing `.toMatch` expect API

Reviewed By: rubennorte

Differential Revision: D69462225

fbshipit-source-id: aefe02e6a1f8f15c8c30c26492fa926e7d6e4e8e
2025-02-11 11:21:33 -08:00
Wu ZhongandFacebook GitHub Bot 6a3e275d14 Reland RNTester: Fixes turbo module examples error in bridgeless mode (#49329)
Summary:
Reland https://github.com/facebook/react-native/issues/48362.

## Changelog:

[IOS] [FIXED] - RNTester: Fixes turbo module examples error in bridgeless mode

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

Test Plan: RNTester turbomodule examples in bridgeless can work as expected.

Reviewed By: christophpurrer

Differential Revision: D69463612

Pulled By: cortinico

fbshipit-source-id: 8613b001ebbe64ce0d505f5515bb7a4b6a64dbe7
2025-02-11 10:56:19 -08:00
Qian WuandFacebook GitHub Bot df3a60293c Revert D69277991: Initial Open Sourcing of React Native Compatibility Check
Differential Revision:
D69277991

Original commit changeset: 886a983d4b17

Original Phabricator Diff: D69277991

fbshipit-source-id: f69d528d87c22d03b0c3e654733c8efa89104df0
2025-02-11 10:35:55 -08:00
Andrew DatsenkoandFacebook GitHub Bot 9799e34211 Add .toHaveLength (#49327)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49327

Changelog: [Internal]
Add missing `.toHaveLength` expect API

Reviewed By: rubennorte

Differential Revision: D69241817

fbshipit-source-id: 11c7f314a30fd1db3c00b8665b613d290d50ad81
2025-02-11 10:32:27 -08:00
David VaccaandFacebook GitHub Bot 5444c76433 Configure all feature flags of NewArchitecture on canary (#49333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49333

The rollout of "new architecture everywhere" should be enabled in OSS canary releases. This diff updates the ReactNativeFeatureFlags.config.js to reflect that all of the feature flags used by the new architecture are enabled by default in experimental and canary releases. Note that these feature flags were already enabled in OSS when new architecture was enabled.

changelog: [internal] internal

Reviewed By: rubennorte, NickGerleman

Differential Revision: D69419662

fbshipit-source-id: 6ecf9e38bb2fd0d3c0f7129ae16fcef8755b5da2
2025-02-11 10:14:02 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot e7de582798 feat(iOS): centralize JS engine dependency configuration (#49297)
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore

This PR centralizes the setup of js engine dependencies which need to be defined when building with dynamic frameworks. This will allow us to change linked framework if using a third party one in the future

## Changelog:

[INTERNAL] [CHANGED] - centralize JS engine dependency configuration

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

Test Plan: CI Green (Build needs to go properly)

Reviewed By: javache

Differential Revision: D69396641

Pulled By: cipolleschi

fbshipit-source-id: deedd12084f563f73f12f8617fdca0a6d680bf5a
2025-02-11 10:03:07 -08:00
Alex Taylor (alta)andFacebook GitHub Bot 32fcd2733e Deploy 0.260.0 to xplat (#49319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49319

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D69438322

fbshipit-source-id: 1906cfc76125e1bb7244b2a40536c3268a914ecf
2025-02-11 09:34:17 -08:00
Jakub PiaseckiandFacebook GitHub Bot aedf8c1dba Update virtualized-lists types to align them closer to TS definitions (#49264)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49264

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69308531

fbshipit-source-id: 29f1726026aa55e4e17616e7880c7d30eae13b8f
2025-02-11 09:25:22 -08:00
Jakub PiaseckiandFacebook GitHub Bot b8e2bcd60d Update types in virtualized-lists so that they produce valid TS output (#49263)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49263

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69308533

fbshipit-source-id: 36dd38a5bfce3b19eabcf04ef5f14e006d581bcd
2025-02-11 09:25:22 -08:00
Jakub PiaseckiandFacebook GitHub Bot 1cf4c84ba0 Update files in packages/virtualized-lists to use export syntax (#49262)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49262

Changelog: [General][Breaking] Deep imports into `react-native/virtualized-lists` with require syntax may need to be appended with `.default`

Reviewed By: huntie

Differential Revision: D69308532

fbshipit-source-id: 6de15d46e0931616bc9849edbccb7cf745e15dd5
2025-02-11 09:25:22 -08:00
Rubén NorteandFacebook GitHub Bot 3a8837de4b Type event options as interface instead of objects (#49204)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49204

Changelog: [internal]

We don't copy the options object and just access the individual properties, so using an interface is enough, and has the benefit of not having to create object copies to pass down to subclasses.

Reviewed By: yungsters

Differential Revision: D69182824

fbshipit-source-id: 9819e5627d72761c78d0f39a1861a3239066dbb2
2025-02-11 09:14:29 -08:00
Eli WhiteandFacebook GitHub Bot 6590bb3e14 Initial Open Sourcing of React Native Compatibility Check (#49311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49311

This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.

This is useful for:

- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native

Check out the Readme for more information

Changelog: [General][Added] Open Sourcing React Native's Compatibility Check

Reviewed By: yungsters

Differential Revision: D69277991

fbshipit-source-id: 886a983d4b17609ce771cdd93b75f34bbd8417dc
2025-02-11 08:23:16 -08:00
Iwo PlazaandFacebook GitHub Bot 28945c68da Migrate files in Libraries/Modal and Libraries/Network to use export syntax (#49035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49035

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates files in `Libraries/Modal/*.js` and `Libraries/Network/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/Modal` and `Libraries/Network` with `require` syntax may need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D68827032

fbshipit-source-id: 98149055f82edad96e74371a79f05f88a8ab3b66
2025-02-11 07:47:24 -08:00
Pieter De BaetsandFacebook GitHub Bot abd7259de4 Allow UnsafeMixed as Array value in codegen (#49324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49324

Provide Android component codegen a bit more flexibility by allowing `$ReadOnlyArray<UnsafeMixed>` and avoid casting in the view manager.

Changelog: [General][Added]

Reviewed By: fabriziocucci

Differential Revision: D69454101

fbshipit-source-id: c210647deffeb01b7db8aa07266e58c42acf14ba
2025-02-11 07:11:18 -08:00
Fabrizio CucciandFacebook GitHub Bot aaa72799e2 Add changelog entry for v0.78.0-rc.4 (#49326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49326

As per title.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69458244

fbshipit-source-id: 12fdc52ab578cd16e91207de76bc827b534a8635
2025-02-11 06:46:16 -08:00
Ruslan LesiutinandFacebook GitHub Bot 0aefeb06d2 Update debugger-frontend from 0db2088...3adf51a (#49299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49299

Changelog: [Internal] - Update `react-native/debugger-frontend` from 0db2088...3adf51a

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/0db20882e348e426a298417ef8ab1b379ad2ef6e...3adf51aa915c2deb26f5d373751a15b4d0c8f259).

Reviewed By: huntie

Differential Revision: D69387439

fbshipit-source-id: e8cf7e4d9e9faca99187a19943b2549e6b6214ad
2025-02-11 06:38:14 -08:00
Ruslan LesiutinandFacebook GitHub Bot 999f99b41f Update debugger-frontend from d126cc8...0db2088 (#49267)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49267

Changelog: [Internal] - Update `react-native/debugger-frontend` from d126cc8...0db2088

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/d126cc87f2b61e12e9579ddbfd4c0eb516bce881...0db20882e348e426a298417ef8ab1b379ad2ef6e).

Reviewed By: robhogan

Differential Revision: D69307173

fbshipit-source-id: 400f8ec259264d3a6bbea43c3ad2f02440d4294a
2025-02-11 06:38:14 -08:00
Ruslan LesiutinandFacebook GitHub Bot 5c88633035 Roll out 6.1.1 on fbsource (#49255)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49255

# Changelog:
[General] [Changed] - upgrade React DevTools to 6.1.1.

allow-large-files

Reviewed By: huntie

Differential Revision: D69302964

fbshipit-source-id: 80f7f720fc37564260435a23c9de7779ceab3668
2025-02-11 06:38:14 -08:00
Nicola CortiandFacebook GitHub Bot e6690cb4a7 Disable console logging for hermesc (#49301)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49301

The hermesc logging is extremely noisy and not relevant for the users. I'm disabling it for the task that runs metro+hermesc (only for the hermesc) part.

Changelog:
[Internal] [Changed] - Disable console logging for hermesc

Reviewed By: robhogan

Differential Revision: D69399156

fbshipit-source-id: e5f8722b33d30675aba5a8aa82c456be21254b0c
2025-02-11 06:11:08 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 444c7d4eff Allow multiple RN instances to run at the same time (#49300)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49300

With the refactor of the AppDelegate in favor ReactNativeFactory, the users can now instantiate multiple instances of react native.
However, currently, if you try to run multiple instances, the app will crash with the message:

```
libc++abi: terminating due to uncaught exception of type std::runtime_error: Feature flags cannot be overridden more than once
```

This happens also when the feature flags we would like to set are the same that we already applied. This should be an allowed scenario because reapplying the excatly same features flags should have no effect on React native and that's not the use case we want to forbid.

With this change, we are creating a static variable that checks whether we already apply that set of feature flags and it allows you to create multiple instances by keeping the same flags

## Changelog:
[iOS][Fixed] - Allow multiple RN instances to run at the same time

Reviewed By: rubennorte

Differential Revision: D69398441

fbshipit-source-id: a377c6a1402d38d66d348fa8c6a65e645973aadc
2025-02-11 05:54:39 -08:00
Jakub PiaseckiandFacebook GitHub Bot f1a3ff0dd1 Update RCTDeviceEventEmitter singleton instantiation (#49085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49085

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68953499

fbshipit-source-id: ea469813593cc4bcb746345a78c68dc7b0b4d56d
2025-02-11 05:42:24 -08:00
Jakub PiaseckiandFacebook GitHub Bot 7dbfc1099c Align EventEmitter definitions with TypeScript (#49206)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49206

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68953500

fbshipit-source-id: 0e936e8423f8792db34d6b44b1620dde5bd13a47
2025-02-11 05:42:24 -08:00
Mateo GuzmánandFacebook GitHub Bot 9612241597 Make Overflow internal (#49235)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.uimanager.style.Overflow).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.style.Overflow internal

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

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

Reviewed By: cipolleschi

Differential Revision: D69307164

Pulled By: cortinico

fbshipit-source-id: 778e36456c673e6472458c3076638eb7fd70c1de
2025-02-11 05:38:46 -08:00
zhongwuzwandFacebook GitHub Bot 62831e740c RNTester: Fixes turbo module examples error in bridgeless mode (#48362)
Summary:
In https://github.com/facebook/react-native/issues/47598 , we removed `__turboModuleProxy ` in bridgeless mode, it would produce error in rntester turbomodule examples, fix it by change `__turboModuleProxy` to `nativeModuleProxy`. RSNara can you please help to review? :)

before:
![image](https://github.com/user-attachments/assets/bf8edc50-6dbc-4465-9936-36ec9112761b)

After:
![image](https://github.com/user-attachments/assets/2d5c1546-d758-4692-a9a7-5cf195edc015)

## Changelog:

[IOS] [FIXED] - RNTester: Fixes turbo module examples error in bridgeless mode

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

Test Plan: RNTester turbomodule examples in bridgeless can work as expected.

Reviewed By: shwanton

Differential Revision: D67603884

Pulled By: cortinico

fbshipit-source-id: d905fa0535da5fde5e7ebff1d453ea761be9f42f
2025-02-11 05:28:58 -08:00
Mateo GuzmánandFacebook GitHub Bot 18992d2ebe Make ReactPackageLogger internal (#49236)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.ReactPackageLogger).

## Changelog:

[INTERNAL] - Make com.facebook.react.ReactPackageLogger internal

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

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

Reviewed By: cipolleschi

Differential Revision: D69307159

Pulled By: cortinico

fbshipit-source-id: 397be796bc9cc7acd633b461d40fcf1989708b4c
2025-02-11 04:03:09 -08:00
Samuel SuslaandFacebook GitHub Bot abb9f4f152 remove unused macros from Differentiator (#49310)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49310

changelog: [internal]

These macros were unused, let's remove them.

Reviewed By: NickGerleman

Differential Revision: D69402801

fbshipit-source-id: ac701eb3dbd942ae217725563723f3ebfecd06cc
2025-02-11 03:00:45 -08:00
Samuel SuslaandFacebook GitHub Bot 022a0fb65a extract TinyMap into internal header (#49308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49308

changelog: [internal]

move TinyMap class to its own file in internal folder.

Reviewed By: NickGerleman

Differential Revision: D69402458

fbshipit-source-id: e16d5f33ef0e704e3336cf6f13f510206d7f5e5d
2025-02-11 03:00:45 -08:00
Samuel SuslaandFacebook GitHub Bot a1ed021dc3 refactor private parts of Differentiator.h to internal files (#49307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49307

changelog: [internal]

There were parts of Differentiator that were leaking outside of "mounting" module. This diff moves them to "internal" folder and changes buck so they can't be imported from outside the module.

Reviewed By: NickGerleman

Differential Revision: D69401878

fbshipit-source-id: 8aa8c96e91b088dab4f9c8b9a5e6937e09be7eb4
2025-02-11 03:00:45 -08:00
Samuel SuslaandFacebook GitHub Bot 174a0de1e1 handle transform in view culling (#49304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49304

changelog: [internal]

View culling must take transform into account when calculating whether a frame is visible or not. This diff adds that.

Reviewed By: NickGerleman

Differential Revision: D69394909

fbshipit-source-id: 4c588a64f2c8e2d35fb7d606d26adc09d3502780
2025-02-11 03:00:45 -08:00
Ingrid WangandFacebook GitHub Bot fffd6d75b4 Suppress deprecated status bar APIs in RCTStatusBarManager (#49315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49315

Changelog: [iOS][Fixed] Suppressed iOS 13 deprecation warnings in RCTStatusBarManager

Reviewed By: NickGerleman

Differential Revision: D69334478

fbshipit-source-id: b643c52d928f95f33659a643d0cc1d7de1f65563
2025-02-10 18:44:22 -08:00
Joe VilchesandFacebook GitHub Bot f835b824f4 Ensure filterLayer, backgroundImageLayer, and backgroundColorLayer are the same size/shape as the owning View (#49278)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49278

The previous diff (https://github.com/facebook/react-native/pull/49272) fixed an issue where we used frame to get the size of a sublayer. This is problematic in that it scales things twice if a scaling transform is applied. I looked to see where else we do this and we have this problem (sometimes) with background color and filter.

To fix this in the general case I created a helper to size a layer to the same shape as the View's layer - so using bounds for the size, (0,0) for position on the frame, and cornerRadius/mask for border radius considerations. The only 3 layers that should be the exact same size are backgroundColorLayer, backgroundImageLayer, and filterLayer

Changelog: [iOS] [Fixed] - Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform

Reviewed By: jorge-cab

Differential Revision: D69321790

fbshipit-source-id: 70b5d18fa01967896b1bfffdb5684c2c907f3549
2025-02-10 17:22:14 -08:00
Joe VilchesandFacebook GitHub Bot acaf94dc21 Fix issue where scaling transform + box shadow break the shadow (#49272)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49272

Turns out bounds does not account for the proper size if a scaling transform is applied while frame does. Using the example listed in https://github.com/facebook/react-native/issues/49134, the size of the frame is the expected 240, but the size of the bounds is 200.

We had a mismatch where we use bounds everywhere in shadow image creation, but use the frame when asking for the size of the box shadow layer. What ends up happening is we have a 240x240 layer that is getting scaled again.

I refactored the shadow creation to just take a CGSize instead of a whole CALayer (which we had only used for its size anyway) so that we can be consistent with frame and bounds, and use bounds everywhere so that we only scale once.

Changelog: [iOS] [Fixed] - Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform

Reviewed By: jorge-cab

Differential Revision: D69320213

fbshipit-source-id: a913e0df91d78ec9665752acefcae755ab607ac8
2025-02-10 17:22:14 -08:00
Lauren TanandFacebook GitHub Bot 7d3fee7730 Apply fixup patch to fbsource
Summary:
Changelog: [Internal]

This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react on GitHub. Please land this patch as soon as possible, as the difference
reflected on here is already on GitHub and future changes may depend on these
changes!

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

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

GitHub Repo: facebook/react

Reviewed By: mofeiZ

Differential Revision: D69418289

fbshipit-source-id: 48636ba5bedfef7a09e0802f2a640be0417cdb7c
2025-02-10 16:18:39 -08:00
Nick GerlemanandFacebook GitHub Bot 75edf3af50 CMake "react_render_" to "react_renderer_" (#49284)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49284

All of the CMake library names in the "renderer" directory use "render" for the name, missing the last two letters of the directory name.

eye_twitch

I don't think fixing that should be breaking, since 3p libraries need to rely on the merged library anyway, so let's fix that and find/replace all these.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D69338892

fbshipit-source-id: d3b306ad0ea191728dfbacf9e2aaa12b00caa619
2025-02-10 14:32:26 -08:00
Nick GerlemanandFacebook GitHub Bot c37a2e9aa8 Disable warnings for mismatched SVC processor when enableNativeCSSParsing() (#49313)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49313

When the flag is enabled, we expect legacy native viewconfigs to add processor, where SVCs do not, and instead parse in native. Don't emit warnings in this case.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D69337802

fbshipit-source-id: f4c354c3b7b6ecbe4a8a72a37ea6d60dcc336b67
2025-02-10 14:32:26 -08:00
Nick GerlemanandFacebook GitHub Bot 69c3c55ddb Add "enableNativeCSSParsing" feature flag (#49314)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49314

Add a flag which we will use to prefer Fabric CSS parser to ViewConfig processors. We will use this to experiment on iOS, where we are using Fabric props (until Props 2.0 for Android).

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69337803

fbshipit-source-id: e3d4faeecbadb138c0a58f3fca6dba79eb7b13fa
2025-02-10 14:32:26 -08:00
David VaccaandFacebook GitHub Bot c60f6fbb2a Make UIBlock.execute params non nullable
Summary:
Make UIBlock.execute params non nullable to avoid breaking changes for kotlin usages in OSS

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D69407325

fbshipit-source-id: 5fc01fba9baba97e21a388d02cf98d5aebb5ac20
2025-02-10 14:12:32 -08:00
Riccardo CipolleschiandFacebook GitHub Bot d4236791e2 Properly handle null values coming from JS (#49250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49250

The TurboModule System decided to ignore the Null values when they are coming to JS. However, in iOS, null value can be mapped to `[NSNull null];` and this value is a valid value that can be used on the native side.

In the old architecture, when the user were sending a null value from JS to a native module, the Native side was receiving the value.

In the New Architecture, the value was stripped away.

This change allow us to handle the `null` value properly in the interop layer, to restore the usage of legacy modules in the New Arch.

I also tried with a more radical approach, but several tests were crashing because some modules do not know how to handle `NSNull`.

See discussion happening here: https://github.com/invertase/react-native-firebase/issues/8144#issuecomment-2548067344

## Changelog:
[iOS][Changed] - Properly handle `null` values coming from NativeModules.

Reviewed By: sammy-SC

Differential Revision: D69301396

fbshipit-source-id: be275185e2643092f6c3dc2481fe9381bbcf69e9
2025-02-10 10:14:08 -08:00
Iwo PlazaandFacebook GitHub Bot e74246bd66 Migrate files in Libraries/PermissionsAndroid and Libraries/PushNotificationIOS to use export syntax (#49046)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49046

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates files in `Libraries/PermissionsAndroid/*.js` and `Libraries/PushNotificationIOS/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/PermissionsAndroid` and `Libraries/PushNotificationIOS` with `require` syntax has to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D68832494

fbshipit-source-id: 4c44667856f5ad76b32a27a603a6538704c3192c
2025-02-10 09:47:27 -08:00
Jakub PiaseckiandFacebook GitHub Bot d4506c30d7 Use local version of flow-api-translator when building TS types (#49294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49294

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69237317

fbshipit-source-id: 8cfffb85cbb05cd1edb18358dbdea68aac84f988
2025-02-10 08:33:12 -08:00
Samuel SuslaandFacebook GitHub Bot b8b586b649 remove unused feature flag: enableGranularShadowTreeStateReconciliation (#49292)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49292

changelog: [internal]

remove feature flag enableGranularShadowTreeStateReconciliation which was introduced in August 2023 and isn't rolled out.

Reviewed By: rshest

Differential Revision: D69393016

fbshipit-source-id: a1730f9811b1d8476d845e0303647b4d85f6b4a0
2025-02-10 08:08:35 -08:00
chrsmysandFacebook GitHub Bot e7556e921c Ensure the performance monitor stays on top of newly added views. (#49288)
Summary:
I noticed that the performance monitor UI gets hidden under newly presented UI. This change ensures that the performance monitor container is brought to the front of the window whenever stats are updated.

## Changelog:
[IOS] [FIXED] - Issue where performance monitor would be hidden under newly presented views.

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

Test Plan:
### Before

https://github.com/user-attachments/assets/b2d787a3-2fec-4863-87a6-2244d2727dee

### After

https://github.com/user-attachments/assets/0700e4af-3ca1-4e67-a5e1-19b13f6ca1c9

Reviewed By: rshest, cipolleschi

Differential Revision: D69394527

Pulled By: javache

fbshipit-source-id: 07fc0804f765c25046bd83a5f8549084973586dc
2025-02-10 07:45:17 -08:00
zhongwuzwandFacebook GitHub Bot f2c78af56a Reland: [iOS] [Fabric] Fixes crash of dynamic color when light/dark mode changed (#49265)
Summary:
Reland https://github.com/facebook/react-native/issues/48496 .

## Changelog:

[IOS] [FIXED] - Fabric: Fixes crash of dynamic color when light/dark mode changed

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

Test Plan: RNTester -> PlatformColor example -> changed the dark/light mode in the system settings -> go back to App and pop and push the PlatformColor example, it would crash:

Reviewed By: javache

Differential Revision: D69309825

Pulled By: cipolleschi

fbshipit-source-id: 7a533a73ef343b071000388b653b2d1d0c54ae88
2025-02-10 06:44:43 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot b1735bc593 fix: make React native compatible with Ruby 3.4.0 (#49293)
Summary:
Hey,

This PR fixes compatibility with Ruby 3.4.0 as it removed some libraries from the standard library.

When installing pods I encountered this error:

![CleanShot 2025-02-10 at 11 26 20@2x](https://github.com/user-attachments/assets/7f7dc302-7f54-45dc-a4d9-9f011d5cc003)

After adding those dependencies, the error is gone:

![CleanShot 2025-02-10 at 11 27 01@2x](https://github.com/user-attachments/assets/386315d4-c6bd-4722-b63d-61ec1f44846f)

## Changelog:

[IOS] [FIXED] - Compatibility with Ruby 3.4.0

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

Test Plan: Install pods on Ruby 3.4

Reviewed By: vzaidman

Differential Revision: D69397346

Pulled By: cipolleschi

fbshipit-source-id: 2e29c0529e5342b8d29f2d296bd11802cb5a2885
2025-02-10 06:38:26 -08:00
Alex HuntandFacebook GitHub Bot 1cfc53bb70 Improve error log for failed open-debugger fetch (#49295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49295

Motivated by https://github.com/facebook/react-native/issues/49287.

This improves on the less useful output of "fetch failed" currently. We expect failing to make a request to the dev server (made from the dev server!) to be a rare edge case, in which case we want to log as much info as possible.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69395983

fbshipit-source-id: ee96d72ade5a887d190397c3b798a5b545152587
2025-02-10 06:01:48 -08:00
Pieter De BaetsandFacebook GitHub Bot 4e2f5bd7ea Complete rollout of shouldSkipStateUpdatesForLoopingAnimations (#49296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49296

Already fulled out by default in OSS and internally.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D69395210

fbshipit-source-id: 39b0d6f7a1a186d132d93105e360717835b442c5
2025-02-10 05:53:42 -08:00
Samuel SuslaandFacebook GitHub Bot e692ae1506 avoid copy of shadowView in Differentiator (#49268)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49268

changelog: [internal]

ShadowView has three shared_ptr and copying those can be avoided here. Let's use std::move.

Reviewed By: NickGerleman

Differential Revision: D69303346

fbshipit-source-id: b13103369f6423610dd8f8ccb293e59f04acc5dc
2025-02-10 05:01:42 -08:00
Dawid MałeckiandFacebook GitHub Bot 13f4b7619d Generate TS types for LogBox and Systrace (#49160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49160

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D69053361

fbshipit-source-id: f877efe11aa9cd29257d3ac34b040e70ec8746d5
2025-02-10 04:09:03 -08:00
kewdeandFacebook GitHub Bot 385dd59c0a perf: fast _getFreeIndex (#48925)
Summary:
The performance of `_getFreeIndex` is quite terrible since the `timersID` array can get quite large when you spawn a lot of promises or timers. We profiled our application for 28 seconds on RN 0.71.11 and noticed that the `indexOf` into this array was consuming almost a second.

The hermes version that we are using has a pretty slow  `indexOf` compared to other engines, and the static hermes will improve it by 12x but for the time being, this is a perf issue. https://github.com/facebook/hermes/pull/1447

We avoid having to use `indexOf` by maintaining a list of the free ids.

**Before - Samsung Galaxy A52 for 28 seconds of profiling**
![image](https://github.com/user-attachments/assets/e669ed62-58d8-4d11-8a85-a82816b3792d)

**After - Samsung Galaxy A52 for 28 seconds of profiling**
![image](https://github.com/user-attachments/assets/48cd369f-0887-4683-920c-43068d0228b0)

## Changelog:

[INTERNAL] [FIXED] - Improve performance of _getFreeIndex

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

Test Plan: -  Tests pass, promises resolve and reject correctly, setTimeout works as expected

Reviewed By: javache

Differential Revision: D69059102

Pulled By: cipolleschi

fbshipit-source-id: d7de2c4adcf4dfc1d15e597e2a801e23c8d652aa
2025-02-10 03:43:58 -08:00
Mateo GuzmánandFacebook GitHub Bot fd36a51456 Remove unnecessary RobolectricTestRunner usage (#49290)
Summary:
Was going through some tests and I notice several files that use `RobolectricTestRunner` unnecessarily. This PR cleans that up.

## Changelog:

[INTERNAL] - Remove unnecessary RobolectricTestRunner usage

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

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

Reviewed By: cipolleschi

Differential Revision: D69383948

Pulled By: cortinico

fbshipit-source-id: 6102319115240267ba83a086d03a850d1b7cdae5
2025-02-10 02:32:12 -08:00
Jakub PiaseckiandFacebook GitHub Bot c0415adb11 Add transform that replaces requires with imports (#49228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49228

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69247874

fbshipit-source-id: 8b4ea4b358c1c8714237e0109cf5a9492528016b
2025-02-10 01:32:35 -08:00
Rob HoganandFacebook GitHub Bot 47a21740cd Scripts: remove checked-in debugger; statements (#49289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49289

These snuck in, presumably accidentally, via https://github.com/facebook/react-native/pull/49164.

This interferes with running test suites with a debugger connected (e.g, when debugging Jest itself).

(Aside: we should probably enable [`eslint/no-debugger`](https://eslint.org/docs/latest/rules/no-debugger) to catch these)

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D69377992

fbshipit-source-id: 5d51d18be76f9b01852b2e5b7297b95452f36d55
2025-02-10 00:52:43 -08:00
David VaccaandFacebook GitHub Bot b45a3e5cd8 Introduce new BuildConfig to determine if the new architecture is fully enabled into an Android app (#49283)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49283

In this diff I'm introducing a new BuildConfig called UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE to determine if the new architecture is fully enabled into an Android app at build time, fully enabled means:
- no interop
- all view managers migrated to new API
- all native modules migrated to new API
- legacy architecture can be stripped

This BuildConfig is different from ReactNativeFeatureFlags.enableBridgelessArchitecture() because the latter is controlled at runtime, BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE is used at the build system level and it can be accessed from proguard to optimize code that's unused when the app is fully running in the new architecture. Additionally we will use the BuildConfig to assert that some classes and methods are not loaded or executed.

changelog: [Android][Changed] Introduces BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE to determine if the new architecture is fully enabled into an Android app

Reviewed By: cortinico

Differential Revision: D69206248

fbshipit-source-id: f60a059be8333d3051eb7d2efac79939a479f6f8
2025-02-09 02:17:38 -08:00
Nick GerlemanandFacebook GitHub Bot 7b7c45030b Filter function parsing (#49281)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49281

Adds `CSSFilterFunction`, decomposing to the various filter types, alongside `CSSFilterList`.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69212763

fbshipit-source-id: 8aade5ef4725aaad2548b6ef30d8aa1298803cd5
2025-02-07 18:14:42 -08:00
Nick GerlemanandFacebook GitHub Bot 8bd01c7d01 Fix incorrect tokenization of non-exponential numbers ending with "E" (#49280)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49280

We were incorrectly consuming an `E` at the end of number tokens, even if not followed by a digit, which breaks dimension tokens where the unit starts with "E", like `em`. Follow the spec the right way:

https://www.w3.org/TR/css-syntax-3/#consume-number

> If the next 2 or 3 input code points are U+0045 LATIN CAPITAL LETTER E (E) or U+0065 LATIN SMALL LETTER E (e), optionally followed by U+002D HYPHEN-MINUS (-) or U+002B PLUS SIGN (+), followed by a digit, then...

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69330975

fbshipit-source-id: a9bd5bceac9efbf02c1b7fb60659093774bb7228
2025-02-07 18:14:42 -08:00
Nick GerlemanandFacebook GitHub Bot f40d69f06d Reduce transform parsing duplication (#49279)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49279

I ended up using this same pattern for filter parsing where the logic betweeen functions is very similar. Let's deduplicate the logic for transform parsing a bit. This also separates `rotate()` and `rotateZ()` types, to be handled the same at a different layer.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69326443

fbshipit-source-id: 9bf910c6d4e07748ff032433167576f9d58cd8d6
2025-02-07 18:14:42 -08:00
Sam ZhouandFacebook GitHub Bot 722f5ba786 Remove global React$ type references (#49276)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49276

This diff replaces the remaining `React$` global types in the codebase, in preparation for their removal in Flow.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D69322418

fbshipit-source-id: 058a2489ce8e6bf59df2ec4e61e9708f63561671
2025-02-07 18:01:43 -08:00
Thomas NardoneandFacebook GitHub Bot 94b5d4b53f Flip SurfaceMountingManager null view state SoftException to not crash (#49271)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49271

This error is somewhat expected, so causing the red box error popup is a bit too disruptive.  Flip it to a no-crash exception.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D69125274

fbshipit-source-id: 0dc7ac59ac8637bdabde25bd8886b1aebf175395
2025-02-07 15:10:36 -08:00
Peter AbbondanzoandFacebook GitHub Bot 58e163c74e Replace magic number for unset child view id (#49277)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49277

Replaces the `-1` magic number representing unset children with a named constant

Changelog: [Internal]

Reviewed By: zeyap

Differential Revision: D69324509

fbshipit-source-id: 64fb6c920a7715f5d15d3955564a8bf2b6ce404a
2025-02-07 15:10:23 -08:00
David VaccaandFacebook GitHub Bot 847f8902ff Update non-codegen ViewManagerInterfaces to extend ViewManagerWithGeneratedInterface (#49274)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49274

In this diff I'm updating all the non-codegen ViewManagerInterfaces to extend ViewManagerWithGeneratedInterface to make it consistent with codenerated ViewManagerInterfaces

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D69206247

fbshipit-source-id: 6a577d9ee7410be990a03e78847333b61b429e88
2025-02-07 14:28:12 -08:00
David VaccaandFacebook GitHub Bot 6e0e72df71 Update documentation for OSSReleaseStageValue
Summary:
Update documentation for OSSReleaseStageValue

changelog: [internal] internal

Reviewed By: cortinico, alanleedev

Differential Revision: D69268799

fbshipit-source-id: 9f2fa5fc8363c5afd159f9a785d9b613548d8734
2025-02-07 13:46:51 -08:00
Thomas NardoneandFacebook GitHub Bot 83fd1742da Lazily create args in ResponseUtil (#49270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49270

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D69316855

fbshipit-source-id: 1c7f58cb9364540c5bf7309b6c2f81162efcc178
2025-02-07 12:39:11 -08:00
Rob HoganandFacebook GitHub Bot fc15260f1c Update monorepo Jest to 29.7.0 (#49261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49261

Update the version of Jest used in React Native and Metro's own tests from `^29.6.3` to `^29.7.0`

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69307514

fbshipit-source-id: 686935ed4ba1334d445217fd2f8a303b774b6c4a
2025-02-07 11:27:18 -08:00
Samuel SuslaandFacebook GitHub Bot 14540e6abf refactor Point.h and add unit tests (#49249)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49249

changelog: [internal]

- Make all Point methods inline as per [C++ core guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f5-if-a-function-is-very-small-and-time-critical-declare-it-inline).
- Add unit tests for Point.
- Use default == and != operator.

Reviewed By: javache

Differential Revision: D69239807

fbshipit-source-id: c5926d587a7888f54895cb7b1a62a23dc26242a3
2025-02-07 09:37:55 -08:00
Samuel SuslaandFacebook GitHub Bot 947d9c3897 introduce Fabric View Culling (#49198)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49198

changelog: [internal]

The work done on the main thread should scale with what is on the screen. React Native shouldn’t block the main thread for off screen elements that do not affect what is shown to the end user. When React schedules a commit, only views needed to achieve a screen full of content should be materialised and added to the host platform’s view hierarchy.

With Fabric View Culling, views that do not contribute pixels to the screen will not materialize and updates to them will be skipped. React Native will focus system resources on what is visible to the end user.

Fabric View Culling maximises benefits from view recycling. Each UI element such as text, image, or video is recycled individually. As soon as an item goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements. Such recycling reduces the need of having multiple view types and improves memory usage and scroll performance.

In the example bellow, view B will not be mounted because the user can't see it.
 {F1974949953}

The difference in number of allocated views:
Please note, the screenshots below are from Xcode View Hierarchy debugger. To show how many views are allocated in memory, I disabled [removeClippedSubviews](https://reactnative.dev/docs/scrollview#removeclippedsubviews) flag globally.
|Before|After:
| {F1974949979}| {F1974949981}

# Disclaimer, this is not a complete implementation
This implementation is not complete and it is missing to handle edge cases.
Things that are missing:
- Transform style is not taken into account.
- removeClippedSubviews is not respected. Fabric View Culling happens unconditionally for every scroll view.
- Fabric View Culling does not respect when ScrollView has overflow set to visible.
- Fabric View Culling is only performant enough on iOS.
- [enableSynchronousStateUpdates](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js#L248) must be enabled for Fabric View Culling to work correctly.

Reviewed By: javache

Differential Revision: D63458372

fbshipit-source-id: c93ec434081f2be8a446212e2c0681f8ae4e90f9
2025-02-07 09:37:55 -08:00
Samuel SuslaandFacebook GitHub Bot 68a17f2651 add getOverflowInsetFrame to LayoutMetrics (#49197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49197

changelog: [internal]

Adds new method to LayoutMetrics that calculates frame adjusted for overflow inset.

For example, for the following view hierarchy. it would produce a frame that would fully contain view A and view B.
```
┌─────────────┐
│<View A />   │
│     ┌───────┴─────┐
└─────┤<View B />   │
      │             │
      └─────────────┘
```

See tests for more details

Reviewed By: javache, lenaic

Differential Revision: D68775683

fbshipit-source-id: b8f7c42cfca7dba8dcae75cae5e6944bd1082957
2025-02-07 09:37:55 -08:00
Samuel SuslaandFacebook GitHub Bot 4fa2064905 introduce feature flag for View Culling (#49196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49196

changelog: [internal]

introduces feature flag for Fabric View Culling. Not used anywhere yet.

Reviewed By: christophpurrer

Differential Revision: D68775684

fbshipit-source-id: 612362dd142cea48f38e00e65e942bcfd8580da2
2025-02-07 09:37:55 -08:00
Alex HuntandFacebook GitHub Bot f96f1a6e11 Add signedsource and generated header to build-types (#49259)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49259

Also exclude `types_generated/` under ESLint + Prettier — paired with the removed `format` annotation.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69306215

fbshipit-source-id: f2bfbeb3ce691ebf86b63fc498ae3847873c83ee
2025-02-07 08:40:09 -08:00
Alex HuntandFacebook GitHub Bot 0d7379b9fe Tree-shake non-type imports (#49258)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49258

Updates dependency resolution in `yarn build-types` to happen after the `translateFlowToFlowDef` step. This means that we prune all non-type imports, massively reducing the input files of the program when building types only.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69302812

fbshipit-source-id: aa80bea17cb584b747cb31c003e87fe00afd1e16
2025-02-07 08:40:09 -08:00
Alex HuntandFacebook GitHub Bot a7a513fc96 Add module resolution to build-types (#49257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49257

Adds minimal dependency resolution to `yarn build-types`.

- This enables us to opt in React Native APIs by entry point, with the build script resolving all necessary dependencies. Improves correctness and removes concern of globbing paths manually.

Other notes:

- The `ActionSheetIOS.js` entry point is temporarily disabled as input; needs further work.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D69255015

fbshipit-source-id: 2d99c014b50e41e4695549f46ca874a2b546f545
2025-02-07 08:40:09 -08:00
Tim YungandFacebook GitHub Bot 5635d5c0a3 RN: Avoid Rejections in InteractionManagerStub (#49241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49241

In auditing differences between `InteractionManager` and `InteractionManagerStub` (used to evaluate to entirely remove the former all together), I noticed a behavioral disparity with how errors are handled.

In `InteractionManager`, the promise that's returned is never rejected, whereas `InteractionManagerStub` propagates errors by rejecting the promise that's returned. This changes `InteractionManagerStub` to behave like `InteractionManager` for the purpose of comparing apples-to-apples.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D69275495

fbshipit-source-id: 05439a0cadc1f76b34a3f1457f7db31d6bda2a90
2025-02-07 08:18:42 -08:00
Rob HoganandFacebook GitHub Bot 57c291bbc4 Fantom: Use hierarchical resolution within node_modules in Metro config
Summary:
Fantom was disabling Metro hierarchical lookup in all cases when `JS_DIR` is set. The intention is that `node_modules` folders other than the configured `JS_DIR/public/node_modules` are not used.

However, this leads to incorrect resolution where a transitive dependency is not hoisted. If the origin of the resolution is already inside `node_modules`, we must perform a hierarchical lookup to avoid picking up just whichever version happens to be hoisted to `node_modules` root.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69303559

fbshipit-source-id: 12068fb0bebb8c2f81b64c23b952a623cb6fd792
2025-02-07 07:52:43 -08:00
Rubén NorteandFacebook GitHub Bot 10e47e69aa ] Add Fantom test placeholder for LogBox (#49252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49252

Changelog: [internal]

This adds a Fantom test placeholder for LogBox, which shows what type of tests we could be writing for this.

It also adds a few ids in LogBox components so we can inspect them in tests and make assertions on them.

Reviewed By: javache

Differential Revision: D69301572

fbshipit-source-id: 89a332a47c300c1dc18937cd91206ce6d820b6aa
2025-02-07 07:47:32 -08:00
Rubén NorteandFacebook GitHub Bot b006080949 Expose rootTag in Root (#49251)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49251

Changelog: [internal]

Components like `AppContainer` require passing the rootTag as a prop, but we don't have access to it from Fantom unless we render something in the root and access it via the RootTagContext. This exposes the rootTag of the Root as a method so we can use it in initial render too.

Reviewed By: javache

Differential Revision: D69301571

fbshipit-source-id: 429fb56d937d3dffeb3c17a70d136ba4925ece8e
2025-02-07 07:47:32 -08:00
Rubén NorteandFacebook GitHub Bot 9a1dadf799 Introduce Fantom.dispatchNativeEvent utility (#49254)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49254

Changelog: [internal]

This is just a convenience method to do:

```
Fantom.dispatchNativeEvent(node, 'click');
```

Instead of:

```
runOnUIThread(() => {
  enqueueNativeEvent(node, 'click');
});

runWorkLoop();
```

Which is too verbose and people rarely need this level of granularity in tests.

Note that, in Fabric, we have methods called `dispatchEvent` that don't match 1:1 with this API. In that case, `dispatchEvent` is more aligned with Fantom's `enqueueNativeEvent`.

Reviewed By: javache

Differential Revision: D69302382

fbshipit-source-id: 6f71a5ace11c81f551df2c2837881dbc6f48e7ba
2025-02-07 07:47:32 -08:00
Rubén NorteandFacebook GitHub Bot 03c7316ab0 Rename dispatchNativeEvent as enqueueNativeEvent (#49253)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49253

Changelog: [internal]

Renaming this low level method as `enqueue` is more accurate in this case than `dispatch`, which is misleading because it actually doesn't dispatch it to JS.

We should also rename this in Fabric, but that's a larger and breaking change, so just making the change in Fantom for now. This is a trade-off between convenience/ergonomics of the testing API vs. alignment with the internal nomenclature. In this case we favor the first.

Reviewed By: javache

Differential Revision: D69302383

fbshipit-source-id: 7e163920ace709503367bf68baab5e9f2bf8ae3f
2025-02-07 07:47:32 -08:00
Dawid MałeckiandFacebook GitHub Bot 09740c9001 Add Share path to build-types script and align Flow with TS types (#49167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49167

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69119294

fbshipit-source-id: 5d7a10fee47da8d8ffa07f8481060d0176618ce9
2025-02-07 04:56:26 -08:00
Mateo GuzmánandFacebook GitHub Bot 2e7c84ba00 Make MultiPostprocessor internal (#49237)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.views.image.MultiPostprocessor).

## Changelog:

[INTERNAL] - Make com.facebook.react.views.image.MultiPostprocessor internal

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

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

Reviewed By: cipolleschi

Differential Revision: D69293117

Pulled By: cortinico

fbshipit-source-id: 7e2713520a5a4fe492fb9d25cdd92c46746ded40
2025-02-07 04:01:37 -08:00
Nicola CortiandFacebook GitHub Bot 5ab6e7ad3f Remove unnecessary public modifiers from ComponentNameResolver (#49231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49231

Those public modifier have no meaning as the class is internal. I'm removing them.

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D69252048

fbshipit-source-id: b51e5ac20338a01291d6cd04ee4c990cc8a6a755
2025-02-07 02:39:12 -08:00
Pieter De BaetsandFacebook GitHub Bot f25e35ae4a Revert visibility change of ReactCookieJarContainer (#49247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49247

This was incorrectly made internal in https://www.internalfb.com/diff/D66724567

Changelog: [Android][Removed] Made ReactCookieJarContainer internal.

Reviewed By: cortinico, andrewdacenko

Differential Revision: D69254203

fbshipit-source-id: 5c4ba9b4f9a8e53002df25b55f0c8762874e6736
2025-02-07 02:39:01 -08:00
Nicola CortiandFacebook GitHub Bot 2f784ce9a5 Undo a breaking change on ReactOverflowView (#49229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49229

This interface was converted to Kotlin, but the single method should have been converted to a `val`.
People kotlin consumers could call ReactOverflowView.overflow; now they need to call getOverflow().

Changelog:
[Internal] [Changed] - Undo a breaking change on ReactOverflowView

Reviewed By: NickGerleman

Differential Revision: D69250226

fbshipit-source-id: 5c7cca8c83f5c76a9cc1d254f8aa51409150c356
2025-02-07 02:10:38 -08:00
Nicola CortiandFacebook GitHub Bot 5a4962a0c1 Undo breaking change in ReactPointerEventsView due to Kotlin conversion (#49233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49233

I'm converting the function inside ReactPointerEventsView from `fun` to `val`.
This Kotlin conversion resulted in a breakign change for Kotlin consumer which I believe can be prevented
if we do this change instead.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D69252562

fbshipit-source-id: b277c6720f3156ed532bf5f2253d54cd72e38050
2025-02-07 02:07:24 -08:00
Janic DuplessisandFacebook GitHub Bot 2aed264695 Fix exclude .d.ts test in GenerateCodegenSchemaTaskTest (#49238)
Summary:
I wanted to test exclusion of .d.ts files in https://github.com/facebook/react-native/pull/49227, but it also has node_modules so it will not test that condition correctly.

## Changelog:

[INTERNAL] [FIXED] - Fix exclude .d.ts test in GenerateCodegenSchemaTaskTest

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

Test Plan: Run tests

Reviewed By: cipolleschi

Differential Revision: D69291695

Pulled By: cortinico

fbshipit-source-id: 46b9367f3466b9cd49232a0565e5778a06b43990
2025-02-07 01:55:34 -08:00
Nick GerlemanandFacebook GitHub Bot b34e63539d Disallow invalid unitless lengths in filters (#49242)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49242

Same bug as in D68740553, copy/pasted. Unitless numbers are not valid <length> apart from `0`.

Changelog:
[General][Breaking] - Disallow invalid unitless lengths in filters

Reviewed By: javache

Differential Revision: D69210768

fbshipit-source-id: c20a3aa1e9dbc84f636235a70c58e4d96dbe86b9
2025-02-06 21:02:24 -08:00
Nick GerlemanandFacebook GitHub Bot e2a776f322 transformOrigin Parsing (#49216)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49216

Should be able to replace `processTransformOrigin`.

As part of this, I discovered `processTransformOrigin` has a bug where it does not correctly support `center left` or `center right` syntax since it assumes first occurrence of `center` is for the horizontal

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69204030

fbshipit-source-id: 8001ef4f0b54fcbe93855920260e077b89669f6d
2025-02-06 21:02:24 -08:00
Nick GerlemanandFacebook GitHub Bot 36adaf4c0b Transform parsing (#49189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49189

Allow parsing the set of currently supported transform functions, and lists of them, using `CSSTranformFunction` (which may decompose to e.g. `CSSScaleX`), and `CSSTransformList`.

A bit more duplication than I would like here, but a lot of these have subtle differences.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69153280

fbshipit-source-id: ef8e93c8a49a7f1b98bd7c57614aa1c84417120d
2025-02-06 21:02:24 -08:00
Peter AbbondanzoandFacebook GitHub Bot 99212cf6f3 Backout of "[xplat/js][RN][metro][socialvr] Update monorepo Jest to 29.7.0" (#49239)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49239

Changelog: [Internal]

Reverts https://github.com/facebook/react-native/pull/49213 which is causing some internal test failures

Reviewed By: makovkastar

Differential Revision: D69266554

fbshipit-source-id: bc70286c049b90813ee7ff641adabdf98ea890e0
2025-02-06 19:20:10 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 5d4f9467d9 Add changelog for 0.75.5 (#49234)
Summary:
Add changelog for 0.75.5

## Changelog:
[Internal] - Add changelog for 0.75.5

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D69256092

Pulled By: cipolleschi

fbshipit-source-id: 946d9edabe1e808d2a916892ab1a978bd7f5855f
2025-02-06 14:40:18 -08:00
Nicola CortiandFacebook GitHub Bot 442a368af5 Remove unnecessary public modifiers from FrescoBasedReactTextInlineImageViewManager (#49230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49230

Those public modifier have no meaning as the class is internal. I'm removing them.

Changelog:
[Internal] [Changed] -

Reviewed By: tdn120

Differential Revision: D69251378

fbshipit-source-id: 4c3747510d18330dcdb8a0798e92736c4ab65a03
2025-02-06 13:32:53 -08:00
shubhamguptadream11andFacebook GitHub Bot ea876054cf feat: added new workflow for issue monitoring in react native (#49225)
Summary:
While triaging issues in the React Native repository, we face two major challenges:

- Missing Issues: The large volume of issues makes it difficult to ensure that none are overlooked.
- Ownership: There is no structured process to determine who should handle which issue.

To address these challenges, we are setting up this action.

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Added a new workflow to monitor new issue in repo.

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

Here we are using this github action: https://github.com/react-native-community/repo-monitor to monitor new issues and then notify it on specific discord server to notify someone.

Currently this action runs every 6 hours.

Requirements:
- We need following inputs to make this workflow run:
   -  `DISCORD_WEBHOOK_URL` to be added in secrets [Needed for posting message in specific channels]
   -  `role_id`: To notify a group.

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

Test Plan: NA

Reviewed By: cipolleschi

Differential Revision: D69254130

Pulled By: cortinico

fbshipit-source-id: 43a57f8f3bf161042a9432d02f292896ea8f7622
2025-02-06 13:15:29 -08:00
Janic DuplessisandFacebook GitHub Bot e9e0d8c2f7 Improve input files for codegen gradle task (#49227)
Summary:
In some projects we have conventions of using .tsx extension even for files without react components, we had issues where codegen wasn't updated properly.

I debugged the files included in a large project and made some improvements:

- Include tsx and jsx files
- exclude nested node_modules
- exclude ts type def files

## Changelog:

[ANDROID] [FIXED] - Improve input files for codegen gradle task

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

Test Plan: Tested in a large app using codegen. I inspected the files that are included in the task inputs and made sure it works with first party and 3rd party modules.

Reviewed By: cipolleschi

Differential Revision: D69254204

Pulled By: cortinico

fbshipit-source-id: 368408e9719e9b5c9839dd873430b86ae4a062c7
2025-02-06 11:52:25 -08:00
Nicola CortiandFacebook GitHub Bot a5d9044158 Fix minor typo in 0.78 changelog (#49232)
Summary:
Just a minor typo in the changelog for 0.78

## Changelog:

[Internal] [Changed] -

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

Test Plan: ¯\\_(ツ)_/¯

Reviewed By: cipolleschi

Differential Revision: D69252846

Pulled By: cortinico

fbshipit-source-id: 97010601482199c87d7a9da06e5e32a4bfa8a552
2025-02-06 11:40:10 -08:00
zhongwuzwandFacebook GitHub Bot 1e9ac296a5 Added custom load js block in bridge mode (#48845)
Summary:
`loadSourceForBridge` is broken after we refactor the appdelegate. So let's add it back.

## Changelog:

[IOS] [FIXED] - Added custom load js block in bridge mode

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

Test Plan: Custom Appdelegate's `loadSourceForBridge` can be called in bridge mode.

Reviewed By: robhogan

Differential Revision: D68832046

Pulled By: cipolleschi

fbshipit-source-id: dcea791e6d8243fdb2f45a33af175aee1a4e1223
2025-02-06 08:55:33 -08:00
Alex HuntandFacebook GitHub Bot b54efb8d0d Update multi-platform handling in build-types, add debug logs (#49224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49224

Refactor / quality pass.

- Remove `micromatch`, replace with glob ignores.
- Move and simplify platfom-specific file logic: mutate `files` as a single `Set`, reduce iterations.
    - This is reconfigured so that the input file path globs need only match `*.js` sources.
- Introduce `debug` logs and expose convenience `--debug` script flag.
- Move output error detection into inner function implementation.

Changelog: [Internal]

Metro changelog: Internal

Reviewed By: j-piasecki

Differential Revision: D69240543

fbshipit-source-id: c2faef8212a2995936362b3d33d189c405bd879d
2025-02-06 08:49:29 -08:00
Mateo GuzmánandFacebook GitHub Bot a1b05c5b86 Make SynchronousEventReceiver internal (#49218)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.uimanager.events.SynchronousEventReceiver).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.events.SynchronousEventReceiver internal

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

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

Reviewed By: javache

Differential Revision: D69242334

Pulled By: cortinico

fbshipit-source-id: 8ac7ff7d5bed43fff72233c3faa5ad9bded81ef1
2025-02-06 08:31:27 -08:00
Andrew DatsenkoandFacebook GitHub Bot 1d5cdf10fc Add .nthCalledWith and .toHaveBeenNthCalledWith (#49221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49221

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: cortinico

Differential Revision: D69133125

fbshipit-source-id: fe4e54cbb3646c154108cee6ead9a64c3e75c1b7
2025-02-06 08:02:32 -08:00
Mateo GuzmánandFacebook GitHub Bot 5506441df9 Remove unused ViewUtils object (#49219)
Summary:
As part of the initiative to reduce the public API surface, I found that this object is unused and can be removed. I've also 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+com.facebook.react.views.common.ViewUtils).

## Changelog:

[INTERNAL] - Remove unused com.facebook.react.views.common.ViewUtils object

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

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

Reviewed By: cortinico, fabriziocucci

Differential Revision: D69239590

Pulled By: javache

fbshipit-source-id: 14881f68903c8fa87966f35e6d5627e8580c9cc2
2025-02-06 07:19:07 -08:00
Mateo GuzmánandFacebook GitHub Bot 62c9ff6264 Kotlinify MessageQueueThreadPerfStats, ReactQueueConfiguration and QueueThreadExceptionHandler (#49215)
Summary:
Migrating a class holder and two remaining interfaces from com.facebook.react.bridge.queue to Kotlin

## Changelog:

[INTERNAL] - Kotlinify MessageQueueThreadPerfStats, ReactQueueConfiguration and QueueThreadExceptionHandler

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

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

Reviewed By: cipolleschi

Differential Revision: D69236832

Pulled By: cortinico

fbshipit-source-id: 765632740ce5023229d8dd2ddec4c069840c1d33
2025-02-06 07:06:17 -08:00
Rubén NorteandFacebook GitHub Bot c169250a36 Implement test.only in benchmarks (#49222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49222

Changelog: [internal]

This implements `test.only` in Fantom benchmarks, so we can focus on a specific case to speed up iteration.

Reviewed By: sammy-SC

Differential Revision: D69241220

fbshipit-source-id: 42b02fcb4d693988da4fa15a0c6bd7e90e473b9f
2025-02-06 05:50:19 -08:00
Rubén NorteandFacebook GitHub Bot 1902c3c4d5 Rename add as test in benchmarking API (#49223)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49223

Changelog: [internal]

Renames `suite.add()` as `suite.test()` for symmetry with Jest.

We'll also allow `test.only` in a following change for quick iteration.

Reviewed By: rshest

Differential Revision: D69241221

fbshipit-source-id: d141f80dc0c8e51b419ce233bca68bf0755fd356
2025-02-06 05:50:19 -08:00
Nicola CortiandFacebook GitHub Bot e96396bd18 Fix @react-native/popup-menu-android not building for 3rd party developers (#49212)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49212

Currently, developers can't use `popup-menu-android` at all because the Gradle file we publish is referencing
internal machinery.

I'm adding a pre-publish script that manipulates the Gradle. This is the easiest solution without having to do
crazy setup inside RNGP or having duplicated version codes around in the monorepo.

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

Changelog:
[Android] [Fixed] - Fix react-native/popup-menu-android not building for 3rd party developers

Reviewed By: cipolleschi

Differential Revision: D69192874

fbshipit-source-id: 9f9e8a0a6e76308e598a09f4c70dbc659c238b00
2025-02-06 05:47:37 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot ecad90ad8b fix: move view flattening props to cross platform type interface (#49220)
Summary:
Hey!

Since new architecture introduced View Flattening on iOS, props responsible for disabling this feature on specific views should be defined in cross platform interface.

Reference: https://github.com/reactwg/react-native-new-architecture/discussions/110

## Changelog:

[GENERAL] [CHANGED] - move view flattening props to cross platform type interface

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D69239454

Pulled By: javache

fbshipit-source-id: a89cb9fbaec63bbcb7691df067d5d3a375a8a66e
2025-02-06 04:12:56 -08:00
Jakub PiaseckiandFacebook GitHub Bot eae7d3c6a1 Update types exposed by Alert and the module structure (#49157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49157

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69044715

fbshipit-source-id: 05486d9c9be161a3604ef535d260f525d7c9e9d1
2025-02-06 03:59:28 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 9d4c4b2741 Fix typo in verifyReleaseOnNPM-test file (#49207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49207

Renamed `verifyReleaseOnNPM-test` to `verifyRNReleaseOnNpm-test`.

## Changelog:
[Internal] - rename a test file for CI script

Reviewed By: huntie

Differential Revision: D69183614

fbshipit-source-id: 7a2c2804617f380758a53438598bb6fe0e27e68d
2025-02-06 03:39:15 -08:00
Dawid MałeckiandFacebook GitHub Bot 5f110c416b Add Settings path to build-types script and align Flow with TS types (#49175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49175

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D69121991

fbshipit-source-id: 022d56e823aae884ce10fd24cc9701b02db19e9f
2025-02-06 03:02:42 -08:00
Nicola CortiandFacebook GitHub Bot 091f8cf506 Add changelog for 0.76.7 (#49214)
Summary:
Add changelog for 0.76.7

## Changelog:

[Internal] [Changed] -

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D69198059

Pulled By: cortinico

fbshipit-source-id: 0f9c22ad8d175d1afab4f9eb59753834b079d756
2025-02-06 02:49:48 -08:00
Rob HoganandFacebook GitHub Bot d5c1647a29 Update monorepo Jest to 29.7.0 (#49213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49213

Update the version of Jest used in React Native and Metro's own tests from `^29.6.3` to `^29.7.0`

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D69188217

fbshipit-source-id: 0748db5428e422c048454b7d129cbdd4dab6d687
2025-02-05 21:42:48 -08:00
Nick LefeverandFacebook GitHub Bot 04279cea78 Remove RSNRU feature flag after holdout cleanup (#49146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49146

Runtime Reference ShadowNode Update is enabled by default and no longer referenced in the RN holdout. This diff:
- removes the feature flag
- removes all references to the feature flag, enabling it
- updates the unit test for RSNRU

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D69061234

fbshipit-source-id: 0dab0b5cae99e83297f34645dee58ae9b3c0dc5f
2025-02-05 18:55:46 -08:00
Thomas NardoneandFacebook GitHub Bot ca5ce205f7 Add separate flags for recycling View, Text components (#49211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49211

Add more control over view recycling behavior by splitting out each component that currently supports it.

Changelog:[Android][Added] Feature flags for recycling View, Text components separately

Reviewed By: sammy-SC, mdvacca

Differential Revision: D69190841

fbshipit-source-id: 6d85fee7103bf928e4f5bf6946bab3ff4cae4053
2025-02-05 18:36:06 -08:00
Tim YungandFacebook GitHub Bot fb8a6a5bb0 Animated: Avoid In-Band State Update (#49184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49184

D65645985 shipped a refactor to `Animated`, so that it would use a custom `useAnimatedPropsMemo` instead of `useMemo`. This significantly improved update performance by no longer invalidating the `AnimatedProps` on effectively every update to `Animated` components.

However, this was measured to increase memory usage. After a few experiments, we identified that use of the in-band state update was responsible for the memory regression. While this requires further root cause investigation, this diff attempts to mitigate the memory regression.

This diff introduces a feature flag that enables an implementation that minimizes duplicated work, such as unnecessarily computing `compositeKey` or creating new instances of `AnimatedProps`. In addition, this implementation strives to do so without significantly degrading when an update is interrupted by a concurrent update.

Changelog:
[General][Changed] - Introduced a feature flag to test an optimization in `Animated` to reduce memory usage.

Reviewed By: rickhanlonii

Differential Revision: D69135223

fbshipit-source-id: a2699a314625e7570698bc41455b139711cfd7e3
2025-02-05 16:24:37 -08:00
David VaccaandFacebook GitHub Bot bdb394f754 Extend ReactNativeFeatureFlags to support prereleaseChannels (#49141)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49141

This diff extends ReactNativeFeatureFlags to support prereleaseChannels, the goal is to be able to configure what release channel each feature flag will be enabled / disabled

changelog: [internal] internal

Reviewed By: rubennorte

Differential Revision: D68583324

fbshipit-source-id: 09fde8511dcf5dff63821f15afe0a2530a0845fd
2025-02-05 13:36:21 -08:00
Mateo GuzmánandFacebook GitHub Bot dab8f6097e Make ProcessorBase internal (#49181)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.annotationprocessors.common.ProcessorBase).

## Changelog:

[INTERNAL] - Make com.facebook.annotationprocessors.common.ProcessorBase internal

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

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

Reviewed By: mdvacca

Differential Revision: D69178806

Pulled By: cortinico

fbshipit-source-id: 3f4b211fcdfdb5e0614b7d25f29879984b7ae255
2025-02-05 12:53:49 -08:00
Andrew DatsenkoandFacebook GitHub Bot 2080f64f03 Add .lastCalledWith and .toHaveBeenLastCalledWith (#49210)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49210

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: rubennorte

Differential Revision: D69131600

fbshipit-source-id: bf7a740a4e830c5ce3403d8489bc3439428ee7b4
2025-02-05 12:52:21 -08:00
Peter AbbondanzoandFacebook GitHub Bot 6c87b748f3 Remove loadVectorDrawablesOnImages feature flag (#49183)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49183

The feature has been released to all for quite some time now and the holdout group has finally been unlinked. This removes all references to the feature flag and a few indicators that the feature is enabled/disabled from RNTester

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D69146787

fbshipit-source-id: 8a7f01016a715e61541910630d8c3ceb84ec5c82
2025-02-05 11:10:29 -08:00
Andrew DatsenkoandFacebook GitHub Bot b30a5f8ab2 Add .toBeCalledWith and .toHaveBeenCalledWith (#49177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49177

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: rubennorte

Differential Revision: D69123826

fbshipit-source-id: 53c550970d1cd2434f52a400ad18c8611f187176
2025-02-05 10:51:08 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 3033aaaef1 Remove last remnant of CircleCI from comments (#49203)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49203

There are some leftover references to CircleCI in some comments. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from comments

Reviewed By: huntie

Differential Revision: D69182573

fbshipit-source-id: ea6cfe98422527d094ad4410cdd2a1a87dd61ddb
2025-02-05 09:55:00 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 07699e5838 Remove last remnant of CircleCI from npm-utils (#49202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49202

There are some leftover references to CircleCI in these scripts. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from npm-utils scripts

Reviewed By: huntie

Differential Revision: D69182550

fbshipit-source-id: d8707abba3e01c26c8d7170522333dcbc039c19d
2025-02-05 09:55:00 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 1dd464d84e Remove last remnant of CircleCI from CI scripts (#49201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49201

There are some leftover references to CircleCI in these scripts. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from CI scripts

Reviewed By: huntie

Differential Revision: D69182535

fbshipit-source-id: 4e825b65b5f5ca6ce16f5c7ac2f79088cf2d1ace
2025-02-05 09:55:00 -08:00
Andrew DatsenkoandFacebook GitHub Bot 33ff0c4789 Update toBeCalled and toBeCalledTimes aliases (#49200)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49200

Changelog: [Internal]
Update to `toBeCalled` and `toBeCalledTimes` aliases - forward them using prototype so number of frames matches when thrown.

Reviewed By: rubennorte

Differential Revision: D69182276

fbshipit-source-id: c20469959dc2e0f5c3686c90e27cd80117ad5fb7
2025-02-05 08:26:50 -08:00
Jakub PiaseckiandFacebook GitHub Bot 289bdb6b1b Enable TypeScript generation for ToastAndroid (#49095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49095

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68958757

fbshipit-source-id: 3e06201936e2beda4d6a0e591dcd4a619b169795
2025-02-05 08:15:17 -08:00
Jakub PiaseckiandFacebook GitHub Bot 43f07ae9a5 Update common interface shadowing for type generation (#49205)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49205

Changelog: [Internal]

Updates how name shadowing works for the TS type generation prototype to align more with how Flow does it - `.js.flow` files shadow every other file with the same name, then `.js` file (if exists) is treated as the common interface.

The script still uses `.flow.js` for common interface, which will be changed in another diff.

Reviewed By: huntie

Differential Revision: D68958772

fbshipit-source-id: caa390711f2bcd7666d875703fc316d874500a0d
2025-02-05 08:15:17 -08:00
Andrew DatsenkoandFacebook GitHub Bot 87bdfda020 Add .toContain and .toContainEqual (#49178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49178

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: rubennorte

Differential Revision: D69130272

fbshipit-source-id: 77f45c501444700b0839a5aa7fcff807ba70641c
2025-02-05 07:43:50 -08:00
Nicola CortiandFacebook GitHub Bot c4822419c4 Add retry to yarn-install step (#49199)
Summary:
`yarn install` is failing sporadically with a 500. This should mitigate this flakyness.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: rubennorte

Differential Revision: D69180877

Pulled By: cortinico

fbshipit-source-id: 5276e2744c73df896b4bcadfecf3db61d57d198c
2025-02-05 06:43:39 -08:00
Riccardo CipolleschiandFacebook GitHub Bot a52f5514ed Automate the check for the Release on NPM (#49164)
Summary:
One of the steps we perform when doing a release is to run `npm view react-native` to verify that the release has been published and it is available with the right tag.
As of today, we check this manually.

This change aims at automating this check so that we don't have to do it manually ourselves.

## Changelog:
[Internal] - Releases: automate the npm view check

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

Test Plan:
Created a veriftyReleaseOnNPM-tests.js jest test to verify that the script works fine.

<img width="667" alt="Screenshot 2025-02-04 at 15 18 24" src="https://github.com/user-attachments/assets/cf08155f-80da-4e15-a922-5c16f3fd806e" />

Reviewed By: cortinico

Differential Revision: D69118622

Pulled By: cipolleschi

fbshipit-source-id: a8d40cd2fcb164d8f7174de680b340510f3e8551
2025-02-05 06:33:57 -08:00
Nicola CortiandFacebook GitHub Bot bf4c887e1d Cleanup public modifiers inside LayoutDirectionUtil (#49172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49172

Those public keywords are unnecessary, let's remove them.

Changelog:
[Internal] [Changed] -

Reviewed By: NickGerleman

Differential Revision: D69120493

fbshipit-source-id: dbc46f340f33c54c1986813eb6a51f5cfec4790d
2025-02-05 06:28:29 -08:00
Nicola CortiandFacebook GitHub Bot 8b8b05cd1e Make WindowUtil internal (#49171)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49171

This makes the `WindowUtil` class internal. I've verified that there are no meaningful usages in OSS:
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+com.facebook.react.views.view.WindowUtil

Changelog:
[Internal] [Changed] -

Reviewed By: tdn120

Differential Revision: D69120492

fbshipit-source-id: ac6fe5d6a799f5eb0e572844464dc2139b5a63c9
2025-02-05 06:28:29 -08:00
Alex HuntandFacebook GitHub Bot eacd793930 Back out "Remove internal XHRInterceptor API" (#49195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49195

Reverts https://github.com/facebook/react-native/pull/49132. Turns out this is still load bearing / hard to extract.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69177405

fbshipit-source-id: 2de0270974fa8a72a006ef16b3e472287d035065
2025-02-05 06:25:26 -08:00
Mateo GuzmánandFacebook GitHub Bot 628002205c Make AndroidChoreographerProvider internal (#49182)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.internal.AndroidChoreographerProvider).

## Changelog:

[INTERNAL] - Make com.facebook.react.internal.AndroidChoreographerProvider internal

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

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

Reviewed By: javache

Differential Revision: D69176905

Pulled By: cortinico

fbshipit-source-id: 63edb5a88279a5c68f9cd5afe48bbaf88a9684ff
2025-02-05 06:23:22 -08:00
Rubén NorteandFacebook GitHub Bot 6554a99c0d Add option to enable test only mode in benchmarks (#49193)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49193

Changelog: [internal]

Adds an option to force test-only mode in Fantom benchmarks.

Reviewed By: javache

Differential Revision: D69176982

fbshipit-source-id: 97b23604961eb4ee8747b278a8439d0b0075dc07
2025-02-05 04:29:19 -08:00
Rubén NorteandFacebook GitHub Bot 95160c1e6b Fix testOnly behavior in CI (#49192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49192

Changelog: [internal]

We refactored the public API of Fantom benchmarks in https://github.com/facebook/react-native/pull/49014 but that refactor broke test only mode, as we started overriding the options after setting them. This fixes that.

Reviewed By: javache

Differential Revision: D69176983

fbshipit-source-id: 9afc2d2f27fb2ee0aa452d4b02c28531acf40b8e
2025-02-05 04:29:19 -08:00
Nick GerlemanandFacebook GitHub Bot 1def9fdbc9 Allow parsing lists of compound data types (#49188)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49188

This allows creating lists of a compound data type, storing each element as a variant of the possible types, instead of as the specified type.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69142157

fbshipit-source-id: d742d81a6517b24f24827727cd777550f2ad274f
2025-02-04 21:51:21 -08:00
Nick GerlemanandFacebook GitHub Bot 62ea6e891c react/utils/toLower (#49187)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49187

`tolower` is not `constexpr`. Share some quick utilities for char to lowercase, and case insensitive comparision that does not create new string.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69134770

fbshipit-source-id: 57a84f2d1a441e5a4c07c0db96cb6c133770fb51
2025-02-04 21:51:21 -08:00
Nick GerlemanandFacebook GitHub Bot 75097b2599 CSSCompoundDataType (#49186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49186

Next up for transforms, and for some future cases, it is convenient to be able to export a single marker type like `CSSTransform`, that can expand to a variant of multiple possible types of different shape (e.g. `CSSMatrix3D` vs `CSSScale`).

It is also best (for code size) to only have a single representation of compound types (e.g. `<CSSLength, CSSPercentage>` generates a separate copy of code compared to `<CSSPercentage, CSSLength>`).

This diff introduces `CSSCompoundDataTypes` which allows composing types, which are then flattened out to discrete types during parsing. For simplicity, `CSSCompoundDataType` cannot currently be nested inside of other `CSSCompoundDataType`, though this could be added in the future.

```
/**
 * Marker for the <length-percentage> data type
 * https://drafts.csswg.org/css-values/#mixed-percentages
 */
using CSSLengthPercentage = CSSCompoundDataType<CSSLength, CSSPercentage>;
```

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69089416

fbshipit-source-id: 8645009f06eb14b1ac4437a4fc4dd6b9ad3f88a2
2025-02-04 21:51:21 -08:00
Nicola CortiandFacebook GitHub Bot b345cecaaa Centralize yarn install to use actions/yarn-install (#49174)
Summary:
This centralizes the invocation of yarn install to be via the `actions/yarn-install`.
It will make it easier to add a retry if we want for all the `yarn install` steps in all the workflows.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D69121525

Pulled By: cortinico

fbshipit-source-id: 135da2e172cdf95b2a0ef8fd3d25996ab9317167
2025-02-04 21:12:19 -08:00
Andrew DatsenkoandFacebook GitHub Bot b0501a5be2 Add .toStrictEqual (#49176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49176

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: rubennorte

Differential Revision: D69123117

fbshipit-source-id: 11c326f7ac4df80852409a1c9d72c911ceff21f7
2025-02-04 13:52:57 -08:00
Nick GerlemanandFacebook GitHub Bot 6a683cb268 Cleanup CSSKeyword (#49155)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49155

This does some code cleanup for CSS keywords to reduce boilerplate, duplication, better isolate namespace, fix a typo, and ensure we get a warning (unused variable) if we miss handling a defined keyword.

We technically don't need `CSSKeyword` at all anymore, and don't need to overlay each keywords values to be the same, though having a pattern where each keyword set uses ordinal values from CSSKeyword forces folks to look and add the enum to the list, and include the header defining the data types for keyword sets, instead of each set looking a little magic.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69083181

fbshipit-source-id: b2764e87c2a127d73f816327c4edd45151ea8d82
2025-02-04 12:16:40 -08:00
Nick GerlemanandFacebook GitHub Bot 0cea462113 Font Variant Parsing (#49151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49151

This diff is... maybe an argument against a global list of interned keywords (it works better in some other contexts though), and this structure is likely to change later when we reintroduce what was previously `CSSPropertyDescriptor` (a list of allowed keywords per property).

But... we're going to roll with this for now to replace the ViewConfig processor (which string splits) in the most over-engineered way possible.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68851566

fbshipit-source-id: 71022f051b112adc03bd182d433e3d890e6023f2
2025-02-04 12:16:40 -08:00
Nick GerlemanandFacebook GitHub Bot b985831702 CSSWhitespaceSeparatedList (#49152)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49152

For parsing a variable number of whitespace separated data types.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68849561

fbshipit-source-id: be3314990d9e7c202c02deba463d79e50985c0b7
2025-02-04 12:16:40 -08:00
Nick GerlemanandFacebook GitHub Bot 68946780d0 Support parsing <shadow> (#48991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48991

This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68744811

fbshipit-source-id: bac7be0faf8cd8eee04f21651180151edeef7294
2025-02-04 12:16:40 -08:00
Nick GerlemanandFacebook GitHub Bot 1624cdb29e Fix missing handling of "inset" CSS Keyword (#48990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48990

tsia

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D68743950

fbshipit-source-id: 4c4814e3e83be92aea56992cc7d2c830edca99dd
2025-02-04 12:16:40 -08:00
Nick GerlemanandFacebook GitHub Bot f77fced5e2 CSSCommaSeparatedList (#48987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48987

Adds a data type parser for a variable number of values of a given single data type (at least 1).

E.g. `CSSCommaSeparatedList<CSSShadow>` will represent the syntax of `<shadow>#` (ie the value produced by box-shadow).

Changelog: [internal]

Reviewed By: lenaic

Differential Revision: D68738165

fbshipit-source-id: 6dd17b3da24b1c24808e49834a29a237c0115fab
2025-02-04 12:16:40 -08:00
Nick GerlemanandFacebook GitHub Bot 6482204523 CSSDataTypeParser consume() function (#48986)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48986

This adds a new `consume()` function to data type parsers which passes a raw parser. This can be used for types which are compounds of other data types, where we may want to accept more than the first token.

This will be used for shadow parsing, but also fixes a hypothetical future bug with ratios. E.g. `calc(foo) / calc(bar)` may be a valid ratio, not starting with a token. We instead just want to try to parse a number data type from the stream.

The form of parsing a preserved token + rest is removed, with the assumption that anything parsing more than a single token should use compound parsing.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68735370

fbshipit-source-id: 660e0b4a496136c8a559f4ba47bc1bd8d17aa116
2025-02-04 12:16:40 -08:00
Nick GerlemanandFacebook GitHub Bot 966f2a2983 Do not consume component value on visitor failure (#48985)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48985

This reverts some of the behavior I added in D68357624, since peeking a component value is non-obviously more expensive than manually copying the parser, and needing to peek will be a pain for flat lists of values (like for box-shadow).

Changelog: [internal]

Reviewed By: lenaic

Differential Revision: D68733518

fbshipit-source-id: 7b4a061d1649019274441ae0e82609f771dd2916
2025-02-04 12:16:40 -08:00
Andrew DatsenkoandFacebook GitHub Bot a702238bed Add .toBeFalsy and .toBeTruthy (#49169)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49169

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: rubennorte

Differential Revision: D69119852

fbshipit-source-id: dfda47dcc61f17ecbd205863d83b268005c74a83
2025-02-04 10:54:19 -08:00
Edmond ChuiandFacebook GitHub Bot 92fede1a1d report Network inspection capability to CDT frontend (#49142)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49142

Changelog: [Internal] ground work for Network panel

Report Network inspection capability from the target.

If `true`, CDT frontend will read it and enable the Network panel. See https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/146

Reviewed By: hoxyq

Differential Revision: D69059543

fbshipit-source-id: 887aef82a2b942965922323bbcdfd5cae7fad3b7
2025-02-04 09:27:50 -08:00
Ruslan LesiutinandFacebook GitHub Bot fbfb251177 Enable profiling builds identification for iOS (#49137)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49137

# Changelog: [Internal]

Similarly as D66501768, adding new `profiling` query parameter to inspector url for registering profiling fields.

Reviewed By: huntie

Differential Revision: D69057572

fbshipit-source-id: d11d88c7e5260d4ca405564d180d8a0edcb39596
2025-02-04 09:26:11 -08:00
Ruslan LesiutinandFacebook GitHub Bot 90f6e1010d Enable RCT_REMOTE_PROFILE for iOS builds with Fusebox enabled in production (#49136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49136

# Changelog: [Internal]

Same as D64110061, but for iOS.

Reviewed By: javache

Differential Revision: D69051435

fbshipit-source-id: 1294e4f19315376c7a202f493f07994b09bbe932
2025-02-04 09:26:11 -08:00
Nicola CortiandFacebook GitHub Bot e4babdd224 Make ReactYogaConfigProvider internal (#49170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49170

This makes the `ReactYogaConfigProvider` class internal. I've verified that there are no meaningful usages in OSS:
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+com.facebook.react.uimanager.ReactYogaConfigProvider

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D69120491

fbshipit-source-id: 3de342364897c09747ca724d26db437c81e235a1
2025-02-04 09:17:14 -08:00
Andrew DatsenkoandFacebook GitHub Bot e0f514d860 Add .toBeDefined and .toBeUndefined (#49168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49168

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: rubennorte

Differential Revision: D69119330

fbshipit-source-id: 2da7643cd969587b3aabe17d8c9eb405bc814b7b
2025-02-04 09:11:00 -08:00
Andrew DatsenkoandFacebook GitHub Bot 13b57781ba Add .toBeCalled and .toBeCalledTimes (#49165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49165

Changelog: [Internal]
Add missing jest expect apis

Reviewed By: rubennorte

Differential Revision: D69118825

fbshipit-source-id: bed276d8ba544b2351157052c3b37ebcc7398129
2025-02-04 08:26:06 -08:00
evanbaconandFacebook GitHub Bot 9350d6f2f5 React: Update conditional compilation for RCTKeyCommands to include only simulator and Mac Catalyst (#49154)
Summary:
Support distributing Expo Dev Clients to TestFlight. Expo Dev Clients are like custom versions of Expo Go that you can use to connect to a dev server or test remote updates with. Currently they can only be distributed through AdHoc provisioning because Apple rejects the use of private symbols. The symbols in question are used for simulator builds to support reloading when the "R" key is pressed (amongst other features). This is not imperative since there are a number of systems for reloading the app such as pressing R in the CLI window, but it's also not relevant to a physical phone where there is no keyboard.

## Changelog:

[IOS] [FIXED] - Remove private symbols for non-simulator and non-catalyst builds.

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

Test Plan:
- I built an deployed an app with this patch enabled to TestFlight to ensure the submission wouldn't fail. This can be reproduced locally with:
- `npx create-expo`
- Add the patch (ensure it's set with a `prepare` script).
- Following `eas.json`:
```json
{
  "cli": {
    "version": ">= 14.7.0",
    "appVersionSource": "remote"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "resourceClass": "large",
      "autoIncrement": true
    },
    "production": {
      "autoIncrement": true
    }
  },
  "submit": {
    "production": {},
    "development": {}
  }
}
```
-  Then building and deploying to TestFlight: `npx eas-cli@latest build -p ios -s --profile development`

Reviewed By: huntie

Differential Revision: D69106388

Pulled By: cipolleschi

fbshipit-source-id: 773a897ff5061929367b72188f06a08213c7dd46
2025-02-04 07:47:33 -08:00
Nicola CortiandFacebook GitHub Bot 55b3839183 Convert com.facebook.react.devsupport.RedBoxDialogSurfaceDelegate to Kotlin (#49091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49091

Just another Kotlin migration for the devsupport package.

Changelog:
[Internal] [Changed] -

Reviewed By: Abbondanzo

Differential Revision: D68954219

fbshipit-source-id: 4d82a8965207916acec4fa3779627b9e93bb8b10
2025-02-04 07:02:40 -08:00
Nicola CortiandFacebook GitHub Bot 95f9ca5b5b Convert com.facebook.react.devsupport.RedBoxContentView to Kotlin (#49090)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49090

Just another Kotlin migration for the devsupport package.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D68954222

fbshipit-source-id: d24ceefb1419d24546ae362a6f37625e724c658b
2025-02-04 07:02:40 -08:00
Mateo GuzmánandFacebook GitHub Bot b76895d6f4 Make BorderRadiusStyle internal (#49150)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.uimanager.style.BorderRadiusStyle).

## Changelog:

[INTERNAL] - Make com.facebook.react.uimanager.style.BorderRadiusStyle internal

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

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

Reviewed By: rshest

Differential Revision: D69111932

Pulled By: cortinico

fbshipit-source-id: 2c6fbec27140e6fef78ee3077d8a64369f56b143
2025-02-04 06:57:17 -08:00
Pieter De BaetsandFacebook GitHub Bot 64fa41a573 Default XMLHttpRequest's trackingName to null (#49161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49161

Avoid special strings, and default to null to mean undefined or unknown. This save us from bridging an unnecessary string but also makes the fallback name for logging network requests clearer.

Changelog: [Internal]

Reviewed By: bgirard

Differential Revision: D69058211

fbshipit-source-id: d83f424e0c2c23842554a8e4e616cad39719f311
2025-02-04 06:11:52 -08:00
Rubén NorteandFacebook GitHub Bot d2a6ff0c37 Add method to take a save a JS memory heap snapshot (#49125)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49125

Changelog: [internal]

This adds support for taking JS memory heap snapshots from Fantom tests via `Fantom.saveJSMemoryHeapSnapshot`. This can be used in one-off tests to do memory analysis and determine the existence of leaks:

```
// Warm up

Fantom.saveJSMemoryHeapSnapshot('/path/to/my/1.heapsnapshot');

// Do work

Fantom.saveJSMemoryHeapSnapshot('/path/to/my/2.heapsnapshot');

// Clean up

Fantom.saveJSMemoryHeapSnapshot('/path/to/my/3.heapsnapshot');
```

Load these snapshots in Chrome and select "Objects allocated between 1 and 2" in the dropdown to see the potentially leaked objects.

In the future we could introduce additional utilities to analyze the snapshots and do the detection automatically, e.g.:

```
// Warm up

const baseline = Fantom.takeJSMemoryHeapSnapshot();

// Do work

const before = Fantom.takeJSMemoryHeapSnapshot();

// Clean up

const after = Fantom.takeJSMemoryHeapSnapshot();

const leaks = findMemoryLeaks(baseline, before, after);
expect(leaks.sizeKB()).toBeLessThan(THRESHOLD);
```

Reviewed By: rshest

Differential Revision: D68953788

fbshipit-source-id: 6b3899297837c582a7b7235909d59b3e1631913d
2025-02-04 04:51:00 -08:00
Mateo GuzmánandFacebook GitHub Bot 360cbf7433 Make ResponseUtil internal (#49153)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.modules.network.ResponseUtil).

## Changelog:

[Android][Breaking] - Make com.facebook.react.modules.network.ResponseUtil internal

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

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

Reviewed By: fabriziocucci

Differential Revision: D69111691

Pulled By: javache

fbshipit-source-id: 985677316be7546d06119826bb53b78e1ae11d75
2025-02-04 04:21:27 -08:00
Mateo GuzmánandFacebook GitHub Bot 1c51b77868 Fix Android Image defaultSource runtime error (#49097)
Summary:
Fixes https://github.com/facebook/react-native/issues/49075

The Image `defaultSource` prop is causing a runtime error from 0.77 just by using it in the Image component (see error in the linked issue). This might be a regression from some changes in the prop processing logic from either https://github.com/facebook/react-native/issues/47710, https://github.com/facebook/react-native/issues/47713 or https://github.com/facebook/react-native/issues/47754.

## Changelog:

[ANDROID] [FIXED] - Fix Image defaultSource runtime error

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

Test Plan:
- Verify it doesn't throw any error on runtime anymore for Android.
- iOS behaviour should not be impacted as changes are Android specific

In the RNTester, you can use the following component:

```tsx
import * as React from 'react';
import {Image, View} from 'react-native';

function Playground() {
  return (
    <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
      <Image
        defaultSource={require('../../assets/bandaged.png')}
        source={{
          uri: 'https://i.natgeofe.com/n/548467d8-c5f1-4551-9f58-6817a8d2c45e/NationalGeographic_2572187_4x3.jpg',
        }}
        style={{width: 200, height: 200}}
      />
    </View>
  );
}
```

Also, this `defaultSource` prop is ignored in debug builds for Android ([as per the docs](https://reactnative.dev/docs/image#defaultsource)) – but I've verified we get the defaultSource as a string, which is what we expect on the native side:

<details>
<summary>Screenshot of the Android logs</summary>

![image](https://github.com/user-attachments/assets/e62ae2c3-6a93-4e44-a2d7-c913f5db2173)

</details>

Reviewed By: javache

Differential Revision: D69052723

Pulled By: cortinico

fbshipit-source-id: 2860dd4c18cefcfcbc4e39f94dfa6305f45773a3
2025-02-04 03:51:29 -08:00
Tim YungandFacebook GitHub Bot bc4dee94fe Animated: Stabilize allowlist in useAnimatedPropsMemo (#49140)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49140

Similar to the change made in `useAnimatedProps`, except for `useAnimatedPropsMemo`. (This is just split out to make the changes easier to review.)

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D69058338

fbshipit-source-id: 033853673d8fe1442b37bb0c0adc7cb22557c334
2025-02-03 16:49:40 -08:00
Tim YungandFacebook GitHub Bot 5d4907dde7 Animated: Stabilize allowlist in useAnimatedProps (#49143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49143

Within the implementation of Animated, the `allowlist` value passed into `unstable_createAnimatedComponent` and `useAnimatedProps` is stable, meaning that it cannot change from commit to commit. However, this semantic is not codified because `allowlist` is a prop.

This refactors `useAnimatedProps` to be created by a new `createAnimatedPropsHook` function which accepts an `allowlist` argument, codifying that its value is stable for the lifetime of the hook returned.

This permits React to avoid checking whether `allowlist` has changed from commit to commit.

For now, I've left `useAnimatedProps` as a deprecated module that returns a hook with an empty `allowlist`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D69058336

fbshipit-source-id: dbcf4ca4e389f3682864a9794eacbe0af23659db
2025-02-03 16:49:40 -08:00
Nick GerlemanandFacebook GitHub Bot 1e5cc693fc Add equality operators to CSS data types (#48989)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48989

tsia

Also added a quick helper to CSSColor used later.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D68741768

fbshipit-source-id: e0b4c75c15891e4957c7e05a7a89820c1bea72c3
2025-02-03 16:04:07 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 8af482cc4d Add Changelog for 0.78.0-rc3 (#49147)
Summary:
Add Changelog for 0.78.0-rc3

## Changelog:
[Internal] - Add Changelog for 0.78.0-rc3

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

Test Plan: N/A

Reviewed By: NickGerleman

Differential Revision: D69069136

Pulled By: cipolleschi

fbshipit-source-id: 3314a715a82e1af5e4f907bb0f6aad2f6b9b3cd7
2025-02-03 15:31:30 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 480b2335c9 Remove circleci folder (#49121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49121

This change removes the scripts/circleci folder and the last poll-maven script which was not used.

## Changelog:
[Internal] - Remove the circleci folder script

Reviewed By: cortinico, huntie

Differential Revision: D69047603

fbshipit-source-id: a4f1f100d71d792edf42c8d4cb6a0b8d8e7e5260
2025-02-03 14:07:07 -08:00
Riccardo CipolleschiandFacebook GitHub Bot ae7175d0ab Move analisys scripts to .github folder (#49123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49123

Previously, we used to have CI workflows scripts in a `react-native/scripts/circleci` folder.
Now that we are not using CircleCI anymore, we move those scripts to the `.github/workflow-scripts` folder.

## Changelog:
[Internal] - Move ci scripts to the `.github/workflow-scripts` folder

Reviewed By: cortinico, huntie

Differential Revision: D69047581

fbshipit-source-id: 6a5d8525e526cc7521d42e2be9530deb09914fdc
2025-02-03 10:02:19 -08:00
Riccardo CipolleschiandFacebook GitHub Bot d654ae51bb Remove references from CircleCI from the release scripts (#49122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49122

This change updates the Release testing and the release scripts by removing any reference to CircleCI

## Changelog:
[Internal] - Remove CircleCI references from Release and Release testing scripts

Reviewed By: cortinico, huntie

Differential Revision: D69047479

fbshipit-source-id: 14a394b879c03cd81a8d043036c43839a38602c7
2025-02-03 10:02:19 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 870aca62de Remove references of CircleCI from the readme (#49120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49120

This change removes any reference of CircleCI from the READMEs in React Native

## Changelog
[Internal] - Remove CircleCI references

Reviewed By: cortinico, huntie

Differential Revision: D69047437

fbshipit-source-id: 602350372c1d869098be0c8da7cb3db2077474d8
2025-02-03 10:02:19 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 839eb44300 Remove CircleCI configuration (#49119)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49119

This change removes the .circleci folder and the workflow that we run on CircleCI

## Changelog:
[Internal] - Remove CircleCI config

Reviewed By: cortinico, huntie

Differential Revision: D69047483

fbshipit-source-id: 0020a4ff69d035e939e01079059ba2743aee55fe
2025-02-03 10:02:19 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 6c6d3413cf Remove CircleCI references from gradle and android (#49118)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49118

We finished the migration away from CircleCI, so we are cleaning up the codebase.

This change updates references to CircleCI from gradle.

## Changelog:
[Internal] - Remove references from CircleCI in RNGP

Reviewed By: cortinico

Differential Revision: D69047484

fbshipit-source-id: 4ab40be62e6769eb3a8f65136464eed6628d47a4
2025-02-03 10:02:19 -08:00
Nicola CortiandFacebook GitHub Bot e0da0fe710 Convert com.facebook.react.devsupport.PausedInDebuggerOverlayDialogManager to Kotlin (#49088)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49088

Just another Kotlin migration for the devsupport package.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D68954221

fbshipit-source-id: 40dd1227f6cd042b1ea47b1e5b77347a3cdcb136
2025-02-03 09:41:20 -08:00
Rubén NorteandFacebook GitHub Bot 7e12060420 Move Fantom-related specs to src/private/testing/fantom/specs (#49101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49101

Changelog: [internal]

We can move this out of the deprecated directory. Also added a `.npmignore` entry so this won't be published to npm with the package.

Reviewed By: lenaic

Differential Revision: D68896208

fbshipit-source-id: ec85236aeeabdc9abcd870f0f4c1322eeb3cc659
2025-02-03 09:15:31 -08:00
Rubén NorteandFacebook GitHub Bot 2f27327f33 Rename src/private/specs as src/private/specs_DEPRECATED (#49068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49068

Changelog: [internal]

Renamed directory to better signal it's deprecated and added README.md to clarify intent.

Reviewed By: huntie

Differential Revision: D68895998

fbshipit-source-id: 5bc70d0782194db27c27cc89cc402d99f11aafa4
2025-02-03 09:15:31 -08:00
Rubén NorteandFacebook GitHub Bot c8ecc32ece Move geometry to its own directory outside dom (#49100)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49100

Changelog: [internal]

This API isn't part of the DOM standard so can be moved out.

Reviewed By: huntie

Differential Revision: D68896484

fbshipit-source-id: 5d275beb909ce5c5ce0eddb6c6e04cf7491aa1cb
2025-02-03 09:15:31 -08:00
Alex HuntandFacebook GitHub Bot 4348a57503 Fix build-types script, align internal babel-register (#49133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49133

Follow up to D68960540.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D69053411

fbshipit-source-id: ffc8aba923aab8f4cd0d74fb61c49893ff09b6c1
2025-02-03 08:32:39 -08:00
Mateo GuzmánandFacebook GitHub Bot 1a67214a3a Make SystraceRequestListener internal (#49107)
Summary:
As part of the initiative to reduce the public API surface, this class can be internalized. I've checked there are [no relevant OSS usages](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.modules.fresco.SystraceRequestListener).

## Changelog:

[INTERNAL] - Make com.facebook.react.modules.fresco.SystraceRequestListener internal

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

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

Reviewed By: cortinico

Differential Revision: D69046100

Pulled By: javache

fbshipit-source-id: 0cb4c6eda385f458c3e4b02068ce77f2dd15af23
2025-02-03 08:15:25 -08:00
kirillzyuskoandFacebook GitHub Bot 243aecc095 fix: avoid ConcurrentModificationException (#49109)
Summary:
Fixes a `ConcurrentModificationException` when iterating over `TextWatcher` `mListeners` array.

If you open Android open source code (`TextView` class), then we can see that Android iterates with `for/n` loop (not `for/:`):

```java
    void sendAfterTextChanged(Editable text) {
        if (mListeners != null) {
            final ArrayList<TextWatcher> list = mListeners;
            final int count = list.size();
            for (int i = 0; i < count; i++) {
                list.get(i).afterTextChanged(text);
            }
        }

        notifyListeningManagersAfterTextChanged();

        hideErrorIfUnchanged();
    }
```

<hr>

We can catch the `ConcurrentModificationException` with old code, when for example we have 3 listeners:

- 0 is `EmojiTextWatcher` (seems like it's added by OS);
- 1 is `OnlyChangeIfRequiredMaskedTextChangedListener` (added by `react-native-text-input-mask`);
- 2 is a listener that attached by `react-native-keyboard-controller`.

On every afterTextChanged [input-mask-android](https://github.com/RedMadRobot/input-mask-android/tree/df452edc0c52a37e5082adcfc3d05d77b5aa34e8) [removes](https://github.com/RedMadRobot/input-mask-android/blob/df452edc0c52a37e5082adcfc3d05d77b5aa34e8/inputmask/src/main/kotlin/com/redmadrobot/inputmask/MaskedTextChangedListener.kt#L212) the listener and [adds](https://github.com/RedMadRobot/input-mask-android/blob/df452edc0c52a37e5082adcfc3d05d77b5aa34e8/inputmask/src/main/kotlin/com/redmadrobot/inputmask/MaskedTextChangedListener.kt#L231) it back.

The oversimplified version of the code can be next:

```java
public class MyClass {
    public static void main(String args[]) {
        ArrayList<Integer> mListeners = new ArrayList<>();
        mListeners.add(0);
        mListeners.add(1);
        mListeners.add(2);

        Iterator<Integer> iterator = mListeners.iterator();

        while (iterator.hasNext()) {
            Integer listener = iterator.next();

            // Check if the listener is equal to 1
            // 1 is OnlyChangeIfRequiredMaskedTextChangedListener and we simulate the behavior of this class
            if (listener == 1) {
                int i = mListeners.indexOf(listener);

                if (i >= 0) {
                    mListeners.remove(i);
                }

                // Add the removed element at the end
                mListeners.add(listener);
            }
        }

        // Print the modified list
        System.out.println(mListeners);
    }
}
```

Key points are:
- if we have only [0, 1] listener, then it works well and `ConcurrentModificationException` will not be thrown, because we modify last element;
- if we have `[0, 1, 2]` then exception will be thrown.

So in this PR I decided to re-work code to match what Android has. With `for/n` approach `ConcurrentModificationException` will not be thrown, because we don't check array immutability in this case.

More information also can be found here: https://github.com/kirillzyusko/react-native-keyboard-controller/issues/324

## Changelog:

[ANDROID] [CHANGED] - avoid `ConcurrentModificationException` when iterating over `mListeners` `TextWatcher` array

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

Reviewed By: cortinico

Differential Revision: D69050984

Pulled By: javache

fbshipit-source-id: 9c6a7a428467fa5e546d70549dfcc91d6b2e58d2
2025-02-03 07:27:58 -08:00
Alex HuntandFacebook GitHub Bot 880fd927a9 Remove internal XHRInterceptor API (#49132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49132

Follows D68780147 and D68953084. We're able to safely remove this API by relocating the implementation into the one dependent internal test call site.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D69049203

fbshipit-source-id: 82c4b15d7f6736aed21171eeec1c197d2f34b33e
2025-02-03 06:56:08 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 3bd3f101b9 Be less strict with method parsing of TurboModule Interop Layer (#49072)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49072

We have instance of apps crashing when enabling the New Architecture because of the TurboModule interop layer.

What's happening is that when the module is loaded, the TM Interop Layer tries to parse the method definition to expose them in JS. However, for some libraries in the Legacy Architecture, it is possible to define a method in Objective-C and to define a different signature in Swift.

For example, the [`RNBluetoothClassic` library](https://github.com/kenjdavidson/react-native-bluetooth-classic) defines a selector in objective-c which [has the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.m#L134-L136)

```
RCT_EXTERN_METHOD(available: (NSString *)deviceId
                  resolver: (RCTPromiseResolveBlock)resolve
                  rejecter: (RCTPromiseRejectBlock)reject)
```

And the method is inmplemented in Swift with [the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.swift#L502-L505):

```
func availableFromDevice(
        _ deviceId: String,
        resolver resolve: RCTPromiseResolveBlock,
        rejecter reject: RCTPromiseRejectBlock
    )
```

When the TurboModule interop layer tries to parse the method, it receives the `accept:resolver:rejecter:` signature, but that signature is not actually defined in as a method in the module instance, and it crashes.

This crash was not happening in the Old Architecture, which was handling this case gracefully. Notice that the specific method from the example is not working in the Old Architecture either. However, the app is not crashing in the old architecture.

This change adds the same graceful behaviors plus it adds a warning in development to notify the developer about which methods couldn't be found in the interface.

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

## Changelog:
[iOS][Fixed] - Avoid crashing the app when the InteropLayer can't find some methods in the native implementation.

Reviewed By: javache

Differential Revision: D68901734

fbshipit-source-id: 844d1bf29423d5c601b583540e86d57dfffd1428
2025-02-03 06:50:05 -08:00
Pieter De BaetsandFacebook GitHub Bot e5ba5791b2 Enable -Wundef for react-native targets (#49041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49041

Prevent the class of issues seen in D68797482 by making `#if FOO` where `FOO` is not defined an error.

Changelog: [Internal]

Reviewed By: NickGerleman, sammy-SC

Differential Revision: D68824244

fbshipit-source-id: 1291c5f2f84ecb023ba76a015716cc7c9ae0f89e
2025-02-03 06:29:28 -08:00
Pieter De BaetsandFacebook GitHub Bot 4799463435 Fix incorrect noexcept attributes (#49127)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49127

These tests are marked as noexcept, but they can indeed throw exceptions: they trigger synchronous commits, which may cause exceptions in the mounting layer.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69049587

fbshipit-source-id: 02c6187c8d0e043c9840aad9c9e4d27866898b4a
2025-02-03 06:15:36 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot ae59702f8e fix(iOS): bring back enableFixForViewCommandRace feature flag (#49126)
Summary:
As pointed out by RyanCommits the ReactNativeFactory PR removed `enableFixForViewCommandRace` feature flag by mistake. Reference: https://github.com/facebook/react-native/pull/46298/files

This PR re-adds the feature flag.

## Changelog:

[IOS] [FIXED] - Re-enable enableFixForViewCommandRace feature flag

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

Test Plan: Not needed, the feature flag was there before refactor.

Reviewed By: huntie

Differential Revision: D69049668

Pulled By: cipolleschi

fbshipit-source-id: b7bf382c76878e72619145283fa8cc2c1046b486
2025-02-03 06:12:12 -08:00
Alex HuntandFacebook GitHub Bot fb493fd72d Restore XMLHttpRequest setInterceptor API, rename as DO_NOT_USE (#49081)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49081

Follows D68780147. We are depending on this API in one internal E2E test. Rename as `__setInterceptor_DO_NOT_USE`.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D68953084

fbshipit-source-id: 66b685a90b6e7f18646752dc90892963d16f9a83
2025-02-03 05:55:53 -08:00
Jakub PiaseckiandFacebook GitHub Bot 8d90be814e Refactor ActionSheetIOS to better align with OSS types (#49094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49094

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68957719

fbshipit-source-id: 4e4738a619583000ea6fe78808d46e300428504a
2025-02-03 04:47:06 -08:00
Alex HuntandFacebook GitHub Bot 71ad6369ce Remove unused nativeNetworkInspection flag, clarify static experiment key (#49096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49096

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D68958813

fbshipit-source-id: d2222e8bcc1bc0664cf93d9017a796016ee270a2
2025-02-03 04:10:18 -08:00
Alex HuntandFacebook GitHub Bot 3cf400a51b Convert build scripts to regular Flow syntax (#49103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49103

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D68960540

fbshipit-source-id: 0ac01529eaea97db98b85b6021532092997d633b
2025-02-03 03:49:23 -08:00
Alex HuntandFacebook GitHub Bot e1575857dd Relocate babel-register script (#49102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49102

Moves this script one level up. In the next diff, will be used to support execution of scripts themselves, as well as `packages/`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D68960279

fbshipit-source-id: 7b62420c269dc1c1366ac9a827db078d34cb86c5
2025-02-03 03:49:23 -08:00
Mateo GuzmánandFacebook GitHub Bot 3a5e217df6 Add CountingOutputStream tests (#49058)
Summary:
Working on migrating some of the com.facebook.react.modules.network classes to Kotlin, I'm creating some test cases here for `CountingOutputStream` before migrating that class.

## Changelog:

[INTERNAL] - Add CountingOutputStream tests

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

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

Reviewed By: cortinico

Differential Revision: D68903427

Pulled By: rshest

fbshipit-source-id: f71926cf526a65b2434aaa762007e0b4ca5dd1a4
2025-02-03 03:43:55 -08:00
Nicola CortiandFacebook GitHub Bot bdbd0fa0ca Convert com.facebook.react.devsupport.IInspectorPackagerConnection to Kotlin (#49092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49092

Just another Kotlin migration for the devsupport package.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D68954220

fbshipit-source-id: fbdf391152578ba5cc0b0a9b303a5a6700bfdb0e
2025-02-03 01:47:18 -08:00
Nicola CortiandFacebook GitHub Bot 17f7bf3773 Convert com.facebook.react.devsupport.HMRClient to Kotlin (#49089)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49089

Just another Kotlin migration for the devsupport package.

Changelog:
[Internal] [Changed] -

Reviewed By: tdn120

Differential Revision: D68954223

fbshipit-source-id: 6dd6e33ade211a6df2eea7a8dd761cc427bfd5c3
2025-02-03 01:47:18 -08:00
Edmond ChuiandFacebook GitHub Bot e45883e44f enable Network.enable behind feature flag (#49098)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49098

Changelog: [Internal][Added] enable Network.enable behind feature flag (in preparation for Network Panel)

Respond to `Network.enable` calls. Params are currently not supported. https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-enable

Reviewed By: huntie

Differential Revision: D68959142

fbshipit-source-id: 78a195979c39b1199be2fd8f9bdcfe4fe51dd6dd
2025-01-31 19:28:45 -08:00
Nicola CortiandFacebook GitHub Bot 4523fdd932 Internalize com.facebook.react.devsupport.inspector (#49086)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49086

Making all the classes inside `com.facebook.react.devsupport.inspector` internal.
Those should have not been exposed in the first place.

I've verified that there are no usages for those clases in OSS:
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+%22import+com.facebook.react.devsupport.inspector.%22

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D68954014

fbshipit-source-id: 02e0ab566977383105d5d42336123335309cfc34
2025-01-31 12:49:45 -08:00
Intl SchedulerandFacebook GitHub Bot cc74db2bba translation auto-update for Apps/Wilde/scripts/intl-config.json on master
Summary:
Chronos Job Instance ID: 1125907955550893
Sandcastle Job Instance ID: 1654683818
allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D68971915

fbshipit-source-id: c58b74d0998bd485dcd608defee0948409a503b4
2025-01-31 12:00:18 -08:00
Thomas NardoneandFacebook GitHub Bot 7cfb19e7e3 Add ReactBuildConfig.ENABLE_PERFETTO (#48981)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48981

Add entry for this flag in ReactBuildConfig

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68725330

fbshipit-source-id: afce4093665ba0c78f4630ab412297219f65d157
2025-01-31 10:02:12 -08:00
Mateo GuzmánandFacebook GitHub Bot 491ede6404 Migrate com.facebook.react.packagerconnection interfaces to Kotlin (#49025)
Summary:
Migrate com.facebook.react.packagerconnection interfaces to Kotlin. Also, moving to `org.mockito.kotlin` instead of `org.mockito.Mockito` for JSPackagerClientTest to make it compatible with the migrated files.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.packagerconnection interfaces to Kotlin

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

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

Reviewed By: cortinico, Abbondanzo

Differential Revision: D68842336

Pulled By: tdn120

fbshipit-source-id: c3062675b5535277970fd97490720739fc748f2a
2025-01-31 09:19:52 -08:00
Alex HuntandFacebook GitHub Bot cd78f44e58 Remove unused checkForGitChanges script (#49099)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49099

Changelog: [Internal]

Reviewed By: EdmondChuiHW

Differential Revision: D68960652

fbshipit-source-id: 138e83dfedef7ea717502a1e964eb802dae678c4
2025-01-31 09:18:31 -08:00
Nicola CortiandFacebook GitHub Bot d37a8d2830 Convert com.facebook.react.devsupport.inspector to Kotlin (#49087)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49087

I'm moving the whole module to be in Kotlin and updating the BUCK file.
Those files also have 0 usages in OSS so not a breaking change.

Changelog:
[Internal] [Changed] -

Reviewed By: robhogan

Differential Revision: D68953731

fbshipit-source-id: d8238bf805661cbdd6fb070a60f3e32b44ec9832
2025-01-31 07:50:28 -08:00
Dawid MałeckiandFacebook GitHub Bot 5c2153784d Create lint rule preventing uses of CommonJS exports (#49079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49079

The rule disallows using CommonJS exports in react-native and assets/registry package.

## Changelog:
[Internal] - Created a lint rule that prevents using CommonJS exports

Reviewed By: huntie

Differential Revision: D68951212

fbshipit-source-id: 1c9a1581af951d2a876b348981f0e5a81c99109a
2025-01-31 07:13:54 -08:00
Jakub PiaseckiandFacebook GitHub Bot c3ea606660 Align TextInput types with TypeScript (#48972)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48972

Changelog: [Internal]

Align TextInput types with TypeScript definitions.

Reviewed By: huntie

Differential Revision: D68713179

fbshipit-source-id: bb36d9333e45f2a30db91a17b8698b34cd792eb6
2025-01-31 04:54:42 -08:00
Jakub PiaseckiandFacebook GitHub Bot e815fdae53 Align TextInput event types with TypeScript (#48971)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48971

Changelog: [Internal]

Mosltly align event types of TextInput components with TypeScript definitions.

Reviewed By: mellyeliu, thatmichael85

Differential Revision: D68713180

fbshipit-source-id: d8e9c0458466ef492fecf516fd58bc5459b35e26
2025-01-31 04:54:42 -08:00
Alex HuntandFacebook GitHub Bot 21541b51b3 Apply stripPrivateProperties transform to public-api-test (#49064)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49064

Update `public-api-test` to disregard all object/type members prefixed with an underscore (`_`). These are considered existing internal APIs.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68895376

fbshipit-source-id: db581df7cc37802fa5f7d3aa4d7c07514223209a
2025-01-31 04:27:13 -08:00
Rubén NorteandFacebook GitHub Bot 3d4906e7ec Optimize data structure to store listeners in EventTarget (#48964)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48964

Changelog: [internal]

This replaces the data structure used to store listeners in `EventTarget`, from a map of arrays to a map of maps.

This essentially optimizes listener registration/deregistraton at the expense of event dispatching. Given that it'll be common to have many nodes registering to events that are never dispatched, this might be the right trade-off.

* Before:

| (index) | Task name                                                             | Latency average (ns)  | Latency median (ns)    | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------------------- | --------------------- | ---------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'dispatchEvent, no bubbling, no listeners'                            | '4624.68 ± 0.49%'     | '4570.00'              | '218089 ± 0.02%'           | '218818'                  | 216232  |
| 1       | 'dispatchEvent, no bubbling, single listener'                         | '5771.34 ± 0.99%'     | '5670.00'              | '175389 ± 0.02%'           | '176367'                  | 173270  |
| 2       | 'dispatchEvent, no bubbling, multiple listeners'                      | '48207.35 ± 1.18%'    | '47290.00'             | '20964 ± 0.04%'            | '21146'                   | 20744   |
| 3       | 'dispatchEvent, bubbling, no listeners'                               | '185005.29 ± 0.16%'   | '184060.00'            | '5410 ± 0.05%'             | '5433'                    | 5406    |
| 4       | 'dispatchEvent, bubbling, single listener per target'                 | '286630.57 ± 0.11%'   | '285560.00'            | '3491 ± 0.06%'             | '3502'                    | 3489    |
| 5       | 'dispatchEvent, bubbling, multiple listeners per target'              | '4435944.62 ± 0.27%'  | '4425840.00 ± 30.00'   | '226 ± 0.12%'              | '226'                     | 1000    |
| 6       | 'addEventListener, one listener'                                      | '1734.88 ± 0.57%'     | '1670.00'              | '594938 ± 0.01%'           | '598802'                  | 576411  |
| 7       | 'addEventListener, one target, one type, multiple listeners'          | '266031.11 ± 0.68%'   | '261810.00'            | '3781 ± 0.15%'             | '3820'                    | 3759    |
| 8       | 'addEventListener, one target, multiple types, one listener per type' | '124768.56 ± 0.39%'   | '121160.00'            | '8112 ± 0.16%'             | '8254'                    | 8015    |
| 9       | 'addEventListener, one target, multiple types, multiple listeners'    | '27141326.31 ± 0.15%' | '27298945.00 ± 115.00' | '37 ± 0.15%'               | '37'                      | 1000    |
| 10      | 'addEventListener, multiple targets, one type, one listener'          | '142646.24 ± 0.49%'   | '137460.00'            | '7123 ± 0.19%'             | '7275'                    | 7011    |

* After:

| (index) | Task name                                                             | Latency average (ns)  | Latency median (ns)   | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------------------- | --------------------- | --------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'dispatchEvent, no bubbling, no listeners'                            | '4518.27 ± 0.51%'     | '4460.00'             | '223269 ± 0.02%'           | '224215'                  | 221324  |
| 1       | 'dispatchEvent, no bubbling, single listener'                         | '6563.10 ± 0.98%'     | '6450.00'             | '154311 ± 0.02%'           | '155039'                  | 152367  |
| 2       | 'dispatchEvent, no bubbling, multiple listeners'                      | '65429.69 ± 0.25%'    | '64840.00'            | '15330 ± 0.05%'            | '15423'                   | 15284   |
| 3       | 'dispatchEvent, bubbling, no listeners'                               | '181104.21 ± 0.13%'   | '180300.00'           | '5525 ± 0.05%'             | '5546'                    | 5522    |
| 4       | 'dispatchEvent, bubbling, single listener per target'                 | '367231.05 ± 0.10%'   | '366035.00 ± 5.00'    | '2724 ± 0.07%'             | '2732'                    | 2724    |
| 5       | 'dispatchEvent, bubbling, multiple listeners per target'              | '6269141.58 ± 0.24%'  | '6253275.00 ± 155.00' | '160 ± 0.11%'              | '160'                     | 1000    |
| 6       | 'addEventListener, one listener'                                      | '1665.23 ± 0.51%'     | '1610.00'             | '618122 ± 0.01%'           | '621118'                  | 600517  |
| 7       | 'addEventListener, one target, one type, multiple listeners'          | '97724.12 ± 1.34%'    | '94640.00'            | '10433 ± 0.14%'            | '10566'                   | 10233   |
| 8       | 'addEventListener, one target, multiple types, one listener per type' | '116915.60 ± 0.54%'   | '113380.00'           | '8707 ± 0.17%'             | '8820'                    | 8554    |
| 9       | 'addEventListener, one target, multiple types, multiple listeners'    | '12276537.38 ± 0.42%' | '11924070.00 ± 10.00' | '82 ± 0.35%'               | '84'                      | 1000    |
| 10      | 'addEventListener, multiple targets, one type, one listener'          | '133307.67 ± 0.58%'   | '128340.00'           | '7666 ± 0.20%'             | '7792'                    | 7502    |

Reviewed By: rshest

Differential Revision: D68671944

fbshipit-source-id: 1a555ba9400e5830b4a56cdf12fd9418cd4a2a4f
2025-01-31 04:00:31 -08:00
Rubén NorteandFacebook GitHub Bot 1f8ace8cce Expand benchmarks for EventTarget to include perf for addEventListener (#49070)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49070

Changelog: [internal]

Adds benchmarks for `addEventListener` in benchmark file for `EventTarget`.

Baseline:

| (index) | Task name                                                             | Latency average (ns)  | Latency median (ns)    | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------------------- | --------------------- | ---------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'dispatchEvent, no bubbling, no listeners'                            | '4624.68 ± 0.49%'     | '4570.00'              | '218089 ± 0.02%'           | '218818'                  | 216232  |
| 1       | 'dispatchEvent, no bubbling, single listener'                         | '5771.34 ± 0.99%'     | '5670.00'              | '175389 ± 0.02%'           | '176367'                  | 173270  |
| 2       | 'dispatchEvent, no bubbling, multiple listeners'                      | '48207.35 ± 1.18%'    | '47290.00'             | '20964 ± 0.04%'            | '21146'                   | 20744   |
| 3       | 'dispatchEvent, bubbling, no listeners'                               | '185005.29 ± 0.16%'   | '184060.00'            | '5410 ± 0.05%'             | '5433'                    | 5406    |
| 4       | 'dispatchEvent, bubbling, single listener per target'                 | '286630.57 ± 0.11%'   | '285560.00'            | '3491 ± 0.06%'             | '3502'                    | 3489    |
| 5       | 'dispatchEvent, bubbling, multiple listeners per target'              | '4435944.62 ± 0.27%'  | '4425840.00 ± 30.00'   | '226 ± 0.12%'              | '226'                     | 1000    |
| 6       | 'addEventListener, one listener'                                      | '1734.88 ± 0.57%'     | '1670.00'              | '594938 ± 0.01%'           | '598802'                  | 576411  |
| 7       | 'addEventListener, one target, one type, multiple listeners'          | '266031.11 ± 0.68%'   | '261810.00'            | '3781 ± 0.15%'             | '3820'                    | 3759    |
| 8       | 'addEventListener, one target, multiple types, one listener per type' | '124768.56 ± 0.39%'   | '121160.00'            | '8112 ± 0.16%'             | '8254'                    | 8015    |
| 9       | 'addEventListener, one target, multiple types, multiple listeners'    | '27141326.31 ± 0.15%' | '27298945.00 ± 115.00' | '37 ± 0.15%'               | '37'                      | 1000    |
| 10      | 'addEventListener, multiple targets, one type, one listener'          | '142646.24 ± 0.49%'   | '137460.00'            | '7123 ± 0.19%'             | '7275'                    | 7011    |

Reviewed By: lenaic

Differential Revision: D68708145

fbshipit-source-id: b3f2f1f9e239856dcc9d8e699edf4ed2ada404dd
2025-01-31 04:00:31 -08:00
Dawid MałeckiandFacebook GitHub Bot 4ccb2f2aa2 Add transform that strips private properties in build types script (#49060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49060

We want to hide private properties from JS public API interface. The stripPrivateProperties transform removes all private nodes of type ObjectTypeProperty, Property, PropertyDefinition and MethodDefinition. There is also a change in transforms reducer that incorporates `print` function from hermes-transform which modifies the code base on the transformed ast (transformed.mutatedCode seems to be a code before the transform operation).

## Changelog:
[Internal] -  Added transform that strips private properties in build-types script

Reviewed By: huntie

Differential Revision: D68892853

fbshipit-source-id: 5035fd4339aa6294d972e7aff0eb563f48d4c3d2
2025-01-31 02:02:08 -08:00
Nicola CortiandFacebook GitHub Bot 64c2a52ca9 Remove unnecessary public keyword (#49062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49062

Another round of cleanup for the `public` keyword that I found around.
Those are unnecessary here as those classes are `internal` and we should remove them.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D68894182

fbshipit-source-id: 6f7bac6051e17785a1bfb0d544950250429c71cb
2025-01-30 14:13:57 -08:00
Nicola CortiandFacebook GitHub Bot 9afa3596cb Make DevSettingsActivity internal (#49073)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49073

This activity should be internal as it's exposed by ReactNative's Debug Manifest.
No need to have it public. I checked that there are no OSS usages of it:

https://www.google.com/url?q=https://github.com/search?type%3Dcode%26q%3DNOT%2Bis%253Afork%2BNOT%2Borg%253Afacebook%2BNOT%2Brepo%253Areact-native-tvos%252Freact-native-tvos%2BNOT%2Brepo%253Anuagoz%252Freact-native%2BNOT%2Brepo%253A2lambda123%252Freact-native%2BNOT%2Brepo%253Apvinis%252Freact-native---investigation%2BNOT%2Brepo%253Abeanchips%252Ffacebookreactnative%2BNOT%2Brepo%253AfabOnReact%252Freact-native-notes%2BNOT%2Buser%253Ahuntie%2Bcom.facebook.react.devsupport.DevSettingsActivity&sa=D&source=editors&ust=1738261498882961&usg=AOvVaw295OXKV-8dAbdsMTY5usSx

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D68904656

fbshipit-source-id: b98b417e60a3e8ebba0c9946959ee43ea963b066
2025-01-30 12:21:54 -08:00
Alex HuntandFacebook GitHub Bot 9ba4dd81db Delete Libraries/JSInspector (#49019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49019

Removes the `JSInspector` class and its dependencies.

- This was related to the legacy `ReactCommon/inspector/` subsystem (D4021490) — which added a compat layer from JavaScriptCore to CDP for an earlier version of Chrome debugging.
- The JS components of this system (`JSInspector.js`, `NetworkAgent.js`) were added in D4021516.

`ReactCommon/inspector/` has since been deleted and these components are no longer load bearing.

- We intend to replace this logic (at least, the archaic `XHRInterceptor` behaviour, which worked at one point) with native debugger `Network` domain support in our C++ layer.

**Changes**

- Remove all modules under `Libraries/JSInspector/`.
- Remove all `XHRInterceptor` call sites.
- Remove the `JSInspector.registerAgent()` mount point in `setUpDeveloperTools.js`.
- Exclude `Libraries/Core/setUp*` from `public-api-test` (these are side-effect setup files with no exported API).

Changelog:
[General][Breaking] - Remove legacy Libraries/JSInspector modules

Reviewed By: christophpurrer

Differential Revision: D68780147

fbshipit-source-id: 3d11cc89886a91055e6b69ac6f0609c288965801
2025-01-30 11:30:05 -08:00
Jorge Cabiedes AcostaandFacebook GitHub Bot accde40e1b Fix gapbetween making backgroundColor render when width/height is 0 (#49074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49074

This used to not be noticeable when we were clipping the background even without a border, after fixing that, we got line when the width/height was 0

This is again not an issue with new Background and Border since they take a slightly different approach

Diff that caused the issue D68279400

ie.
 {F1974794589}

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68843649

fbshipit-source-id: a25ace46b604690e3385c49d6f4bb3a4163bc594
2025-01-30 11:04:19 -08:00
Vitali ZaidmanandFacebook GitHub Bot 566a45e28c adjust rntester readme to use "yarn prepare-ios" (#49067)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49067

## Changelog:

[Internal] [Fixed] - fixed rntester readme to guide users to launch the correct ios prepare command

Reviewed By: cipolleschi

Differential Revision: D68897627

fbshipit-source-id: 93d30b2728f452e27448d0ef468ee148296f2324
2025-01-30 08:45:24 -08:00
Iwo PlazaandFacebook GitHub Bot 8783196ee5 Migrate files in Libraries/EventEmitter and Libraries/Image to use export syntax (#49020)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49020

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates the `Libraries/EventEmitter/*.js` and `Libraries/Image/*.js` files to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/EventEmitter` and `Libraries/Image/*.js` with `require` syntax need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D68780876

fbshipit-source-id: bd8e702aba33878e38df6d9c89bec27e7c8df0ac
2025-01-30 07:27:03 -08:00
Rubén NorteandFacebook GitHub Bot 82cc465645 Clean up disableEventLoopOnBridgeless feature flag (#49065)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49065

Changelog: [internal]

Cleaning up the flag because it's no longer necessary.

Reviewed By: sammy-SC

Differential Revision: D68892995

fbshipit-source-id: 4e0290bfb11181dc388e6590af1b82581588b9ee
2025-01-30 07:20:52 -08:00
Iwo PlazaandFacebook GitHub Bot 4101a2f0b6 Add compat layer for react-native-codegen and processColorArray (#49063)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49063

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Updates react-native-codegen to generate ViewConfigs that are compatible with react-native both before and after the export syntax migration.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68894819

fbshipit-source-id: fca46c1b91c15e22f1e1128ce8621c05341e2fe6
2025-01-30 07:16:54 -08:00
Rubén NorteandFacebook GitHub Bot 105e3ab837 Implement additional traversal methods on ReactNativeDocument (#49013)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49013

Changelog: [internal]

Adds `Document`-specific traversal methods to `ReactNativeDocument`:
* `childElementCount`
* `children`
* `firstElementChild`
* `lastElementChild`

Reviewed By: yungsters

Differential Revision: D67693032

fbshipit-source-id: 1e3279586ece809c5c3584279c07f991cadf0fc6
2025-01-30 07:11:43 -08:00
Rubén NorteandFacebook GitHub Bot 2436e3ba84 Implement ReactNativeDocument (#49012)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49012

Changelog: [internal]

(This is internal for now, until we rollout the DOM APIs in stable).

This refines the concept of root elements from the merged proposal for [DOM Traversal & Layout APIs](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0607-dom-traversal-and-layout-apis.md).

The original proposal included a reference to have the root node in the tree as `getRootNode()` and no other methods/accessors to access it.

This makes the following changes:
* The root node is a new abstraction in React Native implementing the concept of `Document` from Web. `node.getRootNode()`, as well as `node.ownerDocument` now return instances to this node (except when the node is detached, in which case `getRootNode` returns the node itself, aligning with the spec).
* The existing root node in the shadow tree is exposed as the `documentElement` of the new document instance. It would be the first and only child of the document instance, and the topmost parent of all the host nodes rendered in the tree.

In terms of APIs:
* Implements `getRootNode` correctly, according to the specified semantics.
* Adds `ownerDocument` to the `ReadOnlyNode` interface.
* Adds the `ReactNativeDocument` interface, which extends `ReadOnlyNode` (with no new methods on its own, which will be added in a following PR).

NOTE: This is currently gated under `ReactNativeFeatureFlags.enableDOMDocumentAPI` feature flag, which is disabled by default.

Reviewed By: yungsters

Differential Revision: D67526381

fbshipit-source-id: dff3645469e7ea2b2026dbbaa94d9fd0e00291be
2025-01-30 07:11:43 -08:00
Rubén NorteandFacebook GitHub Bot 3dab9c66ba Expose new method in Fabric renderer to access root instance from root tag (#49011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49011

Changelog: [internal]

This exposes the new `getPublicInstanceFromRoot` method from the React renderer in our RN façades, preparing for the new change to implement the document interface in RN.

Reviewed By: javache

Differential Revision: D68767143

fbshipit-source-id: 9a3403f9bc1612b402305695d084497a46ee4480
2025-01-30 07:11:43 -08:00
Rubén NorteandFacebook GitHub Bot 8f7f3be9af Add support for document instance in React Native (#32260) (#49051)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49051

## Summary

We're adding support for `Document` instances in React Native (as
`ReactNativeDocument` instances) in
https://github.com/facebook/react-native/pull/49012 , which requires the
React Fabric renderer to handle its lifecycle.

This modifies the renderer to create those document instances and
associate them with the React root, and provides a new method for React
Native to access them given its containerTag / rootTag.

## How did you test this change?

Tested e2e in https://github.com/facebook/react-native/pull/49012
manually syncing these changes.

DiffTrain build for [b2357ecd8203341a3668a96d32d68dd519e5430d](https://github.com/facebook/react/commit/b2357ecd8203341a3668a96d32d68dd519e5430d)

Reviewed By: javache

Differential Revision: D68839346

fbshipit-source-id: 589ddce15d0f32ba3eab1c03306c405d38616723
2025-01-30 07:11:43 -08:00
Iwo PlazaandFacebook GitHub Bot 4d6785bdb5 Migrate LayoutAnimation and Linking libraries to use export syntax (#49021)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49021

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates files in `Libraries/LayoutAnimation/*.js` and `Libraries/Linking/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/LayoutAnimation` and `Libraries/Linking` with `require` syntax need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D68782429

fbshipit-source-id: c9ea4fadbc44587a165d311b054fcd03444842c8
2025-01-30 07:07:08 -08:00
Alex HuntandFacebook GitHub Bot 45a2d9c5a8 Delete deprecated YellowBox API (#49061)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49061

Changelog:
[General][Breaking] - Remove deprecated `YellowBox` and `console.ignoredYellowBox` APIs. Use `LogBox`.

Reviewed By: cortinico, hezi

Differential Revision: D68893550

fbshipit-source-id: 5030a20a2d1a60ca37eaf928339b8dd5d5abaa27
2025-01-30 06:49:13 -08:00
Rubén NorteandFacebook GitHub Bot 252294bc76 Improve naming for benchmark suite options (#49014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49014

Changelog: [internal]

Use better names for the Fantom benchmarking API than the ones defined in `tinybench`:
* `time` => `minDuration`
* `iterations` = `minIterations`
* `warmupTime` => `minWarmupDuration`
* `warmupIterations` => `minWarmupIterations`

Reviewed By: rshest

Differential Revision: D68710952

fbshipit-source-id: 05dc1145a72a50ea73de7ccbb08bb28d7975245f
2025-01-30 03:24:39 -08:00
Tommy NguyenandFacebook GitHub Bot ee8088b615 fix(dev-middleware): add missing invariant dependency (#49047)
Summary:
`dev-middleware` uses `invariant` but does not declare it as a dependency. Under certain hoisting scenarios, or when using pnpm, this will cause `dev-middleware` to fail while being loaded.

## Changelog:

[GENERAL] [FIXED] - add missing `invariant` dependency

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

Test Plan: n/a

Reviewed By: cortinico

Differential Revision: D68835789

Pulled By: huntie

fbshipit-source-id: 13718f4970ed55e6e062b7c2bd719be977abdd0c
2025-01-30 01:58:27 -08:00
David VaccaandFacebook GitHub Bot 40575f26d2 Internalize ReactBridge (#49049)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49049

ReactBridge can be internalize, there are no usages in OSS

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D68540710

fbshipit-source-id: ce7fe6ca52186414650dcc529c5891dc59cab51a
2025-01-29 17:32:25 -08:00
Erica KleinandFacebook GitHub Bot 04afbd90e6 Back out "Fabric: Fixes crash of dynamic color when light/dark mode changed" (#49054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49054

Original commit changeset: 01959845b742

Original Phabricator Diff: D68157559

Reviewed By: javache

Differential Revision: D68861984

fbshipit-source-id: c2e6fcf5d626447bd658b047adbb64947c2a5266
2025-01-29 15:55:32 -08:00
Rubén NorteandFacebook GitHub Bot 2c406d8b49 Remove logged errors for feature flags not implemented in native when skipNativeAPI is used (#49050)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49050

Changelog: [internal]

We added support for feature flags that don't have a native module definition so we could handle cases where the JS changes progressed faster than native ones, but we recently saw that when native catches up, the API starts logging an error through `console.error` about the native module method not being available.

That's an expected result of this feature and it's when we can clean up the code in JS, so we shouldn't be logging errors in that case.

This removes the error for them specifically.

Reviewed By: elicwhite

Differential Revision: D68843247

fbshipit-source-id: 730f3eba8c26959825cd9c3897f055a02a5f9591
2025-01-29 12:17:45 -08:00
Rubén NorteandFacebook GitHub Bot 17c34295a1 Migrate mounting tests to Fantom (#49018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49018

Changelog: [internal]

Migrates the mounting layer logs from C++ (640 lines of code) to Fantom (248 lines!!!).

This is 1:1 translation of the test.

Reviewed By: javache

Differential Revision: D67549200

fbshipit-source-id: 735fa3203cd04dd5b3b4b5174e0c96fdc2354993
2025-01-29 11:31:51 -08:00
Rubén NorteandFacebook GitHub Bot bb24ad0397 Print nativeID in debug props for Props (#49017)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49017

Changelog: [internal]

The debug string for props doesn't log `nativeID` so we can't access it in Fantom. This fixes that to simply future tests.

Reviewed By: javache

Differential Revision: D68779903

fbshipit-source-id: 9800ef2b6d173e2fc8e21d3d910139a30ae91342
2025-01-29 11:31:51 -08:00
Rubén NorteandFacebook GitHub Bot 9c521bb68c Improve format of mounting logs (#49016)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49016

Changelog: [internal]

This replaces the existing string-based logs with something more structured, and increases the coverage to properly log all operations.

As part of this work I had to refactor how we record mutations so they would be done while applying the mutations, and not before/after where necessary metadata might not be available yet/anymore.

Reviewed By: sammy-SC

Differential Revision: D67549201

fbshipit-source-id: 0bcb1642a6b3d7e704f4ee24a550d4189c406aed
2025-01-29 11:31:51 -08:00
Rubén NorteandFacebook GitHub Bot fb9b476d12 Rename getMountingLogs as takeMountingManagerLogs (#49015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49015

Changelog: [internal]

This name better reflects the fact that we're emptying the buffer when calling it.

Reviewed By: javache

Differential Revision: D67549202

fbshipit-source-id: 7523a130f26bced122acd4f50b45c2b61a39bba9
2025-01-29 11:31:51 -08:00
Christoph PurrerandFacebook GitHub Bot 67981efa14 Fix Turbo Module example in RNTester in bridgeless mode (#49028)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49028

## Changelog: [General] [Fixed]] - Fix Turbo Module example in RNTester in bridgeless mode

Reviewed By: cortinico, philIip

Differential Revision: D68810934

fbshipit-source-id: 5eab0e72fe383974fe02747acd1683a995300d4d
2025-01-29 11:06:49 -08:00
Rubén NorteandFacebook GitHub Bot a8bf742f29 Unbreak Flow
Summary:
Changelog: [internal]

Fixes broken Flow check after some files were moved.

bypass-github-export-checks

Reviewed By: elicwhite

Differential Revision: D68844033

fbshipit-source-id: edf5bc58c5ce94ef5c089998b52a4bb72a2d3997
2025-01-29 11:05:03 -08:00
Rubén NorteandFacebook GitHub Bot ea1260accb Set up test to validate refactor of XHR, FileReader and WebSocket classes to use the built-in EventTarget implementation (#48930)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48930

Changelog: [internal]

This creates new versions of `XMLHttpRequest`, `FileReader` and `WebSocket` that extend the new built-in `EventTarget` implementation, instead of the implementation from the `event-target-shim` package.

It also sets up a test to choose between the 2 implementations at runtime to verify correctness and performance. This doesn't use the RN feature flags infra because we use this flag very early on startup, before we have a chance to set overrides. We could use a native feature flag instead but it'd slow down the rollout of the test.

Reviewed By: yungsters

Differential Revision: D68625226

fbshipit-source-id: bff715c43a237b65d5a02a3fdb56f3275689ea46
2025-01-29 10:06:08 -08:00
Rubén NorteandFacebook GitHub Bot d80284c607 Make some objects read-only in event-related APIs (#49045)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49045

Changelog: [internal]

Making some objects read-only to reflect usage and allow callers to pass both read-only and writable objects.

Reviewed By: yungsters

Differential Revision: D68831136

fbshipit-source-id: e9a2d96ec0abd13f609d26d376e6da946f802011
2025-01-29 10:06:08 -08:00
Rubén NorteandFacebook GitHub Bot 4ba0e79712 Refactor NetworkOverlay to use a symbol instead of a public property in XHR (#48928)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48928

Changelog: [internal]

Just a minor change to reduce the number of Flow errors we will get when we refactor XHR soon.

Reviewed By: javache

Differential Revision: D68625224

fbshipit-source-id: e952f3f52de8081a0773ef3a01e1259c3be67a92
2025-01-29 10:06:08 -08:00
Alex HuntandFacebook GitHub Bot 389779c348 Move XHRInterceptor to src/private/inspector/ (#49023)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49023

Changelog:
[General][Breaking] - Move `XHRInterceptor` API to `src/private/`

Reviewed By: christophpurrer

Differential Revision: D68781897

fbshipit-source-id: af52f65b0f64da68a78babf326a1a9b8a1fc1d96
2025-01-29 09:56:54 -08:00
Alex HuntandFacebook GitHub Bot 0bde08fe67 Move Libraries/Inspector/ to src/private/ (#49022)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49022

These modules support the in-app Inspector Overlay.

Breaking change that's unlikely to hit any users. Unreferenced by Expo.

Changelog:
[General][Breaking] Move `Libraries/Inspector/` modules to `src/private/`

Reviewed By: cortinico

Differential Revision: D68781896

fbshipit-source-id: 8fcd72d56684319019f64a375c2e2ef317a47c13
2025-01-29 09:56:54 -08:00
Ian ElliottandFacebook GitHub Bot 9a9aa19387 Upgrade cross-spawn to 7.0.5 (#48750)
Summary:
Bump cross-spawn 7.0.5

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

Test Plan: Sandcastle

Reviewed By: huntie

Differential Revision: D68282390

Pulled By: ide-2

fbshipit-source-id: 1bc81b4fbda986c7820e214364dcc322f8729baa
2025-01-29 09:44:16 -08:00
Rubén NorteandFacebook GitHub Bot 8678d15892 Prepare ReactNativePrivateInterface for new React renderer calls to handle root/document nodes (#49010)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49010

Changelog: [internal]

This adds a stub method for `ReactNativePrivateInterface.createPublicRootInstance`, which just returns `null` for now, so we can synchronize the React renderer that will try to use it to create root instances.

Initially, this will not do anything and React will just pass the `null` value around. When we implement the document API, we will return a proper instance and React will pass it to `createPublicInstance` so we can link things at runtime.

Reviewed By: javache

Differential Revision: D68561173

fbshipit-source-id: 632a7c3523910059a1f63f35b5f0f52f5660a961
2025-01-29 09:39:49 -08:00
Rubén NorteandFacebook GitHub Bot 7cdc3d81ad Abstract away use of shadow nodes as native node references (#49009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49009

Changelog: [internal]

Native APIs so far have returned instance handles from React to reference nodes in the rendered UI tree, but now that we're adding support for the document API, this isn't sufficient to represent all types of nodes. Both for the document and for its `documentElement`, we don't have an instance handle from React that links to the node, but we're going to represent that differently.

This is a refactor so the existing methods use a mostly opaque `NativeNodeReference` type so we can implement it as a union of React instance handles and the future types we're going to introduce to support document.

Reviewed By: javache

Differential Revision: D67704855

fbshipit-source-id: 0568143d9ce39be65986e1a4b92fdaebd79e4f66
2025-01-29 09:39:49 -08:00
Rubén NorteandFacebook GitHub Bot 591b0ffc0e Add basic benchmarks for rendering views (#49008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49008

Changelog: [internal]

We're modifying some core APIs in the RN render in following diffs, so this adds a simple benchmark as a safety mechanism to verify those don't regress performance significantly.

Reviewed By: yungsters

Differential Revision: D68772175

fbshipit-source-id: 3bc446e68495dc04590b613297baa00589fb5f8d
2025-01-29 09:39:49 -08:00
Rickard ZrinskiandFacebook GitHub Bot 97cf42f979 Fix maxFontSizeMultiplier prop on Text and TextInput components in new architecture (#47614)
Summary:
The `maxFontSizeMultiplier` prop for `Text` and `TextInput` was not handled in Fabric / New Architecture as documented in https://github.com/facebook/react-native/issues/47499.

bypass-github-export-checks

## Changelog:

[GENERAL] [FIXED] - Fix `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in Fabric / New Architecture

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

Test Plan:
I have not added any automated tests for this change but try to do so if requested. I have however added examples to RN Tester for both the Text and TextInput components, as well as compared the behaviour with Paper / Old Architecture. Both on version 0.76.

Noticed now I didn't do exactly the same steps in both videos, oops! Be aware that reapplying changes made in the Settings are currently half-broken on the new architecture, thus I'm restarting the app on Android and iOS. But this issue is unrelated to my changes. I've tested on main branch and it has the same issue.

Here are comparison videos between Paper and Fabric on iOS *after* I've made my fix.

### Text
| Paper  | Fabric |
| ------------- | ------------- |
| <video src="https://github.com/user-attachments/assets/f4fd009f-aa6d-41ab-92fa-8dcf1e351ba1" /> | <video src="https://github.com/user-attachments/assets/fda42cc6-34c2-42a7-a6e2-028e7c866075" /> |

### TextInput
| Paper  | Fabric |
| ------------- | ------------- |
| <video src="https://github.com/user-attachments/assets/59b59f7b-25d2-4b5b-a8e2-d2054cc6390b" /> | <video src="https://github.com/user-attachments/assets/72068566-8f2a-4463-874c-45a6f5b63b0d" /> |

Reviewed By: Abbondanzo

Differential Revision: D65953019

Pulled By: cipolleschi

fbshipit-source-id: 90c3c7e236229e9ad9bd346941fafe4af8a9d9fc
2025-01-29 09:27:44 -08:00
Alex HuntandFacebook GitHub Bot 97ee93fd5a Add Content-Type header to dev server requests (#49042)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49042

Minor fix to align with adjacent `/open-stack-frame` call: https://fburl.com/code/o9rwbmxr.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D68830215

fbshipit-source-id: 87ef0c14bdedd34153014721b85bd24af24c1db7
2025-01-29 09:18:46 -08:00
Pieter De BaetsandFacebook GitHub Bot 26afc804b7 Error when tests finish with pending tasks (#49032)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49032

Add a native API to validate the RuntimeScheduler has no pending tasks, and automatically validate after every test that there's no pending tasks left to execute.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D68797481

fbshipit-source-id: dbbef894a57bd29eb5a033ac8aaeedef770dcba2
2025-01-29 08:49:49 -08:00
Mateo GuzmánandFacebook GitHub Bot 2f6cb8ba08 Migrate com.facebook.react.uimanager.layoutanimation interfaces to Kotlin (#49026)
Summary:
Migrate com.facebook.react.uimanager.layoutanimation interfaces to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation interfaces to Kotlin

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

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

Reviewed By: NickGerleman

Differential Revision: D68794415

Pulled By: Abbondanzo

fbshipit-source-id: 690d69e8360fb51eb0232b2ed2b4676e0d1a9ee6
2025-01-29 07:09:04 -08:00
Pieter De BaetsandFacebook GitHub Bot e4d1cf8ce9 Delete RawProps assignment operators (#49030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49030

Overwriting another RawProps object via `operator=` is rarely what we want, and these objects should be considered immutable once constructed.

This will catch issues such as D68633985

Changelog: [General][Changed] Removed `RawProps::operator=`

Reviewed By: sammy-SC

Differential Revision: D68797484

fbshipit-source-id: 766a65db1dbf4485c78007f8f69cc9426d27a943
2025-01-29 06:16:20 -08:00
Jakub PiaseckiandFacebook GitHub Bot 5d7fedacd0 Add flow definitions for Alert and align them with TypeScript (#49006)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49006

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68774525

fbshipit-source-id: 509f26b0f5f0d309502681f3228ae519689d480a
2025-01-29 05:36:53 -08:00
Jakub PiaseckiandFacebook GitHub Bot 8058aab0d6 Ignore implementation files when .flow.js file exists during type translation (#49039)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49039

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68774523

fbshipit-source-id: 07776e7e0d551e3bad5a30eff1de8a76769e5761
2025-01-29 05:36:53 -08:00
Jakub PiaseckiandFacebook GitHub Bot df6be9f665 Use alert to test type generation prototype (#49038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49038

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D68774524

fbshipit-source-id: 791da64babebc8d08f671262fa63f67aff2c0942
2025-01-29 05:36:53 -08:00
Pieter De BaetsandFacebook GitHub Bot 90c6f7eab8 Fix ScrollEvent DebugStringCovertible (#49029)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49029

This was never being compiled, because we didn't import the header that set `RN_DEBUG_STRING_CONVERTIBLE`

Will look at enabling `-Wundef` to catch these.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D68797482

fbshipit-source-id: 6a01192c799903b6f956f9b0acea94bd93183f3b
2025-01-29 05:05:04 -08:00
Nicola CortiandFacebook GitHub Bot 6307fe869f Remove unused methods from TurboModulePerfLogger (#49033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49033

Those methods are not used at all in the codebase, let's clean them up.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68826893

fbshipit-source-id: 36e2f0ae247ed72305c1d9d346c6cf32cef6f8f2
2025-01-29 05:04:27 -08:00
Nicola CortiandFacebook GitHub Bot 71d39c5cfd Migrate TurboModulePerfLogger to Kotlin + internalize it. (#49034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49034

This class was still in Java. I'm converting it to Kotlin + I'm making it internal.
As this class was inside the `com.facebook.react.internal.turbomodule.core` package,
we don't consider this a breaking change.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68826892

fbshipit-source-id: b1f7aea984ab333faea66a9e8ccbb1492767333e
2025-01-29 05:04:27 -08:00
Iwo PlazaandFacebook GitHub Bot e767dc3458 Migrate files in Libraries/Lists to export syntax (#49024)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49024

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates files in `Libraries/Lists/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/Lists` with `require` syntax may need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D68783945

fbshipit-source-id: 7563155254fed40b6fe7d280d9e040ea24a5c870
2025-01-29 04:15:30 -08:00
Ruslan LesiutinandFacebook GitHub Bot dd240edd6d Explicitly check that Debugger domain is disabled before starting Tracing (#49007)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49007

# Changelog: [Internal]

Before sending `Tracing.start`, CDT will also send `Debugger.disable`.

You don't want to hit your breakpoints when you are profiling an appplication, this is by design.

We won't just delegate this to Hermes to handle. We will explicitly check that this condition is satisfied on React Native side. This is done to avoid regression in case the implementation details will change on CDT side.

Later in D68414421, we will also check that samples JavaScript stack don't contain debugger frames. This is necessary to distinguish garbage collector frames from debugger frames, which share the same type in Hermes VM - "Suspend".

We need garbage collector frames. If debugger frame was found we would throw an error, because this is unexpected after Debugger domain was disabled.

Right now Hermes is not disabling local VM Debugger on `Debugger.disable` method - this is a known bug, which I am addressing in a stack from D68772900.

Reviewed By: huntie

Differential Revision: D68776863

fbshipit-source-id: 4346ac5eb850578265a179b5fd687539ae7d15bc
2025-01-29 03:51:58 -08:00
Nicola CortiandFacebook GitHub Bot bd050ac191 Remove unused FallbackJSBundleLoader (#49005)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49005

This is essentially dead code. Not used at all but publicly exposed.
I found no meaningful usages in OSS so this is safe to remove:
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%3Apvinis%2Freact-native---investigation+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+com.facebook.react.bridge.FallbackJSBundleLoader

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D68773273

fbshipit-source-id: 96a028cb0caf95ee899db1488dbf5ae82cc567f9
2025-01-29 03:51:35 -08:00
Fabrizio CucciandFacebook GitHub Bot 7377d57874 Add changelog entry for v0.78.0-rc.2 (#49031)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49031

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68826401

fbshipit-source-id: ce2d6d95f41d6ce9059dbbba1fecd991fbafd0f3
2025-01-29 03:44:53 -08:00
Nick GerlemanandFacebook GitHub Bot 8e2de303e3 Disallow invalid unitless lengths in box shadows (#48988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48988

The only unitless `<length>` value allowed is `0`, so most of the examples in the `processBoxShadow` unit tests are parse errors on web 🫠. Lets update the tests, and disallow these invalid values.

Changelog:
[General][Breaking] - Disallow invalid unitless lengths in box shadows

Reviewed By: jorge-cab

Differential Revision: D68740553

fbshipit-source-id: ea935819f773c5d516dd9b3367e5d2c808941c28
2025-01-28 22:47:40 -08:00
Nick GerlemanandFacebook GitHub Bot 3b5dc5626b Fix some CSSRatio Behavior (#48984)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48984

Noticed this in conjunction with another change, that I misinterpreted the ratio spec a bit. Ratios with a part less than zero are parse errors, while degenerate ratios are not (Chrome and Firefox both treat like this).

Removing usage of visitorless `consumeComponentValue()` here in preparation for next diff.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68733519

fbshipit-source-id: 9afc7b7295b067a3e1469e2f80f5c9a6bea41fae
2025-01-28 17:38:50 -08:00
Nolan O'BrienandFacebook GitHub Bot 2ed0ba0722 Improve definitions in METAXXHashUtils (#49027)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49027

Make constants more specific to `METAHash` (avoid potential conflicts) and unify the APIs with a shared attribute definition (will be used to mark these APIs as unavailable from Swift).

## Changelog:

[iOS] [Changed] - Change prime constants to have prefix in order to avoid any potential conflicts

Reviewed By: adamjernst

Differential Revision: D68790450

fbshipit-source-id: 69c8b73063cf57d6a4ec25f6cd52a906c77694f0
2025-01-28 16:35:40 -08:00
Nicola CortiandFacebook GitHub Bot d797b7aa4d Minor Kotlin cleanup (#49000)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49000

Just found those nits around while looking at the codebase.
This clears things out and should have no runtime impact.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D68768384

fbshipit-source-id: bd3a30f1792a6f662d1f5b25855c89b6d43e72bb
2025-01-28 11:37:53 -08:00
Iwo PlazaandFacebook GitHub Bot c93bd436a5 Migrate Libraries/ReactNative/*.js to use export syntax. (#48650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48650

## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.

## This diff
- Migrates the `Libraries/ReactNative/*.js` files to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).

Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/ReactNative` with `require` syntax need to be appended with '.default'.

Reviewed By: huntie

Differential Revision: D68109193

fbshipit-source-id: 3444bf6b2152f7ed72d2923149a10041d718aaf0
2025-01-28 11:21:55 -08:00
zhongwuzwandFacebook GitHub Bot cbaff1c7aa Fabric: Fixes crash of dynamic color when light/dark mode changed (#48496)
Summary:
The reason is when light/dark mode changed, the `hash` value also changed because we used `color.getColor()`. leads to size balanced break.

```
Assertion failed: (index_.size() == lru_.size()), function size, file EvictingCacheMap.h, line 439.

(lldb) bt
* thread https://github.com/facebook/react-native/issues/1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001089a9108 libsystem_kernel.dylib`__pthread_kill + 8
    frame https://github.com/facebook/react-native/issues/1: 0x0000000105de3408 libsystem_pthread.dylib`pthread_kill + 256
    frame https://github.com/facebook/react-native/issues/2: 0x000000018016c4ec libsystem_c.dylib`abort + 104
    frame https://github.com/facebook/react-native/issues/3: 0x000000018016b934 libsystem_c.dylib`__assert_rtn + 268
  * frame https://github.com/facebook/react-native/issues/4: 0x00000001073e386c React_FabricComponents`folly::EvictingCacheMap<facebook::react::AttributedString, std::__1::shared_ptr<void>, folly::HeterogeneousAccessHash<facebook::react::AttributedString, void>, folly::HeterogeneousAccessEqualTo<facebook::react::AttributedString, void>>::size(this=0x0000600003900348) const at EvictingCacheMap.h:439:5
    frame https://github.com/facebook/react-native/issues/5: 0x00000001073e34f4 React_FabricComponents`void folly::EvictingCacheMap<facebook::react::AttributedString, std::__1::shared_ptr<void>, folly::HeterogeneousAccessHash<facebook::react::AttributedString, void>, folly::HeterogeneousAccessEqualTo<facebook::react::AttributedString, void>>::setImpl<facebook::react::AttributedString>(this=0x0000600003900348, key=0x000000016b9f20a8, value=nullptr, promote=true, pruneHook=folly::EvictingCacheMap<facebook::react::AttributedString, std::__1::shared_ptr<void>, folly::HeterogeneousAccessHash<facebook::react::AttributedString, void>, folly::HeterogeneousAccessEqualTo<facebook::react::AttributedString, void> >::PruneHookCall @ 0x000000016b9f1cc8) at EvictingCacheMap.h:674:27
    frame https://github.com/facebook/react-native/issues/6: 0x00000001073deb88 React_FabricComponents`folly::EvictingCacheMap<facebook::react::AttributedString, std::__1::shared_ptr<void>, folly::HeterogeneousAccessHash<facebook::react::AttributedString, void>, folly::HeterogeneousAccessEqualTo<facebook::react::AttributedString, void>>::set(this=0x0000600003900348, key=0x000000016b9f20a8, value=ptr = 0x60000024ae20 strong=2 weak=1, promote=true, pruneHook=folly::EvictingCacheMap<facebook::react::AttributedString, std::__1::shared_ptr<void>, folly::HeterogeneousAccessHash<facebook::react::AttributedString, void>, folly::HeterogeneousAccessEqualTo<facebook::react::AttributedString, void> >::PruneHookCall @ 0x000000016b9f1d98) at EvictingCacheMap.h:346:5
    frame https://github.com/facebook/react-native/issues/7: 0x00000001073d91dc React_FabricComponents`facebook::react::SimpleThreadSafeCache<facebook::react::AttributedString, std::__1::shared_ptr<void>, 256>::get(this=0x0000600003900348, key=0x000000016b9f20a8, generator= Lambda in File RCTTextLayoutManager.mm at Line 337) const at SimpleThreadSafeCache.h:40:12
    frame https://github.com/facebook/react-native/issues/8: 0x00000001073d9058 React_FabricComponents`-[RCTTextLayoutManager _nsAttributedStringFromAttributedString:](self=0x0000600003900340, _cmd="_nsAttributedStringFromAttributedString:", attributedString=AttributedString @ 0x000000016b9f20a8) at RCTTextLayoutManager.mm:337:42
    frame https://github.com/facebook/react-native/issues/9: 0x00000001073d6378 React_FabricComponents`-[RCTTextLayoutManager drawAttributedString:paragraphAttributes:frame:drawHighlightPath:](self=0x0000600003900340, _cmd="drawAttributedString:paragraphAttributes:frame:drawHighlightPath:", attributedString=AttributedString @ 0x000000016b9f23a8, paragraphAttributes=ParagraphAttributes @ 0x000000016b9f2378, frame=(origin = (x = 0, y = 0), size = (width = 92, height = 21.666748046875)), block=0x00000001061602d0) at RCTTextLayoutManager.mm:73:56
    frame https://github.com/facebook/react-native/issues/10: 0x000000010616020c RCTFabric`-[RCTParagraphTextView drawRect:](self=0x000000012beb9dc0, _cmd="drawRect:", rect=(origin = (x = 0, y = 0.000081380208335701809), size = (width = 92, height = 21.666666666666664))) at RCTParagraphComponentView.mm:346:3
    frame https://github.com/facebook/react-native/issues/11: 0x0000000186043e60 UIKitCore`-[UIView(CALayerDelegate) drawLayer:inContext:] + 584
    frame https://github.com/facebook/react-native/issues/12: 0x000000018af40080 QuartzCore`CABackingStoreUpdate_ + 244
    frame https://github.com/facebook/react-native/issues/13: 0x000000018b0bec88 QuartzCore`invocation function for block in CA::Layer::display_() + 108
    frame https://github.com/facebook/react-native/issues/14: 0x000000018b0b5524 QuartzCore`-[CALayer _display] + 1596
    frame https://github.com/facebook/react-native/issues/15: 0x000000018b0c7e74 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 392
    frame https://github.com/facebook/react-native/issues/16: 0x000000018affca50 QuartzCore`CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464
    frame https://github.com/facebook/react-native/issues/17: 0x000000018b02b260 QuartzCore`CA::Transaction::commit() + 652
    frame https://github.com/facebook/react-native/issues/18: 0x000000018b02c7b4 QuartzCore`CA::Transaction::flush_as_runloop_observer(bool) + 68
    frame https://github.com/facebook/react-native/issues/19: 0x0000000185ad6c1c UIKitCore`_UIApplicationFlushCATransaction + 48
    frame https://github.com/facebook/react-native/issues/20: 0x0000000185a07ccc UIKitCore`__setupUpdateSequence_block_invoke_2 + 352
    frame https://github.com/facebook/react-native/issues/21: 0x000000018505d28c UIKitCore`_UIUpdateSequenceRun + 76
    frame https://github.com/facebook/react-native/issues/22: 0x0000000185a07670 UIKitCore`schedulerStepScheduledMainSection + 168
    frame https://github.com/facebook/react-native/issues/23: 0x0000000185a06aa8 UIKitCore`runloopSourceCallback + 80
    frame https://github.com/facebook/react-native/issues/24: 0x000000018041b7c4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
    frame https://github.com/facebook/react-native/issues/25: 0x000000018041b70c CoreFoundation`__CFRunLoopDoSource0 + 172
    frame https://github.com/facebook/react-native/issues/26: 0x000000018041ae70 CoreFoundation`__CFRunLoopDoSources0 + 232
    frame https://github.com/facebook/react-native/issues/27: 0x00000001804153b4 CoreFoundation`__CFRunLoopRun + 788
    frame https://github.com/facebook/react-native/issues/28: 0x0000000180414c24 CoreFoundation`CFRunLoopRunSpecific + 552
    frame https://github.com/facebook/react-native/issues/29: 0x000000019020ab10 GraphicsServices`GSEventRunModal + 160
    frame https://github.com/facebook/react-native/issues/30: 0x0000000185ad82fc UIKitCore`-[UIApplication _run] + 796
    frame https://github.com/facebook/react-native/issues/31: 0x0000000185adc4f4 UIKitCore`UIApplicationMain + 124
    frame https://github.com/facebook/react-native/issues/32: 0x0000000104521f68 RNTester.debug.dylib`main(argc=1, argv=0x000000016b9f5af8) at main.m:15:12
    frame https://github.com/facebook/react-native/issues/33: 0x00000001045b9410 dyld_sim`start_sim + 20
    frame https://github.com/facebook/react-native/issues/34: 0x0000000104796274 dyld`start + 2840
```

## Changelog:

[IOS] [FIXED] - Fabric: Fixes crash of dynamic color when light/dark mode changed

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

Test Plan:
RNTester -> PlatformColor example -> changed the dark/light mode  in the system settings -> go back to App and pop and push the PlatformColor example, it would crash:

![Simulator Screen Recording - iPhone 16 - 2025-01-05 at 15 46 08](https://github.com/user-attachments/assets/f6faaf80-ad03-49c6-9a56-b1117bdc2659)

Reviewed By: sammy-SC

Differential Revision: D68157559

Pulled By: cipolleschi

fbshipit-source-id: 01959845b742ce748186d3877b2792f0f9132ff5
2025-01-28 11:20:18 -08:00
Vitali ZaidmanandFacebook GitHub Bot ff2e40371e don't inline sourceMapURL in Debugger.scriptParsed (#49001)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49001

In {D42973408}, `Debugger.scriptParsed` was tweaked to be intercepted in `inspector-proxy`, which:
1. Rewrote the `sourceMapURL` to be relative to debugger.
2. Attempted to fetch the contents of the source map from `sourceMapURL` after re-writing again to a server-relative URL, and if successful replaced `sourceMapURL` with a base64 data URL.

1 is still needed until we have `Network.loadNetworkResource`, but 2 was only needed for frontends that did not support http fetch, and is not needed with Fusebox.

Changelog: [General][Changed] `Debugger.scriptParsed` now includes the field `sourceMapURL` as a (rewritten) remote url as opposed to base64 data url

Reviewed By: robhogan

Differential Revision: D68708899

fbshipit-source-id: 95242582c79ce4e9a573d4a3e639b0dc3290869e
2025-01-28 11:09:32 -08:00
Nicola CortiandFacebook GitHub Bot 362a191aee Convert CxxCallbackImpl to Kotlin (#49004)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49004

This just converts yet another class to Kotlin.

Changelog:
[Internal] [Changed] -

Reviewed By: tdn120

Differential Revision: D68772336

fbshipit-source-id: 428cb3a0d54bf7a22f0e4eb07268cdc27ef6f2c3
2025-01-28 11:01:59 -08:00
Iwo PlazaandFacebook GitHub Bot 156ee5bee7 Migrate StyleSheet/processColorArray.js to use export syntax (#48905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48905

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates `Libraries/StyleSheet/processColorArray.js` to use `export` syntax.
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updated View Config codegen (requires an MSDK bump).
- Updates the public API snapshot *(intented breaking change)*

Changelog:
[General][Breaking] - Files inside `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: robhogan

Differential Revision: D68564304

fbshipit-source-id: 2fbd058be1a715cccfce4f2a68146118d8ac66ad
2025-01-28 09:46:50 -08:00
Iwo PlazaandFacebook GitHub Bot aac312da8e Migrate DrawerAndroid, ProgressBarAndroid, SafeAreaView, ScrollView, TextInput, ToastAndroid, UnimplementedView and View components to export syntax (#48807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48807

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: huntie

Differential Revision: D68436127

fbshipit-source-id: e3496fe69d66932dd4ed82f41d810f3ef1f850f5
2025-01-28 09:06:57 -08:00
Ruslan LesiutinandFacebook GitHub Bot 600d814381 Update debugger-frontend from 7727db8...d126cc8 (#48979)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48979

Changelog: [Internal] - Update `react-native/debugger-frontend` from 7727db8...d126cc8

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/7727db85ac767cf41cce3e9ee54d27e97b2637f9...d126cc87f2b61e12e9579ddbfd4c0eb516bce881).

Reviewed By: huntie

Differential Revision: D68717476

fbshipit-source-id: ac2fd0551b069ae9077646ecb6b22f066e3e567c
2025-01-28 08:36:10 -08:00
Ruslan LesiutinandFacebook GitHub Bot 07860545f5 Roll out 6.1.0 on fbsource (#48963)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48963

# Changelog:
[General] [Changed] - upgrade React DevTools to 6.1.0.

allow-large-files

Reviewed By: robhogan

Differential Revision: D68705543

fbshipit-source-id: 293034cc3e4cb93fed6a05df905ee63ea5382562
2025-01-28 08:36:10 -08:00
Dawid MałeckiandFacebook GitHub Bot 89af3e804f Add explicit type for Symbol.iterator in URLSearchParams (#48999)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48999

Changelog:
[General][Changed] - Added explicit type for Symbol.iterator in URLSearchParams

Reviewed By: cortinico

Differential Revision: D68766996

fbshipit-source-id: 47aeed737134628b838e9382b04e0bb95513bee0
2025-01-28 08:07:13 -08:00
Rubén NorteandFacebook GitHub Bot c925872e72 Throw an error when calling root.render outside of a task (#49003)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49003

Changelog: [internal]

I was adding a benchmark for rendering thousands of views and it was surprisingly fast, until I realized I wasn't wrapping the call to `root.render` in `runTask`, which means the benchmark wasn't really doing the rendering, only scheduling a microtask that was never executed.

This is a safety mechanism to prevent those mistakes.

Reviewed By: sammy-SC

Differential Revision: D68771170

fbshipit-source-id: 5bd8e6ba9e1168db2320572c99b3a01ebd6aeeed
2025-01-28 07:26:23 -08:00
Cedric van PuttenandFacebook GitHub Bot 32fe244744 fix(react-native): pass the protocol from bundle URL to HMR client on Android (#48998)
Summary:
This is another attempt at fixing the Android HMR client for HTTPS proxied Metro instances. The previous one unintentionally [caused the following error](https://github.com/facebook/react-native/pull/48970#issuecomment-2617047184):

```
java.lang.AssertionError: Method overloading is unsupported: com.facebook.react.devsupport.HMRClient#setup
```

This PR removes the overloading, and only adds the `scheme` property as a parameter to the existing `.setup` method. Aligning with the exact behavior we have on iOS.

The alternative fix, which should NOT be backward breaking (if this is) - is to move this "infer the protocol from the bundle URL" to the JS side of the HMR client. Where we don't just always default to `http`, but instead default to `https IF port === 443, otherwise http`. It's a bit more hacky, but shouldn't cause any other issues. _**Ideally**_, we have the same working behavior on both Android and iOS without workarounds.

<details><summary>Alternative workaround</summary>

See [this change](https://github.com/facebook/react-native/compare/main...byCedric:react-native:patch-2).

<img width="1179" alt="image" src="https://github.com/user-attachments/assets/47c365bc-6df8-43e6-ad7d-5a667e350cd4" />

</details>

See full explanation on https://github.com/facebook/react-native/issues/48970

> We've noticed that the HMR on Android doesn't seem to be connecting when using a HTTPS-proxied Metro instance, where the proxy is hosted through Cloudflare. This is only an issue on Android - not iOS - and likely caused by the HMR Client not being set up properly on Android.
>
>- On Android, we run `.setup('android', <bundleEntryPath>, <proxiedMetroHost>, <proxiedMetroPort>, <hmrEnabled>)` in the [**react/devsupport/DevSupportManagerBase.java**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java#L689-L691) file.
>- On iOS, we run `[self.callableJSModules invokeModule:@"HMRClient" method:@"setup" withArgs:@[ RCTPlatformName, path, host, RCTNullIfNil(port), @(isHotLoadingEnabled), scheme ]];` in the [**React/CoreModules
/RCTDevSettings.mm**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/React/CoreModules/RCTDevSettings.mm#L488-L491) file.
>
>Notice how Android does not pass in the scheme/protocol of the bundle URL, while iOS actually does? Unfortunately, because the default protocol (`http`) mismatches on Android when using HTTPS proxies, we actually try to connect the HMR client over `http` instead of `https` - while still using port 443 - which is rejected by Cloudflare's infrastructure even before we can redirect or mitigate this issue. And the rejection is valid, as we basically try to connect on `http://<host>:443` (the source URL is `https`, so the port is infered as `443`).
>
>This change adds scheme propagation to Android, exactly like we do on iOS for the HMR Client.

## Changelog:

[ANDROID] [FIXED] Pass the bundle URL protocol when setting up HMR client on 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/48998

Test Plan:
See full explanation on https://github.com/facebook/react-native/issues/48970

> It's a little bit hard to test this out yourself, since you'd need a HTTPS-based proxy and reject HTTP connections for HTTPS/WSS Websocket requests.
>
>You can set this up through:
>- `bun create expo@latest ./test-app`
>- `cd ./test-app`
>- `touch .env`
>- Set `EXPO_PACKAGER_PROXY_URL=https://<proxied-metro-hostname>` in **.env**
>- Set `REACT_NATIVE_PACKAGER_HOSTNAME=<proxied-metro-hostname>` in **.env**
>- `bun run start`
>
>Setting both these envvars, the bundle URL in the manifest is set to `https://...` - which triggers this HMR issue on Android. You can validate the **.env** setup through:
>
>```bash
>curl "http://localhost:8081" -H "expo-platform: android" | jq .launchAsset.url
>```
>
>This should point the entry bundle URL towards the `EXPO_PACKAGER_PROXY_URL`.

Reviewed By: cortinico

Differential Revision: D68768351

Pulled By: javache

fbshipit-source-id: 49bf1dc60f11b2af6e57177141270632d62ab564
2025-01-28 07:20:32 -08:00
Alex HuntandFacebook GitHub Bot bb1e3cdb04 Update cli-server-api middleware imports (#48997)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48997

Follows https://github.com/react-native-community/cli/pull/2584.

- Also add FIXME comment flagging potential core APIs gap without CLI.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68766565

fbshipit-source-id: 60747715f76c4323e306c39ab0613fb4818b4914
2025-01-28 07:11:13 -08:00
Eric RozellandFacebook GitHub Bot 037504cc7b Fix durability of PerformanceObserver mark/measure example (#48940)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48940

The PerformanceObserver (marks and measures) example clears it's output each time a new PerformanceObserver event fires, which makes it not particularly useful.

This change makes it so the output is only updated if a non-empty list of performance events is observed.

## Changelog

[Internal]

Reviewed By: rubennorte

Differential Revision: D68634361

fbshipit-source-id: 71b97e1c66aabd090cae63d55c8fa0a425d0c2f4
2025-01-28 07:08:11 -08:00
Iwo PlazaandFacebook GitHub Bot 48d900b703 Migrate files in Libraries/Inspector to use export syntax (#48931)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48931

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling

## This diff
- Updates files in Libraries/Inspector to use `export` syntax
- Appends `.default` to requires of the changed files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Inspector` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: robhogan

Differential Revision: D68629285

fbshipit-source-id: ee0904ea5e8f9389aecfb197d05225c88137fb08
2025-01-28 06:13:07 -08:00
Mateo GuzmánandFacebook GitHub Bot 9572bcf028 Add OkHttpClientProvider tests (#48958)
Summary:
Currently, the class OkHttpClientProvider is still in Java. Adding some tests before migrating it to Kotlin

## Changelog:

[INTERNAL] - Add OkHttpClientProvider tests

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

Test Plan:
```bash
./gradlew :packages:react-native:ReactAndroid:test -Dtest.single=com.facebook.react.modules.network
```

Reviewed By: javache

Differential Revision: D68706173

Pulled By: cortinico

fbshipit-source-id: 7b4b1cbe17ff39d3775075682dcb8d253892e062
2025-01-28 06:04:05 -08:00
VidocqHandFacebook GitHub Bot 2ae45ec3ce fix TextInput dataDetectorTypes (#48952)
Summary:
Setting `dataDetectorTypes` has no effect. As I am new to the react native codebase, it seems like `dataDetectorTypes` has not implemented on new arch yet.

issue: https://github.com/facebook/react-native/issues/48951

## Changelog:

[IOS] [FIXED] - implement `dataDetectorTypes` in the same way as the old architecture

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

Test Plan: <img width="356" alt="image" src="https://github.com/user-attachments/assets/192a683c-f7b7-48ac-98cd-76866901f008" />

Reviewed By: javache

Differential Revision: D68715166

Pulled By: cipolleschi

fbshipit-source-id: 612119e7453da012e6f75e1fc3a22ddedcb569a4
2025-01-28 05:07:26 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 98b8f17811 Add extra parameter to define whether codegen is invoked by lib or app (#48995)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48995

This change adds an extra parameter to the codegen script that allow our users to trigger codegen for Apps or for Libraries.

When running codegen for Apps, we have to generate some extra files that are not needed by the Libraries. This is causing issues to our library maintainers and this change will provide more flexibility in the DevX of libraries.

The default value is App, so if the new parameter is not passed, nothing will change in the current behavior.

## Changelog:
[iOS][Added] - Add the `source` parameter to generate-codegen-artifacts to avoid generating files not needed by libraries.

Reviewed By: cortinico

Differential Revision: D68765478

fbshipit-source-id: 8030b4472ad4f5058e58b1c91089de5122a4f60a
2025-01-28 05:06:54 -08:00
Nicola CortiandFacebook GitHub Bot 08ddc11269 Stable API - Refactor and remove unnecessary RuntimeConfig (#48934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48934

This class is publicly exposed but effectively unused at all (neither internally, nor externally).
I'm removing it as this should not affect anyone.

Changelog:
[Android] [Breaking] - Removed `RuntimeConfig` class for Hermes which was unused.

Reviewed By: tdn120

Differential Revision: D68631945

fbshipit-source-id: 6a62ccda9e62f4bae650c11bc17a95efc8c88baf
2025-01-28 04:58:35 -08:00
Alex HuntandFacebook GitHub Bot 514ec4192f Remove hanging reference to Remote Debugging endpoint on Android (#48996)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48996

Follows https://github.com/react-native-community/discussions-and-proposals/discussions/872.

Changelog:
[Android][Removed] - Remove `DevSupportManagerFactory.launchJSDevtools` API

Reviewed By: hoxyq

Differential Revision: D68766564

fbshipit-source-id: a9dad3a81ecc3fc03f056d4ccac8aa3e489cf242
2025-01-28 04:55:49 -08:00
CHOIMINSEOKandFacebook GitHub Bot 541e655832 fix wrong cocoapods script on new_architecture.rb (#48992)
Summary:
It seems that the `new_architecture.rb` script has an incorrect dependency configuration. The decision to install either “hermes-engine” or “React-jsc” should depend on whether Hermes is enabled or not. However, in the current `new_architecture.rb` setup, the build script toggles between “hermes-engine” and “React-jsi”.

```
        if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
            spec.dependency "hermes-engine"
        else
            spec.dependency "React-jsi" // <=  this must be "React-jsc", not "React-jsi"
        end
```
https://github.com/facebook/react-native/blob/701622506248022c3a2fcea1c0066bba6e80232a/packages/react-native/scripts/cocoapods/new_architecture.rb#L141

When you try to use reanimated in brownfield app, you can reproduce runtime exception by this.

Reproduce Repo: https://github.com/CHOIMINSEOK/FullScreenOverlayIssue
script patch for this issue : https://github.com/CHOIMINSEOK/FullScreenOverlayIssue/blob/main/rn-app/.yarn/patches/react-native-reanimated-npm-3.16.7-1e7cd6d376.patch

## Changelog:

[IOS] [FIXED] - fix wrong cocoapods script on new_architecture.rb

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

Test Plan: I have no idea how to test regression.

Reviewed By: cortinico

Differential Revision: D68763630

Pulled By: cipolleschi

fbshipit-source-id: 7c2a0ea48815be5d77be7ed7aceed6a5bf574349
2025-01-28 04:53:23 -08:00
zhongwuzwandFacebook GitHub Bot c8f1506f13 Clean up RCTBridgeDelegate to remove shouldBridgeUseCustomJSC method (#48948)
Summary:
`shouldBridgeUseCustomJSC` comes from https://github.com/zhongwuzw/react-native/commit/cb3e575deb8a2be972298b12761ed9ee8f0ae63d, seems it's not working anymore. So we can clean up it .

## Changelog:

[IOS] [REMOVED] - Clean up RCTBridgeDelegate to remove shouldBridgeUseCustomJSC method

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

Test Plan: Everything should works.

Reviewed By: christophpurrer

Differential Revision: D68728588

Pulled By: javache

fbshipit-source-id: 8a762b5f3d6272fa7be57e0b17cb655eba743b5d
2025-01-28 04:37:37 -08:00
Rubén NorteandFacebook GitHub Bot e8eae9448f Remove expected ESLint error (#48980)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48980

Changelog: [internal]

This will be properly removed soon, but disabling for now to avoid showing up in all PRs.

Reviewed By: cortinico

Differential Revision: D68719573

fbshipit-source-id: 6a631ba2556f1399d0ade52f19b79f5a3212e007
2025-01-28 03:32:15 -08:00
Mateo GuzmánandFacebook GitHub Bot 7016225062 Sync Modal system bars visibility with current activity (#48516)
Summary:
Fixes https://github.com/facebook/react-native/issues/37801

This PR fixes the system bars visibility not being in sync as with the activity it is displayed on.

Here I am also taking into account the feedback given in [this PR](https://github.com/facebook/react-native/pull/36854) which was also aiming to address this issue. Unfortunately, I tried in multiple ways to get this to work by simply extending the whole system bars behaviour in the dialog with the activity system bars behaviour but found out that that solution won't work as we [currently clear the flag "FLAG_NOT_FOCUSABLE"](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt#L314) and unless we remove that line, extending the behaviour won't work. Removing that line is not an option as it would cause other side effects in the dialog itself.

With the above said, I ended up doing this in a more explicit way, by checking whether the status or navigation bars are hidden in the activity and then hiding then as well in the dialog or otherwise, similar as we are currently doing with the status bars appearance.

## Changelog:

[ANDROID] [FIXED] - Sync Modal system bars visibility with current activity

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

Test Plan:
In order to test this, you need to trigger any method that hides or shows the system bars using `window.insetsController`. Here a very small example of it:

```kt
fun toggleSystemBarsVisibility(shouldHide: Boolean) {
  val window = currentActivity?.window
  val controller = window?.insetsController
  if (shouldHide) {
    controller?.hide(WindowInsets.Type.systemBars())
  } else {
    controller?.show(WindowInsets.Type.systemBars())
  }
}
```

You can do this optionally from JS to make testing different cases easier. Below is a screen recording of how the solutions looks like:

<details>
<summary>Screen recording showcasing the solution in the test plan</summary>

https://github.com/user-attachments/assets/c497c1cb-5e65-4f31-98cc-aefd2d7b0339
</details>

Reviewed By: mdvacca, Abbondanzo

Differential Revision: D67906071

Pulled By: alanleedev

fbshipit-source-id: cbb2d15520d7729a9e9eafb5f5efb8d20d796c60
2025-01-27 18:02:46 -08:00
Dmitry RykunandFacebook GitHub Bot 409047bb6d Remove some code duplication in ConcreteComponentDescriptor::cloneProps (#48938)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48938

Simple cleanup. Move the instantiation of shadowNodeProps outside of the IF statement.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D68634269

fbshipit-source-id: 40a103060fc96a5c74c7d81f7d6e8ac0565948c8
2025-01-27 16:24:27 -08:00
Jorge Cabiedes AcostaandFacebook GitHub Bot f8d5e3b3f0 Fix innerBoxShadows not getting border-radius applied (#48983)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48983

tsia

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D68734160

fbshipit-source-id: 05edb5c1f97353517ade58ca690d58cbe4bd1068
2025-01-27 16:03:13 -08:00
Jorge Cabiedes AcostaandFacebook GitHub Bot f7d78f81cc Fix elevation with border-radius set (#48982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48982

We were missing a conversion to px on the `getOutline()` function of `CompositeBackgroundDrawable` which led to incorrect elevation prop rendering

Changelog: [Android][Fixed] - Elevation prop on android has incorrect border-radius

Reviewed By: NickGerleman

Differential Revision: D68724947

fbshipit-source-id: b3a7a4919bfd7c60fac7c3d6e3ba760e3f74d190
2025-01-27 14:41:16 -08:00
Pieter De BaetsandFacebook GitHub Bot 6e9a4627c4 Revert D68711137: fix(react-native): pass the protocol from bundle URL to HMR client on Android
Differential Revision:
D68711137

Original commit changeset: 230c1c91c818

Original Phabricator Diff: D68711137

fbshipit-source-id: 00cc23468596d8b75800d7dd388b2c51518d79e6
2025-01-27 14:41:14 -08:00
Nick GerlemanandFacebook GitHub Bot 9aae84a688 Remove some web debugging remnants (#48054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48054

Web debugging should be fully removed as of recent, so lets remove some of the gunk that was powering it, and checks for that environment.

I did some string searches for the following:

* isAsyncDebugging
* debugRemotely
* isDebuggingRemotely
* isRemoteDebuggingAvailable
* WebSocketExecutor
* JavaJSExecutor
* ProxyJavaScriptExecutor
* RELOAD_APP_EXTRA_JS_PROXY
* getJSBundleURLForRemoteDebugging
* onReloadWithJSDebugger
* setRemoteJSDebugEnabled
* WebsocketJavaScriptExecutor
* createRemoteDebuggerBundleLoader

1. `expo-modules-core` exposes its own `isAsyncDebugging` by checking for `nativeCallSyncHook`, but does not depend on `DebugEnvironment`.
2. `expo-dev-menu` does read `isDebuggingRemotely` from `DevSettings`.
3. Realm does a check in Native using `objc_lookUpClass("RCTWebSocketExecutor")` but will gracefully handle `nil` if it does not exist
4. Some more usages (e.g. `onReloadWithJSDebugger`) in vendored packages of `expo-dev-launcher` for RN 0.74

I created an issue for Expo mentioning both here: https://github.com/expo/expo/issues/33371

Changelog:
[General][Breaking] - Remove some web debugging remnants

Reviewed By: huntie

Differential Revision: D66553934

fbshipit-source-id: deec382b1c8bda393fddb8682aa91b26afd9fbe3
2025-01-27 14:40:33 -08:00
zhongwuzwandFacebook GitHub Bot 3e2e8ec757 Bridge: Fixes HostTarget use after free when deallocated bridge (#48847)
Summary:
Fixes https://github.com/facebook/react-native/issues/48805 .

## Changelog:

[IOS] [FIXED] - Bridge: Fixes HostTarget use after free when deallocated bridge

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

Test Plan:
Test code:
```
  __weak RCTAlertManager *weakModule;
  autoreleasepool {
    RCTAlertManager *module = [RCTAlertManager new];
    RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:[self sourceURLForBridge:nil]
                                              moduleProvider:^{
      return @[ module ];
    }
                                               launchOptions:nil];
    weakModule = module;
    (void)bridge;
  }
```

Reviewed By: realsoelynn

Differential Revision: D68495576

Pulled By: huntie

fbshipit-source-id: c3086a429f24488ac286ff22d039b8f049ccbffd
2025-01-27 12:15:37 -08:00
Nick GerlemanandFacebook GitHub Bot 1593142648 Support parsing hwb() functions (#48913)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48913

This brings us to parity with normalize-color, and is mostly similar to hsl, with the notable exception there is not a separate alpha variant, and only modern function syntax is supported. Again, I took the math from normalize-color, and sanity tested it against reference function provided by Color Spec.

I'm going to let that cap off color function support for now, and leave the rest as TODO.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68594471

fbshipit-source-id: 95702d576e068655d34e52a714d38e4fd718bbc9
2025-01-27 12:07:21 -08:00
Nick GerlemanandFacebook GitHub Bot 676359efd9 Breaking: Remove incorrect hwb() syntax support from normalize-color (#48912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48912

The implementation of `hwb()` color functions added in https://github.com/facebook/react-native/pull/34600 is pretty flawed.

`hwb()` color functions do not allow comma delimited values. So most of the examples in the unit test here will fail to parse on web. Like `hsl()`, these should also allow numeric non-hue components (instead of just %), and angle values for hue (instead of just numbers), and this is also missing support for alpha values, though these are less dangerous compared to allowing and encouraging incorrect delimiters.

https://www.w3.org/TR/css-color-4/#the-hwb-notation

These were added for web compat, and the examples fail to parse on web, so I'm opting to just remove this incorrect support before implementing this more correctly in the Fabric CSS parser in next diff. I did not attempt to fix the other issues I discovered with the PR implementation in the last couple diffs, around mixing and matching syntax allowed in legacy/modern, along with allowing inconsistent delimiters.

Changelog:
[General][Breaking] - Remove incorrect hwb() syntax support from normalize-color

Reviewed By: lenaic

Differential Revision: D68591172

fbshipit-source-id: 36d670b096ae9fac4bc24938877ad083d4dd336a
2025-01-27 12:07:21 -08:00
Christoph PurrerandFacebook GitHub Bot a419315543 Use uint32_t for httpStatus (#48946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48946

[Changelog] [Internal] - [jsinspector-modern] Use uint32_t for httpStatus

Reviewed By: hoxyq

Differential Revision: D68676415

fbshipit-source-id: 748a2167fa695151095b74cf901f13951f28b0fa
2025-01-27 11:51:13 -08:00
Alex HuntandFacebook GitHub Bot 45cd63c259 Back out "Migrate Libraries/Utilities/*.js to use export syntax." (#48976)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48976

Changelog: [Internal] - Will reattempt

Differential Revision: D68713280

fbshipit-source-id: 069d7dfd9846ab6272865b83163e772a6b17936a
2025-01-27 11:18:56 -08:00
Tim YungandFacebook GitHub Bot 50b75a74d1 Animated: Setup scheduleAnimatedCleanupInMicrotask Feature Flag (#48878)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48878

Creates a new `scheduleAnimatedCleanupInMicrotask` feature flag to experiment with deferring the `AnimatedProps` cleanup using the microtask queue.

This is different from the previous approach of deferring invocation of the completion callback, which impacted the timing of composite animations such as `Animated.parallel` and `Animated.sequence`, because we are deferring detaching the `AnimatedNode` graph instead. This will only impact the timing of completion callbacks as a result of invalidating `AnimatedProps` (either by passing in new `AnimatedValue` instances or unmounting the component).

This should minimally impact scheduling and have lower risk of user-visible behavior change because React already provides minimal guarantees around when updates are committed (and effects attached/detached).

This also enables us to significantly simplify the current convoluted dance we do to optimized around reference counting in the AnimatedNode graph.

Changelog:
[General][Changed] - 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.

Reviewed By: rickhanlonii

Differential Revision: D68527096

fbshipit-source-id: 99346b8ddbf6a01725376c692b0351be679b9e89
2025-01-27 11:04:34 -08:00
Riccardo CipolleschiandFacebook GitHub Bot e77fe5c471 Bump React Native monorepo packages (#48975)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48975

After cutting 0.78-stable, we need to bump the monorepo packages to `0.79.0-main`

## Changelog:
[Internal] - Bump monorepo packages to `0.79.0-main`

Reviewed By: cortinico, huntie

Differential Revision: D68715005

fbshipit-source-id: cb5abbf05e8638683687be8d61d66b3037111572
2025-01-27 11:01:34 -08:00
Samuel SuslaandFacebook GitHub Bot 6acd541f94 disable failing Differentiator test (#48973)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48973

changelog: [internal]

This test is broken, let's disable it until it is fixed.

Reviewed By: javache

Differential Revision: D68709385

fbshipit-source-id: f61b287ad7ef921dd26fa290cc7a484d0b550091
2025-01-27 10:24:20 -08:00
Nicola CortiandFacebook GitHub Bot a08a6c9adc Remove unnecessary visiblity modifiers for internal classes (#48968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48968

I've noticed we have a lot of `public` and `protected` modifiers for classes that are actually `internal`.
Those are unnecessary as the class itself is `internal` and there is no way to extend the visibility of single fields.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D68707255

fbshipit-source-id: 5b93d01dceba1b5031ac608e58ec898c1a1eaf51
2025-01-27 10:17:31 -08:00
Cedric van PuttenandFacebook GitHub Bot ba894c908a fix(react-native): pass the protocol from bundle URL to HMR client on Android (#48970)
Summary:
We've noticed that the HMR on Android doesn't seem to be connecting when using a HTTPS-proxied Metro instance, where the proxy is hosted through Cloudflare. This is only an issue on Android - not iOS - and likely caused by the HMR Client not being set up properly on Android.

- On Android, we run `.setup('android', <bundleEntryPath>, <proxiedMetroHost>, <proxiedMetroPort>, <hmrEnabled>)` in the [**react/devsupport/DevSupportManagerBase.java**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java#L689-L691) file.
- On iOS, we run `[self.callableJSModules invokeModule:@"HMRClient" method:@"setup" withArgs:@[ RCTPlatformName, path, host, RCTNullIfNil(port), @(isHotLoadingEnabled), scheme ]];` in the [**React/CoreModules
/RCTDevSettings.mm**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/React/CoreModules/RCTDevSettings.mm#L488-L491) file.

Notice how Android does not pass in the scheme/protocol of the bundle URL, while iOS actually does? Unfortunately, because the default protocol (`http`) mismatches on Android when using HTTPS proxies, we actually try to connect the HMR client over `http` instead of `https` - which is rejected by Cloudflare's infrastructure even before we can redirect or mitigate this issue.

This change adds scheme propagation to Android, exactly like we do on iOS for the HMR Client.

## Changelog:

[ANDROID] [FIXED] Pass the bundle URL protocol when setting up HMR client on 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/48970

Test Plan: It's a little bit hard to test this out yourself, since you'd need a HTTPS-based proxy and reject HTTP connections for HTTPS/WSS Websocket requests.

Reviewed By: fabriziocucci

Differential Revision: D68711137

Pulled By: javache

fbshipit-source-id: 230c1c91c8189c0a109d20defe085966ac8f5721
2025-01-27 09:43:55 -08:00
Nicola CortiandFacebook GitHub Bot e05a2735cd Add Changelog for 0.74.7 (#48974)
Summary:
Changelog for 0.74.7

## Changelog:

[Internal] [Changed] -

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D68714820

Pulled By: cortinico

fbshipit-source-id: 42ee0e2cb83cf2ee16161468d1127fa2a8cc73bb
2025-01-27 09:37:04 -08:00
Håkon KnutzenandFacebook GitHub Bot 2a18d83521 Make RCTDeviceInfo._invalidated std::atomic<BOOL> (#48890)
Summary:
When running the tests associated with `RNTestPods` with `TSan` enabled, I get a data race:

```
WARNING: ThreadSanitizer: data race (pid=28047)
  Read of size 1 at 0x000144c30be9 by thread T32:
    #0 -[RCTDeviceInfo invalidate] <null> (RNTesterUnitTests:arm64+0x434bf8)
    https://github.com/facebook/react-native/issues/1 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ <null> (CoreFoundation:arm64+0x5e7fc)
    https://github.com/facebook/react-native/issues/2 decltype(std::declval<void () block_pointer __strong&>()()) std::__1::__invoke[abi:de180100]<void () block_pointer __strong&>(&&, decltype(std::declval<void () block_pointer __strong&>()())&&...) <null> (RNTesterUnitTests:arm64+0x2a19d4)
    https://github.com/facebook/react-native/issues/3 std::__1::__function::__func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator()() <null> (RNTesterUnitTests:arm64+0x2a16ec)
    https://github.com/facebook/react-native/issues/4 std::__1::__function::__value_func<void ()>::operator()[abi:de180100]() const <null> (RNTesterUnitTests:arm64+0x2455d4)
    https://github.com/facebook/react-native/issues/5 std::__1::function<void ()>::operator()() const <null> (RNTesterUnitTests:arm64+0x245404)
    https://github.com/facebook/react-native/issues/6 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) <null> (RNTesterUnitTests:arm64+0x2c85b4)
    https://github.com/facebook/react-native/issues/7 -[RCTCxxBridge _tryAndHandleError:] <null> (RNTesterUnitTests:arm64+0x27c9e8)
    https://github.com/facebook/react-native/issues/8 __NSThreadPerformPerform <null> (Foundation:arm64+0x76c5e8)
    https://github.com/facebook/react-native/issues/9 __NSThread__start__ <null> (Foundation:arm64+0x76c27c)

  Previous write of size 1 at 0x000144c30be9 by thread T30:
    #0 -[RCTDeviceInfo invalidate] <null> (RNTesterUnitTests:arm64+0x434c1c)
    https://github.com/facebook/react-native/issues/1 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ <null> (CoreFoundation:arm64+0x5e7fc)
    https://github.com/facebook/react-native/issues/2 decltype(std::declval<void () block_pointer __strong&>()()) std::__1::__invoke[abi:de180100]<void () block_pointer __strong&>(&&, decltype(std::declval<void () block_pointer __strong&>()())&&...) <null> (RNTesterUnitTests:arm64+0x2a19d4)
    https://github.com/facebook/react-native/issues/3 std::__1::__function::__func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator()() <null> (RNTesterUnitTests:arm64+0x2a16ec)
    https://github.com/facebook/react-native/issues/4 std::__1::__function::__value_func<void ()>::operator()[abi:de180100]() const <null> (RNTesterUnitTests:arm64+0x2455d4)
    https://github.com/facebook/react-native/issues/5 std::__1::function<void ()>::operator()() const <null> (RNTesterUnitTests:arm64+0x245404)
    https://github.com/facebook/react-native/issues/6 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) <null> (RNTesterUnitTests:arm64+0x2c85b4)
    https://github.com/facebook/react-native/issues/7 -[RCTCxxBridge _tryAndHandleError:] <null> (RNTesterUnitTests:arm64+0x27c9e8)
    https://github.com/facebook/react-native/issues/8 __NSThreadPerformPerform <null> (Foundation:arm64+0x76c5e8)
    https://github.com/facebook/react-native/issues/9 __NSThread__start__ <null> (Foundation:arm64+0x76c27c)

  Location is heap block of size 48 at 0x000144c30bd0 allocated by main thread:
    #0 calloc <null> (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x53b90)
    https://github.com/facebook/react-native/issues/1 _malloc_type_calloc_outlined <null> (libsystem_malloc.dylib:arm64+0xf8dc)
    https://github.com/facebook/react-native/issues/2 -[RCTModuleData setUpInstanceAndBridge:] <null> (RNTesterUnitTests:arm64+0x32715c)
    https://github.com/facebook/react-native/issues/3 __25-[RCTModuleData instance]_block_invoke <null> (RNTesterUnitTests:arm64+0x32a288)
    https://github.com/facebook/react-native/issues/4 RCTUnsafeExecuteOnMainQueueSync <null> (RNTesterUnitTests:arm64+0x3d6e1c)
    https://github.com/facebook/react-native/issues/5 -[RCTModuleData instance] <null> (RNTesterUnitTests:arm64+0x329d78)
    https://github.com/facebook/react-native/issues/6 __49-[RCTCxxBridge _prepareModulesWithDispatchGroup:]_block_invoke <null> (RNTesterUnitTests:arm64+0x287e74)
    https://github.com/facebook/react-native/issues/7 __wrap_dispatch_group_async_block_invoke <null> (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x7cffc)
    https://github.com/facebook/react-native/issues/8 _dispatch_client_callout <null> (libdispatch.dylib:arm64+0x3c04)
    https://github.com/facebook/react-native/issues/9 __70-[XCTestCase _shouldContinueAfterPerformingSetUpSequenceWithSelector:]_block_invoke.136 <null> (XCTestCore:arm64+0x2d068)

  Thread T32 (tid=4154385, running) created by main thread at:
    #0 pthread_create <null> (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x3027c)
    https://github.com/facebook/react-native/issues/1 -[NSThread startAndReturnError:] <null> (Foundation:arm64+0x76bec4)
    https://github.com/facebook/react-native/issues/2 -[RCTBridge setUp] <null> (RNTesterUnitTests:arm64+0x23d638)
    https://github.com/facebook/react-native/issues/3 -[RCTBridge initWithDelegate:bundleURL:moduleProvider:launchOptions:] <null> (RNTesterUnitTests:arm64+0x23addc)
    https://github.com/facebook/react-native/issues/4 -[RCTBridge initWithBundleURL:moduleProvider:launchOptions:] <null> (RNTesterUnitTests:arm64+0x23aa4c)
    https://github.com/facebook/react-native/issues/5 -[RCTImageLoaderTests testImageLoaderUsesImageDecoderWithHighestPriority] <null> (RNTesterUnitTests:arm64+0xc578)
    https://github.com/facebook/react-native/issues/6 __invoking___ <null> (CoreFoundation:arm64+0x132cdc)

  Thread T30 (tid=4154383, running) created by main thread at:
    #0 pthread_create <null> (libclang_rt.tsan_iossim_dynamic.dylib:arm64+0x3027c)
    https://github.com/facebook/react-native/issues/1 -[NSThread startAndReturnError:] <null> (Foundation:arm64+0x76bec4)
    https://github.com/facebook/react-native/issues/2 -[RCTBridge setUp] <null> (RNTesterUnitTests:arm64+0x23d638)
    https://github.com/facebook/react-native/issues/3 -[RCTBridge initWithDelegate:bundleURL:moduleProvider:launchOptions:] <null> (RNTesterUnitTests:arm64+0x23addc)
    https://github.com/facebook/react-native/issues/4 -[RCTBridge initWithBundleURL:moduleProvider:launchOptions:] <null> (RNTesterUnitTests:arm64+0x23aa4c)
    https://github.com/facebook/react-native/issues/5 -[RCTImageLoaderTests testImageDecoding] <null> (RNTesterUnitTests:arm64+0xa8d0)
    https://github.com/facebook/react-native/issues/6 __invoking___ <null> (CoreFoundation:arm64+0x132cdc)
```

The proposed solution is making the `BOOL` ivar in question a `std::atomic<BOOL>` instead.

## Changelog:

[IOS][FIXED] Data race related to read/write of RCTDeviceInfo._invalidated.

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

Test Plan: Existing tests in `RNTesterPods` and manually running RNTester application.

Reviewed By: christophpurrer

Differential Revision: D68629011

Pulled By: javache

fbshipit-source-id: 229d0db4aa13253b96ce0a20c9795c17e344cfc1
2025-01-27 09:20:47 -08:00
Rubén NorteandFacebook GitHub Bot f282baa26a Implement CustomEvent (#48922)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48922

Changelog: [internal]

This is a basic subclass of Event that allows setting custom values (as opposed to `Event` that is meant to be used as a superclass).

Reviewed By: yungsters

Differential Revision: D67804060

fbshipit-source-id: 9e140cc436f8e230f37275a74df23efd4841071b
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot 8445ebc248 Create module to handle event handler attributes (#48920)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48920

Changelog: [internal]

Implements a module with helpers to define event handler IDL attributes in classes extending `EventTarget`. E.g.:

```
import {getEventHandlerAttribute, setEventHandlerAttribute} from '../path/to/EventHandlerAttributes';

class EventTargetSubclass extends EventTarget {
  get oncustomevent(): EventListener | null {
    return getEventHandlerAttribute(this, 'customEvent');
  }
  set oncustomevent(listener: EventListener | null) {
    setEventHandlerAttribute(this, 'customEvent', listener);
  }
}

const eventTargetInstance = new EventTargetSubclass();

eventTargetInstance.oncustomevent = (event: Event) => {
  console.log('custom event received');
};
eventTargetInstance.dispatchEvent(new Event('customEvent'));
// Logs 'custom event received' to the console.

eventTargetInstance.oncustomevent = null;
eventTargetInstance.dispatchEvent(new Event('customEvent'));
// Does not log anything to the console.

```

Reviewed By: javache

Differential Revision: D67839560

fbshipit-source-id: f301d174fa9a4c010940b875cadfc31298947c26
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot 9fbc02a031 Move all properties of EventTarget to symbols to avoid polluting the global scope (#48962)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48962

Changelog: [internal]

We moved away from private fields for `EventTarget` for performance, in favor of normal fields prefixed with underscore, but this would pollute the global scope when we make it extend `EventTarget`.

This refactors the implementation to use symbols for all properties to avoid that problem, leaving only `addEventListener` and `removeEventListener` as regular properties in the prototype.

Performance-wise this is neutral or a slight improvement according to the existing benchmark.

Reviewed By: javache

Differential Revision: D68672215

fbshipit-source-id: b329548efce6059ae2b9f33afa0719e057d3b8ba
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot b28ab79f1b Make constants in Event more spec compliant (#48918)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48918

Changelog: [internal]

Makes the constants read-only and accessible through `Event.prototype` as well.

Reviewed By: yungsters

Differential Revision: D67830012

fbshipit-source-id: 730622a642f08f532cebd4c183d859ccb2ca0641
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot e04e502f77 Further optimizations for event dispatching (#48426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48426

Changelog: [internal]

This improves the performance of DOM `Event` interface implementation by migrating away from private fields.

Reviewed By: yungsters

Differential Revision: D67751821

fbshipit-source-id: e58e5a9cbb04e7d91cbc676ec7d1b00fff357e2e
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot 47e490f084 Make EventTarget compatible with the existing implementation of ReadOnlyNode (#48427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48427

Changelog: [internal]

The `ReactNativeElement` class was refactored for performance reasons, and the current implementation does **NOT** call `super()`, and it inlines the parent constructor instead.

When it eventually extends `EventTarget`, things won't work as expected because the existing `EventTarget` implementation has constructor dependencies.

This refactors the current implementation of `EventTarget` to eliminate those constructor side-effects, and eliminates the constructor altogether.

This breaks encapsulation, but it has some positive side-effects on performance:
1. Creating `EventTarget` instances is faster because it has no constructor logic.
2. Improves memory by not creating maps to hold the event listeners if no event listeners are ever added to the target (which is very common).
3. Improves the overall runtime performance of the methods in the class by migrating away from private methods (which are known to be slow on the babel transpiled version we're currently using).

Extra: it also simplifies making window/the global scope implement the EventTarget interface :)

## Benchmark results

Before:

| Latency average (ns) | Latency median (ns) | Samples | Task name                                              | Throughput average (ops/s) | Throughput median (ops/s) |
| ---|--- |--- |--- |---|---|
| 8234.22 ± 0.27%      | 8132.00             | 121445  | dispatchEvent, no bubbling, no listeners               | 122323 ± 0.02%             | 122971                   |
| 9001.22 ± 0.41%      | 8883.00             | 111097  | dispatchEvent, no bubbling, single listener            | 111981 ± 0.02%             | 112575                   |
| 51777.94 ± 0.58%     | 51247.00            | 19314   | dispatchEvent, no bubbling, multiple listeners         | 19393 ± 0.04%              | 19513                    |
| 8256.65 ± 0.29%      | 8152.00             | 121115  | dispatchEvent, bubbling, no listeners                  | 122031 ± 0.02%             | 122669                   |
| 9064.32 ± 0.44%      | 8933.00             | 110323  | dispatchEvent, bubbling, single listener per target    | 111265 ± 0.02%             | 111944                   |
| 51879.66 ± 0.27%     | 51447.00            | 19276   | dispatchEvent, bubbling, multiple listeners per target | 19325 ± 0.04%              | 19437               |

After:

| Latency average (ns) | Latency median (ns) | Samples | Task name                                              | Throughput average (ops/s) | Throughput median (ops/s)|
| ---------------------|---------------------|---------|--------------------------------------------------------|----------------------------|--------------------------|
| 5664.62 ± 0.50%      | 5588.00             | 176535  | dispatchEvent, no bubbling, no listeners               | 178219 ± 0.02%             | 178955                   |
| 7232.86 ± 0.50%      | 7131.00             | 138258  | dispatchEvent, no bubbling, single listener            | 139540 ± 0.02%             | 140233                   |
| 50957.51 ± 0.71%     | 50336.00            | 19625   | dispatchEvent, no bubbling, multiple listeners         | 19751 ± 0.04%              | 19866                    |
| 5692.36 ± 0.50%      | 5618.00             | 175675  | dispatchEvent, bubbling, no listeners                  | 177315 ± 0.02%             | 177999                   |
| 7277.82 ± 0.38%      | 7181.00             | 137404  | dispatchEvent, bubbling, single listener per target    | 138560 ± 0.02%             | 139256                   |
| 50493.64 ± 0.28%     | 50105.00            | 19805   | dispatchEvent, bubbling, multiple listeners per target | 19855 ± 0.04%              | 19958                    |

Reviewed By: yungsters

Differential Revision: D67758408

fbshipit-source-id: f8da1788251c9e21377de5ab730875bcc7610361
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot 07df02d14d Add regression test for EventTarget (#48431)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48431

Changelog: [internal]

Adds a regression test to make sure we implement the correct spec-compliant behavior for a possible bug in ~~the Web spec~~ __Chrome__: https://github.com/whatwg/dom/issues/1346

Edit: the bug is in the Chrome implementation, not in the spec.

Reviewed By: javache

Differential Revision: D67758702

fbshipit-source-id: ecaeacac3bce286e692880f05d70297ba0c2c736
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot 3c50d87d05 Add benchmark for EventTarget (#48886)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48886

Changelog: [internal]

Creates a benchmarks to measure the performance of `EventTarget`.

Reviewed By: javache

Differential Revision: D67750677

fbshipit-source-id: 7023d5f3bcdc5eec1f5f03298781800d2f9bfe16
2025-01-27 07:48:50 -08:00
Rubén NorteandFacebook GitHub Bot e5024a08d1 Implement Event and EventTarget (#48429)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48429

Changelog: [internal]

This implements a (mostly) spec-compliant version of the [`Event`](https://dom.spec.whatwg.org/#interface-event) and [`EventTarget`](https://dom.spec.whatwg.org/#interface-eventtarget) Web interfaces.

It does not implement legacy methods in either of the interfaces, and ignores the parts of the spec that are related to Web-specific quirks (shadow roots, re-mapping of animation events with webkit prefixes, etc.).

IMPORTANT: This only creates the interfaces and does not expose them externally yet (no `Event` or `EventTarget` in the global scope).

Reviewed By: yungsters

Differential Revision: D67738145

fbshipit-source-id: c86db29821552cc1a1b6e1023cc3a21ae55febd5
2025-01-27 07:48:50 -08:00
Thomas NardoneandFacebook GitHub Bot fc98babe3e Nullsafe jcf/react/animated (#48932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48932

Results of running nullsafe script with `--patch=apply_fixmes`, `--patch=mark_nullsafe`, with minimal manual fixes to get all checks passing.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68629827

fbshipit-source-id: f9d3e741c634743731bdc2870cdccbf73ab58cc1
2025-01-27 07:21:12 -08:00
Mateo GuzmánandFacebook GitHub Bot bbd1e0ff17 Fix FlatList dark mode examples (#48873)
Summary:
- Fix FlatList Nested and Multicolumn dark mode examples
- Convert MultiColumn example from class to functional component
- Fixing several FlowFixMe annotations for both examples

## Changelog:

[INTERNAL] - Fix FlatList dark mode examples

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

Test Plan:
<details>
<summary>Screenshots</summary>

| Before                           | After                          |
|------------------------------------|------------------------------------|
| ![Image 1](https://github.com/user-attachments/assets/c22cbbc1-26e0-4e6b-a21a-0e0a47a23fc2) | ![Image 2](https://github.com/user-attachments/assets/bea957e5-9633-4d1f-91ed-0f4eac58b723) |
| ![Image 3](https://github.com/user-attachments/assets/0d601cdc-a84d-4b06-9f15-ebf793414f53) | ![Image 4](https://github.com/user-attachments/assets/4b605fa5-98d9-4d62-9108-1f7c7148a445) |

</details>

Reviewed By: cortinico

Differential Revision: D68630288

Pulled By: Abbondanzo

fbshipit-source-id: 41c240e4f8c6e6eacf537d53ab4a06bb0b7ef0de
2025-01-27 07:05:50 -08:00
Matthew HoranandFacebook GitHub Bot c499ae1192 Fixes for Keyboard Observer, KeyboardAvoidingView on iOS (#48131)
Summary:
**Convert keyboard position to window coordinate space on iOS**
The keyboard frame passed to keyboardWillChangeFrame is in the screen's coordinate space [1]. It needs to be converted to the window's coordinate space to support Slide Over and Stage Manager.

[1] https://developer.apple.com/documentation/uikit/uikeyboardframeenduserinfokey?language=objc

|Before|After|
|---|---|
|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 18 58 31](https://github.com/user-attachments/assets/6af21fde-32f1-4b15-83be-09a6dbae8784)|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 19 01 27](https://github.com/user-attachments/assets/c63c2bef-c1a6-4ad4-91cf-74629c26dbb0)|

**Improve detached keyboard detection on iOS**
The iOS keyboard may be in one of three states:
1) floating (previously supported with a width check)
2) split
3) or undocked.

In addition, when using Stage Manager, the keyboard may be wider than the window itself. This would cause the floating keyboard check to incorrectly set the bottom position to zero.

Instead, rely on the fact that the UIKeyboardWillHideNotification notification is sent when the keyboard is in any detached state.

This requires listening for UIKeyboardWillShowNotification instead of UIKeyboardWillChangeFrameNotification. This is fine, since the show notification is also sent when the keyboard resizes while open.

Combined with the coordinate system adjustments in the previous commit, this also fixes an issue with Stage Manager, since the keyboard may be attached yet wider than the application window.

|Before|After|
|---|---|
|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 18 58 40](https://github.com/user-attachments/assets/4e747ece-b084-49ad-a8d6-5dfe623ae597)|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 19 01 41](https://github.com/user-attachments/assets/50391302-4c83-4aa3-a96b-6056bba891ec)|
|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 19 48 19](https://github.com/user-attachments/assets/576691b3-6b84-41cf-87f4-0cf52fc405d4)|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 19 05 33](https://github.com/user-attachments/assets/4bb60ca6-beb3-471e-bc71-38a18fc9c0f1)|
|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 19 48 55](https://github.com/user-attachments/assets/baf456fb-aa61-455b-9c20-a01a6a979cb5)|![Simulator Screenshot - iPad mini (A17 Pro) - 2024-12-05 at 19 05 56](https://github.com/user-attachments/assets/0b7fe954-a72f-407a-bb41-0f47253c9448)|

## 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] - Keyboard events are converted to window coordinate space
[iOS] [FIXED] - Improve detached keyboard detection, support Stage Manager on iOS

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

Test Plan: See screenshots above.

Reviewed By: yungsters

Differential Revision: D67337314

Pulled By: cipolleschi

fbshipit-source-id: abe872ac8c83336f316917074f72cdb23a39caab
2025-01-27 06:57:02 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 4141560afc Call cocoapods passing the RCT_IGNORE_PODS_DEPRECATION flag (#48967)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48967

This change updates the core-cli-utils package to call `pod install` by passing the `RCT_IGNORE_PODS_DEPRECATION` flag.

## Changelog:
[iOS][Changed] - Ignore deprecation warning when calling pod install through core-cli-utils

Reviewed By: cortinico

Differential Revision: D68704956

fbshipit-source-id: 5ce56e3ec8c5718f6403f8871bebf6aceeeb407b
2025-01-27 06:52:35 -08:00
Riccardo CipolleschiandFacebook GitHub Bot cc1e8d1523 Move running codegen to core-cli-utils (#48965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48965

Running codegen should not be a Cocoapods responsibilities, but it should be something that runs before Cocoapods to ensure that the code is already in the right place.

This change moves the invocation of Codegen to the react-native's core-cli-utils so that frameworks can integrate better with it.

It should also make it easier to migrate away from Cocoapods.

## Changelog:
[iOS][Changed] - Invoke Codegen as part of the Core-cli-utils package

Reviewed By: cortinico

Differential Revision: D68706136

fbshipit-source-id: 548c9ffad62bc561fcc948babaf75de5dad82f86
2025-01-27 06:52:35 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 2527d29a96 Update Gemfile (#48966)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48966

In our previous fix for concurrent-ruby, we have been a bit too strict. Version 1.3.4 is a valid and working version. The broken version is 1.3.5.

## Changelog:
[iOS][Changed] - Fix Gemfile versions

Reviewed By: cortinico

Differential Revision: D68706060

fbshipit-source-id: 8ab7a4df0eb83a82603729ff8460e64908ddc465
2025-01-27 06:52:35 -08:00
Riccardo CipolleschiandFacebook GitHub Bot f15094ef88 Stop running Codegen on Pod install when a flag is passed (#48961)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48961

One of Cocoapods responsibility is to run Codegen while creating the Xcode workspace. Moving away from Cocoapods, this is a step we need to move to a different place.

This change let us to disable running codegen at cocoapods time when we pass the `RCT_SKIP_CODEGEN=1` or when we pass the `RCT_IGNORE_PODS_DEPRECATION=1` flag calling pod install.

When calling `pod install` with `RCT_IGNORE_PODS_DEPRECATION` we are either:
* using one of the Scripts provided by Expo or by the Community CLI
*or*
* we are preparing the project using the legacy mode and, therefore, we want to keep running codegen.

## Changelog
[iOS][Changed] - Stop running codegen when running pod install

Reviewed By: cortinico

Differential Revision: D68704604

fbshipit-source-id: 252e90544886c3dbfd7eff38c344dd4784a0af38
2025-01-27 06:52:35 -08:00
Riccardo CipolleschiandFacebook GitHub Bot e3def00d7a Warn users when calling pod install (#48960)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48960

We are moving away from Cocoapods toward alternative solution.

We are adding this deprecation message to help inform our users that this change is happening.

Part of the Cocoapods tasks will be moved to an alternative script that will be invoked by Expo and by the Community CLI. The warning message tells the users what to do as an alternative to `pod install`.

## Changelog:
[iOS][Deprecated] - deprecate calling `pod install` directly

Reviewed By: cortinico

Differential Revision: D68704127

fbshipit-source-id: df93008afc055254d0c0da09566c84af99248310
2025-01-27 06:52:35 -08:00
Iwo PlazaandFacebook GitHub Bot bdc23fa2b4 Migrate files in Libraries/Interaction to use export syntax (#48933)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48933

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling

## This diff
- Updates files in Libraries/Interaction to use `export` syntax
- Appends `.default` to requires of the changed files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Interaction` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: huntie

Differential Revision: D68629953

fbshipit-source-id: 526b18d9b64c4b27b6e3198a9725075fa11e345a
2025-01-27 06:32:58 -08:00
Samuel SuslaandFacebook GitHub Bot 0f0344984f ship useOptimisedViewPreallocationOnAndroid everywhere and remove gating (#48903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48903

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D68490542

fbshipit-source-id: f743e9c82328c5f06b431cffe77f9a28608535b9
2025-01-27 06:26:35 -08:00
Edmond ChuiandFacebook GitHub Bot 46e86dca87 Update tests to support new didOpen delegate fn
Summary:
Changelog: [General][Fixed] Update tests to support new `didOpen` delegate fn

Add support for the new `didOpen` delegate function in tests.

To follow up separately: the borked tear down sequence when these two tests are ran together (they pass when ran individually)

```
buck2 test @//fbobjc/mode/buck2/ios-tests fbsource//xplat/js/react-native-github/packages/react-native/ReactCommon/jsinspector-modern:testsAppleMac -- ReactInstanceIntegrationTest RuntimeTargetDebuggerSessionObserverTest
```

Reviewed By: hoxyq

Differential Revision: D68632974

fbshipit-source-id: 59da6d9e2d09f2c7e219c1902dd6f9b8ddfee9dc
2025-01-27 05:53:15 -08:00
Mateo GuzmánandFacebook GitHub Bot 53d94c3abe Migrate com.facebook.react.modules.network.OkHttpClientFactory to Kotlin (#48945)
Summary:
Migrate com.facebook.react.modules.network.OkHttpClientFactory to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.modules.network.OkHttpClientFactory to Kotlin

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

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

Reviewed By: cortinico

Differential Revision: D68705783

Pulled By: arushikesarwani94

fbshipit-source-id: 9c2cc2927eae50d0dce91384bf945a8c795c0bbd
2025-01-27 04:48:22 -08:00
Samuel SuslaandFacebook GitHub Bot 1257122a02 introduce Fantom.flushAllNativeEvents (#48943)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48943

changelog: [internal]

A new helper function on Fantom flushAllNativeEvents, which will flush all pending native events.

Reviewed By: javache

Differential Revision: D68566753

fbshipit-source-id: 6cb19416e39807b9b381ff068cea5c2458101174
2025-01-27 04:42:44 -08:00
Samuel SuslaandFacebook GitHub Bot aa5760837c introduce Fantom.scrollTo (#48907)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48907

changelog: [internal]

Introduce new function `Fantom.scrollTo`, which will fake a scroll to particular position.
Calling the method will call onScroll event using codepath that iOS uses. It will also set C++ state so the new scroll position is observable from JavaScript.

Reviewed By: javache

Differential Revision: D68554703

fbshipit-source-id: 2fc71e96836a03ec343053ceed85764c4bc2f5c7
2025-01-25 14:58:28 -08:00
Samuel SuslaandFacebook GitHub Bot 84b8e6a531 unify Fantom calling convention to Fantom.foo (#48924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48924

changelog: [internal]

All other Fantom tests are using Fantom.foo style instead of `foo`. Let's unify codebase on this.

Reviewed By: christophpurrer

Differential Revision: D68552829

fbshipit-source-id: eeefc449b1f33161b3583dd68b08f83455d1a959
2025-01-25 14:58:28 -08:00
David VaccaandFacebook GitHub Bot e44b2fa973 Migrate ReactBridge to kotlin (#48904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48904

Migrate ReactBridge to kotlin

changelog: [internal] internal

Reviewed By: tdn120, cortinico

Differential Revision: D68540709

fbshipit-source-id: 35a6d19f940dabdecbe7b7f835953d9f07f7222b
2025-01-24 16:17:58 -08:00
Pieter De BaetsandFacebook GitHub Bot 73968dc778 Cleanup initEagerTurboModulesOnNativeModulesQueueAndroid flag (#48917)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48917

Cleaning up this flag which has already been rolled out

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68622852

fbshipit-source-id: 5767515d02ce9804976a1363532e1e626aeae0d8
2025-01-24 10:57:41 -08:00
Pieter De BaetsandFacebook GitHub Bot 7f62ff6b02 Cleanup completeReactInstanceCreationOnBgThreadOnAndroid and useImmediateExecutorInAndroidBridgeless flags (#48916)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48916

Cleaning up this feature flag since we no longer require this gating. This was already fulled rulled out as default.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68621578

fbshipit-source-id: 3fd3ad007b8beb8e2525ffa7b4da372be1dbbd94
2025-01-24 10:57:41 -08:00
Tim YungandFacebook GitHub Bot b186d8f9b8 Animated: Hoist Non-Lifecycle Logic from useAnimatedPropsLifecycle (#48877)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48877

This is a minor refactor to hoist logic that is not actually specific to the `AnimatedProps` lifecycle out of the hook named `useAnimatedPropsLifecycle`.

This will make it easier to iterate on the implementation of `useAnimatedPropsLifecycle` using a feature flag in a subsequent diff.

This has no behavior change.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D68516034

fbshipit-source-id: 2cd6d9b0f2a5c0ada10cf01c8c14ed5510fbf25a
2025-01-24 10:48:44 -08:00
Nicola CortiandFacebook GitHub Bot 54e0b69e7e Stable API - Make AnimatedNodeWithUpdateableConfig internal (#48900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48900

I've verified that this interface is not used externally, so I'm making it internal.
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%3Apvinis%2Freact-native---investigation+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+repo%3Amolangning%2Freversing-discord+com.facebook.react.animated.AnimatedNodeWithUpdateableConfig+

Changelog:
[Android] [Removed] - Stable API - Make `AnimatedNodeWithUpdateableConfig` internal as it was not used in OSS

Reviewed By: tdn120, mdvacca

Differential Revision: D68562055

fbshipit-source-id: 0f06c22dc096efabce9fb937f099775effbff3f6
2025-01-24 10:22:23 -08:00
David VaccaandFacebook GitHub Bot 2fa0494bc4 Internalize ReactNativeFeatureFlags generated accessor classes (#48909)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48909

Internalize ReactNativeFeatureFlags generated accessor classes

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D68579670

fbshipit-source-id: 63606793e2a63f1901c7de2cb40e68c27193259d
2025-01-24 10:15:58 -08:00
David VaccaandFacebook GitHub Bot c0ad6a4cd5 Internalize ReactNativeFeatureFlags Accessor interfaces & Classes (#48910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48910

Internalize ReactNativeFeatureFlags Accessor interfaces & Classes

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D68579453

fbshipit-source-id: 9549221b47e93a9c8a3161c3914ece849f7f9a52
2025-01-24 10:15:58 -08:00
Nicola CortiandFacebook GitHub Bot c495a8ab1b Remove unused AndroidUnicodeUtils. (#48919)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48919

I suspect this class is unused and we should not be building it.
The same `AndroidUnicodeUtils.java` is provided by facebook/hermes instead.

Changelog:
[Internal] [Changed] -

Reviewed By: tdn120, mdvacca

Differential Revision: D68623307

fbshipit-source-id: 0a290d31e3b1103947a9dd3c46821958be9223e7
2025-01-24 10:03:04 -08:00
Iwo PlazaandFacebook GitHub Bot 52ffda7e55 Migrate Libraries/Utilities/*.js to use export syntax. (#48665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48665

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling

## This diff
- Updates files in Libraries/Utilities to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks of the `Platform` module, which happened to touch a lot of test files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Utilities` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: huntie

Differential Revision: D68152910

fbshipit-source-id: 07f3a0957f1dbaf44f53974c6f28b273558406eb
2025-01-24 09:17:55 -08:00
Iwo PlazaandFacebook GitHub Bot 1be7e1a95f Migrate Libraries/Text, Libraries/Share and Libraries/Settings to use export syntax (#48901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48901

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates files in `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` to use `export` syntax.
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot *(intented breaking change)*

Changelog:
[General][Breaking] - Files inside `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: huntie

Differential Revision: D68562844

fbshipit-source-id: bd71a341e33d3629121aa61549139c4b1cd62c3f
2025-01-24 08:49:15 -08:00
Ruslan LesiutinandFacebook GitHub Bot b578647980 Use custom tracks for measures (#48926)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48926

# Changelog: [Internal]

Leverage [`devtools` field](https://developer.chrome.com/docs/devtools/performance/extension#devtools_object) inside [`detail` object](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure#detail) to make extension tracks work.

Right now we are only specifying track name, later we could use many more fields:
```
interface ExtensionTrackEntryPayload {
  dataType?: "track-entry"; // Defaults to "track-entry"
  color?: DevToolsColor;    // Defaults to "primary"
  track: string;            // Required: Name of the custom track
  trackGroup?: string;      // Optional: Group for organizing tracks
  properties?: [string, string][]; // Key-value pairs for detailed view
  tooltipText?: string;     // Short description for tooltip
}
```

In the next few diffs I will extend the spec of the local implementation for `performance.measure` and `performance.mark` to get this propagated correctly.

Reviewed By: huntie

Differential Revision: D68624603

fbshipit-source-id: 99a5d233ee1dbcd690ad8a6802ca993071f63f2c
2025-01-24 08:41:48 -08:00
Ruslan LesiutinandFacebook GitHub Bot 2e5fa4e35d Migrate to Inspector trace (#48923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48923

# Changelog: [Internal]

Starting from this diff, React Native will emit inspector traces, the ones that will have the same UI as if it was recorded in a browser.

We are going to fake it by sending "TracingStartedInPage" event. For a corresponding logic on Chrome DevTools Frontend side, see [this](https://github.com/ChromeDevTools/devtools-frontend/blob/192673131cf3e6e0bcdb4a97bd0bd39c75f1b3c2/front_end/models/trace/handlers/MetaHandler.ts#L68-L80) as a starting point.

Because of this, custom tracks are now grouped under "Timings" track, although with a better color scheme:
- We no longer need the logic for placing tracks under arbitrary thread ids to have them grouped.
- The real support for extension tracks (custom tracks for Performance panel) will be added in the next diff.

Reviewed By: huntie

Differential Revision: D68439734

fbshipit-source-id: 8e5c525a71578375904edc6d473308eb710b5867
2025-01-24 08:41:48 -08:00
Ruslan LesiutinandFacebook GitHub Bot 4b7906bc15 Switch from single Complete event to a pair of Async Nestable events (#48906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48906

# Changelog: [Internal]

It looks like on `Chrome` side, Complete events (`ph="X"`) are only used for Renderer-related events.

For user-land events with duration (non-instant events), there is a [set of supported types](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L62-L65), which don't include `"X"`.

Later, pair of such events will form a [performance measure event](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/types/TraceEvents.ts#L2256-L2258).

Reviewed By: huntie

Differential Revision: D68564754

fbshipit-source-id: dac87ab06c47925a70e03f43f0628364217a06a2
2025-01-24 08:41:48 -08:00
Vitali ZaidmanandFacebook GitHub Bot d85294b953 fix ignoring of temp local project settings for RNTester
Summary: Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D68625659

fbshipit-source-id: b5ce8ff04b5bb678b5fd19bc6fa5d1c5451df3a9
2025-01-24 07:53:32 -08:00
Andrew DatsenkoandFacebook GitHub Bot 1b050b571e Upgrade undici to 5.28.5 (#48898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48898

Changelog: [Internal]

GitHub has identified a security vulnerability in a package dependency defined in the repository, facebook/react-native.

Package name: undici
Affected versions: >= 4.5.0, < 5.28.5
Fixed in version: 5.28.5
Severity: MODERATE

Identifiers
GHSA-c76h-2ccp-4975
CVE-2025-22150

References
https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975
https://nvd.nist.gov/vuln/detail/CVE-2025-22150
https://github.com/nodejs/undici/commit/711e20772764c29f6622ddc937c63b6eefdf07d0
https://github.com/nodejs/undici/commit/c2d78cd19fe4f4c621424491e26ce299e65e934a
https://github.com/nodejs/undici/commit/c3acc6050b781b827d80c86cbbab34f14458d385
https://hackerone.com/reports/2913312
https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f
https://github.com/nodejs/undici/blob/8b06b8250907d92fead664b3368f1d2aa27c1f35/lib/web/fetch/body.js#L113
https://github.com/advisories/GHSA-c76h-2ccp-4975

Reviewed By: NickGerleman

Differential Revision: D68561080

fbshipit-source-id: 7aa71e959ac38f3e0f49d8503a471f60d2f44c5d
2025-01-24 07:06:10 -08:00
Samuel SuslaandFacebook GitHub Bot 70fa456ddc remove explicit calls to root.destroy (#48927)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48927

changelog: [internal]

Remove explicit calls to root.destroy() in favour of automated system that will call it and check for memory leaks.

Reviewed By: rubennorte

Differential Revision: D68624917

fbshipit-source-id: 44be1dee9a56ec31bea5a9eefdda086a4cb4248f
2025-01-24 07:03:27 -08:00
Iwo PlazaandFacebook GitHub Bot e5818d92a8 Migrate files in Libraries/Core to export syntax (#48889)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48889

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates files in `Libraries/Core` to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections
- Appends `.default` to requires of the changed files.
- Changed `* as ExceptionsManager` to `ExceptionsManager` in import statements throughout product code.
- Updates test files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Core` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
[General][Breaking] - `Libraries/Core/ExceptionsManager` now exports a default `ExceptionsManager` object, and `SyntheticError` as a secondary export.

Reviewed By: huntie

Differential Revision: D68553694

fbshipit-source-id: 51c9a404b2762cb1cdb5f56cae3a683ccdfffc7f
2025-01-24 05:43:28 -08:00
Dawid MałeckiandFacebook GitHub Bot d2adb976ab Replace $FlowFixMe in WebSocketInterceptor callbacks (#48702)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48702

Changelog:
[General][Changed] - Improved types in WebSockertInterceptor callbacks

Reviewed By: cortinico

Differential Revision: D68210857

fbshipit-source-id: 4f2a47be6f96e26db25edbaffcbe97b76ffbdc33
2025-01-24 04:51:43 -08:00
Rubén NorteandFacebook GitHub Bot 348b917c58 Move methods to access internals of DOM nodes to a separate module (#48854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48854

Changelog: [internal]

Moves the internals to access instance handle and shadow node from public instances from `ReadOnlyNode` to `NodeInternals` so it's more obvious when people are reaching into internal APIs/state.

Reviewed By: javache

Differential Revision: D67654404

fbshipit-source-id: 1063bc9451eeacb79af34614df3be02466f93fa3
2025-01-24 04:42:45 -08:00
Ruslan LesiutinandFacebook GitHub Bot ad67f8099b add optional id field (#48897)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48897

# Changelog: [Internal]

Adds optional `id` field to Trace Event spec. This field will be required once we are going to emit trace with real custom tracks.

For custom tracks, we would need to emit pair of trace events:
1. Begin Event with type `b`.
2. End Event with type `e`.

They are [matched](https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/helpers/Trace.ts#L261-L294) by Chrome DevTools frontend by `id` and `name` fields.

Reviewed By: huntie

Differential Revision: D68559862

fbshipit-source-id: 732ae52691e31213f9c63474905eb7c1b12adb8c
2025-01-24 04:38:18 -08:00
Ruslan LesiutinandFacebook GitHub Bot df4d9d1cce Split stopTracingAndCollectEvents (#48795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48795

# Changelog: [Internal]

Splitting `PerformanceTracer::stopTracingAndCollectEvents()` into 2 separate methods.

Once we add logic for starting and stopping tracing on `InstanceAgent`:
- We would need to stop tracing everywhere synchronously
- Populate data sources in `PerformanceTracer`, like JavaScript samples
- Collect all events from different data sources in one payload via `PerformanceTracer::collectEvents()`

Reviewed By: huntie

Differential Revision: D68331485

fbshipit-source-id: 0d6b21a522d841f7f734e2fad2e0fc533097fdee
2025-01-24 04:27:55 -08:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 6c6e0a9085 Fix anti-aliasing on older Android devices
Summary:
On older Android versions clipping doesn't have anti-aliasing by default which means that clipping with no border will always make the background not have anti-aliasing.

This is fixed by default on new Background and Border drawables since rendering logic is separated

Moving the clipping logic so it only runs when we have a border.

https://github.com/facebook/react-native/issues/41226

Changelog: [Android] [Fixed] - Fixed anti-aliasing not showing on older Android versions

Reviewed By: javache

Differential Revision: D68279400

fbshipit-source-id: e2383c71bd1ca89f66f42630b3712bb4cc5cd7ac
2025-01-23 20:52:48 -08:00
Joe VilchesandFacebook GitHub Bot 1b710a0cb2 Back out "Allow text links to be navigatable via keyboard by default"
Summary:
This was causing links to not ellipsize and be scrollable. Gonna revert while I see if I can workaround

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D68596950

fbshipit-source-id: 432a059d0b10acbb45d34e0c98763680d280937b
2025-01-23 19:19:13 -08:00
David VaccaandFacebook GitHub Bot 5ea7594b5c Fully rollout enableDeletionOfUnmountedViews feature flag (#48872)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48872

enableDeletionOfUnmountedViews feature flag has been enabled for 4 months with no errors on production, also it's been enabled in OSS since 0.76.
This diff removes the feature flag and fully rollout this fix

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D68511227

fbshipit-source-id: a42481c57aaab2e8c45b952af5e044bf60740df3
2025-01-23 17:38:38 -08:00
Nick GerlemanandFacebook GitHub Bot fae6edb65c Support parsing hsl() and hsla() functions (#48843)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48843

Adds support for hsl() and hsla() funtions. This supports more modern syntax options than normalize-color, like number components, optional alpha, and fills in missing support for angle units. The underlying math was lifted pretty much directly from normalize-color though.

An aside, std::remainder for these is not guaranteed to be constexpr, but Clang is still okay with rgb function parsing to be contexpr because we never try to evaluate non-constexpr function?

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68473990

fbshipit-source-id: 2a71d8367b22f9d1ba6a66598d40ef2683847704
2025-01-23 16:19:48 -08:00
Nick GerlemanandFacebook GitHub Bot 91add1e4e0 Remove redundant check in CSSRatio (#48842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48842

This is a result of inlining isinf previously but we can never be negative infinity because we can never be less than zero.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68474836

fbshipit-source-id: bfce78c4bd269ff2afac99c03250ede676ee1029
2025-01-23 16:19:48 -08:00
Nick GerlemanandFacebook GitHub Bot a4b112cb0b Do not consume delimeter when not consuming component value (#48841)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48841

Right now during parsing we can ask for a next component value, with a delimeter, and even if we don't have a component value to consume, we will consume the delimeter.

This is kind of awkward since e.g. trailing comma can be consumed, then we think syntax is valid. Let's try changing this.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68474739

fbshipit-source-id: 47a942681bc8472ca28470eba821d4d95306ae5d
2025-01-23 16:19:48 -08:00
Nick GerlemanandFacebook GitHub Bot 5b3d8d3410 More spec compliant rgb function parsing (#48839)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48839

In the last diff I mixed and matched `<legacy-rgb-syntax>` and `<modern-rgb-syntax>` a bit to keep compatiblity with `normalze-color`.

Spec noncompliant values have only been allowed since https://github.com/facebook/react-native/pull/34600 with the main issue being that legacy syntax rgb functions are allowed to use the `/` based alpha syntax, and commas can be mixed with whitespace. This seems like an exceedingly rare real-world scenario (there are currently zero usages of slash syntax in RKJSModules validated by `rgb\([^\)]*/`), so I'm going to instead just follow the spec for more sanity.

Another bit that I missed was that modern RGB functions allow individual components to be `<percentage>` or `<number>` compared to legacy functions which only allow the full function to accept one or the other (`normalize-color` doesn't support `<percentage>` at all), so I fixed that as well.

I started sharing a little bit more of the logic here, to make things more readable when adding more functions.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68468275

fbshipit-source-id: f1dfab51b91a3f64436c2559daa3d1e8891db889
2025-01-23 16:19:48 -08:00
Nick GerlemanandFacebook GitHub Bot 24393c7dde Add CSSDelimeter::OptionalWhitespace and CSSDelimeter::CommaOrWhitespaceOrSolidus (#48828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48828

1. Rename `CSSComponentValueDelimeter` to `CSSDelimeter` bc the names are getting way too long.
2. Make the distinction between `Whitespace` and `OptionalWhitespace`. Note that for property values, and function blocks, the value parser will already remove trailing/leading whitespace, but it's weird that whitespace unlike others was not required to be present
3. Add `CSSDelimeter::CommaOrWhitespaceOrSolidus` for simpler parsing in the common pattern of alpha values, and move CSSColor function parsing to use that

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68461968

fbshipit-source-id: 388056e47dfe6ca6003b44e82e00fe416706330b
2025-01-23 16:19:48 -08:00
David VaccaandFacebook GitHub Bot d40f90b5e7 Migrate PackagerStatusCheck to Kotlin (#48838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48838

Migrate PackagerStatusCheck to Kotlin

changelog: [internal] internal

Reviewed By: tdn120, cortinico

Differential Revision: D68467780

fbshipit-source-id: ace98692ebcf96bf0ca36640183c432121d95519
2025-01-23 14:57:33 -08:00
Chi TsaiandFacebook GitHub Bot d9d824055e Add createFromUtf16 JSI method (#48211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48211

Adding the default implementation for `createFromUtf16` method for JSI
String and PropNameId.

Changelog: [Internal]

Reviewed By: tmikov

Differential Revision: D67070206

fbshipit-source-id: 47297e6ae3028ee0e101628aab5bc076fcbbdebc
2025-01-23 14:54:17 -08:00
Jorge Cabiedes AcostaandFacebook GitHub Bot f89f191c26 Go back to object approach instead of manual drawable layer handling for CompositeBackgroundDrawable (#48835)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48835

D65907786 ended up regressing a bit of the performance gains from new Background and Border Drawables. changing back to the previous approach.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68354292

fbshipit-source-id: f2db6d7ad5c1590d5d4d8261d76281f3592f488a
2025-01-23 12:39:25 -08:00
Samuel SuslaandFacebook GitHub Bot 0353648f46 add tests for ScrollView.onScroll (#48891)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48891

changelog: [internal]

add two tests covering onScroll: one for the case where onScroll is triggered multiple times during one UI tick and one where it is triggered once per UI tick.

Reviewed By: rubennorte

Differential Revision: D68499566

fbshipit-source-id: ee25227b620569e3a43038575f04b0a325e5e38b
2025-01-23 11:47:31 -08:00
Samuel SuslaandFacebook GitHub Bot f695411bf3 add isUnique option to Fantom.dispatchNativeEvent (#48801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48801

changelog: [internal]

Adds isUnique option to Fantom.dispatchNativeEvent.

isUnique controls whether only the last event of the same type and target is dispatched to JavaScript or all events are queued and dispatched.

Reviewed By: rubennorte

Differential Revision: D68416157

fbshipit-source-id: 415e7db7d258d60a6bc510d929091153bfdccb3f
2025-01-23 11:47:31 -08:00
Riccardo CipolleschiandFacebook GitHub Bot b9f418e9bc Fix images not displayed when extension is implicit (#48888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48888

We have a report from OSS where Images are not displayed properly in case they are saved on disk with no extension.

We previously had a fix attempt iwith [this pr](https://github.com/facebook/react-native/pull/46971), but this was breaking some internal apps.

This second attempt should work for both cases.

## Changelog:
[iOS][Fixed] - Load images even when the extension is implicit

Reviewed By: cortinico

Differential Revision: D68555813

fbshipit-source-id: bc25970aafe3e6e5284163b663d36e00b3df3d82
2025-01-23 11:37:16 -08:00
Nicola CortiandFacebook GitHub Bot 3702c986ed RNGP - Update comment on INCLUDE_JITPACK_REPOSITORY_DEFAULT (#48896)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48896

This comment is not exact and should be updated.

Changelog:
[Internal] [Changed] -

Reviewed By: yungsters

Differential Revision: D68556425

fbshipit-source-id: 67427ff325809907fdeba1c6a90b84b97713bf5e
2025-01-23 10:52:34 -08:00
Edmond ChuiandFacebook GitHub Bot 9b977def6c Fix app lagging while attempting a connection to Metro (#48895)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48895

Changelog:
[General][Breaking][Fixed] - removed a long-running loop causing the app to lag while attempting a connection to Metro

Round 2: Sorry I broke VR/Java apps in D68023397. Helpful teammates have reverted and Jedi landed it via D68522537.

This diff adds the missing method call that caused the crash:

```
makeNativeMethod(
  "didOpen",
  JCxxInspectorPackagerConnectionWebSocketDelegate::didOpen
)
```

Test plan has been updated to include testing VR Store.

This error wasn't caught by existing automated tests, because it only impacts development builds while using Metro. vzaidman is leading the effort to bring Jest E2E tests on React Native DevTools, which could catch crashes like this.

Original summary in D68023397:

D65952134 fixed the auto-reconnection between Metro and the device.

There's an existing "constructed = connected" contract as [discussed](https://www.internalfb.com/diff/D65952134?dst_version_fbid=3741052436109227&transaction_fbid=581445277659906):

https://www.internalfb.com/code/fbsource/[1592525fbcbb]/xplat/js/react-native-github/packages/react-native/ReactCommon/jsinspector-modern/WebSocketInterfaces.h?lines=16-20

In compliance, busy-waiting was [introduced](https://www.internalfb.com/diff/D65952134?dst_version_fbid=896147259315683&transaction_fbid=427393513742494) in V4 to wait for the connection result in the constructor.

xArthasx [discovered](https://www.internalfb.com/diff/D65952134?dst_version_fbid=896147259315683&transaction_fbid=1406890420289706) a performance issue from this impl via a profiling result.

In favour of async connection results, we're going back to V3 design with the imperative `isConnected()` check to the interface. xArthasx has confirmed this fixes the perf issue.

While I haven't found a compelling reason against removing this contract from the initial design in D52134592, please let me know if I've missed one.

This also means there was a scenario where messages were sent before the websocket is open. Those were dropped silently previously (before the busy-waiting while loop was introduced):

https://www.internalfb.com/code/fbsource/[f7113e167ee1]/fbobjc/VendorLib/SocketRocket/src/SocketRocket/SRWebSocket.m?lines=630-637

This means message senders must now consider the connection state, e.g. by maintaining a pre-connection message queue, if they need to guarantee the messages to be sent.

Reviewed By: robhogan

Differential Revision: D68559198

fbshipit-source-id: afb3d8bfbf949c3324cbf126e9f3e3fc25e50541
2025-01-23 10:43:59 -08:00
Iwo PlazaandFacebook GitHub Bot ecae8a2908 Remove seemingly unused AnimatedWeb file. (#48894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48894

## Motivation
In our efforts to migrate the RN codebase to modern Flow (to enable ingestion by modern Flow tooling) I stumbled upon the `AnimatedWeb.js` file, which does not seems to be imported anywhere throughout the monorepo.

Searching on GitHub for imports to this file in OSS projects returned no results.

In case this file has actual uses outside of Meta (e.g. in OSS), I'll abandon the diff 🙌

## This diff
- Removes `Libraries/Animated/AnimatedWeb.js` file

Changelog:
[General][Breaking] Removed `Libraries/Animated/AnimatedWeb.js` file.

Reviewed By: cortinico

Differential Revision: D68558237

fbshipit-source-id: 319b5e59eb83e518cd123b9f74642e90f0003a4a
2025-01-23 10:32:59 -08:00
Ruslan LesiutinandFacebook GitHub Bot a995ecc9c6 Encapsulate Trace Event format (#48648)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48648

# Changelog: [Internal]

This is the pre-requisite before adding a formatter for conversion from Hermes format-agnostic API for JavaScript samples to Trace Events.

This struct will probably be used a lot around this module and big enough for a separate header.

Reviewed By: huntie

Differential Revision: D68104202

fbshipit-source-id: 93f2816de5a87471c5f7761468ccc52a34a895d6
2025-01-23 10:29:48 -08:00
Rubén NorteandFacebook GitHub Bot 0736234e90 Use test name as a hint for benchmarks (#48882)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48882

Changelog: [internal]

The current hint for benchmarks is that the test body contains `unstable_benchmark` calls, but some benchmarks that need to use feature flags define their test bodies in a separate file, so the file containing the call to `unstable_benchmark` isn't the `-itest.js` one.

This adds a new hint to opt into optimized builds that uses the name of the test instead of its contents. If it contains `-benchmark` then we consider it a benchmark and do the opt in.

Reviewed By: andrewdacenko

Differential Revision: D68102300

fbshipit-source-id: 4c0909969f76b8a7d563959cccf686aefaef700d
2025-01-23 10:26:47 -08:00
Rubén NorteandFacebook GitHub Bot 8702ed5f37 Improve format of benchmark results (#48881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48881

Changelog: [internal]

Small improvement in the printed benchmark results.

Reviewed By: andrewdacenko

Differential Revision: D68552379

fbshipit-source-id: 39312a757a9de57e462c17a9f1455dfe8cab53f1
2025-01-23 10:26:47 -08:00
Andrew DatsenkoandFacebook GitHub Bot c5bab82a60 migrate console-itest to beforeEach/afterEach (#48821)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48821

Changelog: [Internal]
Add setup and teardown to console-itest

Reviewed By: rubennorte

Differential Revision: D68454178

fbshipit-source-id: 277e1125248b860a6fe085a5e47dddf4c5cd12da
2025-01-23 09:45:21 -08:00
Andrew DatsenkoandFacebook GitHub Bot cf6b807745 Add support for (before|after)(Each|All) methods (#48820)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48820

Changelog: [Internal]
Add capability to setup / teardown tests

Reviewed By: rubennorte

Differential Revision: D68454176

fbshipit-source-id: 93c19c91dfe2b8b98385547da24955fd31adbf0b
2025-01-23 09:45:21 -08:00
Iwo PlazaandFacebook GitHub Bot da695f3a20 Migrated components to export syntax (part 4) (#48808)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48808

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot *(intented breaking change)*
- Synchronizes `GoodwillVideoEditorCandidateImage.js` with www, as it was using `require`s that would result in invalid code after this Diff's changes. Added `ReactNativeImage` shim.

Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: yungsters

Differential Revision: D68436611

fbshipit-source-id: 14f33e375e60429ea2340fb49ddf9dc6eb79594f
2025-01-23 09:03:46 -08:00
Samuel SuslaandFacebook GitHub Bot 56a60601da add tests for TextInput.onChange and TextInput.onChangeText (#48899)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48899

changelog: [internal]

Add tests for `TextInput.onChange` and `TextInput.onChangeText`.

Reviewed By: rubennorte

Differential Revision: D68498998

fbshipit-source-id: 212bc251700b343f7290fb7e2a5f2ddfdb68dfd1
2025-01-23 08:59:13 -08:00
Iwo PlazaandFacebook GitHub Bot 7df73eebdc Migrated Libraries/WebSocket/* to export syntax. (#48884)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48884

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates files in `Libraries/WebSocket` to use `export` syntax
- Appends `.default` to requires of the changed files.
- Updates mocks.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/WebSocket` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: cortinico

Differential Revision: D68554260

fbshipit-source-id: 90a660fe9e76b255171189101819253521354fda
2025-01-23 08:55:25 -08:00
Alex HuntandFacebook GitHub Bot b8ee2b3503 Add source transformation pipeline to build-types (#48893)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48893

Updates `build-types` to support source file AST transforms, and templates out an initial `stripPrivateProperties` transform.

- Also, parallelise file translation via `Promise.all`.

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D68558012

fbshipit-source-id: 6eb3881fcf30bf8f4ba045522f6569fbbad14f62
2025-01-23 08:29:09 -08:00
Rubén NorteandFacebook GitHub Bot 8a2b44568d Partially restore feature flag to disable event loop on bridgeless (#48892)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48892

Changelog: [internal]

Reviewed By: javache, Abbondanzo

Differential Revision: D68557746

fbshipit-source-id: d94877d03dc6ea2bf6bca45da77a0a769fa0efeb
2025-01-23 08:12:35 -08:00
Ritesh Kumar ShuklaandFacebook GitHub Bot 317f130267 Update info.ts (#48876)
Summary:
Found this while I was trying to make my own react native info for CI. For android Podfile.lock is being read instead of gradle.properties

## Changelog:

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

Pick one each for the category and type tags:
[INTERNAL][FIXED] - Fixed React native info where Podfile.lock was being read for android

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

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

Reviewed By: blakef

Differential Revision: D68553964

Pulled By: cortinico

fbshipit-source-id: 7d6391195dab0c2230fe86fb465de6d3f94ccbef
2025-01-23 07:19:55 -08:00
Riccardo CipolleschiandFacebook GitHub Bot dab9b3b440 Stop generating the ReactCodegen.podspec in Cocoapods (#48815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48815

In an effort to reduce the responsibility of Cocoapods in React Native, we are moving the generation of the Reactcodegen podspec from Cocoapods itself to the codegen infrastructure.

This reduce the responsibility of Cocoapods and allow us to migrate away from it with more ease.

## Changelog:
[iOS][Changed] - Generate the ReactCodegen.podspec as part of codegen instead of as part of pod install.

Reviewed By: cortinico

Differential Revision: D68418268

fbshipit-source-id: 004ac5b6b3563bf96cc38942f2b48b6f269541c3
2025-01-23 05:38:20 -08:00
Samuel SuslaandFacebook GitHub Bot 3e29cbe1d0 add test for TextInput blut and focus (#48862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48862

changelog: [internal]

Add simple tests that use new `Fantom.dispatchNativeEvent` and `Fantom.runOnUIThread`.

Reviewed By: rubennorte

Differential Revision: D68492472

fbshipit-source-id: 33537ed7a728c2cc01abdcc5aa178b3afa3779fa
2025-01-23 05:30:24 -08:00
Samuel SuslaandFacebook GitHub Bot 864c34e9f6 add event category to Fantom.dispatchNativeEvent (#48855)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48855

changelog: [internal]

add event category argument to Fantom.dispatchNativeEvent.

This gives tests option to control whether an event is continuous, discrete etc.

Reviewed By: rubennorte

Differential Revision: D68413879

fbshipit-source-id: f0c365df505a325440693ca7c3408dd612614946
2025-01-23 04:02:06 -08:00
Alex HuntandFacebook GitHub Bot d4c1c7bfe3 Move experimental type generation into dedicated script (#48867)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48867

Also:
- Rename output dir to `types_generated/`.
- Support source patterns outside of the `react-native` package.

Changelog: [Internal]

Reviewed By: j-piasecki

Differential Revision: D68498211

fbshipit-source-id: 7f9f540efd6d3d2c70b8b1721738f3fea569641d
2025-01-23 02:39:32 -08:00
Ruslan LesiutinandFacebook GitHub Bot 8a586f2fa1 Move setUpReactDevTools to InitializeCore (#48871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48871

# Changelog: [Internal]

Forward-fixing D68380665.

Requirements:
- `setUpReactDevTools` should be called before `setUpErrorHandling` to avoid React DevTools mutating `console.error` call arguments.
- `setUpReactDevTools` should be called after `setUpTimers`, because it is using `queueMicrotask`, see https://fb.workplace.com/groups/rn.panelapps/permalink/1120810879540337/.
- `setUpTimers` should be called after `polyfillPromise`, because it uses on `global.Promise`.

I went over bundles, which are not using `InitializeCore` and using either `setUpErrorHandling` or `setUpDeveloperTools` and updated their order of initialization accordingly.

Reviewed By: javache

Differential Revision: D68510100

fbshipit-source-id: 4331dcc7a7cb1dc438ca2ed5ccae49e736c41b2a
2025-01-22 22:06:43 -08:00
David VaccaandFacebook GitHub Bot c5af75294a Migrate SurfaceHandlerBinding to kotlin (#48870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48870

Migrate SurfaceHandlerBinding to kotlin

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D68480893

fbshipit-source-id: a326d2646212598ded962d25cb8d1caf7a2ed6aa
2025-01-22 22:06:37 -08:00
Tim YungandFacebook GitHub Bot d1028885ee Back out "Fix app lagging while attempting a connection to Metro"
Summary: Reverts {D68023397}

Reviewed By: Abbondanzo

Differential Revision: D68522537

fbshipit-source-id: 1c331969fea898fdee06dd988f86c5e1f034684f
2025-01-22 15:12:57 -08:00
David VaccaandFacebook GitHub Bot 159fc9922c Migrate FabricUIManagerProviderImpl to kotlin (#48869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48869

Migrate FabricUIManagerProviderImpl to kotlin

changelog: [internal] internal

Reviewed By: tdn120, cortinico

Differential Revision: D68480341

fbshipit-source-id: bf0f548230f9c8bcba07fe32a1fde5d9a1d72550
2025-01-22 13:20:37 -08:00
Joe VilchesandFacebook GitHub Bot 98b0991128 Allow text links to be navigatable via keyboard by default (#48773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48773

This diff contains 2 fixes with regards to clickable text accessibility on Android.

1. It allows nested `Text` links to be accessible via keyboard. The accessibility here is a bit unique. The clickable text is not focused in the classical since that Android provides on `View`s (after all, the part being focused is not even a `TextView`. Its a `Span` in a `TextView`). However, it is [selected](https://developer.android.com/reference/android/widget/TextView#setSelected(boolean)), and pressing enter while it is selected will press the text, so for all intents and purposes it is focused. Some quirks here, though, are that you cannot press tab to cycle through the links in text, you have to use arrow keys. And the arrow keys no longer let you move around to the next item (as they are stuck being used to navigate the links). I *could* override this behavior but I do not see much of a point as long as one can actually get to everything on screen in a semi-logical way. Anyway, the fix here is using [`LinkMovementMethod`](https://developer.android.com/reference/android/text/method/LinkMovementMethod) to navigate between clickable spans, which is exactly what that class exists for. Note that I override this class so that touching the links does not actually highlight them like you see in the videos.
2. In the case we state update and remove the "click-ability" of the text, this diff makes it so that Explore By Touch no longer can focus on the link. The code was in the same area so I decided to just lump that together :P

Changelog: [Android] [Fixed] - Allow text links to be navigable via keyboard by default

Reviewed By: javache

Differential Revision: D68306316

fbshipit-source-id: a72145f6b60caf2a8077e1bd2ca987bdde0b82ab
2025-01-22 12:16:14 -08:00
Samuel SuslaandFacebook GitHub Bot 4d96467954 add payload to Fantom.dispatchNativeEvent (#48794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48794

changelog: [internal]

Add payload argument to Fantom.dispatchNativeEvent. For example, in `TextInput.onChange` event, new value of input field must be present in the event payload.

Reviewed By: rubennorte

Differential Revision: D68410469

fbshipit-source-id: eb915f9f961efdfe9902f060173072c6259b7eea
2025-01-22 12:16:11 -08:00
Chi TsaiandFacebook GitHub Bot 7b0f83165e Fix unicode character usage in windows tests (#48840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48840

MSVC unicode handling is causing our windows test to fail. To fix,
simply replace the special characters with the their explicit UTF-16
encoding.

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D68466808

fbshipit-source-id: 1bfc689972e1e5862fe6525bc48d5ebc508a95da
2025-01-22 12:07:20 -08:00
David VaccaandFacebook GitHub Bot 2c50e7043b Implement prop diffing for nativeForegroundAndroid prop (#48834)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48834

Implement prop diffing for nativeForegroundAndroid prop

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D60001410

fbshipit-source-id: c6b5b71ddb66136f9cf61e2cca5aeb6e1274841e
2025-01-22 12:07:06 -08:00
David VaccaandFacebook GitHub Bot 48fad21759 Implement prop diffing for accessibility props in <View> (#48833)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48833

This diff implements the diffing for accessibility props of <View>

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D59972041

fbshipit-source-id: 171381744e0e695cbc144507fa86b2d2ef536c30
2025-01-22 12:07:06 -08:00
David VaccaandFacebook GitHub Bot 2e8720af44 Implement prop diffing for transform props in <View> (#48832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48832

This diff implements the diffing for transform props of <View>

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D59972039

fbshipit-source-id: e4c3beff4c6411595ab83ff62b54b948f9337851
2025-01-22 12:07:06 -08:00
David VaccaandFacebook GitHub Bot 9a5e365865 Implement prop diffing for border props in <View> (#48831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48831

This diff implements the diffing for border props of <View>

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D59972037

fbshipit-source-id: b93a0962616222686a4340cd1e7f2943bd3bc140
2025-01-22 12:07:06 -08:00
David VaccaandFacebook GitHub Bot 4396487742 Implement prop diffing for event props in <View> (#48830)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48830

This diff implements the diffing for event props of <View>

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D59972038

fbshipit-source-id: ddd42068a74862f44ecf374e12d80aaaf493e04f
2025-01-22 12:07:06 -08:00
David VaccaandFacebook GitHub Bot 92d79461e9 Implement prop diffing for basic props in <View> (#48829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48829

This diff implements the diffing for basic props of <View>

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D59972040

fbshipit-source-id: 148b5fc9b73887c153535648182386d75bf9381b
2025-01-22 12:07:06 -08:00
David VaccaandFacebook GitHub Bot 5ee2289298 Introduce getDiffProps for <View> (#45552)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45552

In this diff I'm overriding the getDiffProps for  ViewProps.
The goal is to verify what's the impact of calculating diffs of props in Android, starting with ViewProps.
Once we verify what are the implication we will automatic implement this diffing.

The full implementation of this method will be implemented in the following diffs

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D59969328

fbshipit-source-id: ce141528581e46e9ced4175dca040ddf8bed5ddb
2025-01-22 12:07:06 -08:00
David VaccaandFacebook GitHub Bot 33e0bab567 Mark MemoryPressureRouter as nullsafe (#48740)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48740

Mark MemoryPressureRouter as nullsafe

changelog: [internal] internal

Reviewed By: tdn120

Differential Revision: D68275418

fbshipit-source-id: 8437f017f020e4e9f66916df2661850702b77486
2025-01-22 11:55:11 -08:00
Jin LeeandFacebook GitHub Bot 9b06d0d8a9 Back out "Disable weak event emitter in AttributedString for Apple Silicon Mac running iOS build app" (#48868)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48868

Original commit changeset: ac48be3305eb

Original Phabricator Diff: D68093083

Changelog: [iOS][Removed] - Removed 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

Reviewed By: javache

Differential Revision: D68452788

fbshipit-source-id: 9d3466950c43a10f36ca594997ae5a586d1a2a00
2025-01-22 11:52:34 -08:00
Rubén NorteandFacebook GitHub Bot 04f9451dab Modify public API script to make it opt-in in src/private, instead of opt-out (#48866)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48866

Changelog: [internal]

The current test to create a snapshot of the public API was recently modified to include `src/private` but excluding certain directories from it.

This replaces the opt-out with an opt-in mechanism, where we only use it where necessary (new DOM APIs, etc.).

Reviewed By: huntie

Differential Revision: D68496269

fbshipit-source-id: 6ae056008a6189b493cb27811d21a8619e79009d
2025-01-22 11:24:25 -08:00
Rubén NorteandFacebook GitHub Bot e2c433b657 Move some internal modules to internals directories (#48859)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48859

Changelog: [internal]

Just to make it easier to distinguish between public and private APIs, until we have proper support to extract that automatically.

Reviewed By: huntie

Differential Revision: D68496270

fbshipit-source-id: 83cdf95f7f33eab8835b0913cc468ccaf5e47730
2025-01-22 11:24:25 -08:00
Dawid MałeckiandFacebook GitHub Bot 8befab1760 Replace $FlowFixMe in ScrollViewNativeComponentType (#48858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48858

Changelog:
[General][Changed] - Replaced $FlowFixMe with PressEvent in ScrollViewNativeComponentType

Reviewed By: fabriziocucci

Differential Revision: D68496466

fbshipit-source-id: 19c5738a906908336ef93e339092e6cb6fa2d860
2025-01-22 11:23:21 -08:00
Christoph PurrerandFacebook GitHub Bot d154cd5ba1 Fix data race in TraceSection.h (#48774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48774

[Changelog] [Internal] - Fix data race in TraceSection.h

## Issue
The `instrumentsLogHandle` variable is a static variable that is initialized lazily when the `getOrCreateInstrumentsLogHandle()` function is called. However, this initialization is not thread-safe. Multiple threads may call this function simultaneously, leading to a data race on the `instrumentsLogHandle` variable.

Reviewed By: lyahdav, javache

Differential Revision: D68366837

fbshipit-source-id: d61b85a0299a8d42b9fbcfdbecae78eb410d748f
2025-01-22 10:41:42 -08:00
Dawid MałeckiandFacebook GitHub Bot e31ff4212b Added type for _captureRef in SectionList (#48863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48863

Changelog:
[General][Changed] - Added explicit type for argument in _captureRef in SectionList

Reviewed By: huntie

Differential Revision: D68493326

fbshipit-source-id: 906a13b13e9fc7ee2c61a8d5c7caa72c0656440f
2025-01-22 10:34:21 -08:00
Dawid MałeckiandFacebook GitHub Bot 1be2ba4597 Replace $FlowFixMe in ScrollView (#48857)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48857

Changelog:
[General][Changed] - Improved types in ScrollView

Reviewed By: huntie

Differential Revision: D68496037

fbshipit-source-id: b044e884fb78bb92c0da5acd7570a87ff328a479
2025-01-22 10:00:50 -08:00
Edmond ChuiandFacebook GitHub Bot 0e5adb9128 Fix app lagging while attempting a connection to Metro (#48642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48642

Changelog:
[General][Breaking][Fixed] - removed a long-running loop causing the app to lag while attempting a connection to Metro

D65952134 fixed the auto-reconnection between Metro and the device.

There's an existing "constructed = connected" contract as [discussed](https://www.internalfb.com/diff/D65952134?dst_version_fbid=3741052436109227&transaction_fbid=581445277659906):

https://www.internalfb.com/code/fbsource/[1592525fbcbb]/xplat/js/react-native-github/packages/react-native/ReactCommon/jsinspector-modern/WebSocketInterfaces.h?lines=16-20

In compliance, busy-waiting was [introduced](https://www.internalfb.com/diff/D65952134?dst_version_fbid=896147259315683&transaction_fbid=427393513742494) in V4 to wait for the connection result in the constructor.

xArthasx [discovered](https://www.internalfb.com/diff/D65952134?dst_version_fbid=896147259315683&transaction_fbid=1406890420289706) a performance issue from this impl via a profiling result.

In favour of async connection results, we're going back to V3 design with the imperative `isConnected()` check to the interface. xArthasx has confirmed this fixes the perf issue.

While I haven't found a compelling reason against removing this contract from the initial design in D52134592, please let me know if I've missed one.

This also means there was a scenario where messages were sent before the websocket is open. Those were dropped silently previously (before the busy-waiting while loop was introduced):

https://www.internalfb.com/code/fbsource/[f7113e167ee1]/fbobjc/VendorLib/SocketRocket/src/SocketRocket/SRWebSocket.m?lines=630-637

This means message senders must now consider the connection state, e.g. by maintaining a pre-connection message queue, if they need to guarantee the messages to be sent.

Reviewed By: christophpurrer

Differential Revision: D68023397

fbshipit-source-id: dd80acf75790e77454798c96f06bb0a4ee6afe61
2025-01-22 09:49:01 -08:00
Marc RousavyandFacebook GitHub Bot f830f2c667 feat: Add getConcretePropsShared() (#48710)
Summary:
Adds `getConcretePropsShared()` to `ConcreteShadowNode.h`.

I need this in Nitro Views to update state in-place without throwing away the old state object and creating a new one each time.

From reading the code it seems like you use this pattern a lot tho where you create new State objects each time - so let me know if my thing is a bad idea..

## Changelog:

- [INTERNAL] [ADDED] Add `getConcretePropsShared()` to `ConcreteShadowNode.h`

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

Test Plan: Use in Nitro

Reviewed By: sammy-SC

Differential Revision: D68495697

Pulled By: javache

fbshipit-source-id: e2caa34befcaef2191ec161442c40596cc7de132
2025-01-22 09:17:31 -08:00
Tim YungandFacebook GitHub Bot ab77bdf471 Animated: Feature Flags Cleanup (#48509)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48509

Cleans up the following feature flags from `Animated`:

- `enableAnimatedAllowlist`
- `enableAnimatedPropsMemo`
- `useInsertionEffectsForAnimations`

This will significantly simplify some future planned work here (e.g. T209740497).

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D67867115

fbshipit-source-id: adf35c70d95f42c240342fda3b4f2e9b4bdfe30a
2025-01-22 08:54:58 -08:00
Rubén NorteandFacebook GitHub Bot 0883207e44 Clean up feature flag to disable event loop on bridgeless (#48851)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48851

Changelog: [internal]

Remove the feature flag to disable the event loop on bridgeless, as we no longer have a use case for it. From now on, we can be 100% certain that Bridgeless == Event Loop!

Reviewed By: sammy-SC

Differential Revision: D68270102

fbshipit-source-id: c661bf11f51d4044f9f485b971c43f03197e2983
2025-01-22 08:24:29 -08:00
Iwo PlazaandFacebook GitHub Bot bdb5804f32 Migrated Core/ReactNativeVersion to use export syntax. (#48853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48853

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates the `ReactNativeVersion` template to use `export` syntax.
- Regenerates the `ReactNativeVersion.js` file with the new template.
- Updates jest mock.
- Updates the public API snapshot *(intented breaking change)*

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D68492723

fbshipit-source-id: daa55d3d553aca562cf2e091cd24546681a8db2f
2025-01-22 07:41:04 -08:00
Arushi KesarwaniandFacebook GitHub Bot 44da5d2ee0 Make setLayoutAnimationEnabledExperimental a no-op in Bridgeless (#48856)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48856

Refactor setLayoutAnimationEnabledExperimental in BridgelessUIManager.js to be a no-op in the new architecture

Changelog:
[Android][Fixed] - Make `setLayoutAnimationEnabledExperimental` a no-op in Bridgeless

Reviewed By: javache

Differential Revision: D68313694

fbshipit-source-id: 7a79fad72b1eeda5af3ff629a609d53e4f08f26d
2025-01-22 07:16:44 -08:00
Tim YungandFacebook GitHub Bot c8a387c2d1 VirtualizedList: Delete Batchinator (#48515)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48515

Deletes `Batchinator`, inlines the timer, and cleans up the `disableInteractionManagerInBatchinator` feature flag.

Changelog:
[Internal]

Reviewed By: javache, NickGerleman

Differential Revision: D67885194

fbshipit-source-id: 5f3ec71a02cf1f1b382b41a480beed28fc8c5439
2025-01-22 07:14:37 -08:00
Samuel SuslaandFacebook GitHub Bot ff0bcb2427 introduce Fantom.dispatchNativeEvent (#48793)
Summary:
changelog: [internal]

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

Adds new method `dispatchNativeEvent` to Fantom give option to dispatch fake native events.

The API is expanded in subsequent diffs. The version introduced in this diff supports only dispatching event without payload and without any options.

Reviewed By: rubennorte

Differential Revision: D68331986

fbshipit-source-id: 075360e1d6874794ba6df966087fbe6a0a820cbc
2025-01-22 06:55:18 -08:00
Dawid MałeckiandFacebook GitHub Bot a24f9ef825 Add type for _lastNativeRefreshing and change React import in RefreshControl (#48809)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48809

Changelog:
[General][Changed] - Added explicit type for _lastNativeRefreshing and changed React import syntax in RefreshControl

Reviewed By: cortinico

Differential Revision: D68437259

fbshipit-source-id: e3e842870c485b235e41e1a634b55f2f12b63115
2025-01-22 06:04:25 -08:00
Iwo PlazaandFacebook GitHub Bot ce412746b1 Migrated components to export syntax (part 2) (#48767)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48767

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: yungsters

Differential Revision: D68335872

fbshipit-source-id: eb0c67039edfe92e9e133726f6b01900dd2c2322
2025-01-22 03:43:59 -08:00
Dawid MałeckiandFacebook GitHub Bot b200c7cb2f Replace $FlowFixMeProps in UnimplementedView (#48810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48810

Changelog:
[General][Changed] - Improved Props type in UnimplementedView

Reviewed By: cortinico

Differential Revision: D68437542

fbshipit-source-id: 134b834d77f65a94a6488c21298d79b060ea8109
2025-01-22 03:28:28 -08:00
Dawid MałeckiandFacebook GitHub Bot cd7a30ce48 Replace $FlowFixMe in InteractionManager (#48797)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48797

Changelog:
[General][Changed] - Replaced $FlowFixMe in InteractionManager to Function type

Reviewed By: cortinico

Differential Revision: D68416677

fbshipit-source-id: 4b2adf299021c9008c73e2374092a7ad52da2245
2025-01-22 03:27:05 -08:00
Jakub PiaseckiandFacebook GitHub Bot f1a33c5982 Add generated types to the gitignore (#48848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48848

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68489815

fbshipit-source-id: ddb6e19e1ef060f537bfeacf6d8a916e08cff75b
2025-01-22 03:07:08 -08:00
Mateo GuzmánandFacebook GitHub Bot 480ee4b935 Migrate com.facebook.react.modules.network interfaces to Kotlin (#48679)
Summary:
Migrate com.facebook.react.modules.network interfaces to Kotlin: `ProgressListener`, `CustomClientBuilder` and `NetworkInterceptorCreator`.

## Changelog:

[INTERNAL] - Migrate com.facebook.react.modules.network interfaces to Kotlin

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

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

Reviewed By: javache

Differential Revision: D68186452

Pulled By: mdvacca

fbshipit-source-id: 814bf4c525ba1da49e26046345c71abf2c1e39ce
2025-01-21 21:24:46 -08:00
David VaccaandFacebook GitHub Bot c871c4c93b Delete ViewHierarchyUtil (#48837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48837

ViewHierarchyUtil is a class with package visibility and it is not used, let's delete it

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D68467507

fbshipit-source-id: d1bd5b279a26fcecb4fed590ad2de75937b54aa6
2025-01-21 20:30:29 -08:00
Nick GerlemanandFacebook GitHub Bot 8803dca0bb Support parsing rgb() and rgba() functions into CSSColor (#48827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48827

This teaches the CSSColor parser how to handle these functions.

There are a surprising amount of edge cases here, including many syntactic options added by the CSS Color Module 4 spec, and some technically invalid examples supported by normalize-color, sometimes working in Chrome.

I used the combination of the spec, and existing functionality and tests for `normalize-color`, with the end result supporting a superset of the functionality of both, while being a bit more permissive than either.

I still need to add support for the other color functions, and will probably want to share code here, but for now, just implemented everything for the rgb values as a start.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68362477

fbshipit-source-id: 62973ba2f8361b6a43c7cf9a96029147f84582d2
2025-01-21 20:20:04 -08:00
Nick GerlemanandFacebook GitHub Bot fe3e3a54a3 Simplify consuming solidus separated component values (#48826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48826

This ends up being a not uncommon pattern, so lets make it a bit easier.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68359563

fbshipit-source-id: 94283c8815cf9dd2f6c0d52762d21232383fb311
2025-01-21 20:20:04 -08:00
Nick GerlemanandFacebook GitHub Bot e73d4ff015 Simplify "rollback" on optional or invalid syntax (#48825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48825

Right now we preserve the state of the CSSSyntaxParser across multiple data type parse attempts, so long that a data type parser consumes an additional component value. This requires data type parsers to be careful to not consume additional forward tokens if it may lead to parse error. We can make this model a lot simpler by instead resetting the parser to original state on data type parse error.

We also introduce `peekComponentValue`, and visitor-less `consumeComponentValue` as a convenience, to allow data type parsers to view future component values without advancing, even if the data type parser does return a value, without needing to manually clone the parser.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68357624

fbshipit-source-id: 6ff77bab8ac9eabd5dccea52daa85bbd32b5f2b6
2025-01-21 20:20:04 -08:00
David VaccaandFacebook GitHub Bot 4ed2b35bf6 Fix execution of early InteropEvents (#48823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48823

This diff is fixing the execution of Events that are sent early in the rendering of surfaces.

This diff fixes a bug in the queueing of events that are built with not surfaceId (-1), the fixes is to call getSurfaceManagerForView() to retrieve the proper surfaceId (as we do in the execution of events)

calling getSurfaceManagerForView() has a perf hit, we believe this won't be a problem because this method will only be called in edge cases (no surfaceId and early execution of events)

changelog: [Android][Fixed] Fix execution of early InteropEvents

Reviewed By: shwanton, lenaic

Differential Revision: D68454811

fbshipit-source-id: a79be0b392004e645c48d1683bba774b6b597ca0
2025-01-21 19:03:24 -08:00
David VaccaandFacebook GitHub Bot 2a9a13d567 Reduce visibility of methods in FabricUIManager (#48824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48824

Reduce visibility of methods in FabricUIManager and fix lint warnings

changelog: [Android][Breaking] Reduce visibility of  FabricUIManager.setBinding() method, unused outside of react native

Reviewed By: philIip

Differential Revision: D68459708

fbshipit-source-id: 59081b9a87607b1d35c3fc88bb16e5980cfbd721
2025-01-21 18:58:15 -08:00
David VaccaandFacebook GitHub Bot 10f4772551 Migrate SelectionWatcher to Kotlin (#48747)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48747

Migrate SelectionWatcher to Kotlin

changelog: [internal] internal

Reviewed By: tdn120, cortinico

Differential Revision: D68284145

fbshipit-source-id: 40b7d00fe0be75c5387a169038b1c58a048ac88a
2025-01-21 18:58:13 -08:00
Liron YahdavandFacebook GitHub Bot 6cbdc94456 Add feature flag to enable running JS GC on memory pressure with Bridgeless (#48771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48771

Pre Bridgeless RN iOS apps relied on [RCTCxxBridge](https://www.internalfb.com/code/fbsource/[44b3ff81a2875d66675774f2c71643622ea03c36]/xplat/js/react-native-github/packages/react-native/React/CxxBridge/RCTCxxBridge.mm?lines=376) to tell Hermes to GC when the OS detects memory pressure. With bridgeless we don't use RCTCxxBridge so we don't get that behavior anymore. This adds a feature flag to experiment with getting the same behavior with Bridgeless.

Changelog: [iOS] [Added] - Add feature flag to enable running JS GC on iOS memory pressure with Bridgeless

Reviewed By: yungsters

Differential Revision: D68290689

fbshipit-source-id: d4df16f44e56ad22c2d3d4073b8a870bd7ade645
2025-01-21 17:41:42 -08:00
Tim YungandFacebook GitHub Bot 0ead7de5e8 VirtualizedList: More Resilient Unit Tests (#48819)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48819

Currently, `VirtualizedList-test.js` has a subtle dependency on how asynchronous operations are queued. Specifically, it depends on...

- `Batchinator` to use `setTimeout` for...
- `InteractionManager` to use `setImmediate` for...
- `InteractionManager` to resolve a promise via microtask.

As a consequence, any changes to this queueing logic (e.g. eliminating the unnecessary `setImmediate` and microtask) unnecessarily breaks these unit tests.

This changes the Jest unit tests to instead use `jest. advanceTimersToNextTimer(<step>)` instead of `jest.runOnlyPendingTimers()` so that the unit tests are no longer dependent on these specific queueing logic.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D68449850

fbshipit-source-id: 382b1c0a0d8fade873ccf17a9deb3622a83b8163
2025-01-21 16:43:36 -08:00
Nicola CortiandFacebook GitHub Bot 9afad527b8 Convert HeadlessJsTaskService to Kotlin (#48800)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48800

This just converts yet another class from Java to Kotlin

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D68417564

fbshipit-source-id: 167a27f7f80125cc81a4a0ad57952f1149ef4d7d
2025-01-21 11:02:17 -08:00
Nicola CortiandFacebook GitHub Bot acaf31d175 Collapse the 0.77 changelog (#48811)
Summary:
This collapses all the 0.77 changelog from the various RCs into a single entry.

## Changelog:

[Internal] [Changed] -

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

Test Plan: N/A

Reviewed By: robhogan

Differential Revision: D68438948

Pulled By: cortinico

fbshipit-source-id: 0ef57432901198602863e9769cd2662a0f4e30f6
2025-01-21 10:06:22 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot 0141a44026 fix(ios): add missing nonnull annotations (#48817)
Summary:
This PR adds missing nonnull annotations to make working with Swift better 👍🏻

## Changelog:

[IOS] [ADDED] - Missing nonnull annotations for RCTArchConfiguratorProtocol, RCTUIConfiguratorProtocol.h

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

Test Plan: CI Green

Reviewed By: cortinico, dmytrorykun

Differential Revision: D68443519

Pulled By: cipolleschi

fbshipit-source-id: 53bf128c65421789034f45f637a08ed996684c6f
2025-01-21 09:48:40 -08:00
Marc RousavyandFacebook GitHub Bot f2553d39da feat: Add REACT_NATIVE_VERSION_* definitions to ReactNativeVersion.h (#48813)
Summary:
The `ReactNativeVersion.h` file currently contains a `struct` that holds the React Native version (e.g. `1000.0.0`, as individual ints).

For some libraries, we need to conditionally compile out code when using an older React Native version, and that's where library authors usually set compiler flags that hold the react native version - those are usually resolved using a `node require.resolve` script in the Podspec or build.gradle, adding unnecessary complexity.

With this PR this becomes obsolete as we now create a `#define` that holds the React Native version directly - so e.g.

```cpp
#define REACT_NATIVE_VERSION_MAJOR 0
#define REACT_NATIVE_VERSION_MINOR 67
#define REACT_NATIVE_VERSION_PATCH 1
```

..which we can then use to conditionally compile some code in our libraries:

```cpp
#include <React/ReactNativeVersion.h>
#if REACT_NATIVE_VERSION_MINOR >= 76
  // new stuff
#else
  // fallback
#endif
```

## Changelog:

[INTERNAL] [ADDED] - Added `REACT_NATIVE_VERSION_*` C++ defines to `ReactNativeVersion.h`

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

Test Plan: Just import the header in a library and check if the defines exist!

Reviewed By: cortinico

Differential Revision: D68441049

Pulled By: javache

fbshipit-source-id: 55ac8875e1a3f8ad8b9d12795fed4204e9c5bb77
2025-01-21 09:00:20 -08:00
Fabrizio CucciandFacebook GitHub Bot 00c6b21ecb Build codegen CLI when running yarn test-e2e-local (#48816)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48816

Given the recent changes, the error mentioned in [this](https://fb.workplace.com/groups/1374515773430764/permalink/1406615956887412)  post can show up also when testing iOS.

So here we are building the codegen when running `yarn test-e2e-local` regardless by the platform.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D68441078

fbshipit-source-id: 9067545b61be59ec595142c2e4ba888e20d9a13a
2025-01-21 07:58:52 -08:00
Fabrizio CucciandFacebook GitHub Bot 037687df53 Update changelog for 0.78.0-rc.1 (#48806)
Summary:
Changelog for 0.78.0-rc.1

## Changelog:
[Internal] Changelog

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D68436101

Pulled By: fabriziocucci

fbshipit-source-id: f7f519a43a045a41ed45eb5b590b8130d97f3592
2025-01-21 07:07:29 -08:00
Dawid MałeckiandFacebook GitHub Bot b634fa1edb Add explicit type for _memoizedRenderer and change React and View import in FlatList (#48798)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48798

Changelog:
[General][Changed] - Added explicit type for _memoizedRenderer and changed React and View import in FlatList

Reviewed By: cortinico

Differential Revision: D68417026

fbshipit-source-id: 0af75381f6f8c33be10add940f0791b059de3473
2025-01-21 07:06:39 -08:00
Mateo GuzmánandFacebook GitHub Bot 4f99f0bb1a Convert com.facebook.react.modules.network.ResponseUtil to Kotlin (#48781)
Summary:
As in the title, follow up from https://github.com/facebook/react-native/issues/48075 which added unit tests for this class.

## Changelog:

[INTERNAL] - Convert com.facebook.react.modules.network.ResponseUtil to Kotlin

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

Test Plan:
```bash
./gradlew :packages:react-native:ReactAndroid:test -Dtest.single=com.facebook.react.modules.network
```

Reviewed By: javache

Differential Revision: D68393938

Pulled By: Abbondanzo

fbshipit-source-id: ed214b29ad9248c2da2e2653e75447b0a7e05a26
2025-01-21 07:06:19 -08:00
Mateo GuzmánandFacebook GitHub Bot 299a7a959d Improve ToastAndroid jsdocs (#48779)
Summary:
Was looking into improving some of the type definitions for the `ToastAndroid` component and found out also that some of the options don't work anymore from API 30 – I revamped a bit these definitions to reflect that as I saw questions about it online. These updates could also be added to the website later.

## Changelog:

[GENERAL][CHANGED] - Improve ToastAndroid jsdocs

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

Test Plan: Check the jsdocs look good when using the `ToastAndroid` component in the code.

Reviewed By: cortinico

Differential Revision: D68393949

Pulled By: Abbondanzo

fbshipit-source-id: 4be318062483db5be3825b7b21f540030f6c5b10
2025-01-21 07:03:39 -08:00
Dawid MałeckiandFacebook GitHub Bot 44d84f2af6 Add type for export object in AssetRegistry (#48734)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48734

Changelog:
[General][Changed] - Added type for exported object in AssetRegistry

Reviewed By: cortinico

Differential Revision: D68272679

fbshipit-source-id: 1202009f886b2d35528009a3ac58aab24af9ef82
2025-01-21 07:02:21 -08:00
Iwo PlazaandFacebook GitHub Bot 9eeef22a67 Migrated components to export syntax (part 1) (#48765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48765

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: cortinico

Differential Revision: D68330077

fbshipit-source-id: 6bf00c82f72dbcaaa26470d7ea0917639fc3de4a
2025-01-21 07:00:35 -08:00
Dawid MałeckiandFacebook GitHub Bot 379242eb83 Change ScrollView and React imports in NetworkOverlay (#48796)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48796

Changelog:
[Internal] - Changed ScrollView and React imports in NetworkOverlay

Reviewed By: cortinico

Differential Revision: D68416261

fbshipit-source-id: 3159e14747fe43f25b479f7ef31bdb7daf0a1eb9
2025-01-21 06:59:52 -08:00
Iwo PlazaandFacebook GitHub Bot 09700327f7 Migrated BugReporting, ErrorUtils, Vibration & YellowBox to use export syntax. (#48763)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48763

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates files in `Libraries/BugReporting`, `Libraries/vendor`, `Libraries/Vibration` and `Libraries/YellowBox` to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/BugReporting`, `Libraries/vendor`, `Libraries/Vibration` and `Libraries/YellowBox` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: cortinico

Differential Revision: D68329075

fbshipit-source-id: 7079a54ce3631171f8d7559bc33cab014df1d16d
2025-01-21 01:49:27 -08:00
Iwo PlazaandFacebook GitHub Bot 9a70bc0418 Migrated files in Libraries/Blob to use export syntax. (#48761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48761

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates files in Libraries/Blob to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Blob` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: cortinico

Differential Revision: D68326103

fbshipit-source-id: ff0b5e0125987ed44b34c35f39af1eefa9799d8f
2025-01-21 01:41:44 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 140b3b38df Add prepare-ios script (#48799)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48799

This change moves the same scripts we have to prepare the HelloWorld project to RNTester.
This is something we forgot to do when we were decoupling the reacrt-native from the community CLI.
This is also the base to start deprecating cocoapods and add more configuration steps for the project.

## Changelog:
[Internal] - Copy cli.js script from HelloWorld to RNTester

Reviewed By: cortinico

Differential Revision: D68413419

fbshipit-source-id: 7cf19d86bd3c1beb0c1e7f3380331174352a1651
2025-01-20 12:20:36 -08:00
Rick HanlonandFacebook GitHub Bot b1b5a9e2e5 Improve ExceptionManager tests (#48787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48787

For reasons that will become clear in the next diff, I'm adding more assertions for things like LogBox being called, and the console being called. I also updated the patterns of things like `toHaveBeenCalledWith` vs `toBeCalledWith` so they're consistent throughout the file.

## Changelog:
[internal] - Add tests to ExceptionManager

Reviewed By: hoxyq

Differential Revision: D68397529

fbshipit-source-id: b05073630969c40a86546a6f5c4244836b636ee1
2025-01-20 10:07:00 -08:00
Rick HanlonandFacebook GitHub Bot e015d1b19a ensure react dev tools is patched before console.error (#48784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48784

React requires React DevTools to be the first patch for console methods, because it assumes it is the _last_ on the stack called before calling the real console.

This is because React DevTools adds additional formatting for things like StrictMode dimming, and component stack formatting for browser specific consoles like Chrome and Firefox, where the DevTool extension runs.

If it's not the first patch, then other patches (like logging, or LogBox) will pick up the DevTools additions and include them, which breaks other tools (like the issue show in the screen below).

This diff ensures React DevTools is patched before the React Native console reporter by moving it to `setupErrorHandling`.

## Changelog:

[General] [Fixed] - Always patch React DevTools first so StrictMode dim chars are excluded from logs/logbox.

## Other places?
I'm not sure how we should handle this for the console polyfill or inside useAlwaysAvailableJSErrorHandling yet.

## Screens

### Before
3 errors, 1 with ANSI dim chars:
 {F1974436874}

### After
Just 1:
 {F1974436879}

Reviewed By: hoxyq

Differential Revision: D68380665

fbshipit-source-id: 4f5353bb8da0038088c05ef7414bf91e965c73e2
2025-01-20 10:07:00 -08:00
Rick HanlonandFacebook GitHub Bot 0affa544c3 Show component code frame, if available (#48785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48785

## Overview
This change adds code frames for component stacks if it differs from the call stack frame.

## Background
After adding native stack based stack frames, which we already symbolicate, we had the capability to show a code frame for component stacks as well as the stack frame (if they differ).

However, this usually wasn't that useful, because the native component stack was unlikely to be more useful than the component stack (see the comparisons below for key errors).

## Owner stacks

With owner stacks the component frame is a lot more useful and in many cases are better at showing the location than the call stack frame.

## Example Screens

Before:
{F1974436645}

After (with owner stacks):
{F1974436723}

Changelog:
[General][Added] - Add owner stack code frames to LogBox

Reviewed By: hoxyq

Differential Revision: D68285627

fbshipit-source-id: 541cecbd4786fffd1970d2e85e659757e3f81604
2025-01-20 10:07:00 -08:00
Rick HanlonandFacebook GitHub Bot 967ef32154 Add support for owner stacks (#48782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48782

React currently has a babel transform to replace all `console.error` calls with a special function for RN and www. The function adds component stacks, which doesn't make sense in an owner stack world because:
- not all console.error calls are replaced, creating inconsistency
- oss web users don't append component stacks to console.log any more
- component stacks can be accessed for DEV modals like logbox with `captureOwnerStack`
- owner stacks are already added to the console with createTask if you use console.error directly
- the redirection is the single greatest source of fragility in the logbox reporting pipeline

So we're removing this as part of the owner stack rollout. This should only be enabled with owner stacks.

## Example Screen
Before:
{F1974436644}

After:
{F1974436645}

## Changelog:

[General] [Added] - Add full owner stack support to React Native

Reviewed By: hoxyq

Differential Revision: D68285628

fbshipit-source-id: 9772593d7ac6e012392d18c6796580c14c852074
2025-01-20 08:35:32 -08:00
Dawid MałeckiandFacebook GitHub Bot 1536a7f196 Remove context in addEventListener in Linking (#48726)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48726

Changelog:
[General][Changed] - Removed context from addEventListener arguments in Linking

Reviewed By: rshest

Differential Revision: D68215201

fbshipit-source-id: 011bcd59fe8101df5ecd1b72bb75febdcb60a511
2025-01-20 07:17:38 -08:00
Dawid MałeckiandFacebook GitHub Bot f4b3f1daa3 Change InspectorAgent import syntax in NetworkAgent (#48729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48729

Changelog:
[Internal] - Changed InspectorAgent import syntax in NetworkAgent

Reviewed By: rshest

Differential Revision: D68270365

fbshipit-source-id: d8cea061d82f6fd4c36830820ef8fef2115f1d43
2025-01-20 05:38:58 -08:00
Dawid MałeckiandFacebook GitHub Bot 3c02738ec4 Add explicit types for Types and Properties in LayoutAnimation (#48728)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48728

Changelog:
[General][Changed] - Improved types for exported Types and Properties in LayoutAnimation

Reviewed By: rshest

Differential Revision: D68270119

fbshipit-source-id: 7e9e6e6f20b6c17990b40d423eb4571807004b49
2025-01-20 05:36:41 -08:00
Dawid MałeckiandFacebook GitHub Bot 812c3b33cd Replaced $FlowFixMe in CodegenTypes
Summary:
Changelog:
[General][Changed] Replaced $FlowFixMe in CodegenTypes with Object type

Reviewed By: elicwhite, rshest

Differential Revision: D68327690

fbshipit-source-id: 34b354cd52c786788e86cc4bd7723ddf1e3881fc
2025-01-20 05:30:39 -08:00
Dawid MałeckiandFacebook GitHub Bot 8df6cfa56b Replace $FlowFixMe in RCTDeviceEventEmitter (#48758)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48758

Changelog:
[General][Changed] - Replaced $FlowFixMe in RCTDeviceEventEmitter with any

Reviewed By: rshest

Differential Revision: D68327375

fbshipit-source-id: 30f65308f81d6349c191900ce16036741e71efae
2025-01-20 05:29:30 -08:00
Dawid MałeckiandFacebook GitHub Bot 286a360d9b Replace $FlowFixMe in NativeModules (#48757)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48757

Changelog:
[General][Changed] - Replaced $FlowFixMe in NativeModules with any type

Reviewed By: elicwhite, rshest

Differential Revision: D68327176

fbshipit-source-id: 9cde462853012bbe40d0caa40d0c18fa32c699a1
2025-01-20 05:25:50 -08:00
Dawid MałeckiandFacebook GitHub Bot 5b07743ae9 Add src/private directory in public-api-test.js (#48641)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48641

Changelog:
[Internal] - Added src/private directory to API snap generation in public-api-test.js

Reviewed By: cortinico

Differential Revision: D68102311

fbshipit-source-id: 655734689bbc788f8b4699f787832cfc8c9b2504
2025-01-20 04:26:48 -08:00
Nick GerlemanandFacebook GitHub Bot 22e7691473 Split value parsing tests (#48770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48770

Splits CSSValueParserTest to be file per data type to better match new structure, before we introduce more complexity and tests for CSS colors.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D68351049

fbshipit-source-id: 1a4218e49c8c8adb056fac1dd67f064a4f890775
2025-01-17 15:44:48 -08:00
Nick GerlemanandFacebook GitHub Bot 743de70141 Add CSSComponentValueDelimiter::CommaOrWhitespace (#48769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48769

Must function notations do not require delimiting commas, with color function "legacy" syntax being an exception.

E.g.

```
rgb() = [ <legacy-rgb-syntax> | <modern-rgb-syntax> ]
rgba() = [ <legacy-rgba-syntax> | <modern-rgba-syntax> ]
<legacy-rgb-syntax> =   rgb( <percentage>#{3} , <alpha-value>? ) |
                  rgb( <number>#{3} , <alpha-value>? )
<legacy-rgba-syntax> = rgba( <percentage>#{3} , <alpha-value>? ) |
                  rgba( <number>#{3} , <alpha-value>? )
<modern-rgb-syntax> = rgb(
  [ <number> | <percentage> | none]{3}
  [ / [<alpha-value> | none] ]?  )
<modern-rgba-syntax> = rgba(
  [ <number> | <percentage> | none]{3}
  [ / [<alpha-value> | none] ]?  )
```

Theoretically, this should mean an expression like `rgb(1, 2 0)`, which mixes both comma and whitespace delimeters would be malformed, but both Chrome, and RN's existing `normalize-color` package support this, so to make this pattern easier, we add the ability to scan based on using either whitespace or comma as component value delimiter.

Interestingly, the current spec revision also allows `rgb` function with alpha, or `rgba` function without alpha, which Chrome correctly supports, but `normalize-color` does not.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D68349385

fbshipit-source-id: 05cd756ee20227af4d9ec20edc9e7cfc8cc2c071
2025-01-17 15:44:48 -08:00
Nick GerlemanandFacebook GitHub Bot c33dd62afd Restrict CSSDataTypeParser function and simple block parsing to block scope (#48768)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48768

Right now, if something like `CSSColor` accepted a function notation block (e.g. for `rgb()` syntax), it is given a syntax parser which may extend beyond the scope of the current function block.

This is confusing, but also problematic for the `CSSSyntaxParser` block visiting logic to validate a correct scope exit.

This change makes it so that the `CSSSyntaxParser` passsed to `CSSDataTypeParser` for function and simple blocks is limited to the syntax within the given block. This prevents extra visiblity beyond the block we are trying to parse, and allows the function/simple block visitor to reliably fail parsing if the block is not correctly terminated, or there are unconsumed component values within the block not handled by the data type parser.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D68340127

fbshipit-source-id: 402f2eabdf6df7bce99223c966f22c2158103be5
2025-01-17 15:44:48 -08:00
Iwo PlazaandFacebook GitHub Bot 135277ace1 Migrate AppState and BatchedBridge files to use export syntax. (#48737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48737

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.

## This diff
- Updates files in Libraries/AppState and Libraries/BatchedBridge to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks.
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/BatchedBridge` and `Libraries/AppState` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Reviewed By: robhogan

Differential Revision: D68275767

fbshipit-source-id: 97dc84c04a8dd9c9022e53fc4595302efc848338
2025-01-17 11:19:43 -08:00
Nicola CortiandFacebook GitHub Bot d9a77e1d02 RNGP - Do not access project. during task execution. (#48745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48745

This is the first step in a series of diff to make RNGP more Gradle-compliant (specifically for the sake of configuration caching).

Specifically the problem in those 2 tasks is that we're accessing `project.copy()` and other
functions from the `project` field.

The project should never be accessed at execution time. See more on this here:
https://docs.gradle.org/8.12/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

This diff fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68282777

fbshipit-source-id: 6d474f266b5bc50fba57c8cd478173c995864bbc
2025-01-17 08:56:46 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 6f6a438330 Make sure the New Architecture is the default (#48764)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48764

When working on the [commit](https://github.com/facebook/react-native/commit/eced906bedf0c3d2bbc592cc27965c88278abae3) I forgot a bit that makes sure the New Architecture was the default.

This is change set the New Arch as default properly in RCTAppDelegate. Plus it refreshes the GHA caches by updating the Podfile.lock

## Changelog:
[Internal] - Ensure that the New Arch is turned on in RCTAppDelegate

Reviewed By: alanleedev

Differential Revision: D68329797

fbshipit-source-id: 9df5f805f7d3506129909f0adae5ff597f33ce3c
2025-01-17 08:28:27 -08:00
Jakub PiaseckiandFacebook GitHub Bot 25c0b7ff5e Bootstrap experimental types build for main package (#48661)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48661

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

Changelog: [Internal]

Reviewed By: iwoplaza

Differential Revision: D68102875

fbshipit-source-id: abb77737dc2f46d6caba0d9a4c44b26e8a595cff
2025-01-17 07:58:08 -08:00
Dawid MałeckiandFacebook GitHub Bot b9df812b67 Added types in TouchHistoryMath (#48730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48730

Changelog:
[General][Changed] - Added types in TouchHistoryMath

Reviewed By: rshest

Differential Revision: D68271085

fbshipit-source-id: b5ce3134d7bd7cb23b94761079d1d7753aaa97c1
2025-01-17 07:27:42 -08:00
Mateo GuzmánandFacebook GitHub Bot e39776b1b8 Fix Alert and SafeAreaView examples in dark mode (#48752)
Summary:
Fix Alert and SafeAreaView examples in dark mode. Converting also SafeAreaView examples into functional components

## Changelog:

[INTERNAL] - Fix Alert and SafeAreaView examples in dark mode

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

Test Plan:
<details>
<summary>Screenshots</summary>

| After | Before |
|--------|-------|
| ![Simulator Screenshot - iPhone SE (3rd generation) - 2025-01-16 at 18 10 12](https://github.com/user-attachments/assets/9cbe4403-47bd-452a-9b36-a75a24f792e4) | ![Simulator Screenshot - iPhone SE (3rd generation) - 2025-01-16 at 18 09 47](https://github.com/user-attachments/assets/47706394-f394-4a3e-936c-da2f0716a274) |
| ![Simulator Screenshot - iPhone SE (3rd generation) - 2025-01-16 at 18 07 31](https://github.com/user-attachments/assets/5835e4f9-7f5e-4a9d-963d-501a1a577da7) | ![Simulator Screenshot - iPhone SE (3rd generation) - 2025-01-16 at 15 20 26](https://github.com/user-attachments/assets/d9ff678f-dce3-4684-9a15-bf11c2bab4bd) |

</details>

Reviewed By: cortinico

Differential Revision: D68322518

Pulled By: rshest

fbshipit-source-id: 9f153862efff7ef1e834bac9843f4042dbefbd1b
2025-01-17 06:20:53 -08:00
Yajur GroverandFacebook GitHub Bot 8c06f57860 Add default case to facebook::react::displayModeToInt() (#48711)
Summary:
In the `displayModeToInt()` function, there is no default case defined which is causing the following warning in React Native Windows when trying to build on the New Architecture:
```
##[error]node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): Error C2220: the following warning is treated as an error
D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): error C2220: the following warning is treated as an error [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
##[warning]node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): Warning C4715: 'facebook::react::displayModeToInt': not all control paths return a value
D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): warning C4715: 'facebook::react::displayModeToInt': not all control paths return a value [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
```

Adding the default case removes the warning and resolves the issue. Not sure if using the -1 value in this case is appropriate.

## 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 default case to `displayModeToInt()` function

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

Test Plan: Tested on React Native Windows New Arch application and was able to build successfully.

Reviewed By: javache

Differential Revision: D68265335

Pulled By: rshest

fbshipit-source-id: 4724a4c7391b9bf651a122f5de227a0c5e0b6212
2025-01-17 05:14:55 -08:00
Riccardo CipolleschiandFacebook GitHub Bot eced906bed Re-enable the New Architecture by default (#48755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48755

When [cleaning up the pre-alpha flags](https://github.com/facebook/react-native/commit/9a4b2cecd57dc797f90280be33eb4c80a06aaf72), we disabled the new architecture by default by mistake.

This change fixes that.

## Changelog:
[Internal] - Restore the New Arch by default

Reviewed By: GijsWeterings

Differential Revision: D68323159

fbshipit-source-id: cae96fc7c50319808e0afecf46ebf927e4db254a
2025-01-17 05:07:05 -08:00
Riccardo CipolleschiandFacebook GitHub Bot a7aed70ab1 Fix Dependencies of RCTFabric for RCTInterpolateColorInRange (#48753)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48753

[This commit](https://github.com/facebook/react-native/commit/cc89ddd50bed869013082ad98eb0555a386cf7c9) introduced a dependency between RCTFabric and RCTAnimation because RCTFabric is now using `RCTInterpolateColorInRange` which is defined in `RCTAnimation`.

To unblock the CI, I'm adding the dependency to the RCTFabric.podspec

However, I'm not convinced that this is the proper fix. We should move the function to a common dependency between RCTFabric and RCTAnimation. Probably in `RCTUtils`.

## Changelog:
[Internal] - Fix CI by making RCTFabric depend on RCTAnimation

Reviewed By: GijsWeterings

Differential Revision: D68322935

fbshipit-source-id: 57c8833e348fb69dc1b1703ffeedd3383405b4f8
2025-01-17 05:07:05 -08:00
Riccardo CipolleschiandFacebook GitHub Bot a0ddcd256a Only include ReactCommon and ios platform for TextInput (#48754)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48754

The React-FabricComponent was importing some non-existent files when we build for iOS with cocoapods.

This change fixes it.

## Changelog
[Internal] -  Only include ReactCommon and ios platform for TextInput

Reviewed By: GijsWeterings

Differential Revision: D68319960

fbshipit-source-id: 45ddd7765f6afc0efef6dc1dadea782871fbd779
2025-01-17 05:07:05 -08:00
Sam ZhouandFacebook GitHub Bot 7278ff01d7 Deploy 0.259.1 to xplat (#48751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48751

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D68294434

fbshipit-source-id: 8827369836906464566069cf22b584a4c672ec92
2025-01-16 16:29:30 -08:00
nishan (o^▽^o)andFacebook GitHub Bot cc89ddd50b feat: linear gradient px and transition hint syntax support (#48410)
Summary:
- Adds support for color transition hint syntax in linear gradients. e.g. `linear-gradient(red, 20%, green)`
- Adds `px` support. Combination of `px` and `%` also works.
- Simplified color stops parsing.
- The `processColorTransitionHint` and `getFixedColorStops` is moved to native code so it can support combination of `px` and `%` units as it requires gradient line length, which is derived from view dimensions and gradient line angle.
- Follows CSS [spec](https://drafts.csswg.org/css-images-4/#coloring-gradient-line) (Refer transition hint section) and implementation is referred from [blink engine source](https://github.com/chromium/chromium/blob/a296b1bad6dc1ed9d751b7528f7ca2134227b828/third_party/blink/renderer/core/css/css_gradient_value.cc#L240).

## Changelog:

[GENERAL] [ADDED] - Linear gradient color transition hint syntax and `px` unit support.

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

Test Plan:
Added testcase in processBackgroundImage-test.ts and example in LinearGradientExample.js

<img width="500" alt="Screenshot 2025-01-05 at 11 38 13 PM" src="https://github.com/user-attachments/assets/62858bb7-1dbf-40cf-8dd4-ec0daf84ac1b" />

## Todo

Add testcases for `getFixedColorStops` and `processColorTransitionHint` in native code for both platforms. That's the only downside of moving it out of JS 🤦

Reviewed By: NickGerleman

Differential Revision: D67870375

Pulled By: joevilches

fbshipit-source-id: b91d741f3108c25df8000d220726bf180c64be60
2025-01-16 15:00:37 -08:00
Pieter VanderwerffandFacebook GitHub Bot c65117eba9 Deploy 0.259.0 to fbsource (#48744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48744

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D68279682

fbshipit-source-id: 2a7e19b75863d5fd31037e04fa334efda28de79e
2025-01-16 11:43:13 -08:00
Nick GerlemanandFacebook GitHub Bot 69f761f1ac Allow parser to support generic data types (#48718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48718

This diff looks a bit scary, but it's mostly just structural changes of existing code and some deletion, on a well tested path 😅.

The current parser implementation tries to special case "basic" data types. When I was looking at how to add in support for more complex values, such as lists, function notations, and more compounded types, this distinction ends up not making much sense.

Instead of treating some types as basic, this diff instead moves to a model where a user can declare any structure as a `CSSDataType`, so long as they also supply a parser, which may be visited when iterating through CSS syntax blocks (preserved tokens, function blocks, or simple blocks, which probably won't be used). The user then specifies a list of supported CSS data types to parse, which invokes said parser, calling any defined methods for specific syntax. E.g.

```cpp
struct CSSNumber {
  float value{};
};

template <>
struct CSSDataTypeParser<CSSNumber> {
  static constexpr auto consumePreservedToken(const CSSPreservedToken& token)
      -> std::optional<CSSNumber> {
    if (token.type() == CSSTokenType::Number) {
      return CSSNumber{token.numericValue()};
    }

    return {};
  }

  // Could also accept function block here as well (e.g. for future math
  // expressions)
};

static_assert(CSSDataType<CSSNumber>);
```

```cpp
// Can be one of std::monostate (variant null-type), CSSWideKeyword,
// CSSNumber, CSSLength, or CSSPercentage. In this case, a CSSLength.
auto value = parseCSSProperty<CSSNumber, CSSLength, CSSPercentage>("5px");
```

This breaks a whole lot of assumptions I made a year ago, especially around `CSSValueVariant` which must now be able to handle arbitrary values. For now, for the sake of simplicity, I threw this out, and migrated parser code to use plain-old `std::variant`, which has a downside of being a bit less optimized in terms of storage. I also ended up completely throwing out `CSSDeclaredStyle`, since it would majorly need to change, and we're not going to be migrating style storage quite yet. This change also broke the `CSSProperties.h` property definitions and parsing shorthand a bit, which we will need for value processing later. I also opted to delete this for now (a big centralized list is the wrong structure anyways), but will likely copy bits from its source history later.

Another particular hairy bit, that likely won't bite us in practice, is that some strings may be parseable under different data types. This just adds caller requirement to order the types correctly, instead of precedence being implemented as part of the parser.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D68245734

fbshipit-source-id: 132b11053cf41f57483c89176a9a6dceebb69fad
2025-01-16 11:42:34 -08:00
Nick GerlemanandFacebook GitHub Bot 2b925c8358 Fix unintentional fallthrough in keyword parsing (#48717)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48717

tsia

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68246769

fbshipit-source-id: a5192880423cb00616981f4e1b24b7819062bc3b
2025-01-16 11:42:34 -08:00
Nick GerlemanandFacebook GitHub Bot ddf68eb949 Handle "transparent" color ident (#48716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48716

`transparent` is specced as a special `<named-color>` outside the table the others were derived from. Let's add it, since it is supported today by `normalizeColor`.

https://www.w3.org/TR/css-color-4/#named-colors

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68246770

fbshipit-source-id: 3ff7ed68ebb3d6bc59b24a25d35342620670f0c3
2025-01-16 11:42:34 -08:00
Nicola CortiandFacebook GitHub Bot de5bccf080 Cleanup prealpha logic from the JS Publishing Scripts (#48691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48691

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68206014

fbshipit-source-id: f05eeae3997d52df1127852e03437a387a01f5ad
2025-01-16 11:36:42 -08:00
David VaccaandFacebook GitHub Bot 878185678f Migrate ContentSizeWatcher to kotlin (#48743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48743

Migrate ContentSizeWatcher to kotlin
changelog: [internal] internal

Reviewed By: tdn120

Differential Revision: D68278772

fbshipit-source-id: ba3c88be13aad3c49a8dd3771332b48725ea76c1
2025-01-16 11:36:06 -08:00
David VaccaandFacebook GitHub Bot c5041ea099 Migrate ScrollWatcher to Kotlin (#48742)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48742

Migrate ScrollWatcher to Kotlin

changelog: [internal] internal

Reviewed By: tdn120

Differential Revision: D68278771

fbshipit-source-id: 550c3b6c83999b1d610cb3d75ec91f552d89c028
2025-01-16 11:36:06 -08:00
Nicola CortiandFacebook GitHub Bot 40c18e1259 Remove last tasks.creating invocation inside hermes-engine (#48739)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48739

Follow-up to https://github.com/facebook/react-native/pull/48603
I realized there is one last `tasks.creating` invocation inside `hermes-engine` that needs migration. This fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D68276984

fbshipit-source-id: d58cf64cf41c7943464f15d12c7a04c3cc43ec7d
2025-01-16 11:00:59 -08:00
Rob HoganandFacebook GitHub Bot f30c46efbd Fix "paused on debugger" overlay icon (#48736)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48736

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

This icon was broken by D65457771, identified in [OSS testing for the 0.77 release](https://github.com/reactwg/react-native-releases/issues/724).

By explicitly setting the image for the `Disabled` state to the same as `Normal`, we get the same behaviour as the deprecated [`adjustsImageWhenDisabled = NO`](https://developer.apple.com/documentation/uikit/uibutton/adjustsimagewhendisabled?language=objc) without the need for `configurationUpdateHandler`.

Changelog: [iOS][Fixed] Restore "Paused in debugger" overlay icon

Reviewed By: cipolleschi

Differential Revision: D68274336

fbshipit-source-id: 3f4b84eb7cfb518ca953c721da9885df8f98b437
2025-01-16 10:51:58 -08:00
Samuel SuslaandFacebook GitHub Bot 6fa4cc6085 Back out "Animated: Optimize onUserDrivenAnimationEnded Deopt" (#48733)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48733

Original commit changeset: e7d7e486bbfd

Original Phabricator Diff: D67872307

changelog: [internal]

Reviewed By: yungsters

Differential Revision: D68268701

fbshipit-source-id: 1eb0dcb257c2d568cbc02ab2aa4a16b161797b24
2025-01-16 10:48:23 -08:00
Samuel SuslaandFacebook GitHub Bot 67fc85615a Back out "fix Pressable when transform style is animated" (#48732)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48732

Original commit changeset: e2ac108b064a

Original Phabricator Diff: D68154908

changelog: [internal]

please read summary in D68268701

Reviewed By: yungsters

Differential Revision: D68268700

fbshipit-source-id: ba908e0be5bd171d818efe1bcbb3a97279bafafe
2025-01-16 10:48:23 -08:00
Samuel SuslaandFacebook GitHub Bot b059050c87 Back out "Animated: Defer onAnimatedValueUpdate on Attach + Native" (#48731)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48731

Original commit changeset: 2089100a773e

Original Phabricator Diff: D68236594

changelog: [internal]

please read summary in D68268701

Reviewed By: yungsters

Differential Revision: D68268698

fbshipit-source-id: f122336209c4a5ec480d7a6a37224391eb1d2311
2025-01-16 10:48:23 -08:00
iwaterandFacebook GitHub Bot 0511e2e49a Disable weak event emitter in AttributedString for Apple Silicon Mac running iOS build app (#48583)
Summary:
https://github.com/facebook/react-native/issues/48225 fixed the same problem on Mac Catalyst build, but this crash also happen on a iOS build app running on Apple Silicon Mac.
The weak event emitter in AttributedString attributes is causing a serialization error when typing into a TextInput in a iOS build app running on Apple Silicon Mac.

## Changelog

[iOS][Fixed] - 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

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

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

Reviewed By: javache

Differential Revision: D68093083

Pulled By: cipolleschi

fbshipit-source-id: ac48be3305eb01ff2b62d63283b929e8ab6b250c
2025-01-16 10:09:03 -08:00
Peter AbbondanzoandFacebook GitHub Bot 8a12672e8a Declare shared interface for accessibility delegate methods (#48543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48543

Introduces a shared interface for methods that need to be called by the `ReactScrollViewAccessibilityDelegate`

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D67948151

fbshipit-source-id: 9bafaa0b5f9ad5ba2fd73b7b1929d784fa4951c9
2025-01-16 10:05:30 -08:00
Rob HoganandFacebook GitHub Bot b1938e9026 Add changelog for 0.77.0-rc.7 (#48738)
Summary:
Changelog for 0.77.0-rc.7

## Changelog:
[Internal] Changelog

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D68276563

Pulled By: robhogan

fbshipit-source-id: ae57d179d98cd5200a449adbc1b38909633b10d1
2025-01-16 09:56:25 -08:00
Nicola CortiandFacebook GitHub Bot 44b18b9207 Use Gradle configuration avoidance API (#48603)
Summary:
Since we updated Gradle, I've noticed several warnings related to configuration avoidance API:
https://docs.gradle.org/current/userguide/task_configuration_avoidance.html

We should be using tasks.registerting rather than tasks.creating as this is going to break in Gradle 9/10.
This PR fixes it.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: javache

Differential Revision: D68270870

Pulled By: cortinico

fbshipit-source-id: 0ed44d903692c20d102143082fd0939f4dbeaa88
2025-01-16 08:49:32 -08:00
Peter AbbondanzoandFacebook GitHub Bot bc810e5115 Only apply event throttling to scroll view events (#48712)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48712

Currently, all scroll events can be throttled by the `scrollEventThrottle` value when the intention is only to throttle `onScroll` calls. As a result, the scroll view helper unintentionally drops events unrelated to scrolling, like momentum begin/end. It's imperative that these momentum events dispatch so the scroll view does not lock itself in an "animated" state on the JS side; if locked in an animation state, children of the scroll view will not receive touch events. This can happen when the throttle is sufficiently high and momentum scrolling completes before the throttle time has elapsed.

Changelog:
[Android][Fixed] - Scroll view throttle no longer impacts events other than `onScroll`

Reviewed By: javache, rshest

Differential Revision: D68234045

fbshipit-source-id: d5c11412d3f273811a45e6f61af08d3fcf9f61d5
2025-01-16 07:46:03 -08:00
Parsa NasirimehrandFacebook GitHub Bot 166347ead9 chore(Android): migrate MessageQueueThread and it's implementation to Kotlin (#48652)
Summary:
Continuing our usual journey, this time migrating MessageQueueThread. Was not expecting to see that many assertions in ReactContext.
One important thing to note on this PR: I had to add an extra Throw RuntimeException to `startNewBackgroundThread`. It already had one from the`dataFuture.getOrThrow()`, but if your thread is not associated with a Looper, calling `myLooper` (Line 203 of MessageQueueThreadImpl) Can return null. Until now, this would have been a `NPE`, i just decided to make it a `RuntimeException` with the message `Looper not found for thread`. Let me know if you want me to make that function return a nullable, or throw another message or exception, or if you want me to treat Looper as Nullable in the whole class.

## Changelog:

[INTERNAL] [FIXED] - Migrate MessageQueueThread and MessageQueueThreadImpl to Kotlin

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

Test Plan: <img width="1318" alt="Screenshot 2025-01-13 at 21 03 00" src="https://github.com/user-attachments/assets/462cc8af-4648-4437-9260-5ffa6c69e763" />

Reviewed By: tdn120

Differential Revision: D68155120

Pulled By: rshest

fbshipit-source-id: 1082a832df5b1d8ee64ca7be26e4b85e79152f88
2025-01-16 07:34:03 -08:00
Mateo GuzmánandFacebook GitHub Bot 9f1236eff2 Fix RTL examples in dark mode (#48719)
Summary:
RTL examples are not visible in dark mode.

## Changelog:

[INTERNAL] - Fix RTL examples in dark mode

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

Test Plan:
<details>
<summary>Before and after screenshots</summary>

| Before                                                                                     | After                                                                                     |
|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| ![Screenshot_1737000292](https://github.com/user-attachments/assets/4f36c5d3-ea51-4e9a-a962-b6cafbeb82da) | ![Screenshot_1737000381](https://github.com/user-attachments/assets/42f87100-6452-465b-b1de-e5dd26542459) |
</details>

Reviewed By: Abbondanzo

Differential Revision: D68265351

Pulled By: rshest

fbshipit-source-id: c4abcc3d11240c77248475ee34fbe4f5196e7834
2025-01-16 06:53:09 -08:00
Dawid MałeckiandFacebook GitHub Bot c720000ae0 Change Promise import syntax (#48725)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48725

Changelog:
[Internal] - Changed Promise import syntax

Reviewed By: cipolleschi

Differential Revision: D68214422

fbshipit-source-id: 1a92449dfae85148c680e449348fef0830c38769
2025-01-16 06:13:48 -08:00
Ruslan ShestopalyukandFacebook GitHub Bot 918638c1be Fix crash in TouchEvent when initialized with scroll MotionEvent action (#48723)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48723

## Changelog:
[Internal] -

In certain scenarios `TouchEvent` can be initialized with "unexpected" event actions, such as `ACTION_SCROLL`.

This caused an exception , even though such scenarios may be legitimate.

Reviewed By: javache

Differential Revision: D68265040

fbshipit-source-id: d31881e03d9110bb4f6af38548a4f73a41c54d2b
2025-01-16 04:35:51 -08:00
Dawid MałeckiandFacebook GitHub Bot 0e6cb590ec Replace $FlowFixMe generated in StaticRenderer snap and migrate to the 'export' syntax (#48667)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48667

Changelog:
[General][Changed] - refactored StaticRenderer syntax

Reviewed By: javache, elicwhite

Differential Revision: D68155216

fbshipit-source-id: a9ea2adef8e2d5aeaac5be4ec4a021595c4edf1f
2025-01-16 04:23:20 -08:00
Nicola CortiandFacebook GitHub Bot 1b15f57c25 No need to invoke 'input keyevent 82' on test-e2e-local (#48707)
Summary:
The testing script is making unnecessary call to `input keyevent 82` which causes the Android device to
open the menu.

## Changelog:

[Internal] [Changed] -

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

Test Plan: Tested local with local device

Reviewed By: cipolleschi

Differential Revision: D68215641

Pulled By: cortinico

fbshipit-source-id: 3e2653d8aa0c1e6606d9921f7b3794d0d27ef3f0
2025-01-16 04:11:13 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 198adb47af Fix ruby (#48721)
Summary:
Following the suggestions [here](https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror), it seems that concurrent-ruby has been released tonight and it is bugged. Let's pin it to the right version.

## Changelog:
[iOS][Changed] - Pin 'concurrent-ruby' to a working version

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

Test Plan: GHA

Reviewed By: robhogan

Differential Revision: D68262719

Pulled By: cipolleschi

fbshipit-source-id: fc6410e28cc96f9d3769d3082a77cac0a3efe6db
2025-01-16 02:57:24 -08:00
Dawid MałeckiandFacebook GitHub Bot fa2fac1372 Replace $FlowFixMe in WebSocketEvent (#48693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48693

Changelog:
[General][Changed] - Improved eventInitDict type in WebSocketEvent class

Reviewed By: elicwhite, cortinico

Differential Revision: D68207452

fbshipit-source-id: 55bb62134c2d67f250c5079304a9c2758d9361df
2025-01-16 02:19:54 -08:00
Dawid MałeckiandFacebook GitHub Bot 9a29264ffb Set explicit types in I18nManager exports
Summary:
Changelog:
[Internal] - Added explicit types in I18nManager exports

Reviewed By: elicwhite

Differential Revision: D68214193

fbshipit-source-id: 960ef7b9c0171aed983f4db620bb895ccbff6cd2
2025-01-16 02:08:37 -08:00
Dawid MałeckiandFacebook GitHub Bot 595d8c7fa1 Replace import syntax in ReactNativeTestTools (#48687)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48687

Changelog:
[Internal] - Replaced React and ReactTestRenderer import syntax in ReactNativeTestTools

Reviewed By: javache

Differential Revision: D68205425

fbshipit-source-id: 9dd31b57f3d09f602f8e5746b70e16edaf11cb4e
2025-01-16 02:07:05 -08:00
Dawid MałeckiandFacebook GitHub Bot 68ae3ca5e9 Change flatten import syntax in StyleSheet (#48705)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48705

Changelog:
[Internal] - Changed flatten import syntax in StyleSheet

Reviewed By: elicwhite

Differential Revision: D68213648

fbshipit-source-id: bf6c33387ae9d36b6ce41b57639948c2b4902e55
2025-01-16 02:04:05 -08:00
Dawid MałeckiandFacebook GitHub Bot df9d43f02b Replace $FlowFixMe in TextAncestor (#48704)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48704

Changelog:
[General][Changed] - Improved types in TextAncestor

Reviewed By: fabriziocucci

Differential Revision: D68213115

fbshipit-source-id: d71a2703799b518eb1adb70fb5792165b5956868
2025-01-16 01:48:51 -08:00
Tim YungandFacebook GitHub Bot 843582b8b5 Animated: Defer onAnimatedValueUpdate on Attach + Native (#48715)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48715

{D68154908} fixed a problem with the `onAnimatedValueUpdate` listener not being correctly attached if `__attach` were called before `__makeNative` (which sets `__isNative` to true).

We're potentially seeing production symptoms of stuttering interactions and user responsiveness, after queuing up many operations. Our hypothesis is that in scenarios where `ensureUpdateSubscriptionExists` is being called during `__makeNative` (instead of during `__attach`), a backup of operations occurs leading to these symptoms.

This diff attempts to validate and mitigate this hypothesis by deferring `ensureUpdateSubscriptionExists` to when an `AnimatedValue` instance has had both `__attach` and `__makeNative` invoked.

Changelog:
[Internal]

Differential Revision: D68236594

fbshipit-source-id: 2089100a773ebfc161fb5b567123eb58a893939f
2025-01-15 17:00:44 -08:00
Tim YungandFacebook GitHub Bot e0c0476553 RN: Re-enable useInsertionEffectsForAnimations (#48708)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48708

{D68171721} [facebook/react-native#48678](https://github.com/facebook/react-native/pull/48678) mitigated the bug that necessitated this revert.

Changelog:
[General][Changed] - (Reapply) The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects.

Reviewed By: sammy-SC

Differential Revision: D68217144

fbshipit-source-id: 6796440f2839d897158528642e07869951651327
2025-01-15 10:32:27 -08:00
Devan BuggayandFacebook GitHub Bot e566c1ec06 Implement escape/cancel key press callback for TextInput (#48680)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48680

## Changelog:

[General] [Added] - Adds the escape key to the key press event handler payload.

Reviewed By: shwanton

Differential Revision: D68186072

fbshipit-source-id: 01786c309bff4991c12fa667e933ff6105efe638
2025-01-15 08:34:55 -08:00
Iwo PlazaandFacebook GitHub Bot c89c5d7e3d Migrated Alert/*.js and ActionSheetIOS/*.js to use export syntax. (#48703)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48703

## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling

## This diff
- Updates files in Libraries/Alert and Libraries/ActionSheetIOS to use `export` syntax
  - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks of the related modules
- Updates the public API snapshot (intented breaking change)

Changelog:
[General][Breaking] - Files inside `Libraries/Alert` and `Libraries/ActionSheetIOS` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.

Differential Revision: D68210738

fbshipit-source-id: a984034b165908f75485f2bad33fcccadd865494
2025-01-15 08:23:49 -08:00
Dawid MałeckiandFacebook GitHub Bot 1126bbb149 Add explicit type to supported commands in TextInputNativeCommands (#48688)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48688

Changelog:
[General][Changed] - Added explicit type to supported commands in TextInputNativeCommands

Reviewed By: cortinico

Differential Revision: D68205568

fbshipit-source-id: 53501cdeaf4d790b36156b59f76686e8fef5cc5f
2025-01-15 08:15:37 -08:00
Dawid MałeckiandFacebook GitHub Bot f36bfe5dfa Remove redundant {||} syntax (#48686)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48686

Changelog:
[Internal] - Removed redundant `{||}` syntax

Reviewed By: javache

Differential Revision: D68205038

fbshipit-source-id: f7d3271142b6443a5859c3b668b7aebd3ce3ef3f
2025-01-15 07:07:01 -08:00
Fabrizio CucciandFacebook GitHub Bot e8a64fd638 Migrate rn-tester/IntegrationTests/ImageCachePolicyTest.js to function components (#48701)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48701

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68153254

fbshipit-source-id: 24789c814550cd592cb68a0576c5037088734a75
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot 8c64e0868e Migrate rn-tester/IntegrationTests/SimpleSnapshotTest.js to function components (#48700)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48700

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152855

fbshipit-source-id: 121cb5dd65673121a021da12d10c7a7e118bd0dc
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot 086e93d227 Migrate rn-tester/IntegrationTests/AppEventsTest.js to function components (#48699)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48699

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152557

fbshipit-source-id: 9fa6cad408f6fbd3da513623379b864d0c33c63d
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot f864d6b533 Migrate rn-tester/IntegrationTests/ImageSnapshotTest.js to function components (#48698)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48698

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152467

fbshipit-source-id: 0f747f1646be5a3ca010c2c0e0591f13bfcaf2f4
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot d1153ff468 Migrate rn-tester/IntegrationTests/PromiseTest.js to function components (#48697)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48697

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152416

fbshipit-source-id: 32d6d503ed119f8d7e5b9c139060b61ef44b8768
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot 1a1714300e Migrate rn-tester/IntegrationTests/SyncMethodTest.js to function components (#48696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48696

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152294

fbshipit-source-id: 16b36d4702159528fe99c1a7d54c2c7b58d30349
2025-01-15 06:11:21 -08:00
Fabrizio CucciandFacebook GitHub Bot c33954c80d Migrate rn-tester/IntegrationTests/GlobalEvalWithSourceUrlTest.js to function components (#48695)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48695

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68152232

fbshipit-source-id: 918236f8c9789efab9cc43b85e53fa398909808c
2025-01-15 06:11:21 -08:00
Tim YungandFacebook GitHub Bot 00d272fb3b Animated: Fix onUserDrivenAnimationEnded w/ Insertion Effects (#48678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48678

While diagnosing a recent issue in which `AnimatedValue` instances were not being correctly updated as expected, the insertion effects feature flag was identified as a root cause.

Upon further investigation, it appears that this is because the `onUserDrivenAnimationEnded` listener was not implemented the same way in the two feature flag states:

- When `useInsertionEffectsForAnimations` is disabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in a passive effect, after all nodes have been attached.
- When `useInsertionEffectsForAnimations` is enabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in an insertion effect when attaching nodes.

The bugs occurs because `useAnimatedProps` checks whether native driver is employed to decide whether to listen to `onUserDrivenAnimationEnded`. However, we do not know whether native driver will be employed during the insertion effect. (Actually, we do not necessarily know that in a passive effect, either... but that is a separate matter.)

This fixes the bug when that occurs when `useInsertionEffectsForAnimations` is enabled, by moving the listening logic of `onUserDrivenAnimationEnded` into a passive effect. This is the same way that it is implemented when `useInsertionEffectsForAnimations` is disabled.

Changelog:
[Internal]

Reviewed By: javache, sammy-SC

Differential Revision: D68171721

fbshipit-source-id: 50b23348fd4641580581cacebc920959651f96a7
2025-01-15 05:40:15 -08:00
Mateo GuzmánandFacebook GitHub Bot e7378f0d9e Migrate HeaderUtil to Kotlin (#48676)
Summary:
Migrate `HeaderUtil` to Kotlin.

## Changelog:

[INTERNAL] - Migrate `HeaderUtil` to Kotlin

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

Test Plan:
The file had tests:

```bash
yarn test-android
```

Reviewed By: fabriziocucci

Differential Revision: D68205283

Pulled By: javache

fbshipit-source-id: 23ad7726a5e597d5012eec6b194af3b1e10a8b7a
2025-01-15 04:45:02 -08:00
Nicola CortiandFacebook GitHub Bot d90c278672 Reformat MutationObserver test to comply with yarn lint --fix (#48692)
Summary:
Whenever I run `yarn lint --fix` I noticed that this test is not formatted correctly. This fixes it.

## Changelog:

[Internal] [Changed] -

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

Test Plan: CI

Reviewed By: sammy-SC

Differential Revision: D68207001

Pulled By: cortinico

fbshipit-source-id: 2a6c44ca02249f6662b03c87f0c4d4f3eb5a3054
2025-01-15 04:43:50 -08:00
Nicola CortiandFacebook GitHub Bot 9a4b2cecd5 Cleanup prealpha logic from Cocoapods (#48690)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48690

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68205691

fbshipit-source-id: 22a3416335052a4bf6a76faa6e6af622254a6e56
2025-01-15 04:30:37 -08:00
Nicola CortiandFacebook GitHub Bot 63442d3757 RNGP - Cleanup prealpha logic from the Gradle Plugin (#48689)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48689

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] - RNGP - Cleanup prealpha logic from the Gradle Plugin

Reviewed By: cipolleschi

Differential Revision: D68205665

fbshipit-source-id: 81d5257544df97b566421164944e3b6e71f06635
2025-01-15 04:30:37 -08:00
LeviandFacebook GitHub Bot c09b71b990 Fabric: Support stylistic sets for fontVariant (#48674)
Summary:
In the old arch, stylistic sets were supported however in the new arch support was not added. It seems that fontVariant support was actually initially missed on iOS fabric however a limited version was added in https://github.com/facebook/react-native/pull/44112 . I referenced that PR and also old arch implementation for these changes.
<img width="480" alt="Screenshot 2025-01-14 at 11 15 18 AM" src="https://github.com/user-attachments/assets/ec32a356-fadd-4281-83b9-15871bbcd18f" />

## Changelog:

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

Pick one each for the category and type tags:

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

[GENERAL] [ADDED] - Support stylistic sets for fontVariant

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

Test Plan:
- Verified that the "Unsupported FontVariant" native log no longer displays on both platforms
- On iOS was easy to test in the tester app as SF supports stylistic sets by default:
```
<Text>
  Stylistic{'\n'}
  <Text>Normal: ${'\n'}</Text>
  <Text style={{fontVariant: ['stylistic-four']}}>
    Stylistic Four: $
  </Text>
</Text>
```

<img width="391" alt="Screenshot 2025-01-14 at 11 59 29 AM" src="https://github.com/user-attachments/assets/1ede258e-783f-448f-8300-4c8c710796ef" />

- On Android I could not find any system fonts that support stylistic sets by default so I added Raleway and confirmed with a W character
![image](https://github.com/user-attachments/assets/e4b661ba-0013-4e60-90d0-1864be538159)

I did not add font variant example to the tester apps as I felt it could be confusing for people at a glance to understand why there is only a system font example on iOS and why I chose the specific stylistic set.

Reviewed By: cipolleschi

Differential Revision: D68205738

Pulled By: javache

fbshipit-source-id: 03ce572d3c8ecafca71fe00fc0e88eeafc2558bb
2025-01-15 04:23:39 -08:00
Pieter De BaetsandFacebook GitHub Bot a18bc58645 Provide default implementation of ViewManager#getDelegate (#48664)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48664

Simplify ViewManager base-class by making `ViewManager`'s delegate non-nullable and using a single path for updating properties.

The ViewManagerDelegate API can map back to the original ViewManagerSetter API transparently, allowing us to remove the codepath from `ViewManagerPropertyUpdater`.

Changelog: [Android][Removed] `ViewManagerPropertyUpdater.updateProps` is deprected, use the related ViewManager APIs instead

Reviewed By: mdvacca, rshest

Differential Revision: D68120420

fbshipit-source-id: cd8b906dc36d4803dbe09ee0283654285eb81fd4
2025-01-15 04:05:47 -08:00
Pieter De BaetsandFacebook GitHub Bot 54ac150324 Convert com.facebook.react.uimanager.ViewManagerPropertyUpdater to Kotlin (#48658)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48658

Migrate to Kotlin before I make further changes to this. Generics are really tricky due to our previous usage of raw generics on the Java side, but were worked around by some combination of unchecked cast and `Nothing`

Changelog: [Internal]

Reviewed By: mdvacca, rshest

Differential Revision: D68102210

fbshipit-source-id: 90013f09db0826f571a4e2a84132ae3b49fa299d
2025-01-15 04:05:47 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 5b1877fb3f Create changelog for 0.78.0-rc.0 (#48685)
Summary:
Add changelog for 0.78.0-rc.0

## Changelog:
[Internal] - Add changelog for 0.78.0-rc.0

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D68205113

Pulled By: cipolleschi

fbshipit-source-id: f3f572e1da475ef6229b2432d3fff821ec2f5ae1
2025-01-15 03:06:55 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 559d070e8e Use RNTester App downloaded from CI instead of building (#48637)
Summary:
This change improves the E2E testing by downloading the iOS RNTesterApp that is built in CI instead of building it locally. This should let us save 10 to 20 minutes when we test a new release.

## Changelog:
[Internal] - Use the RNTester app built in CI for release testing on iOS

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

Test Plan:
- build the app in ci
- run `yarn test-e2e-local -c <my-token>` and `yarn test-e2e-local -h false -c <my-token>` and verify that the iOS app is not built, but run in the simulator

Reviewed By: cortinico

Differential Revision: D68161477

Pulled By: cipolleschi

fbshipit-source-id: 577d110f9ff0197a2d3348a08a60e60a4d0a752b
2025-01-15 01:04:29 -08:00
Joe VilchesandFacebook GitHub Bot 3420eb87b0 Allow text inputs to handle native requestFocus calls (#48547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48547

For some unknown reason, we have been swallowing [`requestFocus`](https://developer.android.com/reference/android/view/View#requestFocus(int) calls since `TextInput` is a controlled component - meaning you can control this components value and focus state from JS. This decision was originally made pre 2015 and I cannot find the reason why

I do not think this makes sense. We can still request focus from JS, while allowing the OS to request focus as well in certain cases and we would still be controlling this text input.

This is breaking keyboard navigation. Pressing tab or arrow keys will no-op if the next destination is a `TextInput`. This is because Android will call `requestFocus` from [here](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/view/ViewRootImpl.java;l=7868?q=performFocusNavigation) when handling key events. Notably, Explore By Touch (TalkBack) swiping gestures WOULD focus `TextInputs` since they go through `ExploreByTouchHelper` methods which we override to call the proper `requestFocusInternal()` method.

**In this diff**: I move the logic in `requestFocusInternal()` into `requestFocus`.

Changelog: [Android] [Fixed] - TextInputs can now receive focus via external keyboard

Reviewed By: NickGerleman

Differential Revision: D67953398

fbshipit-source-id: 506006769a7c8a63f0a9b7ce27cfbe8578777790
2025-01-14 16:31:52 -08:00
Rayner KristantoandFacebook GitHub Bot 0f1d4704df Revert D68017325: Migrate StyleSheet/*.js to use export statements
Differential Revision:
D68017325

Original commit changeset: 3c5b94742f10

Original Phabricator Diff: D68017325

fbshipit-source-id: d7ea1edfe9cca151560e9c0e5554a07153cdb8da
2025-01-14 15:22:26 -08:00
Riccardo CipolleschiandFacebook GitHub Bot b3648be84f Bump maestro to see if it improves stability (#48677)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48677

E2E tests are flaky again.
Let's bump maestro to see if stability improves.

This will also remove some noise from the logs, make them easier to read.

## Changelog
[Internal] - Bump maestro version

Reviewed By: cortinico

Differential Revision: D68160005

fbshipit-source-id: 40a25f974dfda75785bf08d8d236e771b44d13cf
2025-01-14 13:32:51 -08:00
Fabrizio CucciandFacebook GitHub Bot 9d1e24cb2f Migrate rn-tester/IntegrationTests/IntegrationTestHarnessTest.js to function components (#48671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48671

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68151272

fbshipit-source-id: 5d42da93ab4fe8aaf34b8916a6d0a234f51c235a
2025-01-14 12:18:41 -08:00
Samuel SuslaandFacebook GitHub Bot 2204ec94d4 fix Pressable when transform style is animated (#48672)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48672

## Changelog:

[General] [Fixed] - Buttons becoming unresponsive when transform is animated

# The problem

D67872307 changes when `ensureUpdateSubscriptionExists`  is called to in `__attach`. This breaks the functionality because `__attach` is called before flag `__isNative` is set and subscriptions are never setup.

# Fix

The diff sets up subscriptions in `__makeNative` method.

Reviewed By: yungsters

Differential Revision: D68154908

fbshipit-source-id: e2ac108b064a66dda08902653d6bd20286f92458
2025-01-14 11:05:07 -08:00
Luna WeiandFacebook GitHub Bot e3c63cfd34 Remove native optionality (#48653)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48653

Changelog:
[General][Changed] - Mark intersectionRect required in NativeIntersectionObserverEntry

Reviewed By: rubennorte

Differential Revision: D68120751

fbshipit-source-id: 196b3d48cf33721031a0c2a9fa0a55d250926cbe
2025-01-14 09:58:50 -08:00
Dawid MałeckiandFacebook GitHub Bot 48cafc0b69 Replace $FlowFixMe in StatusBar (#48662)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48662

Changelog:
[General][Changed] - Improved types in StatusBar by adding StackProps

Reviewed By: javache

Differential Revision: D68152452

fbshipit-source-id: a1ec30526e78eb7205e786ae1d0209037e4a0aba
2025-01-14 09:51:04 -08:00
Nicola CortiandFacebook GitHub Bot 6368555ab0 RN-Tester: Reorder buttons in the New Architecture sample (#48666)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48666

The New Architecture sample is getting too big and the two views are not visible anymore.
I'm fixing this but having buttons side by side.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68153245

fbshipit-source-id: 5557fd40f81078fe3994d8efe0e73784e043ed78
2025-01-14 09:15:36 -08:00
Nicola CortiandFacebook GitHub Bot ef7f714f57 Remove unnecessary LICENSE-docs (#48670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48670

The `LICENSE-docs` was needed when this repo was also containing the reactnative.dev docs.
As this is not the case anymore, this file is unncessary.

Changelog:
[Internal] [Changed] - Remove unnecessary LICENSE-docs

Reviewed By: cipolleschi

Differential Revision: D68156336

fbshipit-source-id: 489bf2cb95916c20eb61bfb00e34b8e271bc08e3
2025-01-14 08:53:58 -08:00
Fabrizio CucciandFacebook GitHub Bot 51fb5ab87a Migrate rn-tester/IntegrationTests/AccessibilityManagerTest.js to function components (#48663)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48663

As per title.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D68151132

fbshipit-source-id: 6fd9c4999a95a6888795c5200aafb15ff623479f
2025-01-14 08:45:21 -08:00
Thomas NardoneandFacebook GitHub Bot a511c1bdee Fix null safety in views/text/frescosupport (#48612)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48612

Manual fixes to resolve nullsafe issues.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D67992722

fbshipit-source-id: a26cde9788bc3456ec756326208b4907ad989d4e
2025-01-14 08:28:03 -08:00
Thomas NardoneandFacebook GitHub Bot 8b8b0ba5dc Mark nullsafe fixmes in views/text/frescosupport (#48613)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48613

First step for nullsafe - annotate and mark fixmes

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D67992721

fbshipit-source-id: 0c0a3ac7d4442d35bba1f48d6aabf13a3a1d47c2
2025-01-14 08:28:03 -08:00
Samuel SuslaandFacebook GitHub Bot c799aa07e2 Back out "RN: Enable useInsertionEffectsForAnimations" (#48669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48669

Original commit changeset: d09b2f1b7607

Original Phabricator Diff: D65906157

## Changelog:

[General] [Fixed] - Buttons becoming unresponsive when transform is animated

Reviewed By: yungsters

Differential Revision: D68152746

fbshipit-source-id: aa0c0aa3243c67c95128a75b40dd6aa1251abbca
2025-01-14 08:20:05 -08:00
Riccardo CipolleschiandFacebook GitHub Bot f44ff97c47 Properly test JSC for template_app e2e tests (#48656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48656

While working on 0.78, I realize we were not testing the template app with JSC.

This change should fix this.

## Changelog:
[Internal] - Disable Hermes for the JSC E2E tests with Maestro

Reviewed By: cortinico, fabriziocucci

Differential Revision: D68147849

fbshipit-source-id: 4fbe005b5d04d6163a37041d1bd57fd48a9dfda8
2025-01-14 08:11:25 -08:00
Dawid MałeckiandFacebook GitHub Bot 9f7bacaa6b Add explicit types for methods from AnimatedImplementation in AnimatedMock (#48610)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48610

Changelog:
[Internal] - Improved typings for AnimatedImplementation methods exported from AnimatedMock

Reviewed By: huntie

Differential Revision: D68019816

fbshipit-source-id: ee73213c0b519be9b72b8dfb2e91a125021de63e
2025-01-14 07:31:54 -08:00
Wojciech LewickiandFacebook GitHub Bot 07769d4d7e feat: Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost (#48338)
Summary:
On bridgeless mode, `reactHost` is kept in memory even after destroying the `DefaultReactNativeHost` in brownfield scenario. Since it keeps references to the modules, they are not deallocated, and their `initialize` methods are not fired again when creating new instance of `react-native` later. It breaks the behavior of e.g. `react-native-screens`, which wants to listen for mutations and should get new `FabricUIManager`: https://github.com/software-mansion/react-native-screens/blob/20b7e83782cd5f79ddd0d61dadc13eeb4db4b258/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt#L45.

In this commit we change the `DefaultReactNativeHost.clear()` method to also invalidate the instance retained inside `DefaultReactHost`

## Changelog:

[ANDROID] [FIXED] - Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost

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

Test Plan: In brownfield scenario, destroy the instance of RN and see that modules are also destroyed.

Reviewed By: cipolleschi

Differential Revision: D67977140

Pulled By: cortinico

fbshipit-source-id: 1804f093ab1a905bef499078ddec32a13c50cc85
2025-01-14 07:31:35 -08:00
Dawid MałeckiandFacebook GitHub Bot 8b5e2ea683 Replace ExactReactElement_DEPRECATED in ScrollViewStickyHeader (#48659)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48659

Changelog:
[Internal] - Replaced ExactReactElement_DEPRECATED with React.Node as a children type in ScrollViewStickyHeader

Reviewed By: fabriziocucci

Differential Revision: D68151420

fbshipit-source-id: d4406de67176ae1fea95b8b2ea85f41dc7f5045e
2025-01-14 07:16:41 -08:00
Nicola CortiandFacebook GitHub Bot b7eccf23de Back out "Do not reset rn-artifacts-version on release branch" (#48651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48651

Original commit changeset: dace7c931ec3

Original Phabricator Diff: D67975049

Reviewed By: cipolleschi

Differential Revision: D68114130

fbshipit-source-id: 9fb1707191037127b9ae985d2e3298a64e911590
2025-01-14 07:09:27 -08:00
Nicola CortiandFacebook GitHub Bot 85f9939031 Fix crash for Hermes Release due to HermesExecutor migration (#48660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48660

RN-Tester is currently instacrashing on release due to a migration to Kotlin for HermesExecutor
This fixes it.

Changelog:
[Internal] [Changed] - Fix crash for Hermes Release due to HermesExecutor migration

Reviewed By: javache

Differential Revision: D68151666

fbshipit-source-id: 31f404ec518831cf2151dc670cdf8553427ae8ab
2025-01-14 06:12:00 -08:00
Iwo PlazaandFacebook GitHub Bot e4d969a4ab Migrate StyleSheet/*.js to use export statements (#48609)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48609

# Motivation
This is an attempt at modernizing the export syntax in some of the files in `Libraries/StyleSheet/`. It will allow these files to get properly ingested by modern Flow tooling.

# This diff
- Migrates the use of `module.exports` into `export default` for files located in `Libraries/StyleSheet/*.js`. Some files were omitted due to ballooning complexity, but will be addressed in other Diffs.
- Updating internal *require*s to use ".default", no product code seems to be affected.
- Migrating `require`s into `import`s where applicable, taking into account the performance implications (context: https://fb.workplace.com/groups/react.technologies.discussions/permalink/3638114866420225/)
- Updates the current iteration of API snapshots (intended).
- Updates `react-native-codegen`'s require of processColorArray, analogous to D42346452.

Changelog:
[General][Breaking] - Deep imports from some files in `StyleSheet/` can break when using the `require()` syntax, but can be easily fixed by appending `.default`

Reviewed By: javache

Differential Revision: D68017325

fbshipit-source-id: 3c5b94742f101db0b2914c91efab6003dba2b61a
2025-01-14 05:34:18 -08:00
Fabrizio CucciandFacebook GitHub Bot d95909ea15 Migrate rn-tester/js/components/RNTesterTitle.js to function components (#48649)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48649

As per title.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D68099051

fbshipit-source-id: 867010b692e6d71e4683cc12b4455be730413268
2025-01-14 03:20:05 -08:00
Fabrizio CucciandFacebook GitHub Bot 817cb17f78 Migrate rn-tester/js/examples/Layout/LayoutExample.js to function components (#48646)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48646

As per title.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D68098856

fbshipit-source-id: ad878569f5b88afa57895b4b08de32c880ee8242
2025-01-14 03:20:05 -08:00
Dawid MałeckiandFacebook GitHub Bot 2056794d24 Refactor import syntax that caused $FlowFixMe generation in snap (#48639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48639

Changelog:
[Internal] - refactored import syntax in File, ElementProperties, Inspector, InspectorOverlay, InspectorPanel, PerformanceOverlay, Modal, YellowBoxDeprecated

Reviewed By: andrewdacenko

Differential Revision: D68099152

fbshipit-source-id: a0d840a6000fd3974a3ce4673455180a8be66288
2025-01-14 03:08:44 -08:00
Dawid MałeckiandFacebook GitHub Bot 647ca90a30 Replace $FlowFixMe in AnimatedWeb (#48633)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48633

Changelog:
[General][Changed] - Improved types in AnimatedWeb

Reviewed By: huntie

Differential Revision: D68092072

fbshipit-source-id: 396efffc64030b0b2d4085f969b92c422b227c0d
2025-01-14 02:59:52 -08:00
David VaccaandFacebook GitHub Bot 2d320fbd76 Cache ViewManagerDelegate on ViewManagers (#48550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48550

Cache ViewManagerDelegate on ViewManagers

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D67957883

fbshipit-source-id: 8ec2f34fca04833e391b0bd5b9329cdc9ee12f08
2025-01-13 23:39:45 -08:00
Fabrizio CucciandFacebook GitHub Bot 980458c061 Migrate rn-tester/js/components/RNTesterButton.js to function components (#48645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48645

As per title.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D68098118

fbshipit-source-id: 09f9c318afc210ca2ce6967dac7109544ef6717c
2025-01-13 13:07:44 -08:00
Pieter De BaetsandFacebook GitHub Bot 5a290c4cab Fix nullability of ViewManagerDelegate method args (#48602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48602

See context in D64532446 / https://github.com/facebook/react-native/pull/47086

These argument types were already consumed as nullable in various OSS libraries, which prevents correct Kotlin migration of this code.

Changelog: [Android][Changed] Deprecated ViewManagerDelegate#setProperty and ViewManagerDelegate#receiveCommand

Reviewed By: mdvacca

Differential Revision: D67277871

fbshipit-source-id: a0743584891c7b2b4b50fff11de15da0078d5a1a
2025-01-13 10:54:37 -08:00
Fabrizio CucciandFacebook GitHub Bot 90d2f65301 Migrate rn-tester/js/examples/AppState/AppStateExample.js to function components (#48644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48644

As per title.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D68095480

fbshipit-source-id: 2487fa5e66d672883cbfde0c68348a90db09d484
2025-01-13 10:47:13 -08:00
Fabrizio CucciandFacebook GitHub Bot 05e8007e12 Migrate rn-tester/js/examples/OrientationChange/OrientationChangeExample.js to function components (#48643)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48643

As per title.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D68095232

fbshipit-source-id: fdf45a3bb64c590ea21222a02ae94d975579db49
2025-01-13 10:47:13 -08:00
Fabrizio CucciandFacebook GitHub Bot 1e0009407d Migrate rn-tester/js/components/TextInlineView.js to function components (#48640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48640

As per title.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D68095013

fbshipit-source-id: a593af63029352844e544245d88e7b4c9d7eb75c
2025-01-13 08:59:43 -08:00
Parsa NasirimehrandFacebook GitHub Bot 12e321daf0 chore(Android): Migrate Hermes Executor to Kotlin (#48617)
Summary:
Migrating HermesExecutor and it's factory to Kotlin. Not sure if the TAG in HermesExecutorFactory is needed anymore or not, but the rest of the changes are pretty bog standard

## Changelog:

[INTERNAL] [FIXED] - Migrate HermesExecutor and HermesExecutorFactory to Kotlin

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

Test Plan:
`./gradlew test`:
<img width="1266" alt="Screenshot 2025-01-11 at 04 01 12" src="https://github.com/user-attachments/assets/c0f1402c-796b-45fa-9ee3-41c5a5ffc356" />

Reviewed By: tdn120

Differential Revision: D68094681

Pulled By: cortinico

fbshipit-source-id: 16eae5c7c24886421cbd2cbf213295134a9c01cf
2025-01-13 08:44:05 -08:00
Thomas NardoneandFacebook GitHub Bot c7785e7ead Convert ReactTextInlineImageShadowNode (#48576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48576

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D67981753

fbshipit-source-id: 5d8a2408af9af350c0d3b369677ff8ee00335554
2025-01-13 08:39:18 -08:00
Rubén NorteandFacebook GitHub Bot fe8d102663 Create placeholder for User Timing API tests (#48634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48634

Changelog: [internal]

Just a placeholder to add new tests in the future.

Reviewed By: sammy-SC

Differential Revision: D68093342

fbshipit-source-id: 1e1d7fd71865763ef66b3bb1c76ff8b8ebca9fd9
2025-01-13 07:01:03 -08:00
Riccardo CipolleschiandFacebook GitHub Bot 671520943f Remove build codegen from Cocoapods (#48631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48631

This step is already carried out by [generate-artifact-executor](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/codegen/generate-artifacts-executor.js#L385) if needed.

We can remove it from cocoapods and this will make it easier to migrate away from them.

For 3rd party apps that uses a specific version of React Native, codegen is shipped in NPM as already built in the react-native/codegen package.

This change really affects only the React Native monorepo.

## Changelog
[Internal] - Remove build codegen step from cocoapods

Reviewed By: cortinico

Differential Revision: D68019743

fbshipit-source-id: 7aaf9275886ba8b86d38d943d2b26bd8eed11aa8
2025-01-13 07:00:12 -08:00
3269 changed files with 202920 additions and 94680 deletions
-4
View File
@@ -1,4 +0,0 @@
# Circle CI
This directory was home to the Circle CI configuration files.
In July 2024 we moved to GitHub Actions, and week this folder for backward compatibility, as we want to keep on using Circle CI for the release of React Native <= 0.74.
-13
View File
@@ -1,13 +0,0 @@
version: 2.1
workflows:
version: 2
stub:
jobs:
- circleci-stub
jobs:
circleci-stub:
docker:
- image: debian:bullseye
steps:
- run: echo "There is nothing here, just an empty job. Everything has been moved to GitHub Action"
+1
View File
@@ -10,6 +10,7 @@ packages/react-native/Libraries/vendor/**/*
node_modules/
packages/*/node_modules
packages/*/dist
packages/*/types_generated
packages/debugger-frontend/dist/**/*
packages/react-native-codegen/lib
tools/eslint/rules/sort-imports.js
+25
View File
@@ -35,6 +35,22 @@ module.exports = {
'no-undef': 0,
},
},
{
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
'@react-native/no-deep-imports': 0,
},
},
{
files: [
'./packages/react-native/**/*.{js,flow}',
'./packages/assets/registry.js',
],
parser: 'hermes-eslint',
rules: {
'lint/no-commonjs-exports': 1,
},
},
{
files: ['package.json'],
parser: 'jsonc-eslint-parser',
@@ -64,6 +80,9 @@ module.exports = {
'lint/no-haste-imports': 2,
'lint/no-react-native-imports': 2,
'lint/require-extends-error': 2,
'lint/no-react-node-imports': 2,
'lint/no-react-default-imports': 2,
'lint/no-react-named-type-imports': 2,
},
},
{
@@ -114,5 +133,11 @@ module.exports = {
],
},
},
{
files: ['**/*-itest{.fb,}.js'],
rules: {
'lint/no-react-native-imports': 'off',
},
},
],
};
+7 -1
View File
@@ -2,6 +2,9 @@
; 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
@@ -41,6 +44,7 @@
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
packages/react-native/src/types/
[options]
enums=true
@@ -66,6 +70,8 @@ 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'
react.runtime=automatic
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
@@ -95,4 +101,4 @@ untyped-import
untyped-type-import
[version]
^0.258.1
^0.269.1
+1
View File
@@ -0,0 +1 @@
*.js.flow linguist-language=JavaScript
+7 -7
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:
@@ -69,10 +69,10 @@ body:
- type: textarea
id: react-native-info
attributes:
label: Output of `npx react-native info`
description: Run `npx react-native info` in your terminal, copy and paste the results here.
label: Output of `npx @react-native-community/cli info`
description: Run `npx @react-native-community/cli info` in your terminal, copy and paste the results here.
placeholder: |
Paste the output of `npx react-native info` here. The output looks like:
Paste the output of `npx @react-native-community/cli info` here. The output looks like:
...
System:
OS: macOS 14.1.1
@@ -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
@@ -48,10 +48,10 @@ body:
- type: textarea
id: react-native-info
attributes:
label: Output of `npx react-native info`
description: Run `npx react-native info` in your terminal, copy and paste the results here.
label: Output of `npx @react-native-community/cli info`
description: Run `npx @react-native-community/cli info` in your terminal, copy and paste the results here.
placeholder: |
Paste the output of `npx react-native info` here. The output looks like:
Paste the output of `npx @react-native-community/cli info` here. The output looks like:
...
System:
OS: macOS 14.1.1
@@ -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:
@@ -81,10 +81,10 @@ body:
- type: textarea
id: react-native-info
attributes:
label: Output of `npx react-native info`
description: Run `npx react-native info` in your terminal, copy and paste the results here.
label: Output of `npx @react-native-community/cli info`
description: Run `npx @react-native-community/cli info` in your terminal, copy and paste the results here.
placeholder: |
Paste the output of `npx react-native info` here. The output looks like:
Paste the output of `npx @react-native-community/cli info` here. The output looks like:
...
System:
OS: macOS 14.1.1
@@ -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
+3 -2
View File
@@ -7,6 +7,8 @@ inputs:
run-e2e-tests:
default: 'false'
description: If we need to build to run E2E tests. If yes, we need to build also x86.
gradle-cache-encryption-key:
description: "The encryption key needed to store the Gradle Configuration cache"
runs:
using: composite
steps:
@@ -20,12 +22,11 @@ runs:
- name: Set React Native Version
shell: bash
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
# We don't want to re-set the artifacts version if we're on the release branch.
if: ${{ !contains(github.ref, '-stable') }}
- name: Setup gradle
uses: ./.github/actions/setup-gradle
with:
cache-read-only: "false"
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
- name: Restore Android ccache
uses: actions/cache/restore@v4
with:
@@ -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
@@ -14,23 +14,23 @@ runs:
uses: actions/download-artifact@v4
with:
name: hermes-workspace
path: 'D:\tmp\hermes'
path: 'C:\tmp\hermes'
- name: Set up workspace
shell: powershell
run: |
mkdir -p D:\tmp\hermes\osx-bin
mkdir -p C:\tmp\hermes\osx-bin
mkdir -p .\packages\react-native\sdks\hermes
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force C:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
- name: Windows cache
uses: actions/cache@v4
with:
key: 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\
D:\tmp\hermes\hermes\deps\
D:\tmp\hermes\hermes\build_release\
C:\tmp\hermes\win64-bin\
C:\tmp\hermes\hermes\icu\
C:\tmp\hermes\hermes\deps\
C:\tmp\hermes\hermes\build_release\
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1.3.2
- name: Set up workspace
@@ -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
@@ -80,4 +83,4 @@ runs:
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-win64-bin
path: D:\tmp\hermes\win64-bin\
path: C:\tmp\hermes\win64-bin\
@@ -11,6 +11,9 @@ inputs:
required: false
description: The GHA npm token, required only to publish to npm
default: ''
gradle-cache-encryption-key:
description: The encryption key needed to store the Gradle Configuration cache
runs:
using: composite
steps:
@@ -98,15 +101,29 @@ runs:
cp ${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-Release.tar.gz ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-ios-release.tar.gz
cp ${{ inputs.hermes-ws-dir }}/dSYM/Debug/hermes.framework.dSYM ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-framework-dSYM-debug.tar.gz
cp ${{ inputs.hermes-ws-dir }}/dSYM/Release/hermes.framework.dSYM ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-framework-dSYM-release.tar.gz
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
pattern: ReactNativeDependencies*
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/
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup gradle
uses: ./.github/actions/setup-gradle
with:
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
- name: Install dependencies
uses: ./.github/actions/yarn-install
- 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' ||
+12 -7
View File
@@ -4,7 +4,7 @@ inputs:
node-version:
description: "The node.js version to use"
required: false
default: "18"
default: "20"
github-token:
description: "The GitHub token used by pull-bot"
required: true
@@ -15,9 +15,8 @@ runs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
- name: Yarn install
shell: bash
run: yarn install --non-interactive --frozen-lockfile
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Run linters against modified files (analysis-bot)
shell: bash
run: yarn lint-ci
@@ -26,10 +25,13 @@ runs:
GITHUB_PR_NUMBER: ${{ github.event.number }}
- name: Lint code
shell: bash
run: ./scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
- name: Lint java
shell: bash
run: ./scripts/circleci/exec_swallow_error.sh yarn lint-java --check
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint-java --check
- name: Lint file structure
shell: bash
run: ./.github/workflow-scripts/lint_files.sh
- name: Verify not committing repo after running build
shell: bash
run: yarn run build --check
@@ -41,7 +43,10 @@ runs:
run: yarn test-typescript
- name: Check license
shell: bash
run: ./scripts/circleci/check_license.sh
run: ./.github/workflow-scripts/check_license.sh
- name: Check formatting
shell: bash
run: yarn run format-check
- name: Lint markdown
shell: bash
run: yarn run lint-markdown
+1 -1
View File
@@ -35,7 +35,7 @@ runs:
steps:
- name: Installing Maestro
shell: bash
run: export MAESTRO_VERSION=1.39.5; 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
+3 -3
View File
@@ -31,7 +31,7 @@ runs:
steps:
- name: Installing Maestro
shell: bash
run: export MAESTRO_VERSION=1.39.5; 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: |
@@ -42,12 +42,12 @@ runs:
with:
java-version: '17'
distribution: 'zulu'
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Start Metro in Debug
shell: bash
if: ${{ inputs.flavor == 'Debug' }}
run: |
yarn install
# build codegen or we will see a redbox
./packages/react-native-codegen/scripts/oss/build.sh
+5 -2
View File
@@ -4,6 +4,8 @@ inputs:
cache-read-only:
description: "Whether the Gradle Cache should be in read-only mode so this job won't be allowed to write to it"
default: "true"
cache-encryption-key:
description: "The encryption key needed to store the Gradle Configuration cache"
runs:
using: "composite"
steps:
@@ -15,6 +17,7 @@ runs:
cache-read-only: ${{ (github.ref != 'refs/heads/main' && !contains(github.ref, '-stable')) || inputs.cache-read-only == 'true' }}
# Similarly, for those jobs we want to start with a clean cache so it doesn't grow without limits (this is the negation of the previous condition).
cache-write-only: ${{ (github.ref == 'refs/heads/main' || contains(github.ref, '-stable')) && inputs.cache-read-only != 'true' }}
# Temporarily disabling to try resolve a cache cleanup failure
# gradle-home-cache-cleanup: true
add-job-summary-as-pr-comment: on-failure
# Encryption key for the Gradle Configuration Cache.
# See https://docs.gradle.org/8.6/userguide/configuration_cache.html#config_cache:secrets:configuring_encryption_key
cache-encryption-key: ${{ inputs.cache-encryption-key }}
+1 -1
View File
@@ -4,7 +4,7 @@ inputs:
node-version:
description: 'The node.js version to use'
required: false
default: '18'
default: '20'
runs:
using: "composite"
steps:
@@ -4,25 +4,35 @@ inputs:
hermes-version:
description: The version of hermes
required: true
jsengine:
dscription: The js engine in use
default: Hermes
flavor:
description: The flavor that is going to be built
default: Debug
architecture:
description: The architecture that is going to be built
default: NewArch
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 }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ 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 }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ 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:
+13 -3
View File
@@ -43,9 +43,17 @@ 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: 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 }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}
shell: bash
run: |
@@ -77,8 +85,10 @@ runs:
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
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
fi
- name: Build HelloWorld project
shell: bash
+15 -1
View File
@@ -48,7 +48,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,10 +92,23 @@ 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 }}
jsengine: ${{ inputs.jsengine }}
architecture: ${{ inputs.architecture }}
use-frameworks: ${{ inputs.use-frameworks }}
flavor: ${{ inputs.flavor }}
ruby-version: ${{ inputs.ruby-version }}
- name: Install CocoaPods dependencies
shell: bash
run: |
@@ -113,6 +126,7 @@ runs:
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
+1 -1
View File
@@ -4,7 +4,7 @@ inputs:
node-version:
description: "The node.js version to use"
required: false
default: "18"
default: "20"
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
+14 -1
View File
@@ -4,4 +4,17 @@ runs:
steps:
- name: Install dependencies
shell: bash
run: yarn install --non-interactive --frozen-lockfile
run: |
MAX_ATTEMPTS=2
ATTEMPT=0
WAIT_TIME=20
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
yarn install --non-interactive --frozen-lockfile && break
echo "yarn install failed. Retrying in $WAIT_TIME seconds..."
sleep $WAIT_TIME
ATTEMPT=$((ATTEMPT + 1))
done
if [ $ATTEMPT -eq $MAX_ATTEMPTS ]; then
echo "All attempts to invoke yarn install failed - Aborting the workflow"
exit 1
fi
@@ -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',
);
});
});
@@ -15,6 +15,7 @@ const {
const mockRun = jest.fn();
const mockSleep = jest.fn();
const mockGetNpmPackageInfo = jest.fn();
const mockVerifyPublishedPackage = jest.fn();
const silence = () => {};
jest.mock('../utils.js', () => ({
@@ -24,6 +25,10 @@ jest.mock('../utils.js', () => ({
getNpmPackageInfo: mockGetNpmPackageInfo,
}));
jest.mock('../verifyPublishedPackage.js', () => ({
verifyPublishedPackage: mockVerifyPublishedPackage,
}));
const getMockGithub = () => ({
rest: {
actions: {
@@ -82,77 +87,43 @@ describe('#verifyPublishedTemplate', () => {
it("waits on npm updating for version and not 'latest'", async () => {
const NOT_LATEST = false;
mockGetNpmPackageInfo
// template@<version>
.mockReturnValueOnce(Promise.reject('mock http/404'))
.mockReturnValueOnce(Promise.resolve());
mockSleep.mockReturnValueOnce(Promise.resolve()).mockImplementation(() => {
throw new Error('Should not be called again!');
});
const version = '0.77.0';
await verifyPublishedTemplate(version, NOT_LATEST);
expect(mockGetNpmPackageInfo).toHaveBeenLastCalledWith(
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'@react-native-community/template',
version,
null,
18,
);
});
it('waits on npm updating version and latest tag', async () => {
const IS_LATEST = true;
const version = '0.77.0';
mockGetNpmPackageInfo
// template@latest → unknown tag
.mockReturnValueOnce(Promise.reject('mock http/404'))
// template@latest != version → old tag
.mockReturnValueOnce(Promise.resolve({version: '0.76.5'}))
// template@latest == version → correct tag
.mockReturnValueOnce(Promise.resolve({version}));
mockSleep
.mockReturnValueOnce(Promise.resolve())
.mockReturnValueOnce(Promise.resolve())
.mockImplementation(() => {
throw new Error('Should not be called again!');
});
await verifyPublishedTemplate(version, IS_LATEST);
expect(mockGetNpmPackageInfo).toHaveBeenCalledWith(
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'@react-native-community/template',
version,
'latest',
18,
);
});
describe('timeouts', () => {
let mockProcess;
beforeEach(() => {
mockProcess = jest.spyOn(process, 'exit').mockImplementation(code => {
throw new Error(`process.exit(${code}) called!`);
});
});
afterEach(() => mockProcess.mockRestore());
describe('retries', () => {
it('will timeout if npm does not update package version after a set number of retries', async () => {
const RETRIES = 2;
mockGetNpmPackageInfo.mockReturnValue(Promise.reject('mock http/404'));
mockSleep.mockReturnValue(Promise.resolve());
await expect(() =>
verifyPublishedTemplate('0.77.0', true, RETRIES),
).rejects.toThrowError('process.exit(1) called!');
expect(mockGetNpmPackageInfo).toHaveBeenCalledTimes(RETRIES);
});
it('will timeout if npm does not update latest tag after a set number of retries', async () => {
const RETRIES = 7;
const IS_LATEST = true;
mockGetNpmPackageInfo.mockReturnValue(
Promise.resolve({version: '0.76.5'}),
);
mockSleep.mockReturnValue(Promise.resolve());
await expect(async () => {
await verifyPublishedTemplate('0.77.0', IS_LATEST, RETRIES);
}).rejects.toThrowError('process.exit(1) called!');
expect(mockGetNpmPackageInfo).toHaveBeenCalledTimes(RETRIES);
await verifyPublishedTemplate('0.77.0', true, RETRIES),
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'@react-native-community/template',
'0.77.0',
'latest',
2,
);
});
});
});
@@ -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',
);
});
});
@@ -0,0 +1,135 @@
/**
* 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 {verifyPublishedPackage} = require('../verifyPublishedPackage');
const mockRun = jest.fn();
const mockSleep = jest.fn();
const mockGetNpmPackageInfo = jest.fn();
const silence = () => {};
const REACT_NATIVE_PACKAGE = 'react-native';
jest.mock('../utils.js', () => ({
log: silence,
run: mockRun,
sleep: mockSleep,
getNpmPackageInfo: mockGetNpmPackageInfo,
}));
describe('#verifyPublishedPackage', () => {
beforeEach(jest.clearAllMocks);
it("waits on npm updating for version and not 'latest'", async () => {
mockGetNpmPackageInfo
// template@<version>
.mockReturnValueOnce(Promise.reject('mock http/404'))
.mockReturnValueOnce(Promise.resolve());
mockSleep.mockReturnValueOnce(Promise.resolve()).mockImplementation(() => {
throw new Error('Should not be called again!');
});
const version = '0.78.0';
await verifyPublishedPackage(REACT_NATIVE_PACKAGE, version, null);
expect(mockGetNpmPackageInfo).toHaveBeenLastCalledWith(
REACT_NATIVE_PACKAGE,
version,
);
});
it('waits on npm updating version and latest tag', async () => {
const version = '0.78.0';
mockGetNpmPackageInfo
// template@latest → unknown tag
.mockReturnValueOnce(Promise.reject('mock http/404'))
// template@latest != version → old tag
.mockReturnValueOnce(Promise.resolve({version: '0.76.5'}))
// template@latest == version → correct tag
.mockReturnValueOnce(Promise.resolve({version}));
mockSleep
.mockReturnValueOnce(Promise.resolve())
.mockReturnValueOnce(Promise.resolve())
.mockImplementation(() => {
throw new Error('Should not be called again!');
});
await verifyPublishedPackage(REACT_NATIVE_PACKAGE, version, 'latest');
expect(mockGetNpmPackageInfo).toHaveBeenCalledWith(
REACT_NATIVE_PACKAGE,
'latest',
);
});
it('waits on npm updating version and next tag', async () => {
const version = '0.78.0-rc.0';
mockGetNpmPackageInfo
// template@latest → unknown tag
.mockReturnValueOnce(Promise.reject('mock http/404'))
// template@latest != version → old tag
.mockReturnValueOnce(Promise.resolve({version: '0.76.5'}))
// template@latest == version → correct tag
.mockReturnValueOnce(Promise.resolve({version}));
mockSleep
.mockReturnValueOnce(Promise.resolve())
.mockReturnValueOnce(Promise.resolve())
.mockImplementation(() => {
throw new Error('Should not be called again!');
});
await verifyPublishedPackage(REACT_NATIVE_PACKAGE, version, 'next');
expect(mockGetNpmPackageInfo).toHaveBeenCalledWith(
REACT_NATIVE_PACKAGE,
'next',
);
});
describe('timeouts', () => {
let mockProcess;
beforeEach(() => {
mockProcess = jest.spyOn(process, 'exit').mockImplementation(code => {
throw new Error(`process.exit(${code}) called!`);
});
});
afterEach(() => mockProcess.mockRestore());
it('will timeout if npm does not update package version after a set number of retries', async () => {
const RETRIES = 2;
mockGetNpmPackageInfo.mockReturnValue(Promise.reject('mock http/404'));
mockSleep.mockReturnValue(Promise.resolve());
await expect(() =>
verifyPublishedPackage(
REACT_NATIVE_PACKAGE,
'0.77.0',
'latest',
RETRIES,
),
).rejects.toThrowError('process.exit(1) called!');
expect(mockGetNpmPackageInfo).toHaveBeenCalledTimes(RETRIES);
});
it('will timeout if npm does not update latest tag after a set number of retries', async () => {
const RETRIES = 7;
const IS_LATEST = true;
mockGetNpmPackageInfo.mockReturnValue(
Promise.resolve({version: '0.76.5'}),
);
mockSleep.mockReturnValue(Promise.resolve());
await expect(async () => {
await verifyPublishedPackage(
REACT_NATIVE_PACKAGE,
'0.77.0',
'latest',
RETRIES,
);
}).rejects.toThrowError('process.exit(1) called!');
expect(mockGetNpmPackageInfo).toHaveBeenCalledTimes(RETRIES);
});
});
});
@@ -0,0 +1,109 @@
/**
* 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 {verifyReleaseOnNpm} = require('../verifyReleaseOnNpm');
const mockVerifyPublishedPackage = jest.fn();
const silence = () => {};
jest.mock('../utils.js', () => ({
log: silence,
sleep: silence,
}));
jest.mock('../verifyPublishedPackage.js', () => ({
verifyPublishedPackage: mockVerifyPublishedPackage,
}));
describe('#verifyReleaseOnNPM', () => {
beforeEach(jest.clearAllMocks);
it("waits on npm updating for version and not 'latest'", async () => {
const NOT_LATEST = false;
const version = '0.78.0';
await verifyReleaseOnNpm(version, NOT_LATEST);
expect(mockVerifyPublishedPackage).toHaveBeenLastCalledWith(
'react-native',
version,
null,
18,
);
});
it('waits on npm updating version and latest tag', async () => {
const IS_LATEST = true;
const version = '0.78.0';
await verifyReleaseOnNpm(version, IS_LATEST);
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'react-native',
version,
'latest',
18,
);
});
it('waits on npm updating version, not latest and next tag', async () => {
const IS_LATEST = false;
const version = '0.78.0-rc.0';
await verifyReleaseOnNpm(version, IS_LATEST);
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'react-native',
version,
'next',
18,
);
});
it('waits on npm updating version, latest and next tag', async () => {
const IS_LATEST = true;
const version = '0.78.0-rc.0';
await verifyReleaseOnNpm(version, IS_LATEST);
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'react-native',
version,
'next',
18,
);
});
describe('timeouts', () => {
it('will timeout if npm does not update package version after a set number of retries', async () => {
const RETRIES = 2;
await verifyReleaseOnNpm('0.77.0', true, RETRIES),
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'react-native',
'0.77.0',
'latest',
2,
);
});
it('will timeout if npm does not update latest tag after a set number of retries', async () => {
const RETRIES = 7;
const IS_LATEST = true;
await verifyReleaseOnNpm('0.77.0', IS_LATEST, RETRIES);
expect(mockVerifyPublishedPackage).toHaveBeenCalledWith(
'react-native',
'0.77.0',
'latest',
7,
);
});
});
});
+1 -1
View File
@@ -111,7 +111,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;
@@ -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.
GITHUB_OWNER=${CIRCLE_PROJECT_USERNAME:-facebook}
GITHUB_REPO=${CIRCLE_PROJECT_REPONAME:-react-native}
GITHUB_OWNER=-facebook
GITHUB_REPO=-react-native
export GITHUB_OWNER
export GITHUB_REPO
+25
View File
@@ -0,0 +1,25 @@
#!/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.
GITHUB_OWNER=-facebook
GITHUB_REPO=-react-native
export GITHUB_OWNER
export GITHUB_REPO
if [ -x "$(command -v shellcheck)" ]; then
IFS=$'\n'
find . \
-type f \
-not -path "*node_modules*" \
-not -path "*third-party*" \
-name '*.sh' \
-exec sh -c 'shellcheck "$1"' -- {} \;
else
echo 'shellcheck is not installed. See https://github.com/facebook/react-native/wiki/Development-Dependencies#shellcheck for instructions.'
exit 1
fi
@@ -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) {
@@ -7,7 +7,7 @@
set -e
# Make sure we don't introduce accidental references to PATENTS.
EXPECTED='scripts/circleci/check_license.sh'
EXPECTED='.github/workflow-scripts/check_license.sh'
ACTUAL=$(git grep -l PATENTS)
if [ "$EXPECTED" != "$ACTUAL" ]; then
@@ -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,
};
+15 -33
View File
@@ -7,7 +7,8 @@
* @format
*/
const {run, sleep, getNpmPackageInfo, log} = 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/;
@@ -53,8 +54,7 @@ module.exports.publishTemplate = async (github, version, dryRun = true) => {
});
};
const SLEEP_S = 10;
const MAX_RETRIES = 3 * 6; // 3 minutes
const MAX_RETRIES = 3 * 6; // 18 attempts. Waiting between attempt: 10 s. Total time: 3 mins.
const TEMPLATE_NPM_PKG = '@react-native-community/template';
/**
@@ -68,36 +68,18 @@ module.exports.verifyPublishedTemplate = async (
latest = false,
retries = MAX_RETRIES,
) => {
log(`🔍 Is ${TEMPLATE_NPM_PKG}@${version} on npm?`);
let count = retries;
while (count-- > 0) {
try {
const json = await getNpmPackageInfo(
TEMPLATE_NPM_PKG,
latest ? 'latest' : version,
);
log(`🎉 Found ${TEMPLATE_NPM_PKG}@${version} on npm`);
if (!latest) {
return;
}
if (json.version === version) {
log(`🎉 ${TEMPLATE_NPM_PKG}@latest → ${version} on npm`);
return;
}
log(
`🐌 ${TEMPLATE_NPM_PKG}@latest → ${pkg.version} on npm and not ${version} as expected, retrying...`,
);
} catch (e) {
log(`Nope, fetch failed: ${e.message}`);
try {
if (version.startsWith('v')) {
version = version.slice(1);
}
await sleep(SLEEP_S);
await verifyPublishedPackage(
TEMPLATE_NPM_PKG,
version,
latest ? 'latest' : null,
retries,
);
} catch (e) {
console.error(e.message);
process.exit(1);
}
let msg = `🚨 Timed out when trying to verify ${TEMPLATE_NPM_PKG}@${version} on npm`;
if (latest) {
msg += ' and latest tag points to this version.';
}
log(msg);
process.exit(1);
};
+15 -11
View File
@@ -9,21 +9,25 @@
const {execSync} = require('child_process');
function run(cmd) {
return execSync(cmd, 'utf8').toString().trim();
}
module.exports.run = run;
async function sleep(seconds) {
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
}
module.exports.sleep = sleep;
const log = (...args) => console.log(...args);
async function getNpmPackageInfo(pkg, versionOrTag) {
return fetch(`https://registry.npmjs.org/${pkg}/${versionOrTag}`).then(resp =>
resp.json(),
);
}
module.exports.getNpmPackageInfo = getNpmPackageInfo;
module.exports.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,
getNpmPackageInfo,
sleep,
run,
};
@@ -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};
@@ -0,0 +1,63 @@
/**
* 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, sleep} = require('./utils');
const SLEEP_S = 10;
const MAX_RETRIES = 3 * 6; // 18 attempts. Waiting between attempt: 10 s. Total time: 3 mins.
async function verifyPublishedPackage(
packageName,
version,
tag = null,
retries = MAX_RETRIES,
) {
log(`🔍 Is ${packageName}@${version} on npm?`);
let count = retries;
while (count-- > 0) {
try {
const json = await getNpmPackageInfo(packageName, tag ? tag : version);
log(`🎉 Found ${packageName}@${version} on npm`);
if (!tag) {
return;
}
// check for next tag
if (tag === 'next' && json.version === version) {
log(`🎉 ${packageName}@next → ${version} on npm`);
return;
}
// Check for latest tag
if (tag === 'latest' && json.version === version) {
log(`🎉 ${packageName}@latest → ${version} on npm`);
return;
}
log(
`🐌 ${packageName}@${tag}${json.version} on npm and not ${version} as expected, retrying...`,
);
} catch (e) {
log(`Nope, fetch failed: ${e.message}`);
}
await sleep(SLEEP_S);
}
let msg = `🚨 Timed out when trying to verify ${packageName}@${version} on npm`;
if (tag) {
msg += ` and ${tag} tag points to this version.`;
}
log(msg);
process.exit(1);
}
module.exports = {
verifyPublishedPackage,
};
@@ -0,0 +1,30 @@
/**
* 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 {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.
/**
* Will verify that @latest, @next and the @<version> have been published.
*
* NOTE: This will infinitely query each step until successful, make sure the
* calling job has a timeout.
*/
module.exports.verifyReleaseOnNpm = async (
version,
latest = false,
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);
};
+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
View File
@@ -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}}');
+2 -3
View File
@@ -18,9 +18,8 @@ jobs:
if: github.repository == 'facebook/react-native'
steps:
- uses: actions/checkout@v4
- name: Run Yarn Install on Root
run: yarn install
working-directory: .
- 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
+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}}');
+47
View File
@@ -0,0 +1,47 @@
name: Monitor React Native New Issues
on:
schedule:
- 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'
- 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:
task: "monitor-issues"
git_secret: ${{ secrets.GITHUB_TOKEN }}
notifier: "discord"
fetch_data_interval: 6
repo_owner: "facebook"
repo_name: "react-native"
discord_webhook_url: "${{ secrets.DISCORD_WEBHOOK_URL }}"
discord_id_type: "user"
discord_ids: "${{ env.oncall1 }},${{ env.oncall2 }}"
+15 -8
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
@@ -100,6 +100,10 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
uses: ./.github/workflows/prebuild-ios.yml
secrets: inherit
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
@@ -116,12 +120,12 @@ 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'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
@@ -153,6 +157,7 @@ jobs:
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
@@ -164,13 +169,14 @@ jobs:
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
]
container:
image: reactnativecommunity/react-native-android:latest
env:
TERM: "dumb"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
# By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs.
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
env:
HERMES_WS_DIR: /tmp/hermes
@@ -182,9 +188,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Publish NPM PAckage
- name: Build and Publish NPM Package
uses: ./.github/actions/build-npm-package
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gha-npm-token: ${{ env.GHA_NPM_TOKEN }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
+202
View File
@@ -0,0 +1,202 @@
name: Prebuild iOS
on:
workflow_call: # this directive allow us to call this workflow from other workflows
jobs:
prepare_workspace:
name: Prepare workspace
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Restore cache if present
id: restore-ios-prebuilds
uses: actions/cache/restore@v4
with:
path: packages/react-native/third-party/
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'
uses: ./.github/actions/yarn-install
- name: Prepare Dependencies
if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true'
run: |
node scripts/releases/prepare-ios-prebuilds.js -s
- name: Generate Package.swift
if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true'
run: |
node scripts/releases/prepare-ios-prebuilds.js -w
- name: Upload Artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: ios-prebuilds-workspace
path: packages/react-native/third-party/
- name: Save Cache
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
enableCrossOsArchive: true
path: packages/react-native/third-party/
build-apple-slices:
name: Build Apple Slice
runs-on: macos-14
needs: [prepare_workspace]
strategy:
fail-fast: false
matrix:
flavor: ['Debug', 'Release']
slice: ['ios',
'ios-simulator',
'macos',
'mac-catalyst',
'tvos',
'tvos-simulator',
'xros',
'xros-simulator']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.1'
- name: Restore slice folder
id: restore-slice-folder
uses: actions/cache/restore@v4
with:
path: packages/react-native/third-party/.build/Build/Products
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
- name: Restore workspace
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: ios-prebuilds-workspace
path: packages/react-native/third-party/
- name: Print third-party folder structure
run: ls -lR packages/react-native/third-party
- name: Install VisionOS
if: ${{ steps.restore-slice-folder.outputs.cache-hit != 'true' && (matrix.slice == 'xros' || matrix.slice == 'xros-simulator') }}
run: |
# https://github.com/actions/runner-images/issues/10559
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
sudo xcodebuild -downloadPlatform visionOS
sudo xcodebuild -runFirstLaunch
- name: Build slice ${{ matrix.slice }} for ${{ matrix.flavor }}
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
run: node scripts/releases/prepare-ios-prebuilds.js -b -p ${{ matrix.slice }} -r ${{ matrix.flavor }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }}
path: |
packages/react-native/third-party/.build/Build/Products
- name: Save Cache
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
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
create-xcframework:
name: Prepare XCFramework
runs-on: macos-14
needs: [build-apple-slices]
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: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.1'
- name: Restore XCFramework
id: restore-xcframework
uses: actions/cache/restore@v4
with:
path: |
packages/react-native/third-party/
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
with:
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' && 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: |
tar -cz -f packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz \
packages/react-native/third-party/ReactNativeDependencies.xcframework
- name: Show Symbol folder content
if: steps.restore-xcframework.outputs.cache-hit != 'true'
run: ls -lR packages/react-native/third-party/Symbols
- name: Compress and Rename dSYM
if: steps.restore-xcframework.outputs.cache-hit != 'true'
run: |
tar -cz -f packages/react-native/third-party/Symbols/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz \
packages/react-native/third-party/Symbols/ReactNativeDependencies.framework.dSYM
- name: Upload XCFramework Artifact
uses: actions/upload-artifact@v4
with:
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
path: packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
- name: Upload dSYM Artifact
uses: actions/upload-artifact@v4
with:
name: ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
path: |
packages/react-native/third-party/Symbols/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
- name: Save XCFramework in Cache
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
uses: actions/cache/save@v4
with:
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: 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
+45 -29
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,6 +96,9 @@ 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
secrets: inherit
build_hermesc_linux:
runs-on: ubuntu-latest
@@ -113,12 +116,12 @@ 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'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
@@ -131,26 +134,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 }}
build_npm_package:
runs-on: 8-core-ubuntu
needs:
@@ -160,14 +143,14 @@ jobs:
build_hermes_macos,
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
]
container:
image: reactnativecommunity/react-native-android:latest
env:
TERM: "dumb"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
# By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs.
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
env:
HERMES_WS_DIR: /tmp/hermes
@@ -183,12 +166,13 @@ jobs:
with:
fetch-depth: 0
fetch-tags: true
- name: Build and Publish NPM PAckage
- name: Build and Publish NPM Package
uses: ./.github/actions/build-npm-package
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gha-npm-token: ${{ env.GHA_NPM_TOKEN }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Publish @react-native-community/template
id: publish-template-to-npm
uses: actions/github-script@v6
@@ -214,3 +198,35 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer $REACT_NATIVE_BOT_GITHUB_TOKEN" \
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${{ github.ref_name }}\" }}"
- name: Verify Release is on NPM
timeout-minutes: 3
uses: actions/github-script@v6
with:
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 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
+47 -21
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
@@ -116,10 +116,14 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
uses: ./.github/workflows/prebuild-ios.yml
secrets: inherit
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
@@ -134,9 +138,9 @@ 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
@@ -157,9 +161,9 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_rntester:
runs-on: macos-13
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
@@ -193,7 +197,7 @@ 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:
@@ -216,6 +220,8 @@ jobs:
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:
@@ -227,8 +233,8 @@ jobs:
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
@@ -249,7 +255,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
@@ -264,6 +270,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")
@@ -288,6 +302,8 @@ jobs:
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 \
@@ -369,6 +385,11 @@ jobs:
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)}')
@@ -403,12 +424,12 @@ 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'
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
@@ -439,6 +460,7 @@ jobs:
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
run-e2e-tests: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
test_e2e_android_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
@@ -483,6 +505,7 @@ jobs:
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
]
container:
image: reactnativecommunity/react-native-android:latest
@@ -499,6 +522,7 @@ jobs:
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
test_android_helloworld:
runs-on: 4-core-ubuntu
@@ -537,6 +561,8 @@ jobs:
path: /tmp/maven-local
- name: Setup gradle
uses: ./.github/actions/setup-gradle
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Prepare the Helloworld application
@@ -565,8 +591,8 @@ jobs:
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
@@ -583,8 +609,8 @@ jobs:
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]
@@ -615,7 +641,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: ["20", "18"]
node-version: ["22", "20", "18"]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -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,67 @@ 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",
"react-native-exit-app",
"@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: 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}}');
+9 -3
View File
@@ -141,6 +141,11 @@ vendor/
/packages/react-native/sdks/hermesc
/packages/react-native/sdks/hermes-engine/hermes-engine-from-local-source-dir.tar.gz
# iOS prebuilds
/packages/react-native/third-party/
fix_*.patch
*.xcframework
# Visual Studio Code (config dir - if present, this merges user defined
# workspace settings on top of react-native.code-workspace)
/.vscode
@@ -154,8 +159,9 @@ vendor/
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
# CircleCI
.circleci/generated_config.yml
# Jest Integration
/packages/react-native-fantom/build/
/packages/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;
+1
View File
@@ -7,5 +7,6 @@
packages/*/dist
vendor
packages/**/types_generated/
packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js
+10
View File
@@ -21,6 +21,16 @@
"options": {
"parser": "hermes"
}
},
{
"files": [
"**/__docs__/*.md"
],
"options": {
"parser": "markdown",
"proseWrap": "always",
"requirePragma": false
}
}
]
}
+10
View File
@@ -0,0 +1,10 @@
## Summary:
This change fixes the script that updates the RN Version to also update the Codegen snapshots so that they are in sync with the current version of React Native.
It also updates the Snapshot as it was failing in rc.0
## Changelog:
[Internal] - Fixed script that updates the react native versions
## Test Plan:
Tested locally by running `node ./scripts/releases/set-rn-artifacts-version --built-type release --to-version 0.80.0-rc.0` and verifying that the snapshot file was getting updated. I then run the `yarn test
generate-artifacts-executor-test.js` command to verify that the tests were passing.
+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))
+626 -61
View File
@@ -1,89 +1,505 @@
# Changelog
## v0.76.6
## 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
- **layout:** Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints ([f7a5db3c06](https://github.com/facebook/react-native/commit/f7a5db3c063b952321826ea431d3d238ef0de65d) by [@NickGerleman](https://github.com/NickGerleman))
- **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))
#### Android specific
- **layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([0683206927](https://github.com/facebook/react-native/commit/068320692748f0c46867625786a780366fdbb1d6) by Thomas Nardone)
- **Native Modules:** Prioritise local OnLoad.cpp, falling back to default-app-setup ([8b1f049879](https://github.com/facebook/react-native/commit/8b1f04987936ab2bc7dcf62adc92bf394d35f77b) by [@timbocole](https://github.com/timbocole))
- **runtime:** Remove feature flag for allowRecursiveCommitsWithSynchronousMountOnAndroid ([fb7f87ecb2](https://github.com/facebook/react-native/commit/fb7f87ecb27f9006e2018b9622d329feb1ba23a4) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **TextInput:** Fixing TextInput `maxLength` not working in old arch ([9ecf290d27](https://github.com/facebook/react-native/commit/9ecf290d270598e45832a75f657d73cf20088a37) by [@mateoguzmana](https://github.com/mateoguzmana))
## v0.77.0-rc.6
### Fixed
#### Android specific
- **JSC:** Fixes RNTester JSC Debug instacrashing ([17a5d2be5a](https://github.com/facebook/react-native/commit/17a5d2be5a96703ed1c76d89990a8f1e37abd4d4) by [@cortinico](https://github.com/cortinico))
- **C++:** Fixes C++ TurboModules: Prioritise OnLoad.cpp, falling back to default-app-setup ([5a64bde701](https://github.com/facebook/react-native/commit/5a64bde701e28615a79ad52d0631de62ce6cab92) by [@timbocole](https://github.com/timbocole))
## v0.77.0-rc.5
### Fixed
#### iOS specific
- **TextInput:** Fixes numeric TextInput not triggering `onSubmitEditing` ([0bcb0c2b2f](https://github.com/facebook/react-native/commit/0bcb0c2b2f460ed1a9d525d1a5b343f4b71f9347) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixed problem with third party libraries overwriting `inputAccessoryView` ([d34032b6c0](https://github.com/facebook/react-native/commit/d34032b6c0bb3564a7b77ef270cc3289d99365f2) by [@kirillzyusko](https://github.com/kirillzyusko))
## v0.77.0-rc.4
### Fixed
#### Android specific
- **Layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([e3970a4bb3](https://github.com/facebook/react-native/commit/e3970a4bb3f39ec5652277d78d8c58c89e87dc30) by [@tdn20](https://github.com/tdn20))
## v0.77.0-rc.3
## v0.79.1
### Changed
#### Android specific
- **deps:** Gradle to 8.11.1 ([490db92562](https://github.com/facebook/react-native/commit/490db92562df3baf6dc38737778179065f378715) by [@cortinico](https://github.com/cortinico))
### Fixed
- **Codegen:** Skip hidden folders when looking for third party components. ([8ab524312a](https://github.com/facebook/react-native/commit/8ab524312ab3bf1192b94ae6e30d296a85baa944) by [@cipolleschi](https://github.com/cipolleschi))
#### Android specific
- **runtime:** Handle removal of in-transition views. ([f402ed17fa](https://github.com/facebook/react-native/commit/f402ed17fa6d75aea24e2ad99a8b8d8ad20840e3) by [@kkafar](https://github.com/kkafar))
- **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
- **infra:** Enable hermes debugger by configuration type instead of configuration name ([eda4f185b3](https://github.com/facebook/react-native/commit/eda4f185b381f7569a1029b7697f9a1c8bc6d108) by [@benhandanyan](https://github.com/benhandanyan))
- **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))
## v0.77.0-rc.2
- **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
- **Headless Tasks:** Fix crash on HeadlessJsTaskService on old architecture ([4560fc0497](https://github.com/facebook/react-native/commit/4560fc049748a345d5945bc08d43f4b61ca51ff3) by [@cortinico](https://github.com/cortinico))
- **Codegen:** Do not generate Apple specific file for Android ([b2bacc4a9f](https://github.com/facebook/react-native/commit/b2bacc4a9f3b97a4f59126a229477d3c952b3f44) by [@cipolleschi](https://github.com/cipolleschi))
## v0.77.0-rc.1
#### iOS specific
### Fixed
- **Codegen:** Do not generate ReactCodegen.podspec for libraries ([f3c280442d](https://github.com/facebook/react-native/commit/f3c280442dc49e13b24baa2348f6b8c802045178) by [@cipolleschi](https://github.com/cipolleschi))
- **Animated:** Replace Object.hasOwn usages to fix Animated on JSC ([e996b3f346](https://github.com/facebook/react-native/commit/e996b3f346462a394012a722ce19990cdf9c3d9a) by [@robhogan](https://github.com/robhogan))
- **FormData:** Remove non compliant `filename*` attribute in a FormData `content-disposition` header ([f791fb9e66](https://github.com/facebook/react-native/commit/f791fb9e660fe15bccf55029045c48f4bbcbc5cb) by [@foyarash](https://github.com/foyarash))
- **infra:** Fix "punycode is deprecated" warning by replacing `node-fetch` with native `fetch` ([881d8a720f](https://github.com/facebook/react-native/commit/881d8a720fb24241d7b2127273ca6116833bf176) by [@jbroma](https://github.com/jbroma))
## 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
- **Codegen:** Fix IOException in `BuildCodegenCLITask` ([9147b0753a](https://github.com/facebook/react-native/commit/9147b0753a6c3afb2480b079f91614cd7189a28a) by [@vonovak](https://github.com/vonovak))
- **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)
## v0.77.0-rc.0
#### 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
- **Codegen:** Separate component array types and command array types ([825492b199](https://github.com/facebook/react-native/commit/825492b1999b62de708e6f40d5d5de8d3d7cb8a9) by [@elicwhite](https://github.com/elicwhite))
- **DevTools:** The `FuseboxClient.setClientMetadata` CDP method is removed. Instead, use `ReactNativeApplication.enable`. ([1a9780f0e3](https://github.com/facebook/react-native/commit/1a9780f0e3714ac18ffae34cb67376c711b0e031) by [@huntie](https://github.com/huntie))
#### Android specific
- **APIs:** Changed visibility of `FrescoBasedReactTextInlineImageViewManager` to internal ([d5f33c19cb](https://github.com/facebook/react-native/commit/d5f33c19cb33e2f2c7d2470cc90872c1f065f20d) by [@alanleedev](https://github.com/alanleedev))
- **APIs:** Migrating pointerEvents API breaks compatibility for kotlin usages of this api as a val ([45e4a3afce](https://github.com/facebook/react-native/commit/45e4a3afceb4be3047cd01a60ec2c9f806ed30fe) by [@mdvacca](https://github.com/mdvacca))
- **APIs:** Convert `RootView` to Kotlin ([21c9491926](https://github.com/facebook/react-native/commit/21c94919260a68409f82081740169d0409e78933) by [@fabriziocucci](https://github.com/fabriziocucci))
- **APIs:** Delete unused abstract class `GuardedResultAsyncTask` ([67bff8734f](https://github.com/facebook/react-native/commit/67bff8734f4b92fe399910eecad5b67511a749c1) by [@mdvacca](https://github.com/mdvacca))
- **APIs**: Delete deprecated class `FabricViewStateManager` ([b25b65ba19](https://github.com/facebook/react-native/commit/b25b65ba19f3c674fd2efe5c01123ccc0ae55cbf) by [@mdvacca](https://github.com/mdvacca))
- **APIs:** Removed `ComponentNameResolver` from public API ([a4849cb3d6](https://github.com/facebook/react-native/commit/a4849cb3d6f4245d15eb3812e417a9f4248bb3a1) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- **Image:** Change Image load event size info from logical size to pixel ([09995fc874](https://github.com/facebook/react-native/commit/09995fc8741cfdc6095d09627262b4f6fbbaafc2) by [@zhongwuzw](https://github.com/zhongwuzw))
### Added
- **C++:** Added `RawValue(Runtime*, jsi::Value&)` constructor to make a `RawValue` from a `jsi::Value`. ([03d2186ace](https://github.com/facebook/react-native/commit/03d2186ace2cb17c676b7763d5a545759a658b77) by [@hannojg](https://github.com/hannojg))
- **Codegen:** Include cxx modules in codegen schema ([cf5ab03d43](https://github.com/facebook/react-native/commit/cf5ab03d4324b7e3fce38f9eacc96da82b11b68a) by [@elicwhite](https://github.com/elicwhite))
- **Deps:** Add `jest-diff v29.7.0` to devDependencies ([b27bd00a38](https://github.com/facebook/react-native/commit/b27bd00a389295250ec003357df713ebf306374b) by [@andrewdacenko](https://github.com/andrewdacenko))
- **Logging:** Add support for the second parameter of `console.table` to specify a list of columns to print in the table. ([fd0894b1c7](https://github.com/facebook/react-native/commit/fd0894b1c7fcb20dd213ec1e93aafef25935d709) by [@rubennorte](https://github.com/rubennorte))
- **Logging:** Add "jsEngine: hermes" to JS runtime Error prototype ([85bdd75828](https://github.com/facebook/react-native/commit/85bdd75828f85230aaa90ed510666457c46f996c) by Maddie Lord)
- **Metro:** Add opt in for legacy Metro log streaming via `--client-logs` flag ([86db4fa90b](https://github.com/facebook/react-native/commit/86db4fa90b90919867a9b66f6caa28f77fba3a37) by [@huntie](https://github.com/huntie))
- **Text:** Added `pointerEvents` to `TextProps` type. ([3efbe33ce0](https://github.com/facebook/react-native/commit/3efbe33ce03f846932406742528652eb695b957d) by [@hyochan](https://github.com/hyochan))
#### Android specific
- **ActivityIndicator:** setting `resource-id` from the `testID` prop ([87b1bad45e](https://github.com/facebook/react-native/commit/87b1bad45e4eb730ea07686a2b2558253c60d3b7) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Codegen:** Fixing schema types for component command params of Arrays ([25c673e357](https://github.com/facebook/react-native/commit/25c673e35784d8d8c49555af104b9b4d8d37973d) by [@elicwhite](https://github.com/elicwhite))
- **Gradle:** Make the addition of JitPack repository configurable ([a98528e609](https://github.com/facebook/react-native/commit/a98528e609ff0ace4b7bc82f3aa273b7e3fa6443) by [@cortinico](https://github.com/cortinico))
- **Logging:** SoftException categories ([c832f94cf7](https://github.com/facebook/react-native/commit/c832f94cf713d0cb7616ef095f38583979e1cf43) by Thomas Nardone)
- **Logging:** Add logging in ReactInstanceManager.onHostPause when activity is incorrectly null ([c2fd35a442](https://github.com/facebook/react-native/commit/c2fd35a4429c752dc2d10a789e4c5f48d22b1eeb) by Maddie Lord)
- **Runtime:** Added `getState` method for `StateWrapperImpl` ([ed36e896ac](https://github.com/facebook/react-native/commit/ed36e896ac34fcbefece87456dbdfdff30d22ad5) by [@hannojg](https://github.com/hannojg))
#### 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))
- **Initialization:** Implement ReactNativeFactory ([081be01a5d](https://github.com/facebook/react-native/commit/081be01a5dd24d0a398c6aa8297575502a17d5ec) by [@okwasniewski](https://github.com/okwasniewski))
- **Text:** Support system font families (system-ui, ui-sans-serif, ui-serif, ui-monospace, and ui-rounded) on iOS ([1763321c89](https://github.com/facebook/react-native/commit/1763321c8960d30ddc4d3464a0fffdecdd44617a) by [@cxa](https://github.com/cxa))
- **TextInput:** Integrate a new property - `disableKeyboardShortcuts`. It can disable the keyboard shortcuts on iPads. ([0154372b93](https://github.com/facebook/react-native/commit/0154372b93eb1b02f0c62f2a75c95f4fc6a9f3e8) by [@rezkiy37](https://github.com/rezkiy37))
### Changed
- **Deps:** Bump Hermes ([0c8e15e8bb](https://github.com/facebook/react-native/commit/0c8e15e8bb16ec279290d2390caf75e83d52f518) by [@cipolleschi](https://github.com/cipolleschi))
- **Flow:** Improved types in `BoxInspector` and refactored a code ([f832c450a5](https://github.com/facebook/react-native/commit/f832c450a52c4c9d61c1d6b609fcad1332613556) by [@coado](https://github.com/coado))
- **Flow:** Improved types in StyleInspector and refactored a code ([49e5c58c59](https://github.com/facebook/react-native/commit/49e5c58c595265c9fffc84741aab6363d291f1f5) by [@coado](https://github.com/coado))
- **Flow:** Improved types in ElementBox and refactored a code ([2959d49e8d](https://github.com/facebook/react-native/commit/2959d49e8d09663f9ac437ffcb66d1c99162c6d0) by [@coado](https://github.com/coado))
- **Flow:** Improve types on BorderBox ([48a7840919](https://github.com/facebook/react-native/commit/48a784091989c695e3432cb8ba657139eb9f5e99) by [@coado](https://github.com/coado))
- **Flow:** Improve types on DrawerLayoutAndroid ([b5155fba89](https://github.com/facebook/react-native/commit/b5155fba895411e290faeeea06180fce24079f78) by [@huntie](https://github.com/huntie))
- **Logging:** Improved formatting of values logged via `console.table` (including Markdown format). ([7154c62afb](https://github.com/facebook/react-native/commit/7154c62afb5371f3f861663826792e41229c344a) by [@rubennorte](https://github.com/rubennorte))
- **Runtime:** Mark `intersectionRect` required in `NativeIntersectionObserverEntry` to reflect native logic. ([8681fc2ab2](https://github.com/facebook/react-native/commit/8681fc2ab20aa1e5937a0bf3fc58ed03c3e0ee23) by [@lunaleaps](https://github.com/lunaleaps))
- **Runtime:** ([9aa21b5e87](https://github.com/facebook/react-native/commit/9aa21b5e8765f14a9806eac435636b87f62178cc) by [@lunaleaps](https://github.com/lunaleaps))
- **TypeScript:** Upgrading `typescript-config` module version to `esnext` ([5370347f54](https://github.com/facebook/react-native/commit/5370347f54719f318a4e032aba6cbf2269e7c3d7) by [@mateoguzmana](https://github.com/mateoguzmana))
- **VirtualizedList:** Fix item disappearing with scroll in VirtualizedList ([df7b6ae092](https://github.com/facebook/react-native/commit/df7b6ae092d03385ebd05efd0f068c59e727f723) by [@Tom910](https://github.com/Tom910))
- **Yoga:** Update YGNodeStyleGetGap to return YGValue ([331d99a941](https://github.com/facebook/react-native/commit/331d99a94154678848628122e8fe3373ee67fb9b) by [@heoblitz](https://github.com/heoblitz))
#### Android specific
- **APIs:** Introduce new public API `ViewManagerInterface` ([40a0cdbc99](https://github.com/facebook/react-native/commit/40a0cdbc99746f18ca15c48f3d8f03cdad1635af) by [@mdvacca](https://github.com/mdvacca))
- **Deps:** Bumped Android Gradle Plugin (AGP) to 8.8.0 ([4c7c836ebf](https://github.com/facebook/react-native/commit/4c7c836ebf956c13fa327170adaec43a076226e7) by [@cortinico](https://github.com/cortinico))
- **Deps:** Bump Gradle to 8.12 ([5e6478954c](https://github.com/facebook/react-native/commit/5e6478954c77f64a9086757ed4a879e83a1ab404) by [@cortinico](https://github.com/cortinico))
- **Deps:** Update Fresco to 3.6.0 ([819b5c2c8d](https://github.com/facebook/react-native/commit/819b5c2c8dfad620152b159838575b6c03e18ffe) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Deps:** Migrate jsc-android to mavenCentral ([e42a3a6b84](https://github.com/facebook/react-native/commit/e42a3a6b842d71fc25419c02f6015863fa019f05) by [@Kudo](https://github.com/Kudo))
- **Image:** Replaced custom XML decoder with Fresco's built-in decoder ([6feb90bb29](https://github.com/facebook/react-native/commit/6feb90bb290ab460df8df2f6f01531a77aac9008) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Kotlin:** Migrate `ComponentNameResolver` to kotlin ([385b9f4265](https://github.com/facebook/react-native/commit/385b9f4265316a1e1cf8627ea7ed3bed790cc8c5) by [@mdvacca](https://github.com/mdvacca))
- **Kotlin:** Migrate `ReactSwitchManager` to Kotlin ([b886bc4db9](https://github.com/facebook/react-native/commit/b886bc4db970d8c70de1596dc3f88bdc398de482) by [@krozniata](https://github.com/krozniata))
#### iOS specific
- **Accessibility:** Reduce memory allocations when computing `accessibilityLabel` ([74bdab8bd8](https://github.com/facebook/react-native/commit/74bdab8bd8be2413734004145507c0688232053e) by [@sparga](https://github.com/sparga))
- **CocoaPods:** Properly inherit OTHER_CPLUSPLUSLAGS ([fa03840e68](https://github.com/facebook/react-native/commit/fa03840e688067bf16a7fb60c00efdc9a1813f92) by [@WoLewicki](https://github.com/WoLewicki))
- **CocoaPods:** Pin 'concurrent-ruby' to a working version ([198adb47af](https://github.com/facebook/react-native/commit/198adb47af3676c85b35adb308c110c1d87120c8) by [@cipolleschi](https://github.com/cipolleschi))
### Removed
#### Android specific
- **APIs:** Made `ReactCookieJarContainer` internal. ([18ebea533d](https://github.com/facebook/react-native/commit/18ebea533d348329926bd7782bb55469aa228a4a) by [@javache](https://github.com/javache))
- **Config:** Remove as_const option (on by default) in fbsource ([e5a526ff44](https://github.com/facebook/react-native/commit/e5a526ff44c25afd935d117d6d4d342f210553a6) by [@panagosg7](https://github.com/panagosg7))
- **Flow:** Remove comment syntax from ReactNativeTypes ([a80baac58e](https://github.com/facebook/react-native/commit/a80baac58e9f2fc62829ab76b929f5c8b21c05a5) by [@hoxyq](https://github.com/hoxyq))
- **Metro:** Removed `JSCHeapCapture` module, deprecated PackagerCommandListener#onCaptureHeapCommand ([e06fa5d102](https://github.com/facebook/react-native/commit/e06fa5d1026843ec4a2ba3dd209652dc5290c0ba) by [@javache](https://github.com/javache))
### Fixed
- **Animations:** Removed unnecessary state updates in React to reflect the current state of looping animations. ([6059660c60](https://github.com/facebook/react-native/commit/6059660c607f5b6edba08a12906f0f9d6cb15d34) by [@rubennorte](https://github.com/rubennorte))
- **Animations:** Animation.stop() executes when `animatedShouldUseSingleOp` is enabled. ([746d584a23](https://github.com/facebook/react-native/commit/746d584a23f303493faa4f9d857ec542257a92ae) by [@javache](https://github.com/javache))
- **Animations:** Fix buttons becoming unresponsive when transform is animated ([2204ec94d4](https://github.com/facebook/react-native/commit/2204ec94d4b67a9ba559db3f54a5a1ef91e0f233) by [@sammy-SC](https://github.com/sammy-SC))
- **C++:** `JSBigFileString` fails for non-zero offset arguments ([7d0338cb0b](https://github.com/facebook/react-native/commit/7d0338cb0b24926aff648a4c8ba5d77b052010cc) by [@jwajgelt](https://github.com/jwajgelt))
- **Config:** Disable `react-in-jsx-scope` rule in eslint config ([ea56c432b7](https://github.com/facebook/react-native/commit/ea56c432b7a577d3805d1a7b4b46596799dd892e) by [@matinzd](https://github.com/matinzd))
- **Deps:** Fix peer dependencies on React types to React 19 ([4368368ef5](https://github.com/facebook/react-native/commit/4368368ef5c3f3d08a66ee6c13222f6d81a2d2df) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Add missing `invariant` dependency ([ee8088b615](https://github.com/facebook/react-native/commit/ee8088b6157837c239db47ac5bd3a8603ceefc3c) by [@tido64](https://github.com/tido64))
- **Fantom:** Fix a bug when fantom tests could not be run in parallel, e.g. in a stress-test. ([8696b79f73](https://github.com/facebook/react-native/commit/8696b79f73fec18a9e3785b9a2c150afc9965d76) by [@mijay](https://github.com/mijay))
- **Logging:** Modified `console.table` to avoid mutating the received argument. ([caa77fbe2b](https://github.com/facebook/react-native/commit/caa77fbe2b03e6969ae9b542d011f926a0ede3c7) by [@rubennorte](https://github.com/rubennorte))
- **Text:** Fixed `adjustsFontSizeToFit` not working for text with a single character ([47822e9048](https://github.com/facebook/react-native/commit/47822e90480d61e197a3f223e088ee88a0f38ad7) by [@j-piasecki](https://github.com/j-piasecki))
- **Text:** Fix `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in Fabric / New Architecture ([ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32](https://github.com/facebook/react-native/commit/ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32) by [@RickardZrinski](https://github.com/RickardZrinski))
#### Android specific
- **APIs** Re-introduce the deprecated constructor on ReactModuleInfo ([734730df75](https://github.com/facebook/react-native/commit/734730df75b3bdddeb5dbe65f4151cc92b988303) by [@cortinico](https://github.com/cortinico))
- **Dialog:** `FLAG_SECURE` not respected in Modal dialog ([7e029b0dcf](https://github.com/facebook/react-native/commit/7e029b0dcf6d1a6455a8a6343457b70e353d0ff6) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Events:** Fix crash for `setEventEmitterCallback` NoSuchMethodError on API lvl 26 ([7dcbc799eb](https://github.com/facebook/react-native/commit/7dcbc799eb2fb5792512b71320eafed08deec9ea) by [@cortinico](https://github.com/cortinico))
- **Gradle:** Fixed build issue when including mapbuffer jni headers in library code ([ecf17666ad](https://github.com/facebook/react-native/commit/ecf17666ad84e15d31944962e2d0e846a5670977) by [@hannojg](https://github.com/hannojg))
- **InteropLayer:** Fix execution of early InteropEvents ([4ed2b35bf6](https://github.com/facebook/react-native/commit/4ed2b35bf61426c81c9f8b30a142d77b44988fdb) by [@mdvacca](https://github.com/mdvacca))
- **JSC:** Fix JSC Debug instacrashing ([b10491a3c4](https://github.com/facebook/react-native/commit/b10491a3c457c802608758ca1fe659a72c18576b) by [@cortinico](https://github.com/cortinico))
- **JSC:**Fix JSC by avoiding use of unavailable `str.replaceAll()` ([b5b9e032c2](https://github.com/facebook/react-native/commit/b5b9e032c2b57aa44afb7141a879d83c8b889feb) by [@robhogan](https://github.com/robhogan))
- **Modal:** Setting `resource-id` from `testID` prop ([52b6592559](https://github.com/facebook/react-native/commit/52b65925595882d9b6c7f354a5ce3bfe3823738e) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Networking:** ReactOkHttpNetworkFetcher cache control headers getting overwritten by the rest of the headers ([81cb166d10](https://github.com/facebook/react-native/commit/81cb166d103f7caaa5135b5a1c66d4e978f3619f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **DevTools:** Pass the bundle URL protocol when setting up HMR client on Android ([32fe244744](https://github.com/facebook/react-native/commit/32fe24474495f09f985a2c92e11103dd386f5fe3) by [@byCedric](https://github.com/byCedric))
- **Runtime:** Fix BackHandle callback undefined cause crash issue ([44705fe11b](https://github.com/facebook/react-native/commit/44705fe11bd9bb12c8f71d1e50a7b48e0af6a38d) by [@BleemIs42](https://github.com/BleemIs42))
- **Runtime:** Support Long values in WritableMap and WritableArray ([e7f943de2f](https://github.com/facebook/react-native/commit/e7f943de2fd71d2259ab53e7817d2dcf96559f7e) by [@WoLewicki](https://github.com/WoLewicki))
- **Runtime:** `SetColorScheme` should be called on the UI thread ([2aa79979d3](https://github.com/facebook/react-native/commit/2aa79979d3e4a54008f24c81b6c04553c98ff6b6) by lihaitao)
- **Style:** Fix background getting clipped when border-radius is set ([6d235853fb](https://github.com/facebook/react-native/commit/6d235853fb9e9ad4050ba5611d74921fa1b9c72d) by [@jorge-cab](https://github.com/jorge-cab))
- **Testing:** Handling `testID` correctly for horizontal scroll view ([81c74cd35f](https://github.com/facebook/react-native/commit/81c74cd35f9e40c8ad4663fc932d0dddeaa4bc19) by [@mateoguzmana](https://github.com/mateoguzmana))
- **TextInput:** Fix incorrect height of single line TextInputs without definite size ([9b646c8b7b](https://github.com/facebook/react-native/commit/9b646c8b7b9a23645b1563883768a9274897a1cd) by [@NickGerleman](https://github.com/NickGerleman))
#### iOS specific
- **C++:** Exclude Android HorizontalScrollContentView cxx component code ([4adaacb4f7](https://github.com/facebook/react-native/commit/4adaacb4f7cd136d5534c81fb9b8f5f2a0312d7f) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Ccache:** Fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts ([d31ac832c5](https://github.com/facebook/react-native/commit/d31ac832c5b866653f7179fd517427f7be11ad45) by [@ste7en](https://github.com/ste7en))
- **CocoaPods:** Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning ([2f2281718a](https://github.com/facebook/react-native/commit/2f2281718a2ef905ffd15adf3b47a1b6b6fb8d95) by [@noway](https://github.com/noway))
- **Image:** Load images even when the extension is implicit ([b9f418e9bc](https://github.com/facebook/react-native/commit/b9f418e9bc35372438a34934254db985b7ad1840) by [@cipolleschi](https://github.com/cipolleschi))
- **Initialization:** Allow multiple RN instances to run at the same time ([444c7d4eff](https://github.com/facebook/react-native/commit/444c7d4eff3d4fbe25452c94cba7ffacb3c366cc) by [@cipolleschi](https://github.com/cipolleschi))
- **InteropLayer:** Avoid crashing the app when the InteropLayer can't find some methods in the native implementation ([3bd3f101b9](https://github.com/facebook/react-native/commit/3bd3f101b9dcff8551a2f8259ddeed9843fd69b8) by [@cipolleschi](https://github.com/cipolleschi))
- **InteropLayer:** Properly handle `null` value in TurboModule Interop layer ([ebfd7057af](https://github.com/facebook/react-native/commit/ebfd7057af049ebfbc593448918c70db37e39d48) by [@cipolleschi](https://github.com/cipolleschi))
- **JSC:** Fix Direct Debugging with JSC ([b04d17afca](https://github.com/facebook/react-native/commit/b04d17afcac82af1a47fd462a04fe4088d19b468) by [@Saadnajmi](https://github.com/Saadnajmi))
- **Keyboard:** Enable/disable keyboard shortcuts only on iOS ([8b0af4542e](https://github.com/facebook/react-native/commit/8b0af4542e6fd5628fefdc8e1699326c2225c3f0) by [@okwasniewski](https://github.com/okwasniewski))
- **RefreshControl:** Fix app becoming unresponsive when `RefreshControl` is used inside of <Modal /> ([6cb2684b43](https://github.com/facebook/react-native/commit/6cb2684b4343bd8698b9770c0f6ef8812683c783) by [@sammy-SC](https://github.com/sammy-SC))
- **DevTools:** Restore "Paused in debugger" overlay icon ([f30c46efbd](https://github.com/facebook/react-native/commit/f30c46efbd964d367f678181589865a3faa931cd) by [@robhogan](https://github.com/robhogan))
- **Runtime:** Emit `didUpdateDimensions` correctly ([920867d949](https://github.com/facebook/react-native/commit/920867d9494cbfcc9cb0e23607cb339ec1b89ca9) by TobiasH)
- **Runtime:** Fix `applicationDidEnterBackground` not being called ([adaceba546](https://github.com/facebook/react-native/commit/adaceba5462b4ad8676745f34e0be2bf5bb25166) by [@alextoudic](https://github.com/alextoudic))
- **Runtime:** Fixed problem with accessory view & 3rd party libs ([5fc582783d](https://github.com/facebook/react-native/commit/5fc582783d7f70ca9521e317c93624a8845bfff2) by [@kirillzyusko](https://github.com/kirillzyusko))
- **Style:** Dashed & dotted borders now work with overflow: hidden ([1b88c5b429](https://github.com/facebook/react-native/commit/1b88c5b429888e109b7acae4808b4b6f8b3f920f) by [@joevilches](https://github.com/joevilches))
- **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
- **Dev-Middleware:** Add missing `invariant` dependency ([877e82c1a9](https://github.com/facebook/react-native/commit/877e82c1a97d6c667024a437d993e84af3b820a6) by [@tido64](https://github.com/tido64))
- **style:** Respect `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in New Architecture ([8baa858412](https://github.com/facebook/react-native/commit/8baa85841209679936938e7759c5be149304843c) by [RickardZrinski](https://github.com/RickardZrinski))
#### Android specific
- **layout:** Fix elevation prop on android has incorrect border-radius ([55d5c44976](https://github.com/facebook/react-native/commit/55d5c4497621a8dfd6545899754451fcf68dce70) by [@NickGerleman](https://github.com/NickGerleman))
- **Fabric:** Fix execution of early InteropEvents ([d8af0ae3f2](https://github.com/facebook/react-native/commit/d8af0ae3f22c906a9584e1f5d1aaf2dba3cc3fea) by [mdvacca](https://github.com/mdvacca))
#### iOS specific
- **Image:** Load images even when the extension is implicit ([bc35afefd5](https://github.com/facebook/react-native/commit/bc35afefd57a7d0516796dee209881120b82c0b1) by [@cipolleschi](https://github.com/cipolleschi))
- **Interop Layer:** Avoid crashing the app when the InteropLayer can't find some methods in the native implementation. ([83b986d370](https://github.com/facebook/react-native/commit/83b986d370139266bbbad3e2c356b871c56ae17c) by [@cipolleschi](https://github.com/cipolleschi))
- **Interop Layer:** Properly handle `null` values coming from NativeModules. ([475f797a51](https://github.com/facebook/react-native/commit/475f797a51237e63e4d2bb4e5718e6aa73157767) by [sammy-SC](https://github.com/sammy-SC))
### Added
- **DevX:** Add opt in for legacy Metro log streaming via `--client-logs` flag ([969eb3f007](https://github.com/facebook/react-native/commit/969eb3f0070dc9df2e89ea52a6eb2c68b05aa2d7) by [huntie](https://github.com/huntie))
## v0.77.0
### Breaking
@@ -169,7 +585,6 @@
#### Android specific
- **Accessibility:** Added `isHighTextContrastEnabled()` to `AccessibilityInfo` to read `ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED` setting value ([d4ea147b41](https://github.com/facebook/react-native/commit/d4ea147b41e4d22253f80be8b74731dcf0439302) by Ariel Lin)
- **APIs:** Marked ReactPackage#getModule as stable. ([8fba7ebb5e](https://github.com/facebook/react-native/commit/8fba7ebb5e874d001dc5c16eb4229054a2ef4812) by [@javache](https://github.com/javache))
- **C++:** Add cmake arguments to support 16KB page size for native libraries ([65cdd5b82c](https://github.com/facebook/react-native/commit/65cdd5b82ce7652630b1920fa3a48c8f256c7983) by [@alanleedev](https://github.com/alanleedev))
@@ -252,6 +667,7 @@
- **deps:** Bump Kotlin 1.9.x to 2.0.x ([972c2c864c](https://github.com/facebook/react-native/commit/972c2c864c0b563163a36080a13908d1c0a3fb87) by [@cortinico](https://github.com/cortinico))
- **deps:** Bump Android Gradle Plugin (AGP) to 8.7.0 ([cbc0978bb6](https://github.com/facebook/react-native/commit/cbc0978bb65dcfd2a18a54201c845785a626b1b3) by [@cortinico](https://github.com/cortinico))
- **deps:** Gradle to 8.10.1 ([90f89a830a](https://github.com/facebook/react-native/commit/90f89a830acced9e6b8e80ef58aefd7e2c9666a8) by [@cortinico](https://github.com/cortinico))
- **deps:** Gradle to 8.11.1 ([490db92562](https://github.com/facebook/react-native/commit/490db92562df3baf6dc38737778179065f378715) by [@cortinico](https://github.com/cortinico))
- **Kotlin:** Migrated systeminfo module code from Java to Kotlin ([8dc2c90ce5](https://github.com/facebook/react-native/commit/8dc2c90ce5f4b30f4729560aed2412e6d29f39fa) by [@oddlyspaced](https://github.com/oddlyspaced))
- **Kotlin:** Migrate ReactFeatureFlags to Kotlin ([4076dbfc86](https://github.com/facebook/react-native/commit/4076dbfc8651fcd193b886bf63b23728fad466d7) by [@mdvacca](https://github.com/mdvacca))
- **Kotlin:** Migrate MainReactPackage to Kotlin (and make it final) ([7bbac8ee27](https://github.com/facebook/react-native/commit/7bbac8ee27daf092b580b57c2c7ee46d2723cd09) by [@cortinico](https://github.com/cortinico))
@@ -302,6 +718,8 @@
- **Animated:** Correctly pass down isLooping in parallel animation ([4014aa4528](https://github.com/facebook/react-native/commit/4014aa4528d43e905246850c83007a635938d7cb) by [@zeyap](https://github.com/zeyap))
- **Animated:** Improved types for AnimatedProps ([390925ea39](https://github.com/facebook/react-native/commit/390925ea39eb469768f21cf7069b8f75ccdec09d) by [@javache](https://github.com/javache))
- **Animated:** Order of operations related to platformConfig propagation in NativeAnimated ([a64183b0c6](https://github.com/facebook/react-native/commit/a64183b0c6a56e9d482c7b8b0f80965493ed87af) by [@rozele](https://github.com/rozele))
- **Animated:** Replace Object.hasOwn usages to fix Animated on JSC ([e996b3f346](https://github.com/facebook/react-native/commit/e996b3f346462a394012a722ce19990cdf9c3d9a) by [@robhogan](https://github.com/robhogan))
- **Animated:** Fix buttons becoming unresponsive when transform is animated (Revert #48669) ([c799aa07e2](https://github.com/facebook/react-native/commit/c799aa07e2148a2ca38939cb72468c949ed0c95f) by [@sammy-SC](https://github.com/sammy-SC))
- **Appearance:** Fixed jest error from Appearance.js ([ce838a4bcf](https://github.com/facebook/react-native/commit/ce838a4bcfb1c08728b637a9addd24cc6e3477e0) by [@Kudo](https://github.com/Kudo))
- **Appearance:** Fix `Appearance.setColorScheme(null)` not resetting color scheme value ([7d63235086](https://github.com/facebook/react-native/commit/7d63235086352d8c424d634c7039551f0a5025dc) by [@sangonz193](https://github.com/sangonz193))
- **C++:** Fix C++ bridging template compatibility with MSVC ([e6848ba5ba](https://github.com/facebook/react-native/commit/e6848ba5ba997d102cbaf6181c7c8c73e25a0827) by [@acoates-ms](https://github.com/acoates-ms))
@@ -311,21 +729,26 @@
- **Codegen:** Make Codegen work with local modules ([7b6e8e7765](https://github.com/facebook/react-native/commit/7b6e8e776574e683821133f0c814969d74c4de61) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Upgrade Codegen dependency `jscodeshift@17.0.0` to resolve outdated dependencies ([39c98fb8f8](https://github.com/facebook/react-native/commit/39c98fb8f8af98aa40dc89a1580d6c1901fa86cf) by [@byCedric](https://github.com/byCedric))
- **Codegen:** Fix source mapping for codegenNativeCommands ([8fba154b66](https://github.com/facebook/react-native/commit/8fba154b6655b5d87609d7c9f136997141ea5e99) by [@vzaidman](https://github.com/vzaidman))
- **Codegen:** Skip hidden folders when looking for third party components. ([8ab524312a](https://github.com/facebook/react-native/commit/8ab524312ab3bf1192b94ae6e30d296a85baa944) by [@cipolleschi](https://github.com/cipolleschi))
- **Dev-Middleware:** Rewrite URLs in the inspector proxy to cover all configurations, not just Android emulators. ([74995bc90a](https://github.com/facebook/react-native/commit/74995bc90aa039b880e4875ad356d3bce324d902) by [@robhogan](https://github.com/robhogan))
- **Dev-Middleware:** Fix URL rewriting where device and debugger reach the server on different ports/protocols. ([5da7ebf99a](https://github.com/facebook/react-native/commit/5da7ebf99ae317c104d8e4bfbf36d3d89f66b5c9) by [@robhogan](https://github.com/robhogan))
- **Dev-Middleware:** Regex-escape IP addresses in urlRegex replacements ([aae3e03e57](https://github.com/facebook/react-native/commit/aae3e03e57096c3dc51589a3de240d49a8b9fadf) by [@robhogan](https://github.com/robhogan))
- **Dev-middleware:** Remove URL.canParse, restore compat with Node < 18.17 ([99767d43b0](https://github.com/facebook/react-native/commit/99767d43b04e41c83e3bcbfebe267d6fdc284549) by [@robhogan](https://github.com/robhogan))
- **Error Handling:** Improved error message when no view config is found. ([bca232ad90](https://github.com/facebook/react-native/commit/bca232ad90692da7a87be5e37ee2680380f94bef) by [@javache](https://github.com/javache))
- **FlatList:** Fixed accuracy of FlatList estimations to determine what elements are visible in the rendering window. ([40aaeb7181](https://github.com/facebook/react-native/commit/40aaeb71814a1987482d97fd3170af0add55bc6a) by [@rubennorte](https://github.com/rubennorte))
- **FormData:** Remove non compliant `filename*` attribute in a FormData `content-disposition` header ([f791fb9e66](https://github.com/facebook/react-native/commit/f791fb9e660fe15bccf55029045c48f4bbcbc5cb) by [@foyarash](https://github.com/foyarash))
- **graphics:** Linear gradient start and end point algorithm. ([221d1eceda](https://github.com/facebook/react-native/commit/221d1eceda0e5ab870e96dcdd26e22ab17a3870c) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **Hermes:** Hermes: revert Intl removal ([4cffff35e0](https://github.com/facebook/react-native/commit/4cffff35e030f256c32bf69c5971dfee4e60723f) by [@robhogan](https://github.com/robhogan))
- **Image:** Passed height and width as native props to support cases where source is an array. ([45b177f50d](https://github.com/facebook/react-native/commit/45b177f50de624eefcb66bb2d8bc1ffb00855863) by [@shubhamguptadream11](https://github.com/shubhamguptadream11))
- **infra:** When using Babel with plain JavaScript files, support for additional user syntax plugins should be fixed (now uses Babel's parser instead of hermes-parser). There is no change for JS files annotated with `flow`, where extended JS syntax remains - unsupported. ([3de9892353](https://github.com/facebook/react-native/commit/3de989235365504468d2b6c0bb194e944bf1ce8e) by [@huntie](https://github.com/huntie))
- **infra:** Fix npm react-native start when cli-server-api isn't installed ([e0be2efe4e](https://github.com/facebook/react-native/commit/e0be2efe4e80edf99f96a2ae6a25856f6df5e0ca) by [@blakef](https://github.com/blakef))
- **infra:** Fix "punycode is deprecated" warning by replacing `node-fetch` with native `fetch` ([881d8a720f](https://github.com/facebook/react-native/commit/881d8a720fb24241d7b2127273ca6116833bf176) by [@jbroma](https://github.com/jbroma))
- **JS:** Do not discard props in the patch when they are not null while using `useNativeProps` ([4c3112c8d8](https://github.com/facebook/react-native/commit/4c3112c8d8685d6c34be9acf07b18871b3cee5b2) by [@cipolleschi](https://github.com/cipolleschi))
- **KeyboardAvoidingView:** Accessing KeyboardAvoidingEvent event in onLayout handler ([68db74205a](https://github.com/facebook/react-native/commit/68db74205afdd190304eb73ef71710781fa580b9) by [@mhoran](https://github.com/mhoran))
- **KeyboardAvoidingview:** Fix KeyboardAvoidingView not aware of the keyboard closing it is unmounted ([08bd8ac47d](https://github.com/facebook/react-native/commit/08bd8ac47da60121225e7b281bbf566e2c5a291e) by [@QichenZhu](https://github.com/QichenZhu))
- **layout:** Plumbing to get boxSizing prop to Yoga round 2 ([3ca796edc3](https://github.com/facebook/react-native/commit/3ca796edc327c5287533dcc8f4394033d5398c2d) by [@joevilches](https://github.com/joevilches))
- **layout:** Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints ([e7db7a7266](https://github.com/facebook/react-native/commit/e7db7a72661bd49948c13eb46d0f72fbe9e00bf3) by [@NickGerleman
](https://github.com/NickGerleman))
- **Modal:** Rename overlayColor prop in Modal to backdropColor ([7aeff18970](https://github.com/facebook/react-native/commit/7aeff18970a2b47cbb3fffc1408e4bb21eec6fed) by [@alanleedev](https://github.com/alanleedev))
- **Native Modules:** TurboModule::get is now a final method, override `create` to customize property lookup ([5b5e150eaf](https://github.com/facebook/react-native/commit/5b5e150eaff015540720225b9e61acb306e1d107) by [@javache](https://github.com/javache))
- **PointerEvents:** Fixed issues with W3C PointerEvents testsx ([1dcaf823f5](https://github.com/facebook/react-native/commit/1dcaf823f5e7d9b114dd803ce3181aa0b8f827ad) by [@rozele](https://github.com/rozele))
@@ -348,11 +771,16 @@ github.com/robhogan))
#### Android specific
- **C++:** Fixes C++ TurboModules: Prioritise OnLoad.cpp, falling back to default-app-setup ([5a64bde701](https://github.com/facebook/react-native/commit/5a64bde701e28615a79ad52d0631de62ce6cab92) by [@timbocole](https://github.com/timbocole))
- **Codegen:** Fix IOException in `BuildCodegenCLITask` ([9147b0753a](https://github.com/facebook/react-native/commit/9147b0753a6c3afb2480b079f91614cd7189a28a) by [@vonovak](https://github.com/vonovak))
- **Dialog:** Fixed styling on alert dialog titles to wrap two lines and retain bold appearance ([c54b23ff9e](https://github.com/facebook/react-native/commit/c54b23ff9ed7a6bfbb52c081c5afe4b3911d0dd2) by [@Abbondanzo](https://github.com/Abbondanzo))
- **graphics:** Missing isInvertColorsEnabled implementation for Android ([cc1d2853fb](https://github.com/facebook/react-native/commit/cc1d2853fb2b64adfb884cb30c8d22ce0260be15) by [@oddlyspaced](https://github.com/oddlyspaced))
- **Headless Tasks:** Fix crash on HeadlessJsTaskService on old architecture ([4560fc0497](https://github.com/facebook/react-native/commit/4560fc049748a345d5945bc08d43f4b61ca51ff3) by [@cortinico](https://github.com/cortinico))
- **Image:** Apps will no longer fatally crash when trying to draw large images ([483b928224](https://github.com/facebook/react-native/commit/483b92822496fa2e6339f75049a33be1e9567f52) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Image:** Avoid blocking the main thread when decompressing drawable resources ([420229d669](https://github.com/facebook/react-native/commit/420229d66946320f06485c5a3d3c167eae1a407e) by [@Abbondanzo](https://github.com/Abbondanzo))
- **JSC:** Fixes RNTester JSC Debug instacrashing ([17a5d2be5a](https://github.com/facebook/react-native/commit/17a5d2be5a96703ed1c76d89990a8f1e37abd4d4) by [@cortinico](https://github.com/cortinico))
- **layout:** Reenable `setAndroidLayoutDirection` by default ([6cf0cfb5a4](https://github.com/facebook/react-native/commit/6cf0cfb5a47a437b8a17b50b4c70460be15ee1cd) by [@NickGerleman](https://github.com/NickGerleman))
- **Layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([e3970a4bb3](https://github.com/facebook/react-native/commit/e3970a4bb3f39ec5652277d78d8c58c89e87dc30) by [@tdn20](https://github.com/tdn20))
- **Layoutanimations:** LayoutAnimations work on full new architecture ([43af902693](https://github.com/facebook/react-native/commit/43af902693f0befde802a7f684e26b19ec7126c8) by [@javache](https://github.com/javache))
- **Modal:** Fix issues with Modals and lifecycle events in multi-surface apps ([1ffef5669c](https://github.com/facebook/react-native/commit/1ffef5669c21f4b2c5fec6bc58a85f95518cf10e) by [@rozele](https://github.com/rozele))
- **Modal:** Fix crash for Modal not attached to window manager ([eaa780de1c](https://github.com/facebook/react-native/commit/eaa780de1c799bf35fded2914d27b1953b093340) by [@cipolleschi](https://github.com/cipolleschi))
@@ -373,6 +801,7 @@ github.com/robhogan))
- **runtime:** ARG_DISABLE_HOST_LIFECYCLE_EVENTS in ReactFragment to allow unmounting a surface without destroying ReactHost. ([40c875deca](https://github.com/facebook/react-native/commit/40c875decabaa56d6dd45ce03b22e8b3931781ac) by [@vincenzovitale](https://github.com/vincenzovitale))
- **runtime:** Use appropriate Nullable attribute for ReactRootView field in ReactDelegate ([cbddcfc691](https://github.com/facebook/react-native/commit/cbddcfc6911101608df36f2a8d047768296c63b2) by [@rozele](https://github.com/rozele))
- **runtime:** Hover events were dispatched incorrectly when multiple ReactRoots were layered. ([533ef2ca37](https://github.com/facebook/react-native/commit/533ef2ca37d3b19fc909315f183e3f30dbf4b93d) by [@javache](https://github.com/javache))
- **runtime:** Handle removal of in-transition views. ([f402ed17fa](https://github.com/facebook/react-native/commit/f402ed17fa6d75aea24e2ad99a8b8d8ad20840e3) by [@kkafar](https://github.com/kkafar))
- **ScrollView** Dispatch onMomentumScrollEnd after programmatic scrolling ([c69e330324](https://github.com/facebook/react-native/commit/c69e330324724a1e363f4786b2b03ee7ff4b35c5) by [@Biki-das](https://github.com/Biki-das))
- **ScrollView:** Fix legacy arch RTL horizontal ScrollView regression ([bfca7cfe7a](https://github.com/facebook/react-native/commit/bfca7cfe7a8e0da10fdb776100fbc706233c0d8d) by [@NickGerleman](https://github.com/NickGerleman))
- **ScrollView:** Fix RTL ScrollView position when content smaller than container ([0df59d4f03](https://github.com/facebook/react-native/commit/0df59d4f03f79c0fcb9ede2d21bf4d49c97c21ef) by [@NickGerleman](https://github.com/NickGerleman))
@@ -403,6 +832,7 @@ github.com/robhogan))
- **AppClips:** Fix launching App Clips with nullish URLs. ([043e2fe14a](https://github.com/facebook/react-native/commit/043e2fe14a6f13885a552211f17d61292001fa76) by [@EvanBacon](https://github.com/EvanBacon))
- **Cocoapods:** Typo in spm.rb ([5e18f7f788](https://github.com/facebook/react-native/commit/5e18f7f788ccbea60e96b8e7deab29d423ccf1a6) by [@okwasniewski](https://github.com/okwasniewski))
- **infra:** Fallback to old resolve mechanism when node require fails to resolve react native path ([3cbaddbc16](https://github.com/facebook/react-native/commit/3cbaddbc164b9dc326b2a7ddc0b35ce885bc7d9d) by [@okwasniewski](https://github.com/okwasniewski))
- **infra:** Enable hermes debugger by configuration type instead of configuration name ([eda4f185b3](https://github.com/facebook/react-native/commit/eda4f185b381f7569a1029b7697f9a1c8bc6d108) by [@benhandanyan](https://github.com/benhandanyan))
- **ObjC:** Fix numerous class interfaces having incorrect designated initializer patterns ([b98846c2e3](https://github.com/facebook/react-native/commit/b98846c2e37c3ec895536ab942978d7701f51a5e) by Nolan O'Brien)
- **PrivacyInfo:** Don't reference PrivacyInfo.xcprivacy twice for new projects ([cadd41b1a2](https://github.com/facebook/react-native/commit/cadd41b1a2e16b1c77a8d3022f4ccbdbd5ea295f) by [@okwasniewski](https://github.com/okwasniewski))
- **ReactNativeDevTools:** "Reconnect DevTools" button not working sometimes ([8507204b53](https://github.com/facebook/react-native/commit/8507204b533cf87d1e4345a9c062cd10cf0022c1) by [@EdmondChuiHW](https://github.com/EdmondChuiHW))
@@ -418,6 +848,92 @@ github.com/robhogan))
- **runtime:** Fixed crash on promise rejection handler in iOS 18. ([26d8d490e4](https://github.com/facebook/react-native/commit/26d8d490e47bd3fa46dc4a3b8e66e9ec35c15cf7) by David Rickard)
- **runtime:** Cast the UIScene to UIWindowScene only if the scene respond to the selector ([fdee0ebbcb](https://github.com/facebook/react-native/commit/fdee0ebbcb88f40c23b92b07792fbb9d1041c546) by [@cipolleschi](https://github.com/cipolleschi))
- **runtime:** Fixes the exported synchronous method not being called on the method queue when it's the main queue ([8bfd7e1039](https://github.com/facebook/react-native/commit/8bfd7e10393e649554c7246df430019c4f78d5e0) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixes numeric TextInput not triggering `onSubmitEditing` ([0bcb0c2b2f](https://github.com/facebook/react-native/commit/0bcb0c2b2f460ed1a9d525d1a5b343f4b71f9347) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixed problem with third party libraries overwriting `inputAccessoryView` ([d34032b6c0](https://github.com/facebook/react-native/commit/d34032b6c0bb3564a7b77ef270cc3289d99365f2) by [@kirillzyusko](https://github.com/kirillzyusko))
- **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
#### iOS specific
- **Deps:** Pin 'concurrent-ruby' to a working version ([198adb47af](https://github.com/facebook/react-native/commit/198adb47af3676c85b35adb308c110c1d87120c8) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **Text** Fix `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in Fabric / New Architecture ([ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32](https://github.com/facebook/react-native/commit/ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32) by [@RickardZrinski](https://github.com/RickardZrinski))
- **Appearance:** Fix `Appearance.setColorScheme(null)` not resetting color scheme value ([7d63235086](https://github.com/facebook/react-native/commit/7d63235086352d8c424d634c7039551f0a5025dc) by [@sangonz193](https://github.com/sangonz193))
#### Android specific
- **Deps:** Add missing `invariant` dependency ([ee8088b615](https://github.com/facebook/react-native/commit/ee8088b6157837c239db47ac5bd3a8603ceefc3c) by [@tido64](https://github.com/tido64))
- **Turbomodule** Fix execution of early InteropEvents ([4ed2b35bf6](https://github.com/facebook/react-native/commit/4ed2b35bf61426c81c9f8b30a142d77b44988fdb) by [@mdvacca](https://github.com/mdvacca))
- **Deps:** Bump Kotlin to 1.9.25 to mitigate #49115 ([f8857ba3b5](https://github.com/facebook/react-native/commit/f8857ba3b51f26871d0a0b82b9581a0c35b6273d) by [@cortinico](https://github.com/cortinico))
#### iOS specific
- **runtime:** `RCTSurfaceHostingProxyRootView` no longer has different behavior (whether it calls `start` on the provided *surface*) depending on which initializer is used. Call `start` yourself on the *surface* instead. ([13b93cfdda](https://github.com/facebook/react-native/commit/13b93cfddaa559697968ac1c19e55f7aaa053070) by Nolan O'Brien)
- Be less strict with method parsing of TurboModule Interop Layer
- **Turbomodule:** Avoid crashing the app when the InteropLayer can't find some methods in the native implementation. ([3bd3f101b9](https://github.com/facebook/react-native/commit/3bd3f101b9dcff8551a2f8259ddeed9843fd69b8) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Fix applicationDidEnterBackground not being called ([adaceba546](https://github.com/facebook/react-native/commit/adaceba5462b4ad8676745f34e0be2bf5bb25166) by [@alextoudic](https://github.com/alextoudic))
## v0.76.6
### Fixed
- **layout:** Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints ([f7a5db3c06](https://github.com/facebook/react-native/commit/f7a5db3c063b952321826ea431d3d238ef0de65d) by [@NickGerleman](https://github.com/NickGerleman))
#### Android specific
- **layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([0683206927](https://github.com/facebook/react-native/commit/068320692748f0c46867625786a780366fdbb1d6) by Thomas Nardone)
- **Native Modules:** Prioritise local OnLoad.cpp, falling back to default-app-setup ([8b1f049879](https://github.com/facebook/react-native/commit/8b1f04987936ab2bc7dcf62adc92bf394d35f77b) by [@timbocole](https://github.com/timbocole))
- **runtime:** Remove feature flag for allowRecursiveCommitsWithSynchronousMountOnAndroid ([fb7f87ecb2](https://github.com/facebook/react-native/commit/fb7f87ecb27f9006e2018b9622d329feb1ba23a4) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **TextInput:** Fixing TextInput `maxLength` not working in old arch ([9ecf290d27](https://github.com/facebook/react-native/commit/9ecf290d270598e45832a75f657d73cf20088a37) by [@mateoguzmana](https://github.com/mateoguzmana))
## v0.76.5
@@ -808,6 +1324,40 @@ created on the mqt_native thread. ([c4a6bbc8fd](https://github.com/facebook/reac
- **infra:** Update ws from 7.5.1 to 7.5.10 (CVE-2024-37890) ([13f1b9e10f](https://github.com/facebook/react-native/commit/13f1b9e10f6045421808714f7e62aa17bfb3e891) by [@GijsWeterings](https://github.com/GijsWeterings))
- **infra:** Update ws from 6.2.2 to 6.2.3 (CVE-2024-37890) ([80cfacef78](https://github.com/facebook/react-native/commit/80cfacef78f34d3786d955084a8bf4d42ea37f1b) by [@GijsWeterings](https://github.com/GijsWeterings))
## v0.75.5
### Added
- **Hermes:** Implement more missing methods on WithRuntimeDecorator ([80f67ca03c](https://github.com/facebook/react-native/commit/80f67ca03c99c688e2a3127e9b3dddd02625848e) by [@neildhar](https://github.com/neildhar))
### Changed
#### Android specific
- **Deps:** Bump Kotlin to 1.9.25 to mitigate [#49115](https://github.com/facebook/react-native/issues/49115) ([25e76a2717](https://github.com/facebook/react-native/commit/25e76a271781b3ffe8002108d8b12aa3d47442b5) by [@riteshshukla04](https://github.com/riteshshukla04))
#### iOS specific
- **Deps:** Pin Xcodeproj to < 1.26.0 ([2922af2e7e](https://github.com/facebook/react-native/commit/2922af2e7e8527a93c7956b10ddb314f25c334fa) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Pin concurrent-ruby to <= 1.3.4 ([794bf34e60](https://github.com/facebook/react-native/commit/794bf34e60cea8146aebad1fefe051d4140fc28b) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **FormData:** fix: FormData filename in content-disposition ([78ef1e2bc2](https://github.com/facebook/react-native/commit/78ef1e2bc2ed30321745e2505713915b9015d920) by [@foyarash](https://github.com/@foyarash))
#### Android specific
- **TextInput:** Set TextInput selection correctly when attached to window in Android ([1656394bae](https://github.com/facebook/react-native/commit/1656394bae16cc54fb38687d38bcbf85138c98a2) by [@QichenZhu](https://github.com/QichenZhu))
#### iOS specific
- **Animation:** Fabric: Fixes animations strict weak ordering sorted check failed ([ea0bc54115](https://github.com/facebook/react-native/commit/ea0bc541155700e0973d960c94d01918d6b28c6b) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Hermes** Exclude dSYM from the archive ([fdb2631b5e](https://github.com/facebook/react-native/commit/fdb2631b5ea27765663046b94f84956d30ebaaeb) by [@cipolleschi](https://github.com/cipolleschi))
- **Image** Fix images not displayed when extension is implicit ([b6ed0d351e](https://github.com/facebook/react-native/commit/b6ed0d351e246c431bdc88a6c3d154ba35220c25) by [@cipolleschi](https://github.com/cipolleschi))
- **Xcode:** Fix the generation of .xcode.env.local ([dbffbf72d7](https://github.com/facebook/react-native/commit/dbffbf72d7287e021e965b6639e455e8555bbf2e) by [@cipolleschi](https://github.com/cipolleschi))
## v0.75.4
### Fixed
@@ -1210,6 +1760,21 @@ created on the mqt_native thread. ([c4a6bbc8fd](https://github.com/facebook/reac
- **turbomodule:** Fixed race condition in native module invalidation. ([b7812a8b6c](https://github.com/facebook/react-native/commit/b7812a8b6c3afbeacaad94779cd010bcc5440785) by [@dmytrorykun](https://github.com/dmytrorykun))
- **xcode:** Do not use temporary node when creating the .xcode.env.local ([8408b8bc96](https://github.com/facebook/react-native/commit/8408b8bc96db15e265ca65fce7875ee65dcfdcec) by [@cipolleschi](https://github.com/cipolleschi))
## v0.74.7
### Fixed
#### Android specific
- Fix #41226 by suppressing path adjustment when not actually drawing a border ([8501b6396b](https://github.com/facebook/react-native/commit/8501b6396b0a4fd7a9bd2add2b3c8b9c755c27ae) by [@knappam](https://github.com/knappam))
- RGNP - Remove unnecessary dependency on `gradle-tooling-api-builders` - serviceOf failure ([b6bdecd309](https://github.com/facebook/react-native/commit/b6bdecd309bf74cfa80b71204d5266667cb3f843) by [@cortinico](https://github.com/cortinico))
#### iOS specific
- Fix iOS crash occurring when navigating to a new app screen with a displaying modal ([52888c0c1e](https://github.com/facebook/react-native/commit/52888c0c1e722a799f233c2f502e01b9dd4a7174) by Zhi Zhou)
- Fix ruby for CI ([1c80702e95](https://github.com/facebook/react-native/commit/1c80702e95a6bcf422f5448b4578d71e8e78071b) by [@cipolleschi](https://github.com/cipolleschi))
- Fixes animations strict weak ordering sorted check failed ([60889e170c](https://github.com/facebook/react-native/commit/60889e170ca3f6187e15719a3d85da0bc7e974ff) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.74.6
### Added
+7
View File
@@ -6,3 +6,10 @@ ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '<= 1.3.4'
# Ruby 3.4.0 has removed some libraries from the standard library.
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
+10
View File
@@ -14,6 +14,8 @@ GEM
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
benchmark (0.4.0)
bigdecimal (3.1.9)
claide (1.1.0)
cocoapods (1.14.2)
addressable (~> 2.8)
@@ -65,8 +67,10 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
logger (1.6.5)
minitest (5.20.0)
molinillo (0.8.0)
mutex_m (0.3.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
@@ -90,7 +94,13 @@ PLATFORMS
DEPENDENCIES
activesupport (>= 6.1.7.5, < 7.1.0)
benchmark
bigdecimal
cocoapods (~> 1.13, != 1.15.1, != 1.15.0)
concurrent-ruby (<= 1.3.4)
logger
mutex_m
xcodeproj (< 1.26.0)
RUBY VERSION
ruby 3.2.0p0
-393
View File
@@ -1,393 +0,0 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public licenses.
Notwithstanding, Creative Commons may elect to apply one of its public
licenses to material it publishes and in those instances will be
considered the "Licensor." Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the public
licenses.
Creative Commons may be contacted at creativecommons.org.
-6
View File
@@ -13,9 +13,6 @@
<a href="https://github.com/facebook/react-native/blob/HEAD/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="React Native is released under the MIT license." />
</a>
<a href="https://circleci.com/gh/facebook/react-native">
<img src="https://circleci.com/gh/facebook/react-native.svg?style=shield" alt="Current CircleCI build status." />
</a>
<a href="https://www.npmjs.org/package/react-native">
<img src="https://img.shields.io/npm/v/react-native?color=brightgreen&label=npm%20package" alt="Current npm package version." />
</a>
@@ -141,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._
+107
View File
@@ -0,0 +1,107 @@
# 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
- 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](../packages/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`.
+4 -1
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/"))
}
}
}
@@ -92,7 +95,7 @@ tasks.register("build") {
tasks.register("publishAllToMavenTempLocal") {
description = "Publish all the artifacts to be available inside a Maven Local repository on /tmp."
dependsOn(":packages:react-native:ReactAndroid:publishAllPublicationsToMavenTempLocalRepository")
// We don't publish the external-artifacts to Maven Local as CircleCI is using it via workspace.
// We don't publish the external-artifacts to Maven Local as ci is using it via workspace.
dependsOn(
":packages:react-native:ReactAndroid:hermes-engine:publishAllPublicationsToMavenTempLocalRepository")
}
+4212
View File
File diff suppressed because it is too large Load Diff
@@ -42,6 +42,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>,
}>;
}
@@ -10,15 +10,15 @@
*/
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,
+6
View File
@@ -1016,6 +1016,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 +1054,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 +1335,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 +1373,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 +1743,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 +1796,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
+194 -67
View File
@@ -9,7 +9,65 @@
* @oncall react_native
*/
// flow-typed signature: 79cfa6bcaa67fdb60f10d320da0470fc
// flow-typed version: 6cecea2e51/chalk_v4.x.x/flow_>=v0.104.x
// From: https://github.com/chalk/chalk/blob/master/index.d.ts
declare module 'chalk' {
declare type ForegroundColor =
| 'black'
| 'red'
| 'green'
| 'yellow'
| 'blue'
| 'magenta'
| 'cyan'
| 'white'
| 'gray'
| 'grey'
| 'blackBright'
| 'redBright'
| 'greenBright'
| 'yellowBright'
| 'blueBright'
| 'magentaBright'
| 'cyanBright'
| 'whiteBright';
declare type BackgroundColor =
| 'bgBlack'
| 'bgRed'
| 'bgGreen'
| 'bgYellow'
| 'bgBlue'
| 'bgMagenta'
| 'bgCyan'
| 'bgWhite'
| 'bgGray'
| 'bgGrey'
| 'bgBlackBright'
| 'bgRedBright'
| 'bgGreenBright'
| 'bgYellowBright'
| 'bgBlueBright'
| 'bgMagentaBright'
| 'bgCyanBright'
| 'bgWhiteBright';
declare type Color = ForegroundColor | BackgroundColor;
declare type Modifiers =
| 'reset'
| 'bold'
| 'dim'
| 'italic'
| 'underline'
| 'inverse'
| 'hidden'
| 'strikethrough'
| 'visible';
declare type TemplateStringsArray = $ReadOnlyArray<string>;
declare type Level = $Values<{
@@ -20,85 +78,154 @@ declare module 'chalk' {
...
}>;
declare type ChalkOptions = {
enabled?: boolean,
declare type ChalkOptions = {|
level?: Level,
};
|};
declare type ColorSupport = {
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,
declare class Instance implements Chalk {
constructor(options?: ChalkOptions): this;
+reset: Chalk,
+bold: Chalk,
+dim: Chalk,
+italic: Chalk,
+underline: Chalk,
+inverse: Chalk,
+hidden: Chalk,
+strikethrough: Chalk,
(...text: string[]): string;
(text: TemplateStringsArray, ...placeholders: string[]): string;
Instance: typeof Instance;
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;
+visible: Chalk,
+reset: Chalk;
+bold: Chalk;
+dim: Chalk;
+italic: Chalk;
+underline: Chalk;
+inverse: Chalk;
+hidden: Chalk;
+strikethrough: 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,
+visible: 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,
+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;
supportsColor: ColorSupport,
};
+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;
+bgWhiteBright: Chalk;
supportsColor: ColorSupport;
}
declare interface Chalk {
(...text: string[]): string;
(text: TemplateStringsArray, ...placeholders: string[]): string;
Instance: typeof Instance;
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;
+bgWhiteBright: Chalk;
supportsColor: ColorSupport;
}
declare module.exports: Chalk;
}
+1 -1
View File
@@ -317,7 +317,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';
}
-21
View File
@@ -1,21 +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-local
* @format
* @oncall react_native
*/
declare module 'data-uri-to-buffer' {
declare interface ParsedDataURI {
type: string;
typeFull: string;
charset: TextDecoder$availableEncodings;
buffer: ArrayBuffer;
}
declare export function dataUriToBuffer(uri: string | URL): ParsedDataURI;
}
-16
View File
@@ -1,16 +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
declare module 'debug' {
declare module.exports: (namespace: string) => (...Array<mixed>) => void;
}
+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;
}
+46 -42
View File
@@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
* @oncall react_native
*/
@@ -13,9 +12,8 @@
// 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,
@@ -268,7 +266,7 @@ type EnzymeMatchersType = {
toIncludeText(text: string): void,
toMatchElement(
element: React.MixedElement,
options?: {|ignoreProps?: boolean, verbose?: boolean|},
options?: {ignoreProps?: boolean, verbose?: boolean},
): void,
toMatchSelector(selector: string): void,
// 7.x
@@ -302,7 +300,7 @@ type DomTestingLibraryType = {
toHaveStyle(css: string | {[name: string]: any, ...}): void,
toHaveTextContent(
text: string | RegExp,
options?: {|normalizeWhitespace: boolean|},
options?: {normalizeWhitespace: boolean},
): void,
toHaveValue(value?: string | string[] | number): void,
@@ -607,27 +605,29 @@ type SnapshotDiffType = {
*/
toMatchDiffSnapshot(
valueB: any,
options?: {|
options?: {
expand?: boolean,
colors?: boolean,
contextLines?: number,
stablePatchmarks?: boolean,
aAnnotation?: string,
bAnnotation?: string,
|},
},
testName?: string,
): void,
...
};
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.
@@ -911,12 +911,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.
@@ -994,10 +994,10 @@ type JestObjectType = {
type JestSpyType = {calls: JestCallsType, ...};
type JestDoneFn = {|
type JestDoneFn = {
(error?: Error): void,
fail: (error: Error) => void,
|};
};
/** Runs this function after every test inside this context */
declare function afterEach(
@@ -1040,10 +1040,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,
...
@@ -1070,7 +1072,7 @@ declare var it: {
* @param {Function} Test
* @param {number} Timeout for the test, in milliseconds.
*/
only: {|
only: {
(
name: JestTestName,
fn?: (done: JestDoneFn) => ?Promise<mixed>,
@@ -1083,7 +1085,7 @@ declare var it: {
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number,
) => void,
|},
},
/**
* Skip running this test
*
@@ -1091,7 +1093,7 @@ declare var it: {
* @param {Function} Test
* @param {number} Timeout for the test, in milliseconds.
*/
skip: {|
skip: {
(
name: JestTestName,
fn?: (done: JestDoneFn) => ?Promise<mixed>,
@@ -1104,7 +1106,7 @@ declare var it: {
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number,
) => void,
|},
},
/**
* Highlight planned tests in the summary output
*
@@ -1129,7 +1131,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>,
@@ -1188,7 +1192,7 @@ type JestPrettyFormatRefs = Array<any>;
type JestPrettyFormatPrint = any => string;
type JestPrettyFormatStringOrNull = string | null;
type JestPrettyFormatOptions = {|
type JestPrettyFormatOptions = {
callToJSON: boolean,
edgeSpacing: string,
escapeRegex: boolean,
@@ -1199,14 +1203,14 @@ type JestPrettyFormatOptions = {|
plugins: JestPrettyFormatPlugins,
printFunctionName: boolean,
spacing: string,
theme: {|
theme: {
comment: string,
content: string,
prop: string,
tag: string,
value: string,
|},
|};
},
};
type JestPrettyFormatPlugin = {
print: (
@@ -1222,19 +1226,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. */
+43 -42
View File
@@ -1,29 +1,28 @@
// flow-typed signature: e556c06e721548417501c08b01fec911
// flow-typed version: ad3adf2de8/react-dom_v17.x.x/flow_>=v0.127.x
declare module 'react-dom' {
import type {Component} from 'react';
declare var version: string;
declare function findDOMNode(
componentOrElement: Element | ?React$Component<any, any>
componentOrElement: Element | ?Component<any, any>
): null | Element | Text;
declare function render<ElementType: React$ElementType>(
element: React$Element<ElementType>,
declare function render<ElementType: React.ElementType>(
element: ExactReactElement_DEPRECATED<ElementType>,
container: Element,
callback?: () => void
): React$ElementRef<ElementType>;
): React.ElementRef<ElementType>;
declare function hydrate<ElementType: React$ElementType>(
element: React$Element<ElementType>,
declare function hydrate<ElementType: React.ElementType>(
element: ExactReactElement_DEPRECATED<ElementType>,
container: Element,
callback?: () => void
): React$ElementRef<ElementType>;
): React.ElementRef<ElementType>;
declare function createPortal(
node: React$Node,
node: React.Node,
container: Element
): React$Portal;
): React.Portal;
declare function unmountComponentAtNode(container: any): boolean;
@@ -37,30 +36,32 @@ declare module 'react-dom' {
): void;
declare function unstable_renderSubtreeIntoContainer<
ElementType: React$ElementType
ElementType: React.ElementType
>(
parentComponent: React$Component<any, any>,
nextElement: React$Element<ElementType>,
parentComponent: Component<any, any>,
nextElement: ExactReactElement_DEPRECATED<ElementType>,
container: any,
callback?: () => void
): React$ElementRef<ElementType>;
): React.ElementRef<ElementType>;
}
declare module 'react-dom/server' {
declare var version: string;
declare function renderToString(element: React$Node): string;
declare function renderToString(element: React.Node): string;
declare function renderToStaticMarkup(element: React$Node): string;
declare function renderToStaticMarkup(element: React.Node): string;
declare function renderToNodeStream(element: React$Node): stream$Readable;
declare function renderToNodeStream(element: React.Node): stream$Readable;
declare function renderToStaticNodeStream(
element: React$Node
element: React.Node
): stream$Readable;
}
declare module 'react-dom/test-utils' {
import type {Component} from 'react';
declare interface Thenable {
then(resolve: () => mixed, reject?: () => mixed): mixed,
}
@@ -74,66 +75,66 @@ declare module 'react-dom/test-utils' {
};
declare function renderIntoDocument(
instance: React$Element<any>
): React$Component<any, any>;
instance: React.MixedElement
): Component<any, any>;
declare function mockComponent(
componentClass: React$ElementType,
componentClass: React.ElementType,
mockTagName?: string
): { [key: string]: mixed, ... };
declare function isElement(element: React$Element<any>): boolean;
declare function isElement(element: React.MixedElement): boolean;
declare function isElementOfType(
element: React$Element<any>,
componentClass: React$ElementType
element: React.MixedElement,
componentClass: React.ElementType
): boolean;
declare function isDOMComponent(instance: any): boolean;
declare function isCompositeComponent(
instance: React$Component<any, any>
instance: Component<any, any>
): boolean;
declare function isCompositeComponentWithType(
instance: React$Component<any, any>,
componentClass: React$ElementType
instance: Component<any, any>,
componentClass: React.ElementType
): boolean;
declare function findAllInRenderedTree(
tree: React$Component<any, any>,
test: (child: React$Component<any, any>) => boolean
): Array<React$Component<any, any>>;
tree: Component<any, any>,
test: (child: Component<any, any>) => boolean
): Array<Component<any, any>>;
declare function scryRenderedDOMComponentsWithClass(
tree: React$Component<any, any>,
tree: Component<any, any>,
className: string
): Array<Element>;
declare function findRenderedDOMComponentWithClass(
tree: React$Component<any, any>,
tree: Component<any, any>,
className: string
): ?Element;
declare function scryRenderedDOMComponentsWithTag(
tree: React$Component<any, any>,
tree: Component<any, any>,
tagName: string
): Array<Element>;
declare function findRenderedDOMComponentWithTag(
tree: React$Component<any, any>,
tree: Component<any, any>,
tagName: string
): ?Element;
declare function scryRenderedComponentsWithType(
tree: React$Component<any, any>,
componentClass: React$ElementType
): Array<React$Component<any, any>>;
tree: Component<any, any>,
componentClass: React.ElementType
): Array<Component<any, any>>;
declare function findRenderedComponentWithType(
tree: React$Component<any, any>,
componentClass: React$ElementType
): ?React$Component<any, any>;
tree: Component<any, any>,
componentClass: React.ElementType
): ?Component<any, any>;
declare function act(callback: () => void | Thenable): Thenable;
}
+45 -41
View File
@@ -1,50 +1,52 @@
// Type definitions for react-test-renderer 16.x.x
// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer
type ReactComponentInstance = React$Component<any>;
type ReactTestRendererJSON = {
type: string,
props: { [propName: string]: any, ... },
children: null | ReactTestRendererJSON[],
...
};
type ReactTestRendererTree = ReactTestRendererJSON & {
nodeType: "component" | "host",
instance: ?ReactComponentInstance,
rendered: null | ReactTestRendererTree,
...
};
type ReactTestInstance = {
instance: ?ReactComponentInstance,
type: string,
props: { [propName: string]: any, ... },
parent: null | ReactTestInstance,
children: Array<ReactTestInstance | string>,
find(predicate: (node: ReactTestInstance) => boolean): ReactTestInstance,
findByType(type: React$ElementType): ReactTestInstance,
findByProps(props: { [propName: string]: any, ... }): ReactTestInstance,
findAll(
predicate: (node: ReactTestInstance) => boolean,
options?: { deep: boolean, ... }
): ReactTestInstance[],
findAllByType(
type: React$ElementType,
options?: { deep: boolean, ... }
): ReactTestInstance[],
findAllByProps(
props: { [propName: string]: any, ... },
options?: { deep: boolean, ... }
): ReactTestInstance[],
...
};
type TestRendererOptions = { createNodeMock(element: React.MixedElement): any, ... };
declare module "react-test-renderer" {
declare export type ReactTestRenderer = {
import type {Component as ReactComponent} from 'react';
type ReactComponentInstance = ReactComponent<any>;
export type ReactTestRendererJSON = {
type: string,
props: { [propName: string]: any, ... },
children: null | ReactTestRendererJSON[],
...
};
export type ReactTestRendererTree = ReactTestRendererJSON & {
nodeType: "component" | "host",
instance: ?ReactComponentInstance,
rendered: null | ReactTestRendererTree,
...
};
export type ReactTestInstance = {
instance: ?ReactComponentInstance,
type: string,
props: { [propName: string]: any, ... },
parent: null | ReactTestInstance,
children: Array<ReactTestInstance | string>,
find(predicate: (node: ReactTestInstance) => boolean): ReactTestInstance,
findByType(type: React.ElementType): ReactTestInstance,
findByProps(props: { [propName: string]: any, ... }): ReactTestInstance,
findAll(
predicate: (node: ReactTestInstance) => boolean,
options?: { deep: boolean, ... }
): ReactTestInstance[],
findAllByType(
type: React.ElementType,
options?: { deep: boolean, ... }
): ReactTestInstance[],
findAllByProps(
props: { [propName: string]: any, ... },
options?: { deep: boolean, ... }
): ReactTestInstance[],
...
};
export type ReactTestRenderer = {
toJSON(): null | ReactTestRendererJSON,
toTree(): null | ReactTestRendererTree,
unmount(nextElement?: React.MixedElement): void,
@@ -65,6 +67,8 @@ declare module "react-test-renderer" {
}
declare module "react-test-renderer/shallow" {
import type {ReactTestInstance} from 'react-test-renderer';
declare export default class ShallowRenderer {
static createRenderer(): ShallowRenderer;
getMountedInstance(): ReactTestInstance;
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+3 -3
View File
@@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -205,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
Vendored
+2 -2
View File
@@ -75,11 +75,11 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
+1 -1
View File
@@ -32,7 +32,7 @@ if (process.env.FBSOURCE_ENV === '1') {
require('@fb-tools/babel-register');
} else {
// Register Babel to allow local packages to be loaded from source
require('../scripts/build/babel-register').registerForMonorepo();
require('../scripts/babel-register').registerForMonorepo();
}
const transformer = require('@react-native/metro-babel-transformer');
+30 -26
View File
@@ -5,31 +5,32 @@
"license": "MIT",
"packageManager": "yarn@1.22.22",
"scripts": {
"android": "cd packages/rn-tester && npm run android",
"android": "yarn --cwd packages/rn-tester android",
"build-android": "./gradlew :packages:react-native:ReactAndroid:build",
"build": "node ./scripts/build/build.js",
"build-types": "node ./scripts/build-types",
"clang-format": "clang-format -i --glob=*/**/*.{h,cpp,m,mm}",
"clean": "node ./scripts/build/clean.js",
"flow-check": "flow check",
"flow": "flow",
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
"format": "npm run prettier && npm run clang-format",
"featureflags": "cd packages/react-native && yarn featureflags",
"lint-ci": "./scripts/circleci/analyze_code.sh && yarn shellcheck",
"featureflags": "yarn --cwd packages/react-native featureflags",
"lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck",
"lint-java": "node ./scripts/lint-java.js",
"lint-markdown": "markdownlint-cli2 2>&1",
"lint": "eslint .",
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
"print-packages": "node ./scripts/monorepo/print",
"shellcheck": "./scripts/circleci/analyze_scripts.sh",
"start": "cd packages/rn-tester && npm run start",
"shellcheck": "./.github/workflow-scripts/analyze_scripts.sh",
"start": "yarn --cwd packages/rn-tester start",
"set-version": "node ./scripts/releases/set-version.js",
"test-android": "./gradlew :packages:react-native:ReactAndroid:test",
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
"test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js",
"test-ios": "./scripts/objc-test.sh test",
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
"test-typescript": "dtslint packages/react-native/types",
"test-typescript": "tsc -p packages/react-native/types/tsconfig.test.json",
"test": "jest",
"fantom": "JS_DIR='..' yarn jest --config packages/react-native-fantom/config/jest.config.js",
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
@@ -44,24 +45,25 @@
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@babel/generator": "^7.25.0",
"@babel/plugin-syntax-typescript": "^7.25.4",
"@babel/plugin-transform-regenerator": "^7.24.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-flow": "^7.24.7",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@react-native/metro-babel-transformer": "0.77.0-main",
"@react-native/metro-config": "0.77.0-main",
"@jest/create-cache-key-function": "^29.7.0",
"@react-native/metro-babel-transformer": "0.80.2",
"@react-native/metro-config": "0.80.2",
"@tsconfig/node18": "1.0.1",
"@types/react": "^19.0.0",
"@typescript-eslint/parser": "^7.1.1",
"ansi-styles": "^4.2.1",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-syntax-hermes-parser": "0.25.1",
"babel-plugin-syntax-hermes-parser": "0.28.1",
"babel-plugin-transform-define": "^2.1.4",
"babel-plugin-transform-flow-enums": "^0.0.2",
"chalk": "^4.0.0",
"clang-format": "^1.8.0",
"connect": "^3.6.5",
"debug": "^4.4.0",
"deep-equal": "1.1.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.5.0",
@@ -72,31 +74,33 @@
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-lint": "^1.0.0",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-api-translator": "0.25.1",
"flow-bin": "^0.258.1",
"flow-api-translator": "0.28.1",
"flow-bin": "^0.269.1",
"glob": "^7.1.1",
"hermes-eslint": "0.25.1",
"hermes-transform": "0.25.1",
"hermes-eslint": "0.28.1",
"hermes-transform": "0.28.1",
"inquirer": "^7.1.0",
"jest": "^29.6.3",
"jest": "^29.7.0",
"jest-config": "^29.7.0",
"jest-diff": "^29.7.0",
"jest-junit": "^10.0.0",
"jest-snapshot": "^29.7.0",
"jscodeshift": "^0.14.0",
"metro-babel-register": "^0.81.0",
"metro-memory-fs": "^0.81.0",
"metro-transform-plugins": "^0.81.0",
"markdownlint-cli2": "^0.17.2",
"markdownlint-rule-relative-links": "^3.0.0",
"metro-babel-register": "^0.82.2",
"metro-memory-fs": "^0.82.2",
"metro-transform-plugins": "^0.82.2",
"micromatch": "^4.0.4",
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.1",
"prettier": "2.8.8",
"prettier-plugin-hermes-parser": "0.25.1",
"react": "19.0.0",
"react-test-renderer": "19.0.0",
"prettier-plugin-hermes-parser": "0.28.1",
"react": "19.1.0",
"react-test-renderer": "19.1.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
@@ -106,6 +110,6 @@
"ws": "^6.2.3"
},
"resolutions": {
"react-is": "19.0.0"
"react-is": "19.1.0"
}
}
-3
View File
@@ -1,3 +0,0 @@
**/__mocks__/**
**/__tests__/**
BUCK
+11 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.77.0-main",
"version": "0.80.2",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
@@ -18,5 +18,14 @@
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
}
},
"files": [
"path-support.js",
"registry.js",
"README.md",
"!**/__docs__/**",
"!**/__fixtures__/**",
"!**/__mocks__/**",
"!**/__tests__/**"
]
}

Some files were not shown because too many files have changed in this diff Show More