Compare commits

...
1024 Commits
Author SHA1 Message Date
Riccardo Cipolleschi 940776ff8c [LOCAL] Bump podfile.lock 2025-10-21 19:23:33 +01:00
React Native Bot 21e6dc1512 Release 0.79.7
#publish-packages-to-npm&0.79-stable
2025-10-21 15:42:20 +00:00
Riccardo Cipolleschi 1d74ff5d85 Revert "Release 0.79.7"
This reverts commit 27f12ee54b.
2025-10-21 16:38:22 +01:00
Riccardo Cipolleschi 1459dd5549 [LOCAL] Fix CI for releases 2025-10-21 16:37:16 +01:00
React Native Bot 27f12ee54b Release 0.79.7
#publish-packages-to-npm&0.79-stable
2025-10-21 13:55:27 +00:00
Riccardo CipolleschiandGitHub c500e0a714 Downgrade CMake on Mac machines (#54210) 2025-10-21 12:04:27 +01:00
Riccardo Cipolleschi 296998d95c [LOCAL] Downgrade CMake for Mac machines, take3 2025-10-20 14:21:16 +01:00
Riccardo Cipolleschi db4cd9750d [LOCAL] Downgrade CMake for Mac machines, take2 2025-10-20 14:17:01 +01:00
Riccardo Cipolleschi e9f93b5429 [LOCAL] Downgrade CMake for Mac machines 2025-10-20 14:12:12 +01:00
Riccardo Cipolleschi f2e47d8dab [LOCAL] Apply patch on top of #49951 - see pick request 1009 2025-10-20 13:55:17 +01:00
Pieter De BaetsandRiccardo Cipolleschi 56ad8d9bfd 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-10-20 13:50:29 +01:00
Riccardo Cipolleschi 03214a5809 [LOCAL] Bump podfile.lock 2025-08-14 15:35:54 +01:00
React Native Bot f27463f43e Release 0.79.6
#publish-packages-to-npm&0.79-stable
2025-08-14 11:33:35 +00:00
Nicola CortiandRiccardo Cipolleschi 417c5c644a @DoNotStrip ReactModalHostView to prevent instacrash on release (#52195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52195

RNTester is currently instacrashing on release due to use minifying the `ReactModalHostView`.
In that class there is a static method that is accessed by JNI so we should annotated this class
as `DoNotStrip` as otherwise we won't be able to access it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D77148010

fbshipit-source-id: c5b2758fa2919bc1f5885433202a45b4c3f8ff99
2025-08-14 10:48:41 +01:00
Riccardo Cipolleschi a5ec1cd809 [LOCAL] fix duplicated symbols on on Modal when using dynamic frameworks 2025-08-13 15:20:56 +01:00
Riccardo Cipolleschi aa7d1c605a [LOCAL] Fix React-FabricComponents.podspec after Modal changes 2025-08-13 13:58:03 +01:00
Riccardo Cipolleschi 9a4e1df834 [LOCAL] Fix Android tests after changing Windows CI 2025-08-13 12:50:45 +01:00
Riccardo Cipolleschi a74d930c93 Add the ENTERPRISE_REPOSITORY env var to let user consume artifacts from their personal maven mirror 2025-08-13 11:57:54 +01:00
Nicola CortiandRiccardo Cipolleschi 5a315f8d6b Fix Modal first frame being rendered on top-left corner (#51048)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51048

Fixes https://github.com/facebook/react-native/issues/50442
Closes https://github.com/facebook/react-native/pull/50704

Users reported that Modals on Android are first renderer anchored in 0,0.
That results in them being on the top left corner of the screen for some seconds.

This is happening because the native state of the Modal on Android as width/height set at 0,0 - which we then update in a subsequent callback.

I'm fixing this by making sure we render the Modal the first time with the right screen size - the status bar size

Changelog:
[Android] [Fixed] - Fix Modal first frame being rendered on top-left corner

Reviewed By: javache

Differential Revision: D73948178

fbshipit-source-id: 055c12aa62d70acc1e4c5a2a5c4ea0c5608e22c7
2025-08-13 11:05:41 +01:00
Nicola CortiandRiccardo Cipolleschi df5ac988ce 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-08-13 11:01:34 +01:00
Vladimir IlievandRiccardo Cipolleschi 43bc43e5e8 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.

[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

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-08-13 11:01:00 +01:00
Riccardo Cipolleschi d97f6f6767 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-08-13 10:50:40 +01:00
Rob HoganandRiccardo Cipolleschi db600b2e9e [LOCAL] Backout #46896 - Attempt to fix #50274 (#52515) 2025-08-13 10:50:18 +01:00
Tommy NguyenandReact Native Bot a8539190fe fix(codegen): fix missing dependencies (#52884)
Summary:
`react-native/codegen` uses `babel/parser` and `babel/core` but does not declare dependency on them. Depending on how packages are hoisted (and especially in pnpm setups), this causes crashes during codegen.

Resolves https://github.com/facebook/react-native/issues/52883

## Changelog:

[GENERAL] [FIXED] - Add missing Babel dependencies

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

Test Plan: See https://github.com/facebook/react-native/issues/52883

Reviewed By: cortinico, christophpurrer

Differential Revision: D79103092

Pulled By: robhogan

fbshipit-source-id: ecaf690f994393a652ea7f0d4f30bbabeb23a434
2025-08-13 09:41:42 +00:00
Fabrizio Cucci 01c1253c7e Update Podfile.lock
Changelog: [Internal]
2025-07-02 10:33:02 +01:00
React Native Bot b063fd04dc Release 0.79.5
#publish-packages-to-npm&0.79-stable
2025-07-01 17:30:07 +00:00
Fabrizio Cucci b725f97504 Revert "Release 0.79.5"
This reverts commit 426dd97d21.
2025-07-01 18:26:54 +01:00
React Native Bot 426dd97d21 Release 0.79.5
#publish-packages-to-npm&0.79-stable
2025-07-01 14:09:28 +00:00
buschcoandFabrizio Cucci bf07da1a66 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-07-01 12:23:55 +01:00
Fabrizio Cucci af31ad9790 Update Podfile.lock
Changelog: [Internal]
2025-06-18 10:56:12 +01:00
React Native Bot 58edb0af93 Release 0.79.4
#publish-packages-to-npm&0.79-stable
2025-06-17 17:10:17 +00:00
Nicola CortiandGitHub cd422dc2b6 Revert "[0.79] Close Sonatype repository during build_android (#52086)" (#52089)
* Revert "[0.79] Close Sonatype repository during build_android (#52086)"

This reverts commit 6e0b1bedc5.

* [0.79] Close Sonatype repository during build_npm_package
2025-06-17 18:04:07 +01:00
Fabrizio Cucci 425662439c Revert "Release 0.79.4"
This reverts commit 1a6cb4b45b.
2025-06-17 17:47:42 +01:00
React Native Bot 1a6cb4b45b Release 0.79.4
#publish-packages-to-npm&0.79-stable
2025-06-17 15:05:47 +00:00
Riccardo CipolleschiandFabrizio Cucci 4581ce7863 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-17 16:02:51 +01:00
Nicola CortiandGitHub 6e0b1bedc5 [0.79] Close Sonatype repository during build_android (#52086) 2025-06-17 14:36:08 +01:00
Fabrizio Cucci c955e6c538 Revert "Release 0.79.4"
This reverts commit ecc6270247.
2025-06-17 14:34:04 +01:00
React Native Bot ecc6270247 Release 0.79.4
#publish-packages-to-npm&0.79-stable
2025-06-17 10:21:12 +00:00
Riccardo CipolleschiandGitHub 3acfe01382 [RN][Codegen] Backports fix: exclusion of selectively disabled libraries from codegen generation (#52040) 2025-06-16 12:41:28 +01:00
Joe VilchesandGitHub 0ebaaed281 Fix broken focus behavior for TextInput in older Android versions (< 9) (#51964) 2025-06-16 11:05:26 +01:00
Nicola Corti e386b01a8f 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:43:37 +01:00
Nicola Corti 129622d9b9 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:43:37 +01:00
Ritesh ShuklaandGitHub 235ac2cca0 Fix Dimensions not changing when orientation changes (#51978)
This fixes the bug where Dimensions (width and height) are not changing when the orientation changes.
2025-06-16 10:28:42 +01:00
Aswin AndroandReact Native Bot ea6abb690e 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-16 09:21:15 +00:00
2cd074d77a Disabling updateRuntimeShadowNodeReferencesOnCommit by default. (#52013)
Co-authored-by: Nick <lefever@meta.com>
2025-06-16 10:18:51 +01:00
Nicola Corti 81ed5e1ef0 Revert "[0.79] Fix broken focus behavior on TextInput in older Android versions"
This reverts commit 1e0bbb80ce.
2025-06-10 16:09:58 +01:00
Nicola Corti 69349ebdd5 Revert "remove unused fn"
This reverts commit da6115c6d7.
2025-06-10 16:09:47 +01:00
Joe Vilches da6115c6d7 remove unused fn 2025-06-10 10:20:08 -04:00
Joe Vilches 1e0bbb80ce [0.79] Fix broken focus behavior on TextInput in older Android versions 2025-06-09 20:40:46 -04:00
Riccardo Cipolleschi 2095834380 [LOCAL] Bump Podfile.lock 2025-06-04 18:56:25 +01:00
React Native Bot ca48f3fbdc Release 0.79.3
#publish-packages-to-npm&latest
2025-06-04 16:12:56 +00:00
4f01e87336 [Local] Fix CI for 0.79-stable (#51804)
Co-authored-by: Dawid Małecki <maleckidawid@meta.com>
resolved: https://github.com/facebook/react-native/pull/51382
2025-06-04 16:03:11 +01:00
Riccardo Cipolleschi 76f3d5cab4 [LOCAL]Bump Hermes version 2025-06-04 11:15:01 +01:00
Krystof WoldrichandRiccardo Cipolleschi af21f260a1 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.

<!-- 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-06-04 11:06:44 +01:00
Kirill NovikovandRiccardo Cipolleschi ed7b4d86ab 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-06-04 11:03:29 +01:00
Ritesh ShuklaandRiccardo Cipolleschi a47b9aab5d Fixed borderBottomEndRadius on RTL (#51229)
Summary:
Fixes https://github.com/facebook/react-native/issues/51193
[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-06-04 11:02:46 +01:00
Riccardo Cipolleschi e5c089669a Exclude selectively disabled libraries from codegen generation 2025-06-04 10:59:56 +01:00
aleqsioandReact Native Bot 3af9e65e3f 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-06-04 09:47:01 +00:00
Kacper RożniataandReact Native Bot c8fcac2765 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-06-04 09:46:34 +00:00
zhongwuzwandReact Native Bot 8d42fc40bc 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-06-04 09:43:59 +00:00
Christian FalchandReact Native Bot 27601849aa 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-06-04 09:41:58 +00:00
Eric RozellandReact Native Bot eeb961264e 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-06-04 09:41:05 +00:00
Phil PluckthunandReact Native Bot 942422c4cb 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-06-04 09:39:29 +00:00
Alex HuntandGitHub cb7d0bde2b Update debugger-frontend from 97e99126...8f145a05 (S523384 mitigation) (#51569) 2025-06-04 10:38:38 +01:00
Fabrizio Cucci 07978dc2e7 Update Podfile.lock
Changelog: [Internal]
2025-05-01 18:59:24 +01:00
React Native Bot 9c5fc79581 Release 0.79.2
#publish-packages-to-npm&latest
2025-05-01 15:49:26 +00:00
Jakub GrzywaczandFabrizio Cucci a13be817cc 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.

[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-05-01 15:05:09 +01:00
Riccardo CipolleschiandReact Native Bot a99773d8d7 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-05-01 13:57:11 +00:00
22a4e060d5 Backport useShadowNodeStateOnClone and updateRuntimeShadowNodeReferencesOnCommit (and more)
* Add updateRuntimeShadowNodeReferencesOnCommit and useShadowNodeStateOnClone feature flags

* Use source shadow node state on clone

* Enable useShadowNodeStateOnClone by default on OSS

* Split shadow node reference setter and update functionality

* Move shadow node reference updates to tree commit

* Enable updateRuntimeShadowNodeReferencesOnCommit by default for OSS

---------

Co-authored-by: Nick Lefever <lefever@meta.com>
2025-05-01 14:53:38 +01:00
Fabrizio Cucci 994ab4a26e Update Podfile.lock
Changelog: [Internal]
2025-04-15 15:53:29 +01:00
Fabrizio CucciandReact Native Bot a6a511715e 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-15 13:54:46 +00:00
React Native Bot aa51fb4cac Release 0.79.1
#publish-packages-to-npm&latest
2025-04-15 10:11:17 +00:00
Wang ChuanandFabrizio Cucci 89f4dd2a24 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.

[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 15:42:35 +01:00
Riccardo CipolleschiandGitHub f3c280442d [RN][iOS] Do not generate ReactCodegen.podspec for libraries (#50646) 2025-04-14 12:34:02 +01:00
Riccardo CipolleschiandGitHub b2bacc4a9f [RN][Codegen] Do not generate Apple specific file for Android (#50655) 2025-04-14 11:17:59 +01:00
Alan HughesandReact Native Bot d068888d8a 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-14 10:12:37 +00:00
Fabrizio Cucci 647fb382bf Update Podfile.lock
Changelog: [Internal]
2025-04-08 13:56:41 +01:00
React Native Bot c823a147e2 Release 0.79.0
#publish-packages-to-npm&latest
2025-04-08 09:14:40 +00:00
Riccardo CipolleschiandReact Native Bot e0012c0868 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 14:08:54 +00:00
Fabrizio Cucci 2abcf99cb4 Update Podfile.lock
Changelog: [Internal]
2025-04-01 11:00:24 +01:00
React Native Bot 0df2a11ed0 Release 0.79.0-rc.4
#publish-packages-to-npm&next
2025-03-31 16:18:42 +00:00
Kudo ChienandFabrizio Cucci 6c907ee11b 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.

[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-28 11:32:25 +00:00
Riccardo CipolleschiandReact Native Bot 0bd7b4eb47 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-28 10:40:57 +00:00
Riccardo CipolleschiandFabrizio Cucci adb3beed64 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

[Internal] - Make React-hermes and React-renderercss defines modules

Reviewed By: fabriziocucci

Differential Revision: D71892679

fbshipit-source-id: b03b65986fbdbe781b616f31dfb6bceb38b8b3b7
2025-03-27 10:27:10 +00:00
Rubén NorteandFabrizio Cucci a42971a200 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-26 13:54:31 +00:00
Rubén NorteandFabrizio Cucci 4e4b9baf3c 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-26 13:47:29 +00:00
Fabrizio Cucci 4f838c22cd Update Podfile.lock
Changelog: [Internal]
2025-03-24 19:32:38 +00:00
React Native Bot abad2f48da Release 0.79.0-rc.3
#publish-packages-to-npm&next
2025-03-24 15:12:10 +00:00
Nicola CortiandReact Native Bot 63fdc04888 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-24 10:41:38 +00:00
Riccardo CipolleschiandReact Native Bot 9805a4f89a 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-24 09:10:49 +00:00
Riccardo CipolleschiandReact Native Bot 5d26c5132c 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 15:11:41 +00:00
Riccardo CipolleschiandReact Native Bot 63149256c0 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-19 08:00:15 +00:00
Riccardo Cipolleschi 9498b71438 [RN][iOS] Fix codegen to avoid the creation of <appName>, folders 2025-03-18 15:52:59 +00:00
Michail StrokinandReact Native Bot 669956369a 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-18 14:54:48 +00:00
Fabrizio Cucci fb7ca6a688 Update Podfile.lock
Changelog: [Internal]
2025-03-18 08:13:41 +00:00
React Native Bot 60c2fe0ef7 Release 0.79.0-rc.2
#publish-packages-to-npm&next
2025-03-17 14:46:33 +00:00
Vojtech NovakandReact Native Bot 8b0c333a99 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-17 10:09:58 +00:00
Phil PluckthunandGitHub b63040fcce [0.79] refactor(react-native-codegen): Replace jscodeshift with @babel/core (#50031)
* Replace jscodeshift with @babel/core

* Rewrite GenerateViewConfigJs with @babel/core

* Update yarn.lock

* Update snapshots

* Remove unused devDependencies

* Remove jscodeshift from root

* Format with prettier

* Import changes (literal -> stringLiteral rather than identifier in some cases)

* Update snapshots

* Update snapshots for babel-plugin-codegen

* Disable babelrc since we're only stringifying

* Revert "Remove unused devDependencies"

This reverts commit f8defcf93d.
2025-03-14 11:46:26 +00:00
zhongwuzwandReact Native Bot 15451690c0 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 14:23:27 +00:00
zhongwuzwandReact Native Bot 203f886228 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-11 12:04:51 +00:00
Riccardo CipolleschiandReact Native Bot 9548609c15 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 11:36:43 +00:00
Nicola Corti 29caa0725d Update Podfile.lock
Changelog: [Internal]
2025-03-11 11:33:30 +00:00
React Native Bot d74bb8e748 Release 0.79.0-rc.1
#publish-packages-to-npm&next
2025-03-11 08:43:20 +00:00
Riccardo CipolleschiandGitHub 7739615e0d [LOCAL][RN][iOS][OldArch] Add missing loadFromSource method in the DefaultRNFactoryDelegate (#49930) 2025-03-10 16:41:44 +00:00
Bruno AybarandReact Native Bot bcc8b27d87 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-10 14:40:47 +00:00
Riccardo CipolleschiandReact Native Bot 2f4dbc64b7 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 10:59:58 +00:00
Rob HoganandGitHub 8421b8a872 [0.79] Update Metro to ^0.82.0 (#49892) 2025-03-08 13:05:45 +00:00
Riccardo CipolleschiandReact Native Bot 2b0e406fef 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 15:20:22 +00:00
Fabrizio CucciandReact Native Bot eb02343f95 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 13:08:18 +00:00
Fabrizio Cucci f238aecca1 Update Podfile.lock
Changelog: [Internal]
2025-03-04 12:55:51 +00:00
React Native Bot e6a3390fb5 Release 0.79.0-rc.0
#publish-packages-to-npm&next
2025-03-04 08:15:32 +00:00
Riccardo CipolleschiandFabrizio Cucci 1961e58b13 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 15:20:56 +00:00
Fabrizio Cucci c593bf833b Bump hermes 2025-03-03 14:55:16 +00: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
1984 changed files with 81000 additions and 36394 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
+10
View File
@@ -35,6 +35,16 @@ module.exports = {
'no-undef': 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',
+2 -1
View File
@@ -41,6 +41,7 @@
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
packages/react-native/src/types/
[options]
enums=true
@@ -95,4 +96,4 @@ untyped-import
untyped-type-import
[version]
^0.258.1
^0.262.0
+3 -3
View File
@@ -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
@@ -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
@@ -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
+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:
@@ -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,10 +101,21 @@ 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
+6 -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,10 @@ 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: Verify not committing repo after running build
shell: bash
run: yarn run build --check
@@ -41,7 +40,7 @@ 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
+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.39.7; 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.39.7; 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:
+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:
+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
@@ -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,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,
);
});
});
});
@@ -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
@@ -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
+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,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);
};
+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
+27
View File
@@ -0,0 +1,27 @@
name: Monitor React Native New Issues
on:
schedule:
- cron: "0 0,6,12,18 * * *"
workflow_dispatch:
jobs:
monitor-issues:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- 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: "role"
discord_ids: "1339243367841927228"
+12 -6
View File
@@ -100,6 +100,9 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
uses: ./.github/workflows/prebuild-ios.yml
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
@@ -116,12 +119,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 +156,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 +168,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 +187,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 }}
+183
View File
@@ -0,0 +1,183 @@
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: v1-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: v1-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: v1-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: v1-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]
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: v1-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: 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: Create XCFramework
if: steps.restore-xcframework.outputs.cache-hit != 'true'
run: node scripts/releases/prepare-ios-prebuilds.js -c
- 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: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
+29 -27
View File
@@ -45,11 +45,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.9'
- name: Build HermesC Apple
uses: ./.github/actions/build-hermesc-apple
with:
hermes-version: ${{ needs.prepare_hermes_workspace.output.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.output.react-native-version }}
build_apple_slices_hermes:
runs-on: macos-14
needs: [build_hermesc_apple, prepare_hermes_workspace]
@@ -68,6 +73,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.9'
- name: Build Slice
uses: ./.github/actions/build-apple-slices-hermes
with:
@@ -96,6 +105,8 @@ 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
build_hermesc_linux:
runs-on: ubuntu-latest
@@ -113,12 +124,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 +142,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 +151,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 +174,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 +206,13 @@ 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());
+27 -6
View File
@@ -63,6 +63,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.9'
- name: Build HermesC Apple
uses: ./.github/actions/build-hermesc-apple
with:
@@ -87,6 +91,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.9'
- name: Build Slice
uses: ./.github/actions/build-apple-slices-hermes
with:
@@ -116,6 +124,9 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
uses: ./.github/workflows/prebuild-ios.yml
test_ios_rntester_ruby_3_2_0:
runs-on: macos-13
needs:
@@ -157,7 +168,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_rntester:
runs-on: macos-13
runs-on: macos-13-large
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
env:
@@ -369,6 +380,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 +419,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 +455,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 +500,7 @@ jobs:
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
]
container:
image: reactnativecommunity/react-native-android:latest
@@ -499,6 +517,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 +556,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
@@ -615,7 +636,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: ["20", "18"]
node-version: ["22", "20", "18"]
steps:
- name: Checkout
uses: actions/checkout@v4
+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/
+1
View File
@@ -7,5 +7,6 @@
packages/*/dist
vendor
packages/**/types_generated/
packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js
+236 -48
View File
@@ -1,89 +1,168 @@
# Changelog
## v0.76.6
## v0.78.0
### Fixed
### Breaking
- **layout:** Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints ([f7a5db3c06](https://github.com/facebook/react-native/commit/f7a5db3c063b952321826ea431d3d238ef0de65d) by [@NickGerleman](https://github.com/NickGerleman))
- **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
- **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))
- **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
- **TextInput:** Fixing TextInput `maxLength` not working in old arch ([9ecf290d27](https://github.com/facebook/react-native/commit/9ecf290d270598e45832a75f657d73cf20088a37) by [@mateoguzmana](https://github.com/mateoguzmana))
- **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))
## v0.77.0-rc.6
### Added
### Fixed
- **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
- **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
- **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
- **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
- **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
#### 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))
- **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
- **runtime:** Handle removal of in-transition views. ([f402ed17fa](https://github.com/facebook/react-native/commit/f402ed17fa6d75aea24e2ad99a8b8d8ad20840e3) by [@kkafar](https://github.com/kkafar))
- **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
- **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))
- **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))
## v0.77.0-rc.2
### Fixed
### Removed
#### 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))
- **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))
## v0.77.0-rc.1
### Fixed
- **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))
- **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
- **Codegen:** Fix IOException in `BuildCodegenCLITask` ([9147b0753a](https://github.com/facebook/react-native/commit/9147b0753a6c3afb2480b079f91614cd7189a28a) by [@vonovak](https://github.com/vonovak))
- **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))
## v0.77.0-rc.0
#### 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.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 +248,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 +330,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 +381,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 +392,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 +434,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 +464,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 +495,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 +511,52 @@ 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.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 +947,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 +1383,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.
-3
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>
+3 -1
View File
@@ -54,6 +54,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 +94,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")
}
+4199
View File
File diff suppressed because it is too large Load Diff
-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;
}
+13 -1
View File
@@ -11,6 +11,18 @@
// https://github.com/visionmedia/debug
// https://www.npmjs.com/package/debug
interface DebugFN {
(...args: Array<mixed>): void;
enable(match: string): void;
disable(): void;
enabled: () => boolean;
}
declare module 'debug' {
declare module.exports: (namespace: string) => (...Array<mixed>) => void;
declare module.exports: {
(namespace: string): DebugFN,
enable(match: string): void,
disable(): void,
enabled: () => boolean,
};
}
+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.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -1
View File
@@ -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.
Vendored
-5
View File
@@ -1,8 +1,3 @@
@REM Copyright (c) Meta Platforms, Inc. and affiliates.
@REM
@REM This source code is licensed under the MIT license found in the
@REM LICENSE file in the root directory of this source tree.
@rem
@rem Copyright 2015 the original author or authors.
@rem
+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');
+17 -17
View File
@@ -5,31 +5,31 @@
"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/build-types.js",
"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": "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,13 +44,13 @@
"@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.79.7",
"@react-native/metro-config": "0.79.7",
"@tsconfig/node18": "1.0.1",
"@types/react": "^19.0.0",
"@typescript-eslint/parser": "^7.1.1",
@@ -62,6 +62,7 @@
"chalk": "^4.0.0",
"clang-format": "^1.8.0",
"connect": "^3.6.5",
"debug": "^2.2.0",
"deep-equal": "1.1.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.5.0",
@@ -77,19 +78,18 @@
"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-bin": "^0.262.0",
"glob": "^7.1.1",
"hermes-eslint": "0.25.1",
"hermes-transform": "0.25.1",
"inquirer": "^7.1.0",
"jest": "^29.6.3",
"jest": "^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",
"metro-babel-register": "^0.82.0",
"metro-memory-fs": "^0.82.0",
"metro-transform-plugins": "^0.82.0",
"micromatch": "^4.0.4",
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.77.0-main",
"version": "0.79.7",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
-1
View File
@@ -47,7 +47,6 @@ const drawableFileTypes = new Set([
'jpg',
'ktx',
'png',
'svg',
'webp',
'xml',
]);
@@ -30,18 +30,18 @@ const {
} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
let nativeComponentName = 'RCTModule';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'RCTModule',
uiViewClassName: \\"RCTModule\\",
bubblingEventTypes: {
topBubblingEventDefinedInlineNull: {
phasedRegistrationNames: {
captured: 'onBubblingEventDefinedInlineNullCapture',
bubbled: 'onBubblingEventDefinedInlineNull'
captured: \\"onBubblingEventDefinedInlineNullCapture\\",
bubbled: \\"onBubblingEventDefinedInlineNull\\"
}
}
},
directEventTypes: {
topDirectEventDefinedInlineNull: {
registrationName: 'onDirectEventDefinedInlineNull'
registrationName: \\"onDirectEventDefinedInlineNull\\"
}
},
validAttributes: {
@@ -93,18 +93,18 @@ const {
} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
let nativeComponentName = 'RCTModule';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'RCTModule',
uiViewClassName: \\"RCTModule\\",
bubblingEventTypes: {
topBubblingEventDefinedInlineNull: {
phasedRegistrationNames: {
captured: 'onBubblingEventDefinedInlineNullCapture',
bubbled: 'onBubblingEventDefinedInlineNull'
captured: \\"onBubblingEventDefinedInlineNullCapture\\",
bubbled: \\"onBubblingEventDefinedInlineNull\\"
}
}
},
directEventTypes: {
topDirectEventDefinedInlineNull: {
registrationName: 'onDirectEventDefinedInlineNull'
registrationName: \\"onDirectEventDefinedInlineNull\\"
}
},
validAttributes: {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.77.0-main",
"version": "0.79.7",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.77.0-main"
"@react-native/codegen": "0.79.7"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+3 -2
View File
@@ -15,7 +15,7 @@ Start the React Native development server.
#### Usage
```sh
npx react-native start [options]
npx @react-native-community/cli start [options]
```
#### Options
@@ -37,6 +37,7 @@ npx react-native start [options]
| `--cert <path>` | Specify path to a custom SSL cert. |
| `--config <string>` | Path to the CLI configuration file. |
| `--no-interactive` | Disable interactive mode. |
| `--client-logs` | **[Deprecated]** Enable plain text JavaScript log streaming for all connected apps. |
### `bundle`
@@ -45,7 +46,7 @@ Build the bundle for the provided JavaScript entry file.
#### Usage
```sh
npx react-native bundle --entry-file <path> [options]
npx @react-native-community/cli bundle --entry-file <path> [options]
```
#### Options
+8 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.77.0-main",
"version": "0.79.7",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,25 +22,23 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.77.0-main",
"@react-native/metro-babel-transformer": "0.77.0-main",
"@react-native/dev-middleware": "0.79.7",
"chalk": "^4.0.0",
"debug": "^2.2.0",
"invariant": "^2.2.4",
"metro": "^0.81.0",
"metro-config": "^0.81.0",
"metro-core": "^0.81.0",
"readline": "^1.3.0",
"metro": "^0.82.0",
"metro-config": "^0.82.0",
"metro-core": "^0.82.0",
"semver": "^7.1.3"
},
"devDependencies": {
"metro-resolver": "^0.81.0"
"metro-resolver": "^0.82.0"
},
"peerDependencies": {
"@react-native-community/cli-server-api": "*"
"@react-native-community/cli": "*"
},
"peerDependenciesMeta": {
"@react-native-community/cli-server-api": {
"@react-native-community/cli": {
"optional": true
}
},
@@ -54,8 +54,11 @@ export default class OpenDebuggerKeyboardHandler {
'Failed to open debugger for %s (%s): %s',
target.title,
target.description,
e.message,
'Network error',
);
if (e.cause != null) {
this.#log('error', 'Cause: %s', e.cause);
}
this.#clearTerminalMenu();
}
}
@@ -95,6 +95,14 @@ const startCommand: Command = {
name: '--no-interactive',
description: 'Disables interactive mode',
},
{
name: '--client-logs',
description:
'[Deprecated] Enable plain text JavaScript log streaming for all ' +
'connected apps. This feature is deprecated and will be removed in ' +
'future.',
default: false,
},
],
};
@@ -9,9 +9,11 @@
* @oncall react_native
*/
import type {NextHandleFunction, Server} from 'connect';
import type {Server} from 'connect';
import type {TerminalReportableEvent} from 'metro/src/lib/TerminalReporter';
import {typeof createDevServerMiddleware as CreateDevServerMiddleware} from '@react-native-community/cli-server-api';
const debug = require('debug')('ReactNative:CommunityCliPlugin');
type MiddlewareReturn = {
@@ -30,10 +32,6 @@ type MiddlewareReturn = {
...
};
const noopNextHandle: NextHandleFunction = (req, res, next) => {
next();
};
// $FlowFixMe
const unusedStubWSServer: ws$WebSocketServer = {};
// $FlowFixMe
@@ -45,6 +43,12 @@ const communityMiddlewareFallback = {
port: number,
watchFolders: $ReadOnlyArray<string>,
}): MiddlewareReturn => ({
// FIXME: Several features will break without community middleware and
// should be migrated into core.
// e.g. used by Libraries/Core/Devtools:
// - /open-stack-frame
// - /open-url
// - /symbolicate
middleware: unusedMiddlewareStub,
websocketEndpoints: {},
messageSocketEndpoint: {
@@ -59,17 +63,28 @@ const communityMiddlewareFallback = {
reportEvent: (event: TerminalReportableEvent) => {},
},
}),
indexPageMiddleware: noopNextHandle,
};
// Attempt to use the community middleware if it exists, but fallback to
// the stubs if it doesn't.
try {
const community = require('@react-native-community/cli-server-api');
communityMiddlewareFallback.indexPageMiddleware =
community.indexPageMiddleware;
communityMiddlewareFallback.createDevServerMiddleware =
community.createDevServerMiddleware;
// `@react-native-community/cli` is an optional peer dependency of this
// package, and should be a dev dependency of the host project (via the
// community template's package.json).
const communityCliPath = require.resolve('@react-native-community/cli');
// Until https://github.com/react-native-community/cli/pull/2605 lands,
// we need to find `@react-native-community/cli-server-api` via
// `@react-native-community/cli`. Once that lands, we can simply
// require('@react-native-community/cli').
const communityCliServerApiPath = require.resolve(
'@react-native-community/cli-server-api',
{paths: [communityCliPath]},
);
// $FlowIgnore[unsupported-syntax] dynamic import
communityMiddlewareFallback.createDevServerMiddleware = require(
communityCliServerApiPath,
).createDevServerMiddleware as CreateDevServerMiddleware;
} catch {
debug(`⚠️ Unable to find @react-native-community/cli-server-api
Starting the server without the community middleware.`);
@@ -77,5 +92,3 @@ Starting the server without the community middleware.`);
export const createDevServerMiddleware =
communityMiddlewareFallback.createDevServerMiddleware;
export const indexPageMiddleware =
communityMiddlewareFallback.indexPageMiddleware;
@@ -19,7 +19,7 @@ import isDevServerRunning from '../../utils/isDevServerRunning';
import loadMetroConfig from '../../utils/loadMetroConfig';
import * as version from '../../utils/version';
import attachKeyHandlers from './attachKeyHandlers';
import {createDevServerMiddleware, indexPageMiddleware} from './middleware';
import {createDevServerMiddleware} from './middleware';
import {createDevMiddleware} from '@react-native/dev-middleware';
import chalk from 'chalk';
import Metro from 'metro';
@@ -44,6 +44,7 @@ export type StartCommandArgs = {
config?: string,
projectRoot?: string,
interactive: boolean,
clientLogs: boolean,
};
async function runServer(
@@ -96,6 +97,11 @@ async function runServer(
require.resolve(plugin),
);
}
// TODO(T214991636): Remove legacy Metro log forwarding
if (!args.clientLogs) {
// $FlowIgnore[cannot-write] Assigning to readonly property
metroConfig.server.forwardClientLogs = false;
}
let reportEvent: (event: TerminalReportableEvent) => void;
const terminal = new Terminal(process.stdout);
@@ -146,11 +152,7 @@ async function runServer(
secure: args.https,
secureCert: args.cert,
secureKey: args.key,
unstable_extraMiddleware: [
communityMiddleware,
indexPageMiddleware,
middleware,
],
unstable_extraMiddleware: [communityMiddleware, middleware],
websocketEndpoints: {
...communityWebsocketEndpoints,
...websocketEndpoints,
+1 -1
View File
@@ -14,7 +14,7 @@ export type * from './index.flow';
*/
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
require('../../../scripts/build/babel-register').registerForMonorepo();
require('../../../scripts/babel-register').registerForMonorepo();
}
module.exports = require('./index.flow');
@@ -92,6 +92,7 @@ Diff: ${chalk.dim.underline(newVersion?.diffUrl ?? 'none')}
// $FlowFixMe
function isDiffPurgeEntry(data: Partial<DiffPurge>): data is DiffPurge {
return (
// $FlowFixMe[incompatible-type-guard]
[data.name, data.zipball_url, data.tarball_url, data.node_id].filter(
e => typeof e !== 'undefined',
).length === 0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.77.0-main",
"version": "0.79.7",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+1 -1
View File
@@ -14,7 +14,7 @@ export type * from './index.flow';
*/
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
require('../../../scripts/build/babel-register').registerForMonorepo();
require('../../../scripts/babel-register').registerForMonorepo();
}
module.exports = require('./index.flow');
+36 -4
View File
@@ -71,7 +71,14 @@ function checkPodfileInSyncWithManifest(
const FIRST = 1,
SECOND = 2,
THIRD = 3;
THIRD = 3,
FOURTH = 4,
FIFTH = 5;
function getNodePackagePath(packageName: string): string {
// $FlowIgnore[prop-missing] type definition is incomplete
return require.resolve(packageName, {cwd: [process.cwd(), ...module.paths]});
}
/* eslint sort-keys: "off" */
export const tasks = {
@@ -79,26 +86,51 @@ export const tasks = {
bootstrap: (
options: AppleBootstrapOption,
): {
cleanupBuildFolder: Task<void>,
runCodegen: Task<void>,
validate: Task<void>,
installRubyGems: Task<ExecaPromise>,
installDependencies: Task<ExecaPromise>,
} => ({
validate: task(FIRST, 'Check Cocoapods and bundle are available', () => {
cleanupBuildFolder: task(FIRST, 'Cleanup build folder', () => {
execa.sync('rm', ['-rf', 'build'], {
cwd: options.cwd,
});
}),
runCodegen: task(SECOND, 'Run codegen', () => {
const reactNativePath = path.dirname(getNodePackagePath('react-native'));
const codegenScript = path.join(
reactNativePath,
'scripts',
'generate-codegen-artifacts.js',
);
execa.sync('node', [
codegenScript,
'-p',
process.cwd(),
'-o',
options.cwd,
'-t',
'ios',
]);
}),
validate: task(THIRD, 'Check Cocoapods and bundle are available', () => {
assertDependencies(
isOnPath('pod', 'CocoaPods'),
isOnPath('bundle', "Bundler to manage Ruby's gems"),
);
}),
installRubyGems: task(SECOND, 'Install Ruby Gems', () =>
installRubyGems: task(FOURTH, 'Install Ruby Gems', () =>
execa('bundle', ['install'], {
cwd: options.cwd,
}),
),
installDependencies: task(THIRD, 'Install CocoaPods dependencies', () => {
installDependencies: task(FIFTH, 'Install CocoaPods dependencies', () => {
const env = {
RCT_NEW_ARCH_ENABLED: options.newArchitecture ? '1' : '0',
USE_FRAMEWORKS: options.frameworks,
USE_HERMES: options.hermes ? '1' : '0',
RCT_IGNORE_PODS_DEPRECATION: '1',
};
if (options.frameworks == null) {
delete env.USE_FRAMEWORKS;
@@ -14,7 +14,7 @@ export type * from './version.flow';
*/
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) {
require('../../../../scripts/build/babel-register').registerForMonorepo();
require('../../../../scripts/babel-register').registerForMonorepo();
}
module.exports = require('./version.flow');
+4 -4
View File
@@ -1,9 +1,9 @@
@generated SignedSource<<890c168c017f387915457465e90400e9>>
Git revision: 7727db85ac767cf41cce3e9ee54d27e97b2637f9
@generated SignedSource<<9e23a5a4010ff3bcfbba08cbb7e7a860>>
Git revision: 8f145a057709173f4025da317121a10366ef171a
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
Remote branch: main
Remote URL: https://github.com/facebook/react-native-devtools-frontend
Remote branch: 0.79-stable
GN build args (overrides only):
is_official_build = true
Git status in checkout:
+2 -2
View File
@@ -20,7 +20,7 @@ const frontendPath = require('@react-native/debugger-frontend');
### Source repo
Source code for this package lives in the [facebookexperimental/rn-chrome-devtools-frontend](https://github.com/facebookexperimental/rn-chrome-devtools-frontend) repo. See below for how we build and check in changes.
Source code for this package lives in the [facebook/react-native-devtools-frontend](https://github.com/facebook/react-native-devtools-frontend) repo. See below for how we build and check in changes.
### Updating the frontend assets
@@ -34,4 +34,4 @@ node scripts/debugger-frontend/sync-and-build --branch main
node scripts/debugger-frontend/sync-and-build --branch 0.73-stable
```
By default, this will clone and build from [facebookexperimental/rn-chrome-devtools-frontend](https://github.com/facebookexperimental/rn-chrome-devtools-frontend).
By default, this will clone and build from [facebook/react-native-devtools-frontend](https://github.com/facebook/react-native-devtools-frontend).
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import*as e from"../root/root.js";const t=e.Runtime.RNExperimentName,i={didInitializeExperiments:!1,isReactNativeEntryPoint:!1};class n{name;title;unstable;docLink;feedbackLink;enabledByDefault;constructor(e){this.name=e.name,this.title=e.title,this.unstable=e.unstable,this.docLink=e.docLink,this.feedbackLink=e.feedbackLink,this.enabledByDefault=function(e,t){if(null==e)return()=>t;if("boolean"==typeof e)return()=>e;return e}(e.enabledByDefault,!1)}}const r=new class{#e=new Map;#t=new Set;register(e){if(i.didInitializeExperiments)throw new Error("Experiments must be registered before constructing MainImpl");const{name:t}=e;if(this.#e.has(t))throw new Error(`React Native Experiment ${t} is already registered`);this.#e.set(t,new n(e))}enableExperimentsByDefault(e){if(i.didInitializeExperiments)throw new Error("Experiments must be configured before constructing MainImpl");for(const i of e)if(Object.prototype.hasOwnProperty.call(t,i)){const e=this.#e.get(i);if(!e)throw new Error(`React Native Experiment ${i} is not registered`);e.enabledByDefault=()=>!0}else this.#t.add(i)}copyInto(e,t=""){for(const[n,r]of this.#e)e.register(n,t+r.title,r.unstable,r.docLink,r.feedbackLink),r.enabledByDefault({isReactNativeEntryPoint:i.isReactNativeEntryPoint})&&e.enableExperimentsByDefault([n]);for(const t of this.#t)e.enableExperimentsByDefault([t]);i.didInitializeExperiments=!0}};r.register({name:t.JS_HEAP_PROFILER_ENABLE,title:"Enable Heap Profiler (Memory Panel)",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>!e}),r.register({name:t.REACT_NATIVE_SPECIFIC_UI,title:"Show React Native-specific UI",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>e}),r.register({name:t.ENABLE_PERFORMANCE_PANEL,title:"Enable Performance panel",unstable:!0,enabledByDefault:({isReactNativeEntryPoint:e})=>!e});var a=Object.freeze({__proto__:null,RNExperimentName:t,setIsReactNativeEntryPoint:function(e){if(i.didInitializeExperiments)throw new Error("setIsReactNativeEntryPoint must be called before constructing MainImpl");i.isReactNativeEntryPoint=e},Instance:r});export{a as RNExperimentsImpl};
import*as e from"../root/root.js";const t=e.Runtime.RNExperimentName,n={didInitializeExperiments:!1,isReactNativeEntryPoint:!1};class i{name;title;unstable;docLink;feedbackLink;enabledByDefault;constructor(e){this.name=e.name,this.title=e.title,this.unstable=e.unstable,this.docLink=e.docLink,this.feedbackLink=e.feedbackLink,this.enabledByDefault=function(e,t){if(null==e)return()=>t;if("boolean"==typeof e)return()=>e;return e}(e.enabledByDefault,!1)}}const r=new class{#e=new Map;#t=new Set;register(e){if(n.didInitializeExperiments)throw new Error("Experiments must be registered before constructing MainImpl");const{name:t}=e;if(this.#e.has(t))throw new Error(`React Native Experiment ${t} is already registered`);this.#e.set(t,new i(e))}enableExperimentsByDefault(e){if(n.didInitializeExperiments)throw new Error("Experiments must be configured before constructing MainImpl");for(const n of e)if(Object.prototype.hasOwnProperty.call(t,n)){const e=this.#e.get(n);if(!e)throw new Error(`React Native Experiment ${n} is not registered`);e.enabledByDefault=()=>!0}else this.#t.add(n)}copyInto(e,t=""){for(const[i,r]of this.#e)e.register(i,t+r.title,r.unstable,r.docLink,r.feedbackLink),r.enabledByDefault({isReactNativeEntryPoint:n.isReactNativeEntryPoint})&&e.enableExperimentsByDefault([i]);for(const t of this.#t)e.enableExperimentsByDefault([t]);n.didInitializeExperiments=!0}};r.register({name:t.JS_HEAP_PROFILER_ENABLE,title:"Enable Heap Profiler (Memory Panel)",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>!e}),r.register({name:t.REACT_NATIVE_SPECIFIC_UI,title:"Show React Native-specific UI",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>e}),r.register({name:t.ENABLE_PERFORMANCE_PANEL,title:"Enable Performance panel",unstable:!0,enabledByDefault:({isReactNativeEntryPoint:e})=>!e}),r.register({name:t.ENABLE_NETWORK_PANEL,title:"Enable Network panel",unstable:!0,enabledByDefault:()=>!1});var a=Object.freeze({__proto__:null,RNExperimentName:t,setIsReactNativeEntryPoint:function(e){if(n.didInitializeExperiments)throw new Error("setIsReactNativeEntryPoint must be called before constructing MainImpl");n.isReactNativeEntryPoint=e},Instance:r});export{a as RNExperimentsImpl};
@@ -1 +1 @@
import*as e from"../platform/platform.js";const t=new URLSearchParams(location.search);let n,r="";class s{constructor(){}static instance(e={forceNew:null}){const{forceNew:t}=e;return n&&!t||(n=new s),n}static removeInstance(){n=void 0}static queryParam(e){return t.get(e)}static setQueryParamForTesting(e,n){t.set(e,n)}static experimentsSetting(){try{return e.StringUtilities.toKebabCaseKeys(JSON.parse(self.localStorage&&self.localStorage.experiments?self.localStorage.experiments:"{}"))}catch(e){return console.error("Failed to parse localStorage['experiments']"),{}}}static setPlatform(e){r=e}static platform(){return r}static isDescriptorEnabled(e,t){const{experiment:n}=e;if("*"===n)return!0;if(n&&n.startsWith("!")&&o.isEnabled(n.substring(1)))return!1;if(n&&!n.startsWith("!")&&!o.isEnabled(n))return!1;const{condition:r}=e;return!r||r(t)}loadLegacyModule(e){return import(`../../${e}`)}}class i{#e;#t;#n;#r;#s;constructor(){this.#e=[],this.#t=new Set,this.#n=new Set,this.#r=new Set,this.#s=new Set}allConfigurableExperiments(){const e=[];for(const t of this.#e)this.#n.has(t.name)||e.push(t);return e}setExperimentsSetting(e){self.localStorage&&(self.localStorage.experiments=JSON.stringify(e))}register(t,n,r,s,i){if(this.#t.has(t))throw new Error(`Duplicate registraction of experiment '${t}'`);this.#t.add(t),this.#e.push(new a(this,t,n,Boolean(r),s??e.DevToolsPath.EmptyUrlString,i??e.DevToolsPath.EmptyUrlString))}isEnabled(e){return this.checkExperiment(e),!1!==s.experimentsSetting()[e]&&(!(!this.#n.has(e)&&!this.#r.has(e))||(!!this.#s.has(e)||Boolean(s.experimentsSetting()[e])))}setEnabled(e,t){this.checkExperiment(e);const n=s.experimentsSetting();n[e]=t,this.setExperimentsSetting(n)}enableExperimentsTransiently(e){for(const t of e)this.checkExperiment(t),this.#n.add(t)}enableExperimentsByDefault(e){for(const t of e)this.checkExperiment(t),this.#r.add(t)}setServerEnabledExperiments(e){for(const t of e)this.checkExperiment(t),this.#s.add(t)}enableForTest(e){this.checkExperiment(e),this.#n.add(e)}disableForTest(e){this.checkExperiment(e),this.#n.delete(e)}clearForTest(){this.#e=[],this.#t.clear(),this.#n.clear(),this.#r.clear(),this.#s.clear()}cleanUpStaleExperiments(){const e=s.experimentsSetting(),t={};for(const{name:n}of this.#e)if(e.hasOwnProperty(n)){const r=e[n];(r||this.#r.has(n))&&(t[n]=r)}this.setExperimentsSetting(t)}checkExperiment(e){if(!this.#t.has(e))throw new Error(`Unknown experiment '${e}'`)}}class a{name;title;unstable;docLink;feedbackLink;#e;constructor(e,t,n,r,s,i){this.name=t,this.title=n,this.unstable=r,this.docLink=s,this.feedbackLink=i,this.#e=e}isEnabled(){return this.#e.isEnabled(this.name)}setEnabled(e){this.#e.setEnabled(this.name,e)}}const o=new i;var l,c;!function(e){e.REACT_NATIVE_SPECIFIC_UI="react-native-specific-ui",e.JS_HEAP_PROFILER_ENABLE="js-heap-profiler-enable",e.ENABLE_PERFORMANCE_PANEL="enable-performance-panel"}(l||(l={})),function(e){e.CAN_DOCK="can_dock",e.NOT_SOURCES_HIDE_ADD_FOLDER="!sources.hide_add_folder",e.REACT_NATIVE_UNSTABLE_NETWORK_PANEL="unstable_enableNetworkPanel"}(c||(c={}));const m={canDock:()=>Boolean(s.queryParam("can_dock")),notSourcesHideAddFolder:()=>Boolean(s.queryParam(c.NOT_SOURCES_HIDE_ADD_FOLDER)),reactNativeUnstableNetworkPanel:()=>Boolean(s.queryParam(c.REACT_NATIVE_UNSTABLE_NETWORK_PANEL))};var h=Object.freeze({__proto__:null,getRemoteBase:function(e=self.location.toString()){const t=new URL(e).searchParams.get("remoteBase");if(!t)return null;const n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools/remote/serve_file/${n[1]}/`,version:n[1]}:null},getPathName:function(){return window.location.pathname},Runtime:s,ExperimentsSupport:i,Experiment:a,experiments:o,get RNExperimentName(){return l},get ConditionName(){return c},conditions:m});export{h as Runtime};
import*as e from"../platform/platform.js";const t=new URLSearchParams(location.search);let n,r="";class s{constructor(){}static instance(e={forceNew:null}){const{forceNew:t}=e;return n&&!t||(n=new s),n}static removeInstance(){n=void 0}static queryParam(e){return t.get(e)}static setQueryParamForTesting(e,n){t.set(e,n)}static experimentsSetting(){try{return e.StringUtilities.toKebabCaseKeys(JSON.parse(self.localStorage&&self.localStorage.experiments?self.localStorage.experiments:"{}"))}catch(e){return console.error("Failed to parse localStorage['experiments']"),{}}}static setPlatform(e){r=e}static platform(){return r}static isDescriptorEnabled(e,t){const{experiment:n}=e;if("*"===n)return!0;if(n&&n.startsWith("!")&&o.isEnabled(n.substring(1)))return!1;if(n&&!n.startsWith("!")&&!o.isEnabled(n))return!1;const{condition:r}=e;return!r||r(t)}loadLegacyModule(e){return import(`../../${e}`)}}class a{#e;#t;#n;#r;#s;constructor(){this.#e=[],this.#t=new Set,this.#n=new Set,this.#r=new Set,this.#s=new Set}allConfigurableExperiments(){const e=[];for(const t of this.#e)this.#n.has(t.name)||e.push(t);return e}setExperimentsSetting(e){self.localStorage&&(self.localStorage.experiments=JSON.stringify(e))}register(t,n,r,s,a){if(this.#t.has(t))throw new Error(`Duplicate registraction of experiment '${t}'`);this.#t.add(t),this.#e.push(new i(this,t,n,Boolean(r),s??e.DevToolsPath.EmptyUrlString,a??e.DevToolsPath.EmptyUrlString))}isEnabled(e){return this.checkExperiment(e),!1!==s.experimentsSetting()[e]&&(!(!this.#n.has(e)&&!this.#r.has(e))||(!!this.#s.has(e)||Boolean(s.experimentsSetting()[e])))}setEnabled(e,t){this.checkExperiment(e);const n=s.experimentsSetting();n[e]=t,this.setExperimentsSetting(n)}enableExperimentsTransiently(e){for(const t of e)this.checkExperiment(t),this.#n.add(t)}enableExperimentsByDefault(e){for(const t of e)this.checkExperiment(t),this.#r.add(t)}setServerEnabledExperiments(e){for(const t of e)this.checkExperiment(t),this.#s.add(t)}enableForTest(e){this.checkExperiment(e),this.#n.add(e)}disableForTest(e){this.checkExperiment(e),this.#n.delete(e)}clearForTest(){this.#e=[],this.#t.clear(),this.#n.clear(),this.#r.clear(),this.#s.clear()}cleanUpStaleExperiments(){const e=s.experimentsSetting(),t={};for(const{name:n}of this.#e)if(e.hasOwnProperty(n)){const r=e[n];(r||this.#r.has(n))&&(t[n]=r)}this.setExperimentsSetting(t)}checkExperiment(e){if(!this.#t.has(e))throw new Error(`Unknown experiment '${e}'`)}}class i{name;title;unstable;docLink;feedbackLink;#e;constructor(e,t,n,r,s,a){this.name=t,this.title=n,this.unstable=r,this.docLink=s,this.feedbackLink=a,this.#e=e}isEnabled(){return this.#e.isEnabled(this.name)}setEnabled(e){this.#e.setEnabled(this.name,e)}}const o=new a;var l,c;!function(e){e.REACT_NATIVE_SPECIFIC_UI="react-native-specific-ui",e.JS_HEAP_PROFILER_ENABLE="js-heap-profiler-enable",e.ENABLE_PERFORMANCE_PANEL="enable-performance-panel",e.ENABLE_NETWORK_PANEL="enable-network-panel"}(l||(l={})),function(e){e.CAN_DOCK="can_dock",e.NOT_SOURCES_HIDE_ADD_FOLDER="!sources.hide_add_folder",e.REACT_NATIVE_UNSTABLE_NETWORK_PANEL="unstable_enableNetworkPanel"}(c||(c={}));const m={canDock:()=>Boolean(s.queryParam("can_dock")),notSourcesHideAddFolder:()=>Boolean(s.queryParam(c.NOT_SOURCES_HIDE_ADD_FOLDER)),reactNativeUnstableNetworkPanel:()=>Boolean(s.queryParam(c.REACT_NATIVE_UNSTABLE_NETWORK_PANEL))||o.isEnabled("enable-network-panel")};var h=Object.freeze({__proto__:null,getRemoteBase:function(e=self.location.toString()){const t=new URL(e).searchParams.get("remoteBase");if(!t)return null;const n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools/remote/serve_file/${n[1]}/`,version:n[1]}:null},getPathName:function(){return window.location.pathname},Runtime:s,ExperimentsSupport:a,Experiment:i,experiments:o,get RNExperimentName(){return l},get ConditionName(){return c},conditions:m});export{h as Runtime};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import*as e from"../../core/common/common.js";import"../../core/root/root.js";import*as i from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";const n={performance:"Performance",showPerformance:"Show Performance",record:"Record",stop:"Stop",recordAndReload:"Record and reload",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view"},o=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",n),a=i.i18n.getLazilyComputedLocalizedString.bind(void 0,o);let r;async function l(){return r||(r=await import("./timeline.js")),r}function c(e){return void 0===r?[]:e(r)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:a(n.performance),commandPrompt:a(n.showPerformance),order:50,experiment:"enable-performance-panel",loadView:async()=>(await l()).TimelinePanel.TimelinePanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:"PERFORMANCE",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),options:[{value:!0,title:a(n.record)},{value:!1,title:a(n.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),category:"PERFORMANCE",title:a(n.recordAndReload),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.save-to-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.load-from-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:"PERFORMANCE",title:a(n.previousFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:"PERFORMANCE",title:a(n.nextFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),category:"PERFORMANCE",title:a(n.showRecentTimelineSessions),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.previousRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.nextRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),e.Settings.registerSettingExtension({category:"PERFORMANCE",storageType:"Synced",title:a(n.hideChromeFrameInLayersView),settingName:"frame-viewer-hide-chrome-window",settingType:"boolean",defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>c((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await l()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.save-to-file",order:15});
import*as e from"../../core/common/common.js";import"../../core/root/root.js";import*as i from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";const n={performance:"Performance",showPerformance:"Show Performance",record:"Record",stop:"Stop",recordAndReload:"Record and reload",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view"},o=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",n),a=i.i18n.getLazilyComputedLocalizedString.bind(void 0,o);let r;async function l(){return r||(r=await import("./timeline.js")),r}function c(e){return void 0===r?[]:e(r)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:a(n.performance),commandPrompt:a(n.showPerformance),order:50,experiment:"enable-performance-panel",loadView:async()=>(await l()).TimelinePanel.TimelinePanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:"PERFORMANCE",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),options:[{value:!0,title:a(n.record)},{value:!1,title:a(n.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),category:"PERFORMANCE",title:a(n.recordAndReload),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}],experiment:"!react-native-specific-ui"}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.save-to-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.load-from-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:"PERFORMANCE",title:a(n.previousFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:"PERFORMANCE",title:a(n.nextFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),category:"PERFORMANCE",title:a(n.showRecentTimelineSessions),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.previousRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.nextRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),e.Settings.registerSettingExtension({category:"PERFORMANCE",storageType:"Synced",title:a(n.hideChromeFrameInLayersView),settingName:"frame-viewer-hide-chrome-window",settingType:"boolean",defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>c((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await l()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.save-to-file",order:15});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.77.0-main",
"version": "0.79.7",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.77.0-main",
"version": "0.79.7",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,14 +23,14 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.77.0-main",
"@react-native/debugger-frontend": "0.79.7",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
"debug": "^2.2.0",
"invariant": "^2.2.4",
"nullthrows": "^1.1.1",
"open": "^7.0.3",
"selfsigned": "^2.4.1",
"serve-static": "^1.16.2",
"ws": "^6.2.3"
},
@@ -38,8 +38,8 @@
"node": ">=18"
},
"devDependencies": {
"data-uri-to-buffer": "^6.0.1",
"undici": "^5.27.2",
"selfsigned": "^2.4.1",
"undici": "^5.28.5",
"wait-for-expect": "^3.0.2"
}
}
@@ -20,7 +20,6 @@ import type {DeviceMock} from './InspectorDeviceUtils';
import {fetchJson} from './FetchUtils';
import {createDebuggerMock} from './InspectorDebuggerUtils';
import {createDeviceMock} from './InspectorDeviceUtils';
import {dataUriToBuffer} from 'data-uri-to-buffer';
import until from 'wait-for-expect';
export type CdpMessageFromTarget = $ReadOnly<{
@@ -109,15 +108,6 @@ export async function sendFromDebuggerToTarget<Message: CdpMessageToTarget>(
return receivedMessage.wrappedEvent;
}
export function parseJsonFromDataUri<T: JSONSerializable>(uri: string): T {
expect(uri).toMatch(/^data:/);
const parsedUri = dataUriToBuffer(uri);
expect(parsedUri.type).toBe('application/json');
return JSON.parse(
new TextDecoder(parsedUri.charset).decode(parsedUri.buffer),
);
}
export async function createAndConnectTarget(
serverRef: $ReadOnly<{
serverBaseUrl: string,
@@ -12,7 +12,6 @@
import {withFetchSelfSignedCertsForAllTests} from './FetchUtils';
import {
createAndConnectTarget,
parseJsonFromDataUri,
sendFromDebuggerToTarget,
sendFromTargetToDebugger,
} from './InspectorProtocolUtils';
@@ -89,9 +88,9 @@ describe.each(['HTTP', 'HTTPS'])(
},
},
);
expect(
parseJsonFromDataUri(scriptParsedMessage.params.sourceMapURL),
).toEqual({version: 3, file: '\u2757.js'});
expect(scriptParsedMessage.params.sourceMapURL).toEqual(
`${serverRef.serverBaseUrl}/source-map`,
);
} finally {
device.close();
debugger_.close();
@@ -132,7 +131,7 @@ describe.each(['HTTP', 'HTTPS'])(
expect(debugger_.handle).toHaveBeenNthCalledWith(1, {
method: 'Debugger.scriptParsed',
params: {
sourceMapURL: expect.stringMatching(/^data:/),
sourceMapURL: `${serverRef.serverBaseUrl}/source-map`,
},
});
expect(debugger_.handle).toHaveBeenNthCalledWith(2, {
@@ -144,57 +143,6 @@ describe.each(['HTTP', 'HTTPS'])(
}
});
test('handling of failure to fetch source map', async () => {
const {device, debugger_} = await createAndConnectTarget(
serverRef,
autoCleanup.signal,
{
app: 'bar-app',
id: 'page1',
title: 'bar-title',
vm: 'bar-vm',
},
);
try {
const scriptParsedMessage = await sendFromTargetToDebugger(
device,
debugger_,
'page1',
{
method: 'Debugger.scriptParsed',
params: {
sourceMapURL: `${serverRef.serverBaseUrl}/source-map-missing`,
},
},
);
// We don't rewrite the message in this case.
expect(scriptParsedMessage.params.sourceMapURL).toEqual(
`${serverRef.serverBaseUrl}/source-map-missing`,
);
// We send an error through to the debugger as a console message.
expect(debugger_.handle).toBeCalledWith(
expect.objectContaining({
method: 'Runtime.consoleAPICalled',
params: {
args: [
{
type: 'string',
value: expect.stringMatching('Failed to fetch source map'),
},
],
executionContextId: 0,
type: 'error',
},
}),
);
} finally {
device.close();
debugger_.close();
}
});
test("does not rewrite urls in Debugger.scriptParsed that don't match the device connection host", async () => {
serverRef.app.use('/source-map', serveStaticJson({version: 3}));
const {device, debugger_} = await createAndConnectTarget(
@@ -211,11 +159,6 @@ describe.each(['HTTP', 'HTTPS'])(
},
);
try {
let fetchCalledWithURL;
fetchSpy.mockImplementationOnce(async url => {
fetchCalledWithURL = url instanceof URL ? url : null;
throw new Error('Unreachable');
});
const sourceMapURL = `${protocol.toLowerCase()}://127.0.0.1:${
serverRef.port
}/source-map`;
@@ -230,7 +173,6 @@ describe.each(['HTTP', 'HTTPS'])(
},
},
);
expect(fetchCalledWithURL?.href).toEqual(sourceMapURL);
expect(scriptParsedMessage.params.sourceMapURL).toEqual(
`${protocol.toLowerCase()}://127.0.0.1:${serverRef.port}/source-map`,
);
@@ -270,9 +212,9 @@ describe.each(['HTTP', 'HTTPS'])(
},
},
);
expect(
parseJsonFromDataUri(scriptParsedMessage.params.sourceMapURL),
).toEqual({version: 3});
expect(scriptParsedMessage.params.sourceMapURL).toEqual(
`${serverRef.serverBaseUrl}/source-map`,
);
} finally {
device.close();
debugger_.close();
@@ -538,89 +480,6 @@ describe.each(['HTTP', 'HTTPS'])(
debugger_.close();
}
});
test.each(['url', 'file'])(
'reports %s fetch error back to debugger',
async resourceType => {
const {device, debugger_} = await createAndConnectTarget(
serverRef,
autoCleanup.signal,
{
app: 'bar-app',
id: 'page1',
title: 'bar-title',
vm: 'bar-vm',
},
);
try {
await sendFromTargetToDebugger(device, debugger_, 'page1', {
method: 'Debugger.scriptParsed',
params: {
scriptId: 'script1',
url:
resourceType === 'url'
? `${serverRef.serverBaseUrl}/source-missing`
: '__fixtures__/mock-source-file.does-not-exist',
startLine: 0,
endLine: 0,
startColumn: 0,
endColumn: 0,
hash: createHash('sha256').update('foo').digest('hex'),
},
});
const response = await debugger_.sendAndGetResponse({
id: 1,
method: 'Debugger.getScriptSource',
params: {
scriptId: 'script1',
},
});
// We mark the request as failed.
expect(response).toEqual({
id: 1,
result: {
error: {
message: expect.stringMatching(
`Failed to fetch source ${resourceType}`,
),
},
},
});
// We also send an error through to the debugger as a console message.
expect(debugger_.handle).toBeCalledWith(
expect.objectContaining({
method: 'Runtime.consoleAPICalled',
params: {
args: [
{
type: 'string',
value: expect.stringMatching(
`Failed to fetch source ${resourceType}`,
),
},
],
executionContextId: 0,
type: 'error',
},
}),
);
// The device does not receive the getScriptSource request, since it
// is handled by the proxy.
expect(device.wrappedEventParsed).not.toBeCalledWith({
pageId: 'page1',
wrappedEvent: expect.objectContaining({
method: 'Debugger.getScriptSource',
}),
});
} finally {
device.close();
debugger_.close();
}
},
);
});
describe("disabled when target has 'nativeSourceCodeFetching' capability flag", () => {
@@ -20,8 +20,8 @@ import {createDeviceMock} from './InspectorDeviceUtils';
import {withAbortSignalForEachTest} from './ResourceUtils';
import {withServerForEachTest} from './ServerUtils';
// Must be greater than or equal to PAGES_POLLING_INTERVAL in `InspectorProxy.js`.
const PAGES_POLLING_DELAY = 1000;
// Must be greater than PAGES_POLLING_INTERVAL in `Device.js`
const PAGES_POLLING_DELAY = 2100;
jest.useFakeTimers();
@@ -91,6 +91,7 @@ export default function createDevMiddleware({
serverBaseUrl,
eventReporter,
experiments,
logger,
unstable_customInspectorMessageHandler,
);
@@ -147,7 +148,19 @@ function createWrappedEventReporter(
switch (event.type) {
case 'profiling_target_registered':
logger?.info(
`Profiling build target "${event.appId}" registered for debugging`,
"Profiling build target '%s' registered for debugging",
event.appId ?? 'unknown',
);
break;
case 'fusebox_console_notice':
logger?.info(
'\n' +
'\u001B[7m' +
' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
'the terminal to open (requires Google Chrome or Microsoft Edge).' +
'\u001B[27m' +
'\n',
);
break;
}
+1 -1
View File
@@ -14,7 +14,7 @@ export type * from './index.flow';
*/
if (!process.env.BUILD_EXCLUDE_BABEL_REGISTER) {
require('../../../scripts/build/babel-register').registerForMonorepo();
require('../../../scripts/babel-register').registerForMonorepo();
}
export * from './index.flow';
@@ -0,0 +1,99 @@
/**
* 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
*/
// $FlowFixMe[cannot-resolve-module] libdef missing in RN OSS
import type {Timeout} from 'timers';
// $FlowFixMe[cannot-resolve-module] libdef missing in RN OSS
import {setTimeout} from 'timers';
import util from 'util';
const debug = require('debug')('Metro:InspectorProxy');
const debugCDPMessages = require('debug')('Metro:InspectorProxyCDPMessages');
const CDP_MESSAGES_BATCH_DEBUGGING_THROTTLE_MS = 5000;
export type CDPMessageDestination =
| 'DebuggerToProxy'
| 'ProxyToDebugger'
| 'DeviceToProxy'
| 'ProxyToDevice';
function getCDPLogPrefix(destination: CDPMessageDestination): string {
return util.format(
'[(Debugger) %s (Proxy) %s (Device)]',
destination === 'DebuggerToProxy'
? '->'
: destination === 'ProxyToDebugger'
? '<-'
: ' ',
destination === 'ProxyToDevice'
? '->'
: destination === 'DeviceToProxy'
? '<-'
: ' ',
);
}
export default class CDPMessagesLogging {
#cdpMessagesLoggingBatchingFn: {
[CDPMessageDestination]: () => void,
} = {
DebuggerToProxy: () => {},
ProxyToDebugger: () => {},
DeviceToProxy: () => {},
ProxyToDevice: () => {},
};
constructor() {
if (debug.enabled) {
this.#initializeThrottledCDPMessageLogging();
}
}
#initializeThrottledCDPMessageLogging(): void {
const batchingCounters: {[CDPMessageDestination]: number} = {
DebuggerToProxy: 0,
ProxyToDebugger: 0,
DeviceToProxy: 0,
ProxyToDevice: 0,
};
Object.keys(batchingCounters).forEach(destination => {
let timeout: Timeout | null = null;
this.#cdpMessagesLoggingBatchingFn[destination] = () => {
if (timeout == null) {
timeout = setTimeout<$ReadOnlyArray<CDPMessageDestination>>(() => {
debug(
'%s %s CDP messages received in the last %ss.',
getCDPLogPrefix(destination),
String(batchingCounters[destination]).padStart(5),
CDP_MESSAGES_BATCH_DEBUGGING_THROTTLE_MS / 1000,
);
batchingCounters[destination] = 0;
timeout = null;
}, CDP_MESSAGES_BATCH_DEBUGGING_THROTTLE_MS).unref();
}
batchingCounters[destination]++;
};
});
}
log(destination: CDPMessageDestination, message: string) {
if (debugCDPMessages.enabled) {
debugCDPMessages('%s message: %s', getCDPLogPrefix(destination), message);
}
if (debug.enabled) {
this.#cdpMessagesLoggingBatchingFn[destination]();
}
}
}
@@ -27,6 +27,7 @@ import type {
TargetCapabilityFlags,
} from './types';
import CDPMessagesLogging from './CDPMessagesLogging';
import DeviceEventReporter from './DeviceEventReporter';
import * as fs from 'fs';
import invariant from 'invariant';
@@ -41,6 +42,8 @@ const PAGES_POLLING_INTERVAL = 1000;
// more details.
const FILE_PREFIX = 'file://';
let fuseboxConsoleNoticeLogged = false;
type DebuggerConnection = {
// Debugger web socket connection
socket: WS,
@@ -127,6 +130,8 @@ export default class Device {
// A base HTTP(S) URL to the server, relative to this server.
#serverRelativeBaseUrl: URL;
#cdpMessagesLogging: CDPMessagesLogging;
constructor(deviceOptions: DeviceOptions) {
this.#dangerouslyConstruct(deviceOptions);
}
@@ -143,6 +148,7 @@ export default class Device {
deviceRelativeBaseUrl,
isProfilingBuild,
}: DeviceOptions) {
this.#cdpMessagesLogging = new CDPMessagesLogging();
this.#id = id;
this.#name = name;
this.#app = app;
@@ -171,14 +177,11 @@ export default class Device {
if (parsedMessage.event === 'getPages') {
// There's a 'getPages' message every second, so only show them if they change
if (message !== this.#lastGetPagesMessage) {
debug(
'(Debugger) (Proxy) <- (Device), getPages ping has changed: ' +
message,
);
debug('Device getPages ping has changed: %s', message);
this.#lastGetPagesMessage = message;
}
} else {
debug('(Debugger) (Proxy) <- (Device): ' + message);
this.#cdpMessagesLogging.log('DeviceToProxy', message);
}
await this.#handleMessageFromDevice(parsedMessage);
})
@@ -341,7 +344,7 @@ export default class Device {
sendMessage: message => {
try {
const payload = JSON.stringify(message);
debug('(Debugger) <- (Proxy) (Device): ' + payload);
this.#cdpMessagesLogging.log('ProxyToDebugger', payload);
socket.send(payload);
} catch {}
},
@@ -359,7 +362,7 @@ export default class Device {
wrappedEvent: JSON.stringify(message),
},
});
debug('(Debugger) -> (Proxy) (Device): ' + payload);
this.#cdpMessagesLogging.log('DebuggerToProxy', payload);
this.#deviceSocket.send(payload);
} catch {}
},
@@ -380,7 +383,7 @@ export default class Device {
// $FlowFixMe[incompatible-call]
socket.on('message', (message: string) => {
debug('(Debugger) -> (Proxy) (Device): ' + message);
this.#cdpMessagesLogging.log('DebuggerToProxy', message);
const debuggerRequest = JSON.parse(message);
this.#deviceEventReporter?.logRequest(debuggerRequest, 'debugger', {
pageId: this.#debuggerConnection?.pageId ?? null,
@@ -425,11 +428,12 @@ export default class Device {
}
});
const cdpMessagesLogging = this.#cdpMessagesLogging;
// $FlowFixMe[method-unbinding]
const sendFunc = socket.send;
// $FlowFixMe[cannot-write]
socket.send = function (message: string) {
debug('(Debugger) <- (Proxy) (Device): ' + message);
cdpMessagesLogging.log('ProxyToDebugger', message);
return sendFunc.call(socket, message);
};
}
@@ -519,6 +523,7 @@ export default class Device {
// created instead of manually checking this on every getPages result.
for (const page of this.#pages.values()) {
if (this.#pageHasCapability(page, 'nativePageReloads')) {
this.#logFuseboxConsoleNotice();
continue;
}
@@ -604,10 +609,11 @@ export default class Device {
// Sends single message to device.
#sendMessageToDevice(message: MessageToDevice) {
try {
const messageToSend = JSON.stringify(message);
if (message.event !== 'getPages') {
debug('(Debugger) (Proxy) -> (Device): ' + JSON.stringify(message));
this.#cdpMessagesLogging.log('ProxyToDevice', messageToSend);
}
this.#deviceSocket.send(JSON.stringify(message));
this.#deviceSocket.send(messageToSend);
} catch (error) {}
}
@@ -737,24 +743,6 @@ export default class Device {
sourceMapURL,
debuggerInfo,
).href;
// Some debug clients do not support fetching HTTP URLs. If the
// message headed to the debug client identifies the source map with
// an HTTP URL, fetch the content here and convert the content to a
// Data URL (which is more widely supported) before passing the
// message to the debug client.
try {
const sourceMap = await this.#fetchText(
this.#deviceRelativeUrlToServerRelativeUrl(sourceMapURL),
);
payload.params.sourceMapURL =
'data:application/json;charset=utf-8;base64,' +
Buffer.from(sourceMap).toString('base64');
} catch (exception) {
this.#sendErrorToDebugger(
`Failed to fetch source map ${params.sourceMapURL}: ${exception.message}`,
);
}
}
}
if ('url' in params) {
@@ -1073,4 +1061,14 @@ export default class Device {
dangerouslyGetSocket(): WS {
return this.#deviceSocket;
}
// TODO(T214991636): Remove notice
#logFuseboxConsoleNotice() {
if (fuseboxConsoleNoticeLogged) {
return;
}
this.#deviceEventReporter?.logFuseboxConsoleNotice();
fuseboxConsoleNoticeLogged = true;
}
}

Some files were not shown because too many files have changed in this diff Show More