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

24777 Коммитов

Автор SHA1 Сообщение Дата
Nicola Corti 833222fa10 Remove shelljs dependency and duplicated scripts in files (#33915)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33915

We don't need to import shelljs as a dependency anymore,
plus we had a duplicated entry in the files array for package.json

Changelog:
[Internal] [Changed] - Remove shelljs dependency and duplicated scripts in files

Reviewed By: dmitryrykun

Differential Revision: D36698750

fbshipit-source-id: 94f449f2c3c5d73d0f9ffd29df6b26f5fd6ef129
2022-05-26 05:17:30 -07:00
Joshua Gross b1701bd20f ReactTextView View recycling
Summary:
See previous diff for details on general approach and benchmarks.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D36676887

fbshipit-source-id: b177dcd19f1ea687bf7d2d4f2f637d2924723340
2022-05-26 03:40:21 -07:00
Joshua Gross 7b778fbebb Prototype View recycling for View
Summary:
Prototype of View Recycling for View + generic APIs.

Changelog: [Added][Android] Adding experimental View Recycling for Fabric on Android.

Reviewed By: mdvacca

Differential Revision: D36608419

fbshipit-source-id: c469ce2fe12ef9332d3def591118befc4a619870
2022-05-26 03:40:21 -07:00
Eric Hartzog 0ef73f2a82 Restore early return to NativeAnimatedHelper.flushQueue
Summary:
Brings back a small performance win of avoiding starting/stopping a batch if the queue is empty.

## Background

This was attempted previously but it happened to expose a single frame animation visual regression in VR.

1. First added in D36298399 (55ee8ce0c4), reverted in D36378363
2. Added in a different form in D36338606 (35e2a63b8d), reverted in D36479089 (a4690d054f)
3. Root cause of the visual regressions introduced was fixed in D36612758 (40f4c662bc)

Now that we've fixed the root cause of the visual regression, this is safe to restore.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D36670591

fbshipit-source-id: 42b6bc9c7764484f2dbb9edb122780a91b7393b4
2022-05-25 16:35:11 -07:00
Genki Kondo 27bbb5ef37 Add RTL option to FlatList example
Summary:
Followup task for S271544.

There were no tests covering RTL on FlatLists, which would have prevented the above SEV. Adding an RNTester example for this.

Changelog:
[Internal] - Added RNTester example FlatList with RTL

Reviewed By: lunaleaps, javache

Differential Revision: D36601583

fbshipit-source-id: 054ac4eee876a514152f83ecc0522c62337cfea5
2022-05-25 13:24:13 -07:00
Ramanpreet Nara 40a86b0650 Add more information to JavaScript module not registered as callable error message
Summary:
When a JavaScript module is not registered as callable, the bridge will throw an error. Let's clean up the error message so that it's more helpful.

Now, it logs the number of registered callable JavaScript modules, as well as the list of callable JavaScript modules.

Changelog: [Internal]

Reviewed By: sshic

Differential Revision: D36646936

fbshipit-source-id: 62d091cda35e296ef9e569b444cd5b6f09b8bc54
2022-05-25 13:21:08 -07:00
David Vacca fd9c677f0c EZ sort of annotations
Summary:
EZ sort of annotations

changelog: [internal] internal

Reviewed By: sshic

Differential Revision: D35682782

fbshipit-source-id: 5763b140ee4ce54e467e0a80c6d835ae0c4234db
2022-05-25 13:08:29 -07:00
David Vacca ddad5d1265 Remove DevToolsReactPerfLoggerListener when FabricUIManager is deallocated
Summary:
Remove DevToolsReactPerfLoggerListener when FabricUIManager is deallocated

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D36500223

fbshipit-source-id: d44e0d07390724191360540e04a51261803eb57c
2022-05-25 12:22:29 -07:00
Luna Wei 40769f2212 PointerEvents: Don't dispatch when no listeners for hover events
Summary:
Changelog: [Internal][Changed] - Make the same optimization on enter/leave/move pointer events being dispatched by a mouse input.

If any ancestor view is listening to enter/leave events (just capture) then we dispatch the enter/leave event.

Reviewed By: vincentriemer

Differential Revision: D36601638

fbshipit-source-id: d6b5c32ae50bcf000100bcb878ca2ca89bd5c02e
2022-05-25 11:49:56 -07:00
Héctor Ramos 0ad38a0eae Bump React Native iOS tests to Xcode 13.3.1
Summary:
Upgrade the version of Xcode used in Sandcastle to Xcode 13.3.1, and the version used on Circle CI to Xcode 13.3.1.

Added a reminder to the Circle CI config to ensure we keep these versions in sync in future updates.

Circle CI software manifest: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v7555/index.html

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D36671468

fbshipit-source-id: 8c028915d38738c92b5f759186b0fb95a9274211
2022-05-25 11:44:42 -07:00
Genki Kondo 40f4c662bc Set correct initial value for AnimatedComponent for styles backed by native animated nodes
Summary:
In AnimatedComponent.render, we get the initial values of any styles backed by AnimatedNode, but ONLY for non-native animations. Thus, if convert an animated node to native before the call to render to mount the component, we will end up not applying the initial value until after the component is mounted. This may result in a visible flicker as the expected value is applied some time after the component is mounted and visible.
- Without native driver: BaseViewManager.setTransform called during view preallocation (ViewManager.createViewInstance)
- With native driver: BaseViewManager.setTransform called during MountingManager.updateProps (called from PropsAnimatedNode.updateView)

This diff removes the isNative check in AnimatedStyle and AnimatedProps when traversing style props. This shouldn't be a problem:
- Created as non-native, animated with JS driver
  - This diff does not affect this scenario
- Created as non-native, animated with native driver
  - Initial value is applied correctly on render/mount. On subsequent renders, the outdated value from JS side will not apply on the platform view as it has not changed.
- Created as native, animated with native driver
  - Initial value is applied correctly on render/mount. On subsequent renders, the outdated value from JS side will not apply on the platform view as it has not changed.

Changelog:
[Internal][Fixed] - Set correct initial value for AnimatedComponent for styles backed by native animated nodes

Reviewed By: JoshuaGross, javache

Differential Revision: D36612758

fbshipit-source-id: 922d6534c605b3eb0a1d9476753111b726f138f2
2022-05-25 10:33:17 -07:00
Nicola Corti ba6bf5a3ce Fix NPE on RN-Tester due to null mFabricViewStateManager (#33910)
Summary:
RN-Tester is currently crashing at startup time due to an NPE.
This PR fixes it.

## Changelog

[Android] [Fixed] - Fix NPE on `ReactEditText` due to null mFabricViewStateManager

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

Test Plan: Tested locally that RN Tester runs both in Debug and in Release

Reviewed By: cipolleschi

Differential Revision: D36666440

Pulled By: cortinico

fbshipit-source-id: f004ff228fb4f9ff339aac606858d47de3706426
2022-05-25 10:10:35 -07:00
David Vacca d315e9c743 Add feature flag to enable / disable SpannableCache in TextLayoutManagerMapBuffer
Summary:
Quick diff to add feature flag to enable / disable SpannableCache in TextLayoutManagerMapBuffer

changelog: [internal] internal

Reviewed By: genkikondo

Differential Revision: D36498646

fbshipit-source-id: 4cabb75441ddbafeff65f3e9b2df6a38431a996a
2022-05-25 09:14:44 -07:00
Lulu Wu 089ff4555a Revamp touch event dispatching methods
Summary:
There are two methods in ReactRootView to handle touch events "onInterceptTouchEvent" and "onTouchEvent", for Venice we have ReactSurfaceView inherits ReactRootView but the implementation for above 2 touch handling methods still calls into it's super implementation which uses the bridge.

In this diff we make ReactSurfaceView inherits ReactRootView's "dispatchJSTouchEvent" and "dispatchJSPointerEvent". So that Venice has separate implementation for touch events handling.

Changelog:
[Android][Changed] - Revamp touch event dispatching methods

Reviewed By: fkgozali, JoshuaGross

Differential Revision: D36629466

fbshipit-source-id: fb7c5950afe6249d22edd3fac3fa5d3b83b3af84
2022-05-25 09:12:35 -07:00
Riccardo Cipolleschi ad76eb368e Avoid installing Flipper in CI (#33899)
Summary:
This PR speeds up the build in CircleCI by avoiding adding Flipper dependency when running in CI.

The savings are:
* ~ 13/15% for `test_ios`
* ~ 30/40% for `test_rntester`
* ~50% for `test_ios_template`~

**Edit after review**: We do actually want to have Flipper in the `test_ios_template` to check that it builds correctly.

## Changelog
[iOS] [Changed] - Do not add Flipper when running in CI.

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

Test Plan:
CircleCI passing with these stats:

| BEFORE | AFTER |
| ---- | ---- |
| <img width="663" alt="FlipperCI-Before" src="https://user-images.githubusercontent.com/11162307/170006493-2651b000-0421-47c3-90e9-153474c15a95.png"> | <img width="652" alt="FlipperCI-After" src="https://user-images.githubusercontent.com/11162307/170006557-34e53601-66b4-4054-a156-0e2349f48dc2.png"> |

Reviewed By: cortinico

Differential Revision: D36625117

Pulled By: cipolleschi

fbshipit-source-id: 9de9db27552a7637551cd5bb623b10cb4aebb1eb
2022-05-25 09:00:38 -07:00
Pieter De Baets debc32b075 Fix startListeningToAnimatedNodeValue in NativeAnimated batch mode
Summary:
This op code was incorrectly configured to take two args, while it only takes one.

Changelog: [Internal]

Differential Revision: D36664590

fbshipit-source-id: 6e1fdb9f64bbd32fbe05bbd174f94ae57292bcf9
2022-05-25 08:36:38 -07:00
Nicola Corti 26a54169f2 Remove unused Makefiles from React Native core
Summary:
This diff cleans up several Android Makefiles which we're not using anymore
as they've been replaced by CMake files.

There are still 3 Makefiles left, which I'm aiming to remove in the near future.

Changelog:
[Internal] [Changed] - Remove unused Makefiles from React Native core

Reviewed By: javache

Differential Revision: D36660902

fbshipit-source-id: 8afffac74d493616b0f9414567821cd69f4ef803
2022-05-25 07:54:06 -07:00
Pieter De Baets 7a16106b2d Simplify mapBufferSerializationEnabled feature flag
Summary:
There's no need for this to be a setter/getter, as there are no side-effects, and it means we can use the same helper method to read it as other feature flags.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36595602

fbshipit-source-id: d27c01bd39d03606a6f8c17ba181a8cd0bf58dbb
2022-05-25 07:47:07 -07:00
Pieter De Baets 5ae53cc051 Experiment with HostFunction caching in TurboModules
Summary:
Enables two new experiments (and the current behaviour as default) to speed up access to TurboModule methods from JS.

1) HostObject - Current behaviour
2) Prototype - Connect the TM HostObject via `__proto__`, and cache any methods accessed on the wrapper object.
3) Eager - Eagerly store all methods on the wrapper object, do not expose the HostObject to JS at all (TurboModules no longer need to be HostObjects in this scenario)

Changelog: [Internal]

Reviewed By: JoshuaGross, rubennorte, mdvacca

Differential Revision: D36590018

fbshipit-source-id: c9565eb239eb6aeee0f06b581ff8cd72a92073fc
2022-05-25 07:46:21 -07:00
Pieter De Baets d5045252f8 Cleanup TurboModuleBinding
Summary:
* Make constructor private, all access is through install()
* Use nullability of longLivedObjectCollection_ instead of separate bool disableGlobalLongLivedObjectCollection_

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D36592492

fbshipit-source-id: d65e779e1ac9fbe121937c5a20763aefcd589795
2022-05-25 07:46:21 -07:00
Franco Meloni 9f112af50a Add comment to explain why production flag is used when Flipper is enabled (#33902)
Summary:
Follow up of https://github.com/facebook/react-native/pull/33882

## Changelog

[Internal] - Add comment to explain why production flag is used when Flipper is enabled

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

Reviewed By: cortinico, f-meloni

Differential Revision: D36632238

Pulled By: cipolleschi

fbshipit-source-id: a859006851d9f50a4ad0ae1141006e8dac7aee6e
2022-05-25 07:00:29 -07:00
Rubén Norte 83631848d2 Permamently enable yielding in runtime scheduler
Summary: changelog: [internal]

Reviewed By: RSNara

Differential Revision: D36638658

fbshipit-source-id: 770d56abb2e2490684ab01e97e5cc7018f247fc8
2022-05-25 05:08:37 -07:00
Pieter De Baets c02b5b8ad4 Default TextInput padding to 0 in Fabric
Summary:
In D36345402 (56e9aa369f) I changed the behaviour for mount items to be skipped if they were just setting zero values. AndroidTextInput is the only component that I'm aware of that has non-zero padding by default, and we account for this when creating the native shadow node. This optimization broken TextInput use-cases that explicitly request zero-padding, since we end up ignoring it.

To keep this optimization, explicitly init ReactTextInput's padding to 0, but only in Fabric. `updateState` was the closest thing I could find to a Fabric-only callback, once it's fully rolled out, we can also move this to the constructor.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D36545775

fbshipit-source-id: 07bb96032c69d7e350980b0b975e637b66c307ed
2022-05-25 03:48:32 -07:00
Héctor Ramos 38b70653b2 Hermes: Use pre-built artifacts in hermes-engine
Summary:
Update `hermes-engine.podspec` to use pre-built Hermes artifacts from the corresponding React Native GitHub Release when targeting a specific React Native release.
Otherwise, fallback to building Hermes from source.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36609257

fbshipit-source-id: 6179c9e255558c7eaf1417ff46a2e7db120295f0
2022-05-25 03:30:57 -07:00
Vlad Hnatiuk a70968807b Fix crash in folly object conversion
Summary:
Due to invalid utf-8 data NSString may return nil during initialisation and this leads to crash when nil goes to NSDictionary or NSArray

Changelog: [Internal]

Differential Revision: D36623628

fbshipit-source-id: 23efad87cc9fe4a23c5e90dad63e0d74036b62fa
2022-05-25 03:29:17 -07:00
Scott Kyle c006722e6c Fix nullability lost on readonly types
Summary:
This fixes an issue where nullability was lost on readonly types in TurboModules specs. The "outside" nullability would be ignored in favor of only respecting the "inside" nullability (i.e. `?$ReadOnly<{}>` vs `$ReadOnly<?{}>`). It now ensure either is propagated correctly.

Changelog:
[General][Fixed] Fix nullability lost on readonly types in TurboModule specs

Reviewed By: RSNara

Differential Revision: D36615346

fbshipit-source-id: 42408d9298703f4c382657f573480d2574d6c973
2022-05-24 19:35:29 -07:00
Scott Kyle 3c569f546c Support mixed types only for C++
Summary:
There are cases where we want to pass arbitrary types to a TurboModule, which may then handle the values appropriately, but we haven't supported this use case. Since C++ TurboModules can accept any `jsi::Value` (unlike Java/ObjC) and we have real-world need for this (otherwise we must require JSON serialization), this now allows `mixed` (`unknown` in TypeScript) for C++-only TurboModules.

Changelog:
[General][Added] C++ TurboModule methods can now use mixed types

Reviewed By: RSNara

Differential Revision: D36611299

fbshipit-source-id: bbf29dfcc6aed67e213bb3eab06537c18c7db1fe
2022-05-24 19:35:29 -07:00
Vincent Riemer b2aa41578e Add basic platform testing framework for RNTester
Summary: Changelog: [RNTester][Internal] - Add experimental platform testing framework for RNTester

Reviewed By: lunaleaps, kacieb

Differential Revision: D36633708

fbshipit-source-id: 0f2f7642bc6db31e148a2a214c17fe39656612fd
2022-05-24 19:14:11 -07:00
Héctor Ramos 004b8609d9 Hermes: Add scripts to package, remove shelljs
Summary:
The new Hermes scripts need to be included in the `react-native` npm.

The `shelljs` dependency that was used by the Hermes scripts is a dev dependency, so instead of adding to the `react-native` npm size, we refactored its use out of hermes-utils.js.

Changelog:
[General][Added] - Add Hermes scripts to package

Reviewed By: cortinico

Differential Revision: D36387135

fbshipit-source-id: 12d0bc29d365c4cb18d33a0d390e6e7d34864b7a
2022-05-24 14:08:48 -07:00
Franco Meloni 55133eaa25 Use pullbot token instead of GITHUB_TOKEN on the Danger Action (#33900)
Summary:
GITHUB_TOKEN doesn't have write permissions on forks, using the pullbot token instead.

https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

## 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
-->
[Internal] - Use pullbot token instead of GITHUB_TOKEN on the Danger Action

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

Test Plan: CI will validate it

Reviewed By: cipolleschi

Differential Revision: D36627043

Pulled By: f-meloni

fbshipit-source-id: bc7ff2f463c9d7cac61d362440858945edfbdbaf
2022-05-24 06:20:58 -07:00
Nicola Corti 1ee7a0a67e Attempt to fix test_android by adding a react-native.config.js inside rn-tester (#33901)
Summary:
`test_android` is now red because I had to specify a root for RN tester.
The job is now failing as it fails to find the correct platforms for the bundler command.
This PR fixes it.

## Changelog

[Internal] - Attempt to fix test_android by moving react-native.config.js

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

Test Plan: Tested locally + will wait for a CI result

Reviewed By: cipolleschi

Differential Revision: D36625857

Pulled By: cortinico

fbshipit-source-id: 01852cc966e611c6724ba528ea351a17011d62e2
2022-05-24 05:55:40 -07:00
Franco Meloni 0bd5239553 Move `use_flipper` logic inside `use_react_native` and simplify the Flipper dependencies logic (#33882)
Summary:
This PR tries to simplify the `use_flipper` logic:
- makes `use_flipper` a configuration inside `use_react_native`'s options
- uses the already present `production` flag in the `use_react_native`'s options to decide if add or not the Flipper pods
- Simplifies the logic to download the flipper dependencies

This PR also adds a workaround for https://github.com/facebook/react-native/issues/33764

## 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] [Changed] - Move `use_flipper` logic inside `use_react_native` and simplify the Flipper dependencies logic

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

Test Plan: Executed a pod install with and without flipper and with isProduction true

Reviewed By: cipolleschi

Differential Revision: D36592338

Pulled By: f-meloni

fbshipit-source-id: 3c3f773151513e27e251f18865986e942a96ffd9
2022-05-24 04:37:46 -07:00
Riccardo Cipolleschi 9596bf045d Fix tests for Windows (#33893)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33893

The previous diff was breaking the external CI tests on Windows because of the file separators.

The fix was to use UNIX separator but to apply `path.normalize` to make sure that the path is platform agnostic.

## Changelog
[General][Fixed] - Make tests pass for windows

Reviewed By: cortinico

Differential Revision: D36597593

fbshipit-source-id: 47731f34a08c778268a6cc9674257403985d4599
2022-05-24 01:41:08 -07:00
Joshua Gross d304ca8da6 Animated: add debug logging for batched animation operation
Summary:
Just adding a simple log.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D36565733

fbshipit-source-id: e57e6bed500ca01165ffe8eccfbedc7ce969fb01
2022-05-23 16:54:58 -07:00
Joshua Gross 16ce685708 Do not run UiThreadUtil asserts outside of debug mode
Summary:
I have never seen these asserts fire in production. They're pretty cheap but the cost is not zero. We will use annotations and test carefully in debug if we need to ensure that something runs on a particular thread - which we do anyway.

Motivation: this method is called /extremely frequently/, everywhere in the mounting layer. And 99.99% of the time it's completely useless and results in absolutely no signal. In many cases, it will be called hundreds or thousands of times during a single operation (for example, when executing the IntMountBuffer items, each sub-item will call this many times).

Wall-clock time is usually low according to systrace (sometimes there are odd spikes), but over time these do add up and it seems good to save a few ms here and there.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D36539399

fbshipit-source-id: 3e023be64b8c9f0e6c3c8347c077ce9fa38f74a4
2022-05-23 16:54:58 -07:00
Joshua Gross b36afe74ca Improve systrace marker in IntBufferBatchMountItem
Summary:
It's useful to have more systrace markers that are all the same, so that they can all be aggregated and work underneath them aggregated across an entire trace. As it is, this marker gets treated as unique nearly every time which makes analysis harder.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D36533075

fbshipit-source-id: 925afa7db152eca1166891b41e7c6f6a511840af
2022-05-23 16:54:58 -07:00
Joshua Gross 87d3ac3762 Use setImmediate instead of setTimeout in Animated queue debounce
Summary:
setImmediate will result in these debounced/queued operations being sent to native immediately at the end of a ReactJS render loop instead of in the next tick, which could result in more fluid animations.

I verified with logs that batching still occurs.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D36521717

fbshipit-source-id: 4f94e26503d4e6e40f52a4120ae407044af0c451
2022-05-23 16:54:58 -07:00
Luna Wei 471907c047 PointerEvents: Mark when listened to for touch interactions
Summary: Changelog: [Internal] - Bypass dispatching an event if no view along the hierarchy is listening to it. Only applied for touch-based interactions. Next change will add optimization for mouse interactions

Reviewed By: vincentriemer

Differential Revision: D35739417

fbshipit-source-id: 134ffefef3bb4f97bf3e63b6bccc0caca464dfbd
2022-05-23 16:29:52 -07:00
Nicola Corti 0cff2efd3a Do not publish Android tests inside the NPM package
Summary:
We don't want to include tests as they're not valuable for our users + the might break users build if they try to run `./gradlew build`.

Changelog:
[Internal] [Changed] - Do not publish Android tests inside the NPM package

Reviewed By: cipolleschi

Differential Revision: D36600831

fbshipit-source-id: b88ee4dc93f276cd0729a2193346f5fcde34323c
2022-05-23 12:28:33 -07:00
Héctor Ramos 8e80dc844c Circle CI: Build Hermes apple runtime artifacts on CI (#33876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33876

WIP. Published so we can export and test on CI.

These two jobs can likely be merged onto the existing build_hermesc_macos job.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D36538847

fbshipit-source-id: e52c39ccfe652e70c54fd4892513c0060c3f021d
2022-05-23 12:14:29 -07:00
Héctor Ramos 6e18dda43d Hermes: Use published hermes-engine for tagged RN releases
Summary:
For published RN releases, use a published hermes-engine pod that corresponds to the current React Native version.

For unpublished RN versions, continue consuming the local hermes-engine pod which requires building Hermes from source.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36533683

fbshipit-source-id: 963a0f0e24baaf73a87c9bae4bc20d83757bbfde
2022-05-23 12:14:29 -07:00
Héctor Ramos c6fb89a0e8 Hermes: Use pre-built hermes-engine if hermes-artifact-url is set
Summary:
Introduces option to use pre-built Hermes binaries.

Requires a `hermes-engine` pod release to have been published in the following manner:

```
env hermes-artifact-url='https://github.com/facebook/react-native/releases/download/vX.Y.Z/hermes-runtime-darwin-vX.Y.Z.tar.gz' pod trunk push hermes-engine.podspec
```
...where "vX.Y.Z" corresponds to a published React Native release on GitHub where the `hermes-runtime-darwin-vX.Y.Z.tar.gz` binary was generated and/or uploaded as part of the release process.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36532561

fbshipit-source-id: 73bc107158387ff2db359e1b6a973db6ee85995c
2022-05-23 12:14:29 -07:00
Nicola Corti f179d47fb1 Set root to be `..` for ReactAndroid
Summary:
I've accidentally broke the external CI.

The reason is that root is defaulted to `$rootProject/..`.
The Gradle Plugin assumes there is a package.json there, which is always the case for RN projects, given that root is configured properly.

This was green on internal CIs as it was actually hitting the file on `xplat/js/package.json`. Externally, there is no such file, therefore is failing.

The fix is to specify the root path and don't use the default for ReactAndroid

Changelog:
[Internal] [Fixed] - Set root to be `..` for ReactAndroid

Reviewed By: cipolleschi

Differential Revision: D36597308

fbshipit-source-id: 66638ee1014ef35c81195526e0b325f5cc008b82
2022-05-23 09:40:29 -07:00
Nicola Corti 7dc03c7bdf Fix broken `ISSUE_TEMPLATE` due to extra `:` (#33892)
Summary:
It seems that using `:` inside the `name` field of our Issue Template broke the parsing of them. I'm fixing it here.

## Changelog

[Internal] - Fix broken `ISSUE_TEMPLATE` due to extra `:`

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

Test Plan:
Tested on:
https://github.com/cortinico/react-native/issues/new/choose

Reviewed By: f-meloni, cipolleschi

Differential Revision: D36596469

Pulled By: cortinico

fbshipit-source-id: 8009a88efc800622bad493a170b054972bb2147c
2022-05-23 09:17:31 -07:00
Riccardo Cipolleschi 71692889b0 Cleanup Folders after codegen (#33891)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33891

This diff adds a function to clean up folders and empty files (if any) after the codegen runs in the OSS.
To align how iOS and Android behave in the codegen, we now have to preemptively create folders that we may not need later.
Thanks to this function, we recursively the folders in the codegen and we delete them if they are empty.

## Changelog
[iOS][Added] - Add function to cleanup codegen folders

Reviewed By: cortinico

Differential Revision: D36594999

fbshipit-source-id: 904aa2442c0d9621b7ec77c31f7be9daa4e7b7e1
2022-05-23 08:27:44 -07:00
Nicola Corti 5f3c5aa529 Extend the React Native Gradle plugin to accept a config from package.json
Summary:
This extends the Gradle plugin to allow configuration for `codegenConfig` from the
`package.json` that lives in one of the root folder.

There are a couple of points open for discussion. The most important one
is that now we're moving from absolute paths to relative paths, from the
package.json location. I'm not entirely sure this will work correctly
for users in monorepos, so we might consider this carefully.

Moreover, I've moved the `codegenJavaPackageName` to be `android.javaPackageName`.
Happy to discuss this further.

Changelog:
[Android] [Added] - Extend the React Native Gradle plugin to accept a config from package.json

Reviewed By: cipolleschi

Differential Revision: D36374475

fbshipit-source-id: fe669ebd5bc92abbbe57677c1995d0e01f2400d7
2022-05-23 07:58:41 -07:00
Pieter De Baets 406a474e52 Correctly batch AnimatedColor updates
Summary:
Call `setWaitingForIdentifier` before we do any `setValue` calls to make sure we execute them together (and only call start/finish batch once). Only calll `updateAnimatedNodeConfig` conditionally when we changed nativeColor.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D36517302

fbshipit-source-id: ecbae2d1df69e4456620c58a922275406e22a2f8
2022-05-23 07:57:42 -07:00
Pieter De Baets 7e646361ee Avoid start/finishOperationBatch when using singleOp Animated experiment
Summary:
Splitting these changes of from D36482630, which is a minor improvement to the singleOp experiment. Since we call start/finish already on the native side, we don't need to repeat it from JS.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D36541700

fbshipit-source-id: 7d61669710faca3153be557fb2d214011eda87c5
2022-05-23 07:57:42 -07:00
Arushi Kesarwani 08ebc1cfd8 Upgrade Metro dependencies to 0.71.0
Summary:
While React Native depends on the `metro` package indirectly (via the CLI package), it depends on some secondary Metro packages directly. This diff updates those direct dependencies to use [Metro 0.71.0](https://github.com/facebook/metro/releases/tag/v0.71.0).

Changelog:
[General] Update direct Metro dependencies to 0.71.0

Reviewed By: motiz88

Differential Revision: D36592469

fbshipit-source-id: 4d95608545a5dff59049f1f48e18b08d4856961f
2022-05-23 06:38:13 -07:00
Pieter De Baets 168ec03b0f Move ReactNativeTestTools-test to github
Summary: Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D36546209

fbshipit-source-id: 33f7e896e2a3b77dfa1384d0a70ef684dd57a445
2022-05-23 06:15:08 -07:00