Compare 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
152 changed files with 2191 additions and 2843 deletions
@@ -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\
@@ -22,10 +22,13 @@ jest.mock('../utils.js', () => ({
log: silence,
run: mockRun,
sleep: mockSleep,
verifyPublishedPackage: mockVerifyPublishedPackage,
getNpmPackageInfo: mockGetNpmPackageInfo,
}));
jest.mock('../verifyPublishedPackage.js', () => ({
verifyPublishedPackage: mockVerifyPublishedPackage,
}));
const getMockGithub = () => ({
rest: {
actions: {
@@ -13,6 +13,11 @@ const mockVerifyPublishedPackage = jest.fn();
const silence = () => {};
jest.mock('../utils.js', () => ({
log: silence,
sleep: silence,
}));
jest.mock('../verifyPublishedPackage.js', () => ({
verifyPublishedPackage: mockVerifyPublishedPackage,
}));
+5 -1
View File
@@ -7,7 +7,8 @@
* @format
*/
const {run, sleep, log, verifyPublishedPackage} = require('./utils.js');
const {run, sleep, log} = require('./utils.js');
const {verifyPublishedPackage} = require('./verifyPublishedPackage.js');
const TAG_AS_LATEST_REGEX = /#publish-packages-to-npm&latest/;
@@ -68,6 +69,9 @@ module.exports.verifyPublishedTemplate = async (
retries = MAX_RETRIES,
) => {
try {
if (version.startsWith('v')) {
version = version.slice(1);
}
await verifyPublishedPackage(
TEMPLATE_NPM_PKG,
version,
+8 -8
View File
@@ -9,13 +9,7 @@
const {execSync} = require('child_process');
function run(cmd) {
return execSync(cmd, 'utf8').toString().trim();
}
async function sleep(seconds) {
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
}
const log = (...args) => console.log(...args);
async function getNpmPackageInfo(pkg, versionOrTag) {
return fetch(`https://registry.npmjs.org/${pkg}/${versionOrTag}`).then(resp =>
@@ -23,7 +17,13 @@ async function getNpmPackageInfo(pkg, versionOrTag) {
);
}
const log = (...args) => console.log(...args);
async function sleep(seconds) {
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
}
function run(cmd) {
return execSync(cmd, 'utf8').toString().trim();
}
module.exports = {
log,
@@ -42,7 +42,7 @@ async function verifyPublishedPackage(
}
log(
`🐌 ${packageName}@${tag}${pkg.version} on npm and not ${version} as expected, retrying...`,
`🐌 ${packageName}@${tag}${json.version} on npm and not ${version} as expected, retrying...`,
);
} catch (e) {
log(`Nope, fetch failed: ${e.message}`);
@@ -7,7 +7,8 @@
* @format
*/
const {run, sleep, log, verifyPublishedPackage} = require('./utils.js');
const {run, sleep, log} = require('./utils.js');
const {verifyPublishedPackage} = require('./verifyPublishedPackage.js');
const REACT_NATIVE_NPM_PKG = 'react-native';
const MAX_RETRIES = 3 * 6; // 18 attempts. Waiting between attempt: 10 s. Total time: 3 mins.
/**
@@ -22,5 +23,8 @@ module.exports.verifyReleaseOnNpm = async (
retries = MAX_RETRIES,
) => {
const tag = version.includes('-rc.') ? 'next' : latest ? 'latest' : null;
if (version.startsWith('v')) {
version = version.slice(1);
}
await verifyPublishedPackage(REACT_NATIVE_NPM_PKG, version, tag, retries);
};
+4 -4
View File
@@ -119,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'
+14 -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:
@@ -115,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'
@@ -133,27 +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 }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
build_npm_package:
runs-on: 8-core-ubuntu
needs:
@@ -163,7 +151,6 @@ jobs:
build_hermes_macos,
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
]
container:
@@ -226,6 +213,6 @@ jobs:
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
script: |
const {verifyReleaseOnNpm} = require('./.github/workflow-scripts/verifyReleaseOnNpm.js');
const {isLatest()} = require('./.github/workflow-scripts/publishTemplate.js');
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
const version = "${{ github.ref_name }}";
await verifyReleaseOnNpm(version, isLatest());
+12 -4
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:
@@ -411,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'
+2
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/"))
}
}
}
+6 -9
View File
@@ -29,8 +29,7 @@
"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",
@@ -49,10 +48,9 @@
"@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.7.0",
"@react-native/metro-babel-transformer": "0.79.0-main",
"@react-native/metro-config": "0.79.0-main",
"@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",
@@ -89,10 +87,9 @@
"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.79.0-main",
"version": "0.79.7",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
@@ -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.79.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.79.0-main"
"@react-native/codegen": "0.79.7"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,17 +22,17 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.79.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",
"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": "*"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+4 -4
View File
@@ -1,9 +1,9 @@
@generated SignedSource<<347069bf171def94f2e48bf1e82bb02d>>
Git revision: 97e9912605ce73b06f67fc607c1a5c434a67d6de
@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:
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
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,7 +23,7 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.79.0-main",
"@react-native/debugger-frontend": "0.79.7",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@react-native/eslint-plugin": "0.79.0-main",
"@react-native/eslint-plugin": "0.79.7",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@react-native/codegen": "0.79.0-main",
"@react-native/codegen": "0.79.7",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
@@ -8,12 +8,14 @@
package com.facebook.react.utils
import com.facebook.react.utils.PropertyUtils.DEFAULT_INTERNAL_PUBLISHING_GROUP
import com.facebook.react.utils.PropertyUtils.EXCLUSIVE_ENTEPRISE_REPOSITORY
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY_DEFAULT
import com.facebook.react.utils.PropertyUtils.INTERNAL_PUBLISHING_GROUP
import com.facebook.react.utils.PropertyUtils.INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO
import com.facebook.react.utils.PropertyUtils.INTERNAL_USE_HERMES_NIGHTLY
import com.facebook.react.utils.PropertyUtils.INTERNAL_VERSION_NAME
import com.facebook.react.utils.PropertyUtils.SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY
import com.facebook.react.utils.PropertyUtils.SCOPED_INCLUDE_JITPACK_REPOSITORY
import java.io.File
import java.net.URI
@@ -28,6 +30,12 @@ internal object DependencyUtils {
* party libraries which are auto-linked.
*/
fun configureRepositories(project: Project) {
val exclusiveEnterpriseRepository = project.rootProject.exclusiveEnterpriseRepository()
if (exclusiveEnterpriseRepository != null) {
project.logger.lifecycle(
"Replacing ALL Maven Repositories with: $exclusiveEnterpriseRepository")
}
project.rootProject.allprojects { eachProject ->
with(eachProject) {
if (hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) {
@@ -36,8 +44,18 @@ internal object DependencyUtils {
repo.content { it.excludeGroup("org.webkit") }
}
}
if (exclusiveEnterpriseRepository != null) {
// We remove all previously set repositories and only configure the proxy provided by the
// user.
rootProject.repositories.clear()
mavenRepoFromUrl(exclusiveEnterpriseRepository)
// We return here as we don't want to configure other repositories as well.
return@allprojects
}
// We add the snapshot for users on nightlies.
mavenRepoFromUrl("https://oss.sonatype.org/content/repositories/snapshots/") { repo ->
mavenRepoFromUrl("https://central.sonatype.com/repository/maven-snapshots/") { repo ->
repo.content { it.excludeGroup("org.webkit") }
}
repositories.mavenCentral { repo ->
@@ -181,4 +199,13 @@ internal object DependencyUtils {
property(INCLUDE_JITPACK_REPOSITORY).toString().toBoolean()
else -> INCLUDE_JITPACK_REPOSITORY_DEFAULT
}
internal fun Project.exclusiveEnterpriseRepository() =
when {
hasProperty(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
property(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
hasProperty(EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
property(EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
else -> null
}
}
@@ -13,7 +13,7 @@ import org.gradle.api.Action
import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.api.plugins.AppliedPlugin
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
internal object JdkConfiguratorUtils {
/**
@@ -42,10 +42,10 @@ internal object JdkConfiguratorUtils {
project.pluginManager.withPlugin("com.android.application", action)
project.pluginManager.withPlugin("com.android.library", action)
project.pluginManager.withPlugin("org.jetbrains.kotlin.android") {
project.extensions.getByType(KotlinTopLevelExtension::class.java).jvmToolchain(17)
project.kotlinExtension.jvmToolchain(17)
}
project.pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
project.extensions.getByType(KotlinTopLevelExtension::class.java).jvmToolchain(17)
project.kotlinExtension.jvmToolchain(17)
}
}
}
@@ -30,6 +30,12 @@ object PropertyUtils {
const val INCLUDE_JITPACK_REPOSITORY = "includeJitpackRepository"
const val SCOPED_INCLUDE_JITPACK_REPOSITORY = "react.includeJitpackRepository"
/**
* Public property that allows to configure an enterprise repository proxy as exclusive repository
*/
const val EXCLUSIVE_ENTEPRISE_REPOSITORY = "exclusiveEnterpriseRepository"
const val SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY = "react.exclusiveEnterpriseRepository"
/** By default we include JitPack to avoid breaking user builds */
internal const val INCLUDE_JITPACK_REPOSITORY_DEFAULT = true
@@ -10,6 +10,7 @@ package com.facebook.react.utils
import com.facebook.react.tests.createProject
import com.facebook.react.utils.DependencyUtils.configureDependencies
import com.facebook.react.utils.DependencyUtils.configureRepositories
import com.facebook.react.utils.DependencyUtils.exclusiveEnterpriseRepository
import com.facebook.react.utils.DependencyUtils.getDependencySubstitutions
import com.facebook.react.utils.DependencyUtils.mavenRepoFromURI
import com.facebook.react.utils.DependencyUtils.mavenRepoFromUrl
@@ -45,7 +46,7 @@ class DependencyUtilsTest {
@Test
fun configureRepositories_containsSnapshotRepo() {
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
val project = createProject()
configureRepositories(project)
@@ -99,6 +100,24 @@ class DependencyUtilsTest {
.isNotNull()
}
@Test
fun configureRepositories_withExclusiveEnterpriseRepository_replacesAllRepositories() {
val repositoryURI = URI.create("https://maven.myfabolousorganization.it")
val project = createProject()
project.rootProject.extensions.extraProperties.set(
"exclusiveEnterpriseRepository", repositoryURI.toString())
configureRepositories(project)
assertThat(project.repositories).hasSize(1)
assertThat(
project.repositories.firstOrNull {
it is MavenArtifactRepository && it.url == repositoryURI
})
.isNotNull()
}
@Test
fun configureRepositories_withIncludeJitpackRepositoryFalse_doesNotContainJitPack() {
val repositoryURI = URI.create("https://www.jitpack.io")
@@ -176,7 +195,7 @@ class DependencyUtilsTest {
@Test
fun configureRepositories_snapshotRepoHasHigherPriorityThanMavenCentral() {
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
val mavenCentralURI = URI.create("https://repo.maven.apache.org/maven2/")
val project = createProject()
@@ -470,7 +489,7 @@ class DependencyUtilsTest {
@Test
fun shouldAddJitPack_withUnscopedProperty() {
val project = createProject(tempFolder.root)
project.extensions.extraProperties.set("react.includeJitpackRepository", "false")
project.extensions.extraProperties.set("includeJitpackRepository", "false")
assertThat(project.shouldAddJitPack()).isFalse()
}
@@ -479,4 +498,28 @@ class DependencyUtilsTest {
val project = createProject(tempFolder.root)
assertThat(project.shouldAddJitPack()).isTrue()
}
@Test
fun exclusiveEnterpriseRepository_withScopedProperty() {
val project = createProject(tempFolder.root)
project.extensions.extraProperties.set(
"react.exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
assertThat(project.exclusiveEnterpriseRepository())
.isEqualTo("https://maven.myfabolousorganization.it")
}
@Test
fun exclusiveEnterpriseRepository_withUnscopedProperty() {
val project = createProject(tempFolder.root)
project.extensions.extraProperties.set(
"exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
assertThat(project.exclusiveEnterpriseRepository())
.isEqualTo("https://maven.myfabolousorganization.it")
}
@Test
fun exclusiveEnterpriseRepository_defaultIsTrue() {
val project = createProject(tempFolder.root)
assertThat(project.exclusiveEnterpriseRepository()).isNull()
}
}
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "helloworld",
"version": "0.79.0-main",
"version": "0.79.7",
"private": true,
"scripts": {
"bootstrap": "node ./cli.js bootstrap",
@@ -13,16 +13,16 @@
},
"dependencies": {
"react": "19.0.0",
"react-native": "1000.0.0"
"react-native": "0.79.7"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "0.79.0-main",
"@react-native/core-cli-utils": "0.79.0-main",
"@react-native/eslint-config": "0.79.0-main",
"@react-native/metro-config": "0.79.0-main",
"@react-native/babel-preset": "0.79.7",
"@react-native/core-cli-utils": "0.79.7",
"@react-native/eslint-config": "0.79.7",
"@react-native/metro-config": "0.79.7",
"chalk": "^4.1.2",
"commander": "^12.0.0",
"eslint": "^8.19.0",
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,9 +26,9 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.79.0-main",
"@react-native/metro-babel-transformer": "0.79.0-main",
"metro-config": "^0.81.0",
"metro-runtime": "^0.81.0"
"@react-native/js-polyfills": "0.79.7",
"@react-native/metro-babel-transformer": "0.79.7",
"metro-config": "^0.82.0",
"metro-runtime": "^0.82.0"
}
}
+1 -1
View File
@@ -53,7 +53,7 @@ export function getDefaultConfig(projectRoot: string): ConfigT {
resolver: {
resolverMainFields: ['react-native', 'browser', 'main'],
platforms: ['android', 'ios'],
unstable_conditionNames: ['require', 'import', 'react-native'],
unstable_conditionNames: ['react-native'],
},
serializer: {
// Note: This option is overridden in cli-plugin-metro (getOverrideConfig)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Babel preset for React Native applications",
"main": "src/index.js",
"repository": {
@@ -55,7 +55,7 @@
"@babel/plugin-transform-typescript": "^7.25.2",
"@babel/plugin-transform-unicode-regex": "^7.24.7",
"@babel/template": "^7.25.0",
"@react-native/babel-plugin-codegen": "0.79.0-main",
"@react-native/babel-plugin-codegen": "0.79.7",
"babel-plugin-syntax-hermes-parser": "0.25.1",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Babel transformer for React Native applications.",
"main": "src/index.js",
"repository": {
@@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.79.0-main",
"@react-native/babel-preset": "0.79.7",
"hermes-parser": "0.25.1",
"nullthrows": "^1.1.1"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/bots",
"description": "React Native Bots",
"version": "0.79.0-main",
"version": "0.79.7",
"private": true,
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.79.0-main",
"version": "0.79.7",
"private": true,
"description": "TypeScript related unit test for @react-native/codegen",
"license": "MIT",
@@ -19,7 +19,7 @@
"prepare": "yarn run build"
},
"dependencies": {
"@react-native/codegen": "0.79.0-main"
"@react-native/codegen": "0.79.7"
},
"devDependencies": {
"@babel/core": "^7.25.2",
@@ -19,21 +19,16 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ArrayPropsNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ArrayPropsNativeComponentView',
uiViewClassName: \\"ArrayPropsNativeComponentView\\",
validAttributes: {
names: true,
disableds: true,
progress: true,
radii: true,
colors: {
process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')),
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray'))
},
srcs: true,
points: true,
edgeInsets: true,
@@ -41,10 +36,9 @@ export const __INTERNAL_VIEW_CONFIG = {
sizes: true,
object: true,
arrayOfObjects: true,
arrayOfMixed: true,
},
arrayOfMixed: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -69,17 +63,13 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'BooleanPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'BooleanPropNativeComponentView',
uiViewClassName: \\"BooleanPropNativeComponentView\\",
validAttributes: {
disabled: true,
disabledNullable: true,
},
disabledNullable: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -104,18 +94,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ColorPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ColorPropNativeComponentView',
uiViewClassName: \\"ColorPropNativeComponentView\\",
validAttributes: {
tintColor: {
process: require('react-native/Libraries/StyleSheet/processColor').default,
},
},
process: require('react-native/Libraries/StyleSheet/processColor').default
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -140,16 +126,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'DimensionPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'DimensionPropNativeComponentView',
uiViewClassName: \\"DimensionPropNativeComponentView\\",
validAttributes: {
marginBack: true,
},
marginBack: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -174,13 +156,10 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'EdgeInsetsPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'EdgeInsetsPropNativeComponentView',
validAttributes: {},
uiViewClassName: \\"EdgeInsetsPropNativeComponentView\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -205,17 +184,13 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'EnumPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'EnumPropNativeComponentView',
uiViewClassName: \\"EnumPropNativeComponentView\\",
validAttributes: {
alignment: true,
intervals: true,
},
intervals: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -241,29 +216,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
let nativeComponentName = 'EventNestedObjectPropsNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'EventNestedObjectPropsNativeComponentView',
uiViewClassName: \\"EventNestedObjectPropsNativeComponentView\\",
bubblingEventTypes: {
topChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange',
},
},
captured: \\"onChangeCapture\\",
bubbled: \\"onChange\\"
}
}
},
validAttributes: {
disabled: true,
...ConditionallyIgnoredEventHandlers({
onChange: true,
}),
},
onChange: true
})
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -289,62 +258,51 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
let nativeComponentName = 'EventPropsNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'EventPropsNativeComponentView',
uiViewClassName: \\"EventPropsNativeComponentView\\",
bubblingEventTypes: {
topPaperDirectName: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange',
},
captured: \\"onChangeCapture\\",
bubbled: \\"onChange\\"
}
},
topEnd: {
phasedRegistrationNames: {
captured: 'onEndCapture',
bubbled: 'onEnd',
},
captured: \\"onEndCapture\\",
bubbled: \\"onEnd\\"
}
},
topPaperBubblingName: {
phasedRegistrationNames: {
captured: 'onEventBubblingWithPaperNameCapture',
bubbled: 'onEventBubblingWithPaperName',
},
},
captured: \\"onEventBubblingWithPaperNameCapture\\",
bubbled: \\"onEventBubblingWithPaperName\\"
}
}
},
directEventTypes: {
topEventDirect: {
registrationName: 'onEventDirect',
registrationName: \\"onEventDirect\\"
},
topPaperDirectName: {
registrationName: 'onEventDirectWithPaperName',
registrationName: \\"onEventDirectWithPaperName\\"
},
topPaperBubblingName: {
registrationName: 'onOrientationChange',
},
registrationName: \\"onOrientationChange\\"
}
},
validAttributes: {
disabled: true,
...ConditionallyIgnoredEventHandlers({
onChange: true,
onEventDirect: true,
onEventDirectWithPaperName: true,
onOrientationChange: true,
onEnd: true,
onEventBubblingWithPaperName: true,
}),
},
onEventBubblingWithPaperName: true
})
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -369,11 +327,8 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'FloatPropsNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'FloatPropsNativeComponentView',
uiViewClassName: \\"FloatPropsNativeComponentView\\",
validAttributes: {
blurRadius: true,
blurRadius2: true,
@@ -381,10 +336,9 @@ export const __INTERNAL_VIEW_CONFIG = {
blurRadius4: true,
blurRadius5: true,
blurRadius6: true,
blurRadiusNullable: true,
},
blurRadiusNullable: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -409,18 +363,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ImagePropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ImagePropNativeComponentView',
uiViewClassName: \\"ImagePropNativeComponentView\\",
validAttributes: {
thumbImage: {
process: require('react-native/Libraries/Image/resolveAssetSource'),
},
},
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -445,18 +395,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'IntegerPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'IntegerPropNativeComponentView',
uiViewClassName: \\"IntegerPropNativeComponentView\\",
validAttributes: {
progress1: true,
progress2: true,
progress3: true,
},
progress3: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -482,29 +428,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
let nativeComponentName = 'RCTInterfaceOnlyComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'RCTInterfaceOnlyComponent',
uiViewClassName: \\"RCTInterfaceOnlyComponent\\",
bubblingEventTypes: {
topChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange',
},
},
captured: \\"onChangeCapture\\",
bubbled: \\"onChange\\"
}
}
},
validAttributes: {
title: true,
...ConditionallyIgnoredEventHandlers({
onChange: true,
}),
},
onChange: true
})
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -529,16 +469,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'MixedPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MixedPropNativeComponentView',
uiViewClassName: \\"MixedPropNativeComponentView\\",
validAttributes: {
mixedProp: true,
},
mixedProp: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -563,30 +499,23 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'MultiNativePropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MultiNativePropNativeComponentView',
uiViewClassName: \\"MultiNativePropNativeComponentView\\",
validAttributes: {
thumbImage: {
process: require('react-native/Libraries/Image/resolveAssetSource'),
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
},
color: {
process: require('react-native/Libraries/StyleSheet/processColor').default,
process: require('react-native/Libraries/StyleSheet/processColor').default
},
thumbTintColor: {
process: require('react-native/Libraries/StyleSheet/processColor').default,
process: require('react-native/Libraries/StyleSheet/processColor').default
},
point: {
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
},
},
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -611,13 +540,10 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'NoPropsNoEventsNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'NoPropsNoEventsNativeComponentView',
validAttributes: {},
uiViewClassName: \\"NoPropsNoEventsNativeComponentView\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -642,18 +568,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ObjectPropsNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ObjectPropsNativeComponent',
uiViewClassName: \\"ObjectPropsNativeComponent\\",
validAttributes: {
objectProp: true,
objectArrayProp: true,
objectPrimitiveRequiredProp: true,
},
objectPrimitiveRequiredProp: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -678,18 +600,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'PointPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'PointPropNativeComponentView',
uiViewClassName: \\"PointPropNativeComponentView\\",
validAttributes: {
startPoint: {
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
},
},
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -714,17 +632,13 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'StringPropNativeComponentView';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'StringPropNativeComponentView',
uiViewClassName: \\"StringPropNativeComponentView\\",
validAttributes: {
placeholder: true,
defaultValue: true,
},
defaultValue: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
@@ -29,24 +29,24 @@
"lib"
],
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/parser": "^7.25.3",
"glob": "^7.1.1",
"hermes-parser": "0.25.1",
"invariant": "^2.2.4",
"jscodeshift": "^17.0.0",
"nullthrows": "^1.1.1",
"yargs": "^17.6.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-async-to-generator": "^7.24.7",
"@babel/plugin-transform-class-properties": "^7.25.4",
"@babel/plugin-transform-destructuring": "^7.24.8",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
"@babel/plugin-transform-object-rest-spread": "^7.24.7",
"@babel/plugin-transform-optional-chaining": "^7.24.8",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-async-to-generator": "^7.24.7",
"@babel/plugin-transform-destructuring": "^7.24.8",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"chalk": "^4.0.0",
"hermes-estree": "0.25.1",
@@ -55,6 +55,6 @@
"rimraf": "^3.0.2"
},
"peerDependencies": {
"@babel/preset-env": "^7.1.6"
"@babel/core": "*"
}
}
@@ -16,7 +16,8 @@ import type {
} from '../../CodegenSchema';
import type {SchemaType} from '../../CodegenSchema';
const j = require('jscodeshift');
const core = require('@babel/core');
const t = core.types;
// File path -> contents
type FilesOutput = Map<string, string>;
@@ -50,6 +51,10 @@ ${componentConfig}
// this multiple times.
const UIMANAGER_IMPORT = 'const {UIManager} = require("react-native")';
function expression(input: string) {
return core.template.expression(input)();
}
function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) {
switch (typeAnnotation.type) {
case 'BooleanTypeAnnotation':
@@ -61,25 +66,29 @@ function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) {
case 'StringEnumTypeAnnotation':
case 'Int32EnumTypeAnnotation':
case 'MixedTypeAnnotation':
return j.literal(true);
return t.booleanLiteral(true);
case 'ReservedPropTypeAnnotation':
switch (typeAnnotation.name) {
case 'ColorPrimitive':
return j.template
.expression`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`;
return expression(
`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`,
);
case 'ImageSourcePrimitive':
return j.template
.expression`{ process: require('react-native/Libraries/Image/resolveAssetSource') }`;
return expression(
"{ process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource')) }",
);
case 'ImageRequestPrimitive':
throw new Error('ImageRequest should not be used in props');
case 'PointPrimitive':
return j.template
.expression`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')) }`;
return expression(
`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')) }`,
);
case 'EdgeInsetsPrimitive':
return j.template
.expression`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer')) }`;
return expression(
`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer')) }`,
);
case 'DimensionPrimitive':
return j.literal(true);
return t.booleanLiteral(true);
default:
(typeAnnotation.name: empty);
throw new Error(
@@ -90,20 +99,21 @@ function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) {
if (typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation') {
switch (typeAnnotation.elementType.name) {
case 'ColorPrimitive':
return j.template
.expression`{ process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')) }`;
return expression(
`{ process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')) }`,
);
case 'ImageSourcePrimitive':
case 'PointPrimitive':
case 'EdgeInsetsPrimitive':
case 'DimensionPrimitive':
return j.literal(true);
return t.booleanLiteral(true);
default:
throw new Error(
`Received unknown array native typeAnnotation: "${typeAnnotation.elementType.name}"`,
);
}
}
return j.literal(true);
return t.booleanLiteral(true);
default:
(typeAnnotation: empty);
throw new Error(
@@ -134,7 +144,7 @@ ${
: ''
}
export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG;
export const __INTERNAL_VIEW_CONFIG = %%VIEW_CONFIG%%;
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
`.trim();
@@ -180,13 +190,16 @@ function getValidAttributesForEvents(
"const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');",
);
const validAttributes = j.objectExpression(
const validAttributes = t.objectExpression(
events.map(eventType => {
return j.property('init', j.identifier(eventType.name), j.literal(true));
return t.objectProperty(
t.identifier(eventType.name),
t.booleanLiteral(true),
);
}),
);
return j.callExpression(j.identifier('ConditionallyIgnoredEventHandlers'), [
return t.callExpression(t.identifier('ConditionallyIgnoredEventHandlers'), [
validAttributes,
]);
}
@@ -195,20 +208,20 @@ function generateBubblingEventInfo(
event: EventTypeShape,
nameOveride: void | string,
) {
return j.property(
'init',
j.identifier(normalizeInputEventName(nameOveride || event.name)),
j.objectExpression([
j.property(
'init',
j.identifier('phasedRegistrationNames'),
j.objectExpression([
j.property(
'init',
j.identifier('captured'),
j.literal(`${event.name}Capture`),
return t.objectProperty(
t.identifier(normalizeInputEventName(nameOveride || event.name)),
t.objectExpression([
t.objectProperty(
t.identifier('phasedRegistrationNames'),
t.objectExpression([
t.objectProperty(
t.identifier('captured'),
t.stringLiteral(`${event.name}Capture`),
),
t.objectProperty(
t.identifier('bubbled'),
t.stringLiteral(event.name),
),
j.property('init', j.identifier('bubbled'), j.literal(event.name)),
]),
),
]),
@@ -219,14 +232,12 @@ function generateDirectEventInfo(
event: EventTypeShape,
nameOveride: void | string,
) {
return j.property(
'init',
j.identifier(normalizeInputEventName(nameOveride || event.name)),
j.objectExpression([
j.property(
'init',
j.identifier('registrationName'),
j.literal(event.name),
return t.objectProperty(
t.identifier(normalizeInputEventName(nameOveride || event.name)),
t.objectExpression([
t.objectProperty(
t.identifier('registrationName'),
t.stringLiteral(event.name),
),
]),
);
@@ -261,20 +272,15 @@ function buildViewConfig(
}
});
const validAttributes = j.objectExpression([
const validAttributes = t.objectExpression([
...componentProps.map(schemaProp => {
return j.property(
'init',
j.identifier(schemaProp.name),
return t.objectProperty(
t.identifier(schemaProp.name),
getReactDiffProcessValue(schemaProp.typeAnnotation),
);
}),
...(componentEvents.length > 0
? [
j.spreadProperty(
getValidAttributesForEvents(componentEvents, imports),
),
]
? [t.spreadElement(getValidAttributesForEvents(componentEvents, imports))]
: []),
]);
@@ -294,15 +300,6 @@ function buildViewConfig(
return bubblingEvents;
}, []);
const bubblingEvents =
bubblingEventNames.length > 0
? j.property(
'init',
j.identifier('bubblingEventTypes'),
j.objectExpression(bubblingEventNames),
)
: null;
const directEventNames = component.events
.filter(event => event.bubblingType === 'direct')
.reduce((directEvents: Array<any>, event) => {
@@ -319,27 +316,34 @@ function buildViewConfig(
return directEvents;
}, []);
const directEvents =
directEventNames.length > 0
? j.property(
'init',
j.identifier('directEventTypes'),
j.objectExpression(directEventNames),
)
: null;
const properties = [
j.property(
'init',
j.identifier('uiViewClassName'),
j.literal(componentName),
t.objectProperty(
t.identifier('uiViewClassName'),
t.stringLiteral(componentName),
),
bubblingEvents,
directEvents,
j.property('init', j.identifier('validAttributes'), validAttributes),
].filter(Boolean);
];
return j.objectExpression(properties);
if (bubblingEventNames.length > 0) {
properties.push(
t.objectProperty(
t.identifier('bubblingEventTypes'),
t.objectExpression(bubblingEventNames),
),
);
}
if (directEventNames.length > 0) {
properties.push(
t.objectProperty(
t.identifier('directEventTypes'),
t.objectExpression(directEventNames),
),
);
}
properties.push(
t.objectProperty(t.identifier('validAttributes'), validAttributes),
);
return t.objectExpression(properties);
}
function buildCommands(
@@ -358,45 +362,32 @@ function buildCommands(
'const {dispatchCommand} = require("react-native/Libraries/ReactNative/RendererProxy");',
);
const properties = commands.map(command => {
const commandName = command.name;
const params = command.typeAnnotation.params;
const commandsObject = t.objectExpression(
commands.map(command => {
const commandName = command.name;
const params = command.typeAnnotation.params;
const commandNameLiteral = j.literal(commandName);
const commandNameIdentifier = j.identifier(commandName);
const arrayParams = j.arrayExpression(
params.map(param => {
return j.identifier(param.name);
}),
);
const dispatchCommandCall = t.callExpression(
t.identifier('dispatchCommand'),
[
t.identifier('ref'),
t.stringLiteral(commandName),
t.arrayExpression(params.map(param => t.identifier(param.name))),
],
);
const expression = j.template
.expression`dispatchCommand(ref, ${commandNameLiteral}, ${arrayParams})`;
return t.objectMethod(
'method',
t.identifier(commandName),
[t.identifier('ref'), ...params.map(param => t.identifier(param.name))],
t.blockStatement([t.expressionStatement(dispatchCommandCall)]),
);
}),
);
const functionParams = params.map(param => {
return j.identifier(param.name);
});
const property = j.property(
'init',
commandNameIdentifier,
j.functionExpression(
null,
[j.identifier('ref'), ...functionParams],
j.blockStatement([j.expressionStatement(expression)]),
),
);
property.method = true;
return property;
});
return j.exportNamedDeclaration(
j.variableDeclaration('const', [
j.variableDeclarator(
j.identifier('Commands'),
j.objectExpression(properties),
),
return t.exportNamedDeclaration(
t.variableDeclaration('const', [
t.variableDeclarator(t.identifier('Commands'), commandsObject),
]),
);
}
@@ -431,42 +422,40 @@ module.exports = {
component.paperComponentNameDeprecated,
});
const replacedSourceRoot = j.withParser('flow')(replacedTemplate);
const paperComponentName =
component.paperComponentName ?? componentName;
replacedSourceRoot
.find(j.Identifier, {
name: 'VIEW_CONFIG',
})
.replaceWith(
buildViewConfig(
schema,
paperComponentName,
component,
imports,
),
);
const replacedSourceRoot = core.template.program(
replacedTemplate,
)({
VIEW_CONFIG: buildViewConfig(
schema,
paperComponentName,
component,
imports,
),
});
const commands = buildCommands(
const commandsExport = buildCommands(
schema,
paperComponentName,
component,
imports,
);
if (commands) {
replacedSourceRoot
.find(j.ExportDefaultDeclaration)
.insertAfter(j(commands).toSource());
if (commandsExport) {
replacedSourceRoot.body.push(commandsExport);
}
const replacedSource: string = replacedSourceRoot.toSource({
quote: 'single',
trailingComma: true,
});
return replacedSource;
const replacedSource = core.transformFromAstSync(
replacedSourceRoot,
undefined,
{
babelrc: false,
browserslistConfigFile: false,
configFile: false,
},
);
return replacedSource.code;
})
.join('\n\n');
})
@@ -19,21 +19,16 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ArrayPropsNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ArrayPropsNativeComponent',
uiViewClassName: \\"ArrayPropsNativeComponent\\",
validAttributes: {
names: true,
disableds: true,
progress: true,
radii: true,
colors: {
process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')),
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray'))
},
srcs: true,
points: true,
dimensions: true,
@@ -41,10 +36,9 @@ export const __INTERNAL_VIEW_CONFIG = {
object: true,
array: true,
arrayOfArrayOfObject: true,
arrayOfMixed: true,
},
arrayOfMixed: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -69,16 +63,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ArrayPropsNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ArrayPropsNativeComponent',
uiViewClassName: \\"ArrayPropsNativeComponent\\",
validAttributes: {
nativePrimitives: true,
},
nativePrimitives: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -103,16 +93,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'BooleanPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'BooleanPropNativeComponent',
uiViewClassName: \\"BooleanPropNativeComponent\\",
validAttributes: {
disabled: true,
},
disabled: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -137,18 +123,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ColorPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ColorPropNativeComponent',
uiViewClassName: \\"ColorPropNativeComponent\\",
validAttributes: {
tintColor: {
process: require('react-native/Libraries/StyleSheet/processColor').default,
},
},
process: require('react-native/Libraries/StyleSheet/processColor').default
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -174,23 +156,18 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {dispatchCommand} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
let nativeComponentName = 'CommandNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'CommandNativeComponent',
validAttributes: {},
uiViewClassName: \\"CommandNativeComponent\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
export const Commands = {
flashScrollIndicators(ref) {
dispatchCommand(ref, \\"flashScrollIndicators\\", []);
},
allTypes(ref, x, y, z, message, animated, locations) {
dispatchCommand(ref, \\"allTypes\\", [x, y, z, message, animated, locations]);
}
flashScrollIndicators(ref) {
dispatchCommand(ref, \\"flashScrollIndicators\\", []);
},
allTypes(ref, x, y, z, message, animated, locations) {
dispatchCommand(ref, \\"allTypes\\", [x, y, z, message, animated, locations]);
}
};
",
}
@@ -216,30 +193,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {dispatchCommand} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
let nativeComponentName = 'CommandNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'CommandNativeComponent',
uiViewClassName: \\"CommandNativeComponent\\",
validAttributes: {
accessibilityHint: true,
},
accessibilityHint: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
export const Commands = {
handleRootTag(ref, rootTag) {
dispatchCommand(ref, \\"handleRootTag\\", [rootTag]);
},
hotspotUpdate(ref, x, y) {
dispatchCommand(ref, \\"hotspotUpdate\\", [x, y]);
},
addItems(ref, items) {
dispatchCommand(ref, \\"addItems\\", [items]);
}
handleRootTag(ref, rootTag) {
dispatchCommand(ref, \\"handleRootTag\\", [rootTag]);
},
hotspotUpdate(ref, x, y) {
dispatchCommand(ref, \\"hotspotUpdate\\", [x, y]);
},
addItems(ref, items) {
dispatchCommand(ref, \\"addItems\\", [items]);
}
};
",
}
@@ -264,16 +234,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'DimensionPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'DimensionPropNativeComponent',
uiViewClassName: \\"DimensionPropNativeComponent\\",
validAttributes: {
marginBack: true,
},
marginBack: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -298,21 +264,17 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'DoublePropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'DoublePropNativeComponent',
uiViewClassName: \\"DoublePropNativeComponent\\",
validAttributes: {
blurRadius: true,
blurRadius2: true,
blurRadius3: true,
blurRadius4: true,
blurRadius5: true,
blurRadius6: true,
},
blurRadius6: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -338,29 +300,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
let nativeComponentName = 'EventsNestedObjectNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'EventsNestedObjectNativeComponent',
uiViewClassName: \\"EventsNestedObjectNativeComponent\\",
bubblingEventTypes: {
topChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange',
},
},
captured: \\"onChangeCapture\\",
bubbled: \\"onChange\\"
}
}
},
validAttributes: {
disabled: true,
...ConditionallyIgnoredEventHandlers({
onChange: true,
}),
},
onChange: true
})
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -386,62 +342,51 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
let nativeComponentName = 'EventsNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'EventsNativeComponent',
uiViewClassName: \\"EventsNativeComponent\\",
bubblingEventTypes: {
topChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange',
},
captured: \\"onChangeCapture\\",
bubbled: \\"onChange\\"
}
},
topArrayEventType: {
phasedRegistrationNames: {
captured: 'onArrayEventTypeCapture',
bubbled: 'onArrayEventType',
},
captured: \\"onArrayEventTypeCapture\\",
bubbled: \\"onArrayEventType\\"
}
},
topEnd: {
phasedRegistrationNames: {
captured: 'onEndCapture',
bubbled: 'onEnd',
},
},
captured: \\"onEndCapture\\",
bubbled: \\"onEnd\\"
}
}
},
directEventTypes: {
topEventDirect: {
registrationName: 'onEventDirect',
registrationName: \\"onEventDirect\\"
},
topOrientationChange: {
registrationName: 'onOrientationChange',
registrationName: \\"onOrientationChange\\"
},
topEventWithMixedPropAttribute: {
registrationName: 'onEventWithMixedPropAttribute',
},
registrationName: \\"onEventWithMixedPropAttribute\\"
}
},
validAttributes: {
disabled: true,
...ConditionallyIgnoredEventHandlers({
onChange: true,
onArrayEventType: true,
onEventDirect: true,
onOrientationChange: true,
onEnd: true,
onEventWithMixedPropAttribute: true,
}),
},
onEventWithMixedPropAttribute: true
})
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -467,34 +412,28 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
let nativeComponentName = 'RCTInterfaceOnlyComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'RCTInterfaceOnlyComponent',
uiViewClassName: \\"RCTInterfaceOnlyComponent\\",
bubblingEventTypes: {
topPaperChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange',
},
},
captured: \\"onChangeCapture\\",
bubbled: \\"onChange\\"
}
}
},
directEventTypes: {
topPaperDirectChange: {
registrationName: 'onDirectChange',
},
registrationName: \\"onDirectChange\\"
}
},
validAttributes: {
...ConditionallyIgnoredEventHandlers({
onChange: true,
onDirectChange: true,
}),
},
onDirectChange: true
})
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -519,13 +458,10 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ExcludedAndroidComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ExcludedAndroidComponent',
validAttributes: {},
uiViewClassName: \\"ExcludedAndroidComponent\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -550,13 +486,10 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ExcludedAndroidIosComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ExcludedAndroidIosComponent',
validAttributes: {},
uiViewClassName: \\"ExcludedAndroidIosComponent\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -581,26 +514,19 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ExcludedIosComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ExcludedIosComponent',
validAttributes: {},
uiViewClassName: \\"ExcludedIosComponent\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
let nativeComponentName = 'MultiFileIncludedNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MultiFileIncludedNativeComponent',
uiViewClassName: \\"MultiFileIncludedNativeComponent\\",
validAttributes: {
disabled: true,
},
disabled: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -625,21 +551,17 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'FloatPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'FloatPropNativeComponent',
uiViewClassName: \\"FloatPropNativeComponent\\",
validAttributes: {
blurRadius: true,
blurRadius2: true,
blurRadius3: true,
blurRadius4: true,
blurRadius5: true,
blurRadius6: true,
},
blurRadius6: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -664,18 +586,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ImagePropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ImagePropNativeComponent',
uiViewClassName: \\"ImagePropNativeComponent\\",
validAttributes: {
thumbImage: {
process: require('react-native/Libraries/Image/resolveAssetSource'),
},
},
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -700,18 +618,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'InsetsPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'InsetsPropNativeComponent',
uiViewClassName: \\"InsetsPropNativeComponent\\",
validAttributes: {
contentInset: {
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer')),
},
},
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer'))
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -736,16 +650,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'Int32EnumPropsNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'Int32EnumPropsNativeComponent',
uiViewClassName: \\"Int32EnumPropsNativeComponent\\",
validAttributes: {
maxInterval: true,
},
maxInterval: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -770,18 +680,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'IntegerPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'IntegerPropNativeComponent',
uiViewClassName: \\"IntegerPropNativeComponent\\",
validAttributes: {
progress1: true,
progress2: true,
progress3: true,
},
progress3: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -807,29 +713,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
let nativeComponentName = 'RCTInterfaceOnlyComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'RCTInterfaceOnlyComponent',
uiViewClassName: \\"RCTInterfaceOnlyComponent\\",
bubblingEventTypes: {
topChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange',
},
},
captured: \\"onChangeCapture\\",
bubbled: \\"onChange\\"
}
}
},
validAttributes: {
accessibilityHint: true,
...ConditionallyIgnoredEventHandlers({
onChange: true,
}),
},
onChange: true
})
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -854,16 +754,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'MixedPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MixedPropNativeComponent',
uiViewClassName: \\"MixedPropNativeComponent\\",
validAttributes: {
mixedProp: true,
},
mixedProp: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -888,30 +784,23 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ImageColorPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ImageColorPropNativeComponent',
uiViewClassName: \\"ImageColorPropNativeComponent\\",
validAttributes: {
thumbImage: {
process: require('react-native/Libraries/Image/resolveAssetSource'),
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
},
color: {
process: require('react-native/Libraries/StyleSheet/processColor').default,
process: require('react-native/Libraries/StyleSheet/processColor').default
},
thumbTintColor: {
process: require('react-native/Libraries/StyleSheet/processColor').default,
process: require('react-native/Libraries/StyleSheet/processColor').default
},
point: {
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
},
},
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -936,13 +825,10 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'NoPropsNoEventsComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'NoPropsNoEventsComponent',
validAttributes: {},
uiViewClassName: \\"NoPropsNoEventsComponent\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -967,16 +853,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'ObjectProps';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'ObjectProps',
uiViewClassName: \\"ObjectProps\\",
validAttributes: {
objectProp: true,
},
objectProp: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -1001,18 +883,14 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'PointPropNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'PointPropNativeComponent',
uiViewClassName: \\"PointPropNativeComponent\\",
validAttributes: {
startPoint: {
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
},
},
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
}
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -1037,16 +915,12 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'StringEnumPropsNativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'StringEnumPropsNativeComponent',
uiViewClassName: \\"StringEnumPropsNativeComponent\\",
validAttributes: {
alignment: true,
},
alignment: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -1071,17 +945,13 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'StringPropComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'StringPropComponent',
uiViewClassName: \\"StringPropComponent\\",
validAttributes: {
accessibilityHint: true,
accessibilityRole: true,
},
accessibilityRole: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -1106,29 +976,21 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'MultiFile1NativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MultiFile1NativeComponent',
uiViewClassName: \\"MultiFile1NativeComponent\\",
validAttributes: {
disabled: true,
},
disabled: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
let nativeComponentName = 'MultiFile2NativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MultiFile2NativeComponent',
uiViewClassName: \\"MultiFile2NativeComponent\\",
validAttributes: {
disabled: true,
},
disabled: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -1153,29 +1015,21 @@ Map {
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'MultiComponent1NativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MultiComponent1NativeComponent',
uiViewClassName: \\"MultiComponent1NativeComponent\\",
validAttributes: {
disabled: true,
},
disabled: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
let nativeComponentName = 'MultiComponent2NativeComponent';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'MultiComponent2NativeComponent',
uiViewClassName: \\"MultiComponent2NativeComponent\\",
validAttributes: {
disabled: true,
},
disabled: true
}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -1208,12 +1062,10 @@ if (UIManager.hasViewManagerConfig('NativeComponentName')) {
} else {
throw new Error('Failed to find native component for either \\"NativeComponentName\\" or \\"DeprecatedNativeComponentName\\"');
}
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: 'NativeComponentName',
validAttributes: {},
uiViewClassName: \\"NativeComponentName\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
",
}
@@ -1,6 +1,6 @@
{
"name": "@react-native/compatibility-check",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
"license": "MIT",
"repository": {
@@ -29,7 +29,7 @@
"dist"
],
"dependencies": {
"@react-native/codegen": "0.79.0-main"
"@react-native/codegen": "0.79.7"
},
"devDependencies": {
"flow-remove-types": "^2.237.2",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/fantom",
"private": true,
"version": "0.79.0-main",
"version": "0.79.7",
"main": "src/index.js",
"description": "Internal integration testing and benchmarking tool for React Native",
"peerDependencies": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.79.0-main",
"version": "0.79.7",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -21,7 +21,7 @@
},
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.79.0-main"
"@react-native/codegen": "0.79.7"
},
"peerDependencies": {
"@types/react": "^19.0.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/oss-library-example",
"version": "0.79.0-main",
"version": "0.79.7",
"private": true,
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
"license": "MIT",
@@ -26,8 +26,8 @@
],
"devDependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.79.0-main",
"react-native": "1000.0.0"
"@react-native/babel-preset": "0.79.7",
"react-native": "0.79.7"
},
"peerDependencies": {
"react": "*",
@@ -140,4 +140,11 @@
return nullptr;
}
- (void)loadSourceForBridge:(RCTBridge *)bridge
onProgress:(RCTSourceLoadProgressBlock)onProgress
onComplete:(RCTSourceLoadBlock)loadCallback
{
[RCTJavaScriptLoader loadBundleAtURL:[self sourceURLForBridge:bridge] onProgress:onProgress onComplete:loadCallback];
}
@end
@@ -5,13 +5,14 @@
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <react/runtime/JSRuntimeFactoryCAPI.h>
#pragma once
NS_ASSUME_NONNULL_BEGIN
// Forward declarations for umbrella headers.
// In implementations, import `<react/runtime/JSRuntimeFactoryCAPI.h>` to obtain the actual type.
typedef void *JSRuntimeFactoryRef;
@protocol RCTJSRuntimeConfiguratorProtocol
- (JSRuntimeFactoryRef)createJSRuntimeFactory;
@@ -193,6 +193,15 @@ using namespace facebook::react;
return RCTAppSetupDefaultModuleFromClass(moduleClass, self.delegate.dependencyProvider);
}
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
if ([_delegate respondsToSelector:@selector(extraModulesForBridge:)]) {
return [_delegate extraModulesForBridge:bridge];
}
return @[];
}
#pragma mark - RCTComponentViewFactoryComponentProvider
- (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
@@ -305,6 +314,10 @@ class RCTAppDelegateBridgelessFeatureFlags : public ReactNativeFeatureFlagsDefau
{
return true;
}
bool useShadowNodeStateOnClone() override
{
return true;
}
};
- (void)_setUpFeatureFlags
@@ -32,6 +32,7 @@
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
#import <react/runtime/JSRuntimeFactory.h>
#import <react/runtime/JSRuntimeFactoryCAPI.h>
@implementation RCTRootViewFactoryConfiguration
+13 -1
View File
@@ -81,7 +81,19 @@ export class URL {
let baseUrl = null;
if (!base || validateBaseUrl(url)) {
this._url = url;
if (!this._url.endsWith('/')) {
if (this._url.includes('#')) {
const split = this._url.split('#');
const beforeHash = split[0];
const website = beforeHash.split('://')[1];
if (!website.includes('/')) {
this._url = split.join('/#');
}
}
if (
!this._url.endsWith('/') &&
!(this._url.includes('?') || this._url.includes('#'))
) {
this._url += '/';
}
} else {
+3 -3
View File
@@ -14,8 +14,8 @@ export const version: $ReadOnly<{
patch: number,
prerelease: string | null,
}> = {
major: 1000,
minor: 0,
patch: 0,
major: 0,
minor: 79,
patch: 7,
prerelease: null,
};
@@ -49,13 +49,8 @@ RCT_EXPORT_MODULE()
_queue.maxConcurrentOperationCount = 2;
}
__weak NSBlockOperation *weakOp;
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
if (strongOp == nil || [strongOp isCancelled]) {
return;
}
__weak __block NSBlockOperation *weakOp;
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
// Get mime type
NSRange firstSemicolon = [request.URL.resourceSpecifier rangeOfString:@";"];
NSString *mimeType =
@@ -67,15 +62,15 @@ RCT_EXPORT_MODULE()
expectedContentLength:-1
textEncodingName:nil];
[delegate URLRequest:strongOp didReceiveResponse:response];
[delegate URLRequest:weakOp didReceiveResponse:response];
// Load data
NSError *error;
NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
if (data) {
[delegate URLRequest:strongOp didReceiveData:data];
[delegate URLRequest:weakOp didReceiveData:data];
}
[delegate URLRequest:strongOp didCompleteWithError:error];
[delegate URLRequest:weakOp didCompleteWithError:error];
}];
weakOp = op;
@@ -53,19 +53,14 @@ RCT_EXPORT_MODULE()
_fileQueue.maxConcurrentOperationCount = 4;
}
__weak NSBlockOperation *weakOp;
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
if (strongOp == nil || [strongOp isCancelled]) {
return;
}
__weak __block NSBlockOperation *weakOp;
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
// Get content length
NSError *error = nil;
NSFileManager *fileManager = [NSFileManager new];
NSDictionary<NSString *, id> *fileAttributes = [fileManager attributesOfItemAtPath:request.URL.path error:&error];
if (!fileAttributes) {
[delegate URLRequest:strongOp didCompleteWithError:error];
[delegate URLRequest:weakOp didCompleteWithError:error];
return;
}
@@ -82,14 +77,14 @@ RCT_EXPORT_MODULE()
expectedContentLength:[fileAttributes[NSFileSize] ?: @-1 integerValue]
textEncodingName:nil];
[delegate URLRequest:strongOp didReceiveResponse:response];
[delegate URLRequest:weakOp didReceiveResponse:response];
// Load data
NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
if (data) {
[delegate URLRequest:strongOp didReceiveData:data];
[delegate URLRequest:weakOp didReceiveData:data];
}
[delegate URLRequest:strongOp didCompleteWithError:error];
[delegate URLRequest:weakOp didCompleteWithError:error];
}];
weakOp = op;
@@ -15,6 +15,7 @@
#if RCT_ENABLE_INSPECTOR
#import "RCTInspectorDevServerHelper.h"
#endif
#import <React/RCTInitializeUIKitProxies.h>
#import <jsinspector-modern/InspectorFlags.h>
#import <jsinspector-modern/InspectorInterfaces.h>
#import <jsinspector-modern/ReactCdp.h>
@@ -511,6 +512,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
_bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString];
RCTExecuteOnMainQueue(^{
RCTInitializeUIKitProxies();
RCTRegisterReloadCommandListener(self);
RCTReloadCommandSetBundleURL(self->_bundleURL);
});
@@ -21,9 +21,9 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(1000),
RCTVersionMinor: @(0),
RCTVersionPatch: @(0),
RCTVersionMajor: @(0),
RCTVersionMinor: @(79),
RCTVersionPatch: @(7),
RCTVersionPrerelease: [NSNull null],
};
});
@@ -14,9 +14,7 @@
#import <React/RCTEventDispatcherProtocol.h>
#import <React/RCTInitializing.h>
#import <React/RCTInvalidating.h>
#import <React/RCTKeyWindowValuesProxy.h>
#import <React/RCTUtils.h>
#import <React/RCTWindowSafeAreaProxy.h>
#import <atomic>
#import "CoreModulesPlugins.h"
@@ -31,8 +29,13 @@ using namespace facebook::react;
NSDictionary *_currentInterfaceDimensions;
BOOL _isFullscreen;
std::atomic<BOOL> _invalidated;
NSDictionary *_constants;
__weak UIWindow *_applicationWindow;
}
static NSString *const kFrameKeyPath = @"frame";
@synthesize moduleRegistry = _moduleRegistry;
RCT_EXPORT_MODULE()
@@ -40,14 +43,26 @@ RCT_EXPORT_MODULE()
- (instancetype)init
{
if (self = [super init]) {
[[RCTKeyWindowValuesProxy sharedInstance] startObservingWindowSizeIfNecessary];
_applicationWindow = RCTKeyWindow();
[_applicationWindow addObserver:self forKeyPath:kFrameKeyPath options:NSKeyValueObservingOptionNew context:nil];
}
return self;
}
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context
{
if ([keyPath isEqualToString:kFrameKeyPath]) {
[self interfaceFrameDidChange];
[[NSNotificationCenter defaultCenter] postNotificationName:RCTWindowFrameDidChangeNotification object:self];
}
}
+ (BOOL)requiresMainQueueSetup
{
return NO;
return YES;
}
- (dispatch_queue_t)methodQueue
@@ -81,7 +96,7 @@ RCT_EXPORT_MODULE()
#if TARGET_OS_IOS
_currentInterfaceOrientation = [RCTKeyWindowValuesProxy sharedInstance].currentInterfaceOrientation;
_currentInterfaceOrientation = RCTKeyWindow().windowScene.interfaceOrientation;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceFrameDidChange)
@@ -98,6 +113,15 @@ RCT_EXPORT_MODULE()
selector:@selector(invalidate)
name:RCTBridgeWillInvalidateModulesNotification
object:nil];
_constants = @{
@"Dimensions" : [self _exportedDimensions],
// Note:
// This prop is deprecated and will be removed in a future release.
// Please use this only for a quick and temporary solution.
// Use <SafeAreaView> instead.
@"isIPhoneX_deprecated" : @(RCTIsIPhoneNotched()),
};
}
- (void)invalidate
@@ -120,6 +144,8 @@ RCT_EXPORT_MODULE()
[[NSNotificationCenter defaultCenter] removeObserver:self name:RCTBridgeWillInvalidateModulesNotification object:nil];
[_applicationWindow removeObserver:self forKeyPath:kFrameKeyPath];
#if TARGET_OS_IOS
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
#endif
@@ -132,8 +158,13 @@ static BOOL RCTIsIPhoneNotched()
#if TARGET_OS_IOS
dispatch_once(&onceToken, ^{
RCTAssertMainQueue();
// 20pt is the top safeArea value in non-notched devices
isIPhoneNotched = [RCTWindowSafeAreaProxy sharedInstance].currentSafeAreaInsets.top > 20;
UIWindow *keyWindow = RCTKeyWindow();
if (keyWindow) {
isIPhoneNotched = keyWindow.safeAreaInsets.top > 20;
}
});
#endif
@@ -142,11 +173,13 @@ static BOOL RCTIsIPhoneNotched()
static NSDictionary *RCTExportedDimensions(CGFloat fontScale)
{
RCTAssertMainQueue();
UIScreen *mainScreen = UIScreen.mainScreen;
CGSize screenSize = mainScreen.bounds.size;
UIView *mainWindow = RCTKeyWindow();
// We fallback to screen size if a key window is not found.
CGSize windowSize = [RCTKeyWindowValuesProxy sharedInstance].windowSize;
CGSize windowSize = mainWindow ? mainWindow.bounds.size : screenSize;
NSDictionary<NSString *, NSNumber *> *dimsWindow = @{
@"width" : @(windowSize.width),
@@ -170,7 +203,10 @@ static NSDictionary *RCTExportedDimensions(CGFloat fontScale)
RCTAssert(_moduleRegistry, @"Failed to get exported dimensions: RCTModuleRegistry is nil");
RCTAccessibilityManager *accessibilityManager =
(RCTAccessibilityManager *)[_moduleRegistry moduleForName:"AccessibilityManager"];
RCTAssert(accessibilityManager, @"Failed to get exported dimensions: AccessibilityManager is nil");
// TOOD(T225745315): For some reason, accessibilityManager is nil in some cases.
// We default the fontScale to 1.0 in this case. This should be okay: if we assume
// that accessibilityManager will eventually become available, js will eventually
// be updated with the correct fontScale.
CGFloat fontScale = accessibilityManager ? accessibilityManager.multiplier : 1.0;
return RCTExportedDimensions(fontScale);
}
@@ -182,14 +218,7 @@ static NSDictionary *RCTExportedDimensions(CGFloat fontScale)
- (NSDictionary<NSString *, id> *)getConstants
{
return @{
@"Dimensions" : [self _exportedDimensions],
// Note:
// This prop is deprecated and will be removed in a future release.
// Please use this only for a quick and temporary solution.
// Use <SafeAreaView> instead.
@"isIPhoneX_deprecated" : @(RCTIsIPhoneNotched()),
};
return _constants;
}
- (void)didReceiveNewContentSizeMultiplier
@@ -209,10 +238,11 @@ static NSDictionary *RCTExportedDimensions(CGFloat fontScale)
- (void)interfaceOrientationDidChange
{
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
UIWindow *keyWindow = RCTKeyWindow();
UIInterfaceOrientation nextOrientation = keyWindow.windowScene.interfaceOrientation;
UIApplication *application = RCTSharedApplication();
UIInterfaceOrientation nextOrientation = RCTKeyWindow().windowScene.interfaceOrientation;
BOOL isRunningInFullScreen = CGRectEqualToRect(keyWindow.frame, keyWindow.screen.bounds);
BOOL isRunningInFullScreen =
CGRectEqualToRect(application.delegate.window.frame, application.delegate.window.screen.bounds);
// We are catching here two situations for multitasking view:
// a) The app is in Split View and the container gets resized -> !isRunningInFullScreen
// b) The app changes to/from fullscreen example: App runs in slide over mode and goes into fullscreen->
@@ -275,4 +305,4 @@ static NSDictionary *RCTExportedDimensions(CGFloat fontScale)
Class RCTDeviceInfoCls(void)
{
return RCTDeviceInfo.class;
}
}
@@ -170,10 +170,24 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
{
[_viewsToBeMounted addObject:@{
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
kRCTLegacyInteropChildComponentKey : childComponentView
}];
if (_adapter && index == _adapter.paperView.reactSubviews.count) {
// This is a new child view that is being added to the end of the children array.
// After the children is added, we need to call didUpdateReactSubviews to make sure that it is rendered.
// Without this change, the new child will not be rendered right away because the didUpdateReactSubviews is not
// called and the `finalizeUpdate` is not invoked.
if ([childComponentView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childComponentView).contentView;
[_adapter.paperView insertReactSubview:target atIndex:index];
} else {
[_adapter.paperView insertReactSubview:childComponentView atIndex:index];
}
[_adapter.paperView didUpdateReactSubviews];
} else {
[_viewsToBeMounted addObject:@{
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
kRCTLegacyInteropChildComponentKey : childComponentView
}];
}
}
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
@@ -60,7 +60,7 @@ using namespace facebook::react;
const auto &newSwitchProps = static_cast<const SwitchProps &>(*props);
// `value`
if (oldSwitchProps.value != newSwitchProps.value) {
if (!_isInitialValueSet || oldSwitchProps.value != newSwitchProps.value) {
BOOL shouldAnimate = _isInitialValueSet == YES;
[_switchView setOn:newSwitchProps.value animated:shouldAnimate];
}
@@ -101,11 +101,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
NSMutableDictionary<NSAttributedStringKey, id> *defaultAttributes =
[_backedTextInputView.defaultTextAttributes mutableCopy];
#if !TARGET_OS_MACCATALYST
RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new];
eventEmitterWrapper.eventEmitter = _eventEmitter;
defaultAttributes[RCTAttributedStringEventEmitterKey] = eventEmitterWrapper;
#endif
defaultAttributes[RCTAttributedStringEventEmitterKey] = RCTWrapEventEmitter(_eventEmitter);
_backedTextInputView.defaultTextAttributes = defaultAttributes;
}
@@ -272,10 +268,8 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
if (newTextInputProps.textAttributes != oldTextInputProps.textAttributes) {
NSMutableDictionary<NSAttributedStringKey, id> *defaultAttributes =
RCTNSTextAttributesFromTextAttributes(newTextInputProps.getEffectiveTextAttributes(RCTFontSizeMultiplier()));
#if !TARGET_OS_MACCATALYST
defaultAttributes[RCTAttributedStringEventEmitterKey] =
_backedTextInputView.defaultTextAttributes[RCTAttributedStringEventEmitterKey];
#endif
_backedTextInputView.defaultTextAttributes = defaultAttributes;
}
@@ -704,6 +698,11 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
}
- (void)_restoreTextSelection
{
[self _restoreTextSelectionAndIgnoreCaretChange:NO];
}
- (void)_restoreTextSelectionAndIgnoreCaretChange:(BOOL)ignore
{
const auto &selection = static_cast<const TextInputProps &>(*_props).selection;
if (!selection.has_value()) {
@@ -713,6 +712,9 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
offset:selection->start];
auto end = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument offset:selection->end];
auto range = [_backedTextInputView textRangeFromPosition:start toPosition:end];
if (ignore && range.empty) {
return;
}
[_backedTextInputView setSelectedTextRange:range notifyDelegate:YES];
}
@@ -727,19 +729,20 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
// Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
// a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
// This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
if (selectedRange.empty) {
// Maintaining a cursor position relative to the end of the old text.
NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
toPosition:selectedRange.start];
NSInteger offsetFromEnd = oldTextLength - offsetStart;
NSInteger newOffset = attributedString.string.length - offsetFromEnd;
UITextPosition *position = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
offset:newOffset];
[_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
notifyDelegate:YES];
[_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
}
[self _restoreTextSelection];
// Maintaining a cursor position relative to the end of the old text.
NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
toPosition:selectedRange.start];
NSInteger offsetFromEnd = oldTextLength - offsetStart;
NSInteger newOffset = attributedString.string.length - offsetFromEnd;
UITextPosition *position = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
offset:newOffset];
[_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
notifyDelegate:YES];
[_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
// A zero-length selection range can cause the caret position to change on iOS,
// and we have already updated the caret position, so we can safely ignore caret changing in this place.
[self _restoreTextSelectionAndIgnoreCaretChange:YES];
[self _updateTypingAttributes];
_lastStringStateWasUpdatedWith = attributedString;
}
@@ -29,6 +29,7 @@ public class com/facebook/react/DebugCorePackage$$ReactModuleInfoProvider : com/
public abstract class com/facebook/react/HeadlessJsTaskService : android/app/Service, com/facebook/react/jstasks/HeadlessJsTaskEventListener {
public static final field Companion Lcom/facebook/react/HeadlessJsTaskService$Companion;
public fun <init> ()V
public static final fun acquireWakeLockNow (Landroid/content/Context;)V
protected final fun getReactContext ()Lcom/facebook/react/bridge/ReactContext;
protected final fun getReactHost ()Lcom/facebook/react/ReactHost;
protected final fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0
VERSION_NAME=0.79.7
react.internal.publishingGroup=com.facebook.react
android.useAndroidX=true
@@ -166,6 +166,7 @@ public abstract class HeadlessJsTaskService : Service(), HeadlessJsTaskEventList
* Acquire a wake lock to ensure the device doesn't go to sleep while processing background
* tasks.
*/
@JvmStatic
@SuppressLint("WakelockTimeout")
public fun acquireWakeLockNow(context: Context) {
if (wakeLock == null || wakeLock?.isHeld == false) {
@@ -1399,14 +1399,14 @@ public class ReactInstanceManager {
new RuntimeException(
"detachRootViewFromInstance called with ReactRootView with invalid id"));
}
clearReactRoot(reactRoot);
} else {
reactContext
.getCatalystInstance()
.getJSModule(AppRegistry.class)
.unmountApplicationComponentAtRootTag(reactRoot.getRootViewTag());
}
clearReactRoot(reactRoot);
}
@ThreadConfined(UI)
@@ -11,6 +11,7 @@ import android.app.Activity
import android.util.Pair
import android.view.View
import com.facebook.react.bridge.DefaultJSExceptionHandler
import com.facebook.react.bridge.JSExceptionHandler
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.ReadableArray
import com.facebook.react.common.SurfaceDelegate
@@ -34,7 +35,7 @@ import java.io.File
*/
public open class ReleaseDevSupportManager : DevSupportManager {
private val defaultJSExceptionHandler: DefaultJSExceptionHandler = DefaultJSExceptionHandler()
private val defaultJSExceptionHandler: JSExceptionHandler = DefaultJSExceptionHandler()
public override fun showNewJavaError(message: String?, e: Throwable?): Unit = Unit
@@ -173,7 +173,7 @@ public class FabricUIManager
private final CopyOnWriteArrayList<UIManagerListener> mListeners = new CopyOnWriteArrayList<>();
private boolean mMountNotificationScheduled = false;
private final List<Integer> mMountedSurfaceIds = new ArrayList<>();
private List<Integer> mSurfaceIdsWithPendingMountNotification = new ArrayList<>();
@ThreadConfined(UI)
@NonNull
@@ -1254,12 +1254,15 @@ public class FabricUIManager
// Collect surface IDs for all the mount items
for (MountItem mountItem : mountItems) {
if (mountItem != null && !mMountedSurfaceIds.contains(mountItem.getSurfaceId())) {
mMountedSurfaceIds.add(mountItem.getSurfaceId());
if (mountItem != null
&& !mSurfaceIdsWithPendingMountNotification.contains(mountItem.getSurfaceId())) {
mSurfaceIdsWithPendingMountNotification.add(mountItem.getSurfaceId());
}
}
if (!mMountNotificationScheduled && !mMountedSurfaceIds.isEmpty()) {
if (!mMountNotificationScheduled && !mSurfaceIdsWithPendingMountNotification.isEmpty()) {
mMountNotificationScheduled = true;
// Notify mount when the effects are visible and prevent mount hooks to
// delay paint.
UiThreadUtil.getUiThreadHandler()
@@ -1269,17 +1272,19 @@ public class FabricUIManager
public void run() {
mMountNotificationScheduled = false;
// Create a copy in case mount hooks trigger more mutations
final List<Integer> surfaceIdsToReportMount =
mSurfaceIdsWithPendingMountNotification;
mSurfaceIdsWithPendingMountNotification = new ArrayList<>();
final @Nullable FabricUIManagerBinding binding = mBinding;
if (binding == null || mDestroyed) {
mMountedSurfaceIds.clear();
return;
}
for (int surfaceId : mMountedSurfaceIds) {
for (int surfaceId : surfaceIdsToReportMount) {
binding.reportMount(surfaceId);
}
mMountedSurfaceIds.clear();
}
});
}
@@ -685,7 +685,15 @@ public class SurfaceMountingManager {
return;
}
ViewState viewState = getViewState(reactTag);
ViewState viewState = getNullableViewState(reactTag);
if (viewState == null) {
ReactSoftExceptionLogger.logSoftException(
ReactSoftExceptionLogger.Categories.SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE,
new ReactNoCrashSoftException(
"Unable to find viewState for tag: " + reactTag + " for updateProps"));
return;
}
viewState.mCurrentProps = new ReactStylesDiffMap(props);
View view = viewState.mView;
@@ -833,9 +841,16 @@ public class SurfaceMountingManager {
parent.requestLayout();
}
ViewState parentViewState = getViewState(parentTag);
// TODO T212247085: Make this non-nullable again after rolling out
// disableMountItemReorderingAndroid
ViewState parentViewState = getNullableViewState(parentTag);
IViewGroupManager<?> parentViewManager = null;
if (parentViewState.mViewManager != null) {
if (parentViewState == null) {
ReactSoftExceptionLogger.logSoftException(
ReactSoftExceptionLogger.Categories.SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE,
new ReactNoCrashSoftException(
"Unable to find viewState for tag: " + parentTag + " for updateLayout"));
} else if (parentViewState.mViewManager != null) {
parentViewManager = (IViewGroupManager) parentViewState.mViewManager;
}
if (parentViewManager == null || !parentViewManager.needsCustomLayoutForChildren()) {
@@ -22,6 +22,7 @@ import com.facebook.react.fabric.mounting.SurfaceMountingManager;
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
import com.facebook.react.uimanager.StateWrapper;
import com.facebook.systrace.Systrace;
import java.util.Locale;
/**
* This class represents a batch of {@link MountItem}s, represented directly as int buffers to
@@ -199,7 +200,7 @@ final class IntBufferBatchMountItem implements BatchMountItem {
public String toString() {
try {
StringBuilder s = new StringBuilder();
s.append(String.format("IntBufferBatchMountItem [surface:%d]:\n", mSurfaceId));
s.append(String.format(Locale.ROOT, "IntBufferBatchMountItem [surface:%d]:\n", mSurfaceId));
int i = 0, j = 0;
while (i < mIntBufferLen) {
int rawType = mIntBuffer[i++];
@@ -211,49 +212,65 @@ final class IntBufferBatchMountItem implements BatchMountItem {
j += 3;
s.append(
String.format(
Locale.ROOT,
"CREATE [%d] - layoutable:%d - %s\n",
mIntBuffer[i++], mIntBuffer[i++], componentName));
mIntBuffer[i++],
mIntBuffer[i++],
componentName));
} else if (type == INSTRUCTION_DELETE) {
s.append(String.format("DELETE [%d]\n", mIntBuffer[i++]));
s.append(String.format(Locale.ROOT, "DELETE [%d]\n", mIntBuffer[i++]));
} else if (type == INSTRUCTION_INSERT) {
s.append(
String.format(
"INSERT [%d]->[%d] @%d\n", mIntBuffer[i++], mIntBuffer[i++], mIntBuffer[i++]));
Locale.ROOT,
"INSERT [%d]->[%d] @%d\n",
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++]));
} else if (type == INSTRUCTION_REMOVE) {
s.append(
String.format(
"REMOVE [%d]->[%d] @%d\n", mIntBuffer[i++], mIntBuffer[i++], mIntBuffer[i++]));
Locale.ROOT,
"REMOVE [%d]->[%d] @%d\n",
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++]));
} else if (type == INSTRUCTION_UPDATE_PROPS) {
Object props = mObjBuffer[j++];
String propsString =
IS_DEVELOPMENT_ENVIRONMENT
? (props != null ? props.toString() : "<null>")
: "<hidden>";
s.append(String.format("UPDATE PROPS [%d]: %s\n", mIntBuffer[i++], propsString));
s.append(
String.format(
Locale.ROOT, "UPDATE PROPS [%d]: %s\n", mIntBuffer[i++], propsString));
} else if (type == INSTRUCTION_UPDATE_STATE) {
StateWrapper state = (StateWrapper) mObjBuffer[j++];
String stateString =
IS_DEVELOPMENT_ENVIRONMENT
? (state != null ? state.toString() : "<null>")
: "<hidden>";
s.append(String.format("UPDATE STATE [%d]: %s\n", mIntBuffer[i++], stateString));
} else if (type == INSTRUCTION_UPDATE_LAYOUT) {
int reactTag = mIntBuffer[i++];
int parentTag = mIntBuffer[i++];
int x = mIntBuffer[i++];
int y = mIntBuffer[i++];
int w = mIntBuffer[i++];
int h = mIntBuffer[i++];
int displayType = mIntBuffer[i++];
int layoutDirection = mIntBuffer[i++];
s.append(
String.format(
"UPDATE LAYOUT [%d]->[%d]: x:%d y:%d w:%d h:%d displayType:%d layoutDirection:"
+ " %d\n",
parentTag, reactTag, x, y, w, h, displayType, layoutDirection));
Locale.ROOT, "UPDATE STATE [%d]: %s\n", mIntBuffer[i++], stateString));
} else if (type == INSTRUCTION_UPDATE_LAYOUT) {
s.append(
String.format(
Locale.ROOT,
"UPDATE LAYOUT [%d]->[%d]: x:%d y:%d w:%d h:%d displayType:%d"
+ " layoutDirection:%d\n",
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++],
mIntBuffer[i++]));
} else if (type == INSTRUCTION_UPDATE_PADDING) {
s.append(
String.format(
Locale.ROOT,
"UPDATE PADDING [%d]: top:%d right:%d bottom:%d left:%d\n",
mIntBuffer[i++],
mIntBuffer[i++],
@@ -263,6 +280,7 @@ final class IntBufferBatchMountItem implements BatchMountItem {
} else if (type == INSTRUCTION_UPDATE_OVERFLOW_INSET) {
s.append(
String.format(
Locale.ROOT,
"UPDATE OVERFLOWINSET [%d]: left:%d top:%d right:%d bottom:%d\n",
mIntBuffer[i++],
mIntBuffer[i++],
@@ -271,7 +289,7 @@ final class IntBufferBatchMountItem implements BatchMountItem {
mIntBuffer[i++]));
} else if (type == INSTRUCTION_UPDATE_EVENT_EMITTER) {
j += 1;
s.append(String.format("UPDATE EVENTEMITTER [%d]\n", mIntBuffer[i++]));
s.append(String.format(Locale.ROOT, "UPDATE EVENTEMITTER [%d]\n", mIntBuffer[i++]));
} else {
FLog.e(TAG, "String so far: " + s.toString());
throw new IllegalArgumentException(
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5e27f8a6852293234595697743315ff8>>
* @generated SignedSource<<fa641112b3a8888ba2b24cf8829e9382>>
*/
/**
@@ -238,18 +238,18 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = accessor.traceTurboModulePromiseRejectionsOnAndroid()
/**
* When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
*/
@JvmStatic
public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = accessor.updateRuntimeShadowNodeReferencesOnCommit()
/**
* In Bridgeless mode, use the always available javascript error reporting pipeline.
*/
@JvmStatic
public fun useAlwaysAvailableJSErrorHandling(): Boolean = accessor.useAlwaysAvailableJSErrorHandling()
/**
* If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
*/
@JvmStatic
public fun useEditTextStockAndroidFocusBehavior(): Boolean = accessor.useEditTextStockAndroidFocusBehavior()
/**
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
*/
@@ -274,6 +274,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun useRawPropsJsiValue(): Boolean = accessor.useRawPropsJsiValue()
/**
* Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
*/
@JvmStatic
public fun useShadowNodeStateOnClone(): Boolean = accessor.useShadowNodeStateOnClone()
/**
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b59cecccbe734a126dcd20f76d0ce7c7>>
* @generated SignedSource<<9ecb711480b7d6c22bac380c28d035bc>>
*/
/**
@@ -55,12 +55,13 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var removeTurboModuleManagerDelegateMutexCache: Boolean? = null
private var throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOSCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
private var useRawPropsJsiValueCache: Boolean? = null
private var useShadowNodeStateOnCloneCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
private var useTurboModulesCache: Boolean? = null
@@ -379,6 +380,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean {
var cached = updateRuntimeShadowNodeReferencesOnCommitCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.updateRuntimeShadowNodeReferencesOnCommit()
updateRuntimeShadowNodeReferencesOnCommitCache = cached
}
return cached
}
override fun useAlwaysAvailableJSErrorHandling(): Boolean {
var cached = useAlwaysAvailableJSErrorHandlingCache
if (cached == null) {
@@ -388,15 +398,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun useEditTextStockAndroidFocusBehavior(): Boolean {
var cached = useEditTextStockAndroidFocusBehaviorCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.useEditTextStockAndroidFocusBehavior()
useEditTextStockAndroidFocusBehaviorCache = cached
}
return cached
}
override fun useFabricInterop(): Boolean {
var cached = useFabricInteropCache
if (cached == null) {
@@ -433,6 +434,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun useShadowNodeStateOnClone(): Boolean {
var cached = useShadowNodeStateOnCloneCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.useShadowNodeStateOnClone()
useShadowNodeStateOnCloneCache = cached
}
return cached
}
override fun useTurboModuleInterop(): Boolean {
var cached = useTurboModuleInteropCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<08b51adfc7c09f0f26f2b3c8351cda01>>
* @generated SignedSource<<2151e5ec5d04924e742f37b527dc23b9>>
*/
/**
@@ -98,9 +98,9 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean
@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
@DoNotStrip @JvmStatic public external fun useEditTextStockAndroidFocusBehavior(): Boolean
@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean
@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
@@ -110,6 +110,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun useRawPropsJsiValue(): Boolean
@DoNotStrip @JvmStatic public external fun useShadowNodeStateOnClone(): Boolean
@DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean
@DoNotStrip @JvmStatic public external fun useTurboModules(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<0041e37961e68474a6d092dc0f8a4903>>
* @generated SignedSource<<56f86a3a0c0bbf453cf45a0db541ef54>>
*/
/**
@@ -93,9 +93,9 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false
override fun useAlwaysAvailableJSErrorHandling(): Boolean = false
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false
override fun useEditTextStockAndroidFocusBehavior(): Boolean = true
override fun useAlwaysAvailableJSErrorHandling(): Boolean = false
override fun useFabricInterop(): Boolean = false
@@ -105,6 +105,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun useRawPropsJsiValue(): Boolean = false
override fun useShadowNodeStateOnClone(): Boolean = false
override fun useTurboModuleInterop(): Boolean = false
override fun useTurboModules(): Boolean = false
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e5c1e722f33148fe3aa36ccab62e2293>>
* @generated SignedSource<<5b016fd6298477856116736e37c37c6f>>
*/
/**
@@ -59,12 +59,13 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var removeTurboModuleManagerDelegateMutexCache: Boolean? = null
private var throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOSCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
private var useFabricInteropCache: Boolean? = null
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
private var useRawPropsJsiValueCache: Boolean? = null
private var useShadowNodeStateOnCloneCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
private var useTurboModulesCache: Boolean? = null
@@ -418,6 +419,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean {
var cached = updateRuntimeShadowNodeReferencesOnCommitCache
if (cached == null) {
cached = currentProvider.updateRuntimeShadowNodeReferencesOnCommit()
accessedFeatureFlags.add("updateRuntimeShadowNodeReferencesOnCommit")
updateRuntimeShadowNodeReferencesOnCommitCache = cached
}
return cached
}
override fun useAlwaysAvailableJSErrorHandling(): Boolean {
var cached = useAlwaysAvailableJSErrorHandlingCache
if (cached == null) {
@@ -428,16 +439,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun useEditTextStockAndroidFocusBehavior(): Boolean {
var cached = useEditTextStockAndroidFocusBehaviorCache
if (cached == null) {
cached = currentProvider.useEditTextStockAndroidFocusBehavior()
accessedFeatureFlags.add("useEditTextStockAndroidFocusBehavior")
useEditTextStockAndroidFocusBehaviorCache = cached
}
return cached
}
override fun useFabricInterop(): Boolean {
var cached = useFabricInteropCache
if (cached == null) {
@@ -478,6 +479,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun useShadowNodeStateOnClone(): Boolean {
var cached = useShadowNodeStateOnCloneCache
if (cached == null) {
cached = currentProvider.useShadowNodeStateOnClone()
accessedFeatureFlags.add("useShadowNodeStateOnClone")
useShadowNodeStateOnCloneCache = cached
}
return cached
}
override fun useTurboModuleInterop(): Boolean {
var cached = useTurboModuleInteropCache
if (cached == null) {
@@ -17,4 +17,6 @@ public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
override fun enableFabricRenderer(): Boolean = bridgelessEnabled || fabricEnabled
override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled
override fun useShadowNodeStateOnClone(): Boolean = true
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9a223b4f79e4612eb193036256bfebc5>>
* @generated SignedSource<<b4d6157922f6182dd588d5ae5b54ead9>>
*/
/**
@@ -93,9 +93,9 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
@DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean
@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
@DoNotStrip public fun useEditTextStockAndroidFocusBehavior(): Boolean
@DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean
@DoNotStrip public fun useFabricInterop(): Boolean
@@ -105,6 +105,8 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun useRawPropsJsiValue(): Boolean
@DoNotStrip public fun useShadowNodeStateOnClone(): Boolean
@DoNotStrip public fun useTurboModuleInterop(): Boolean
@DoNotStrip public fun useTurboModules(): Boolean
@@ -13,8 +13,6 @@ import android.os.Build
import android.view.View
import android.view.WindowInsetsController
import android.view.WindowManager
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.facebook.common.logging.FLog
import com.facebook.fbreact.specs.NativeStatusBarManagerAndroidSpec
import com.facebook.react.bridge.GuardedRunnable
@@ -23,6 +21,7 @@ import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.UiThreadUtil
import com.facebook.react.common.ReactConstants
import com.facebook.react.module.annotations.ReactModule
import com.facebook.react.uimanager.DisplayMetricsHolder.getStatusBarHeightPx
import com.facebook.react.uimanager.PixelUtil
import com.facebook.react.views.view.setStatusBarTranslucency
import com.facebook.react.views.view.setStatusBarVisibility
@@ -34,29 +33,17 @@ public class StatusBarModule(reactContext: ReactApplicationContext?) :
@Suppress("DEPRECATION")
override fun getTypedExportedConstants(): Map<String, Any> {
val currentActivity = reactApplicationContext.currentActivity
val statusBarColor =
currentActivity?.window?.statusBarColor?.let { color ->
String.format("#%06X", 0xFFFFFF and color)
} ?: "black"
return mapOf(
HEIGHT_KEY to PixelUtil.toDIPFromPixel(getStatusBarHeightPx()),
HEIGHT_KEY to PixelUtil.toDIPFromPixel(getStatusBarHeightPx(currentActivity).toFloat()),
DEFAULT_BACKGROUND_COLOR_KEY to statusBarColor,
)
}
@Suppress("DEPRECATION")
private fun getStatusBarHeightPx(): Float {
val windowInsets =
currentActivity?.window?.decorView?.let(ViewCompat::getRootWindowInsets) ?: return 0f
return windowInsets
.getInsets(
WindowInsetsCompat.Type.statusBars() or
WindowInsetsCompat.Type.navigationBars() or
WindowInsetsCompat.Type.displayCutout())
.top
.toFloat()
}
@Suppress("DEPRECATION")
override fun setColor(colorDouble: Double, animated: Boolean) {
val color = colorDouble.toInt()
@@ -15,8 +15,8 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 1000,
"minor", 0,
"patch", 0,
"major", 0,
"minor", 79,
"patch", 7,
"prerelease", null);
}
@@ -7,9 +7,12 @@
package com.facebook.react.uimanager
import android.app.Activity
import android.content.Context
import android.util.DisplayMetrics
import android.view.WindowManager
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.facebook.react.bridge.WritableMap
import com.facebook.react.bridge.WritableNativeMap
@@ -99,4 +102,14 @@ public object DisplayMetricsHolder {
putDouble("fontScale", fontScale)
putDouble("densityDpi", displayMetrics.densityDpi.toDouble())
}
internal fun getStatusBarHeightPx(activity: Activity?): Int {
val windowInsets = activity?.window?.decorView?.let(ViewCompat::getRootWindowInsets) ?: return 0
return windowInsets
.getInsets(
WindowInsetsCompat.Type.statusBars() or
WindowInsetsCompat.Type.navigationBars() or
WindowInsetsCompat.Type.displayCutout())
.top
}
}
@@ -671,9 +671,6 @@ public class NativeViewHierarchyManager {
View rootView = mTagsToViews.get(rootViewTag);
dropView(rootView);
mRootTags.delete(rootViewTag);
if (rootView != null) {
rootView.setId(View.NO_ID);
}
}
/**
@@ -136,10 +136,10 @@ internal data class BorderRadiusStyle(
(startStart ?: topStart ?: topLeft ?: uniform)?.resolve(width, height)
?: zeroRadii,
bottomLeft =
(endEnd ?: bottomStart ?: bottomRight ?: uniform)?.resolve(width, height)
(endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.resolve(width, height)
?: zeroRadii,
bottomRight =
(startEnd ?: bottomEnd ?: bottomLeft ?: uniform)?.resolve(width, height)
(startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.resolve(width, height)
?: zeroRadii,
width = width,
height = height,
@@ -39,6 +39,8 @@ import com.facebook.react.bridge.WritableNativeMap
import com.facebook.react.common.ReactConstants
import com.facebook.react.common.annotations.VisibleForTesting
import com.facebook.react.config.ReactFeatureFlags
import com.facebook.react.uimanager.DisplayMetricsHolder
import com.facebook.react.uimanager.DisplayMetricsHolder.getStatusBarHeightPx
import com.facebook.react.uimanager.JSPointerDispatcher
import com.facebook.react.uimanager.JSTouchDispatcher
import com.facebook.react.uimanager.PixelUtil.pxToDp
@@ -52,6 +54,7 @@ import com.facebook.react.views.view.ReactViewGroup
import com.facebook.react.views.view.setStatusBarTranslucency
import com.facebook.react.views.view.setSystemBarsTranslucency
import java.util.Objects
import com.facebook.yoga.annotations.DoNotStrip
/**
* ReactModalHostView is a view that sits in the view hierarchy representing a Modal view.
@@ -66,6 +69,7 @@ import java.util.Objects
* addition and removal of views to the DialogRootViewGroup.
*/
@SuppressLint("ViewConstructor")
@DoNotStrip
public class ReactModalHostView(context: ThemedReactContext) :
ViewGroup(context), LifecycleEventListener {
@@ -121,6 +125,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
private var createNewDialog = false
init {
initStatusBarHeight(context)
dialogRootViewGroup = DialogRootViewGroup(context)
}
@@ -448,6 +453,26 @@ public class ReactModalHostView(context: ThemedReactContext) :
private companion object {
private const val TAG = "ReactModalHost"
// We store the status bar height to be able to properly position
// the modal on the first render.
private var statusBarHeight = 0
private fun initStatusBarHeight(reactContext: ReactContext) {
statusBarHeight = getStatusBarHeightPx(reactContext.currentActivity)
}
@JvmStatic
@DoNotStrip
private fun getScreenDisplayMetricsWithoutInsets(): Long {
val displayMetrics = DisplayMetricsHolder.getScreenDisplayMetrics()
return encodeFloatsToLong(
displayMetrics.widthPixels.toFloat().pxToDp(),
(displayMetrics.heightPixels - statusBarHeight).toFloat().pxToDp())
}
private fun encodeFloatsToLong(width: Float, height: Float): Long =
(width.toRawBits().toLong()) shl 32 or (height.toRawBits().toLong())
}
/**
@@ -463,6 +488,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
*/
public class DialogRootViewGroup internal constructor(context: Context) :
ReactViewGroup(context), RootView {
internal var stateWrapper: StateWrapper? = null
internal var eventDispatcher: EventDispatcher? = null
@@ -36,6 +36,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
@@ -146,9 +147,6 @@ public class ReactEditText extends AppCompatEditText {
public ReactEditText(Context context) {
super(context);
if (!ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()) {
setFocusableInTouchMode(false);
}
mInputMethodManager =
(InputMethodManager)
@@ -191,9 +189,7 @@ public class ReactEditText extends AppCompatEditText {
// selection on accessibility click to undo that.
setSelection(length);
}
return ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()
? requestFocusProgramatically()
: requestFocusInternal();
return requestFocusProgramatically();
}
return super.performAccessibilityAction(host, action, args);
}
@@ -341,29 +337,28 @@ public class ReactEditText extends AppCompatEditText {
return super.onTextContextMenuItem(id);
}
@Override
public void clearFocus() {
boolean useStockFocusBehavior = ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior();
if (!useStockFocusBehavior) {
setFocusableInTouchMode(false);
public void clearFocusAndMaybeRefocus() {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P || !isInTouchMode()) {
super.clearFocus();
} else {
// Avoid refocusing to a new view on old versions of Android by default
// by preventing `requestFocus()` on the rootView from moving focus to any child.
// https://cs.android.com/android/_/android/platform/frameworks/base/+/bdc66cb5a0ef513f4306edf9156cc978b08e06e4
ViewGroup rootViewGroup = (ViewGroup)getRootView();
int oldDescendantFocusability = rootViewGroup.getDescendantFocusability();
rootViewGroup.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
super.clearFocus();
rootViewGroup.setDescendantFocusability(oldDescendantFocusability);
}
super.clearFocus();
hideSoftKeyboard();
}
@Override
public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
// This is a no-op so that when the OS calls requestFocus(), nothing will happen. ReactEditText
// is a controlled component, which means its focus is controlled by JS, with two exceptions:
// autofocus when it's attached to the window, and responding to accessibility events. In both
// of these cases, we call requestFocusInternal() directly.
return ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()
? super.requestFocus(direction, previouslyFocusedRect)
: isFocused();
/* package */ void clearFocusFromJS() {
clearFocusAndMaybeRefocus();
}
private boolean requestFocusInternal() {
setFocusableInTouchMode(true);
// We must explicitly call this method on the super class; if we call requestFocus() without
// any arguments, it will call into the overridden requestFocus(int, Rect) above, which no-ops.
boolean focused = super.requestFocus(View.FOCUS_DOWN, null);
@@ -656,15 +651,7 @@ public class ReactEditText extends AppCompatEditText {
// VisibleForTesting from {@link TextInputEventsTestCase}.
public void requestFocusFromJS() {
if (ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()) {
requestFocusProgramatically();
} else {
requestFocusInternal();
}
}
/* package */ void clearFocusFromJS() {
clearFocus();
requestFocusProgramatically();
}
// VisibleForTesting from {@link TextInputEventsTestCase}.
@@ -1107,11 +1094,7 @@ public class ReactEditText extends AppCompatEditText {
}
if (mAutoFocus && !mDidAttachToWindow) {
if (ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()) {
requestFocusProgramatically();
} else {
requestFocusInternal();
}
requestFocusProgramatically();
}
mDidAttachToWindow = true;
@@ -1164,7 +1164,7 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
}
if (shouldBlur) {
editText.clearFocus();
editText.clearFocusAndMaybeRefocus();
}
// Prevent default behavior except when we want it to insert a newline.
@@ -588,9 +588,6 @@ public class ReactViewGroup extends ViewGroup
UiThreadUtil.assertOnUiThread();
checkViewClippingTag(child, Boolean.TRUE);
if (!customDrawOrderDisabled()) {
if (indexOfChild(child) == -1) {
return;
}
getDrawingOrderHelper().handleRemoveView(child);
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
} else {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<91c1a65790aa5946a354ab8a1966a5f4>>
* @generated SignedSource<<cf0734c38bab916ecaf361bc557b8802>>
*/
/**
@@ -249,15 +249,15 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool useAlwaysAvailableJSErrorHandling() override {
bool updateRuntimeShadowNodeReferencesOnCommit() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useAlwaysAvailableJSErrorHandling");
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("updateRuntimeShadowNodeReferencesOnCommit");
return method(javaProvider_);
}
bool useEditTextStockAndroidFocusBehavior() override {
bool useAlwaysAvailableJSErrorHandling() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useEditTextStockAndroidFocusBehavior");
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useAlwaysAvailableJSErrorHandling");
return method(javaProvider_);
}
@@ -285,6 +285,12 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool useShadowNodeStateOnClone() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useShadowNodeStateOnClone");
return method(javaProvider_);
}
bool useTurboModuleInterop() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useTurboModuleInterop");
@@ -476,16 +482,16 @@ bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndr
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
}
bool JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommit(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit();
}
bool JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
}
bool JReactNativeFeatureFlagsCxxInterop::useEditTextStockAndroidFocusBehavior(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior();
}
bool JReactNativeFeatureFlagsCxxInterop::useFabricInterop(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useFabricInterop();
@@ -506,6 +512,11 @@ bool JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue(
return ReactNativeFeatureFlags::useRawPropsJsiValue();
}
bool JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useShadowNodeStateOnClone();
}
bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useTurboModuleInterop();
@@ -652,12 +663,12 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"traceTurboModulePromiseRejectionsOnAndroid",
JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid),
makeNativeMethod(
"updateRuntimeShadowNodeReferencesOnCommit",
JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommit),
makeNativeMethod(
"useAlwaysAvailableJSErrorHandling",
JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling),
makeNativeMethod(
"useEditTextStockAndroidFocusBehavior",
JReactNativeFeatureFlagsCxxInterop::useEditTextStockAndroidFocusBehavior),
makeNativeMethod(
"useFabricInterop",
JReactNativeFeatureFlagsCxxInterop::useFabricInterop),
@@ -670,6 +681,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"useRawPropsJsiValue",
JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue),
makeNativeMethod(
"useShadowNodeStateOnClone",
JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone),
makeNativeMethod(
"useTurboModuleInterop",
JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<610104213a5eba23b797e27377d71b52>>
* @generated SignedSource<<f295d109e9a81ce2d2040a5fc89e9ada>>
*/
/**
@@ -135,10 +135,10 @@ class JReactNativeFeatureFlagsCxxInterop
static bool traceTurboModulePromiseRejectionsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool useAlwaysAvailableJSErrorHandling(
static bool updateRuntimeShadowNodeReferencesOnCommit(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool useEditTextStockAndroidFocusBehavior(
static bool useAlwaysAvailableJSErrorHandling(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool useFabricInterop(
@@ -153,6 +153,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool useRawPropsJsiValue(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool useShadowNodeStateOnClone(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool useTurboModuleInterop(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -88,13 +88,13 @@ class BorderRadiusStyleTest {
arrayOf(
BorderRadiusProp.BORDER_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_RIGHT_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
BorderRadiusProp.BORDER_END_END_RADIUS),
ComputedBorderRadiusProp.COMPUTED_BORDER_BOTTOM_RIGHT_RADIUS to
arrayOf(
BorderRadiusProp.BORDER_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_LEFT_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
BorderRadiusProp.BORDER_START_END_RADIUS),
)
@@ -109,7 +109,11 @@ Pod::Spec.new do |s|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "react/renderer/components/modal/**/*.{m,mm,cpp,h}"
sss.exclude_files = "react/renderer/components/modal/tests"
sss.exclude_files = [
"react/renderer/components/modal/tests",
"react/renderer/components/modal/platform/android/**/*.{cpp,h}",
"react/renderer/components/modal/platform/cxx/**/*.{cpp,h}"
]
sss.header_dir = "react/renderer/components/modal"
end
@@ -12,16 +12,16 @@
#include <cstdint>
#include <string_view>
#define REACT_NATIVE_VERSION_MAJOR 1000
#define REACT_NATIVE_VERSION_MINOR 0
#define REACT_NATIVE_VERSION_PATCH 0
#define REACT_NATIVE_VERSION_MAJOR 0
#define REACT_NATIVE_VERSION_MINOR 79
#define REACT_NATIVE_VERSION_PATCH 7
namespace facebook::react {
constexpr struct {
int32_t Major = 1000;
int32_t Minor = 0;
int32_t Patch = 0;
int32_t Major = 0;
int32_t Minor = 79;
int32_t Patch = 7;
std::string_view Prerelease = "";
} ReactNativeVersion;
@@ -38,7 +38,8 @@ Pod::Spec.new do |s|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"DEFINES_MODULE" => "YES",
}
s.header_dir = "reacthermes"
s.dependency "React-cxxreact", version
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
s.dependency "React-jsi", version
s.subspec "Fabric" do |ss|
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)" }
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)", "DEFINES_MODULE" => "YES" }
end
end
@@ -48,8 +48,11 @@ Pod::Spec.new do |s|
s.header_mappings_dir = "./"
end
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"DEFINES_MODULE" => "YES",
}
s.dependency "React-cxxreact", version
s.dependency "React-jsi", version
@@ -7,6 +7,8 @@
#pragma once
#ifdef __cplusplus
#include <ReactCommon/RuntimeExecutor.h>
#include <cxxreact/MessageQueueThread.h>
#include <jsi/jsi.h>
@@ -72,3 +74,5 @@ class JSIRuntimeHolder : public JSRuntime {
};
} // namespace facebook::react
#endif // __cplusplus
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3d4eefc7af1e9d594ade8339c261ca01>>
* @generated SignedSource<<1c90106ded5dc5f08cdec4dede695341>>
*/
/**
@@ -166,12 +166,12 @@ bool ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid() {
return getAccessor().traceTurboModulePromiseRejectionsOnAndroid();
}
bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
return getAccessor().useAlwaysAvailableJSErrorHandling();
bool ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit() {
return getAccessor().updateRuntimeShadowNodeReferencesOnCommit();
}
bool ReactNativeFeatureFlags::useEditTextStockAndroidFocusBehavior() {
return getAccessor().useEditTextStockAndroidFocusBehavior();
bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
return getAccessor().useAlwaysAvailableJSErrorHandling();
}
bool ReactNativeFeatureFlags::useFabricInterop() {
@@ -190,6 +190,10 @@ bool ReactNativeFeatureFlags::useRawPropsJsiValue() {
return getAccessor().useRawPropsJsiValue();
}
bool ReactNativeFeatureFlags::useShadowNodeStateOnClone() {
return getAccessor().useShadowNodeStateOnClone();
}
bool ReactNativeFeatureFlags::useTurboModuleInterop() {
return getAccessor().useTurboModuleInterop();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<55a526204b386d34058c86183d5b97ac>>
* @generated SignedSource<<ce2f5895234f1cfb30374c72db54ccce>>
*/
/**
@@ -214,16 +214,16 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool traceTurboModulePromiseRejectionsOnAndroid();
/**
* When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
*/
RN_EXPORT static bool updateRuntimeShadowNodeReferencesOnCommit();
/**
* In Bridgeless mode, use the always available javascript error reporting pipeline.
*/
RN_EXPORT static bool useAlwaysAvailableJSErrorHandling();
/**
* If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
*/
RN_EXPORT static bool useEditTextStockAndroidFocusBehavior();
/**
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
*/
@@ -244,6 +244,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool useRawPropsJsiValue();
/**
* Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
*/
RN_EXPORT static bool useShadowNodeStateOnClone();
/**
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c30a4dea1d32e2838f6e5db6442a3f78>>
* @generated SignedSource<<f975f6ffd2d6ec5d9057585ac0613c23>>
*/
/**
@@ -659,6 +659,24 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit() {
auto flagValue = updateRuntimeShadowNodeReferencesOnCommit_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "updateRuntimeShadowNodeReferencesOnCommit");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
auto flagValue = useAlwaysAvailableJSErrorHandling_.load();
@@ -668,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(36, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -677,24 +695,6 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
auto flagValue = useEditTextStockAndroidFocusBehavior_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(36, "useEditTextStockAndroidFocusBehavior");
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
useEditTextStockAndroidFocusBehavior_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
auto flagValue = useFabricInterop_.load();
@@ -767,6 +767,24 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
auto flagValue = useShadowNodeStateOnClone_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(41, "useShadowNodeStateOnClone");
flagValue = currentProvider_->useShadowNodeStateOnClone();
useShadowNodeStateOnClone_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
auto flagValue = useTurboModuleInterop_.load();
@@ -776,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(41, "useTurboModuleInterop");
markFlagAsAccessed(42, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -794,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(42, "useTurboModules");
markFlagAsAccessed(43, "useTurboModules");
flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<95aa4a8b8859f26b901112df1517b1f1>>
* @generated SignedSource<<978f828e7368b8802f8eaa5194e86e2f>>
*/
/**
@@ -67,12 +67,13 @@ class ReactNativeFeatureFlagsAccessor {
bool removeTurboModuleManagerDelegateMutex();
bool throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS();
bool traceTurboModulePromiseRejectionsOnAndroid();
bool updateRuntimeShadowNodeReferencesOnCommit();
bool useAlwaysAvailableJSErrorHandling();
bool useEditTextStockAndroidFocusBehavior();
bool useFabricInterop();
bool useNativeViewConfigsInBridgelessMode();
bool useOptimizedEventBatchingOnAndroid();
bool useRawPropsJsiValue();
bool useShadowNodeStateOnClone();
bool useTurboModuleInterop();
bool useTurboModules();
@@ -86,7 +87,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 44> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
@@ -123,12 +124,13 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> removeTurboModuleManagerDelegateMutex_;
std::atomic<std::optional<bool>> throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS_;
std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
std::atomic<std::optional<bool>> useFabricInterop_;
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
std::atomic<std::optional<bool>> useRawPropsJsiValue_;
std::atomic<std::optional<bool>> useShadowNodeStateOnClone_;
std::atomic<std::optional<bool>> useTurboModuleInterop_;
std::atomic<std::optional<bool>> useTurboModules_;
};

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