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

18343 Коммитов

Автор SHA1 Сообщение Дата
Andres Suarez 3b31e69e28 Tidy up license headers [2/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952694

fbshipit-source-id: 17c87de7ebb271fa2ac8d00af72a4d1addef8bd0
2019-10-16 10:06:34 -07:00
Andres Suarez 722feeb02b Tidy up license headers [1/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952695

fbshipit-source-id: 81aa607612ba1357ef7814ef20371335151afe7e
2019-10-16 10:06:33 -07:00
Dan Abramov 4ed05ca241 Send early logs to Metro too
Summary:
If you `console.log` early enough in the initialization sequence, it won't get sent to Metro because `hmrClient` isn't initialized yet. I've added a rolling array to catch at most 100 of those, and send them after we initialize.

Changelog: [General] [Fixed] - Early logs don't get dropped by Metro now

Reviewed By: cpojer

Differential Revision: D17952097

fbshipit-source-id: 964b4735a6a7c3ccd115f44151139d718bf5b26d
2019-10-16 08:03:21 -07:00
Samuel Susla 0d1b9b5397 Add MaskedView to LegacyViewManagerInterop white list
Summary:
For components to be used with LegacyViewManagerInterop they need to be added to a white list.
This makes it possible to test it out and assure proper functionality.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D17906107

fbshipit-source-id: 60ee99e6b973ba2d6fe804f3c99e492603d3cf8f
2019-10-16 04:26:44 -07:00
Samuel Susla 5327c3ed83 Forward subviews to Paper component from LegacyViewManagerInterop
Summary:
`RCTMaskedView` is simple enough to migrate manually to Fabric and I think we should eventually do it.
However this gives us opportunity to spot shortcomings of `LegacyViewManagerInterop` and address them.

Now `LegacyViewManagerInterop` forwards `mountChildComponent` and `unmountChildComponent` events to Paper component that it is wrapping.

Reviewed By: shergin

Differential Revision: D17905807

fbshipit-source-id: ad36c186d5c5a8ed164e412fa5fdf0042de46348
2019-10-16 04:26:43 -07:00
Samuel Susla d4b032d6f8 Fix missing RCTEventEmitter module when scrolling in scrollView
Summary:
`ReactNative.js` as a side effect registers `RCTEventEmitter`, this is required in Fabric's `RCTScrollViewComponentView`.
Here we force ReactNative.js side effect.

This is needed as a temporary workaround so we can invoke events on `RCTEventEmitter` (old architecture) from `RCTScrollViewComponentView` (new architecture)

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D17931469

fbshipit-source-id: 3efa453ba199bb1685403201ad444238750a3d14
2019-10-16 04:01:48 -07:00
Joshua Gross a440613654 Add ThreadConfined(UI) annotations to relevant methods in ReactContext
Summary:
Add ThreadConfined(UI) annotations to relevant methods in ReactContext.

Changelog:
[[Internal]]

Reviewed By: mdvacca

Differential Revision: D17944686

fbshipit-source-id: ce93c6ffa2a523532cbe709650054638412da59e
2019-10-16 00:19:34 -07:00
Joshua Gross 71d2c07c6e Unconditionally log when destroying FabricUIManager
Summary:
Unconditionally log when destroying FabricUIManager.

Changelog:
[[Internal]]

Reviewed By: mmmulani

Differential Revision: D17944621

fbshipit-source-id: 89f97ff966ae5b071eb0b50d888b41b264d9dab9
2019-10-16 00:19:34 -07:00
Andres Suarez e1cfeaddd4 Move non-license comments out of license header
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: cpojer

Differential Revision: D17749100

fbshipit-source-id: edca9c73a065e9fc311109cd6efeb1f75451a55a
2019-10-15 20:12:12 -07:00
Mehdi Mulani fc80a51457 Make RCTRedBox customizable
Summary:
Adds the ability to add extra buttons and renders them along with the other buttons.

Changelog: [iOS] [Added] - RCTRedBox ability to add extra buttons

Reviewed By: PeteTheHeat

Differential Revision: D17935352

fbshipit-source-id: f8fb28653e535cd2c098566afbc639eb5c196228
2019-10-15 20:09:39 -07:00
Mehdi Mulani ef3f80abc1 Refactor RCTRedBox button creation
Summary:
@public
A lot of this code was duplicated, so move it all into one method.
Later in this stack, I will make custom red box buttons which will need to reuse this method.

Changelog: [iOS] [Changed] - Refactor RCTRedBox button creation

Reviewed By: PeteTheHeat

Differential Revision: D17915485

fbshipit-source-id: ede649862556b057779e0267118799c63f0215b8
2019-10-15 20:09:39 -07:00
David Vacca ff03698f20 Use SoundManager in Pressability and Touchable
Summary:
This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()
Previously landed and unladed: D16543433

Changelog: This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()

Reviewed By: makovkastar

Differential Revision: D17926309

fbshipit-source-id: ff7e318a4d720e489cbfe60e8d72ebb749c11c18
2019-10-15 20:03:21 -07:00
Joshua Gross 87b94e60a6 Explicitly associate State with its owning ShadowNode immediately upon ShadowNode creation
Summary:
See comments for additional commentary. On Android we pass State to all views upon creation; currently we do Preallocation of views, which means that Views are created on the mounting layer before they're technically committed. Previously we were only assocation State -> ShadowNode upon tree commit.

This meant that during Preallocation, State was accessible but the `updateState` mechanism did not work because that requires a pointer from the State back to its owning ShadowNode.

We explicitly make that connection now when creating the ShadowNode and State. This should fix or prevent many subtle bugs with State, on Android but potentially other platforms as well, since now we guarantee that State is always updateable.

Changelog:
[[Internal]]

Reviewed By: shergin, mdvacca

Differential Revision: D17937687

fbshipit-source-id: a0cfdddbf1d97f1a64624bca6aa9536620f21ad4
2019-10-15 19:35:55 -07:00
Janette Cheng 10cc834567 Use fbandroid_labels and fbobjc_labels in xplat targets
Summary:
`xplat` targets add different deps based on what platform the target is being built for.

for anything using `fb_xplat`, we can put all ios supermodules in `fbobjc_labels` and all android sms in `fbandroid_labels`

There's some weirdness with python targets like `thrift_gen` in  `/xplat/mobileconfig/tools/generator/gen-py/BUCK` that don't have platform-specific labels because the except_for list for `fbandroid` doesn't need the `fbsource//` prefix (see changes in `/ios/isolation/infra.mobileconfig.sm`)

Changelog: [Internal]

Reviewed By: shergin, joshleibsly

Differential Revision: D17884952

fbshipit-source-id: e245364cf515b75682990094d24f789d53b1f3f5
2019-10-15 19:32:27 -07:00
David Vacca c65267ca6f Allow update of state to receive null objects
Summary:
This diff changes updateState method to support null stateWrappers, before this method would crash with a NullPointerException, now it allows the null object to reach the view manager.

Changelog: Add support for update of nullable localState in Fabric

Reviewed By: JoshuaGross

Differential Revision: D17939651

fbshipit-source-id: c62555905e39f9e0db75b9e1d1b93f33d0560266
2019-10-15 18:52:26 -07:00
Peter Argany 79b573511b Fix RCTNullIfNil macro
Summary:
`RCTNullIfNil()` can return nil in certain scenarios.

Example, given:
`#define RCTNullIfNil(value) (value ?: (id)kCFNull)`
`RCTNullIfNil(nil == nil ? nil : @"lol")`
expanded out
`nil == nil ? nil : @"lol" ?: (id)kCFNull`

`?:` takes precedence, so reduced:
`nil == nil ? nil : @"lol"`
`nil`

Changelog: [iOS] [Fixed] Fixed longstanding bug where RCTNullIfNil() can return nil

Reviewed By: RSNara

Differential Revision: D17943530

fbshipit-source-id: 8c6e3dd2d86cbc8ff1fcbef732674835a312ef26
2019-10-15 18:02:27 -07:00
Peter Argany 474f12e6fc Fix NSDictionary crash in bridgeless RN
Summary: Changelog: [iOS] [Fixed] Fixed crash in TurboModules when bridge isn't set

Reviewed By: RSNara

Differential Revision: D17939896

fbshipit-source-id: 4c59de00da30fa8ceb32e590d65663ac37ff3ca2
2019-10-15 16:18:21 -07:00
Valentin Shergin 101f864bcc Fabric: Fixed a crash in RCTImageResponseObserverProxy
Summary:
This fixes the crash, here is why:
When a block refers to `delegate_`, it  actually refers to `this->delegate_`, which means it no retaining happening (there is no way to retain C++ class). That causes a crash when the block overlive the class instance.
Making a local copy of `delegate_` enables proper ARC-powered retaining and prevents the crash.

Changelog: [iOS] [Fixed] - Fixed crash in RCTImageResponseObserverProxy (Fabric)

Reviewed By: sammy-SC

Differential Revision: D17923548

fbshipit-source-id: 71aff44647730a5cc1996928c164d3892884b455
2019-10-15 16:15:11 -07:00
Valentin Shergin dec80fe486 Fabric: Simplifying allocation/storing of RCTImageResponseObserverProxy
Summary: We don't need to have it as `std::unique_ptr`, we can simply store it by value.

Reviewed By: sammy-SC

Differential Revision: D17923551

fbshipit-source-id: e8222834a8dd8f84826e4e89067610cd0a7cac73
2019-10-15 16:15:11 -07:00
Valentin Shergin 01143859ff Fabric: Simplifying RCTImageResponseObserverProxy interface
Summary: There is no reason why RCTImageResponseObserverProxy accepts untyped pointer. This diff fixes that. The call sites now look much cleaner.

Reviewed By: sammy-SC

Differential Revision: D17923552

fbshipit-source-id: b08556e1164b00c9cf2676c0d9b1718ae60b2aca
2019-10-15 16:15:11 -07:00
Valentin Shergin 23564ab44d Fabric: Enforcing `RCTImageResponseDelegate` conformance
Summary: For `RCTSliderComponentView` the conformance to the protocol wasn't enforced. For `RCTImageComponentView` it was in .h file without a need to be exported.

Reviewed By: sammy-SC

Differential Revision: D17923550

fbshipit-source-id: d98b892d24d9079a7109dc7d881c5c5a175fe3bf
2019-10-15 16:15:10 -07:00
Valentin Shergin 14df0b2a78 Fabric: Using `wrapManagedObject` in `RCTImageManager` instead of manual casting
Summary: Hiding casting madness and complexity behind a helper function to avoid bugs and improve maintainability.

Reviewed By: sammy-SC

Differential Revision: D17923549

fbshipit-source-id: 105891d85b0412fa4a17d7ae8a9e156fc1b151fb
2019-10-15 16:15:10 -07:00
Andres Suarez b7c14f29cf Tidy up license headers
Summary: Changelog: Tidy up license headers

Reviewed By: SidharthGuglani

Differential Revision: D17919414

fbshipit-source-id: 0501b495dc0a42256ca6ba3284a873da1ab175c0
2019-10-15 10:32:14 -07:00
Ramanpreet Nara 2b62bd7695 Make RCTAsyncLocalStorage TurboModule-compatible
Summary:
**Note:** This was landed in D17724498 but reverted in D17855088. The revert had nothing to do with this NativeModule.

Changelog: [iOS][Added] Make RCTAsyncLocalStorage TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17917841

fbshipit-source-id: 0f9dd5f592180d6512ca560007daa531a4da5b59
2019-10-15 09:16:56 -07:00
Ramanpreet Nara da6274ba76 Make RCTAlertManager TurboModule-compatible
Summary:
**Note:** This was landed in D17722913, but reverted in D17855088. The revert had nothing to do with this NativeModule.

Changelog: [iOS][Added] Make RCTAlertManager TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17917827

fbshipit-source-id: d86ea2cddddd9535d656709296c74aebd6f45793
2019-10-15 09:16:56 -07:00
Samuel Susla be89e4d928 Fix tintColor in SegmentedControlIOS component
Summary:
iOS 13 introduced a new design for `UISegmentedControl` and new APIs to control this. `[UISegmentedControl tintColor]` is now ignored.

We try to maintain backwards compatibility so the appearance is as close as possible to iOS 12.

Changelog:
Fix `tintColor` on SegmentedControlIOS

Reviewed By: shergin

Differential Revision: D17905892

fbshipit-source-id: 964ac64c8543660929c43b427dce4f78094b1255
2019-10-15 08:13:37 -07:00
Valentin Shergin 8bce9c59bb Fabric: Assert on destruction non-empty of ShadowTreeRegistry
Summary:
Destruction of Scheduler (and ShadowTreeRegistry as part of it) which has some running Surfaces is not a good thing and practically a bug on the application layer.
With this assert we throw early to flag the issue.

Changelog: [Internal] - Dev only assert indicating a broken invariant in ShadowTreeRegistry

Reviewed By: sammy-SC

Differential Revision: D17924491

fbshipit-source-id: 6b7433fe47630e993e7d5b969f3113f96124b6c9
2019-10-15 07:55:00 -07:00
Valentin Shergin e7ef9921d3 Fabric: Fixing crash in RCTScrollViewComponentView (2nd attempt)
Summary:
Seems a ScrollView sometimes calls the delegate in own destructor; and seems that in some configurations the delegate is also already destroyed at this point. I am not sure if this a bug in UIKit or not, but seems the fix is easy, we just have to clear the ScrollView's delegate on the delegate's deallocation.
This issue is also looks similar:
https://stackoverflow.com/questions/18778691/crash-on-exc-breakpoint-scroll-view/19011871

Changelog: [iOS] [Fixed] - Fixed crash in RCTScrollViewComponentView

Reviewed By: sammy-SC

Differential Revision: D17924429

fbshipit-source-id: 5727bca9f028e28f76f60304c187ee39eb6e1856
2019-10-15 07:43:20 -07:00
Valentin Shergin beae6d6fa0 Revert D17456225: [RN] RCTRefreshControl was renamed to PullToRefreshView (for Paper)
Differential Revision:
D17456225

Original commit changeset: a8db99ddd507

fbshipit-source-id: 3186d76de13cccc21619702a1ad07842a4788b15
2019-10-15 07:11:53 -07:00
Samuel Susla ddbfe24c3b Add SegmentedControl to LegacyViewManagerInterop white list
Summary:
For components to be used with LegacyViewManagerInterop they need to be added to a white list.
This makes it possible to test it out and assure proper functionality.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D17905453

fbshipit-source-id: 4e8e53a1898b38b2c9f01e7fc9e3527bd7004ffb
2019-10-15 03:16:21 -07:00
Samuel Susla 53f003f233 Add ProgressView to LegacyViewManagerInterop white list
Summary:
For components to be used with LegacyViewManagerInterop they need to be added to a white list.
This makes it possible to test it out and assure proper functionality.

Reviewed By: shergin

Differential Revision: D17905413

fbshipit-source-id: f5ab523cca6227e99a7607ca1927005392b1ae36
2019-10-15 03:16:21 -07:00
zhongwuzw 4203d24b83 Fixes Fabric related podspec (#26805)
Summary:
1. Add missing podspec like `safeareaview` and `legacyviewmanagerinterop`.
2. Expose `YGNode,YGStyle.h` to public, fabric uses it, ex. `YogaStylableProps.h`.
3. Make `React-Core`'s Cxx header public, because `RCTLegacyViewManagerInteropCoordinator.m` uses it.

## Changelog

[iOS] [Fixed] - Fixes Fabric related podspec
Pull Request resolved: https://github.com/facebook/react-native/pull/26805

Test Plan: Fabric RNTester can run.

Reviewed By: shergin

Differential Revision: D17872379

Pulled By: mdvacca

fbshipit-source-id: 4b18a931a2e403237a96d5cc3505b99c7253c710
2019-10-14 22:34:40 -07:00
Valentin Shergin 08d6cb19c4 RCTRefreshControl was renamed to PullToRefreshView (for Paper)
Summary:
The component RCTRefreshControl was renamed to PullToRefreshView (for Paper). Now only old Objective-C class names have the old name, which is okay.

Changelog: [Internal] [Changed] - The internal name of PullToRefresh component was changed from `RCTRefreshControl` to `PullToRefreshView` (No public API changes)

Reviewed By: rickhanlonii

Differential Revision: D17456225

fbshipit-source-id: a8db99ddd507377d8c98b26707a3b9fae483d20c
2019-10-14 20:49:48 -07:00
James Ide df653a9dc2 More robust hermes-engine lookup logic in makefiles (#26820)
Summary:
The Android makefiles had hard-coded paths to hermes-engine, sometimes looking in `node_modules` and other times looking in `..`. This commit implements the Node module resolution algorithm (see common.mk), which handles both of these cases and also looks further up the root if necessary, handling the case when the `hermes-engine` npm package is hoisted.

This commit does three things:

- Defines `find-node-module` and uses it in the makefiles to find `hermes-engine`
- Removes the unused `/path/to/hermes-engine/include` paths since this directory does not exist and should be `/path/to/hermes-engine/android/include` (`android`)
- Moves the definition of `REACT_NATIVE` in the makefiles to the top. It was defined after every `$(CLEAR_VARS)` invocation but was not actually cleared anyway. `$(CLEAR_VARS)` resets only `LOCAL_*` variables in this list: https://android.googlesource.com/platform/build/+/7dc45a8/core/clear_vars.mk

## Changelog

[Internal] [Changed] - Android Makefiles look for hermes-engine using Node's module resolution algorithm
Pull Request resolved: https://github.com/facebook/react-native/pull/26820

Test Plan: Run `./gradlew :ReactAndroid:installArchives`, which requires the hermes-engine paths to be correct in order to find the headers.

Differential Revision: D17923671

Pulled By: cpojer

fbshipit-source-id: 9238b8718a94080db1abbba6375a6a1d484c871d
2019-10-14 19:21:43 -07:00
Ramanpreet Nara 63e58a375e Improve method argument RCTConvert logic
Summary:
**Context**
For method calls from JS to Objective C, we have to convert JS values to ObjC objects/primitives. Before we can call our ObjC methods, we need to run both the ObjC primitives and objects through `RCTConvert`. This is necessary, because we sometimes convert `NSDictionary`s to special Objective C objects. Apparently, in `RCTTiming`, we also do the same with `double` (i.e: we convert a `double` arg to another `double` type with different meaning).

**Problem**
`RCTTiming` used `RCTConvert` to convert `double`s into `NSTimeInterval` (also a double). The conversion is defined like this:

```
// i.e: division by 1000
RCT_CUSTOM_CONVERTER(NSTimeInterval, NSTimeInterval, [self double:json] / 1000.0)
```

This diff implements the support necessary to make this work. For completeness, I also implemented the same functionality for `BOOL`s.

Changelog: [iOS][Fixed] Improve method argument RCTConvert logic

Reviewed By: mdvacca

Differential Revision: D17887915

fbshipit-source-id: 3246fdbf4db7e96911f16460d92448b1f1e99444
2019-10-14 15:39:34 -07:00
Eli White 878f0500e7 TextInput: Add tests for checking which input is focused
Summary:
We are going to need to change some of these APIs to use refs instead of findNodeHandle. I figured I'd start by adding some tests

Changelog:
[Internal] Adding tests for TextInput

Reviewed By: yungsters

Differential Revision: D17892806

fbshipit-source-id: f59ff99fa4d064239f171acb64a8441e07bb71c1
2019-10-14 14:40:07 -07:00
Ramanpreet Nara bec5b8711f Improve TM main queue initialization
Summary:
In the legacy system, when NativeModules are supposed to be initialized on the main queue, we do the following synchronously on the main thread:
1. Done: Attach bridge on main queue
2. Register the NativeModule for frame updates on main queue
3. Post Notification that NativeModule was created on main queue
4. Attach methodQueue on main queue
5. Call new on main queue

`[RCTModuleData instance]` is the entrypoint for all of this logic.

We probably shouldn't synchronously execute all this initialization on the main queue, because it can lead to deadlocks down the road. Therefore, this diff makes it so that we still call `new` on the same thread. However, we do all other initialization in the main thread, if that's required.

Changelog: [iOS][Fixed] TurboModule initialization on the main queue

Reviewed By: PeteTheHeat

Differential Revision: D17867583

fbshipit-source-id: a88412ee1e3d93a4f9b5ab0b4dd8fc5213fa91f8
2019-10-14 14:19:23 -07:00
Eli White e640637928 Core: Remove `any` from calls to requireNativeComponent
Summary:
These were being cast to a NativeComponent but that is no longer accurate. `requireNativeComponent` returns the type of `HostComponent` now which is more accurate. We don't need the cast through `any` anymore.

In order to know that I found all the callsites, I ran this command to find these:
```
grep -r "requireNativeComponent" react-native-github -C 5 | grep 'any'
```

Changelog:
[Internal]

Reviewed By: cpojer

Differential Revision: D17864165

fbshipit-source-id: 3774d6d47d7bb0d885cc1a1352f81fec7d3bca0d
2019-10-14 13:53:48 -07:00
Moti Zilberman 9f71551167 Remove use of framesToPop from JSTimers
Summary:
Replaces the use of `framesToPop` in `_allocateCallback` (in `__DEV__` only) with statically accessing the second frame of the stack.

Changelog: [Internal]

Reviewed By: cpojer

Differential Revision: D17877261

fbshipit-source-id: 8e4d0eb2ed7984b66a99752fb21f7909474fda8f
2019-10-14 09:03:51 -07:00
Sharon Gong baa66f63d8 Announce accessibility state changes happening in the background (#26624)
Summary:
Currently the react native framework doesn't handle the accessibility state changes of the focused item that happen not upon double tapping. Screen reader doesn't get notified when the state of the focused item changes in the background.
To fix this problem, post a layout change notification for every state changes on iOS.
On Android, send a click event whenever state "checked", "selected" or "disabled" changes. In the case that such states changes upon user's clicking, the duplicated click event will be skipped by Talkback.

## Changelog:
[General][Fixed] - Announce accessibility state changes happening in the background
Pull Request resolved: https://github.com/facebook/react-native/pull/26624

Test Plan: Add a nested checkbox example which state changes after a delay in the AccessibilityExample.

Differential Revision: D17903205

Pulled By: cpojer

fbshipit-source-id: 9245ee0b79936cf11b408b52d45c59ba3415b9f9
2019-10-14 00:28:34 -07:00
empyrical 80857f295c JSBigString: Fix building on Windows (#26826)
Summary:
This pull request replaces the last remaining Unix headers in `JSBigString` with their equivalent Folly Portability headers, and replaces the calls to `getpagesize()` with `sysconf(_SC_PAGESIZE)` since Folly Portability is missing that function.

The work to get this building on windows was mostly done by acoates-ms, this pull request just adds the finishing touches.

## Changelog:

[General] [Fixed] - Fixed `JSBigString` not compiling on Windows due to Unix-specific headers
Pull Request resolved: https://github.com/facebook/react-native/pull/26826

Test Plan: Compiled with Clang and with MSVC (2017)

Differential Revision: D17903214

Pulled By: cpojer

fbshipit-source-id: 230f8fb410fa81d8f13d8b6ccf1147cfc70358bf
2019-10-14 00:22:22 -07:00
Maksym Rusynyk a0d8740878 Android template: Allow overriding default "index.js" entry file (#26769)
Summary:
- Using "System.getenv" allows to specify any entry file using environment variables and without modifying gradle file. Example:

    export ENTRY_FILE="another_entry_file.js"
    ./gradlew assembleDebug

- This functionality is also more align with iOS implementation that uses 'if [[ "$ENTRY_FILE" ]]; then'. See https://github.com/facebook/react-native/pull/23667 for more details.

- Possibility to define entry file on CI without modifying sources (Example: project like [pixels-catcher](https://www.npmjs.com/package/pixels-catcher) requires different entry file)

## Changelog:

[Android] [Added]  - Custom entry file on android using `ENTRY_FILE` environment variable
Pull Request resolved: https://github.com/facebook/react-native/pull/26769

Test Plan:
- Create a project from template

- Define `ENTRY_FILE` environment variable

```
export ENTRY_FILE="anotherIndexFile.js"
```

- Build android

```
./gradlew assembleDebug
```

Expected result: App contains bundle file that starts from `anotherIndexFile.js` file.

Differential Revision: D17903165

Pulled By: cpojer

fbshipit-source-id: 6b7cdf229918d101c170aa5fbdca6f3ef293d41c
2019-10-13 23:41:15 -07:00
James Ide fc25f288fe Use Node's module resolution algo to find JSC & Hermes (#26773)
Summary:
The Gradle build file looks up jsc-android and hermes-engine using hard-coded paths. Rather than assuming the location of these packages, which are distributed and installed as npm packages, this commit makes the Gradle file use Node's standard module resolution algorithm. It looks up the file hierarchy until it finds a matching npm package or reaches the root directory.

## Changelog:

[Android] [Changed] - ReactAndroid's Gradle file uses Node's module resolution algorithm to find JSC & Hermes
Pull Request resolved: https://github.com/facebook/react-native/pull/26773

Test Plan: Ensure that CI tests pass, and that `./gradlew :ReactAndroid:installArchives` works. Printed out the paths that the Gradle script found for jsc-android and hermes-engine (both were `<my stuff>/react-native/node_modules/jsc-android|hermes-engine`).

Differential Revision: D17903179

Pulled By: cpojer

fbshipit-source-id: 9ac3ba509974f39f87b511d5bc3398451c12393f
2019-10-13 23:26:39 -07:00
Tim Yung 6c7d34e8ec RN: Delete `merge[Into]`
Summary:
Deletes `merge[Into]` in favor of object spread.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D17884312

fbshipit-source-id: e70b4d4e388d3c6a68908258019bf2bd145e6752
2019-10-12 15:52:27 -07:00
Tim Yung 3a3b535874 RN: Delete `getObjectValues`
Summary:
Deletes `getObjectValues` because there are no more references to it in `react-native`.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D17884311

fbshipit-source-id: c97caeed00fe94a6cc099fba7039d9defee719dd
2019-10-12 15:52:26 -07:00
Tim Yung 2d99b3bab3 RN: Delete `isEmpty`
Summary:
Deletes `isEmpty` because there are no more references to it in `react-native`.

Changelog:
[Internal]

Reviewed By: zackargyle, fred2028

Differential Revision: D17884310

fbshipit-source-id: 0554aee4044452b6c04f638f1ad762025eecd929
2019-10-12 15:52:26 -07:00
Tim Yung da3e23fa70 RN: Delete `guid`
Summary:
Deletes `guid` because there are no more references to it in `react-native`.

Changelog:
[Internal]

Reviewed By: zackargyle

Differential Revision: D17882369

fbshipit-source-id: c3ee6d23e5fa233a7f5d2e2c7baef005384ea5b1
2019-10-12 15:52:26 -07:00
Tim Yung 82f4a44086 RN: Delete `toIterator`
Summary:
Deletes `toIterator` because there are no more call sites.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D17879834

fbshipit-source-id: 95679d7504c044d0e842bfcbdc07a8c33268f5d6
2019-10-12 15:52:25 -07:00
Tim Yung fc9feb16e0 RN: Delete `mixInEventEmitter`
Summary:
Deletes `mixInEventEmitter` and its dependencies that are no longer being used by anything in `react-native`.

Changelog:
[Internal]

Reviewed By: TheSavior

Differential Revision: D17879835

fbshipit-source-id: 45f30d21cb01365fcfc723cf564ebb47794ea176
2019-10-12 15:52:25 -07:00
Tim Yung 2becdfd404 RN: Delete `TextInput.selectionState` Prop
Summary:
Deletes the `selectionState` prop from `TextInput`.

It does not provide meaningful value over `onBlur`, `onFocus`, and `selectionState`.

Changelog:
[Breaking][TextInput] Removing `selectionState` prop, use `onBlur`, `onFocus`, and `onUpdate` instead.

Reviewed By: zackargyle, TheSavior

Differential Revision: D17879667

fbshipit-source-id: 03a4e239406932adad898d6d2a092e3bc2e6b064
2019-10-12 15:52:25 -07:00