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

21268 Коммитов

Автор SHA1 Сообщение Дата
Oleksandr Melnykov d238da71aa Do not crash when ScrollView snapToOffsets is empty
Summary:
The value of the `ScrollView.snapToOffsets` property can be an empty array (most likely an issue in the product code), which will crash the app. This diff adds a check to prevent crashing in this scenario and falling back to the default snap behaviour.

Changelog:
[Android][Fixed] - Do not crash when ScrollView snapToOffsets is empty

Reviewed By: sammy-SC

Differential Revision: D24502365

fbshipit-source-id: c63b8e3b8f2fb323ebd6c962ee628015934d8e11
2020-10-23 05:10:54 -07:00
Samuel Susla 6eed1e4f80 Remove iOS gating to fix sticky header
Summary:
Changelog: [internal]

The comment talks about jankiness which isn't there anymore.
Not setting translateY breaks Fabric's measure infra.

Reviewed By: JoshuaGross

Differential Revision: D24482016

fbshipit-source-id: 8188caa5bee5b8d2b1e686b289f5fd1ccc9e4a65
2020-10-23 04:22:31 -07:00
Samuel Susla 3a5eedffff Remove noexcept from TelemetryController
Summary:
Changelog: [internal]

There are two exceptions inside `TelemetryController::pullTransaction`:
- Empty Optional cannot be unwrapped
- mutex lock failed: Invalid argument

By marking this method `noexcept`, stack trace is lost and it makes it more difficult to track down the issue.

What does compiler do if a method is marked `noexcept`?

```
void f() noexcept {
    try {
        // do work
    }
    catch (...) {
        std::terminate(); // This is the std::terminate() we are seeing in stack traces.
    }
}
```

Removing noexcept specifier might give us more information about the exception.

Reviewed By: JoshuaGross

Differential Revision: D24477861

fbshipit-source-id: 80f26e9ab160a5330c2848b89a01d60bfc0a4611
2020-10-23 02:34:04 -07:00
Tim Yung a911efaecd Text: Refine Exported Flow Type
Summary:
Refines the exported type of `Text` so that it is more accurate.

Instead of `HostComponent<TextProps>` (which is not exactly accurate), we use the recently introduced types: `NativText` and `NativeVirtualText`.

Changelog:
[Changed][General] - Refined Flow type for `Text` component.

Reviewed By: nadiia

Differential Revision: D24486720

fbshipit-source-id: fad114fd14335933ebc2f7430d7b8b7838b6b523
2020-10-22 20:01:39 -07:00
Liang Liu afb926abb1 Sort index.js by alphabetical order and add category comments. (#30217)
Summary:
As of right now, index.js contains a big blob of imports that are mostly in alphabetical order, with a few exceptions. In addition, the imports aren't separated by Components / API / Plugins, so comments were added for ease of future maintainability.

## Changelog

[Internal] [Changed] - Reordered imports into alphabetical order and added comments to divide imports into sections (components, apis, plugins, prop types)

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

Test Plan:
This change did not change the codebase. Building rn-tester still works.

rickhanlonii

Reviewed By: cpojer

Differential Revision: D24490715

Pulled By: rickhanlonii

fbshipit-source-id: 7340395c8e10833b700dcfe8e83ab4a66b79e47b
2020-10-22 19:58:11 -07:00
Janic Duplessis a28dd38909 Use default for hermes es6 proxy enabled (#30142)
Summary:
Proxy is now enabled by default in hermes 0.7 (https://github.com/facebook/hermes/releases/tag/v0.7.0). However we currently disable it because of the config we pass.

This removes the config so proxy is now enabled.

## Changelog

[Android] [Changed] - Use default for hermes es6 proxy enabled

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

Test Plan: Tested that proxy is now enabled (typeof Proxy !== 'undefined') with hermes 0.7.

Reviewed By: cpojer

Differential Revision: D24494182

Pulled By: mhorowitz

fbshipit-source-id: 7f8a506e2c436f2f1611e183ca22d33dc763643c
2020-10-22 18:57:33 -07:00
Janic Duplessis 3a41f69f9c Make sure js bundle still exists at bundle-output path (#30149)
Summary:
Since changes to support hermes on iOS the js bundled is moved away from the location where it is generated when calling metro. This causes issues with the RN sentry integration since it relies on intercepting this path to find the bundle file after running react-native-xcode.sh. Seems kind of like a hacky way to get the bundle location, but let's avoid breaking it.

https://github.com/getsentry/sentry-cli/blob/master/src/commands/react_native_xcode.rs

## Changelog

[iOS] [Fixed] - Make sure js bundle still exists at bundle-output path

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

Test Plan:
Checked that the bundle file exists both at bundle-output path and in the .app.
Checked that the sentry release script works.

Reviewed By: cpojer

Differential Revision: D24480115

Pulled By: appden

fbshipit-source-id: c01c80d47ed54319f97063ec635c021552a95c22
2020-10-22 17:55:55 -07:00
Samuel Susla bfbd841f38 Remove redundant property from ImageRequest
Summary:
Changelog: [internal]

`moved_`, introduced in D8526571 (979ea2094e), no longer servers its purpose.
Let's remove it.

Reviewed By: JoshuaGross

Differential Revision: D24475715

fbshipit-source-id: 162d1fc4ed3d4a67885d8f140904dd80763dcaa0
2020-10-22 17:52:30 -07:00
Kevin Gozali 16044b3c2a Codegen Buck: fork schema generator target for FB vs OSS via rn_codegen_cli()
Summary:
Introduced a helper macro `rn_codegen_cli()` that defines ":write_to_json" and ":rn_codegen" targets differently based on the environment. When run at FB, it uses FB-specific setup. When run in OSS as a standalone repo, we use `yarn install` and `yarn run build` directly, then use `node` to run the output CLI.

This way, the same target can be used in both environments on other Buck targets.

Motivation: we need this to define rn_codegen_modules() to use codegen to produce Java TurboModule specs, that can be built by CircleCI (we build ReactAndroid via Buck as well). That way we can finally removed the checked-in .java spec files.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24442468

fbshipit-source-id: b1e5fce275100cfe3a1b3ae6d61c1c6d4b25651b
2020-10-22 17:09:30 -07:00
Kevin Gozali 7cfc7d65f7 Codegen: Make react-native-codegen BUCK deps OSS-compatible
Summary:
Added a few FB vs OSS polyfills:
* react_native_root_target() to refer to the root FB react-native-github/ dir or repo dir in OSS
* react_native_xplat_synced_target() for anything xplat
* a few others

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D24437245

fbshipit-source-id: ee290a87a98a8e9be67b102a96f2faac2a2cb92b
2020-10-22 17:09:29 -07:00
Joshua Gross f8eaab4fdc Workaround for T76236115 and swallow crash while using TextEdit
Summary:
There's a crash for a small number of users that looks like it is happening when cutting the text via a context menu, or deleting content near the end.

This is only happening because we cache the Spannable and it detects changes due to the cache mechanism itself. I'm making a minor change that will hopefully result
in Spannables being copied instead of the same Spannable instances being used for display on the View and measurement; and also swallowing this error, since it should
not be considered as a fatal, unrecoverable error for now. Hopefully we can delete entirely in the future.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D24430622

fbshipit-source-id: 495458b3d85733e46a7e62b5c954b7cb6b00470b
2020-10-22 13:53:19 -07:00
Samuel Susla ae418b83c0 Fix crash when blurring image
Summary:
Changelog: [internal]

Copy `blurRadius` into a variable instead of accessing it through a reference which might not exist when the block is dispatched.

Reviewed By: cpojer

Differential Revision: D24472850

fbshipit-source-id: 936ef671255ae0e825e1d2dfda9649824b63d297
2020-10-22 01:48:55 -07:00
Marc Horowitz a8c90e6af4 Make conversions between folly::dynamic and JSI non-recursive
Summary:
Changelog:
[General][Fixed] - Fix handling of very deeply nested data across the bridge

fixes facebook/hermes#339

Reviewed By: sammy-SC

Differential Revision: D24182938

fbshipit-source-id: b674283a112b98cc63f20e436c538e3789ddf6dd
2020-10-21 20:54:55 -07:00
Héctor Ramos 9218e0c2e6 iOS: Generate FBReactNativeSpec ObjC++ files at build time
Summary:
Removes the generated FBReactNativeSpec files from source control.

## Generating FBReactNativeSpec files

The files will be generated automatically by CocoaPods when the `RNTesterPods` Xcode workspace is generated:

```
cd packages/rn-tester
pod install
```

The spec files can be re-generated by invoking the script directly:
```
./scripts/generate-native-modules-specs.sh
```

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D24261167

fbshipit-source-id: acb7ac856e5e519932e4f587f79e24f49cd84a91
2020-10-21 20:47:09 -07:00
Samuel Susla 5333ad8a61 Add unit tests for RCTComponentViewRegistry
Summary:
Changelog: [internal]

Adds unit tests for `RCTComponentViewRegistry`.

Reviewed By: shergin

Differential Revision: D24391419

fbshipit-source-id: e8adb641361c3e1394f652a1819f196d2402f493
2020-10-21 10:49:43 -07:00
Ramanpreet Nara 5b270e0243 Version bump to 0.0.5
Summary:
Just published react-native-codegen to npm. This diff bumps the version in package.json

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24433252

fbshipit-source-id: 35327b11ca4db270f207b6f778dabf86dd7dcb4c
2020-10-20 23:43:00 -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 49f10fd2e5 Remove code for API level 20 and below
Summary:
We've deprecated API 20 and below. This is just a cleanup to remove code that assumes API level <21.

Changelog: [Android][Deprecated] Deprecate support of Android API levels 19 and 20.

Reviewed By: fkgozali

Differential Revision: D24380233

fbshipit-source-id: d8f98d7cb19446a60ba36137f1f9290e35f27c02
2020-10-20 17:00:47 -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
Samuel Susla 36b0f7d19b Fix controller <TextInput> on iOS when inputting in Chinese/japanese
Summary:
Changelog: [internal]

Solution copied over from 892212bad2 (diff-0874427511e8753d0037472fffbe6d7ee014d831e254d4b3c12ffb1dd8ce27c9)

Reviewed By: JoshuaGross

Differential Revision: D24429166

fbshipit-source-id: 3c0588ac774041a9fd6d1b6685d94c5658f754b2
2020-10-20 15:56:56 -07:00
Kevin Gozali eca9d9772c Codegen: Make BUCK & DEFS.bzl OSS friendly
Summary:
This makes the build configuration compatible with OSS Buck (but doesn't provide the complete capability).

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24414408

fbshipit-source-id: 4632933b8659389543ed72ae7c11c63d86bb3dce
2020-10-20 14:11:46 -07:00
Kevin Gozali 82c95fadc1 Codegen (FB): define internal BUCK targets for Android + JNI
Summary:
`rn_codegen_modules()` now defines 2 additional Android targets:
* the rn_android_library()
* the C++ library for JNI files

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24411783

fbshipit-source-id: 5ee4550dc313041f87e133397f266279b3eec6ee
2020-10-20 14:11:45 -07:00
Kevin Gozali 13d9927a48 Codegen: separate Android/Cxx/iOS modules codegen outputs
Summary:
For now, separate the definition of `modules` generator per platform to avoid file output collision. Additionally:
* For Android, produce files under java/ (plus nested subdirs based on packageName) and jni/ (for C++ files) - JavaPoet version already does it
* Allow configuring packageName for Android - JavaPoet version has this
* Avoid tmp directory dance in the CLI script, given the proper modules separation

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24410864

fbshipit-source-id: 9bd6bc1d65bec037bfca32ec478f3af50d72e927
2020-10-20 14:11:45 -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
Hugo Cuvillier 403d6f4401 Migrate remaining call sites to `CKOverlayLayoutComponent` to Builder
Summary:
Ditto

Changelog: [Internal]

Reviewed By: aCorrado

Differential Revision: D24395872

fbshipit-source-id: 38260ed7ce154036d8e40493cfe81506cf3054e8
2020-10-20 05:58:21 -07:00
Joshua Gross ca4bac5534 EZ: Fix debug mode NPE in non-Fabric
Summary:
Fixes a NPE in debug mode. This will only impact developers who have explicitly turned this debug flag on, so it's a very low-pri fix.

Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D24410825

fbshipit-source-id: 08c8a0c6d0e0fb7c132725ad6af9460b91a7edf3
2020-10-20 05:20:26 -07:00
Ramanpreet Nara 9c1f0c697d Make NativeModule spec parser collect all parsing errors
Summary:
## Rationale
Previously, the NativeModule spec parser would throw an error the first time it encountered an invalid Flow type. While this is ideal from a parsing standpoint, from a linting standpoint, however, we may want to display all errors that make the NativeModule spec invalid.

## Changes
This diff extends the NativeModule spec parser to collect all parsing errors in an array. In the codegen, if after building the schema, any parsing errors were detected, we throw the first one. In the ESLint rule, if after building the schema, any parsing errors were detected, the plan is to display them all.

## Notes
- All ParserErrors keep a track of the invalid AST Node
- When a Parsing error occurs, the Parser tries its best to continue parsing the rest of the source. For function parameters, it'll move on to the next param. For object proroperties, it'll move to the next property. It'll form a half-baked schema in the process, when a parsing error occurs. However, higher up in the stack, we have a check that discards the half-baked schema, if any ParsingErrors were collected.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24379511

fbshipit-source-id: 1989433da9b356b9ad5d9dcf901b429f585803c2
2020-10-19 21:59:29 -07:00
Ramanpreet Nara 2f438b03d7 Make buildModuleSchema and buildComponentSchema operate on Program AST nodes
Summary:
## Why
We want to reuse these functions inside the ESLint rule. Therefore, it's better to make them accept the AST node object, as opposed to a custom type defined in codegen.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24379512

fbshipit-source-id: 9f7378fc6c5f48cce34da109f5a7c017332b302a
2020-10-19 21:59:29 -07:00
Ramanpreet Nara 33789ba0ea GenerateModuleCpp: Replace string replace with string templates
Summary:
## Benefits:
- Improved Readability
- Improved type-safety with templates

Changelog: [Internal]

Differential Revision: D24386276

fbshipit-source-id: d5913122221960c06c5256af10ace1d2f7a60b49
2020-10-19 21:59:29 -07:00
Ramanpreet Nara de32fd2539 GenerateModuleH: Replace string replace with string templates
Summary:
## Benefits:
- Improved Readability
- Improved type-safety with templates

Changelog: [Internal]

Differential Revision: D24386278

fbshipit-source-id: b6cfa9fe17e1f7c54f4d541fd19281bf9a6c6796
2020-10-19 21:59:29 -07:00
Ramanpreet Nara ac46837d35 GenerateModuleJavaSpec: Replace string replace with string templates
Summary:
## Benefits:
- Improved Readability
- Improved type-safety with templates

Changelog: [Internal]

Differential Revision: D24386277

fbshipit-source-id: 28fbc0eab2c4455d391a1644b5c42c0cb39f69ad
2020-10-19 21:59:29 -07:00
Ramanpreet Nara 5a73af684d GenerateModuleJniCpp: Replace string replace with string templates
Summary:
## Benefits:
- Improved Readability
- Improved type-safety with templates

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24386280

fbshipit-source-id: 9af78d8aabd86a6afb53660ff97d550973e5d11b
2020-10-19 21:59:28 -07:00
Ramanpreet Nara 35ee7c8246 GenerateModuleJniH: Replace string replace with string templates
Summary:
## Benefits:
- Improved Readability
- Improved type-safety with templates

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24386281

fbshipit-source-id: 558bc13edff51e801b605669613cd63309522236
2020-10-19 21:59:28 -07:00
Ramanpreet Nara fc94054915 Refactor: Rename `codegenModuleName` to `hasteModuleName`
Summary:
In our Codegen generators, we were using `codegenModuleName` to refer to the name of the spec file. Calling this `hasteModuleName` makes it more clear what this name refers to (i.e: the name of the spec file). This diff performs that rename.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24386282

fbshipit-source-id: fe2beda9a0abf63a5cf88fa0664f83416c9f1aa2
2020-10-19 21:59:28 -07:00
Valentin Shergin c642afd97d Fabric: Making `_propKeysManagedByAnimated` to preserve previous prop keys
Summary:
The previous implementation always replaced the prop set on every props update coming from Animated. Now, we merge the new set of props with the previous one.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D24370751

fbshipit-source-id: 779272d47c776cc42071d3c93d06443b6c96a877
2020-10-19 19:21:22 -07:00
Kevin Gozali b05294dd99 Codegen fbsource: filter JS files for all cases, then enable codegen_module=True for react-native-github
Summary:
The specific file filtering in the CLI only covers the case where the input is a directory. We should filter when files are provided as well.

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24399225

fbshipit-source-id: 186e39c157faf90bdd825ec5c5860017d49e9404
2020-10-19 15:30:05 -07:00
Xuan Huang 0a28b34dac Conditionalize Promise Polyfill for Hermes
Summary:
On Hermes, RN can directly use the Promise from global w/o the need of polyfilling it.

PromiseRejectionTrackingOptions are extracted to its own file so it can be shared by
both codepaths and preserve the behaviors that it's only imported on dev.
Some zero-overhead type gymnastics are used to flow-type it properly.

Changelog:
[General] - made promise polyfill conditionalized on Hermes

Reviewed By: cpojer

Differential Revision: D24068716

fbshipit-source-id: 3e0b1675493908324f27cc5b7300d8cc42a03acc
2020-10-19 15:24:38 -07:00
Riley Dulin 3c154c8336 Add HeapProfiler.collectGarbage implementation
Summary:
In Chrome, there's a garbage can icon in the memory profiler page that you can
click to force a garbage collection.
Hermes was previously not responding to that button. Add support for this inspector
message type.

The collection it starts is fully synchronous and will block JS from running. It typically
completes quite fast for small heaps, and about 1 second for heaps over 100 MB big.

Changelog:
[Internal][Added] Add support for garbage collection during heap profiling with Hermes

Reviewed By: neildhar

Differential Revision: D24349262

fbshipit-source-id: fe62b8df4d2b67ab3930e5d57f94478b2a88a549
2020-10-19 15:07:18 -07:00
Kevin Gozali 2a3c26e975 Android: add libglog prebuilt .so definition
Summary:
So that it's easier for C++ targets to depend on libglog.so for debugging purpose.

Changelog: [Internal]

Differential Revision: D24382033

fbshipit-source-id: 00ad6b2365d571583d6d1aaa40fac2c96974abf1
2020-10-19 09:33:53 -07:00
Kevin Gozali 4dfa3be871 Codegen Android: handle nullable getConstants() properties generation.
Summary:
The GenerateModuleJavaSpec.js mistakenly treated nullable getConstants() properties as required, such that the Java spec will throw an exception when the properties are missing. This fixed it.

Note that the JavaPoet-based generator got this correct already.

Changelog: [Internal]

Differential Revision: D24381941

fbshipit-source-id: c95d2181c66443e2191318f09b6454a5296009e4
2020-10-19 09:33:53 -07:00
Jesse Katsumata 4e8326a82e docs: fix url for chainreactconf (#30199)
Summary:
Fixed URL of ChainReactConf website on the ECOSYSTEM.md

## 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 URL of ChainReactConf Website

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

Test Plan: URL leads to the ChainReactConf website

Reviewed By: makovkastar

Differential Revision: D24386708

Pulled By: cpojer

fbshipit-source-id: 27a48e84547ef3bc067845b3c302dd57decc34b2
2020-10-19 07:35:37 -07:00
Samuel Susla 1ca5ccc2ab Remove ThreadStorage class in favour of thread_local
Summary:
#changelog: [internal]

When I built ThreadStorage I didn't know about existence of `thread_local` keyword. Because it achieves the same goal, using built in c++ features is preferred over building our own.

Reviewed By: JoshuaGross, shergin

Differential Revision: D24380680

fbshipit-source-id: e961fc34c6d3f085fc9b918b20bb4827de0d5624
2020-10-19 01:24:05 -07:00
Pieter Vanderwerff 500bdf74d2 Deploy Flow v0.136.0
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D24364950

fbshipit-source-id: 42a81b155d803c3580cfac7d56c98f93a310d0fc
2020-10-18 20:30:55 -07:00
Ramanpreet Nara 6c88afc044 Refactor: Rename `moduleName` to `hasteModuleName`
Summary:
The NativeModules spec parser uses `moduleName` to refer to the name of the NativeModule spec. This is confusing, because the NativeModules spec also has a `moduleNames` array, which refers to names of the NativeModules that get required in the spec.

This diff renames `moduleName` to `hasteModuleName` within the NativeModule spec parser.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D24386279

fbshipit-source-id: 8e4eb8dfc647241bf2bdae54dc8d9ab0122f49f9
2020-10-18 19:04:58 -07:00
Kevin Gozali 76098831fd Codegen: exclude NativeModules that are not for the specific platform
Summary:
If a native module schema has `excludedPlatforms` defined, honor it and skip the module that doesn't belong to the platform.

E.g. NativeImagePickerIOS shouldn't generate anything for Android codegen output.
Similarly, IntentAndroid shouldn't generate anything for iOS codegen output.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D24373092

fbshipit-source-id: cfeb455a18c92f60191d988af2e9ce7ea5021304
2020-10-17 02:45:48 -07:00
Kevin Gozali ec094e75bd Codegen: denote Android/iOS exclusive platform modules in the schema
Summary:
Some existing NativeModules have either Android or IOS suffix to denote the exclusive intent for that platform. For now, note this in the codegen schema output, so that the generator can skip irrelevant modules. Long term, each Flow type for module Spec should denote the intended/excluded platforms directly.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D24370568

fbshipit-source-id: 8f725bdb39107d73c1aba0689db7f47ed7c374b0
2020-10-17 02:45:48 -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
Valentin Shergin 28e9528c4d Fabric: QE for Preemptive views allocation feature
Summary:
Fabric has a feature that preallocates views before mounting even need them. We never tested the impact of this feature thought. This diff adds a way to enable/disable it and run an experiment.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D24355612

fbshipit-source-id: fefd653e57232044cd7b28b160e12a4ef85dbb8b
2020-10-16 17:56:58 -07:00
Keion Anvaripour 34c405462f Add HERMES_BYTECODE_VERSION to JS bundle requestUrl
Summary:
Changelog:
[General][Added] - Adds the Hermes runtime bytecode version number to the JS bundle requestURL. This allows Metro with Bytecode to work with prebuilt binaries.

Reviewed By: cpojer

Differential Revision: D24327852

fbshipit-source-id: e8ee8db4f9b01f0500ab9dd851b5818c4adf3303
2020-10-16 16:39:43 -07:00
Dmytro Voronkevych 213b02b378 Adding support for boolean annotations for UserFlow@RN
Summary: Adding support for boolean annotation in UserFlow API.

Reviewed By: cdinh

Differential Revision: D24337853

fbshipit-source-id: 52ed295c64a5650afbb02890f918939fb9d020d6
2020-10-16 11:32:22 -07:00