Commit Graph

38536 Commits

Author SHA1 Message Date
David Vacca fd4e26938b Delete dispatchPreallocationInBackground flag
Summary:
Delete dispatchPreallocationInBackground flag
changelog: [internal] internal

Reviewed By: makovkastar

Differential Revision: D40403682

fbshipit-source-id: 73904ab7c8a570b0aba51f1bccd15cf07609f2d6
2022-10-18 13:32:03 -07:00
David Vacca 8eebc931bc Ship insertZReorderBarriersOnViewGroupChildren
Summary:
Ship insertZReorderBarriersOnViewGroupChildren

changelog: [internal] internal

Reviewed By: makovkastar

Differential Revision: D40403388

fbshipit-source-id: bf13f6a7af92c0c4fd3377a547a56b163dfe29ed
2022-10-18 13:32:03 -07:00
David Vacca 9578c2cadf Ship large meassure cache in all platforms
Summary:
Ship large meassure cache in all platforms

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D40356835

fbshipit-source-id: 315862d7aa705e83086e102e20fe2c20fb3210b2
2022-10-18 13:32:03 -07:00
David Vacca 4f7b4d8cbb Ship enableAggressiveEventEmitterCleanup
Summary:
This diff ships the experiment enableAggressiveEventEmitterCleanup

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D40356592

fbshipit-source-id: 27da82a0b958cedc1283a54de175a6eb6b14004b
2022-10-18 13:32:03 -07:00
David Vacca fceb1425dd Remove enableEarlyEventEmitterUpdate experiment
Summary:
Remove enableEarlyEventEmitterUpdate experiment

changelog: [inernal] internal

Reviewed By: sammy-SC

Differential Revision: D40356386

fbshipit-source-id: a5135f97f65c93e7de967a91e34d8b0baa411b84
2022-10-18 13:32:03 -07:00
David Vacca ea6c7f504b Delete LockFreeEventDispatcher
Summary:
This diff removes LockFreeEventDispatcher, its dependencies and feature flags

changelog: [internal] internal

Reviewed By: javache, sammy-SC

Differential Revision: D40356071

fbshipit-source-id: 42212e86fe4ace0da87fd8e7ab8ee50100175432
2022-10-18 13:32:03 -07:00
David Vacca a766927ad6 Delete MC and FeatureFlags for mapBufferSerialization
Summary:
Delete MC and FeatureFlags for mapBufferSerialization

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D40348980

fbshipit-source-id: 5de8beafb4ec4a3490a22f4db317a35c8ce7b4ab
2022-10-18 13:32:03 -07:00
David Vacca 22b6e1c8ec Ship and delete mapBufferSerialization for Text measurement
Summary:
In this diff I'm shipping and deleting mapBufferSerialization for Text measurement

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D40348982

fbshipit-source-id: 7336cbe055a55d7d8d4f0a723049842bae1defb5
2022-10-18 13:32:03 -07:00
David Vacca e87cdc7fd4 Move initialization of MapBuffer so
Summary:
This diff refactors the initialization of MapBuffer so

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D40348981

fbshipit-source-id: 88bbf4f2370373c20f805c3b23d0ecbe8a26bb86
2022-10-18 13:32:03 -07:00
Sam Zhou 82e86c459d Annotate empty arrays in xplat (2/n)
Summary: Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D40460690

fbshipit-source-id: 1e10b0bcf874dc9a3702b4d17d30d448653602ca
2022-10-18 12:49:22 -07:00
Jan Kassens 5e6a4c5b4c React Native sync for revisions 9fb581c...54f297a
Summary:
This sync includes the following changes:
- **[54f297a60](https://github.com/facebook/react/commit/54f297a60 )**: Enable useMemoCacheHook for ReactNative-fb build ([#25498](https://github.com/facebook/react/pull/25498)) //<Jan Kassens>//

Changelog:
[General][Changed] - React Native sync for revisions 9fb581c...54f297a

jest_e2e[run_all_tests]

Reviewed By: poteto

Differential Revision: D40435957

fbshipit-source-id: f447f50d80298e2c3e8be09ff52b1bedcfe6d402
2022-10-18 11:30:31 -07:00
Tianyu Yao 48263b8daf Upgrade React DevTools deps to 4.26.1
Summary:
Changelog:
[General][Changed] - Upgraded react-devtools-core dependency to 4.26.1

Reviewed By: lunaruan

Differential Revision: D40394563

fbshipit-source-id: 70a841c7478d8944dc8a57dd7711953d6bd7958a
2022-10-18 10:43:18 -07:00
Tianyu Yao c64f25ac85 Avoid redboxes when highlighting
Summary:
Changelog:
[General][Fixed] - Fixed React DevTools element highlighting throwing redbox errors

Reviewed By: lunaruan

Differential Revision: D40367546

fbshipit-source-id: 094c4a512700f717efe06b7bfa304d94b6eed652
2022-10-18 10:35:11 -07:00
Lorenzo Sciandra 33e140fd05 fix(template, ios): add marketing version to template project (#35012)
Summary:
Recently this PR got merged https://github.com/facebook/react-native/pull/34919 that aligned the info.plist to the current default. Problem: the variable `MARKETING_VERSION` was not set in the template, so generating a new project and testing on iOS would fail accordingly:

<img width="1400" alt="Screenshot 2022-10-18 at 15 27 27" src="https://user-images.githubusercontent.com/16104054/196461640-470079f5-0f64-471f-8221-0d17f2b0114f.png">

This PR takes care of setting the variable so that the app can build successfully.

## 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
-->

[iOS] [Fixed] - add MARKETING_VERSION to template project

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

Test Plan: Run `yarn test-e2e-local -t RNTestProject`, apps builds correctly and runs on simulator.

Reviewed By: cipolleschi

Differential Revision: D40472420

Pulled By: cortinico

fbshipit-source-id: 18ddd57ce54186a101321583a7a8391e97ca9511
2022-10-18 10:32:59 -07:00
Riccardo Cipolleschi 62da9b8ce2 Backout Generate Custom Native State from Codegen
Summary:
This is the second diffs that backs out the Custom Native State from the Codegen. The reason why we are backing it out are:

1. It forces users to create new types in JS that are not ctually used there. For example, the NativeState you define, and eventually exports, in JS is not used anywhere in your JS code.
2. You need to put in the JS native state some types that does not exists in JS, only to have them generated by the Codegen. ImageRequest, for example, does not exists in JS, but you need it in your (iOS) state to load images
3. There are a lot of edge cases due to how C++ handles variables. Some variables needs to be created as pointers. Some others as `const &`. It does not scale to hard code all of them and there is the risk to have the same type that needs to be a pointer in some case and something else in others.
4. It is better to instruct the users on how to properly create a component with Custom State, Shadow Node and Descriptor.

## Changelog:
[General][Removed] - Back out parsing and generation of Custom Native State from Codegen

Reviewed By: cortinico

Differential Revision: D40426134

fbshipit-source-id: c368e122cc31ee8df056fe1bf6cecaab482140a4
2022-10-18 10:30:06 -07:00
Riccardo Cipolleschi aace6626c1 Backout: Components with custom state
Summary:
This is the first diffs that backs out the Custom Native State from the Codegen. The reason why we are backing it out are:

1. It forces users to create new types in JS that are not ctually used there. For example, the NativeState you define, and eventually exports, in JS is not used anywhere in your JS code.
2. You need to put in the JS native state some types that does not exists in JS, only to have them generated by the Codegen. ImageRequest, for example, does not exists in JS, but you need it in your (iOS) state to load images
3. There are a lot of edge cases due to how C++ handles variables. Some variables needs to be created as pointers. Some others as `const &`. It does not scale to hard code all of them and there is the risk to have the same type that needs to be a pointer in some case and something else in others.
4. It is better to instruct the users on how to properly create a component with Custom State, Shadow Node and Descriptor.

## Changelog
[General][Removed] - Back out components with native state in RNTester

Reviewed By: cortinico

Differential Revision: D40419254

fbshipit-source-id: 1895c7050f01f76a8901a97e9700f74cae707b79
2022-10-18 10:30:06 -07:00
Samuel Susla f6cfcc3fc9 Re-add TypeScript definitions for React Native renderer
Summary:
changelog: [internal]

Fix CircleCI

Reviewed By: jacdebug

Differential Revision: D40466738

fbshipit-source-id: 0057a98f07cdd07227c3ac8e09eb8b0d51974685
2022-10-18 05:21:09 -07:00
Lorenzo Sciandra 8f337538ae feat(jest): bump jest to 29 in the template (#34972)
Summary:
This PR is the follow up of https://github.com/facebook/react-native/pull/34724 for the template; this way, we'll have version alignment and RN71 will use this.

This wants to be merged along https://github.com/facebook/react-native/pull/34971

## 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] [Changed] - upgrade Jest in template to 29

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

Test Plan: Generated a test project via `yarn test-e2e-local -t RNTestProject` and then run `yarn test` in that project to verify that there's no regression. 

Reviewed By: huntie

Differential Revision: D40379963

Pulled By: robhogan

fbshipit-source-id: 618207ed6bf7921d13f0b6a9220dc52c9cf78b14
2022-10-18 04:43:38 -07:00
Fabrizio Cucci e22217fe8b Add useAnimatedValue to public API
Summary:
Changelog:
[General][Added] - Introduce `useAnimatedValue` hook to make it easier working with `Animated.Value`s in function components.

Reviewed By: javache

Differential Revision: D40434219

fbshipit-source-id: 3caf6ad98d11a534b8cc6816820bc1d125150380
2022-10-18 04:22:58 -07:00
Nick Gerleman b5aec96340 Start Adding GitHub Actions (#1165)
Summary:
This change starts adding more coverage to GitHub Actions. Existing workflows are split up to be per-platform, and stale scripts, etc are removed.

We are currently limited a bit by issues with the build itself, but this still adds a good bit of coverage that readily works, and adds places to inject more.

Another option would have been to move these to CircleCI where we have more credits, or used docker images instead of manual setup steps. etc, The Yoga build and number of changes is very light though, so we don't really need the complexity yet.

Some TODOs:
1. Fix the Apple Builds (pod lint and pod install return errors seen by the community)
2. Add working Android UTs
3. Add C++ UTs
4. Add Apple Publish
5. Add version stamping

Changelog:
[Internal][Added] - Start Adding Yoga GitHub Actions

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

Reviewed By: cortinico

Differential Revision: D40386426

Pulled By: NickGerleman

fbshipit-source-id: c540dd25bfec6ac8c05e461c1236ef7fe6cb8598
2022-10-17 23:35:01 -07:00
Arthur Kushka 31f219977d Disabled cpp view managers in runtime
Summary:
We found this feature crashing the app during hot reload, and as there is no user code dependent on it so far, we decided to disable it until we find the root cause.

changelog: [internal] internal

Reviewed By: mdvacca

Differential Revision: D40445312

fbshipit-source-id: fe28b58c5dca6c91389ad38675ca37669a4965a0
2022-10-17 16:17:17 -07:00
Vincent Riemer 55fca7fd38 Add PointerOver/PointerOut handling test
Summary:
Changelog: [RNTester][Internal] - Add PointerOver/PointerOut handling test

This diff adds another platform test based on WPT testcase for mouseover/mouseout events but instead applied to pointerover/pointerout events recently implemented for RN.

Reviewed By: lunaleaps

Differential Revision: D40359286

fbshipit-source-id: 672f413f56faca55b9d838150fb66de66d78d6f2
2022-10-17 15:34:16 -07:00
bang9 048194849b feat(iOS): added lineBreakStrategy attribute to Text/TextInput (#31272)
Summary:
iOS did not support the implementation of Korean word-wrap(line-break) before iOS14.
If the attribute applied, the word-wrap of Korean will works.

## 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] -  Line break strategy for Text and TextInput components

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

Test Plan:
1. Test build and run on above iOS 14.
2. Test it does not affect existing text components when set default(none) strategy.
3. Test whether word-wrap works with Korean when set hangul-word strategy.

<img src="https://user-images.githubusercontent.com/26326015/112963967-d7f70c00-9182-11eb-9a34-8c758b80c219.png" width="300" height="" style="max-width:100%;">

Reviewed By: javache

Differential Revision: D39824809

Pulled By: lunaleaps

fbshipit-source-id: 42cb0385221a38c84e80d3494d1bfc1934ecf32b
2022-10-17 13:14:17 -07:00
Sam Zhou a0ee6fae5e Annotate empty arrays in xplat
Summary: Changelog: [Internal]

Differential Revision: D40410427

fbshipit-source-id: f819fcb00673e19b21aecb383541850436805a0e
2022-10-17 12:40:57 -07:00
Lorenzo Sciandra cb2dcd327c feat(jest): move Jest config to use a custom react-native Jest env (#34971)
Summary:
This PR is the follow up to the conversation started here by SimenB: https://github.com/react-native-community/discussions-and-proposals/issues/509

Basically, we want to move RN to use its own custom environment so that we can tweak it going forward - this PR in fact only sets up the groundwork for that; robhogan mentioned that with this in place, Meta engineers can
> iterate on it (with jest-environment-node as a starting point) against our internal product tests

This is also connected to Rob's work to bring Jest 29 into the codebase https://github.com/facebook/react-native/pull/34724 and my "mirror" PR to bring template in main up to the same version (https://github.com/facebook/react-native/pull/34972)

## 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] [Changed] - move Jest config to use a custom react-native Jest env

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

Test Plan: Tested that `yarn test` in main works fine after the changes; CI and Meta's internal CI will also serve the purpose of verifying that it works (but there's no reason not to since it's still pretty much just relying on `node`).

Reviewed By: huntie

Differential Revision: D40379760

Pulled By: robhogan

fbshipit-source-id: 2c6d0bc86d337fda9befce0799bda2f56cc4466c
2022-10-17 12:40:25 -07:00
youedd 633498fe9a refactor module's platform verification (#34961)
Summary:
Part of https://github.com/facebook/react-native/issues/34872

> [Assigned to youedd] Extract the nameToValidate logic ([Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L704-L713), [TypeScript](https://github.com/facebook/react-native/blob/f353119113d6fc85491765ba1e90ac83cb00fd61/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L738-L747)) into a shared function into the parser/utils.js file. Notice that you may need a callback to update the cxx boolean.

## 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
-->

[Changed] [Internal] - refactor parser module platform verification

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

Test Plan:
`yarn jest react-native-codegen`

![image](https://user-images.githubusercontent.com/19575877/195425654-46f9e560-efd3-4945-b913-c6d9f6bb7ec2.png)

Reviewed By: cipolleschi

Differential Revision: D40319245

Pulled By: skinsshark

fbshipit-source-id: bc36cdcfa06047e1acee0d638f5756b6462d76d1
2022-10-17 11:08:06 -07:00
Samuel Susla a63a4fa7d2 React Native sync for revisions 0cac4d5...fd31724
Summary:
- **[9fb581c7c](https://github.com/facebook/react/commit/9fb581c7c )**: Refactor: merge duplicate imports ([#25489](https://github.com/facebook/react/pull/25489)) //<c0dedance>//
- **[bc358362a](https://github.com/facebook/react/commit/bc358362a )**: [Flight] Improve Error Messages when Invalid Object is Passed to Client/Host Components ([#25492](https://github.com/facebook/react/pull/25492)) //<Sebastian Markbåge>//
- **[780eacd40](https://github.com/facebook/react/commit/780eacd40 )**: Flow upgrade to 0.190 ([#25483](https://github.com/facebook/react/pull/25483)) //<Jan Kassens>//
- **[54f0e0f73](https://github.com/facebook/react/commit/54f0e0f73 )**: Scaffolding for react-dom/unstable_external-server-runtime ([#25482](https://github.com/facebook/react/pull/25482)) //<Andrew Clark>//
- **[0eaca3756](https://github.com/facebook/react/commit/0eaca3756 )**: Add script to generate inline Fizz runtime ([#25481](https://github.com/facebook/react/pull/25481)) //<Andrew Clark>//
- **[69c7246d9](https://github.com/facebook/react/commit/69c7246d9 )**: Initialize useMemoCache with sentinel values ([#25465](https://github.com/facebook/react/pull/25465)) //<Joseph Savona>//
- **[3b814327e](https://github.com/facebook/react/commit/3b814327e )**: Allow Async Functions to be used in Server Components ([#25479](https://github.com/facebook/react/pull/25479)) //<Sebastian Markbåge>//
- **[a6bf46689](https://github.com/facebook/react/commit/a6bf46689 )**: Extract Fizz instruction set to build macro ([#25457](https://github.com/facebook/react/pull/25457)) //<Andrew Clark>//
- **[ea5bc6bac](https://github.com/facebook/react/commit/ea5bc6bac )**: [React Native FB] dynamic feature flag for ref access warning ([#25471](https://github.com/facebook/react/pull/25471)) //<Jan Kassens>//
- **[08d035bc8](https://github.com/facebook/react/commit/08d035bc8 )**: Remove Shallow Renderer Tests ([#25475](https://github.com/facebook/react/pull/25475)) //<Sebastian Markbåge>//
- **[a8c16a004](https://github.com/facebook/react/commit/a8c16a004 )**: Split Cache into its own Dispatcher ([#25474](https://github.com/facebook/react/pull/25474)) //<Sebastian Markbåge>//
- **[2cf4352e1](https://github.com/facebook/react/commit/2cf4352e1 )**: Implement HostSingleton Fiber type ([#25426](https://github.com/facebook/react/pull/25426)) //<Josh Story>//
- **[aa9988e5e](https://github.com/facebook/react/commit/aa9988e5e )**: Server render fork for react-dom ([#25436](https://github.com/facebook/react/pull/25436)) //<Josh Story>//
- **[513417d69](https://github.com/facebook/react/commit/513417d69 )**: Return lastNonHostInstance in getInspectorDataForInstance for devtools ([#25441](https://github.com/facebook/react/pull/25441)) //<Tianyu Yao>//
- **[5d60a0b84](https://github.com/facebook/react/commit/5d60a0b84 )**: Bugfix: LegacyHidden shouldn't defer effects ([#25442](https://github.com/facebook/react/pull/25442)) //<Andrew Clark>//
- **[618388bc3](https://github.com/facebook/react/commit/618388bc3 )**: [Float] Support script preloads ([#25432](https://github.com/facebook/react/pull/25432)) //<Josh Story>//
- **[2872a26e1](https://github.com/facebook/react/commit/2872a26e1 )**: track resources in different roots separately ([#25388](https://github.com/facebook/react/pull/25388)) //<Josh Story>//
- **[ea04a486a](https://github.com/facebook/react/commit/ea04a486a )**: Flow: remove unused suppressions ([#25424](https://github.com/facebook/react/pull/25424)) //<Jan Kassens>//
- **[9813edef2](https://github.com/facebook/react/commit/9813edef2 )**: Flow upgrade to 0.188 //<Jan Kassens>//
- **[3b6826ed9](https://github.com/facebook/react/commit/3b6826ed9 )**: Flow: inference_mode=constrain_writes //<Jan Kassens>//
- **[aed33a49c](https://github.com/facebook/react/commit/aed33a49c )**: Flow upgrade to 0.185 //<Jan Kassens>//
- **[f02a5f5c7](https://github.com/facebook/react/commit/f02a5f5c7 )**: Flow upgrade to 0.182 //<Jan Kassens>//
- **[72593f008](https://github.com/facebook/react/commit/72593f008 )**: Flow upgrade to 0.176 //<Jan Kassens>//
- **[46d40f306](https://github.com/facebook/react/commit/46d40f306 )**: Flow upgrade to 0.175 //<Jan Kassens>//
- **[1089faf0d](https://github.com/facebook/react/commit/1089faf0d )**: Flow: run codemod to remove existential type //<Jan Kassens>//
- **[3fd9bd8e7](https://github.com/facebook/react/commit/3fd9bd8e7 )**: Add RulesOfHooks support for `use` //<Lauren Tan>//
- **[338e6a967](https://github.com/facebook/react/commit/338e6a967 )**: Flow upgrade to 0.155 //<Jan Kassens>//
- **[8bc95bb3c](https://github.com/facebook/react/commit/8bc95bb3c )**: Flow upgrade to 0.154 //<Jan Kassens>//
- **[9f8a98a39](https://github.com/facebook/react/commit/9f8a98a39 )**: Flow upgrade to 0.153 //<Jan Kassens>//
- **[64fe791be](https://github.com/facebook/react/commit/64fe791be )**: Flow upgrade to 0.146 //<Jan Kassens>//
- **[d3c6c16a0](https://github.com/facebook/react/commit/d3c6c16a0 )**: Flow upgrade to 0.145 //<Jan Kassens>//
- **[00a2f8150](https://github.com/facebook/react/commit/00a2f8150 )**: Flow upgrade to 0.143 //<Jan Kassens>//
- **[0a3072278](https://github.com/facebook/react/commit/0a3072278 )**: Flow: complete types first migration ([#25389](https://github.com/facebook/react/pull/25389)) //<Jan Kassens>//
- **[bcc05671f](https://github.com/facebook/react/commit/bcc05671f )**: Flow: types first in shared ([#25343](https://github.com/facebook/react/pull/25343)) //<Jan Kassens>//
- **[b1f34aa30](https://github.com/facebook/react/commit/b1f34aa30 )**: Flow: types first in react-native-renderer ([#25363](https://github.com/facebook/react/pull/25363)) //<Jan Kassens>//
- **[9143864ae](https://github.com/facebook/react/commit/9143864ae )**: Flow: well formed exports for smaller packages ([#25361](https://github.com/facebook/react/pull/25361)) //<Jan Kassens>//
- **[21a851e03](https://github.com/facebook/react/commit/21a851e03 )**: Fix devtools typos and grammar ([#24587](https://github.com/facebook/react/pull/24587)) //<Alexandru Tasica>//
- **[cfafeb685](https://github.com/facebook/react/commit/cfafeb685 )**: Remove extra space in Wedge.js ([#24611](https://github.com/facebook/react/pull/24611)) //<Kerim Büyükakyüz>//
- **[9c3de25e1](https://github.com/facebook/react/commit/9c3de25e1 )**: Flow: types first in reconciler ([#25362](https://github.com/facebook/react/pull/25362)) //<Jan Kassens>//
- **[7b25b961d](https://github.com/facebook/react/commit/7b25b961d )**: [Fizz/Float] Float for stylesheet resources ([#25243](https://github.com/facebook/react/pull/25243)) //<Josh Story>//
- **[4c016e7aa](https://github.com/facebook/react/commit/4c016e7aa )**: Refactor: use  property shorthand ([#25366](https://github.com/facebook/react/pull/25366)) //<zhangrenyang>//
- **[06066c1a5](https://github.com/facebook/react/commit/06066c1a5 )**: Make RulesOfHooks-test more consistent with ExhaustiveDeps-test //<Lauren Tan>//
- **[49ae0fad8](https://github.com/facebook/react/commit/49ae0fad8 )**: Fix RulesOfHooks test case indentation //<Lauren Tan>//
- **[abbbdf4ce](https://github.com/facebook/react/commit/abbbdf4ce )**: Put modern StrictMode behind a feature flag ([#25365](https://github.com/facebook/react/pull/25365)) //<Samuel Susla>//
- **[434110390](https://github.com/facebook/react/commit/434110390 )**: ReactHooks.js - delete emptyObject ([#25031](https://github.com/facebook/react/pull/25031)) //<Igor Berlenko>//
- **[31400ce29](https://github.com/facebook/react/commit/31400ce29 )**: Refactor: merge duplicate imports ([#25364](https://github.com/facebook/react/pull/25364)) //<jerry-lllman>//
- **[3517bd9f7](https://github.com/facebook/react/commit/3517bd9f7 )**: Refactor useEvent ([#25336](https://github.com/facebook/react/pull/25336)) //<Lauren Tan>//
- **[6cf06a929](https://github.com/facebook/react/commit/6cf06a929 )**: Remove outdated comments. ([#24464](https://github.com/facebook/react/pull/24464)) //<zhangenming>//
- **[20a257c25](https://github.com/facebook/react/commit/20a257c25 )**: Refactor: more word doubles removed ([#25352](https://github.com/facebook/react/pull/25352)) //<Vic Graf>//
- **[8cadcffd5](https://github.com/facebook/react/commit/8cadcffd5 )**: Fix typo: reconcilation -> reconciliation ([#25355](https://github.com/facebook/react/pull/25355)) //<zhangrenyang>//
- **[ebbe599a2](https://github.com/facebook/react/commit/ebbe599a2 )**: Fix EventListener fork ([#25347](https://github.com/facebook/react/pull/25347)) //<Sebastian Markbåge>//
- **[97d75c9c8](https://github.com/facebook/react/commit/97d75c9c8 )**: Move react-dom implementation files to react-dom-bindings ([#25345](https://github.com/facebook/react/pull/25345)) //<Sebastian Markbåge>//
- **[3de926449](https://github.com/facebook/react/commit/3de926449 )**: [Fizz] experimental_useEvent ([#25325](https://github.com/facebook/react/pull/25325)) //<dan>//
- **[5b59dd640](https://github.com/facebook/react/commit/5b59dd640 )**: Fix duplicate words tests ([#25333](https://github.com/facebook/react/pull/25333)) //<Vic Graf>//
- **[cb5084d1c](https://github.com/facebook/react/commit/cb5084d1c )**: [ESLint] Check useEvent references instead ([#25319](https://github.com/facebook/react/pull/25319)) //<Lauren Tan>//
- **[c89a83695](https://github.com/facebook/react/commit/c89a83695 )**: Update RulesOfHooks with useEvent rules ([#25285](https://github.com/facebook/react/pull/25285)) //<Lauren Tan>//
- **[efc6a08e9](https://github.com/facebook/react/commit/efc6a08e9 )**: [Flight] Implement error digests for Flight runtime and expose errorInfo in getDerivedStateFromError ([#25302](https://github.com/facebook/react/pull/25302)) //<Josh Story>//
- **[c1d414d75](https://github.com/facebook/react/commit/c1d414d75 )**: Add ref to Offscreen component ([#25254](https://github.com/facebook/react/pull/25254)) //<Samuel Susla>//
- **[135e33c95](https://github.com/facebook/react/commit/135e33c95 )**: Flow: typing of Scheduler ([#25317](https://github.com/facebook/react/pull/25317)) //<Jan Kassens>//
- **[cc8cb145f](https://github.com/facebook/react/commit/cc8cb145f )**: Flow: add some missing types in react-reconciler ([#25316](https://github.com/facebook/react/pull/25316)) //<Jan Kassens>//
- **[112d0498c](https://github.com/facebook/react/commit/112d0498c )**: [Fizz] Move digest from errorInfo to Error instance ([#25313](https://github.com/facebook/react/pull/25313)) //<Josh Story>//
- **[d1bb1c586](https://github.com/facebook/react/commit/d1bb1c586 )**: Fix memory leak after repeated setState bailouts ([#25309](https://github.com/facebook/react/pull/25309)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 0cac4d5...9fb581c

jest_e2e[run_all_tests]

Reviewed By: yungsters

Differential Revision: D40383219

fbshipit-source-id: dc2a44bd05df041e0c7f2e1060640b1d2c372187
2022-10-17 09:52:15 -07:00
Moti Zilberman 49cb7f28c8 Break runtime cycle between VirtualizedList and VirtualizedListContext
Summary:
Breaks the runtime dependency cycle introduced in D40259791 (https://github.com/facebook/react-native/commit/971599317b7bdf1152157206f9503a23ac8c4162) by converting a value import to a type import. (Unlike runtime dependency cycles, type-level cycles are OK as long as they are reasonably small.)

Changelog:
[General][Fixed] - Fix require cycle warning in VirtualizedList

Reviewed By: javache

Differential Revision: D40412019

fbshipit-source-id: 33bf3af12be64a1932549a0d11f2ce8b3c483218
2022-10-17 06:58:15 -07:00
Mohit Charkha 9fb3700d35 Extract MisnamedModuleInterfaceParserError from Flow and Typescript into error-utils.js (#34916)
Summary:
This PR is part of https://github.com/facebook/react-native/issues/34872
This PR extracts MisnamedModuleFlowInterfaceParserError exception to a separate function inside an error-utils.js file

## 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
-->

[Internal] [Changed] - Extract MisnamedModuleInterfaceParserError to a seperate function inside error-utils.js

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

Test Plan:
yarn jest react-native-codegen
Added unit case in `error-utils-test.js` file

<img width="980" alt="Extract MisnamedModuleInterfaceParserError test Screenshot" src="https://user-images.githubusercontent.com/86604753/194853899-22c1ce05-fe55-4102-a83b-15c707a20000.png">

Reviewed By: cipolleschi

Differential Revision: D40226541

Pulled By: motiz88

fbshipit-source-id: 6698ceff192c592383aa3419ac31de524c605919
2022-10-17 06:47:13 -07:00
Samuel Susla cd8319433b Remove all listeners of AnimatedNode when detached
Summary:
changelog: [internal]

Removing listener on detached node leads to a red box, if the said node is `DiffClampAnimatedNode`. This is because calling `AnimatedNode.__getNativeTag()` makes native module call and creates node in native. This node is not completely initialised and red boxes because `[RCTAnimatedNode parentNodes]` is nil when it shouldn't be.

The fix is make sure all listeners are removed before node is destroyed. It is logically correct thing to do. The fix is global, for all components using `DiffClampAnimatedNode`.

Reviewed By: yungsters

Differential Revision: D40381895

fbshipit-source-id: 4f558faf8101b70552f30e6360998e902aacbc83
2022-10-17 05:59:03 -07:00
Samuel Susla b0da3493bb Remove flag disabled_view_preallocation_android
Summary:
changelog: [internal]
unused flag

Reviewed By: mdvacca

Differential Revision: D40346707

fbshipit-source-id: dca8996f81a7675535e340e659eac01c4103f25f
2022-10-17 05:57:32 -07:00
Samuel Susla b5a40fb4f4 Remove flag enable_blocking_queues_for_animated
Summary:
changelog: [internal]

jest_e2e[run_all_tests]

Reviewed By: mdvacca

Differential Revision: D40340959

fbshipit-source-id: dc1250de7cd6107eab18b3705ec2d5b5a46fa9ad
2022-10-17 05:57:32 -07:00
Samuel Susla 90192377f5 Remove flag disable_revision_check_for_preallocation
Summary:
changelog: [internal]

jest_e2e[run_all_tests]

Reviewed By: mdvacca

Differential Revision: D40340758

fbshipit-source-id: d15351c7b1a8bc31b401640330b3e0106e8c8bb6
2022-10-17 05:57:32 -07:00
Samuel Susla 554f50b07e Delete feature flag disable_preallocation_on_clone_android
Summary:
changelog: [internal]

jest_e2e[run_all_tests]

Reviewed By: mdvacca

Differential Revision: D40304348

fbshipit-source-id: 8897bafdeedfcdc44eff5a8da1aa5028efcd0a3c
2022-10-17 05:57:32 -07:00
Fabrizio Cucci 7beaf3894e Extend AnimatedTransform to support transformation value arrays and objects
Summary:
Changelog:
[Internal][Added] - Add support for passing objects with `AnimatedNode` values and arrays of `AnimatedNode` elements in the `transform` styling prop.

Reviewed By: javache

Differential Revision: D40379943

fbshipit-source-id: 826b9cd0c0cfe02b55d86d1c735f8faf31196e64
2022-10-17 04:49:30 -07:00
Nicola Corti 3d05bac587 Unbreak Nightly job by providing a GPG key as base64 encoded.
Summary:
It seems like CircleCI is not handling well env variables with \n in it.
I'm moving it over to a base64 encoded string and I'm extending the publish
scripts to base64 decode the key.

Changelog:
[Internal] [Changed] - Unbreak Nightly job by providing a GPG key as base64 encoded.

Reviewed By: cipolleschi

Differential Revision: D40426438

fbshipit-source-id: a60a7e7ad71580e81e675c84008d2712712e42a6
2022-10-17 04:07:37 -07:00
Antoine Doubovetzky 3c8d678aad Extract visit function to parsers/utils (#34946)
Summary:
This PR is a task from https://github.com/facebook/react-native/issues/34872:
> Extract the visit function in a shared function in the parsers/utils.js folder. Use the new function in the Flow and TypeScript parsers.

## 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
-->

[Internal] [Changed] - Extract the visit function in a shared function in the parsers/utils.js

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

Test Plan: I tested using jest, flow and eslint commands.

Reviewed By: NickGerleman

Differential Revision: D40276462

Pulled By: cipolleschi

fbshipit-source-id: 299cc2a3aa65a9757b217192a13838d037c497a1
2022-10-17 02:35:27 -07:00
Sam Zhou 74fff88273 Fix or expose previously hidden type errors to prepare for LTI mode
Summary:
Changelog:
[Internal]

Reviewed By: jbrown215

Differential Revision: D40408230

fbshipit-source-id: 15b3190fccc2972075823947d413c71ec3eff7f0
2022-10-15 07:29:29 -07:00
Luna Wei 629e8e025f Add width, height, detail props
Summary: Changelog: [Internal] Add more properties to PointerEvent, ensure all web platform tests are passing

Reviewed By: mdvacca

Differential Revision: D40314330

fbshipit-source-id: 071683f26f5a1e17d7ea49ac022c0ca23b6f9947
2022-10-14 15:10:19 -07:00
Luna Wei 6733ee1358 Add option to only see failed tests
Summary: Changelog: [Internal] - Add an option to only see failed tests for PointerEvents web platform tests

Reviewed By: mdvacca

Differential Revision: D40281369

fbshipit-source-id: 638879b39ca66c11e722e6140c631dacfc98ee34
2022-10-14 15:10:19 -07:00
Luna Wei 71ae987820 Prefix web platform tests with wpt
Summary:
Changelog: [Internal] Reorder and prefix things with wpt for convenience

Open to other suggestions

Reviewed By: mdvacca

Differential Revision: D40247488

fbshipit-source-id: 4046040d5904b324a9a84dc47f4de858456e7bbc
2022-10-14 15:10:19 -07:00
Tianyu Yao 94429fb037 Highlight elements on press + hove
Summary:
Changelog:
[General][Added] - Highlight elements on hover while mouse down for React DevTools element inspection.

Since there is probably no mouse hover events for RN, this diff implements something that works similar like hover for RN: user keeps the mouse down and moves the cursor around, and the elements under the mouse is highlighted just like Web.

Reviewed By: lunaruan

Differential Revision: D40369733

fbshipit-source-id: ef223ee0f31f4e0372674fc39dd13bad8c15aa92
2022-10-14 14:58:43 -07:00
Jordan Brown 46642928c4 Defaults for jest.fn's type parameters
Summary:
This diff adds defaults to Jest.fn's type params.

An upcoming change to flow will be more restrictive about how we implicitly instantiation type arguments. Since the argument to jest.fn is often omitted, this signature is the single biggest offender of our new rules. To reduce the error diff, I'm adding reasonable defaults so that the mocked function can still behave like a function without adding extra flow errors where there were none before.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D40394215

fbshipit-source-id: 2df596b6ba8b54680694e08c432a1e7c94dc2df0
2022-10-14 14:32:35 -07:00
Sam Zhou 3e58a9c531 Deploy 0.190.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D40393734

fbshipit-source-id: cc7a5e1fd28512c8141a0f705580a447efcd5575
2022-10-14 14:07:54 -07:00
Héctor Ramos 0db5178688 React-jsidynamic: Move JSIDynamic out of React-jsi
Summary:
The jsi library itself is `jsi/jsi.{h,cpp}`. JSIDynamic provides support for converting between folly::dynamic and jsi::value, independent of the jsi library.

Changelog:
[iOS][Changed] Moved JSIDynamic out of React-jsi and into React-jsidynamic

Reviewed By: cipolleschi, dmytrorykun

Differential Revision: D40334023

fbshipit-source-id: d2c69e7afb7f43f93080301b88c81e1fa46279d7
2022-10-14 12:01:51 -07:00
Jordan Brown b7f07473df Improve the type of Platform.select for Android
Summary:
There's no need for the 3 type arguments here. Flow will infer a union already if multiple properties are provided. Worse, by not providing these properties these tvars end up with no bounds, which can cause downstream constraints to stall. All of the suppresisons added here are for legitimate errors that were uncovered by consolidating to one type argument.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D40355811

fbshipit-source-id: 088fd087017a6082c793ef00c8810a81b39fb9fb
2022-10-14 11:13:38 -07:00
Paige Sun 20c9654ca7 2/n Code clarity: Use enum to clarify the values parsed by JsErrorHandler
Summary:
Changelog: [Internal] Code clarity: Use enum to clarify the values parsed by JsErrorHandler

Create a enum `JSErrorHandlerKey` to define the keys for the values that goes into each stack frame.

Next up -- using this in the Bridge!

Reviewed By: sammy-SC

Differential Revision: D40326127

fbshipit-source-id: e416814fbcaa922afa92d9baf79eaa898ff979f0
2022-10-14 10:48:47 -07:00
Jiamin Zhu 4631cf933e Revert D40374535: Deploy 0.190.0 to xplat
Differential Revision:
D40374535 (https://github.com/facebook/react-native/commit/5359f1de12c9ef1924926c881e6752016f245913)

Original commit changeset: 92788a21a4f2

Original Phabricator Diff: D40374535 (https://github.com/facebook/react-native/commit/5359f1de12c9ef1924926c881e6752016f245913)

fbshipit-source-id: a0115dc24590bc50fa1aee2770dbb13b2edaf580
2022-10-14 10:45:04 -07:00
Samuel Susla 70cc27c901 Center text if line height isn't 0
Summary: changelog: Fix vertical text alignment in new architecture when line height is not 0.

Reviewed By: javache

Differential Revision: D40346225

fbshipit-source-id: f6282cb8df80e9a543e5602fddcca1a1a82377e3
2022-10-14 10:32:50 -07:00
generatedunixname89002005287564 712fcdec9d supermodule:xplat/default/public.react_native.playground
Reviewed By: jkeljo

Differential Revision: D40377133

fbshipit-source-id: d029452e34edecdf968aa60fb8a3a062bca60d92
2022-10-14 10:27:52 -07:00