Граф коммитов

1384 Коммитов

Автор SHA1 Сообщение Дата
Nicola Corti 9a2eb9089f Provide defaults for TurboModuleManagerDelegate and JSIModulePackage (#34418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34418

This is an attempt to relax the need of specifying a custom `TurboModuleManagerDelegate` and a `JSIModulePackage` in new apps for New Architecture.
Users can just specify the name of the dynamic library to load and they'll default to use the `DefaultTurboModuleManagerDelegate` and `DefaultJSIModulePackage`.

Users will still have to provide a C++ implementation for it for the time being, but this at least removes
one extra file that we requested them to create and maintain.

If we're fine with this approach, I'll replicate it inside the default template.

Changelog:

[Android] [Added] - Provide defaults for TurboModuleManagerDelegate and JSIModulePackage

Reviewed By: cipolleschi

Differential Revision: D38701180

fbshipit-source-id: eec302c5789990700eb75353d97751358ca6799f
2022-08-16 07:55:40 -07:00
Nicola Corti f96d5931c0 Remove unnecessary configs from RNTester
Summary:
This is a nit cleanup of RNTester's build.gradle.

1. We should not create new configurations such as `hermesDebugImplementation` as those are automatically created by AGP.
2. We should not add imports of external .jar as we don't have them (and this generates a warning on console).

Changelog:
[Internal] [Changed] - Remove unnecessary configs from RNTester

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: cipolleschi

Differential Revision: D38737330

fbshipit-source-id: e23f234f68c839af065d4948af6c780186cbdf3d
2022-08-16 04:47:32 -07:00
fabriziobertoglio1987 9f4358142e accessibilityLabelledBy use DynamicFromObject to parse String to Dynamic (#34371)
Summary:
`accessibilityLabelledBy` accepts String or Array type.
- The JavaScript Array type corresponds to java [ReadableArray][3] ([HybridData][4])
- The JavaScript String type corresponds to the java String

Use [DynamicFromObject][5] to parse String to Dynamic.

e509f96baf/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java (L222-L228)

All credits to [grgr-dkrk][1] (PR https://github.com/facebook/react-native/pull/32470). fixes [https://github.com/facebook/react-native/issues/30846][2]

## Changelog

[Android] [Fixed] - accessibilityLabelledBy use DynamicFromObject to parse String to Dynamic

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

Test Plan:
<details><summary>testing accessibilityLabelledBy with TextInput</summary>
<p>

https://user-images.githubusercontent.com/24992535/183593138-7ced1974-6a06-4f0f-822a-1ade1edc7212.mp4

</p>
</details>

<details><summary>testing accessibilityLabelledBy with Switch</summary>
<p>

![Screen Shot 2022-08-09 at 15 53 37](https://user-images.githubusercontent.com/24992535/183596336-4b73186b-6d27-485e-a6ea-29a0f0b9ef50.png)

</p>
</details>

<details><summary>testing paper renderer after the fix</summary>
<p>

https://user-images.githubusercontent.com/24992535/183605619-01f1be64-788a-43bd-88b0-a7b2cad75148.mp4

</p>
</details>

[1]: https://github.com/grgr-dkrk
[2]: https://github.com/facebook/react-native/issues/30846
[3]: e509f96baf/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.java (L1)
[4]: https://github.com/facebookincubator/fbjni/blob/main/java/com/facebook/jni/HybridData.java
[5]: e509f96baf/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromObject.java (L74)

Reviewed By: lunaleaps

Differential Revision: D38706360

Pulled By: huntie

fbshipit-source-id: e4771552d3fddfad50f4d4cbbf971fe4a718e134
2022-08-16 04:26:20 -07:00
Luna Wei dfcd9faaad Add support for pointerover and pointerout
Summary: Changelog: [Internal] - Add pointerover, pointerout events

Reviewed By: vincentriemer

Differential Revision: D38559454

fbshipit-source-id: 829b9f2f22e1e41a64dcce80fcc79ab9e6352dcf
2022-08-15 12:51:58 -07:00
Nicola Corti 333ba5967e Remove unused flags `ENABLE_FABRIC` and `ENABLE_TURBOMODULE` inside RN Tester
Summary:
Those flags are always true and it doesn't really make sense to keep them around at this
moment as the Template setup relies on a single flag (newArchEnabled) and this adds
yet another discrepancy.

Changelog:
[Internal] [Changed] - Remove unused flags `ENABLE_FABRIC` and `ENABLE_TURBOMODULE` inside RN Tester

Reviewed By: cipolleschi

Differential Revision: D38701673

fbshipit-source-id: f7309e00b61fb56465ee0ec738d6cccc540ac1bf
2022-08-15 06:52:20 -07:00
Riccardo Cipolleschi 7cc2d1a249 Create RCTAppDelegate to simplify New Architecture Setup (#34384)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34384

This Diff aims to create a RCTAppDelegate library to offer a subclass which automates some operations required to set up the new architecture.

## Changelog
[iOS][Added] - Added the RCTAppDelegate library

Reviewed By: cortinico

Differential Revision: D38580424

fbshipit-source-id: 38f6c4b8ff2790a2ce9e23d385b36307701cffb7
2022-08-15 01:30:55 -07:00
Tim Yung b8425c8ee5 RN: Cleanup Existing ESLint Warnings
Summary:
Sometime over the past few months (and with changes such as migrating to the `hermes-eslint` parser), a bunch of lint warnings crept into the codebase.

This does a pass to clean them all up, ignore generated files, and refactor some code to be... better.

There should be no observable behavior changes as a result of this.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D38646643

fbshipit-source-id: a7b55d1e4cd5700340cc5c21f928baf3ea1d5a58
2022-08-12 17:16:40 -07:00
Tim Yung 459b25ce43 RN: Minor Flow Cleanup in `FlatList`
Summary:
Cleans up a few minor Flow suppression comments in `FlatList`. This reveals a new Flow error that is the result of `FlatList`'s props object being inexact whereas `VirtualizedList`'s props object is exact. For now, I introduce another -- but more specific -- Flow suppression for that type error.

The code changes should not have any consequential behavior change.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D38646228

fbshipit-source-id: f4f9b0ad95323157ff1519353b38e8486adc841d
2022-08-12 17:16:40 -07:00
Pieter De Baets 450fa4d1d3 Remove molly dep from react-native buck graph
Summary:
Folly's molly target combines a number of targets that are supposed to be useable on mobile. Since we're trying to move away from folly, we should instead list explicitly which parts of folly we're using so we can remove them over time, and track which targets no longer have any folly dependencies.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D38352060

fbshipit-source-id: 09d0d84793692f97f4d49390c99c38b23441df54
2022-08-11 04:53:34 -07:00
Vincent Riemer e532f861ec Fix ghost leave/out events firing due to view recycling
Summary:
Changelog: [iOS][Internal] - Fix ghost pointer leave/out events firing due to view recycling on iOS

While implementing the properties on the PointerEvent object on iOS I noticed that in certain specific scenarios I was seeing pointerLeave events being fired seemingly without corresponding pointerEvent events and even more strangely, when the pointer wasn't even close to the view in question.

After a lot of research I discovered that this was caused by an incompatibility between my strategy of keeping track/identifying views which are being hovered and RN's handling of creating/deleting views on iOS. See on iOS RN has the `RCTComponentViewRegistry` class which manages the creation & deletion of UIViews and adds an optimization of recycling views instead of outright deleting them.

This is causing issues with my tracking of which views are hovered because I compare the view's object references which, while accurate towards confirming equality of an underlying UIView — isn't accurate in confirming the equality of views from react's perspective.

This diff addresses this issue by adding a simple wrapper class that can be used around the UIViews which stores the view's react ID at initialization time ensuring it doesn't get updated even if the underlying view's react id is. As an additional precaution the wrapper class will also not return the view it's wrapping if their react tags do not match.

Reviewed By: lunaleaps

Differential Revision: D38546628

fbshipit-source-id: 8b732d52da0e61a5447001e8940e4439f49c6baf
2022-08-10 16:44:59 -07:00
fabriziobertoglio1987 62021eb8d1 adding importantForAccessibility for Text, Button, ImageBackground (#34245)
Summary:
Previously published by [grgr-dkrk][2] as [https://github.com/facebook/react-native/issues/31296][3], fixes the following issues:

1) ImportantForAccessibility="no" does not work on Text, Button
2) ImportantForAccessibility="no-hide-descendants" does not work on Text, Button, or ImageBackground.

Note: On ImageBackground, focus is prevented on the imageBackground node itself, but focus is not prevented on its descendants.

Note: [Button component expected behavior for prop importantForAccessibility][4]
>Some components like Button seem like atomic units, but they end up rendering a hierarchy of components for example a wrapper View with a Text inside them. Allowing those descendants to become focusable, breaks the model of these being a single component to consider and forcing no-hide-descendants makes sense here.

>The other option is always to render any descendants of these elements with importantForAccessibility="no", so they can never be focusable on their own. This would have the same result, **BUT may potentially cause issues when the descendant content is supposed to automatically get moved up to the focusable ancestor to act as a label** (which is what Talkback does with unfocusable text elements by default).

Note: [importantForAccessibility="no" does not allow screenreader focus on nested Text Components with accessibilityRole="link" or inline Images][5]

fixes https://github.com/facebook/react-native/issues/30850 related https://github.com/facebook/react-native/pull/33690

## Changelog

[Android] [Fixed] - adding importantForAccessibility for Text, Button, ImageBackground

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

Test Plan:
1) testing ImageBackground importantForAccessiblity ([link to test][1])
2) importantForAccessibility="no" does not allow screenreader focus on nested Text Components with accessibilityRole="link" or inline Images ([link to test][5])
3) testing ImageBackground importantForAccessiblity ([link to test][6])
4) Button with importantForAccessibility=no ([link to test][7])

[1]: https://github.com/facebook/react-native/pull/31296#issuecomment-1192341626 ""
[2]: https://github.com/grgr-dkrk "grgr-dkrk"
[3]: https://github.com/facebook/react-native/pull/31296 "https://github.com/facebook/react-native/issues/31296"
[4]: https://github.com/facebook/react-native/pull/31296#discussion_r616184584 "expected behaviour with prop importantForAccessibility in Button component"
[5]: https://github.com/facebook/react-native/issues/30850#issuecomment-1192286477 "importantForAccessibility=no does not allow screenreader focus on nested Text Components with accessibilityRole=link or inline Images"
[6]: https://github.com/facebook/react-native/pull/34245#issuecomment-1192446124 "testing ImageBackground importantForAccessiblity"
[7]: https://github.com/facebook/react-native/pull/34245#issuecomment-1192443589 "Button with importantForAccessibility=no"

Reviewed By: cipolleschi

Differential Revision: D38121992

Pulled By: dmitryrykun

fbshipit-source-id: 368b4dcb47d7940274820aa2e39ed5e2ca068821
2022-08-10 05:30:28 -07:00
Vincent Riemer 647542c6c8 Add a pointer event attributes test variant for no-hover pointers
Summary:
Changelog: [RNTester][Internal] - Add a pointer event attributes test variant for no-hover pointers

This adds a slightly different version of the existing PointerEventAttributesHoverablePointers test but for pointers that cannot hover (such as touches)

Reviewed By: lunaleaps

Differential Revision: D38401888

fbshipit-source-id: 4ed782cc2157dcaa8f6c294ae3589843d020bc92
2022-08-09 16:37:56 -07:00
Nick Gerleman 584b968683 Add "KeyboardExample" to RNTester
Summary:
This adds a simple debug UI to verify the keyboard events "keyboardDidShow" and "keyboardWillShow"

Changelog:
[Internal][Added] - Add "KeyboardExample" to RNTester

Reviewed By: cortinico

Differential Revision: D38500869

fbshipit-source-id: 99913a05849a7dd27dfdee2d622058b9c2604a7f
2022-08-08 19:45:51 -07:00
Samuel Susla 434adbdb00 React Native sync for revisions d300ceb...9e3b772
Summary:
Sync goes to v18.2 release.

I had to manually trigger CircleCI builds because TTL for build artefacts is 30 days.

This sync includes the following changes:
- **[060505e9d](https://github.com/facebook/react/commit/060505e9d )**: Fix misapplying prod error opt-out ([#24688](https://github.com/facebook/react/pull/24688)) //<Josh Story>//
- **[47944142f](https://github.com/facebook/react/commit/47944142f )**: `now` isn't part of the react-reconciler config anymore ([#24689](https://github.com/facebook/react/pull/24689)) //<Mathieu Dutour>//
- **[b34552352](https://github.com/facebook/react/commit/b34552352 )**: [Fizz] Support abort reasons ([#24680](https://github.com/facebook/react/pull/24680)) //<Josh Story>//
- **[79f54c16d](https://github.com/facebook/react/commit/79f54c16d )**: Bugfix: Revealing a hidden update ([#24685](https://github.com/facebook/react/pull/24685)) //<Andrew Clark>//
- **[7e8a020a4](https://github.com/facebook/react/commit/7e8a020a4 )**: Remove extra Server Context argument ([#24683](https://github.com/facebook/react/pull/24683)) //<Sebastian Markbåge>//
- **[4f29ba1cc](https://github.com/facebook/react/commit/4f29ba1cc )**: support errorInfo in onRecoverableError ([#24591](https://github.com/facebook/react/pull/24591)) //<Josh Story>//
- **[1cd90d2cc](https://github.com/facebook/react/commit/1cd90d2cc )**: Refactor of interleaved ("concurrent") update queue ([#24663](https://github.com/facebook/react/pull/24663)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions d300ceb...9e3b772

jest_e2e[run_all_tests]

Reviewed By: JoshuaGross

Differential Revision: D38496392

fbshipit-source-id: 3ecffc2b3354104562eb23a2643fe0a37a01a7e6
2022-08-08 16:44:55 -07:00
Alexander Eggers 7a911e0730 Bump Gradle to 7.5.1 (#34359)
Summary:
https://github.com/facebook/react-native/pull/34310 introduced Gradle 7.5.0, but I noticed that the Gradle team actually missed to remove the `Incubating` annotation for the Java 18 support. The latest 7.5.1 is fixing that. More details can be found here: https://github.com/gradle/gradle/releases/tag/v7.5.1

## Changelog

[Android] [Changed] - Bump Gradle to 7.5.1

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

Test Plan: Successfully build on a local project. I can share the actual branch if needed.

Reviewed By: cipolleschi

Differential Revision: D38497804

Pulled By: cortinico

fbshipit-source-id: 792b83707d5b6aaf7ef29531f82a1bc9224b3204
2022-08-08 04:03:59 -07:00
Genki Kondo 3f8071d638 Back out "TalkBack support for ScrollView accessibility announcements (list and grid) - Javascript Only Changes"
Summary:
Original commit changeset: 7ba4068405fd

Original Phabricator Diff: D37668064 (463af23753)

D37668064 (463af23753) caused issues in VR Store where on tail load, the scroll position would reset and go back to the top.

Changelog:
[Android][Removed] - Backing out "Accessibility announcement for list and grid in FlatList"

Reviewed By: mullender

Differential Revision: D38473805

fbshipit-source-id: f454c15ca0d31294a44f5fd3f6b73e658ca4f00d
2022-08-05 17:58:41 -07:00
JoseLion 7fcdb9d9d8 fix(android): Append `.exe` to hermesc binary path for Windows users (#34151)
Summary:
Resolves https://github.com/facebook/react-native/issues/34116.

In a nutshell, the problem was a missing `.exe` extension on the `hermesc` binary path when running on Windows OS. The missing extension causes the method `.exists()` of the File instance to always return false, so none of the conditions ever met and an error was thrown whenever a release build with Hermes enabled was run on Windows. More details can be found in the comments on the above issues.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Fixed] - Fix error of release builds with Hermes enabled for Windows users

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

Test Plan:
### Reproduce

Changes on Gradle scrips are better tested on an actual application. To reproduce the issue you can:
1. Create or reuse a React Native application with version `v0.69.1` on a Windows machine
2. Enable Hermes on Android following the steps on the [documentation](https://reactnative.dev/docs/hermes#enabling-hermes)
3. Clean the build folder: `cd android && ./gradlew clean`
4. Bundle the JS and assets for a release version: `./gradlew bundleReleaseJsAndAssets`
5. The build fails with the following error:
```shell
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> java.lang.Exception: Couldn't determine Hermesc location. Please set `project.ext.react.hermesCommand` to the path of the hermesc binary file. node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc
```

### Test the changes

Follow the same steps above using the fix on this PR and the error should disappear 🙂

Reviewed By: NickGerleman

Differential Revision: D37755468

Pulled By: cortinico

fbshipit-source-id: 2ad0ced583555b907259df116f64a45da6d153f3
2022-08-04 08:33:16 -07:00
Pieter Vanderwerff 0ccbe5f704 Add missing class annotations and lock xplat/js
Reviewed By: SamChou19815

Differential Revision: D38374141

fbshipit-source-id: 967291a5c1a29f39b7272726c8b41bc74d1be043
2022-08-03 17:45:53 -07:00
Pieter Vanderwerff c687dd3a77 Add missing class annotations xplat/js [android]
Reviewed By: SamChou19815

Differential Revision: D38375460

fbshipit-source-id: 265f36635c3bc672ee222b78a852034c1f865bcc
2022-08-03 17:18:33 -07:00
Pieter Vanderwerff 2e649006f1 Add missing class annotations xplat/js [suppressions]
Reviewed By: SamChou19815

Differential Revision: D38374117

fbshipit-source-id: 72a5c5f5ee989e0629660dd6e46868675bfb02b6
2022-08-03 12:43:58 -07:00
Pieter Vanderwerff ee3d3c248d Add missing class annotations xplat/js
Reviewed By: SamChou19815

Differential Revision: D38373443

fbshipit-source-id: 1222c4845ebd6b72bd6f54af1a27cf8542dd883a
2022-08-03 12:43:58 -07:00
fabriziobertoglio1987 463af23753 TalkBack support for ScrollView accessibility announcements (list and grid) - Javascript Only Changes (#33180)
Summary:
This is the Javascript-only changes from D34518929 (dd6325bafe), split out for push safety. Original summary and test plan below:

This issue fixes [30977][17] . The Pull Request was previously published by [intergalacticspacehighway][13] with [31666][19].
The solution consists of:
1. Adding Javascript logic in the [FlatList][14], SectionList, VirtualizedList components to provide accessibility information (row and column position) for each cell in the method [renderItem][20] as a fourth parameter [accessibilityCollectionItem][21]. The information is saved on the native side in the AccessibilityNodeInfo and announced by TalkBack when changing row, column, or page ([video example][12]). The prop accessibilityCollectionItem is available in the View component which wraps each FlatList cell.
2. Adding Java logic in [ReactScrollView.java][16] and HorizontalScrollView to announce pages with TalkBack when scrolling up/down. The missing AOSP logic in [ScrollView.java][10] (see also the [GridView][11] example) is responsible for announcing Page Scrolling with TalkBack.

Relevant Links:
x [Additional notes on this PR][18]
x [discussion on the additional container View around each FlatList cell][22]
x [commit adding prop getCellsInItemCount to VirtualizedList][23]

## Changelog

[Android] [Added] - Accessibility announcement for list and grid in FlatList

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

Test Plan:
[1]. TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer ([link][1])
[2]. TalkBack announces pages and cells with Vertical Flatlist in the Paper Renderer ([link][2])
[3]. `FlatList numColumns={undefined}` Should not trigger Runtime Error NoSuchKey exception columnCount when enabling TalkBack. ([link][3])
[4]. TalkBack announces pages and cells with Nested Horizontal Flatlist in the rn-tester app ([link][4])

[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050462465
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1032340879
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050618308
[10]:1ac46f932e/core/java/android/widget/AdapterView.java (L1027-L1029) "GridView.java method responsible for calling setFromIndex and setToIndex"
[11]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1042518901 "test case on Android GridView"
[12]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894 "TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer"
[13]:https://github.com/intergalacticspacehighway "github intergalacticspacehighway"
[14]:80acf523a4/Libraries/Lists/FlatList.js (L617-L636) "FlatList accessibilityCollectionItem"
[16]:5706bd7d3e/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java (L183-L184) "logic added to ReactScrollView.java"
[17]: https://github.com/facebook/react-native/issues/30977
[18]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6
[19]: https://github.com/facebook/react-native/pull/31666
[20]: https://reactnative.dev/docs/next/flatlist#required-renderitem "FlatList renderItem documentation"
[21]: 75147359c5 "commit that introduces fourth param accessibilityCollectionItem in callback renderItem"
[22]: https://github.com/facebook/react-native/pull/33180#discussion_r826748664 "discussion on the additional container View around each FlatList cell"
[23]: d50fd1a681 "commit adding prop getCellsInItemCount to VirtualizedList"

Reviewed By: lunaleaps

Differential Revision: D37668064

Pulled By: blavalla

fbshipit-source-id: 7ba4068405fdcb9823d0daed2d8c36f0a56dbf0f
2022-08-02 19:49:05 -07:00
Carmi Grushko 0538f45e45 Update ktfmt component on FBS:master
Reviewed By: strulovich

Differential Revision: D38301968

fbshipit-source-id: 24e2658a83de67ce98cfcf876fd0fd4271827c65
2022-08-02 00:25:12 -07:00
Nicola Corti 6f7612252b Introduce findPackageJsonFile to address issue with GenerateCodegenArtifactsTaskTest (#34321)
Summary:
While doing some testing with cipolleschi on React Native 0.70.0 we realized that custom Java Package is not properly propagated when invoking codegen for external libraries.

This PR fixes it.

## Changelog

[Internal] - Introduce findPackageJsonFile to address issue with GenerateCodegenArtifactsTaskTest

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

Test Plan: Added JUnit tests + Tested locally with cipolleschi

Reviewed By: cipolleschi

Differential Revision: D38314770

Pulled By: cortinico

fbshipit-source-id: ec2de1ba59ffc8fb0644f422521ced642b38d2c7
2022-08-01 08:25:25 -07:00
LeoTM 5c8186623a Bump Gradle to 7.5.0 (#34310)
Summary:
### Follow-up
- https://github.com/facebook/react-native/issues/34103
- https://github.com/facebook/react-native/pull/33823

#### Debug/Release further tested on RN 0.70.0-rc.0-1
- https://github.com/leotm/react-native-template-new-architecture/pull/775
- builds/runtime: locally on `macos-13` b2
- builds: in CI `ubuntu-20.04` latest (not yet beta `ubuntu-22.04`)

cc cortinico dulmandakh

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Android] [Changed] - Bump Gradle to 7.5.0

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

Test Plan: Everything builds and runs as expected.

Reviewed By: cipolleschi

Differential Revision: D38311861

Pulled By: cortinico

fbshipit-source-id: c4e9e7a9052a067ffabae87204d20190ef46b351
2022-08-01 06:31:18 -07:00
Nicola Corti 9797388847 Bump eslint-config-react-native-community (#34307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34307

There are unreleased changes on eslint-config-react-native-community, I'm bumping the version for this package so we can publish it.

Changelog:
[General] [Changed] - Bump eslint-config-react-native-community

Reviewed By: dmitryrykun

Differential Revision: D38279512

fbshipit-source-id: 46492f7e99d31c0a5917d41726ecc20fada1582f
2022-08-01 04:28:08 -07:00
Nicola Corti 086714b02b Improve package.json search mechanism for codegenConfig support (#34298)
Summary:
The `codegenConfig` unified configuration for New Architecture on Android relies on the Gradle plugin finding the package.json correctly. Currently we use the `root` folder to resolve the package.json. This works fine when invoking the codegen for the app module, but it doesn't work well when invoking the codegen for modules.

This extends the algo to make sure we first, look for a `package.json` in `..` and fallback to the one in the root if not found.

## Changelog

[Internal] - Improve package.json search mechanism for codegenConfig support

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

Test Plan: It's hard to write a unit test for this as it's inside a lambda, I'll look into doing this though. I've tested this on RNNewArchitectureApp and it works fine.

Reviewed By: cipolleschi

Differential Revision: D38249663

Pulled By: cortinico

fbshipit-source-id: 3cfd6a31e9f75d7b19b15f77bbd5131af42be9d3
2022-07-29 04:39:35 -07:00
Dmitry Rykun ee9c1a5260 Add postpack hook that undoes prepack
Summary: Changelog: [General][Changed] - `eslint-plugin-specs` package has prepack hook that changes `PACKAGE_USAGE` variable of `react-native-modules.js` to `true`. This changed file is can then be published to NPM, but should not be committed to the repo.  This diff adds postpack hook that reverts the change, so we do not have to do it manually.

Reviewed By: cipolleschi

Differential Revision: D38244367

fbshipit-source-id: 818dbdea82e7e4b89094b3e27ae2d63b9e736659
2022-07-29 03:56:23 -07:00
Nicola Corti 1a9fb6cb68 Make sure *.ts files are considered for task avoidance in the Gradle Plugin (#34296)
Summary:
I've realized that the gradle plugin is currently looking at `.js` files for task re-execution. This means that, while the *.ts would still be considered when the codegen is invoked, an edit on one of those file, won't retrigger the codegen on Android.

This change fixes it so that we consider both `*.ts` and `*.js` files.

## Changelog

[Android] [Fixed] - Make sure *.ts files are considered for task avoidance in the Gradle Plugin

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

Test Plan: Tests are attached.

Reviewed By: cipolleschi

Differential Revision: D38246125

Pulled By: cortinico

fbshipit-source-id: 80efcc9ef747c598ca040d65b25d270593c8aed2
2022-07-28 11:33:02 -07:00
Zihan Chen (MSFT) 0ce4ea2bf5 Ensure equivalent Flow and TypeScript turbo module definition generates the same output (#34251)
Summary:
Flow and TypeScript are two very similar programming languages. They are both recognizable as inputs for turbo module codegen. It is reasonable to require equivalent Flow and TypeScript turbo module definition generates the same output.

I add some test cases to ensure this. Glad that no functional inconsistency is found here.

## Changelog

[General] [Changed] - codegen: ensure equivalent Flow and TypeScript TM definition generates the same output

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

Test Plan: `yarn jest` passed in `packages/react-native-codegen`

Reviewed By: dmitryrykun

Differential Revision: D38116756

Pulled By: cipolleschi

fbshipit-source-id: 476adbd171a35813923f2020c826d21b1fc2eeed
2022-07-27 08:36:02 -07:00
Dmitry Rykun e44150409e Bump dependencies version number
Summary:
[Changelog][General] - Bump packages version number:
react-native/eslint-plugin-specs: ^0.71.0,
react-native-gradle-plugin: ^0.71.0,
react-native-codegen: ^0.71.0

Reviewed By: cortinico

Differential Revision: D38204441

fbshipit-source-id: 7188aae2decb307852e55a1b6b1180f3f068a75c
2022-07-27 08:19:11 -07:00
fabriziobertoglio1987 5ddb9977e6 Adding grid role to ViewAccessibility to fix flow errors. (#34267)
Summary:
Adding grid role to ViewAccessibility to fix flow errors.
fixes https://github.com/facebook/react-native/issues/30861 fixes https://github.com/facebook/react-native/issues/30972

## Changelog

[General] [Fixed] - Adding grid role to ViewAccessibility to fix flow errors.

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

Test Plan:
<details><summary>flow error for missing accessibilityRole type grid</summary>
<p>

<image src="https://user-images.githubusercontent.com/24992535/180728969-beccb7f7-d882-4a94-831d-1c08822fc030.png" width="800" />
</p>
</details>

<details><summary>adding grid role to ScrollView</summary>
<p>

https://user-images.githubusercontent.com/24992535/180721100-62de76af-ea23-44a6-816e-f6fa39835b77.mp4
</p>
</details>

<details><summary>adding grid role to FlatList</summary>
<p>

https://user-images.githubusercontent.com/24992535/180724852-861c2981-0b06-4c66-a983-0017785062fe.mp4
</p>
</details>

<details><summary>adding grid role to SectionList</summary>
<p>

https://user-images.githubusercontent.com/24992535/180788810-d1869381-1e6b-42aa-b9b2-a84aece41326.mp4
</p>
</details>

Reviewed By: NickGerleman

Differential Revision: D38121921

Pulled By: dmitryrykun

fbshipit-source-id: 3bc335b3a525e75ae2e032f6a35540b3e95cd6a8
2022-07-27 07:44:59 -07:00
Vincent Riemer 546c4b4c6c Add isPrimary property implementation to the PointerEvent object
Summary:
Changelog: [iOS][Internal] - Add isPrimary property implementation to the PointerEvent object

This diff adds the `isPrimary` property to the PointerEvent object iOS implementation. In addition this adds a related change where we "reserve" the 0 touch identifier for mouse events and the 1 identifier for apple pencil events. This is an easy way to ensure that these pointers are always consistent no matter what happens. Since mouse & pencil pointers should always be considered the primary pointer, that allows us to focus the more advanced primary pointer differentiation purely on touch events.

The logic for this touch event primary pointer differentiation is essentially setting the first touch it recieves as a primary pointer, setting it on touch registration, and sets all subsequent touchs (while the first touch is down) as not the primary pointers. When that primary pointer is lifted, the class property keeping track of the primary pointer is reset and then the **next** pointer (secondary pointers which had already started before the previous primary pointer was lifted are not "upgraded" to primary) is marked as primary. A new platform test is also included in this diff in order to verify the aforementioned behavior.

Reviewed By: lunaleaps

Differential Revision: D37961707

fbshipit-source-id: ae8b78c5bfea6902fb73094fca1552e4e648ea44
2022-07-26 11:41:48 -07:00
Lorenzo Sciandra 8441c4a6f7 fix npm lifecycle hook (#34273)
Summary:
In `0.70-stable` we started seeing `yarn run lint` fail; turns out, this is happening because the latest release of `react-native/eslint-plugin-specs` 0.0.4 (from ea8d8e2f49) is faulty: the underlying reason is that since 0.0.2 there was this local workaround in place 2d06e6a4c9 (that changes a flag from false to true) but in NPM 8 the lifecycle hook `prepublish` has [been deprecated](https://docs.npmjs.com/cli/v8/using-npm/scripts#life-cycle-scripts) so this pre publishing script to change the flag was not run (you can easily verify by checking the node_module and see `react-native-modules.js` the flag on L17 is set to false).

This PR addresses it by moving to the new lifecycle hook `prepack` (and modifies the other files accordingly).

After this PR is merged, we'll need to cherry pick it into 0.70 and do both a new release from the 0.70 branch and one from the main branch to have new versions of this module with the flag set correctly.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - Fix eslint-plugin-specs prepack npm lifecycle hook now that we use npm 8

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

Test Plan: Go in the `eslint-plugin-specs` folder, run `npm pack`, unzip the generated tar file, go into `package`, verify that L17 of `react-native-modules.js` is correctly changed to `const PACKAGE_USAGE = true;` (instead of false - which is what happen without this fix).

Reviewed By: GijsWeterings

Differential Revision: D38151433

Pulled By: dmitryrykun

fbshipit-source-id: 7c4f13dae70eb731d57cbafa90f7be05c9bb8576
2022-07-26 06:47:51 -07:00
Chatura Atapattu a70354df12 Apply lint updates from buildifier in xplat
Summary:
In D37873933, we update the buildifier binaries, which apply some minor changes to existing lint. Specifically, entries are now properly sorted.

Update the files in xplat such that updating buildifier does not cause lint changes in users diffs.

drop-conflicts
allow_many_files
#nocancel
#forcetdhashing

(Note: this ignores all push blocking failures!)

Reviewed By: d16r

Differential Revision: D37873936

fbshipit-source-id: f31d9c50d64ae99f99298977b471bf13e7ed5262
2022-07-24 13:46:21 -07:00
Michael Sokolnicki a67360b0f3 Remove MaskedViewIOS from react-native-github
Summary:
Remove MaskedViewIOS from react-native-github, update deprecation warnings, rebuild CocoaPods.

Changelog:
[General][Removed] - Remove MaskedViewIOS

Reviewed By: lunaleaps

Differential Revision: D37860775

fbshipit-source-id: 963b4b9891eecf5610cfad1e93ac8bf83f29f521
2022-07-22 17:07:26 -07:00
Robbie Coomber 000bbe8013 Add support for "preferred" AlertButton (#32538)
Summary:
Currently, with the Alert API on iOS, the only way to bold one of the buttons is by setting the style to "cancel". This has the side-effect of moving it to the left. The underlying UIKit API has a way of setting a "preferred" button, which does not have this negative side-effect, so this PR wires this up.

See preferredAction on UIAlertController https://developer.apple.com/documentation/uikit/uialertcontroller/

Docs PR: https://github.com/facebook/react-native-website/pull/2839

## Changelog

[iOS] [Added] - Support setting an Alert button as "preferred", to emphasize it without needing to set it as a "cancel" button.

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

Test Plan:
I ran the RNTesterPods app and added an example. It has a button styled with "preferred" and another with "cancel", to demonstrate that the "preferred" button takes emphasis over the "cancel" button.

![Simulator Screen Shot - iPhone 11 - 2021-11-04 at 09 48 35](https://user-images.githubusercontent.com/2056078/140292801-df880c43-c330-40df-b8e4-c1476c1645d6.png)

Luna:
* Also tested this on Catalyst
{F754959632}

Reviewed By: sammy-SC

Differential Revision: D34357811

Pulled By: lunaleaps

fbshipit-source-id: 3d860702c49cb219f950904ae0b9fabef03b5588
2022-07-22 15:41:32 -07:00
Tony Du 1e3cb91707 Allow multiline TextInputs be submittable without blurring (#33653)
Summary:
For multiline TextInputs, it's possible to send the submit event when pressing the return key only with `blurOnSubmit`. However, there's currently no way to do so without blurring the input and dismissing the keyboard. This problem is apparent when we want to use a TextInput to span multiple lines but still have it be submittable (but not blurrable), like one might want for a TODO list.

![multiline-momentary-blur](https://user-images.githubusercontent.com/22553678/163596940-aae779f5-4d2a-4425-8ed0-e4aa77b90699.gif)

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Added] - Add `returnKeyAction` prop to `TextInput` component
[General] [Deprecated] - Remove usages of `blurOnSubmit` in native code and convert `blurOnSubmit` to `returnKeyAction` in the JavaScript conversion layer

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

Test Plan:
Verified old usages of combinations of `blurOnSubmit` and `multiline` matched previous behavior and that the new `returnKeyAction` prop behaves as expected.

| Android | iOS |
| --- | -- |
| ![android-returnkeyaction-test](https://user-images.githubusercontent.com/22553678/163597864-2e306f98-7b6e-4ddf-8a35-625d397d3dce.gif) | ![ios-returnkeyaction-test](https://user-images.githubusercontent.com/22553678/163598407-9e059f74-3549-4b46-8e03-c19bfaa6dd3d.gif)  |

With the changes, the TODO list example from before now looks like this:

![multiline-no-momentary-blur](https://user-images.githubusercontent.com/22553678/163598810-f3a71d62-5514-486e-bf6a-79169fe86378.gif)

Reviewed By: yungsters

Differential Revision: D35735249

Pulled By: makovkastar

fbshipit-source-id: 1f2237a2a5e11dd141165d7568c91c9824bd6f25
2022-07-22 13:08:45 -07:00
Sam Zhou 087f142cb7 Release resolved-env
Summary: Changelog: [internal]

Reviewed By: bradzacher

Differential Revision: D38054157

fbshipit-source-id: 6f859e45623168e5b17b5303adb5955b74fc3641
2022-07-21 21:17:16 -07:00
Zihan Chen (MSFT) 33d1291e1a Support TypeScript array types for turbo module (component only) (#34216)
Summary:
Turbo module codegen for component parse `readonly T[]` and `readonly Object[][]` incorrectly. In this change, it is fixed, with necessary test cases added.

## Changelog

[General] [Added] - Support TypeScript array types for turbo module (component only)

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

Test Plan: `yarn jest` passed in `packages/react-native-codegen`

Reviewed By: sammy-SC

Differential Revision: D37953004

Pulled By: cipolleschi

fbshipit-source-id: b71ea35eb9c4bd5dc41130f1dcf9201704ec298e
2022-07-21 06:38:59 -07:00
Eric Edouard 8993ffc82e Added border curve style prop ("Squircle" effect - iOS only) (#33783)
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
NOTE: PR is based on https://github.com/facebook/react-native/pull/32017 which went stale for quite a long time but can now safely be closed

![](https://preview.redd.it/nuvl4746ys471.png?width=960&crop=smart&auto=webp&s=084a517a645364ac246b70b7fa8e0f2470cc7af3)

Since iOS 13+, it is possible to change the corner curve property on iOS in order to smoothen border radius and make it more "rounded" (also called "squircle")
Here's an [article](https://medium.com/arthurofbabylon/a-smooth-corner-radius-in-ios-54b80aa2d372) explaining in details what it is.
This property is also built in figma, but currently there is no way to implement this directly with react-native despite it being available natively on iOS.

Many open source react-native libraries were created in order to simulate this behaviour:
[react-native-super-ellipse-mask](https://github.com/everdrone/react-native-super-ellipse-mask)
[react-native-squircle-view](https://github.com/everdrone/react-native-squircle-view)
[react-native-figma-squircle](https://github.com/tienphaw/react-native-figma-squircle)

But they rely on creating an SVG shape with the smoothed corners and masking the view behind. This makes it not very performant (flickering on mounting was a common side-effect)

This PR aims at implementing the property natively.

PR for the docs update: https://github.com/facebook/react-native-website/pull/2785

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Added] - Added `borderCurve` style prop for smooth border radius (squircle effect)

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

Test Plan:
We used the RNTester app and added an example with `cornerCurve ` set to `'continuous'` (only on iOS).

As the difference is quite subtle, we also made some more tests to better illustrate the difference (these are not in the RN-tester app):

![IMG_0810](https://user-images.githubusercontent.com/19872411/133893536-26207c53-aade-4583-9eef-7a1739b6907b.PNG)

We overlapped two views with `position: absolute`, the one in the background has a red background and has `cornerRadius` set to `false`, and the one in the foreground is set to `true`. We can clearly see where the borders differs on the corners.

Reviewed By: sammy-SC

Differential Revision: D37883631

Pulled By: cipolleschi

fbshipit-source-id: 09f06de9628fa326323eba63875de30102c4a59e
2022-07-21 04:11:30 -07:00
Nick Gerleman 089c9a5c9c Fix `AttributedString` comparison logic for TextInput state updates
Summary:
D37801394 (51f49ca998) attempted to fix an issue of TextInput values being dropped when an uncontrolled component is restyled, and a defaultValue is present. I had missed quite a bit of functionality, where TextInput may have child Text elements, which the native side flattens into a single AttributedString. `lastNativeValue` includes a lossy version of the flattened string  produced from the child fragments, so sending it along with the children led to duplicating of the current input on each edit, and things blow up.

With some experimentation, I found that the text-loss behavior only happens on Fabric, and is triggered by a state update rather than my original assumption of the view manager command in the `useLayoutEffect` hook. `AndroidTextInputShadowNode` will compare the current and previous flattened strings, to intentionally allow the native value to drift from the React tree if the React tree hasn't changed. This `AttributedString` comparison includes layout metrics as of D20151505 (061f54e890) meaning a restyle may cause a state update, and clear the text.

I do not have full understanding of the flow of state updates to layout, or the underlying issue that led to the equality check including layout information (since TextMeasurementCache seems to explicitly compare LayoutMetrics). D18894538 (254ebab1d2) used a solution of sending a no-op state update to avoid updating text for placeholders, when the Attributed strings are equal (though as of now this code is never reached, since we return earlier on AttributedString equality). I co-opted this mechanism, to avoid sending text updates if the text content and attributes of the AttributedString has not changed, disregarding any layout information. This is how the comparison worked at the time of the diff.

I also updated the fragment hashing function to include layout metrics, since it was added to be part of the equality check, and is itself hashable.

Changelog:
[Android][Fixed] - Fix `AttributedString` comparison logic for TextInput state updates

Reviewed By: sammy-SC

Differential Revision: D37902643

fbshipit-source-id: c0f8e3112feb19bd0ee62b37bdadeb237a9f725e
2022-07-18 18:20:22 -07:00
Paige Sun 639daf8641 Minor: Rename AccessibilityInfo.sendAccessibilityEvent_unstable to sendAccessibilityEvent
Summary:
Changelog:
[Internal] Rename AccessibilityInfo.sendAccessibilityEvent_unstable to sendAccessibilityEvent

In Fabric, we want people to use `AccessibilityInfo.sendAccessibilityEvent` instead of `UIManager.sendAccessibilityEvent` for Android. The API is not unstable. There is a test in [AccessibilityExample.js](c940eb0c49/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js (L959)) in RNTester to confirm that it works.

A search for [`AccessibilityInfo.sendAccessibilityEvent_unstable` in Github](https://github.com/search?q=AccessibilityInfo.sendAccessibilityEvent_unstable&type=Code) shows that it's not being used yet, which makes sense because it's an Fabric API. Therefore it's safe to rename it.

Reviewed By: sammy-SC

Differential Revision: D37901006

fbshipit-source-id: 73f35b09ca8f9337f4d66a431f0a3f815da38249
2022-07-18 15:19:53 -07:00
Vincent Riemer 663dd9177e Add the ability for tests to be marked as 'skipped'
Summary:
Changelog: [RNTester][Internal] - Add the ability for platform tests to be marked as skipped

There are some properties/tests in the web platform tests that we don't want to especially priorities (especially if they aren't especially relevant to the specification and just legacy browser compat) so this adds the ability for us to mark these tests as skipped. This is so that we can ensure that our platform tests are "complete" while decreasing the noise and distraction from failing tests that don't really apply to RN.

Reviewed By: lunaleaps

Differential Revision: D37889470

fbshipit-source-id: 6516ac90c242d662518a95cb9ba8ce643f6bb09c
2022-07-18 14:12:25 -07:00
Brad Zacher f3db6cc527 update to ESLint v8
Summary:
Changelog: [internal]
- Upgrade ESLint version to the latest
- Upgrade ESLint plugin versions to the latest to ensure compatibility
- Switch from eslint-plugin-flowtype to eslint-plugin-ft-flow
- Updates lint suppressions - all `flowtype/` rules to `ft-flow/`

### `flowtype` vs `ft-flow`

`eslint-plugin-flowtype` is well out of date and no-longer maintained. It's been abandoned by its owner. This means it crashes on ESLint v8.
`eslint-plugin-ft-flow` is a fork of the above and is maintained by the same people that own the `flow-typed` project.

Reviewed By: jacdebug

Differential Revision: D37727177

fbshipit-source-id: 516be42f947fec9c886526c182a608b3311c0b50
2022-07-16 01:41:27 -07:00
Zihan Chen (MSFT) 9ecd203eec Accept TypeScript type T | null | undefined as a maybe type of T in turbo module (#34158)
Summary:
According Flow's document, a maybe type of T means `T | null | undefined`, instead of `T | null | void`.
I think keeping TypeScript and Flow being consistent to each other is better.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Changed] - Accept TypeScript type `T | null | undefined` as a maybe type of T in turbo module.

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

Test Plan: `yarn jest` passed in `packages/react-native-codegen`

Reviewed By: yungsters

Differential Revision: D37731169

Pulled By: philIip

fbshipit-source-id: b6d9b7e8991f60e12c1004bed5b937b34fb02c47
2022-07-15 20:38:16 -07:00
Dmitry Rykun ce4246a05c Bump react-native-codegen before 0.70 branch cut (#34195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34195

Bumping React Native Codegen to prepare for the release of React Native 0.70

Changelog:
[General] [Changed] - Bump react-native-codegen before 0.70 branch cut

Reviewed By: cortinico

Differential Revision: D37849972

fbshipit-source-id: 4c61baab937a7c44745b3597c575ca8b525e69bf
2022-07-15 02:41:48 -07:00
George Zahariev f392ba6725 Codemod `{...null}` to `{}` in xplat/js
Summary:
Now that [exact_empty_objects has been enabled](https://fb.workplace.com/groups/flowlang/posts/1092665251339137), we can codemod `{...null}` to `{}` - they are now equivalent.

1) Run my one-off jscodeshift codemod
2) `scripts/flow/tool update-suppressions .` (as some suppressions move around due to the change)

drop-conflicts

Reviewed By: bradzacher

Differential Revision: D37834078

fbshipit-source-id: 6bf4913910e5597e5dd9d5161cd35deece6a7581
2022-07-14 17:00:28 -07:00
Vincent Riemer 1e91445aaa Fix incorrect pointer event name in move test
Summary:
Changelog: [RNTester][Internal] - Fix incorrect pointer event name in move test

We recently removed the '2' suffix from certain pointer event names and I forgot to update this test.

Reviewed By: lunaleaps

Differential Revision: D37857862

fbshipit-source-id: 6f37dce139772cd16d663961dbcbbf68dde83101
2022-07-14 15:07:18 -07:00
Nicola Corti 8af7870c61 Update script from prepublish (deprecated) to prepack (#34198)
Summary:
Currently `react-native-codegen` uses `prepublish` to pre-build before publishing. Moving to `prepare` as `prepublish` is deprecated and not invoked anymore:
https://docs.npmjs.com/cli/v8/using-npm/scripts#life-cycle-scripts

## Changelog

[Internal][Fixed] - [codegen] Update script from prepublish (deprecated) to prepack

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

Test Plan:
Tested locally with:

```
cd packages/react-native-codegen/ && rm -rf lib && npm publish --dry-run --foreground-scripts
```

output is:

```

> react-native-codegen@0.70.1 prepare
> yarn run build

yarn run v1.22.18
$ yarn clean && node scripts/build.js --verbose
$ rm -rf lib
react-native-codegen...........................................................  • src/__tests__/__snapshots__/SchemaValidator-test.js.snap (ignore)
  • src/__tests__/SchemaValidator-test.js (ignore)
  • src/cli/combine/combine-js-to-schema-cli.js ⇒ lib/cli/combine/combine-js-to-schema-cli.js
  • src/cli/combine/combine-js-to-schema.js ⇒ lib/cli/combine/combine-js-to-schema.js
  • src/cli/generators/generate-all.js ⇒ lib/cli/generators/generate-all.js
  • src/cli/parser/parser-cli.js ⇒ lib/cli/parser/parser-cli.js
  • src/cli/parser/parser.js ⇒ lib/cli/parser/parser.js
  • src/cli/parser/parser.sh ⇒ lib/cli/parser/parser.sh (copy)
  • src/CodegenSchema.js ⇒ lib/CodegenSchema.js
  • src/generators/__test_fixtures__/fixtures.js ⇒ lib/generators/__test_fixtures__/fixtures.js
  • src/generators/__tests__/RNCodegen-test.js (ignore)
  • src/generators/components/__test_fixtures__/fixtures.js ⇒ lib/generators/components/__test_fixtures__/fixtures.js
  • src/generators/components/__tests__/__snapshots__/GenerateComponentDescriptorH-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateComponentHObjCpp-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateEventEmitterCpp-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateEventEmitterH-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GeneratePropsCpp-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GeneratePropsH-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GeneratePropsJavaDelegate-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GeneratePropsJavaInterface-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GeneratePropsJavaPojo-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateShadowNodeCpp-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateShadowNodeH-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateTests-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderH-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateThirdPartyFabricComponentsProviderObjCpp-test.js.snap (ignore)
  • src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap (ignore)
  • src/generators/components/__tests__/GenerateComponentDescriptorH-test.js (ignore)
  • src/generators/components/__tests__/GenerateComponentHObjCpp-test.js (ignore)
  • src/generators/components/__tests__/GenerateEventEmitterCpp-test.js (ignore)
  • src/generators/components/__tests__/GenerateEventEmitterH-test.js (ignore)
  • src/generators/components/__tests__/GeneratePropsCpp-test.js (ignore)
  • src/generators/components/__tests__/GeneratePropsH-test.js (ignore)
  • src/generators/components/__tests__/GeneratePropsJavaDelegate-test.js (ignore)
  • src/generators/components/__tests__/GeneratePropsJavaInterface-test.js (ignore)
  • src/generators/components/__tests__/GeneratePropsJavaPojo-test.js (ignore)
  • src/generators/components/__tests__/GenerateShadowNodeCpp-test.js (ignore)
  • src/generators/components/__tests__/GenerateShadowNodeH-test.js (ignore)
  • src/generators/components/__tests__/GenerateTests-test.js (ignore)
  • src/generators/components/__tests__/GenerateThirdPartyFabricComponentsProviderH-test.js (ignore)
  • src/generators/components/__tests__/GenerateThirdPartyFabricComponentsProviderObjCpp-test.js (ignore)
  • src/generators/components/__tests__/GenerateViewConfigJs-test.js (ignore)
  • src/generators/components/CppHelpers.js ⇒ lib/generators/components/CppHelpers.js
  • src/generators/components/GenerateComponentDescriptorH.js ⇒ lib/generators/components/GenerateComponentDescriptorH.js
  • src/generators/components/GenerateComponentHObjCpp.js ⇒ lib/generators/components/GenerateComponentHObjCpp.js
  • src/generators/components/GenerateEventEmitterCpp.js ⇒ lib/generators/components/GenerateEventEmitterCpp.js
  • src/generators/components/GenerateEventEmitterH.js ⇒ lib/generators/components/GenerateEventEmitterH.js
  • src/generators/components/GeneratePropsCpp.js ⇒ lib/generators/components/GeneratePropsCpp.js
  • src/generators/components/GeneratePropsH.js ⇒ lib/generators/components/GeneratePropsH.js
  • src/generators/components/GeneratePropsJavaDelegate.js ⇒ lib/generators/components/GeneratePropsJavaDelegate.js
  • src/generators/components/GeneratePropsJavaInterface.js ⇒ lib/generators/components/GeneratePropsJavaInterface.js
  • src/generators/components/GeneratePropsJavaPojo/index.js ⇒ lib/generators/components/GeneratePropsJavaPojo/index.js
  • src/generators/components/GeneratePropsJavaPojo/PojoCollector.js ⇒ lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js
  • src/generators/components/GeneratePropsJavaPojo/serializePojo.js ⇒ lib/generators/components/GeneratePropsJavaPojo/serializePojo.js
  • src/generators/components/GenerateShadowNodeCpp.js ⇒ lib/generators/components/GenerateShadowNodeCpp.js
  • src/generators/components/GenerateShadowNodeH.js ⇒ lib/generators/components/GenerateShadowNodeH.js
  • src/generators/components/GenerateTests.js ⇒ lib/generators/components/GenerateTests.js
  • src/generators/components/GenerateThirdPartyFabricComponentsProviderH.js ⇒ lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js
  • src/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js ⇒ lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js
  • src/generators/components/GenerateViewConfigJs.js ⇒ lib/generators/components/GenerateViewConfigJs.js
  • src/generators/components/JavaHelpers.js ⇒ lib/generators/components/JavaHelpers.js
  • src/generators/modules/__test_fixtures__/fixtures.js ⇒ lib/generators/modules/__test_fixtures__/fixtures.js
  • src/generators/modules/__tests__/__snapshots__/GenerateModuleCpp-test.js.snap (ignore)
  • src/generators/modules/__tests__/__snapshots__/GenerateModuleH-test.js.snap (ignore)
  • src/generators/modules/__tests__/__snapshots__/GenerateModuleHObjCpp-test.js.snap (ignore)
  • src/generators/modules/__tests__/__snapshots__/GenerateModuleJavaSpec-test.js.snap (ignore)
  • src/generators/modules/__tests__/__snapshots__/GenerateModuleJniCpp-test.js.snap (ignore)
  • src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap (ignore)
  • src/generators/modules/__tests__/__snapshots__/GenerateModuleMm-test.js.snap (ignore)
  • src/generators/modules/__tests__/GenerateModuleCpp-test.js (ignore)
  • src/generators/modules/__tests__/GenerateModuleH-test.js (ignore)
  • src/generators/modules/__tests__/GenerateModuleHObjCpp-test.js (ignore)
  • src/generators/modules/__tests__/GenerateModuleJavaSpec-test.js (ignore)
  • src/generators/modules/__tests__/GenerateModuleJniCpp-test.js (ignore)
  • src/generators/modules/__tests__/GenerateModuleJniH-test.js (ignore)
  • src/generators/modules/__tests__/GenerateModuleMm-test.js (ignore)
  • src/generators/modules/GenerateModuleCpp.js ⇒ lib/generators/modules/GenerateModuleCpp.js
  • src/generators/modules/GenerateModuleH.js ⇒ lib/generators/modules/GenerateModuleH.js
  • src/generators/modules/GenerateModuleJavaSpec.js ⇒ lib/generators/modules/GenerateModuleJavaSpec.js
  • src/generators/modules/GenerateModuleJniCpp.js ⇒ lib/generators/modules/GenerateModuleJniCpp.js
  • src/generators/modules/GenerateModuleJniH.js ⇒ lib/generators/modules/GenerateModuleJniH.js
  • src/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js ⇒ lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js
  • src/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js ⇒ lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js
  • src/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js ⇒ lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js
  • src/generators/modules/GenerateModuleObjCpp/index.js ⇒ lib/generators/modules/GenerateModuleObjCpp/index.js
  • src/generators/modules/GenerateModuleObjCpp/serializeMethod.js ⇒ lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js
  • src/generators/modules/GenerateModuleObjCpp/source/serializeModule.js ⇒ lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js
  • src/generators/modules/GenerateModuleObjCpp/StructCollector.js ⇒ lib/generators/modules/GenerateModuleObjCpp/StructCollector.js
  • src/generators/modules/GenerateModuleObjCpp/Utils.js ⇒ lib/generators/modules/GenerateModuleObjCpp/Utils.js
  • src/generators/modules/Utils.js ⇒ lib/generators/modules/Utils.js
  • src/generators/RNCodegen.js ⇒ lib/generators/RNCodegen.js
  • src/generators/Utils.js ⇒ lib/generators/Utils.js
  • src/parsers/flow/components/__test_fixtures__/failures.js ⇒ lib/parsers/flow/components/__test_fixtures__/failures.js
  • src/parsers/flow/components/__test_fixtures__/fixtures.js ⇒ lib/parsers/flow/components/__test_fixtures__/fixtures.js
  • src/parsers/flow/components/__tests__/__snapshots__/component-parser-test.js.snap (ignore)
  • src/parsers/flow/components/__tests__/component-parser-test.js (ignore)
  • src/parsers/flow/components/commands.js ⇒ lib/parsers/flow/components/commands.js
  • src/parsers/flow/components/events.js ⇒ lib/parsers/flow/components/events.js
  • src/parsers/flow/components/extends.js ⇒ lib/parsers/flow/components/extends.js
  • src/parsers/flow/components/index.js ⇒ lib/parsers/flow/components/index.js
  • src/parsers/flow/components/options.js ⇒ lib/parsers/flow/components/options.js
  • src/parsers/flow/components/props.js ⇒ lib/parsers/flow/components/props.js
  • src/parsers/flow/components/schema.js ⇒ lib/parsers/flow/components/schema.js
  • src/parsers/flow/errors.js ⇒ lib/parsers/flow/errors.js
  • src/parsers/flow/index.js ⇒ lib/parsers/flow/index.js
  • src/parsers/flow/modules/__test_fixtures__/failures.js ⇒ lib/parsers/flow/modules/__test_fixtures__/failures.js
  • src/parsers/flow/modules/__test_fixtures__/fixtures.js ⇒ lib/parsers/flow/modules/__test_fixtures__/fixtures.js
  • src/parsers/flow/modules/__tests__/__snapshots__/module-parser-snapshot-test.js.snap (ignore)
  • src/parsers/flow/modules/__tests__/module-parser-e2e-test.js (ignore)
  • src/parsers/flow/modules/__tests__/module-parser-snapshot-test.js (ignore)
  • src/parsers/flow/modules/errors.js ⇒ lib/parsers/flow/modules/errors.js
  • src/parsers/flow/modules/index.js ⇒ lib/parsers/flow/modules/index.js
  • src/parsers/flow/modules/schema.js ⇒ lib/parsers/flow/modules/schema.js
  • src/parsers/flow/modules/utils.js ⇒ lib/parsers/flow/modules/utils.js
  • src/parsers/flow/utils.js ⇒ lib/parsers/flow/utils.js
  • src/parsers/schema/index.js ⇒ lib/parsers/schema/index.js
  • src/parsers/typescript/components/__test_fixtures__/failures.js ⇒ lib/parsers/typescript/components/__test_fixtures__/failures.js
  • src/parsers/typescript/components/__test_fixtures__/fixtures.js ⇒ lib/parsers/typescript/components/__test_fixtures__/fixtures.js
  • src/parsers/typescript/components/__tests__/__snapshots__/typescript-component-parser-test.js.snap (ignore)
  • src/parsers/typescript/components/__tests__/typescript-component-parser-test.js (ignore)
  • src/parsers/typescript/components/commands.js ⇒ lib/parsers/typescript/components/commands.js
  • src/parsers/typescript/components/events.js ⇒ lib/parsers/typescript/components/events.js
  • src/parsers/typescript/components/extends.js ⇒ lib/parsers/typescript/components/extends.js
  • src/parsers/typescript/components/index.js ⇒ lib/parsers/typescript/components/index.js
  • src/parsers/typescript/components/options.js ⇒ lib/parsers/typescript/components/options.js
  • src/parsers/typescript/components/props.js ⇒ lib/parsers/typescript/components/props.js
  • src/parsers/typescript/components/schema.js ⇒ lib/parsers/typescript/components/schema.js
  • src/parsers/typescript/errors.js ⇒ lib/parsers/typescript/errors.js
  • src/parsers/typescript/index.js ⇒ lib/parsers/typescript/index.js
  • src/parsers/typescript/modules/__test_fixtures__/failures.js ⇒ lib/parsers/typescript/modules/__test_fixtures__/failures.js
  • src/parsers/typescript/modules/__test_fixtures__/fixtures.js ⇒ lib/parsers/typescript/modules/__test_fixtures__/fixtures.js
  • src/parsers/typescript/modules/__tests__/__snapshots__/typescript-module-parser-snapshot-test.js.snap (ignore)
  • src/parsers/typescript/modules/__tests__/typescript-module-parser-e2e-test.js (ignore)
  • src/parsers/typescript/modules/__tests__/typescript-module-parser-snapshot-test.js (ignore)
  • src/parsers/typescript/modules/errors.js ⇒ lib/parsers/typescript/modules/errors.js
  • src/parsers/typescript/modules/index.js ⇒ lib/parsers/typescript/modules/index.js
  • src/parsers/typescript/modules/schema.js ⇒ lib/parsers/typescript/modules/schema.js
  • src/parsers/typescript/modules/utils.js ⇒ lib/parsers/typescript/modules/utils.js
  • src/parsers/typescript/utils.js ⇒ lib/parsers/typescript/utils.js
  • src/SchemaValidator.js ⇒ lib/SchemaValidator.js
[  OK  ]
  Done in 2.27s.
npm notice
npm notice 📦  react-native-codegen@0.70.1
npm notice === Tarball Contents ===
npm notice 383B   README.md
npm notice 3.2kB  lib/cli/combine/combine-js-to-schema-cli.js
npm notice 1.8kB  lib/cli/combine/combine-js-to-schema-cli.js.flow
npm notice 2.5kB  lib/cli/combine/combine-js-to-schema.js
npm notice 1.3kB  lib/cli/combine/combine-js-to-schema.js.flow
npm notice 1.5kB  lib/cli/generators/generate-all.js
npm notice 1.4kB  lib/cli/generators/generate-all.js.flow
npm notice 1.7kB  lib/cli/parser/parser-cli.js
npm notice 386B   lib/cli/parser/parser-cli.js.flow
npm notice 777B   lib/cli/parser/parser.js
npm notice 811B   lib/cli/parser/parser.js.flow
npm notice 483B   lib/cli/parser/parser.sh
npm notice 222B   lib/CodegenSchema.js
npm notice 8.8kB  lib/CodegenSchema.js.flow
npm notice 1.8kB  lib/generators/__test_fixtures__/fixtures.js
npm notice 1.9kB  lib/generators/__test_fixtures__/fixtures.js.flow
npm notice 43.6kB lib/generators/components/__test_fixtures__/fixtures.js
npm notice 44.0kB lib/generators/components/__test_fixtures__/fixtures.js.flow
npm notice 5.7kB  lib/generators/components/CppHelpers.js
npm notice 6.4kB  lib/generators/components/CppHelpers.js.flow
npm notice 2.0kB  lib/generators/components/GenerateComponentDescriptorH.js
npm notice 2.3kB  lib/generators/components/GenerateComponentDescriptorH.js.flow
npm notice 9.3kB  lib/generators/components/GenerateComponentHObjCpp.js
npm notice 10.3kB lib/generators/components/GenerateComponentHObjCpp.js.flow
npm notice 6.3kB  lib/generators/components/GenerateEventEmitterCpp.js
npm notice 7.2kB  lib/generators/components/GenerateEventEmitterCpp.js.flow
npm notice 6.5kB  lib/generators/components/GenerateEventEmitterH.js
npm notice 7.4kB  lib/generators/components/GenerateEventEmitterH.js.flow
npm notice 4.0kB  lib/generators/components/GeneratePropsCpp.js
npm notice 4.3kB  lib/generators/components/GeneratePropsCpp.js.flow
npm notice 23.4kB lib/generators/components/GeneratePropsH.js
npm notice 26.1kB lib/generators/components/GeneratePropsH.js.flow
npm notice 9.4kB  lib/generators/components/GeneratePropsJavaDelegate.js
npm notice 10.0kB lib/generators/components/GeneratePropsJavaDelegate.js.flow
npm notice 7.1kB  lib/generators/components/GeneratePropsJavaInterface.js
npm notice 7.8kB  lib/generators/components/GeneratePropsJavaInterface.js.flow
npm notice 2.0kB  lib/generators/components/GeneratePropsJavaPojo/index.js
npm notice 2.1kB  lib/generators/components/GeneratePropsJavaPojo/index.js.flow
npm notice 4.0kB  lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js
npm notice 4.7kB  lib/generators/components/GeneratePropsJavaPojo/PojoCollector.js.flow
npm notice 7.2kB  lib/generators/components/GeneratePropsJavaPojo/serializePojo.js
npm notice 7.5kB  lib/generators/components/GeneratePropsJavaPojo/serializePojo.js.flow
npm notice 2.0kB  lib/generators/components/GenerateShadowNodeCpp.js
npm notice 2.2kB  lib/generators/components/GenerateShadowNodeCpp.js.flow
npm notice 2.8kB  lib/generators/components/GenerateShadowNodeH.js
npm notice 3.1kB  lib/generators/components/GenerateShadowNodeH.js.flow
npm notice 5.3kB  lib/generators/components/GenerateTests.js
npm notice 5.9kB  lib/generators/components/GenerateTests.js.flow
npm notice 2.5kB  lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js
npm notice 2.7kB  lib/generators/components/GenerateThirdPartyFabricComponentsProviderH.js.flow
npm notice 2.6kB  lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js
npm notice 2.8kB  lib/generators/components/GenerateThirdPartyFabricComponentsProviderObjCpp.js.flow
npm notice 13.4kB lib/generators/components/GenerateViewConfigJs.js
npm notice 14.0kB lib/generators/components/GenerateViewConfigJs.js.flow
npm notice 2.7kB  lib/generators/components/JavaHelpers.js
npm notice 3.2kB  lib/generators/components/JavaHelpers.js.flow
npm notice 47.0kB lib/generators/modules/__test_fixtures__/fixtures.js
npm notice 47.2kB lib/generators/modules/__test_fixtures__/fixtures.js.flow
npm notice 8.4kB  lib/generators/modules/GenerateModuleCpp.js
npm notice 7.3kB  lib/generators/modules/GenerateModuleCpp.js.flow
npm notice 8.5kB  lib/generators/modules/GenerateModuleH.js
npm notice 7.0kB  lib/generators/modules/GenerateModuleH.js.flow
npm notice 16.8kB lib/generators/modules/GenerateModuleJavaSpec.js
npm notice 15.6kB lib/generators/modules/GenerateModuleJavaSpec.js.flow
npm notice 14.9kB lib/generators/modules/GenerateModuleJniCpp.js
npm notice 13.9kB lib/generators/modules/GenerateModuleJniCpp.js.flow
npm notice 4.7kB  lib/generators/modules/GenerateModuleJniH.js
npm notice 4.9kB  lib/generators/modules/GenerateModuleJniH.js.flow
npm notice 9.5kB  lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js
npm notice 7.9kB  lib/generators/modules/GenerateModuleObjCpp/header/serializeConstantsStruct.js.flow
npm notice 9.1kB  lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js
npm notice 7.6kB  lib/generators/modules/GenerateModuleObjCpp/header/serializeRegularStruct.js.flow
npm notice 720B   lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js
npm notice 836B   lib/generators/modules/GenerateModuleObjCpp/header/serializeStruct.js.flow
npm notice 6.4kB  lib/generators/modules/GenerateModuleObjCpp/index.js
npm notice 6.6kB  lib/generators/modules/GenerateModuleObjCpp/index.js.flow
npm notice 14.6kB lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js
npm notice 13.1kB lib/generators/modules/GenerateModuleObjCpp/serializeMethod.js.flow
npm notice 2.9kB  lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js
npm notice 3.6kB  lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow
npm notice 6.8kB  lib/generators/modules/GenerateModuleObjCpp/StructCollector.js
npm notice 5.4kB  lib/generators/modules/GenerateModuleObjCpp/StructCollector.js.flow
npm notice 549B   lib/generators/modules/GenerateModuleObjCpp/Utils.js
npm notice 673B   lib/generators/modules/GenerateModuleObjCpp/Utils.js.flow
npm notice 848B   lib/generators/modules/Utils.js
npm notice 1.3kB  lib/generators/modules/Utils.js.flow
npm notice 7.1kB  lib/generators/RNCodegen.js
npm notice 8.4kB  lib/generators/RNCodegen.js.flow
npm notice 647B   lib/generators/Utils.js
npm notice 700B   lib/generators/Utils.js.flow
npm notice 14.1kB lib/parsers/flow/components/__test_fixtures__/failures.js
npm notice 14.1kB lib/parsers/flow/components/__test_fixtures__/failures.js.flow
npm notice 27.8kB lib/parsers/flow/components/__test_fixtures__/fixtures.js
npm notice 27.9kB lib/parsers/flow/components/__test_fixtures__/fixtures.js.flow
npm notice 2.6kB  lib/parsers/flow/components/commands.js
npm notice 2.9kB  lib/parsers/flow/components/commands.js.flow
npm notice 6.2kB  lib/parsers/flow/components/events.js
npm notice 6.6kB  lib/parsers/flow/components/events.js.flow
npm notice 1.2kB  lib/parsers/flow/components/extends.js
npm notice 1.6kB  lib/parsers/flow/components/extends.js.flow
npm notice 8.1kB  lib/parsers/flow/components/index.js
npm notice 6.5kB  lib/parsers/flow/components/index.js.flow
npm notice 1.8kB  lib/parsers/flow/components/options.js
npm notice 2.1kB  lib/parsers/flow/components/options.js.flow
npm notice 13.1kB lib/parsers/flow/components/props.js
npm notice 13.8kB lib/parsers/flow/components/props.js.flow
npm notice 2.1kB  lib/parsers/flow/components/schema.js
npm notice 1.3kB  lib/parsers/flow/components/schema.js.flow
npm notice 738B   lib/parsers/flow/errors.js
npm notice 849B   lib/parsers/flow/errors.js.flow
npm notice 5.7kB  lib/parsers/flow/index.js
npm notice 3.7kB  lib/parsers/flow/index.js.flow
npm notice 5.3kB  lib/parsers/flow/modules/__test_fixtures__/failures.js
npm notice 5.4kB  lib/parsers/flow/modules/__test_fixtures__/failures.js.flow
npm notice 15.4kB lib/parsers/flow/modules/__test_fixtures__/fixtures.js
npm notice 15.4kB lib/parsers/flow/modules/__test_fixtures__/fixtures.js.flow
npm notice 8.6kB  lib/parsers/flow/modules/errors.js
npm notice 9.5kB  lib/parsers/flow/modules/errors.js.flow
npm notice 25.7kB lib/parsers/flow/modules/index.js
npm notice 21.8kB lib/parsers/flow/modules/index.js.flow
npm notice 416B   lib/parsers/flow/modules/schema.js
npm notice 557B   lib/parsers/flow/modules/schema.js.flow
npm notice 595B   lib/parsers/flow/modules/utils.js
npm notice 830B   lib/parsers/flow/modules/utils.js.flow
npm notice 4.4kB  lib/parsers/flow/utils.js
npm notice 5.1kB  lib/parsers/flow/utils.js.flow
npm notice 428B   lib/parsers/schema/index.js
npm notice 526B   lib/parsers/schema/index.js.flow
npm notice 12.9kB lib/parsers/typescript/components/__test_fixtures__/failures.js
npm notice 13.0kB lib/parsers/typescript/components/__test_fixtures__/failures.js.flow
npm notice 28.1kB lib/parsers/typescript/components/__test_fixtures__/fixtures.js
npm notice 28.1kB lib/parsers/typescript/components/__test_fixtures__/fixtures.js.flow
npm notice 3.1kB  lib/parsers/typescript/components/commands.js
npm notice 3.0kB  lib/parsers/typescript/components/commands.js.flow
npm notice 7.0kB  lib/parsers/typescript/components/events.js
npm notice 7.4kB  lib/parsers/typescript/components/events.js.flow
npm notice 1.3kB  lib/parsers/typescript/components/extends.js
npm notice 1.6kB  lib/parsers/typescript/components/extends.js.flow
npm notice 8.2kB  lib/parsers/typescript/components/index.js
npm notice 6.6kB  lib/parsers/typescript/components/index.js.flow
npm notice 1.8kB  lib/parsers/typescript/components/options.js
npm notice 2.1kB  lib/parsers/typescript/components/options.js.flow
npm notice 19.4kB lib/parsers/typescript/components/props.js
npm notice 18.0kB lib/parsers/typescript/components/props.js.flow
npm notice 2.1kB  lib/parsers/typescript/components/schema.js
npm notice 1.3kB  lib/parsers/typescript/components/schema.js.flow
npm notice 738B   lib/parsers/typescript/errors.js
npm notice 849B   lib/parsers/typescript/errors.js.flow
npm notice 5.8kB  lib/parsers/typescript/index.js
npm notice 3.9kB  lib/parsers/typescript/index.js.flow
npm notice 4.7kB  lib/parsers/typescript/modules/__test_fixtures__/failures.js
npm notice 4.7kB  lib/parsers/typescript/modules/__test_fixtures__/failures.js.flow
npm notice 18.8kB lib/parsers/typescript/modules/__test_fixtures__/fixtures.js
npm notice 18.8kB lib/parsers/typescript/modules/__test_fixtures__/fixtures.js.flow
npm notice 8.6kB  lib/parsers/typescript/modules/errors.js
npm notice 9.5kB  lib/parsers/typescript/modules/errors.js.flow
npm notice 26.8kB lib/parsers/typescript/modules/index.js
npm notice 22.9kB lib/parsers/typescript/modules/index.js.flow
npm notice 416B   lib/parsers/typescript/modules/schema.js
npm notice 557B   lib/parsers/typescript/modules/schema.js.flow
npm notice 595B   lib/parsers/typescript/modules/utils.js
npm notice 830B   lib/parsers/typescript/modules/utils.js.flow
npm notice 4.6kB  lib/parsers/typescript/utils.js
npm notice 5.3kB  lib/parsers/typescript/utils.js.flow
npm notice 1.4kB  lib/SchemaValidator.js
npm notice 1.6kB  lib/SchemaValidator.js.flow
npm notice 1.4kB  package.json
npm notice === Tarball Details ===
npm notice name:          react-native-codegen
npm notice version:       0.70.1
npm notice filename:      react-native-codegen-0.70.1.tgz
npm notice package size:  168.4 kB
npm notice unpacked size: 1.3 MB
npm notice shasum:        10bf591db802342bd5ac38352821ad6452ba4b52
npm notice integrity:     sha512-KXRXARscSO4mt[...]WCnuO5sLFEYQg==
npm notice total files:   167
npm notice
+ react-native-codegen@0.70.1
```

Reviewed By: dmitryrykun

Differential Revision: D37851965

Pulled By: cortinico

fbshipit-source-id: 4d8c80831691e5f671c234bc3a1678ccb7435ff4
2022-07-14 10:26:17 -07:00
Zihan Chen (MSFT) f0c4c291e1 Support TypeScript array types for turbo module (module only) (#34183)
Summary:
Turbo module codegen supports arrays in both Flow and TypeScript, but it only recognize `Array<T>` and `ReadonlyArray<T>` in TypeScript.

In this change, `T[]` and `readonly T[]` are made recognizable in codegen.

## Changelog

[General] [Added] - Support TypeScript array types for turbo module (module only)

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

Test Plan: `yarn jest` passed in `packages/react-native-codegen`

Reviewed By: lunaleaps

Differential Revision: D37812638

Pulled By: cipolleschi

fbshipit-source-id: d63b0585497a43c274d50e1877baab5d1cc3f8fa
2022-07-13 15:46:44 -07:00
Luna Wei 89f090016d Add a pointermove with AnimatedEvent example
Summary: Changelog: [Internal] - Add an example of pointermove using AnimatedEvent

Reviewed By: vincentriemer

Differential Revision: D37769263

fbshipit-source-id: 25de0ae88b55148d23fa388768707ea859e9ae4d
2022-07-13 15:45:45 -07:00
Luna Wei 4f522be373 - Add offsetX, offsetY values
Summary: Changelog: [Internal] Provide Android backing for offsetX, offsetY values.

Reviewed By: javache

Differential Revision: D37734498

fbshipit-source-id: f0f6daea3a2da27c79d42b9546eafa757ec448e7
2022-07-13 15:45:45 -07:00
Nicola Corti 080a5921e1 Bump dependencies before 0.70 branch cut (#34185)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34185

Bumping React Native Codegen & Gradle plugin to prepare for
the release of React Native 0.70

Changelog:
[General] [Changed] - Bump dependencies before 0.70 branch cut

Reviewed By: dmitryrykun

Differential Revision: D37818496

fbshipit-source-id: 12b3f1af29d314c9acf270ca4dfb4c007a400076
2022-07-13 08:50:33 -07:00
Vincent Riemer fd2e1d1f16 Fix layout measurement in hoverable pointer attributes test
Summary:
Changelog: [RNTester][Internal] - Fix layout measurement in hoverable pointer attributes test

This diff addresses an issue I've found with the hoverable pointer attributes test where before it was measuring the view seemingly on mount and it appears that for *some reason* that would be incorrect on the first mount of the view. This diff ensures that doesn't happen by measuring the view JIT when an event is recieved instead.

Reviewed By: lunaleaps

Differential Revision: D37765614

fbshipit-source-id: 8594677d98be8d3d4e75dbf5394c92ca49355d6d
2022-07-12 18:10:27 -07:00
Nick Gerleman d82cd3cbce Add Nested Text Animated Color RNTester Example
Summary:
This change replaces the text in `ColorStylesExample` with two different spans of nested text, which requires special attention with the native driver.

Changelog:
[Internal][Added] - Add Nested Text Animated Color RNTester Example

Reviewed By: genkikondo

Differential Revision: D37762708

fbshipit-source-id: 755e6dd922432781645cd84749a77f29ec57665d
2022-07-12 13:48:18 -07:00
Alex Hunt a7100a18f8 Remove redundant js_library_glob calls
Summary: Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D37717611

fbshipit-source-id: 77ddfb43bb8e9fef4306b6e701d34c4964549730
2022-07-12 05:20:36 -07:00
Alex Hunt a322a7a6f5 Rename js_glob as js_library_glob
Summary: Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D37686882

fbshipit-source-id: 467575fa0effaf67524b2c56e65519c32ec6dbd9
2022-07-12 05:20:36 -07:00
LeoTM 53c8fc9488 Bump AGP from 7.2.0 to 7.2.1 (#34166)
Summary:
- Fix: https://github.com/facebook/react-native/issues/34103
- Follow-up: https://github.com/facebook/react-native/pull/33817

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Changed] - Bump Android Gradle Plugin to 7.2.1

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

Test Plan: Everything builds and runs as expected

Reviewed By: javache

Differential Revision: D37747754

Pulled By: cortinico

fbshipit-source-id: b51f26d773ddfbdaf4490f89f3b207a41b225a82
2022-07-12 03:57:14 -07:00
George Zahariev 67e12a19cb Suppress errors ahead of launch
Summary:
Ahead of enabling the `exact_empty_objects` option, suppress errors so that actually enabling the option is easier. We can do this without enabling the option by codemoding `{}` to `{...null}` in files that have errors.

Process:
1) Get list of files with errors when enabling the option
2) Codemod `{}` to `{...null}` in those files
3) Suppress resulting errors
4) Land diff with `drop-conflicts` flag
5) Announce and enable option (with many fewer files to edit)
6) Codemod all `{...null}` to `{}`

drop-conflicts

We are working on making the empty object literal `{}` have the type `{}` - i.e. exact empty object - rather than being unsealed.
More info in these posts: https://fb.workplace.com/groups/flowlang/posts/903386663600331, https://fb.workplace.com/groups/floweng/posts/8626146484100557

Reviewed By: pieterv

Differential Revision: D37731004

fbshipit-source-id: a9305859ba4e8adbdb8ae8feff3ec8a2f07ed236
2022-07-11 11:33:24 -07:00
Ron Edelstein 7d8907fe52 Fix more missing language issues
Reviewed By: nlutsenko

Differential Revision: D37734621

fbshipit-source-id: 3b24121c0926f4d8fcd1cdb8433cc89a3452eb20
2022-07-08 18:22:34 -07:00
Vincent Riemer 8bb0a9f9c9 Create more mobile-friendly version of the platform test results UI
Summary:
Changelog: [RNTester][Internal] - Create more mobile-friendly version of the platform test results UI

The original UI design for displaying the test results was done with only really tablets in mind so in order to better accomidate mobile screen sizes this diff adds a new expanding UI for the test results.

Reviewed By: lunaleaps

Differential Revision: D37701638

fbshipit-source-id: a1789abb15db7ab162fe90afc32d23c435f1bdb5
2022-07-08 13:33:04 -07:00
Vincent Riemer fba485af83 Add initial documentation of RNTesterPlatformTest
Summary:
Changelog: [RNTester][Internal] - Add README for RNTesterPlatformTest framework

This diff adds some initial documentation for `RNTesterPlatformTest` to give other pointers on how to contribute their own platform tests (both internally and externally).

Reviewed By: lunaleaps

Differential Revision: D37566632

fbshipit-source-id: c203045f79c3c5488fd0dcbb8077e9041bd62b0f
2022-07-08 13:33:04 -07:00
Vincent Riemer ff6c906a66 Update event names in pointer event platform tests
Summary: Changelog: [RNTester][Internal] Update event names in pointer event platform tests

Reviewed By: lunaleaps

Differential Revision: D37697922

fbshipit-source-id: ac0ad5111cc7be74ca4ad4a2e9e6c2dec15b49ce
2022-07-08 13:33:04 -07:00
Luna Wei 1753e7697d Fix: Ensure forms stacking context for events
Summary: Changelog: [Internal] - If any relevant view events (pointer, touch events, gesture responder, etc.) are declared on view, then the view must form stacking context. We need this change for pointer events specifically to determine whether we've entered/exited a view

Reviewed By: vincentriemer

Differential Revision: D37678352

fbshipit-source-id: 02641549ef608b1c9468ac693c7da629143212cb
2022-07-08 13:11:56 -07:00
Pieter Vanderwerff 6c563a507f Suppress missing 'this' annotations in xplat/js
Reviewed By: samwgoldman

Differential Revision: D37701888

fbshipit-source-id: 80cf21e4c942f00695c08ea8671efba0109aad32
2022-07-07 21:53:53 -07:00
Ron Edelstein 0d915aa942 Explicitly set language to JAVA where it is missing [xplat] (round 1)
Reviewed By: IanChilds

Differential Revision: D37594044

fbshipit-source-id: 0bbcaaed951a212651d3cc0fc3371751ced13852
2022-07-06 09:07:07 -07:00
Luna Wei 8be49e8746 PointerEvents: Remove '2' suffix
Summary: Changelog: [Internal] - We can now remove the '2' suffix as we had an internal implementation that was not truly aligned with W3C pointers but used the same name. We have aligned the internal types to match w3c so we can now remove the suffix that differentiates them.

Reviewed By: vincentriemer

Differential Revision: D37545813

fbshipit-source-id: 6f2336ae9e314066c340161113268c1f28621a71
2022-07-05 20:00:42 -07:00
Vincent Riemer 54f03817e0 Add filter ability to platform test result view
Summary:
Changelog: [RNTester][Internal] - Add the ability to filter PlatformTest results by test name substrings

In certain tests (such as the hoverable pointer attributes test) there are a super large number of results which can make it hard to focus on the ones you're actively trying to work on fixing. This diff adds the ability to filter those results with a simple substring filter on the test name of the results.

Reviewed By: lunaleaps

Differential Revision: D37558411

fbshipit-source-id: 8f4b19fed9bb9f1b08fd7470cd79d68b6c721c13
2022-07-05 13:01:56 -07:00
Pieter De Baets 71e89213aa Make ReactCommon and tests compile for CXX platform
Summary:
If you don't list `Cxx` as a supported platform, we will use Android builds, even when using `buck run` for local execution.

Changelog: [Internal]

Reviewed By: derolf

Differential Revision: D37600464

fbshipit-source-id: 6ba8566cde4180524351c9d8c647ce1d4ac5279d
2022-07-05 05:56:35 -07:00
Ron Edelstein daea147cc5 Specify the language field in some codegen modules
Reviewed By: IanChilds

Differential Revision: D37530941

fbshipit-source-id: ea545a241600edc7f01458be264734db41caaa7d
2022-06-30 12:26:41 -07:00
Arkkeeper 2fb6a3393d Mac Catalyst patches (#34026)
Summary:
This PR adds a new method called **__apply_mac_catalyst_patches** to **scripts/react_native_pods.rb**. If it is enabled in the Podfile, it will apply three patches necessary for successful building not only for iOS and tvOS targets, but also for macOS using Apple's Mac Catalyst technology.

These 3 patches are:
- Fixing bundle signing issues by altering CODE_SIGN_IDENTITY
- Explicitly setting dead code stripping flag in project.pbxproj
- Modifying library search paths

The details were discussed here https://github.com/reactwg/react-native-releases/discussions/21#discussioncomment-2754289

## Changelog

[iOS] [Added] - Add Mac Catalyst compatibility (can be enabled in Podfile)

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

Test Plan:
1. Go to project settings in Xcode, to General tab. Enable "iPad" and "Mac Catalyst" checkboxes
2. Go to "Signing & Capabilities" tab, ensure that a correct bundle id and development team are set
3. Edit Podfile, uncomment **__apply_mac_catalyst_patches(installer)** line
4. Run `pod install` in ios directory
5. Get back to Xcode, select "My Mac (Mac Catalyst)" as a target device
6. Build & run

Reviewed By: cipolleschi

Differential Revision: D37362054

Pulled By: cortinico

fbshipit-source-id: 74636f716f112289ab40968bbc8e52406c1e9579
2022-06-30 05:20:14 -07:00
Héctor Ramos 1115bc77db Make Hermes the default engine on iOS (#34085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34085

Hermes is now the default engine on iOS.

Apps can choose to continue using JSC by setting `hermes_enabled` to `false` in their Podfile.

The RNTester app now uses Hermes, as well. Use JSC in RNTester by setting `USE_HERMES=0` when running `pod install`.

Changelog:

[iOS][Changed] Hermes is now the default engine on iOS. This setting is controlled via `flags[:hermes_enabled]` in the Podfile.

Reviewed By: cortinico, cipolleschi

Differential Revision: D37361468

fbshipit-source-id: e6dda6a23eea4a824ad157d1a26f17e181db33cd
2022-06-28 10:04:51 -07:00
Vincent Riemer fb57929f22 Add basic pointermove test to RNTester platform test suite
Summary: Changelog: [RNTester][Internal] - Add basic pointermove test to RNTester platform test suite

Reviewed By: lunaleaps

Differential Revision: D37324483

fbshipit-source-id: 5c2fdd8ef4bb38052966116e46d3cfdf6c525ee0
2022-06-24 12:00:44 -07:00
Pieter Vanderwerff 66c6a75650 Suppress missing annotations in xplat/js
Summary: Add annotations to function parameters required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predictable.

Reviewed By: bradzacher

Differential Revision: D37388949

fbshipit-source-id: cdcbc98035ce9b6994842005ea46df42de54f9b8
2022-06-23 16:54:29 -07:00
Nicola Corti ea8d8e2f49 Bump @react-native/eslint-plugin-specs to 0.0.4
Summary:
As we changed the deps for react-native/eslint-plugin-specs, let's release a new version of it.

Changelog:
[General] [Changed] - Bump react-native/eslint-plugin-specs to 0.0.4

Reviewed By: jacdebug

Differential Revision: D37353474

fbshipit-source-id: dc77c987ee06d72903d246544c63816a64ecd7f6
2022-06-23 01:23:52 -07:00
Pieter Vanderwerff c940eb0c49 Add LTI annotations to function params in xplat/js [manually-modified]
Summary: Add annotations to function parameters required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predicatable.

Reviewed By: bradzacher

Differential Revision: D37363351

fbshipit-source-id: a9d3df7db6f9d094ac2ce81aae1f3ab4f62b243a
2022-06-22 23:01:55 -07:00
Pieter Vanderwerff e7a4dbcefc Add LTI annotations to function params in xplat/js [1/2]
Summary: Add annotations to function parameters required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predicatable.

Reviewed By: evanyeung

Differential Revision: D37353648

fbshipit-source-id: e5a0c685ced85a8ff353d578b373f836b376bb28
2022-06-22 21:36:52 -07:00
Pieter Vanderwerff d96744e277 Add LTI annotations to function params in xplat/js [2/2]
Summary: Add annotations to function parameters required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predicatable.

Reviewed By: evanyeung

Differential Revision: D37360113

fbshipit-source-id: 870bcfe680542b3861fefbaf372db0ae8b32cbf3
2022-06-22 18:46:51 -07:00
Yann Pringault 97291bfa31 fix(eslint-config): switch to new babel parser (#34020)
Summary:
[`babel-eslint`](https://github.com/babel/babel-eslint) is deprecated now. We should use the new Babel parser.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fixed] - Use new Babel parser instead of deprecated one

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

Test Plan: Ensure lint is working as expected.

Reviewed By: cortinico

Differential Revision: D37239826

Pulled By: jacdebug

fbshipit-source-id: f5fa5d7f829d6d3ae5cffd855ed6c8542c7d46de
2022-06-21 21:04:42 -07:00
Simek 1999191881 Update CONTRIBUTING.md, replace wiki links (#34035)
Summary:
This PR is a follow up for the contributing content move on the website:
* https://github.com/facebook/react-native-website/pull/3120

It replaces most of the CONTRIBUTING file content with a reference to the contributing overview page on the website, which has been based off the content of this file.

Additionally I have searched thought the code for the wiki links and replaces theme with the correct website links. There was an instance where comment was referring to an old and removed a while ago wiki page, so I just get rid of this link.

## Changelog

[Internal] [Chore] - Update CONTRIBUTING.md, replace wiki links

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

Test Plan: N/A

Reviewed By: lunaleaps

Differential Revision: D37318814

Pulled By: cortinico

fbshipit-source-id: d3f5e5c5bd477c0de5c4f0f1d5de81f464b9f5b4
2022-06-21 19:30:23 -07:00
Luis Santana 68f3a42fc7 bump RTC-Folly to 2021.07.22 (#33841)
Summary:
Bumping RTC-Folly version used to address CVE-2022-24440.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General][Security] - Bump RTC-Folly to 2021-07-22

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

Reviewed By: Andjeliko, philIip

Differential Revision: D36425598

Pulled By: cortinico

fbshipit-source-id: d38c5f020dbecf794b10f12ed2da30e1825071af
2022-06-21 12:36:43 -07:00
Kacie Bawiec 4bb551d018 Back out "TalkBack support for ScrollView accessibility announcements (list and grid) - Javascript Only Changes"
Summary:
Original commit changeset: 3765213c5d8b

Original Phabricator Diff: D37189197 (2d5882132f)

Changelog: [Internal]

Reviewed By: bvanderhoof

Differential Revision: D37260990

fbshipit-source-id: bfcb10f2d5a2a1427b72a10ef380df194b041ba0
2022-06-17 22:08:57 -07:00
fabriziobertoglio1987 2d5882132f TalkBack support for ScrollView accessibility announcements (list and grid) - Javascript Only Changes (#33180)
Summary:
This is the Javascript-only changes from D34518929 (dd6325bafe), split out for push safety. Original summary and test plan below:

This issue fixes [30977][17] . The Pull Request was previously published by [intergalacticspacehighway][13] with [31666][19].
The solution consists of:
1. Adding Javascript logic in the [FlatList][14], SectionList, VirtualizedList components to provide accessibility information (row and column position) for each cell in the method [renderItem][20] as a fourth parameter [accessibilityCollectionItem][21]. The information is saved on the native side in the AccessibilityNodeInfo and announced by TalkBack when changing row, column, or page ([video example][12]). The prop accessibilityCollectionItem is available in the View component which wraps each FlatList cell.
2. Adding Java logic in [ReactScrollView.java][16] and HorizontalScrollView to announce pages with TalkBack when scrolling up/down. The missing AOSP logic in [ScrollView.java][10] (see also the [GridView][11] example) is responsible for announcing Page Scrolling with TalkBack.

Relevant Links:
x [Additional notes on this PR][18]
x [discussion on the additional container View around each FlatList cell][22]
x [commit adding prop getCellsInItemCount to VirtualizedList][23]

## Changelog

[Android] [Added] - Accessibility announcement for list and grid in FlatList

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

Test Plan:
[1]. TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer ([link][1])
[2]. TalkBack announces pages and cells with Vertical Flatlist in the Paper Renderer ([link][2])
[3]. `FlatList numColumns={undefined}` Should not trigger Runtime Error NoSuchKey exception columnCount when enabling TalkBack. ([link][3])
[4]. TalkBack announces pages and cells with Nested Horizontal Flatlist in the rn-tester app ([link][4])

[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050462465
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1032340879
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050618308
[10]:1ac46f932e/core/java/android/widget/AdapterView.java (L1027-L1029) "GridView.java method responsible for calling setFromIndex and setToIndex"
[11]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1042518901 "test case on Android GridView"
[12]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894 "TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer"
[13]:https://github.com/intergalacticspacehighway "github intergalacticspacehighway"
[14]:80acf523a4/Libraries/Lists/FlatList.js (L617-L636) "FlatList accessibilityCollectionItem"
[16]:5706bd7d3e/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java (L183-L184) "logic added to ReactScrollView.java"
[17]: https://github.com/facebook/react-native/issues/30977
[18]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6
[19]: https://github.com/facebook/react-native/pull/31666
[20]: https://reactnative.dev/docs/next/flatlist#required-renderitem "FlatList renderItem documentation"
[21]: 75147359c5 "commit that introduces fourth param accessibilityCollectionItem in callback renderItem"
[22]: https://github.com/facebook/react-native/pull/33180#discussion_r826748664 "discussion on the additional container View around each FlatList cell"
[23]: d50fd1a681 "commit adding prop getCellsInItemCount to VirtualizedList"

Reviewed By: kacieb

Differential Revision: D37189197

Pulled By: blavalla

fbshipit-source-id: 3765213c5d8bfde56e0e5f155cdd899c368512e7
2022-06-17 17:59:51 -07:00
Riccardo Cipolleschi 71da21243c Move New Architecture setup to `new_architecture.rb` file (#33990)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33990

This diff moves the setting of some CPP flags from the main React native pods file to a dedicated file.

It also introduces some tests and it improves the Test Mocks we have

## Changelog
[iOS][Changed] - Move the `modify_flags_for_new_architecture` method to separate ruby file

Reviewed By: cortinico

Differential Revision: D37040927

fbshipit-source-id: 037ddaf123d01f3a2fd622b8a0cd10535da70b92
2022-06-17 17:11:51 -07:00
Jack Worden 56051caac5 Back out "React Native sync for revisions d300ceb...256aefb"
Summary:
Original commit changeset: 4c0afc95abe8

Original Phabricator Diff: D37155957 (d1321d88bd)

See attached UBN task for more details, I am reverting the whole diff now while investigating the root cause.

Changelog:
[General][Changed] - Revert "React Native sync for revisions d300ceb...256aefb"

jest_e2e[run_all_tests]

=== update
klein did a bisect for S276290, it seems Original Phabricator Diff: D37155957 (d1321d88bd) is the blame diff.
jackworden also has verified backout can fix it for both ios and android.

Reviewed By: ahujap-fb, kacieb

Differential Revision: D37205394

fbshipit-source-id: 600e6593532da064631c016aace317932f290c67
2022-06-17 03:13:14 -07:00
Tim Shamilov d881c87231 add file and blob globals to eslint config (#31293)
Summary:
The eslint community config does not have the File and Blob polyfills in `globals` which have been part of the Javascript implementation for ~3 years. They were added to the Javascript API in https://github.com/facebook/react-native/issues/11573 by satya164.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fixed] - Added File and Blob globals to eslint community config

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

Test Plan:
Evidence these globals exist:
1. https://github.com/facebook/react-native/issues/11573
2. Executed the following:
<img width="421" alt="Screen Shot 2021-04-02 at 12 08 50 PM" src="https://user-images.githubusercontent.com/3495974/113432946-466ae280-93ac-11eb-899c-3ca124e0af84.png">
<img width="317" alt="Screen Shot 2021-04-02 at 12 11 56 PM" src="https://user-images.githubusercontent.com/3495974/113433156-a82b4c80-93ac-11eb-99dc-0840d5ad9078.png">

3. Receive in console:
<img width="603" alt="Screen Shot 2021-04-02 at 12 09 59 PM" src="https://user-images.githubusercontent.com/3495974/113432996-5da9d000-93ac-11eb-81c6-88e6b059c733.png">
<img width="599" alt="Screen Shot 2021-04-02 at 12 12 27 PM" src="https://user-images.githubusercontent.com/3495974/113433174-b711ff00-93ac-11eb-8820-67039696f6ce.png">

Evidence the PR works: the globals in the PR identical to the others in the eslint community config that they are in

Reviewed By: cipolleschi

Differential Revision: D37214364

Pulled By: cortinico

fbshipit-source-id: 71b9dec8d222a057c54f6cde6c6d8e85dd25f6f9
2022-06-16 18:32:37 -07:00
Joshua Gross 63ddfa02ee Update iOS offine mirrors for RN-Tester on top of D37051020
Summary:
Just bumping the offline mirrors for iOS

Changelog:
[Internal] [Changed] - Update iOS offine mirrors for RN-Tester

Reviewed By: cortinico

Differential Revision: D37187562

fbshipit-source-id: 4ede8413f98afa4694984baf06349f4330304798
2022-06-15 23:37:34 -07:00
Dustin Shahidehpour dbe6fab063 Switch module codegen to use yarn_workspace_binary. (#34015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34015

I noticed this was a very slow part of my build because each instance of the binary would run its own yarn install. Instead use the yarn_workspace approach to share a single yarn setup.
Changelog: [Internal]

Reviewed By: IanChilds

Differential Revision: D37178005

fbshipit-source-id: cba51e168c5a2f2ee6468acb8c144db4ad352d95
2022-06-15 13:12:14 -07:00
Rick Hanlon d1321d88bd React Native sync for revisions d300ceb...256aefb
Summary:
This sync includes the following changes:
- **[5cc2487e0](https://github.com/facebook/react/commit/5cc2487e0 )**: bump versions for next release ([#24725](https://github.com/facebook/react/pull/24725)) //<Josh Story>//
- **[54f17e490](https://github.com/facebook/react/commit/54f17e490 )**: [Transition Tracing] Fix Cache and Transitions Pop Order ([#24719](https://github.com/facebook/react/pull/24719)) //<Luna Ruan>//
- **[7cf8dfd94](https://github.com/facebook/react/commit/7cf8dfd94 )**: [Transition Tracing] Create/Process Marker Complete Callback ([#24700](https://github.com/facebook/react/pull/24700)) //<Luna Ruan>//
- **[327e4a1f9](https://github.com/facebook/react/commit/327e4a1f9 )**: [Follow-up] Land enableClientRenderFallbackOnTextMismatch //<Andrew Clark>//
- **[a8c9cb18b](https://github.com/facebook/react/commit/a8c9cb18b )**: Land enableSuspenseLayoutEffectSemantics flag ([#24713](https://github.com/facebook/react/pull/24713)) //<Andrew Clark>//
- **[a8555c308](https://github.com/facebook/react/commit/a8555c308 )**: [Transition Tracing] Add Tracing Marker Stack ([#24661](https://github.com/facebook/react/pull/24661)) //<Luna Ruan>//
- **[8186b1937](https://github.com/facebook/react/commit/8186b1937 )**: Check for infinite update loops even if unmounted ([#24697](https://github.com/facebook/react/pull/24697)) //<Andrew Clark>//
- **[060505e9d](https://github.com/facebook/react/commit/060505e9d )**: Fix misapplying prod error opt-out ([#24688](https://github.com/facebook/react/pull/24688)) //<Josh Story>//
- **[47944142f](https://github.com/facebook/react/commit/47944142f )**: `now` isn't part of the react-reconciler config anymore ([#24689](https://github.com/facebook/react/pull/24689)) //<Mathieu Dutour>//
- **[b34552352](https://github.com/facebook/react/commit/b34552352 )**: [Fizz] Support abort reasons ([#24680](https://github.com/facebook/react/pull/24680)) //<Josh Story>//
- **[79f54c16d](https://github.com/facebook/react/commit/79f54c16d )**: Bugfix: Revealing a hidden update ([#24685](https://github.com/facebook/react/pull/24685)) //<Andrew Clark>//
- **[7e8a020a4](https://github.com/facebook/react/commit/7e8a020a4 )**: Remove extra Server Context argument ([#24683](https://github.com/facebook/react/pull/24683)) //<Sebastian Markbåge>//
- **[4f29ba1cc](https://github.com/facebook/react/commit/4f29ba1cc )**: support errorInfo in onRecoverableError ([#24591](https://github.com/facebook/react/pull/24591)) //<Josh Story>//
- **[1cd90d2cc](https://github.com/facebook/react/commit/1cd90d2cc )**: Refactor of interleaved ("concurrent") update queue ([#24663](https://github.com/facebook/react/pull/24663)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions d300ceb...256aefb

jest_e2e[run_all_tests]

Reviewed By: cortinico

Differential Revision: D37155957

fbshipit-source-id: 4c0afc95abe8fa13c3803584922c8dc0059ff562
2022-06-15 12:23:01 -07:00
Nicola Corti 6d2872d5a3 Encapsulate all the CMake build logic inside a `ReactNative-application.cmake` file for RN Tester (#33985)
Summary:
The idea behind this is to encapsulate as much build logic as possible inside a `.cmake` file which is contained inside React Native.

This reduces the API surface for the users, once we apply this change to the `template` project, and makes easier for us to evolve native library dependencies on Android, without having to worry about asking users to replicate those changes.

Currently the change is only on RN Tester, will replicate to the template afterwards

## Changelog

[Internal] [Changed] - Encapsulate all the CMake build logic inside a `ReactNative-application.cmake` file for RN Tester

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

Test Plan: Circle CI

Reviewed By: cipolleschi

Differential Revision: D37039658

Pulled By: cortinico

fbshipit-source-id: 536593e3b7227158acba3f0fb6561efaaa9720a5
2022-06-10 02:13:20 -07:00
Dmitry Rykun 2f940db9d3 Updated CocoaPods offline mirrors
Summary:
Changelog:
[Internal][Fixed] - https://github.com/facebook/react-native/pull/33973 breaks the internal CI, as it depends on the outdated offline mirror for `Pods/Target Support Files`.

Reviewed By: cortinico

Differential Revision: D37038213

fbshipit-source-id: 1d27c9c32f2c3ddecd15a83935c520d1e1524b21
2022-06-10 01:41:05 -07:00
Vincent Riemer 656d1cef24 Add optimizations to RNTesterPlatformTest result rendering
Summary: Changelog: [Internal] Add optimizations to RNTesterPlatformTest result rendering

Reviewed By: kacieb

Differential Revision: D37046543

fbshipit-source-id: 53ff6560e65ddfa26c470e5ae04b642154c43d1c
2022-06-09 15:54:11 -07:00
Nicola Corti a0e6ffebbf Format .kts files with ktfmt
Summary:
I'm extending ktfmt setup to run on kotlin script files as well.

Changelog:
[Internal] [Changed] - Reformat .kts files with ktfmt

skip-linter-coverage-verification

Reviewed By: zertosh

Differential Revision: D36967010

fbshipit-source-id: a83f3facbb5f30b935b69fc70a5588e4da5996b2
2022-06-09 02:50:45 -07:00
Scott Kyle 68e4e91bd4 Support optional return types
Summary:
This fixes an issue in the C++ TurboModule codegen where optional return types would result in a compiler error because they were not being defaulted to `null` when converting to `jsi::Value`.

Changelog:
Internal

Reviewed By: javache

Differential Revision: D36989312

fbshipit-source-id: 525f9ce7a5638ba5a655fa69ba9647978030ab0b
2022-06-08 21:15:53 -07:00
Carmi Grushko f296e0e5b3 Update ktfmt component on FBS:master
Differential Revision: D36926167

fbshipit-source-id: e5c262e269b3ccb2afe04b45398ec66fc5c48df2
2022-06-07 02:59:31 -07:00
Rick Hanlon 118cf68914 React Native sync for revisions bd4784c...d300ceb
Summary:
This sync includes the following changes:
- **[dd4950c90](https://github.com/facebook/react/commit/dd4950c90 )**: [Flight] Implement useId hook ([#24172](https://github.com/facebook/react/pull/24172)) //<Josh Story>//
- **[26a5b3c7f](https://github.com/facebook/react/commit/26a5b3c7f )**: Explicitly set `highWaterMark` to 0 for `ReadableStream` ([#24641](https://github.com/facebook/react/pull/24641)) //<Josh Larson>//
- **[aec575914](https://github.com/facebook/react/commit/aec575914 )**: [Fizz] Send errors down to client ([#24551](https://github.com/facebook/react/pull/24551)) //<Josh Story>//
- **[a2766387e](https://github.com/facebook/react/commit/a2766387e )**: [Fizz] Improve text separator byte efficiency ([#24630](https://github.com/facebook/react/pull/24630)) //<Josh Story>//
- **[f7860538a](https://github.com/facebook/react/commit/f7860538a )**: Fix typo in useSyncExternalStore main entry point error ([#24631](https://github.com/facebook/react/pull/24631)) //<François Chalifour>//
- **[1bed20731](https://github.com/facebook/react/commit/1bed20731 )**: Add a module map option to the Webpack Flight Client ([#24629](https://github.com/facebook/react/pull/24629)) //<Sebastian Markbåge>//
- **[b2763d3ea](https://github.com/facebook/react/commit/b2763d3ea )**: Move hydration code out of normal Suspense path ([#24532](https://github.com/facebook/react/pull/24532)) //<Andrew Clark>//
- **[357a61324](https://github.com/facebook/react/commit/357a61324 )**: [DevTools][Transition Tracing] Added support for Suspense Boundaries ([#23365](https://github.com/facebook/react/pull/23365)) //<Luna Ruan>//
- **[2c8a1452b](https://github.com/facebook/react/commit/2c8a1452b )**: Fix ignored setState in Safari when iframe is touched ([#24459](https://github.com/facebook/react/pull/24459)) //<dan>//
- **[62662633d](https://github.com/facebook/react/commit/62662633d )**: Remove enableFlipOffscreenUnhideOrder ([#24545](https://github.com/facebook/react/pull/24545)) //<Ricky>//
- **[34da5aa69](https://github.com/facebook/react/commit/34da5aa69 )**: Only treat updates to lazy as a new mount in legacy mode ([#24530](https://github.com/facebook/react/pull/24530)) //<Ricky>//
- **[46a6d77e3](https://github.com/facebook/react/commit/46a6d77e3 )**: Unify JSResourceReference Interfaces ([#24507](https://github.com/facebook/react/pull/24507)) //<Timothy Yung>//
- **[6cbf0f7fa](https://github.com/facebook/react/commit/6cbf0f7fa )**: Fork ReactSymbols ([#24484](https://github.com/facebook/react/pull/24484)) //<Ricky>//
- **[a10a9a6b5](https://github.com/facebook/react/commit/a10a9a6b5 )**: Add test for hiding children after layout destroy ([#24483](https://github.com/facebook/react/pull/24483)) //<Ricky>//
- **[b4eb0ad71](https://github.com/facebook/react/commit/b4eb0ad71 )**: Do not replay erroring beginWork with invokeGuardedCallback when suspended or previously errored ([#24480](https://github.com/facebook/react/pull/24480)) //<Josh Story>//
- **[99eef9e2d](https://github.com/facebook/react/commit/99eef9e2d )**: Hide children of Offscreen after destroy effects ([#24446](https://github.com/facebook/react/pull/24446)) //<Ricky>//
- **[ce1386028](https://github.com/facebook/react/commit/ce1386028 )**: Remove enablePersistentOffscreenHostContainer flag ([#24460](https://github.com/facebook/react/pull/24460)) //<Andrew Clark>//
- **[72b7462fe](https://github.com/facebook/react/commit/72b7462fe )**: Bump local package.json versions for 18.1 release ([#24447](https://github.com/facebook/react/pull/24447)) //<Andrew Clark>//
- **[22edb9f77](https://github.com/facebook/react/commit/22edb9f77 )**: React `version` field should match package.json ([#24445](https://github.com/facebook/react/pull/24445)) //<Andrew Clark>//
- **[6bf3deef5](https://github.com/facebook/react/commit/6bf3deef5 )**: Upgrade react-shallow-renderer to support react 18 ([#24442](https://github.com/facebook/react/pull/24442)) //<Michael サイトー 中村 Bashurov>//

Changelog:
[General][Changed] - React Native sync for revisions bd4784c...d300ceb

jest_e2e[run_all_tests]

Reviewed By: cortinico, kacieb

Differential Revision: D36874368

fbshipit-source-id: c0ee015f4ef2fa56e57f7a1f6bc37dd05c949877
2022-06-06 10:58:29 -07:00
Nicola Corti f1c614bd0e Build RN Tester with CMake (#33937)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33937

This moves the build of RNTester from Unix Make to CMake
This will serve as a blueprint for users that are looking into using CMake end-to-end in their buildls.

In order to make this possible I had to:
* Add an `Android-prebuilt.cmake` file that works similar to the `Android-prebuilt.mk` for feeding prebuilt .so files to the consumer build.
* Update the codegen to use `JSI_EXPORT` on several objects/classes as CMake has stricter visibility rules than Make
* Update the sample native module in `nativemodule/samples/platform/android/` to use CMake instead of Make

Changelog:
[Internal] [Changed] - Build RN Tester with CMake

Reviewed By: cipolleschi

Differential Revision: D36760309

fbshipit-source-id: b99449a4b824b6c0064e833d4bcd5969b141df70
2022-06-06 08:07:14 -07:00
Jordan Brown 6064fd0600 Presuppress xplat and upgrade to 0.178.1
Summary:
This diff upgrades xplat to 0.178.1 and pre-suppresses errors from turning on constrained writes.

To generate this diff I:
* Modified every `env_mode=constrain_writes` to `env_mode=ssa` and made a commit (this is so our upgrade script will work)
* Ran   scripts/flow/upgrade.sh 0.178.1 to upgrade all the flowconfigs to 178.1 and suppress new-env errors
* Modified arvr/js/flowconfig.ejs to use 0.178.1 and ran `scripts/gen-flowconfig/gen-flowconfig --project arvr`
* Modified xplat/js/flowconfig.ejs to use 0.178.1 and ran `scripts/gen-flowconfig/gen-flowconfig --project xplat`
* Unstacked from the commit in point 1

Reviewed By: SamChou19815

Differential Revision: D36676019

fbshipit-source-id: c3032f18ed838afc327f00de563e7f20713bdc26
2022-05-26 12:59:52 -07:00
Michael Lee (Engineering) 2d66bd4851 Rename the folly `headers_only` target to warn
Summary:
This target is not a good idea for a number of reasons:
1. It groups up multiple targets which breaks the dependency graph
2. It does not handle dependency remapping correctly
3. It has no mirror into fbcode

We should warn people this is a bad idea

Reviewed By: alexmalyshev

Differential Revision: D36519357

fbshipit-source-id: d60ca3237c7710118732578fecd1b2fc8903321b
2022-05-26 08:17:27 -07:00