Commit Graph

38536 Commits

Author SHA1 Message Date
Gijs Weterings 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 Scheduler 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án 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án 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 Corti 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 Corti 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 Norte 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 Norte 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 Norte 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án 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 Corti 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án 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án 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 Cipolleschi 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 Vacca 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
generatedunixname89002005287564 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 Yung 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 Juthapisuth 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 Juthapisuth 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 Baets 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 Lesiutin 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 Lesiutin 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 Lesiutin 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 Corti 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 Corti 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 Yahdav 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 Corti 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 Corti 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 Norte 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án 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 Norte 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án 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án 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 Baets 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 Cipolleschi 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 Cipolleschi 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 Vilches 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 Piasecki 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 Piasecki 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 Piasecki 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ü 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
generatedunixname89002005287564 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 Acosta 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 Zhou 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 Vacca 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 Vacca 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 Cipolleschi 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 Cipolleschi 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 Kesarwani 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 Kesarwani 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