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

72 Коммитов

Автор SHA1 Сообщение Дата
Janic Duplessis 0959ff36d1 Move hermes to a separate podspec (#30478)
Summary:
Hermes being a subspec of ReactCore causes some build issues when RN is included in 2 different targets. It also causes it to include a lot of additional dependencies that it doesn't need. This moves it to a separate podspec loosely based on other specs in ReactCommon.

## Changelog

[iOS] [Fixed] - Move hermes to a separate podspec

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

Test Plan: Test that it builds and run properly in an app

Reviewed By: fkgozali

Differential Revision: D25308237

Pulled By: hramos

fbshipit-source-id: b4cc44ea2b1b854831e881dbbf9a2f30f6704001
2020-12-03 20:08:00 -08:00
Janic Duplessis 7f16ff8a05 Fix use_framework RNTester crash (#30520)
Summary:
When building RN Tester with use_frameworks it crashes on launch because of duplicate folly singletons. Seems that it is included twice because of Flipper. From what I understand flipper is not really compatible with use_frameworks so this removes it from that build variant. We also remove hardcoded SONARKIT defines in the xcodeproject, those will be added by the Flipper podspec anyway so it is not needed.

This then exposed a missing double conversion header error in Folly so this fixes the DoubleConversion podspec to add its headers path to the user project.

## Changelog

[Internal] [Fixed] - Fix use_framework RNTester crash

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

Test Plan: Tested RN tester with use frameworks on and off. Also made sure flipper works still when frameworks is false.

Reviewed By: fkgozali

Differential Revision: D25307973

Pulled By: hramos

fbshipit-source-id: 17b90e871734e32f5982c4fc9c07aeea232f868f
2020-12-03 16:01:47 -08:00
Nick Gerleman 540735383d Fix RNTester Not Resizing Examples on Rotation/Resize (#30376)
Summary:
Fixes https://github.com/facebook/react-native/issues/30325

After the RNTester redesign, a style started globally caching screen width. This isn't needed, but means that width is incorrect if the device is rotated, or a window is resized. Rely on default layout which will be 100% width instead.
## 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] [Fixed] - Fix RNTester Not Resizing Examples on Rotation/Resize

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

Test Plan: Tested viewing an example and rotating the device in iOS simulator

Reviewed By: rickhanlonii

Differential Revision: D25098642

Pulled By: appden

fbshipit-source-id: 9acdb656da7de9fda05f6091b36f8d9aa2155524
2020-12-03 09:39:17 -08:00
Héctor Ramos 5eee2f2bc0 Fix Circle CI iOS Tests: Make FBReactNativeSpec dir as needed
Summary:
Quick fix for Circle CI: Ensure FBReactNativeSpec dir exists before touching files.

Changelog:
[Internal]

Reviewed By: fkgozali

Differential Revision: D25285573

fbshipit-source-id: 8dec496856c90accc687648d7068aadfea24d72b
2020-12-02 16:13:03 -08:00
Héctor Ramos c901c1fbce Integrate Native Module codegen into Xcode build pipeline (#30449)
Summary:
Move the codegen invocation out of Podfiles and into the FBReactNativeSpec Pod itself. With this change, developers do not need to modify their existing project's Podfiles, and yet the codegen will be integrated into their projects automatically by way of the FBReactNativeSpec Pod.

This is accomplished in part by injecting a script build phase into the Pods Xcode project that is generated by CocoaPods. The build phase will save the output of the codegen script to a log in the derived files directory. The codegen will be executed if the codegen log file is not present, or if the contents of the Libraries directory has changed.

The codegen will thus be invoked in these situations:

**RNTester:**
* When `packages/rn-tester/RNTesterPods.xcworkspace` is built, if the codegen output logfile is not present or if the input files have changed.

**OSS React Native apps:**
* When `ios/AwesomeProject.xcworkspace` is built, if the codegen output file is not present or if the input files have changed. Normally, this should not happen, as we do not expect folks to update the contents of `node_modules/react-native/Libraries`.

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

Changelog: [Internal] - Moved codegen invocation out of Podfile and into FBReactNativeSpec Pod

Reviewed By: fkgozali

Differential Revision: D25138896

fbshipit-source-id: 4779f822459cea2c30fd544eee19a49e8d80153d
2020-12-02 14:27:50 -08:00
Su Min Kim a4a517a09d Add example for focus and blur events to AppStateExample (#30381)
Summary:
Added an example to test focus and blur events in AppState (Android only)

## 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] [Added] - Add example for focus and blur events to AppStateExample

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

Test Plan: ![Example](http://g.recordit.co/6FGnSzKQaG.gif)

Reviewed By: cpojer

Differential Revision: D25245334

Pulled By: rickhanlonii

fbshipit-source-id: 916f18a74140cc43e0d513eb4073cbcc44e41427
2020-12-02 09:04:13 -08:00
Kshitij Kotasthane 328590d2d9 Added examples for SectionList (#30390)
Summary:
`Added examples for the following missing props in SectionList`
* Prop: initialNumToRender
* Prop: ListEmptyComponent
* Prop: onEndReached

**Motivation** - Missing examples for these props in the RNTester app
## Changelog

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

[General] [Added] - `Added examples for the missing props in SectionList`

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

Test Plan:
![empty](https://user-images.githubusercontent.com/26821140/99139935-49667000-2663-11eb-8b89-5a6b17abc3e9.png)
![end](https://user-images.githubusercontent.com/26821140/99139944-4e2b2400-2663-11eb-8e95-08e863614dec.png)

Reviewed By: cpojer

Differential Revision: D25245322

Pulled By: rickhanlonii

fbshipit-source-id: 3e44b9cf86128f1d3df535799519631cf2296a7e
2020-12-02 09:00:06 -08:00
Su Min Kim 5cf4ab8dd2 Remove filter pills from example page (#30198)
Summary:
rickhanlonii
Removes filter pills from example page in RNTester app.

## Changelog
Removed filter pills from example page by changing hideFilterPills property to true in RNTesterExampleList.js
<div>
<img src="https://user-images.githubusercontent.com/43835229/96194048-88e05600-0f17-11eb-9262-660a7a4bb170.png" width="200" height="400" style="float:left" />
<img src="https://user-images.githubusercontent.com/43835229/96194345-26d42080-0f18-11eb-9af2-bbf9fcc9518a.png" width="200" height="400" />
</div>

[Android] [Removed] - Remove filter pills
[iOS] [Removed] - Remove filter pills

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

Test Plan:
RNTester app builds and runs as expected and filter pills are removed from the screen.
<div>
<img src="https://user-images.githubusercontent.com/43835229/96194077-9564ae80-0f17-11eb-821e-13da51d37581.png" width="200" height="400" style="float:left"/>
<img src="https://user-images.githubusercontent.com/43835229/96194532-8fbb9880-0f18-11eb-9ecf-48e1b4a9ac25.png" width="200" height="400" />
</div>

Reviewed By: cpojer

Differential Revision: D24395513

Pulled By: rickhanlonii

fbshipit-source-id: 7351ce8972185f973ad302d70929491cc6f56907
2020-12-01 09:06:23 -08:00
Héctor Ramos e99b8bbb40 Use react-native-codegen@0.0.6 in new app template
Summary:
Use pre-built react-native-codegen library from npm in the iOS app template.
Built react-native-codegen from source when used with RNTester.
Published react-native-codegen@0.0.6.

Changelog:
[iOS][Added] - Use react-native-codegen in iOS app template
[Internal] - Bump react-native-codegen: 0.0.6

Reviewed By: fkgozali

Differential Revision: D25128036

fbshipit-source-id: f294c23b9b911aae6f404edc01b62426fb578477
2020-11-20 20:11:59 -08:00
Emily Janzer c0a2998387 Move TurboModuleManager to use RuntimeExecutor instead of jsContext (#30416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30416

This diff changes the constructor param for TurboModuleManager from jsContext (a long representing the `jsi::Runtime` pointer) to a RuntimeExecutor. It also updates callsites to use the new RuntimeExecutor created by CatalystInstance. This is only used for installing the TurboModule JSI binding; it's not currently used for JS invocation in TurboModules, which is handled separately by JSCallInvoker. Ultimately we may be able to implement JSCallInvoker *with* the provided RuntimeExecutor, but there's some additional logic in JSCallInvoker that we don't have here yet.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D21338930

fbshipit-source-id: 1480c328f1a1776ddf22752510c0f3b35168a489
2020-11-20 14:32:59 -08:00
Luke Walczak a7c1c5aff2 Add possibility to disable buttons in action sheet ios (#28979)
Summary:
_**Fixed**_ version of [the previous PR](https://github.com/facebook/react-native/pull/28792) after reverting [changes](c8d678abcf (commitcomment-39299254))

----

I've noticed that currently there is no option to disable button within the `ActionSheetIOS`. It can be really useful and decided to extend the API to support that functionality.

I added a new option called `disabledButtonsIndices` to `ActionSheetIOS` which is an array of button indices which should be disabled.

`ActionSheetIOS` documentation - PR https://github.com/facebook/react-native-website/pull/1898

## Changelog

[iOS] [Added] - Add disableButtonsIndices option to ActionSheetIOS component

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

Test Plan:
1. Run the `RNTester`
2. Choose `ActionSheetIOS`
3. Check the fourth example `Show Action Sheet with disabled buttons`
4. `Option 1` and `Option 2` should be disabled

screenshot | gif
 --- | ---
<img width="493" alt="Screenshot 2020-04-30 at 15 16 22" src="https://user-images.githubusercontent.com/22746080/80739025-1ec52780-8b16-11ea-8b1c-30bb40ad8c99.png"> | <img src="https://user-images.githubusercontent.com/22746080/80739043-24227200-8b16-11ea-8bcb-af25eb57baac.gif" width="493" />

Reviewed By: sammy-SC

Differential Revision: D21727497

Pulled By: PeteTheHeat

fbshipit-source-id: 749b6c623eb8a44fe2bd96829ce89be5310e2368
2020-11-18 21:11:48 -08:00
Ramanpreet Nara 27cf82074d Guard against initializer interruptions in {Catalyst,Work,RNTester}TurboModuleManagerDelegate
Summary:
Migrate over to [how we load so libraries in Fb4aTurboModuleManagerDelegate](https://fburl.com/diffusion/wu0mcr8o).

## Motivation
When we migrated Twilight over to TurboModules, we used the CatalystTurboModuleManager as a template. This led to a production crash (T70918829) because we weren't loading so's this way. The fix: D24894071.

I'm updating these two TMMDelegates so that people don't fall into the same trap when migrating other Standalone apps.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24992931

fbshipit-source-id: 3ac3b8c30a67e24f79021f915abf5ae980d5b5d3
2020-11-17 00:34:48 -08:00
Kevin Gozali 58c80d4f8d Use codegen from source in default iOS template apps
Summary:
Add the `react-native-codegen` source to the `react-native` npm package.
Instead of using `react-native-codegen` from npm, the iOS app template will now build the package from source. Doing so removes the need to carefully time `react-native-codegen` npm releases to oss `react-native` releases, as the codegen and the oss release will be cut at the same time.

Changelog: [Internal] - Removed react-native-codegen dependency from iOS app template

Reviewed By: TheSavior

Differential Revision: D24904655

fbshipit-source-id: a07932bc748e2afb9359de584181bcb9dd0810ea
2020-11-12 22:30:28 -08:00
George Zahariev 6a039d7be3 Remove usage of deprecated @flow weak in Xplat
Summary:
This is the one usage of `flow weak` in Xplat - change it to normal `flow` and add a suppression where an error appears.

Changelog: [Internal]

Reviewed By: Hans-Halverson

Differential Revision: D24878970

fbshipit-source-id: 16e459c261b41e04de1555ed7ef4ecf2f5b3721e
2020-11-12 21:14:06 -08:00
Kevin Gozali 803a26cb00 TM Android: Avoid creating TM instance if the module is not TM enabled
Summary:
There is a flow where TM registry is creating a module instance (as registered in the TurboReactPackage), only to discard it if it's not a TM enabled module. This may be fine for many modules, but for module like `UIManagerModule`, this may cause a race condition or other issues, including potential perf regression when accessing UIManager from JS (e.g. for getting native viewConfigs).

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D24811838

fbshipit-source-id: 6e1cce6993a6e5c9763773f175083bf52925c910
2020-11-09 02:24:41 -08:00
Christoph Nakazawa 3e77e15526 Continuous Integration cleanup
Reviewed By: yungsters

Differential Revision: D24700192

fbshipit-source-id: 239a8ad4848a41ad721a635d4ec37d990989f041
2020-11-05 06:09:36 -08:00
Kevin Gozali 8663ec4f42 Unbreak iOS build due to header import failure
Summary: Changelog: [Internal]

Reviewed By: p-sun, yungsters

Differential Revision: D24749871

fbshipit-source-id: 70692b8a32f9b7a214d7192ba444c695568e2ccf
2020-11-04 21:39:18 -08:00
Mike Grabowski c95ee5ac18 feat: Enable Hermes to work on iOS (#29914)
Summary:
This PR makes it possible to build iOS applications with Hermes. Note that it doesn't work with `use_frameworks!` just yet.

Fixes https://github.com/facebook/react-native/issues/27845 (by downgrading iOS deployment target for RCT-Folly to 9.0)
Fixes https://github.com/facebook/react-native/issues/28810 (as above)

Checklist:
- [x] Adjust release scripts to create Hermes bytecode bundle
- [x] Release new Hermes npm package that includes iOS files (unreleased right now, if you want to try locally, you have to clone Hermes and `yarn link` its master to this project)
- [x] Test on a new React Native application in both Debug and Release (Device)
- [x] Test on an RNTester application in both Debug and Release (Device)
- [x] Add missing `i386` to Hermes framework and enable Bitcode
- [x] Inspect CI failures for possible regressions
- [x] Resolve Folly issue as reported https://github.com/facebook/react-native/issues/27845 and https://github.com/facebook/react-native/issues/28810
- [x] Release new Hermes and test against it that everything works

## Changelog

[IOS] [FEATURE] - Enable Hermes on iOS
[INTERNAL] - Upgrade to CocoaPods 1.10.0 to resolve Xcode 12.0 issues
[INTERNAL] - Upgrade to Xcode 12.0 on the CircleCI
[INTERNAL] - Fix building RNTester in Release mode
[INTERNAL] - Fix build-time errors of `libevent` with `use_frameworks!`
[INTERNAL] - Introduce `USE_HERMES` variable and test all RNTester configurations on the CI
[INTERNAL] - Do not fetch CocoaPods repository since we're using CDN anyway

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

Test Plan:
Turn on `hermes_enabled` to true in your `Podfile`, install pods, and run the iOS application. Your app should be running Hermes now.

Preview: (note "Engine: Hermes")

<img width="395" alt="Screenshot 2020-09-09 at 19 22 32" src="https://user-images.githubusercontent.com/2464966/92631584-d7c01d80-f2d1-11ea-9b40-33d73db96a53.png">

Reviewed By: hramos

Differential Revision: D24684845

Pulled By: cpojer

fbshipit-source-id: 900cbe3bf9398a6fd4a773d552899a001bf5146b
2020-11-03 01:14:38 -08:00
Héctor Ramos 538446e755 Bump Xcode to 12.1.0, bump CocoaPods 1.10.0 (#30250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30250

Upgrade the version of Xcode used in Circle CI to Xcode 12.1.0, and target iOS 14.1 in tests.

Reference:
* Circle CI Xcode 12.1 container manifest (new version):
https://circle-macos-docs.s3.amazonaws.com/image-manifest/v3985/index.html
* Circle CI Xcode 11.6.0 container manifest (previous version): https://circle-macos-docs.s3.amazonaws.com/image-manifest/v3299/index.html

> Source: https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions

The default version of CocoaPods used in the Xcode 12.1 container image has changed. Use `bundle exec` with `pod install` to ensure we use the same version of CocoaPods as prescribed in the Gemfile.

Changelog:
[iOS][Changed] - Update iOS project template for Xcode 12.1.0
[iOS][Changed] - Bump CocoaPods 1.10.0
[Internal] Bump Xcode version used for iOS tests.

Reviewed By: fkgozali

Differential Revision: D24545010

fbshipit-source-id: 4a39781352bc5a85dae55ed5cd4e1ed6043a4aeb
2020-10-30 23:03:26 -07:00
Janic Duplessis 1e9d7b70fc More reliable way to get ReactAndroid build dir in Android-prebuilt.mk (#30222)
Summary:
Pass the ReactAndroid project build directory as a variable to the ndk build so it can be used instead of assuming that the build directory is under ReactAndroid/build.

## Changelog

[Internal]

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

Test Plan: Tested in an app with a custom build directory

Reviewed By: yungsters

Differential Revision: D24560643

Pulled By: fkgozali

fbshipit-source-id: cc65a70582f546ca2e2ca9fb6a2ff03ea70ca9d8
2020-10-27 10:06:58 -07:00
Kevin Gozali f023519e49 TurboModule Android: Enable TurboModule by default on RNTester
Summary:
This does a few things:
* Remove USE_CODEGEN flag so that TurboModule is enabled by default for RNTester
* Use the codegen output for Java/JNI spec files
* Remove the checked in com.facebook.fbreact.specs Java/JNI files

Changelog: [Changed][Android] RNTester now enables TurboModule by default using codegen.

Reviewed By: RSNara

Differential Revision: D24382083

fbshipit-source-id: 87e3e0581bac3287ef01c1a0deb070c1d7d40f2d
2020-10-26 23:47:54 -07:00
Rick Hanlon 24bca492c3 Update React Native to React 17.0.0
Summary:
This sync includes the following changes:
- **[eaaf4cbce](https://github.com/facebook/react/commit/eaaf4cbce )**: 17.0.1 //<Dan Abramov>//
- **[6f62abb58](https://github.com/facebook/react/commit/6f62abb58 )**: Remove usage of Array#fill ([#20071](https://github.com/facebook/react/pull/20071)) //<Dan Abramov>//
- **[40cfe1f48](https://github.com/facebook/react/commit/40cfe1f48 )**: Update CHANGELOG.md //<Dan Abramov>//
- **[f021a983a](https://github.com/facebook/react/commit/f021a983a )**: Bump versions for 17 ([#20062](https://github.com/facebook/react/pull/20062)) //<Dan Abramov>//
- **[d1bb4d851](https://github.com/facebook/react/commit/d1bb4d851 )**: Profiler: Include ref callbacks in onCommit duration ([#20060](https://github.com/facebook/react/pull/20060)) //<Brian Vaughn>//
- **[c59c3dfe5](https://github.com/facebook/react/commit/c59c3dfe5 )**: useRef: Warn about reading or writing mutable values during render ([#18545](https://github.com/facebook/react/pull/18545)) //<Brian Vaughn>//
- **[7b6cac952](https://github.com/facebook/react/commit/7b6cac952 )**: Improved Profiler commit hooks test ([#20053](https://github.com/facebook/react/pull/20053)) //<Brian Vaughn>//
- **[dfb6a4033](https://github.com/facebook/react/commit/dfb6a4033 )**: [Fast Refresh] Fix crashes caused by rogue Proxies ([#20030](https://github.com/facebook/react/pull/20030)) ([#20039](https://github.com/facebook/react/pull/20039)) //<Kai Riemann>//
- **[37cb732c5](https://github.com/facebook/react/commit/37cb732c5 )**: Use bitwise OR to define flag masks ([#20044](https://github.com/facebook/react/pull/20044)) //<Andrew Clark>//
- **[eb3181e77](https://github.com/facebook/react/commit/eb3181e77 )**: Add Visibility flag for hiding/unhiding trees ([#20043](https://github.com/facebook/react/pull/20043)) //<Andrew Clark>//
- **[0dd809bdf](https://github.com/facebook/react/commit/0dd809bdf )**: Remove last schedulePassiveEffectCallback call ([#20042](https://github.com/facebook/react/pull/20042)) //<Andrew Clark>//
- **[8df7b7911](https://github.com/facebook/react/commit/8df7b7911 )**: Remove Passive flag from "before mutation" phase ([#20038](https://github.com/facebook/react/pull/20038)) //<Andrew Clark>//
- **[c57fe4a2c](https://github.com/facebook/react/commit/c57fe4a2c )**: ReactIs.isValidElementType Unit Test extended with PureComponent case ([#20033](https://github.com/facebook/react/pull/20033)) //<adasq>//
- **[02da938fd](https://github.com/facebook/react/commit/02da938fd )**: Don't double-invoke effects in legacy roots ([#20028](https://github.com/facebook/react/pull/20028)) //<Brian Vaughn>//
- **[d95c4938d](https://github.com/facebook/react/commit/d95c4938d )**: [EventSystem] Revise onBeforeBlur propagation mechanics ([#20020](https://github.com/facebook/react/pull/20020)) //<Dominic Gannaway>//
- **[f46a80ae1](https://github.com/facebook/react/commit/f46a80ae1 )**: Update outdated links and fix two broken links  ([#19985](https://github.com/facebook/react/pull/19985)) //<Saikat Guha>//
- **[0a4c7c565](https://github.com/facebook/react/commit/0a4c7c565 )**: [Flight] Don't warn for key, but error for ref ([#19986](https://github.com/facebook/react/pull/19986)) //<Sebastian Markbåge>//
- **[993ca533b](https://github.com/facebook/react/commit/993ca533b )**: Enable eager listeners statically ([#19983](https://github.com/facebook/react/pull/19983)) //<Dan Abramov>//
- **[40c52de96](https://github.com/facebook/react/commit/40c52de96 )**: [Flight] Add Runtime Errors for Non-serializable Values ([#19980](https://github.com/facebook/react/pull/19980)) //<Sebastian Markbåge>//
- **[1992d9730](https://github.com/facebook/react/commit/1992d9730 )**: Revert "Temporarily disable Profiler commit hooks flag ([#19900](https://github.com/facebook/react/pull/19900))" ([#19960](https://github.com/facebook/react/pull/19960)) //<Brian Vaughn>//
- **[44d39c4d7](https://github.com/facebook/react/commit/44d39c4d7 )**: Removed skip-error-boundaries modifications from old fork ([#19961](https://github.com/facebook/react/pull/19961)) //<Brian Vaughn>//
- **[cc77be957](https://github.com/facebook/react/commit/cc77be957 )**: Remove unnecessary error overriding in ([#19949](https://github.com/facebook/react/pull/19949)) //<Paul Doyle>//
- **[97625272a](https://github.com/facebook/react/commit/97625272a )**: Debug tracing tests for CPU bound suspense ([#19943](https://github.com/facebook/react/pull/19943)) //<Brian Vaughn>//
- **[43363e279](https://github.com/facebook/react/commit/43363e279 )**: Fix codestyle for typeof comparison ([#19928](https://github.com/facebook/react/pull/19928)) //<Eugene Maslovich>//
- **[5427b4657](https://github.com/facebook/react/commit/5427b4657 )**: Temporarily disable Profiler commit hooks flag ([#19900](https://github.com/facebook/react/pull/19900)) //<Brian Vaughn>//
- **[1faf9e3dd](https://github.com/facebook/react/commit/1faf9e3dd )**: Suspense for CPU-bound trees ([#19936](https://github.com/facebook/react/pull/19936)) //<Andrew Clark>//
- **[7f08e908b](https://github.com/facebook/react/commit/7f08e908b )**: Fix missing context to componentDidMount() when double-invoking lifecycles ([#19935](https://github.com/facebook/react/pull/19935)) //<Brian Vaughn>//
- **[9198a5cec](https://github.com/facebook/react/commit/9198a5cec )**: Refactor layout effect methods ([#19895](https://github.com/facebook/react/pull/19895)) //<Brian Vaughn>//
- **[ba82eea38](https://github.com/facebook/react/commit/ba82eea38 )**: Remove disableSchedulerTimeoutInWorkLoop flag ([#19902](https://github.com/facebook/react/pull/19902)) //<Andrew Clark>//
- **[c63741fb3](https://github.com/facebook/react/commit/c63741fb3 )**: offscreen double invoke effects ([#19523](https://github.com/facebook/react/pull/19523)) //<Luna Ruan>//
- **[c6917346f](https://github.com/facebook/react/commit/c6917346f )**: Fixed broken Profiler test ([#19894](https://github.com/facebook/react/pull/19894)) //<Brian Vaughn>//
- **[87c023b1c](https://github.com/facebook/react/commit/87c023b1c )**: Profiler onRender only called when we do work ([#19885](https://github.com/facebook/react/pull/19885)) //<Brian Vaughn>//
- **[81aaee56a](https://github.com/facebook/react/commit/81aaee56a )**: Don't call onCommit et al if there are no effects ([#19863](https://github.com/facebook/react/pull/19863)) //<Andrew Clark>//
- **[7355bf575](https://github.com/facebook/react/commit/7355bf575 )**: Consolidate commit phase hook functions ([#19864](https://github.com/facebook/react/pull/19864)) //<Andrew Clark>//
- **[bc6b7b6b1](https://github.com/facebook/react/commit/bc6b7b6b1 )**: Don't trigger lazy in DEV during element creation ([#19871](https://github.com/facebook/react/pull/19871)) //<Dan Abramov>//
- **[a774502e0](https://github.com/facebook/react/commit/a774502e0 )**: Use single quotes in getComponentName return ([#19873](https://github.com/facebook/react/pull/19873)) //<Gustavo Saiani>//
- **[8b2d3783e](https://github.com/facebook/react/commit/8b2d3783e )**: Use Passive flag to schedule onPostCommit ([#19862](https://github.com/facebook/react/pull/19862)) //<Andrew Clark>//
- **[50d9451f3](https://github.com/facebook/react/commit/50d9451f3 )**: Improve DevTools editing interface ([#19774](https://github.com/facebook/react/pull/19774)) //<Brian Vaughn>//
- **[6fddca27e](https://github.com/facebook/react/commit/6fddca27e )**: Remove passive intervention flag ([#19849](https://github.com/facebook/react/pull/19849)) //<Dan Abramov>//
- **[36df9185c](https://github.com/facebook/react/commit/36df9185c )**: chore(docs): Removed outdated comment about fb.me link  ([#19830](https://github.com/facebook/react/pull/19830)) //<Adnaan Bheda>//
- **[16fb2b6f9](https://github.com/facebook/react/commit/16fb2b6f9 )**: Moved resetChildLanes into complete work ([#19836](https://github.com/facebook/react/pull/19836)) //<Brian Vaughn>//
- **[cc581065d](https://github.com/facebook/react/commit/cc581065d )**: eslint-plugin-react-hooks@4.1.2 //<Dan Abramov>//
- **[0044805c8](https://github.com/facebook/react/commit/0044805c8 )**: Update CHANGELOG.md //<Dan Abramov>//
- **[0f70d4dd6](https://github.com/facebook/react/commit/0f70d4dd6 )**: Consider components in jsx as missing dependencies in typescript-eslint/parser@4.x ([#19815](https://github.com/facebook/react/pull/19815)) //<Sebastian Silbermann>//
- **[84558c61b](https://github.com/facebook/react/commit/84558c61b )**: Don't visit passive effects during layout phase ([#19809](https://github.com/facebook/react/pull/19809)) //<Andrew Clark>//
- **[ad8a0a8cd](https://github.com/facebook/react/commit/ad8a0a8cd )**: eslint-plugin-react-hooks@4.1.1 //<Dan Abramov>//
- **[77544a0d6](https://github.com/facebook/react/commit/77544a0d6 )**: Update CHANGELOG.md //<Dan Abramov>//
- **[ed4fdfc73](https://github.com/facebook/react/commit/ed4fdfc73 )**: test(eslint-plugin-react-hooks): Run with TS parsers >= 2.x ([#19792](https://github.com/facebook/react/pull/19792)) //<Sebastian Silbermann>//
- **[cd75f93c0](https://github.com/facebook/react/commit/cd75f93c0 )**: eslint-plugin-react-hooks: fix compatibility with typescript-eslint/parser@4.0.0+ ([#19751](https://github.com/facebook/react/pull/19751)) //<Matthias Schiffer>//
- **[781212aab](https://github.com/facebook/react/commit/781212aab )**: Remove double space in test name ([#19762](https://github.com/facebook/react/pull/19762)) //<Gustavo Saiani>//
- **[e7b255341](https://github.com/facebook/react/commit/e7b255341 )**: Internal `act`: Flush timers at end of scope ([#19788](https://github.com/facebook/react/pull/19788)) //<Andrew Clark>//
- **[d17086c7c](https://github.com/facebook/react/commit/d17086c7c )**: Decouple public, internal act implementation ([#19745](https://github.com/facebook/react/pull/19745)) //<Andrew Clark>//
- **[d38ec17b1](https://github.com/facebook/react/commit/d38ec17b1 )**: [Flight] Set dispatcher for duration of performWork() ([#19776](https://github.com/facebook/react/pull/19776)) //<Joseph Savona>//
- **[4f3f7eeb7](https://github.com/facebook/react/commit/4f3f7eeb7 )**: Bugfix: Effect clean up when deleting suspended tree ([#19752](https://github.com/facebook/react/pull/19752)) //<Andrew Clark>//
- **[7baf9d412](https://github.com/facebook/react/commit/7baf9d412 )**: Combine Flags and SubtreeFlags types ([#19775](https://github.com/facebook/react/pull/19775)) //<Andrew Clark>//
- **[166544360](https://github.com/facebook/react/commit/166544360 )**: Rename effect fields ([#19755](https://github.com/facebook/react/pull/19755)) //<Andrew Clark>//
- **[708fa77a7](https://github.com/facebook/react/commit/708fa77a7 )**: Decrease expiration time of input updates ([#19772](https://github.com/facebook/react/pull/19772)) //<Andrew Clark>//
- **[36df483af](https://github.com/facebook/react/commit/36df483af )**: Add feature flag to disable scheduler timeout in work loop ([#19771](https://github.com/facebook/react/pull/19771)) //<Ricky>//
- **[bcc0aa463](https://github.com/facebook/react/commit/bcc0aa463 )**: Revert "Revert "Remove onScroll bubbling flag ([#19535](https://github.com/facebook/react/pull/19535))" ([#19655](https://github.com/facebook/react/pull/19655))" ([#19761](https://github.com/facebook/react/pull/19761)) //<Dan Abramov>//
- **[99cae887f](https://github.com/facebook/react/commit/99cae887f )**: Add failing test for passive effect cleanup functions and memoized components ([#19750](https://github.com/facebook/react/pull/19750)) //<Brian Vaughn>//
- **[2cfd73c4d](https://github.com/facebook/react/commit/2cfd73c4d )**: Fix typo in comment (Noticable→Noticeable) ([#19737](https://github.com/facebook/react/pull/19737)) //<Ikko Ashimine>//
- **[53e622ca7](https://github.com/facebook/react/commit/53e622ca7 )**: Fix instances of function declaration after return ([#19733](https://github.com/facebook/react/pull/19733)) //<Bhumij Gupta>//
- **[b7d18c4da](https://github.com/facebook/react/commit/b7d18c4da )**: Support Babel's envName option in React Refresh plugin ([#19009](https://github.com/facebook/react/pull/19009)) //<Kevin Weber>//
- **[1f38dcff6](https://github.com/facebook/react/commit/1f38dcff6 )**: Remove withSuspenseConfig ([#19724](https://github.com/facebook/react/pull/19724)) //<Andrew Clark>//
- **[1396e4a8f](https://github.com/facebook/react/commit/1396e4a8f )**: Fixes eslint warning when node type is ChainExpression ([#19680](https://github.com/facebook/react/pull/19680)) //<Pascal Fong Kye>//
- **[a8500be89](https://github.com/facebook/react/commit/a8500be89 )**: Add `startTransition` as a known stable method ([#19720](https://github.com/facebook/react/pull/19720)) //<Andrew Clark>//
- **[380dc95de](https://github.com/facebook/react/commit/380dc95de )**: Revert "Append text string to <Text> error message ([#19581](https://github.com/facebook/react/pull/19581))" ([#19723](https://github.com/facebook/react/pull/19723)) //<Timothy Yung>//
- **[ddd1faa19](https://github.com/facebook/react/commit/ddd1faa19 )**: Remove config argument from useTransition ([#19719](https://github.com/facebook/react/pull/19719)) //<Andrew Clark>//
- **[92fcd46cc](https://github.com/facebook/react/commit/92fcd46cc )**: Replace SuspenseConfig object with an integer ([#19706](https://github.com/facebook/react/pull/19706)) //<Andrew Clark>//
- **[b754caaaf](https://github.com/facebook/react/commit/b754caaaf )**: Enable eager listeners in open source ([#19716](https://github.com/facebook/react/pull/19716)) //<Dan Abramov>//
- **[c1ac05215](https://github.com/facebook/react/commit/c1ac05215 )**: [Flight] Support more element types and Hooks for Server and Hybrid Components ([#19711](https://github.com/facebook/react/pull/19711)) //<Dan Abramov>//
- **[1eaafc9ad](https://github.com/facebook/react/commit/1eaafc9ad )**: Clean up timeoutMs-related implementation details ([#19704](https://github.com/facebook/react/pull/19704)) //<Andrew Clark>//
- **[8da0da093](https://github.com/facebook/react/commit/8da0da093 )**: Disable timeoutMs argument ([#19703](https://github.com/facebook/react/pull/19703)) //<Andrew Clark>//
- **[60ba723bf](https://github.com/facebook/react/commit/60ba723bf )**: Add SuspenseList to devTools ([#19684](https://github.com/facebook/react/pull/19684)) //<Ben Pernick>//
- **[5564f2c95](https://github.com/facebook/react/commit/5564f2c95 )**: Add React.startTransition ([#19696](https://github.com/facebook/react/pull/19696)) //<Ricky>//
- **[c4e0768d7](https://github.com/facebook/react/commit/c4e0768d7 )**: Remove unused argument from `finishConcurrentRender` ([#19689](https://github.com/facebook/react/pull/19689)) //<inottn>//
- **[848bb2426](https://github.com/facebook/react/commit/848bb2426 )**: Attach Listeners Eagerly to Roots and Portal Containers ([#19659](https://github.com/facebook/react/pull/19659)) //<Dan Abramov>//
- **[d2e914ab4](https://github.com/facebook/react/commit/d2e914ab4 )**: Remove remaining references to effect list ([#19673](https://github.com/facebook/react/pull/19673)) //<Andrew Clark>//
- **[d6e433899](https://github.com/facebook/react/commit/d6e433899 )**: Use Global Render Timeout for CPU Suspense ([#19643](https://github.com/facebook/react/pull/19643)) //<Sebastian Markbåge>//
- **[64ddef44c](https://github.com/facebook/react/commit/64ddef44c )**: Revert "Remove onScroll bubbling flag ([#19535](https://github.com/facebook/react/pull/19535))" ([#19655](https://github.com/facebook/react/pull/19655)) //<Dan Abramov>//
- **[dd651df05](https://github.com/facebook/react/commit/dd651df05 )**: Keep onTouchStart, onTouchMove, and onWheel passive ([#19654](https://github.com/facebook/react/pull/19654)) //<Dan Abramov>//
- **[b8fa09e9e](https://github.com/facebook/react/commit/b8fa09e9e )**: provide profiling bundle for react-reconciler ([#19559](https://github.com/facebook/react/pull/19559)) //<Julien Gilli>//
- **[23595ff59](https://github.com/facebook/react/commit/23595ff59 )**: Add missing param to safelyCallDestroy() ([#19638](https://github.com/facebook/react/pull/19638)) //<Brian Vaughn>//
- **[ee409ea3b](https://github.com/facebook/react/commit/ee409ea3b )**: change destroy to safelyCallDestroy ([#19605](https://github.com/facebook/react/pull/19605)) //<Luna Ruan>//
- **[bcca5a6ca](https://github.com/facebook/react/commit/bcca5a6ca )**: Always skip unmounted/unmounting error boundaries ([#19627](https://github.com/facebook/react/pull/19627)) //<Brian Vaughn>//
- **[1a41a196b](https://github.com/facebook/react/commit/1a41a196b )**: Append text string to <Text> error message ([#19581](https://github.com/facebook/react/pull/19581)) //<Timothy Yung>//
- **[e4afb2fdd](https://github.com/facebook/react/commit/e4afb2fdd )**: eslint-plugin-react-hooks@4.1.0 //<Dan Abramov>//
- **[ced05c46c](https://github.com/facebook/react/commit/ced05c46c )**: Update CHANGELOG.md //<Dan Abramov>//
- **[702fad4b1](https://github.com/facebook/react/commit/702fad4b1 )**: refactor fb.me redirect link to reactjs.org/link ([#19598](https://github.com/facebook/react/pull/19598)) //<CY Lim>//
- **[49cd77d24](https://github.com/facebook/react/commit/49cd77d24 )**: fix: leak strict mode with UMD builds ([#19614](https://github.com/facebook/react/pull/19614)) //<Toru Kobayashi>//
- **[ffb749c95](https://github.com/facebook/react/commit/ffb749c95 )**: Improve error boundary handling for unmounted subtrees ([#19542](https://github.com/facebook/react/pull/19542)) //<Brian Vaughn>//
- **[9b35dd2fc](https://github.com/facebook/react/commit/9b35dd2fc )**: Permanently removed component stacks from scheduling profiler data ([#19615](https://github.com/facebook/react/pull/19615)) //<Brian Vaughn>//
- **[3f8115cdd](https://github.com/facebook/react/commit/3f8115cdd )**: Remove `didTimeout` check from work loop //<Andrew Clark>//
- **[9abc2785c](https://github.com/facebook/react/commit/9abc2785c )**: Remove wasteful checks from `shouldYield` //<Andrew Clark>//
- **[1d5e10f70](https://github.com/facebook/react/commit/1d5e10f70 )**: [eslint-plugin-react-hooks] Report constant constructions ([#19590](https://github.com/facebook/react/pull/19590)) //<Jordan Eldredge>//
- **[dab0854c5](https://github.com/facebook/react/commit/dab0854c5 )**: Move commit passive unmount/mount to CommitWork ([#19599](https://github.com/facebook/react/pull/19599)) //<Sebastian Markbåge>//
- **[ccb6c3945](https://github.com/facebook/react/commit/ccb6c3945 )**: Remove unused argument ([#19600](https://github.com/facebook/react/pull/19600)) //<inottn>//
- **[629125555](https://github.com/facebook/react/commit/629125555 )**: [Scheduler] Re-throw unhandled errors ([#19595](https://github.com/facebook/react/pull/19595)) //<Andrew Clark>//
- **[b8ed6a1aa](https://github.com/facebook/react/commit/b8ed6a1aa )**: [Scheduler] Call postTask directly ([#19551](https://github.com/facebook/react/pull/19551)) //<Andrew Clark>//
- **[ce37bfad5](https://github.com/facebook/react/commit/ce37bfad5 )**: Remove resolutions from test renderer package.json ([#19577](https://github.com/facebook/react/pull/19577)) //<Dan Abramov>//
- **[2704bb537](https://github.com/facebook/react/commit/2704bb537 )**: Add ReactVersion to SchedulingProfiler render scheduled marks ([#19553](https://github.com/facebook/react/pull/19553)) //<Kartik Choudhary>//
- **[0c52e24cb](https://github.com/facebook/react/commit/0c52e24cb )**: Support inner component _debugOwner in memo ([#19556](https://github.com/facebook/react/pull/19556)) //<Brian Vaughn>//
- **[0cd9a6de5](https://github.com/facebook/react/commit/0cd9a6de5 )**: Parallelize Jest in CI ([#19552](https://github.com/facebook/react/pull/19552)) //<Andrew Clark>//
- **[a63893ff3](https://github.com/facebook/react/commit/a63893ff3 )**: Warn about undefined return value for memo and forwardRef ([#19550](https://github.com/facebook/react/pull/19550)) //<Brian Vaughn>//
- **[32ff42868](https://github.com/facebook/react/commit/32ff42868 )**: Add feature flag for setting update lane priority ([#19401](https://github.com/facebook/react/pull/19401)) //<Ricky>//
- **[5bdd4c8c6](https://github.com/facebook/react/commit/5bdd4c8c6 )**: Remove unused argument from call to jest method ([#19546](https://github.com/facebook/react/pull/19546)) //<Gustavo Saiani>//
- **[a5fed98a9](https://github.com/facebook/react/commit/a5fed98a9 )**: Register more node types that are used later as JSXIdentifiers ([#19514](https://github.com/facebook/react/pull/19514)) //<Mateusz Burzyński>//
- **[f77c7b9d7](https://github.com/facebook/react/commit/f77c7b9d7 )**: Re-add discrete flushing timeStamp heuristic (behind flag) ([#19540](https://github.com/facebook/react/pull/19540)) //<Dominic Gannaway>//

Changelog: [general] [feature] Upgrade to React 17

Reviewed By: cpojer

Differential Revision: D24491201

fbshipit-source-id: c947da9dcccbd614e9dc58f3339b63e24829aca7
2020-10-26 20:28:00 -07:00
Héctor Ramos 6f78e16c01 iOS: Build react-native-codegen as part of RNTester pod install
Summary:
Ensure the react-native-codegen package is built before the codegen is invoked during RNTester's pod install.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24515852

fbshipit-source-id: eeb1237f601d83a79a5274261c374bb5fc5689eb
2020-10-26 11:31:08 -07:00
Keith Melmon b5de89755d add testID, helps tests find items in the list (#30138)
Summary:
This change adds a testID to each item in the RNTester list.  This helps Appium find items in the list for automated tests.  The change was added in react-native-windows as part of end-to-end test infrastructure changes.    See https://github.com/microsoft/react-native-windows/pull/5555

We'd like to remove this forked file, upstreaming this change will enable us to do that.

## 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] - add testID to items in RNTester test list, helps test automation tools find the items

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

Test Plan: Change is currently running in react-native-windows CI loop.

Reviewed By: cpojer

Differential Revision: D24434352

Pulled By: appden

fbshipit-source-id: 998916d8fe4e4e4cd6ac764baabb9fd5f2e312c7
2020-10-20 17:29:13 -07:00
Joshua Gross a17ff44adc Upgrade minsdkversion of RN OSS template to API level 21
Summary:
This diff updates the minsdkversion of RN OSS template to API level 21.

Changelog: [Android][Deprecated] Deprecate support of Android API levels 19 and 20. The new minSDK version will be 21+ moving forward.

Reviewed By: fkgozali

Differential Revision: D24379607

fbshipit-source-id: 6801cdcd363065807cdc11006bd94217f914fac7
2020-10-20 17:00:47 -07:00
Héctor Ramos d03c0f965e Generate FBReactNativeSpec ObjC++ source files using CocoaPods
Summary:
Move FBReactNativeSpec codegen invocation to shared `react_native_pods.rb` script and trigger codegen to run as part of `pod install` in both RNTester as well as React Native for iOS projects.

These files need to be generated before CocoaPods generates the Pods project, so the codegen is invoked as part of a `pre_install` hook during `pod install`.

The codegen hook can now take optional paths to allow it to run within different contexts (as part of a `react-native` repo checkout with access to the codegen source, or as part of a React Native iOS project that depends on the `react-native-codegen` npm package).

## Motivation

The FBReactNativeSpec ObjC++ source files (FBReactNativeSpec.h and FBReactNativeSpec-generated.mm) can be generated on demand from the native module specs in `Libraries/` using `react-native-codegen`. They can therefore be removed from the repository, but before we do so, we must ensure they get generated when a React Native iOS workspace is created or updated.

Invoking the codegen as part of the `pod install` step that creates a React Native iOS Xcode workspace ensures the specs are available in the following scenarios:
* Whenever a new React Native iOS project is created. The `react-native init` command invokes `pod install`.
* Whenever a React Native iOS project is upgraded. The `react-native upgrade` command invokes `pod install` as well.
* For contributors to the open source project running the RNTester application, the codegen will be invoked when the RNTester workspace is generated by CocoaPods using `pod install` in `packages/rn-tester`.

In any other case, the codegen can still be invoked directly via `scripts/generate-native-modules-specs.sh`.

> **Note:**
> The codegen will only process native modules in React Native's own Libraries directory.

Changelog:
[iOS][Changed] - Generate FBReactNativeSpec ObjC++ source files using CocoaPods.

Reviewed By: fkgozali

Differential Revision: D24348111

fbshipit-source-id: d62ae5c6f8ce6358bf96a2801c3cdb3d94dd868d
2020-10-20 13:17:00 -07:00
Kevin Gozali 3ed38df175 TurboModule Android: Remove RNTester module lookup override
Summary:
The manual lookup logic was needed before we properly parse the module names from the spec js files. This is no longer necessary after the commit stack starting with 3a75b376cc

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D24370567

fbshipit-source-id: fc307d93cdda240a977e37dfe602502bd3f7c2a4
2020-10-17 02:45:48 -07:00
Lorenzo Sciandra fb14fd42b3 Chore: Upgrade Detox to 16.7.2 (#30084)
Summary:
With Xcode 12 being the latest, Detox 15.x has issues - in particular, it means that if you try to `yarn install` the dependencies for the repo, you'll be greeted by this error:

```bash
error /<stuff>/react-native/node_modules/detox: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments:
Directory: /<stuff>/react-native/node_modules/detox
Output:
/<stuff>/Library/Detox/ios/5824c837515589f21c08f09b716a6eda088aa31f was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
         deleting /<stuff>/Library/Detox/ios/5824c837515589f21c08f09b716a6eda088aa31f and trying to rebuild.
Extracting Detox sources...
Building Detox.framework from /<stuff>/Developer/OSS/react-native/node_modules/detox/ios_src...
child_process.js:637
    throw err;
    ^
```

With the {emoji:1f44d} of hramos & alloy I've prep'd up a small defensive PR that can be quickly merged before cutting 0.64, that bumps the version of Detox from 15.4.4 to the highest version available within the reach of "no breaking changes" in changelog.

The main reason why with 16.x this error doesn't happen is that from [16.0.0](https://github.com/wix/Detox/releases/tag/16.0.0):

> Detox now comes as a prebuilt framework on iOS, thus lowering npm install times and saving some build issues that happen due to unexpected Xcode setups.

It would have been better to update directly to latest (at the time of writing 17.7.1) but there are at least two versions that had changelogs that seem to involve bigger changes:

* https://github.com/wix/Detox/releases/tag/17.4.7
* https://github.com/wix/Detox/releases/tag/16.8.0

Hopefully CI will will show that the bump doesn't break any test �

## 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] [Changed] - Bumped Detox in the repo to 16.7.2 for Xcode 12 compatibility

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

Test Plan: Running yarn in the main repo with Node 14 & Xcode 12, without this change, will cause the error copy-pasted above. After upgrading to this version, the error disappear.

Reviewed By: cpojer

Differential Revision: D24293226

Pulled By: hramos

fbshipit-source-id: 2b4d23b033be621274966262ec19200bee44df58
2020-10-14 12:06:06 -07:00
Lulu Wu ea93151f21 Make RCTEventDispatcher TurboModule-compatible
Summary:
This diff ended up being a bit more complicated than I anticipated, since the source files in `ReactInternal` were depending on `RCTEventDispatcher`. I made the following changes:
1. Make `RCTEventDispatcher` a `protocol`, keep it in `ReactInternal`.
2. Rename the `RCTEventDispatcher` NativeModule to `RCTEventDispatcherModule`, make it conform to the `RCTEventEmitter` `protocol`, and move it to `CoreModules`.
3. Where necessary, replace categories of `RCTEventDispatcher` with functions.

Changelog:
[iOS][Added] - Make RCTEventDispatcher TurboModule-comaptible

Reviewed By: fkgozali

Differential Revision: D18439488

fbshipit-source-id: b3da15c29459fddf884519f33b0c3b8c036b5539
2020-10-14 02:40:10 -07:00
Peter Argany b05d90e8bb Remove type union in Picker.js
Summary:
Flow type unions don't play well with Fabric components. This diff removes a union in `Picker.js` and fixes all the flow errors.

Before this diff, all these surfaces would crash with the new Fabric Picker impl, because the impl asserts that this field is a string.

Reviewed By: sammy-SC

Differential Revision: D24236317

fbshipit-source-id: 6e646c84fcd16658aaabe5e93507f5f33b346a65
2020-10-13 11:19:29 -07:00
Nick Gerleman 4d247fe058 Avoid Repo Structure Assumptions in RNTester Imports (#30141)
Summary:
RNTester has some imports left over that operate on directory traversal, assuming it is contained within react-native sources. This change makes these imports relative to react-native, enabling usage outside of the RN repo.

Relates to https://github.com/microsoft/react-native-windows/issues/6210

## Changelog

[Internal] [Fixed] - Avoid File Structure Assumptions in RNTester Imports

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

Test Plan: Validated we can bundle and flow-check both iOS + Android

Reviewed By: cpojer

Differential Revision: D24259628

Pulled By: appden

fbshipit-source-id: 0c21b5d354b01785d8402599da3b0a5be81b4c6d
2020-10-12 19:56:09 -07:00
simek b7167c23fc PlatformColors: add missing clearColor for iOS (#30054)
Summary:
This small PR adds missing [`clearColor`](https://developer.apple.com/documentation/uikit/uicolor/1621945-clearcolor?language=objc) to the avaiable PlatformColors on iOS.

**Please let me know** if you would like to see ["Fixed colors"](https://developer.apple.com/documentation/uikit/uicolor/standard_colors?language=objc) added to the `PlatformColors`. I can address this within this PR or create a separate one.

## 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] - PlatformColors: add missing `clearColor`

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

Test Plan:
[(I had to disable the Dark Mode to fix the RNTester readability problems)](https://user-images.githubusercontent.com/719641/94453196-b35cb000-01b0-11eb-8d7d-73d48ceecf53.PNG)

Transparent/clear color has been added to the RNTester PlatformColors API example:
![IMG_6782](https://user-images.githubusercontent.com/719641/94453172-ae97fc00-01b0-11eb-9bef-1a1a387ac009.PNG)

Reviewed By: shergin

Differential Revision: D24241160

Pulled By: sammy-SC

fbshipit-source-id: 41fb51677329cc3b3f915d5d08694c07b4ef2cf3
2020-10-12 02:14:42 -07:00
Janic Duplessis 6685aba462 Update template to xcode 12 (#30150)
Summary:
This makes a few change to the template xcodeproj

- Update to recommended settings for Xcode 12
- Remove the main.jsbundle file that doesn't exists, this file is included automatically in the app bundle and doesn't need to be in xcode (it won't even be at that path).
- Add -e to the bundle images script. It seems like Xcode doesn't fail the build on script errors anymore so this makes it so the build stop. If it doesn't stop the app will launch and crash because the bundle doesn't exist (note this is only if running the app in release mode since in debug we don't generate the bundle).

## Changelog

[iOS] [Added] - Update template to xcode 12

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

Test Plan: Made the same changes in an app and made sure it ran well.

Reviewed By: cpojer

Differential Revision: D24237481

Pulled By: sammy-SC

fbshipit-source-id: 2b06a24c510c423eb45a1a840ea365b64506321b
2020-10-12 01:28:32 -07:00
Kevin Gozali 1d89ef87b6 TurboModule: exclude NativeSampleTurboModule in the schema
Summary:
The sample module is meant for demo only, but it lives alongside other core modules in react-native repo.

For now, exclude it in the Flow-type parsing, just like `NativeUIManager.js`

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24005108

fbshipit-source-id: 9ef524bfe2778dd983c94d1701f9ce49da5e0a68
2020-09-29 18:41:14 -07:00
Kevin Gozali 94b198cfd5 TurboModule Android: install SampleTurboModule and the playground to RNTester
Summary:
This compiles SampleTurboModule into RNTester Android. It also adds the NativeModule playground to show case TurboModule system to RNTester examples, just like in iOS.

{F337854369}

Changelog: [Android][TurboModule] Added TurboModule example to RNTester when `USE_CODEGEN` is set

Reviewed By: hramos

Differential Revision: D24004711

fbshipit-source-id: b682dd51fa998ee2e60f8d6ffd8c39220d13a7fe
2020-09-29 18:41:14 -07:00
Kevin Gozali b9a1ea9e9e TurboModule Android: move SampleTurboModule impl and spec to OSS
Summary:
This is the Java/JNI impl of the NativeSampleTurboModule.js, just like on iOS. The files here are supposed to be generated by the react-native-codegen, but they are checked in to the repo for easier build integration with RNTester.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D23985746

fbshipit-source-id: 46340d778f3d964efe5b538d15ebe0f2cab04862
2020-09-29 18:41:14 -07:00
Kevin Gozali b931bd33fe TurboModule Android: properly set up RNTester ndkBuild and cleanup dependencies
Summary:
Before RNTester compilation starts, it needs to wait for :ReactAndroid NDK build to finish, so that it knows where to find the exported .so files. This tells the `preBuild` task to depends on `:ReactAndroid:prepareReactNdkLibs` task. The .so files are now copied over to the local project build dir, instead of depending on :ReactAndroid's build dir.

For cleanup, the reverse ordering is needed: before `clean` removed our temp dir to store the copied .so files, make sure the ndkBuild cleanup tasks execute beforehand.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D23982989

fbshipit-source-id: 955d7c9bccb5855b6b066fca89764df2ede89f63
2020-09-29 18:41:14 -07:00
simek 29f5dc2ae0 chore: deduplicate lock, update packages repository fields (#30044)
Summary:
This small PR includes the following changes:
* deduplicate yarn lock file using [`yarn-deduplicate`](https://github.com/atlassian/yarn-deduplicate) package
  * deduplicate script has been added as `update-lock`, let me know if you would like also to see this in [`postinstall`](https://docs.npmjs.com/misc/scripts) (to automatically optimize lock on every dependency change)
* according to the [npm docs](https://docs.npmjs.com/files/package.json#repository):
  * main `package.json` repository field has been replaced with shorthand
  * monorepo packages repository field has been extended by `directory`

The main goal of introducing deduplication script was to optimize the dependencies footprint while developing and speed up the initial installation process. Running `yarn-deduplicate` also increase the security in some way, because it enforces usage only of the latest version of the package. You can read more about the benefits in the deduplicate script [repository](https://github.com/atlassian/yarn-deduplicate#duplicated-packages).

## 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] [Added] - add yarn lock deduplication script

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

Test Plan: `yarn install` was successful, this also should not affect yarn workspaces in any way.

Reviewed By: GijsWeterings

Differential Revision: D23959812

Pulled By: cpojer

fbshipit-source-id: e2455e3718378e1ce6206e79463d4083f8fe5d47
2020-09-28 22:41:50 -07:00
simek 2160377574 remove most of tvOS remnants from the code (#29407)
Summary:
Refs: [0.62 release](https://reactnative.dev/blog/#moving-apple-tv-to-react-native-tvos), https://github.com/facebook/react-native/issues/28706, https://github.com/facebook/react-native/issues/28743, https://github.com/facebook/react-native/issues/29018

This PR removes most of the tvOS remnants in the code. Most of the changes are related to the tvOS platform removal from `.podspec` files, tvOS specific conditionals removal (Obj-C + JS) or tvOS CI/testing pipeline related code.

In addition to the changes listed above I have removed the deprecated `Platform.isTVOS` method. I'm not sure how `Platform.isTV` method is correlated with Android TV devices support which is technically not deprecated in the core so I left this method untouched for now.

## 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] [Removed]** - remove most of tvOS remnants from the code:
  * `TVEventHandler`, `TVTouchable`, `RCTTVView`, `RCTTVRemoteHandler` and `RCTTVNavigationEventEmitter`
* **[Internal] [Removed]** - remove `TARGET_TV_OS` flag and all the usages
* **[iOS] [Removed]** - remove deprecated `Platform.isTVOS` method
* **[iOS] [Removed]** - remove deprecated and TV related props from View:
  * `isTVSelectable`, `hasTVPreferredFocus` and `tvParallaxProperties`
* **[iOS] [Removed]** - remove `BackHandler` utility implementation

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

Test Plan: Local tests (and iOS CI run) do not yield any errors, but I'm not sure how the CI pipeline would react to those changes. That is the reason why this PR is being posted as Draft. Some tweaks and code adjustment could be required.

Reviewed By: PeteTheHeat

Differential Revision: D22619441

Pulled By: shergin

fbshipit-source-id: 9aaf3840c5e8bd469c2cfcfa7c5b441ef71b30b6
2020-09-28 21:26:41 -07:00
Joshua Gross 35b8f76c9e RNTester: Add TextInput example to RTL tester
Summary:
Add a TextInput to RTL screen in RNTester, to test RTL languages with TextInput.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D23914627

fbshipit-source-id: 84c62efe7034c0dfa2ef21be3f085880292c3930
2020-09-28 10:45:01 -07:00
Kevin Gozali 8d4b5efac7 TurboModule Android: allow RNTester to activate TurboModule system
Summary:
If built with `USE_CODEGEN=1` flag set, RNTester now activates the TurboModule system, also using various codegen output from the previous commits.

Note that this is very early integration, and not thoroughly tested yet.

To verify:

```
console.warn('TM enabled?', global.__turboModuleProxy != null);
```

{F337454276}

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D23946944

fbshipit-source-id: 5838aeb9ded07b1cc0fcb069535d1c6fb3725973
2020-09-25 22:14:56 -07:00
Kevin Gozali 9dbab5fb7b TurboModule Android: Implement TurboModuleManagerDelegate specific to RNTester
Summary:
This provides the RNTester specific impl of the manager delegate. The class is responsible to provide module lookup during runtime for TurboModule, and the C++ impl is using the codegen-generated lookup functions from :ReactAndroid and :packages:rn-tester:android:app Gradle targets.

Note: RNTester still needs to explicitly enable TurboModule and instantiate this manager before it can activate TurboModule.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D23938537

fbshipit-source-id: 7957847ecc58fef8d9a276d9d3d477ecec36a700
2020-09-25 22:14:56 -07:00
Kevin Gozali 4072b1865a TurboModule Android: rename libreact_nativemodule_manager to libturbomodulejsijni
Summary:
TurboModule Java files are still using the old lib name: `turbomodulejsijni`, so let's keep it that way for now.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D23946945

fbshipit-source-id: ff095ff51dca532c82e67e1c75e9a4e9be392d61
2020-09-25 22:14:56 -07:00
Kevin Gozali 45a4a67965 Android: consolidate various prebuilt C++ .so configuration into Android-prebuilt.mk
Summary:
To make it easier for hosting app or other lib to get access to the ReactAndroidNdk .so outputs, let's define common targets in a dedicated Android-prebuilt.mk. Hosting app's Android.mk just need to include the mk path.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D23938538

fbshipit-source-id: 850d690326d134212d5f040c6fa54ab50c53cb87
2020-09-25 22:14:56 -07:00
Kevin Gozali abff021261 TurboModule Android: compile codegen C++ output into librntester_appmodules.so
Summary:
The react-native-codegen provides Android.mk in the Android C++ output, but for RNTester (or hosting apps), we should just compile the codegen output with the rest of the app-specific C++ files. This is to simplify the build configuration, and also to not add too many additional .so libs to the APK.

With this commit, `RNTesterAppModuleProvider.cpp` should be "complete" for RNTester use-case. This TurboModule lookup function is the one described in https://github.com/react-native-community/discussions-and-proposals/issues/273.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D23913149

fbshipit-source-id: d1ca136787b87a0e8e6504318e1f0a78efef46ea
2020-09-24 15:24:10 -07:00
Kevin Gozali 77c16578bf TurboModule Android: add dependency on ReactAndroid codegen output to RNTester
Summary:
This adds shared libraries dependencies to RNTester so that it can call `ReactAndroidSpec_ReactAndroidSpec_ModuleProvider()` C++ lookup function. That function is generated by the react-native-codegen during build time. This does not make RNTester use TurboModule yet, just the necessary setup to link the C++ libs together.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D23901952

fbshipit-source-id: fd5ee0ca266609207962adc5ceaf814956052eec
2020-09-24 09:43:43 -07:00
Ankit Tiwari 99db9f2a42 Minor Code Improvements in RNTester (#29868)
Summary:
* Update single-letter variable names to be more descriptive
* Remove event listener on component unmount
* Add flow types
* Refactor RNTesterNavbar to use descriptive component names

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

Reviewed By: hramos

Differential Revision: D23598579

Pulled By: rickhanlonii

fbshipit-source-id: c5cfc61d7b2fcb2942bf149d0a8ba0b58b0192e6
2020-09-23 19:58:05 -07:00
chirag-singhal 43abf23bff New Button Component Use Cases (#29848)
Summary:
* New use cases for button component in rn-tester
 * E2E tests for the button component

## Changelog
[General] [Changed] - Changed use cases for button component in rn-tester

## Test Plan
![image](https://user-images.githubusercontent.com/42653703/92123053-ced6d400-ee19-11ea-8f10-c5e8529c85ca.png)
After -
![image](https://user-images.githubusercontent.com/42653703/92625569-70609880-f2e6-11ea-9fb9-f7327d842a34.png)
Before -
![image](https://user-images.githubusercontent.com/42653703/92625555-6a6ab780-f2e6-11ea-90d1-8c54ebc60062.png)

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

Reviewed By: hramos

Differential Revision: D23649694

Pulled By: rickhanlonii

fbshipit-source-id: 3590eca08ea58c771596ad731f74eb233b1a40d8
2020-09-23 19:51:49 -07:00
Kevin Gozali c3ab2a2541 RNTester Android: Add stub C++ for TurboModule provider (#30014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/30014

This is the base setup to compile C++ as part of RNTester app. There is no dependencies on ReactAndroidNdk lib yet, just a bunch of ndkBuild setup in Gradle. Note: this is using Gradle's `nkdBuild` support instead of calling `ndk-build` manually like in ReactAndroid/build.gradle.

Reference: https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.ExternalNativeNdkBuildOptions.html

Note that `ANDROID_NDK` env var is honored to pick the right NDK version.

For now, this is gated behind `USE_CODEGEN` env variable.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D23887058

fbshipit-source-id: 7a962649461d15af46999a15b900464543e5b05c
2020-09-23 16:52:48 -07:00
Eloy Durán 6e08f84719 Make React-Core compatible with Swift modules (#29995)
Summary:
Related to https://github.com/facebook/react-native/issues/29633

Support Swift based libraries using Xcode 12’s build system.

## Changelog

[iOS] [Fixed] - Support Swift based libraries using Xcode 12’s build system.

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

Test Plan:
* Building RNTester still works
* Swift based pod tested in https://github.com/mrousavy/react-native-blurhash/issues/58

Reviewed By: fkgozali

Differential Revision: D23824438

Pulled By: appden

fbshipit-source-id: 418caf9808cb6326e3d6efdc8b37131a5705e7f6
2020-09-23 08:17:33 -07:00