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

23563 Коммитов

Автор SHA1 Сообщение Дата
Lucas Bento e973b3afc2 Bump `core-workflow-apply-version-label` version (#32565)
Summary:
Fix the issue with the label not being applied correctly to issues.

## Changelog

N/A

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

Reviewed By: cortinico

Differential Revision: D32283554

Pulled By: lunaleaps

fbshipit-source-id: 77de56ef3a3dd9b87d1addc3d6d5deb08817d2d0
2021-11-09 09:30:35 -08:00
Andrei Shikov 046d1934a8 Use built-in fbjni Java <-> std::string conversion for SurfaceHandler init
Summary:
The conversion between std::string and Java strings is failing when initializing the `SurfaceHandler`. Instead of manually converting strings, this change makes native init use built-in fbjni helper instead.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D32281900

fbshipit-source-id: 056fce56b40c036d454925c8734bbf2a16f327ff
2021-11-09 09:27:17 -08:00
Pieter De Baets 954fc04f58 Support RootView in UIManagerHelper.getSurfaceId
Summary:
The `Event.getSurfaceIdForView` method I added recently is actually a duplicate of `UIManagerHelper.getSurfaceId`, except that the latter doesn't support RootViews very well.

Changelog:
[Android][Changed] - Improved UIManagerHelper.getSurfaceId and removed Event.getSurfaceIdForView

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D32102175

fbshipit-source-id: 01741df6b646037a4575e9ca302ea248af9fd6f3
2021-11-09 08:51:53 -08:00
Rubén Norte 74b91c5073 Revert changes in RN preprocessor
Summary: Changelog: [General][Fixed] Revert changes in Jest preprocessor to fix tests in external projects

Reviewed By: yungsters

Differential Revision: D32250044

fbshipit-source-id: 0ed4c9f7bcfa82349b5c2ec7af2ccda970bbb0ef
2021-11-09 01:15:14 -08:00
Tim Yung 280e4ce4fe RN: Change `@{ => no}format` in React Files
Summary:
Instead of using `.prettierrc` to ignore the files sync'd from React, replace `format` with `noformat`.

This is necessary because currently, the version of Prettier used in React Native (v2.4.1) differs from the version used in React (v1.19.1). We can revert this when React is upgraded.

Changelog:
[Internal]

Reviewed By: ShikaSD

Differential Revision: D32129937

fbshipit-source-id: ca3b379edd732670a9a0b1b20b3f31bdad4b74aa
2021-11-09 00:33:12 -08:00
Tim Yung 32f36fe105 RN: Fix Prettier Formatting Errors (#32524)
Summary:
Ignores the `Libraries/Renderer/` directory of files which are synchronized from React (and should not be modified).

Also, formats some EventEmitter modules that for some reason were missed when I upgraded to Prettier v2.x.

## Changelog

[Internal]

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

Test Plan:
```
yarn run format-check
```

Reviewed By: javache

Differential Revision: D32129837

Pulled By: yungsters

fbshipit-source-id: 1cb42cec210508db499850e13f77beefdb35eb25
2021-11-09 00:33:12 -08:00
Ramanpreet Nara f1f88b02e8 Stop unnecessarily spreading ReactNativeViewViewConfig
Summary:
There's no need to spread ReactNativeViewViewConfig props into ViewConfig partials ourselves. createViewConfig does this for us:

https://www.internalfb.com/code/fbsource/[b319a947b3e5]/xplat/js/react-native-github/Libraries/NativeComponent/ViewConfig.js?lines=20-50

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D32187833

fbshipit-source-id: 6d7ea3fc808ccfc98e067f8f52334f7b3417d7a7
2021-11-09 00:29:13 -08:00
Ramanpreet Nara d29a6a116e Make sizesDiffer and matricesDiffer type-safe
Summary: Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D32159547

fbshipit-source-id: 5223814cbb85c58219b99686b0b527768410e3ac
2021-11-09 00:29:13 -08:00
Ramanpreet Nara 73b243acbc Refactor: Make StaticViewConfigValidator.validate() output objects
Summary:
## Changes
- StaticViewConfigValidator.validate() now outputs a ValidationOutput object, that contains a Array<Differences>, if invalid
- The Difference type now contains the nativeValue and the staticValue. This makes the validate() function more useful in reconciling ViewConfigs.
- Nothing should change in NativeComponentRegistry.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D32139973

fbshipit-source-id: a9556fa370d2c14f9e5d0540b44824cd61773958
2021-11-09 00:29:13 -08:00
Ramanpreet Nara 36612a8060 Default {bubbling,direct}EventTypes to {} in Native VCs
Summary:
## Rationale
**Consistency with Static View Configs:** Static view config will default bubblingEventTypes or directEventTypesto to an empty object, if the any of them are undefined.

https://www.internalfb.com/code/fbsource/[a73d46ab4052838e46e0f3aab8508025795aec1f]/xplat/js/react-native-github/Libraries/NativeComponent/ViewConfig.js?lines=20-23%2C26-33%2C41%2C43-50

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D32159393

fbshipit-source-id: fefb3509b9b7c7374d2c3d8962afa5402daf6f72
2021-11-09 00:29:13 -08:00
rayzr522 274c617f5b Fix build of glog & Flipper-Glog on Apple Silicon (Attempt 2) (#32486)
Summary:
NOTE: Second attempt at merging https://github.com/facebook/react-native/pull/32486 (D32080994 (25d4cb98b0)).

This is a fixed version of the https://github.com/facebook/react-native/issues/32380 PR. It solves a typo, prevents variable substitution in the patch file, and moves it to a better place in the script so that CURRENT_ARCH is actually detected before checking whether to patch.

The `config.sub` included in glog is too old and does not recognize `arm64-*` as a valid arch when building. This, combined with an out of date Flipper-Glog version, results in persistent build failures on Apple Silicon machines.

p.s. i assume all the podfile lock changes were caused by me running this on an Apple Silicon Mac, and thus all the pod checksums were run against the arm64 versions of those pods rather than the normal x86_64 versions. if this is an issue I can revert the changes to that file, but it would seem to be an inevitable issue in future PR diffs...

## Changelog

- [iOS] [Fixed] - Apple Silicon builds of glog & Flipper-Glog

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

Test Plan: See `react-native-oss-ios` Sandcastle job succeed.

Reviewed By: fkgozali

Differential Revision: D32256761

Pulled By: yungsters

fbshipit-source-id: c7f32b72287018f070910b26aad02aa0adf4a61f
2021-11-08 21:26:22 -08:00
Mikey daf37a1fce fix: Updated releases/changelog links (#32551)
Summary:
[react-native-community/releases](https://github.com/react-native-community/releases) is on **DEPRECATION ALERT**, update to [reactwg/react-native-releases](https://github.com/reactwg/react-native-releases/discussions) ?

## 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] - Updated the links for the discussions and changelog

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

Reviewed By: yungsters

Differential Revision: D32244225

Pulled By: cortinico

fbshipit-source-id: d6c72540525484b445b507006a10f2f54baa18d5
2021-11-08 09:25:47 -08:00
Nicola Corti 83116e34bc Fix capitalization of ComponentFactory in RNTester
Summary:
This is a nit, but the capitalization of `ComponentFactory` is wrong
and should be lowercase. I'm fixing it.

Changelog:
[Internal] [Changed] - Fix capitalization of ComponentFactory in RNTester

Reviewed By: ShikaSD

Differential Revision: D32247341

fbshipit-source-id: e8a9f264139f20d85a8e00fad947b2c9465ef630
2021-11-08 09:19:55 -08:00
Nicola Corti 0f39a1076d Make the `reactNativeArchitectures` property more discoverable
Summary:
I've unified the function that is responsible of getting the `reactNativeArchitectures` property
to a single one (ideally we could move it inside the Gradle Plugin in the future).
I've also added a property in the `gradle.properties` file. This makes easier for users to customize the
architecture to build without having to specify a CLI flag or edit multiple gradle files.

Changelog:
[Android] [Added] - Make the `reactNativeArchitectures` property more discoverable

Reviewed By: ShikaSD

Differential Revision: D32244997

fbshipit-source-id: 33180544400f9abe63e9b539ff16fefa17a024ba
2021-11-08 07:21:08 -08:00
Nicola Corti d70555ff0e Fix Release build of RNTester
Summary:
Currently the release build of RNTester is broken
as it's loading the debug native libraries. I had to create
separate tasks for the two variants as we can't benefit
of automatic variant matching between project (as of now till
we use prefabs or find another approach).

Changelog:
[Internal] [Fixed] - Fix Release build of RNTester

Reviewed By: ShikaSD

Differential Revision: D32203637

fbshipit-source-id: 5c260a365626e9b3c66e76166086711236a38264
2021-11-08 04:33:33 -08:00
Luna Wei ec84a56da6 Don't fail this test when we can't post
Summary:
Changelog: [Internal] - Don't fail build_npm_package when there is no PR environment set to post the link to.

The script will fail with an error thanks to changes: 86491749ee

Reviewed By: fkgozali

Differential Revision: D32221758

fbshipit-source-id: ceb7fb654e4c13e195f20e28798e66e6854bcbcd
2021-11-05 17:30:34 -07:00
Luna Wei 68e6788daf Fix npm latest tag issue when releasing patches (#32543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32543

Changelog: [Internal] Fix npm `latest` tag issue that occurs when we release a patch on an older minor version

Context:
* There are two types of tags, git and npm, they are unrelated.

* When we publish a stable release, we set the git tag `latest`. This logic is faulty when we release a patch to an older version.

* When publishing a package to npm, if you don't provide an explicit tag, the `latest` tag will be applied -- at least that's how I've understood the [docs here](https://docs.npmjs.com/cli/v7/commands/npm-dist-tag#description). This again is faulty logic when we release a patch to an older version.

* npm and git's `latest` tag should always point to our most recent stable version

This change:
* Introduces a `--latest` flag for `bump-oss-script` that will indicate that the release we're running (either a stable or pre-release) should really be considered "latest"
* If the version is not a pre-release and the `--latest` flag is set, we will set the git `latest` tag
* Later, in the circleCI job that we use to publish the npm package, we will see if the current commit is git-tagged as `latest`. If it is, then we'll explicitly tell npm to use `latest` tag but most importantly, if it's not, we'll set a tag of the form `{major}.{minor}-stable`.
* This type of tag (ex. `0.66-stable`) is new and the intention is that it will always point to latest of that minor version.

Reviewed By: hramos

Differential Revision: D32196239

fbshipit-source-id: 4c881851eebcad8585732ff0c07322413ac46ce5
2021-11-05 15:09:11 -07:00
Luna Wei 029376c47d Clean up publish-npm.js and use parseVersion
Summary:
Changelog: [Internal] Remove unnecessary logic and new parseVersions function

Changes:
* Remove `tagsForVersions` which in the past got all the tags for the `currentCommit` to figure out which one we're releasing to. I believe this is redundant because the CircleCI envvar `CIRCLE_TAG` should already have the version that we're releasing -- this is set in `bump-oss-version`. Note: this will only be set for full-on releases, (re: not nightly or commitly)
* Re-arrange some logic to group where we set `releaseVersion` and separate where we call `bump-oss-version` script for dryRun (commitly) && nightly builds

Reviewed By: hramos

Differential Revision: D32196237

fbshipit-source-id: 10f21f71bad1ea0496c5eb9094271cc4454a2544
2021-11-05 15:09:11 -07:00
Luna Wei cc1e3abb6e Extract version parsing from release script
Summary: Changelog: [Internal] - extract logic for parsing version in bump-oss-version and add tests

Reviewed By: cortinico

Differential Revision: D32196238

fbshipit-source-id: 6ea7af3d282eea1d876118f056bca94a151e6182
2021-11-05 15:09:11 -07:00
Lorenzo Sciandra 636f614fa9 add changelog entries for 0.64.3, 0.65.2 and 0.66.2 (#32549)
Summary:
lunaleaps did a few patch releases over the last few days. This PR adds the entries for them in the changelog.md file.

## Changelog

[Internal] [Changed] - add changelog entries for 0.64.3, 0.65.2 and 0.66.2

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

Test Plan: N/A

Reviewed By: lunaleaps

Differential Revision: D32205887

Pulled By: cortinico

fbshipit-source-id: c4b173730c6bdf1349c29df26d136aa9f6d4568d
2021-11-05 14:44:04 -07:00
Paige Sun 77ce91822d Minor Style: Make RCTNativeAnimatedNodesManager a non-null class
Summary:
For native animations,
* Add NS_ASSUME_NONNULL_BEGIN / END to RCTNativeAnimatedNodesManager since most of its params are nonnull.

* Explicitly mark nullable params.

Reviewed By: philIip

Differential Revision: D32209819

fbshipit-source-id: c881294d8ba8c2cdcaa931801c977cd5bbe764f4
2021-11-05 14:15:59 -07:00
Paige Sun 698a936e4d Minor Style: Make viewName nullable in native animated modules for Fabric
Summary:
Make viewName in native animations nullable, because viewName is not used when the RCTAnimationNode is managed by Fabric.

Changelog: [Internal] Minor: Make viewName nullable in native animated modules for Fabric

Reviewed By: philIip

Differential Revision: D32196270

fbshipit-source-id: 76d05dc7fd2850efb097f953ccd22fd3f6d80599
2021-11-05 14:15:58 -07:00
Paige Sun e9ed115bab Remove RCTUIManagerObserver from RCTNativeAnimatedTurboModule
Reviewed By: philIip

Differential Revision: D32115902

fbshipit-source-id: 27a35ff4b4dad5f6364af6b91a6de9e467c068d0
2021-11-05 14:15:58 -07:00
Héctor Ramos b7b59aee84 Codegen: Add opt-in for using generate-artifacts script
Summary:
Use generate-artifacts.js script when USE_CODEGEN_DISCOVERY envvar is set to 1 at `pod install` time. Setting this envvar will disable the old codegen script.

Added `[Codegen]` prefix to all codegen log output.

Note: This script is not ready for production use at the moment.

Changelog: [Internal]

Reviewed By: sota000

Differential Revision: D31693778

fbshipit-source-id: 25da95bdb33315ac42c6dfb40334e22ec9823cb1
2021-11-05 11:30:04 -07:00
Héctor Ramos 5a77a93c59 Add libraryType support to Codegen Shared Configs
Summary:
Update codegen library discovery script to use libraryType param and new output location.

Changelog: [Internal]

Reviewed By: sota000

Differential Revision: D31842556

fbshipit-source-id: b811e6d18fcdd59e7d77c6d59dc6017d418531eb
2021-11-05 11:30:04 -07:00
somena1 fc962c9b6c Don't reconstruct app component on split-screen (#32536)
Summary:
When switching between split screen or resizing the screen window on Android causes a restart by reconstructing the app components as described on this issue https://github.com/facebook/react-native/issues/25040

## 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] - Don't reconstruct app components https://github.com/facebook/react-native/issues/25040

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

Test Plan:
### How to reproduce
- create a new project
-  build app and install on Android
- minimize app and start split screen
Expected:
- App enters split screen
Result:
- App restart

Same issue can be seen when resizing the split screen window

Reviewed By: cortinico

Differential Revision: D32175433

Pulled By: yungsters

fbshipit-source-id: 93dccaa134074eea260cca61eba2150444fa5688
2021-11-05 10:36:39 -07:00
Rachel Lang 88ebec9e65 6/n Boilerplate C++-only TurboModule iOS
Summary:
C++-only TurboModules, not to be confused with [TurboModules](https://www.internalfb.com/intern/wiki/React_Native/Building_Product_Experiences/Intro_to_Native_Modules/), directly allows you to call C++ from JS instead of going through the native layer. Referred to modification of C++-only TurboModule D30158226 and https://fburl.com/code/rcf73a42 for C++ to JS call (jsInvoker is an object that can schedule work on the JavaScript thread)

This example shows JS to C++ call and storing a JS function in C++ to call later.

Notes:

* To use the module, import the C++ module directly in objc.
* Meanwhile, create a js spec and use it in RN code. Spec methods don't need to be marked as optional.
* C++ and js spec will be linked when built

Reviewed By: RSNara

Differential Revision: D32080496

fbshipit-source-id: 9c214ca22c18f793d5f8b54997d129bdfa73e61a
2021-11-04 15:58:49 -07:00
Joel Arvidsson e918362be3 Fix Rosetta2 CocoaPods warning on Apple Silicon (#32498)
Summary:
The current warning assumes the ruby binary to be single arch, but the ruby version shipping with macOS is universal `universal.arm64e-darwin20`. This PR changes the check to search for `arm64` in any position instead of just the beginning to fix false positives.

## Changelog

[iOS] [Fixed] - Fix Rosetta2 CocoaPods warning on Apple Silicon

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

Test Plan:
### Before
On M1 Mac `pod install` using system ruby always yields a warning.

### After
`pod install` does not yield a warning.
`arch -x86_64 pod install` yields a warning.

Reviewed By: fkgozali

Differential Revision: D32013176

Pulled By: sota000

fbshipit-source-id: 84f517c210318b5d073d161b6849b9aee367bba6
2021-11-04 10:46:05 -07:00
Nicola Corti 3b7044dd07 Bump codegen to 0.0.11 (#32534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32534

Bumping react-native-codegen to 0.0.11 as 0.0.10 was broken (published empty).

Fixes #32533

Changelog:
[Internal] [Changed] - Bump codegen to 0.0.10

Reviewed By: lunaleaps

Differential Revision: D32156067

fbshipit-source-id: 61025b1159d1430728313bd1afcd96f83ee85ff5
2021-11-04 10:33:39 -07:00
Tommy Nguyen ebb26cf2e4 fix(ios): `pod install --project-directory=ios` fails (#32489)
Summary:
Running `pod install` from outside the `ios` folder fails because the
path to `React-Codegen` is wrong:

```
% pod install --project-directory=ios
[Codegen] Generating ios/build/generated/ios/React-Codegen.podspec.json
Auto-linking React Native module for target `ReactTestApp`: ReactTestApp-DevSupport
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[!] No podspec found for `React-Codegen` in `ios/build/generated/ios`
```

## 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] [Fixed] - `pod install --project-directory=ios` fails due to wrong path to `React-Codegen`

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

Test Plan:
1. Verify that `pod install` still works in `/packages/rn-tester`
2. Verify that `pod install --project-directory=ios` also works:
   ```
   git clone https://github.com/microsoft/react-native-test-app.git
   cd react-native-test-app
   npm run set-react-version main
   yarn
   cd example
   pod install --project-directory=ios
   ```

Reviewed By: lunaleaps

Differential Revision: D32158140

Pulled By: sota000

fbshipit-source-id: 98f12b0073cd911cb9de06201222d866ef7649a4
2021-11-03 17:49:45 -07:00
Andrei Shikov f0947a78af Back out "React Native sync for revisions afcb9cd...3fcd81d"
Summary: Changelog: [Internal] - Reverting React sync due to Recoil being broken

Reviewed By: yungsters

Differential Revision: D32148092

fbshipit-source-id: 276b33d3c9c9059472590cd6a987c2f5a658910c
2021-11-03 16:10:15 -07:00
Ramanpreet Nara d03b4f9ee2 Omit null process/diff functions from native VC attributes
Summary:
## Rationale
- **Consistency with Static View Configs**: In Static View Configs, if there isn't a diff or process function, we do not generate a property for it.
- **Type-safety**: The [Flow type for attributes](https://fburl.com/code/tafncg5c), doesn't allow null diff/process functions.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D32152924

fbshipit-source-id: 4156158c5fe09868feec1a0c55aa411d2bd72a27
2021-11-03 15:58:30 -07:00
Neil Dhar 43c38cdc8e Allow specifying an architecture in RNTester and release builds
Summary:
Setting `reactNativeDebugArchitectures` currently does not seem to work for RNTester, since it sets `abiFilters` which conflicts with the `splits` option we're already setting.

Gradle then complains:
```
neildhar@neildhar-mbp ~/f/x/j/react-native-github (default) >
./gradlew  -PreactNativeDebugArchitectures=x86_64 :packages:rn-tester:android:app:installJscDebug

> Configure project :ReactAndroid
Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':packages:rn-tester:android:app'.
> com.android.builder.errors.EvalIssueException: Conflicting configuration : 'x86_64' in ndk abiFilters cannot be present when splits abi filters are set : x86_64,x86,armeabi-v7a,arm64-v8a
```

Consolidate everything with the `splits` option.

In addition, it's convenient to also be able to control the native architecture for release builds.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D31834075

fbshipit-source-id: c6375d2a1e242981d0017f6e0a9d428b074a3fbd
2021-11-03 15:23:46 -07:00
Tommy Nguyen 86491749ee ci: ignore bundle size reporter failures (#32490)
Summary:
CircleCI stopped populating `CIRCLE_PULL_REQUEST` without providing an
alternative, so now it's impossible to get the PR number unless it comes
from a forked repo.

## Changelog

[Internal] [Fixed] - ignore bundle size reporter failures

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

Test Plan: CI should ignore bundle size reporter failures.

Reviewed By: fkgozali

Differential Revision: D32008694

Pulled By: lunaleaps

fbshipit-source-id: 68e25ac2fbb23c1d7a55e667c90aec3a61302b8a
2021-11-03 12:10:31 -07:00
Andrei Shikov 5c045861b9 Copy touch objects before consuming them in new touch path
Summary:
Ensures that copy of the native touch objects happens before consuming them.

The reverse order seems accidental after refactor, as copying objects doesn't consume them whereas adding to a native array does. This behavior didn't show up during testing in dev environment (only affects CANCEL events), and it seems to be the cause of high-firing crash on production.

Changelog: [Internal] Copy touch objects before consuming them in the new touch path.

Reviewed By: mdvacca

Differential Revision: D32112036

fbshipit-source-id: e9ec47689b7ceb0a40a23bab9f03367c4acb8632
2021-11-03 12:08:39 -07:00
Andrei Shikov deb6fbd929 Check for double dispose when sending touch event
Summary:
Makes new touch processing path check for double dispose on touch events.

Old event dispatcher has a race condition which makes it double-dispose some events, so we need to make sure it also processes touches correctly.

Changelog: [Internal] Check for double dispose when sending touch event

Reviewed By: cortinico

Differential Revision: D32110250

fbshipit-source-id: d6a12cbac60f9ff5e836cfaca5a47c467bea06c7
2021-11-03 12:08:39 -07:00
Lucas Bento aa515450fe Fix issues with `-rc` version not being labeled properly (#32522)
Summary:
This PR bumps https://github.com/lucasbento/core-workflow-apply-version-label which fixes the issue with versions having `-rc` not working.

## Changelog

N/A.

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

Reviewed By: yungsters

Differential Revision: D32115258

Pulled By: lunaleaps

fbshipit-source-id: ece8400f223640f8b75141f0e3286888a72c996b
2021-11-03 12:01:42 -07:00
Ken Tominaga 9b059b6709 Remove iOS 11 availability check (#32488)
Summary:
This pull request aims to remove iOS 11 availability check which is no longer needed.

The minimum iOS deployment target for React Native is iOS 11 but we still have iOS 11 version check like below.

```
if (available(iOS 11.0, *)) {
```

This is a continuation pull request of https://github.com/facebook/react-native/pull/32151

## 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] - Remove iOS 11 availability check

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

Reviewed By: yungsters

Differential Revision: D32006312

Pulled By: ryancat

fbshipit-source-id: 0ee6579e433a15d3d220a52d2ccd6931b0513971
2021-11-03 09:06:06 -07:00
Tim Yung b25d9e4123 Back out "Fix build of glog & Flipper-Glog on Apple Silicon"
Summary:
Reverts https://github.com/facebook/react-native/pull/32486 because this commit is suspected of breaking some internal CI.

Changelog:
[iOS][Changed] - Reverts "Apple Silicon builds of glog & Flipper-Glog"

Reviewed By: mendoncakeegan

Differential Revision: D32129681

fbshipit-source-id: e195009f2ab202cd4e30b978a1ca89dc388c9ddf
2021-11-02 23:27:31 -07:00
Tim Yung fba1ae1643 RN: Temporarily Disable Prettier for Some Files
Summary:
We are in the middle of a Prettier upgrade and some of the files which disagree between Prettier v1.x and v2.x are now being flagged by `eslint-plugin-prettier` as lint errors.

The correct fix here is probably to update `eslint-config-prettier` and `eslint-plugin-prettier`, but I am landing this first to unbreak CI.

Reviewed By: mendoncakeegan

Differential Revision: D32129458

fbshipit-source-id: a5206a5ef58f1d7614f9459c99b9e39109be6de9
2021-11-02 23:09:38 -07:00
Tim Yung 77ecc7ede1 JS: Format with Prettier v2.4.1 [3/n]
Summary:
Changelog:
[General][Internal]

Reviewed By: zertosh

Differential Revision: D31883447

fbshipit-source-id: cbbf85e4bf935096d242336f41bf0cc5d6f92359
2021-11-02 22:14:16 -07:00
Tim Yung 4e587a1b7d JS: Upgrade to Prettier v2.4.1 [1/n]
Summary:
Changelog:
[General][Changed] - Upgraded to `prettier@^2.4.1`.

Reviewed By: zertosh

Differential Revision: D31854010

fbshipit-source-id: 6d7a2e758a3ddf7c758ceffb14d98eb93b0ce4b0
2021-11-02 22:14:16 -07:00
Ramanpreet Nara 27ddbd8137 Refactor: Simplify deprecated component code-gen logic in View Config generator
Summary:
**Motivation:** Readability. It was hard to tell how componentName, paperComponentName, and paperComponentNameDepreacted produced the NativeComponentRegistry.get call.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D32108276

fbshipit-source-id: ea7c9fe4dc50cdd6fec94b5cd25f7bbcfb451ef6
2021-11-02 21:27:36 -07:00
rayzr522 25d4cb98b0 Fix build of glog & Flipper-Glog on Apple Silicon (#32486)
Summary:
This is a fixed version of the https://github.com/facebook/react-native/issues/32380 PR. It solves a typo, prevents variable substitution in the patch file, and moves it to a better place in the script so that CURRENT_ARCH is actually detected before checking whether to patch.

The `config.sub` included in glog is too old and does not recognize `arm64-*` as a valid arch when building. This, combined with an out of date Flipper-Glog version, results in persistent build failures on Apple Silicon machines.

p.s. i assume all the podfile lock changes were caused by me running this on an Apple Silicon Mac, and thus all the pod checksums were run against the arm64 versions of those pods rather than the normal x86_64 versions. if this is an issue I can revert the changes to that file, but it would seem to be an inevitable issue in future PR diffs...

## Changelog

- [iOS] [Fixed] - Apple Silicon builds of glog & Flipper-Glog

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

Test Plan:
- Clone this branch on both an Apple Silicon- & Intel-based Mac
- Run `pod install` in `packages/rn-tester`
- Confirm that build passes successfully

Reviewed By: cortinico

Differential Revision: D32080994

Pulled By: yungsters

fbshipit-source-id: 76a7c5bba20d91905455920609c890e92bb5b980
2021-11-02 17:35:33 -07:00
Paige Sun 6fd3bc2175 Fix Gemstone Profile Swiping Animations by fixing Animated.Value for Animated.event
Reviewed By: RSNara

Differential Revision: D32037021

fbshipit-source-id: 41da68706e6c752bf480d11112f70692f7234756
2021-11-02 17:32:03 -07:00
Nicola Corti 8fef52035b Bump codegen to 0.0.10
Summary:
For the sake of the playbook, I'm bumping the codegen to the latest stable.
This is needed as there was a change in the Android NDK Makefile that wasn't shipped yet.

Changelog:
[Internal] [Changed] - Bump codegen to 0.0.10

Reviewed By: hramos

Differential Revision: D32101355

fbshipit-source-id: c20268f1ea93ebad8f92f760874a43c8ceeaf9f9
2021-11-02 12:22:17 -07:00
Andrei Shikov e161598c40 React Native sync for revisions afcb9cd...3fcd81d
Summary:
This sync includes the following changes:
- **[5cccacd13](https://github.com/facebook/react/commit/5cccacd13 )**: Upgrade useId to alpha channel ([#22674](https://github.com/facebook/react/pull/22674)) //<Andrew Clark>//
- **[75f3ddebf](https://github.com/facebook/react/commit/75f3ddebf )**: Remove experimental useOpaqueIdentifier API ([#22672](https://github.com/facebook/react/pull/22672)) //<Andrew Clark>//
- **[8c4a05b8f](https://github.com/facebook/react/commit/8c4a05b8f )**: Remove flow pragma comment from module registration start/stop templates ([#22670](https://github.com/facebook/react/pull/22670)) //<Brian Vaughn>//
- **[ebf9ae857](https://github.com/facebook/react/commit/ebf9ae857 )**: useId ([#22644](https://github.com/facebook/react/pull/22644)) //<Andrew Clark>//
- **[a0d991fe6](https://github.com/facebook/react/commit/a0d991fe6 )**: Re-land #22292 (remove uMS from open source build) ([#22664](https://github.com/facebook/react/pull/22664)) //<Andrew Clark>//
- **[6bce0355c](https://github.com/facebook/react/commit/6bce0355c )**: Upgrade useSyncExternalStore to alpha channel ([#22662](https://github.com/facebook/react/pull/22662)) //<Andrew Clark>//
- **[7034408ff](https://github.com/facebook/react/commit/7034408ff )**: Follow-up improvements to error code extraction infra ([#22516](https://github.com/facebook/react/pull/22516)) //<Andrew Clark>//
- **[90e5d3638](https://github.com/facebook/react/commit/90e5d3638 )**: chore: fix comment typo ([#22615](https://github.com/facebook/react/pull/22615)) //<btea>//
- **[3c4c1c470](https://github.com/facebook/react/commit/3c4c1c470 )**: Remove warning for dangling passive effects ([#22609](https://github.com/facebook/react/pull/22609)) //<Andrew Clark>//
- **[d5b6b4b86](https://github.com/facebook/react/commit/d5b6b4b86 )**: Expand act warning to cover all APIs that might schedule React work ([#22607](https://github.com/facebook/react/pull/22607)) //<Andrew Clark>//
- **[fa9bea0c4](https://github.com/facebook/react/commit/fa9bea0c4 )**: Initial implementation of cache cleanup ([#22510](https://github.com/facebook/react/pull/22510)) //<Joseph Savona>//
- **[0e8a5aff3](https://github.com/facebook/react/commit/0e8a5aff3 )**: Scheduling Profiler: Add marks for component effects (mount and unmount) ([#22578](https://github.com/facebook/react/pull/22578)) //<Brian Vaughn>//
- **[4ba20579d](https://github.com/facebook/react/commit/4ba20579d )**: Scheduling Profiler: De-emphasize React internal frames ([#22588](https://github.com/facebook/react/pull/22588)) //<Brian Vaughn>//
- **[cdb8a1d19](https://github.com/facebook/react/commit/cdb8a1d19 )**: [Fizz] Add option to inject bootstrapping script tags after the shell is injected ([#22594](https://github.com/facebook/react/pull/22594)) //<Sebastian Markbåge>//
- **[34e4c9756](https://github.com/facebook/react/commit/34e4c9756 )**: Clear extra nodes if there's a hydration mismatch within a suspense boundary  ([#22592](https://github.com/facebook/react/pull/22592)) //<Sebastian Markbåge>//
- **[02f411578](https://github.com/facebook/react/commit/02f411578 )**: Upgrade useInsertionEffect to stable ([#22589](https://github.com/facebook/react/pull/22589)) //<Andrew Clark>//
- **[2af4a7933](https://github.com/facebook/react/commit/2af4a7933 )**: Hydrate using SuspenseComponent as the parent ([#22582](https://github.com/facebook/react/pull/22582)) //<Sebastian Markbåge>//
- **[b1acff0cc](https://github.com/facebook/react/commit/b1acff0cc )**: Enable cache in test renderer ([#22580](https://github.com/facebook/react/pull/22580)) //<Joseph Savona>//
- **[996da67b2](https://github.com/facebook/react/commit/996da67b2 )**: Replace global `jest` heuristic with `IS_REACT_ACT_ENVIRONMENT` ([#22562](https://github.com/facebook/react/pull/22562)) //<Andrew Clark>//
- **[163e81c1f](https://github.com/facebook/react/commit/163e81c1f )**: Support disabling spurious act warnings with a global environment flag ([#22561](https://github.com/facebook/react/pull/22561)) //<Andrew Clark>//
- **[23b7dfeff](https://github.com/facebook/react/commit/23b7dfeff )**: Enable scheduling profiler for RN FB profiling builds ([#22566](https://github.com/facebook/react/pull/22566)) //<Brian Vaughn>//
- **[61455a25b](https://github.com/facebook/react/commit/61455a25b )**: Enable experimental Cache API in www TestRenderer ([#22554](https://github.com/facebook/react/pull/22554)) //<Joseph Savona>//
- **[7142d110b](https://github.com/facebook/react/commit/7142d110b )**: Bugfix: Nested useOpaqueIdentifier references ([#22553](https://github.com/facebook/react/pull/22553)) //<Andrew Clark>//
- **[1e247ff89](https://github.com/facebook/react/commit/1e247ff89 )**: Enabled scheduling profiler marks for React Native FB target ([#22544](https://github.com/facebook/react/pull/22544)) //<Brian Vaughn>//
- **[c16b005f2](https://github.com/facebook/react/commit/c16b005f2 )**: Update test and stack frame code to support newer V8 stack formats ([#22477](https://github.com/facebook/react/pull/22477)) //<Brian Vaughn>//
- **[55d75005b](https://github.com/facebook/react/commit/55d75005b )**: duplicate value in variable ([#22390](https://github.com/facebook/react/pull/22390)) //<BIKI DAS>//

Changelog:
[General][Changed] - React Native sync for revisions afcb9cd...3fcd81d

jest_e2e[run_all_tests]

Reviewed By: yungsters

Differential Revision: D32065987

fbshipit-source-id: ef2d402835c981aab68ca40a894c66c1630864e9
2021-11-02 12:06:32 -07:00
Lorenzo Sciandra 38381c8a2e add release changelog back to core repo (#32520)
Summary:
As agreed, we are moving back the changelog from the RNC repo into the core one. This PR does just that.

It will be followed up by a new draft PR for the 0.67 release ([old one](https://github.com/react-native-community/releases/pull/255)).

Once this is merged, a few links will need to be fixed, such as:
* https://github.com/facebook/react-native/wiki/Changelog
* https://github.com/facebook/react-native/releases (for new releases)

Moreover, we should have a conversation about how changes are reported for the "monorepo" part of this repo: https://github.com/facebook/react-native/tree/main/packages as far as I can see, the changes to those packages are not documented anywhere.

## Changelog

[Internal] [Added] - Adding Changelog.md back into main repo

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

Test Plan: N/A

Reviewed By: lunaleaps

Differential Revision: D32102055

Pulled By: cortinico

fbshipit-source-id: 6d1f353bb6acdc952e40941510ca36200690bbf8
2021-11-02 10:57:32 -07:00
Ramanpreet Nara 857137dc21 Create E2E tests for Component Generators
Summary:
## Rationale
- We actually don't have E2E tests that test the parser + generator together, until now.
- **Documentation Value:** These tests show how the Component Spec files in [react-native-codegen/e2e/__test_fixtures__/](https://www.internalfb.com/code/fbsource/[e32a790dfa05]/xplat/js/react-native-github/packages/react-native-codegen/e2e/__test_fixtures__/components/) map to all the different types of codegen output.

Changelog: [Internal]

Reviewed By: sshic

Differential Revision: D32081445

fbshipit-source-id: 02cd17945ef63a42381d6d4adbd0a9b0eaa2a1ef
2021-11-02 10:54:11 -07:00
Nicola Corti cfacfe8b6c Bump gradle-plugin to 0.0.3
Summary:
For the sake of the playbook, I'm bumping the Gradle Plugin to the latest stable.
Specifically a change in how CLI args are parsed (D31908041 (70785e3d5a)) was not backward compatible,
therefore we need to migrate users to the new version.

Changelog:
[Internal] [Changed] - Bump gradle-plugin to 0.0.3

Reviewed By: hramos

Differential Revision: D32101577

fbshipit-source-id: 9a29b988a4b520a8ece10a90a9a4bedc02ec16ad
2021-11-02 10:39:25 -07:00