Commit Graph

14181 Commits

Author SHA1 Message Date
Rubén Norte abf1188de2 Upgraded babel-eslint to v9.0.0-beta.2 with better support for Flow
Summary: Upgraded the library to fix an error in Babel causing wrong unused variable errors.

Differential Revision: D8765952

fbshipit-source-id: 352d1bb50ada76caed247bf9aa4521eff2d510e9
2018-07-09 09:17:13 -07:00
Gabe Levi eac34e3021 Flow v0.76.0
Summary: No new errors in this version. Just removed a bunch of unused suppressions

Reviewed By: TheSavior

Differential Revision: D8754160

fbshipit-source-id: 2f02240b6d65edecba5d9ed603c7703462547a7f
2018-07-09 08:17:51 -07:00
Yan Soares Couto fc94f95962 Enable RCTDevLoadingView with another flag
Reviewed By: javache

Differential Revision: D8723591

fbshipit-source-id: 196cecd73ba0e1a1d34ec9a775cf03a25f352401
2018-07-09 03:32:48 -07:00
Wenting Hu 781f181610 Back out "[react-native][PR] Remove the deprecated `isIPhoneX_deprecated` constant"
Summary:
Original commit changeset: 0b0b3a2d7b80

This constant is still in use at Facebook. Its removal has been pushed to sometime in the future.

Reviewed By: mdvacca

Differential Revision: D8721213

fbshipit-source-id: d1197c96804e4d2dc96be27421e5248a2394cdac
2018-07-08 13:16:41 -07:00
Wen-Chien Chen b99609e9d2 Fix ScrollView logspew
Summary: There was an inverted expression leading to logspew. Fix this.

Reviewed By: TheSavior

Differential Revision: D8758023

fbshipit-source-id: 7a83c68db6c95f2b5db6dcc7d7780fc66321b49e
2018-07-08 00:32:30 -07:00
Konstantin Raev 604bcfa4a8 Revert D8683555: [react-native][PR] fix: account for `ListHeaderComponent` length when calculating offset…
Differential Revision:
D8683555

Original commit changeset: 05df7b79c16e

fbshipit-source-id: 6deb14b99fe04e67e264455ff92a5d8c1c2dd406
2018-07-06 19:32:21 -07:00
Valentin Shergin e8ec1cb16a Fabric: The diffing algorithm does not use source nodes anymore
Summary:
@public
... and it's as efficient as it was before.

The previous version of the algorithm used `sourceNode` reference to know the previous state of the node to call the algorithm recursively.
That wasn't so good because of several reasons:
 - It was fragile because we had two different sources of the truth of the "previous state of the tree": committed tree and source node pointer;
 - We had to store weak pointers to source nodes inside cloned nodes. That is not free in terms of performance;
 - The old approach introduced a constraint that all previously used and now reinserted nodes must be cloned to update source node (otherwise, the algorithm would regenerate instructions recreating already existing subtrees);
 - That cloning required access to `isSealed` flag which is supposed to be a debug-only thing (that actually affects performance and must be compile-out for release builds).

The new approach compares nodes with same react tag and naturally cloning-artifacts resilient.

Yes, the new approach uses a map of inserted nodes, but the previous one already had it (otherwise there is no way to tell which nodes should be "deleted"). And anyway, this is a very little map that exists for a very little period of time.

Reviewed By: mdvacca

Differential Revision: D8709953

fbshipit-source-id: 027abb326cf45f00f7bb0bbd7c4e612578268c66
2018-07-06 14:49:07 -07:00
Valentin Shergin e0e9c1549e Fabric: Improved prettyprinting of TreeMutationInstruction
Summary:
@public
Quite trivial... and nice.

Reviewed By: mdvacca

Differential Revision: D8709951

fbshipit-source-id: 63e53eb85361fe3a0a0ecd7f21bf4c7db049d5bf
2018-07-06 14:49:06 -07:00
Andrew Chen (Eng) de09fd53bd Remove setJSEntryPoint from ReactRootView
Summary:
Doesn't look like it was ever used according to diffgrep https://our.intern.facebook.com/intern/diffgrep/?author=&expand_all=false&filepath=&matcher=strmatch&query=setJSEntryPoint&repo=fbsource&rev_type=all&result_size=3&search_order=2&source&target=added%20or%20removed

axe is this okay?

Differential Revision: D8730783

fbshipit-source-id: 1e6b9e8fbd50c108a24b592793060a5344f1d0b1
2018-07-06 12:33:00 -07:00
Himabindu Gadupudi 816d302e98 Reverting image source null so the fix can go all once later
Summary: Image source null which is in RC D8628053 has a bug which has a fix but didn't make to RC. Reverting so it can be cleaned up before going in RC.

Reviewed By: achen1

Differential Revision: D8751687

fbshipit-source-id: e08b23a031455be23047880871813bdc840542dd
2018-07-06 12:33:00 -07:00
David Vacca 6292e2707a Revert order of Remove Mount Item operations
Summary: Revert the order of "remove mount items", to ensure views are removed from high index to low index.

Reviewed By: shergin

Differential Revision: D8742796

fbshipit-source-id: 6e04c39386d290bf3958ee83256d4fbe23e2c4ca
2018-07-06 09:17:34 -07:00
Yan Soares Couto ac09261a4c downloadBundleFromURL with an optional starting Request.Builder
Summary: This makes it possible to specify an optional Request.Builder when calling `downloadBundleFromURL` (the old method still works as usual).

Reviewed By: davidaurelio

Differential Revision: D8691303

fbshipit-source-id: 2fb2aecd3506355c6b3a72457a7bb9acfd03b18d
2018-07-06 04:31:53 -07:00
Florian Schoellhammer 0f4926598a Back out "[react-native][PR] Remove the deprecated `isIPhoneX_deprecated` constant"
Summary:
Original commit changeset: 0b0b3a2d7b80

Reverting D8714400 which removed the `isIPhoneX_deprecated` flag, which is still widely used across the RN codebase https://fburl.com/biggrep/16jg5bzn

Reviewed By: hramos

Differential Revision: D8743401

fbshipit-source-id: cfc44bdd8019eda41e67ca573b20be417d121d12
2018-07-05 19:17:22 -07:00
Himabindu Gadupudi 46ffb10627 Fix null source bug in Image view while accessing source's uri
Summary: Fix null source bug in Image view while accessing source's uri

Reviewed By: achen1

Differential Revision: D8739379

fbshipit-source-id: 0338b19135fa8af9ebe599cabbc9e321fb0906a5
2018-07-05 15:18:04 -07:00
Spencer Ahrens 5b6ff01764 Remove ScrollView.propTypes
Summary:
We're unifying on flow types, and propTypes require non-trivial resources to initialize in aggregate.

Some open source code might depend on extracting ScrollView.propTypes which will now fail. To fix, simplly remove these dependencies and use flow or typescript for verifying correct prop usage instead.

Reviewed By: TheSavior

Differential Revision: D8726371

fbshipit-source-id: 19e9540794db97a9e356615b544759a0753fd68c
2018-07-05 15:18:04 -07:00
Spencer Ahrens f40de0e467 Fix some ScrollView lint
Summary: $title

Reviewed By: TheSavior

Differential Revision: D8721334

fbshipit-source-id: 1aad238da9b8efdef6e2f3f1f2effd213fa9c3aa
2018-07-05 15:18:03 -07:00
Spencer Ahrens 2424ef5654 Move ScrollView prop comments from propTypes to flow types
Summary: Next step: make propTypes `__DEV__` only.

Reviewed By: TheSavior

Differential Revision: D8721300

fbshipit-source-id: 066b495836a87ea92d370728911e7b7ba6566c53
2018-07-05 15:18:03 -07:00
Kevin Gozali fff43614aa android: disable `setClipChildren(false)` until RN ART issue is resolved
Summary:
It looks like for some reason when ReactViewGroup uses setClipChildren(false), the ReactNativeARTSurface no longer redraws when its width is expanded.

Disable this new overflow behavior until the underlying issue is fixed.

Reviewed By: achen1

Differential Revision: D8739003

fbshipit-source-id: ffae0e3eb0cd8ce385eae33a87b5ba0325cae3c4
2018-07-05 14:02:45 -07:00
Alexey Kureev 5067540487 Fix react-native CLI (internal and external one)
Summary:
- Fix wrong debugger-ui path
- Override host and port using args

Reviewed By: yungsters

Differential Revision: D8731159

fbshipit-source-id: ca8ad76a02eda9e0b9cdb1a952aa5631d660868f
2018-07-03 23:48:12 -07:00
Zdravko Nikolovski 079bf3f206 Packager linking when using custom debug configuration on iOS device (#16451)
Summary:
In many projects we have different environments that we connect to. For these environments (for example: Test, Staging, Production) we have custom configurations (Debug and Release). While this is not a problem on Android, it is a problem on iOS. With the current implementation of the react-native-xcode.sh script, when using a custom Debug configuration, the app started on iOS device, can't contact the Packager. This pull request solves this issue.

Connect a real device, start the app with a custom debug configuration in Xcode. Shake and Reload.

[IOS][BUGFIX][./scripts/react-native-xcode.sh] Add support for connecting to the Packager when running the iOS app on device when using custom Debug configuration.
Closes https://github.com/facebook/react-native/pull/16451

Differential Revision: D8730537

Pulled By: hramos

fbshipit-source-id: a36007776e8fe9e401c38015040abd2c2bbd7c58
2018-07-03 18:18:30 -07:00
Dulmandakh 33d20da41b @allow-large-files [react-native][PR] Upgrade Gradle to 4.4 (#19899)
Summary:
Bump gradle to 4.4, version used by android studio 3.x and gradle plugin 3.x. This will help make migration easier and smoother.

CI: https://circleci.com/gh/dulmandakh/react-native/591

FYI: I found that gradle 4.8 works fine with gradle plugin 2.3, but gradle plugin 3.x displays warnings and asks to disable on demand configuration.
Closes https://github.com/facebook/react-native/pull/19899

Reviewed By: fkgozali

Differential Revision: D8697929

Pulled By: hramos

fbshipit-source-id: 21eb625ee1e4a1fa02aa22de4c36a07269ca467b
2018-07-03 18:18:30 -07:00
Himabindu Gadupudi 28c7ccf785 Image source without uri should return null.
Summary: When image source doesn't have uri and is neither an array, it should return null.

Reviewed By: yungsters

Differential Revision: D8728688

fbshipit-source-id: 915c4f3f450907ee3435ac99b1fe9849738766da
2018-07-03 15:47:26 -07:00
Miguel Jimenez Esun bbc8bb1f9d Do not use morgan internally
Summary: `morgan` produces non-json output, which affects `js1 run` when ran with the `--json` flag.

Reviewed By: Kureev

Differential Revision: D8724830

fbshipit-source-id: 11377f6ef39341c658a7f905383398423a721630
2018-07-03 13:47:08 -07:00
Peter van der Zee ba56725eb8 Upgrade eslint to v5.0.1 on xplat
Summary:
@public

Upgrades eslint to v5.0.1

Updated `eslint-plugin-eslint-comments`, which was necessary for eslint 5

Disabled the `prefer-const` rule while we wait for https://github.com/eslint/eslint/issues/10520 to be fixed/published.

Reviewed By: zertosh

Differential Revision: D8692838

fbshipit-source-id: fa0cae3e299af2350c8c30ceb94d70740ee84eab
2018-07-03 08:48:27 -07:00
Tim Yung bbdc12eda7 RN: Add Overflow Visible Kill Switch (Android)
Summary:
Adds a kill switch that reverts the default behavior of `overflow` to be hidden again. The intent of this kill switch is to give applications more time to migrate if necessary (e.g. if they are depending on third party packages with native components that are not compatible with `overflow` being visible by default).

To use the flag, simply set:

  import com.facebook.react.views.view.ReactViewGroup;

  // Somewhere in the initialization of your application.
  ReactViewGroup.sDefaultOverflowHidden = true;

Reviewed By: achen1

Differential Revision: D8718963

fbshipit-source-id: 0eb9aee45dfe04e9ae34d86e3bedcd30a185ef82
2018-07-03 00:34:17 -07:00
Darío Hereñú c1831d50cf Typo in DockerTests.md (#20009)
Summary:
[DOCS] [BUGFIX] [DockerTests.md] - Typo on string #038
Closes https://github.com/facebook/react-native/pull/20009

Differential Revision: D8721811

Pulled By: TheSavior

fbshipit-source-id: e678c74fd89bc0c0e9db48590e1911d23bc4d339
2018-07-02 20:32:07 -07:00
Kevin Gozali a09c464585 iOS: avoid crash because of null eventTarget
Summary: We were supposed to pass in proper eventEmitter, but passed in one with null eventTarget instead, causing assertion failures when dispatching event.

Reviewed By: sebmarkbage, shergin

Differential Revision: D8720793

fbshipit-source-id: 891f3b2a2c76a6dd3e40039623c6e86991aad50b
2018-07-02 18:02:35 -07:00
gengjiawen 18d3648fa8 Simplify `yarn prettier` and make it work on windows (#19987)
Summary:
make prettier script works on windows
pass all current ci.
none
 [GENERAL] [INTERNAL] [Script] - make prettier script works on windows.
Closes https://github.com/facebook/react-native/pull/19987

Differential Revision: D8714381

Pulled By: hramos

fbshipit-source-id: 0e5c5a6a5817094edd47918eb57d7f5a281560d6
2018-07-02 14:49:23 -07:00
Janic Duplessis 3b29274cc1 Remove the deprecated `isIPhoneX_deprecated` constant (#19920)
Summary:
Cleanup the `isIPhoneX_deprecated` constant which was said to be removed by June 1st 2018.
Closes https://github.com/facebook/react-native/pull/19920

Differential Revision: D8714400

Pulled By: hramos

fbshipit-source-id: 0b0b3a2d7b8098baf0474afea230780c79b2fe14
2018-07-02 14:49:22 -07:00
Yunyu Lin db2159d0b3 Fix some classes of incorrect Flow errors for Animated
Summary: Replace the union with a spread

Reviewed By: blairvanderhoof

Differential Revision: D8715694

fbshipit-source-id: 3b1ce893a065bfc7395b576e485a79f09bacc999
2018-07-02 13:33:37 -07:00
Rubén Norte 54942746d4 Hotfix to include react-native-windows in hasteImpl accepted paths (#20007)
Summary:
Closes https://github.com/facebook/react-native/pull/20007

We removed support for providesModule annotations and maintained support for Haste names in installed modules via `providesModuleNodeModules`, but our default `hasteImpl` doesn't take them into account. We need to find a better way to override core components from plugins but meanwhile this adds an exception for react-native-windows in the default `hasteImpl` to unblock their upgrade to the latest RC.

Fixes https://github.com/facebook/metro/issues/188

Reviewed By: mjesun

Differential Revision: D8695207

fbshipit-source-id: 2ad6cb1e93e600880a148776ac45f6ebd7d205d3
2018-07-02 11:17:41 -07:00
gengjiawen fdce938455 fix missing prettier file (#20001)
Summary:
fix missing prettier file
pass all current ci.
https://github.com/facebook/react-native/pull/19987
 [GENERAL] [INTERNAL] [TOOL] - fix missing prettier file.
Closes https://github.com/facebook/react-native/pull/20001

Differential Revision: D8714374

Pulled By: hramos

fbshipit-source-id: acdcb5d84c56d26c55f6262a0a98aefe786de8cb
2018-07-02 10:48:06 -07:00
David Vacca 27a38dedf1 Enable View flatening optimization by default
Summary: This diff enables view flattening optimizations by default

Reviewed By: wwjholmes, yungsters

Differential Revision: D8699050

fbshipit-source-id: d37d06fe330e223c49a0788e85f6338fd056fd19
2018-07-02 10:04:41 -07:00
Alexey Kureev c4a66a89a2 Code clean-ups and createServer migration
Summary:
Scope of the diff:

1. Middleware
`react-native-github/local-cli` and `react-native-internal-cli` uses a very similar set of middlewares (internal cli extends github version), so I decided to move it to a standalone file (middleware manager) in order to remove duplications and increase readability.

2. Types
Seems that after Flow upgrade to version 0.68 there were many type issues to resolve, so all of them were auto-mocked. This is fine, but I'd like to see Flow assists me with `Metro.createServer` -> `Metro.runServer` migration. Hence, I decided to resolve flow mocks, related to runServer.

3. `runServer` signature
In `react-native-github` repo I cleaned up `runServer` signature by removing `startCallback` and `readyCallback` from the function parameters and moved them to `runServer` instead.

4. Replace `createServer` by `runServer`
In `react-native-github` repo, `createServer` has been replaced by `runServer`. __Some of arguments are not mapped__.

Note that this diff will partially break argument mapping. This is intentional. @[100000044482482:ives] will fix it with a new config package.

Reviewed By: mjesun

Differential Revision: D8711717

fbshipit-source-id: a843ab576360ff7242099910d8f25a9cb0a388c0
2018-07-02 09:47:39 -07:00
Valentin Shergin ee535fafe3 Fabric: Making `fabric/textlayoutmanager` compilable on Android
Summary:
@public
This compiles, but it works only on iOS for now.

Reviewed By: mdvacca

Differential Revision: D8655540

fbshipit-source-id: 7e9a73fadb317dd62298af6f347344ac4229a8a5
2018-07-01 21:37:00 -07:00
Valentin Shergin 5786db3a26 Fabric: Making `fabric/graphics` compilable on Android
Summary:
@public
This compiles but this does not work.
To make it actually work we have to implement all missing functions in `Color.cpp` and co.

Reviewed By: fkgozali

Differential Revision: D8655537

fbshipit-source-id: 564fb7131445af81cf05407239dc6ba870cf6b83
2018-07-01 21:36:59 -07:00
Tim Yung 6a16bec882 RN: Fix Drawing Rect for ReactScrollView
Summary:
Fixes `ReactScrollView` so that it respects the drawing rect (i.e. the bounding box of the element).

In JavaScript, this is the backing view for `ScrollView` (vertical) on Android.

Reviewed By: fadinghorse

Differential Revision: D8710256

fbshipit-source-id: f3bd96e39b8569cfcb21e486944b70fdb57c12b6
2018-07-01 16:32:07 -07:00
gengjiawen 6dcadca712 Add back ImageEditingExample example (#19972)
Summary:
add back missing file.
pass all current ci.
none
 [GENERAL] [INTERNAL] [RNTester] - Add back ImageEditingExample example.
Closes https://github.com/facebook/react-native/pull/19972

Differential Revision: D8711888

Pulled By: TheSavior

fbshipit-source-id: 14070bfbf747f7f59c4039981a9bc83c1c10862b
2018-07-01 16:32:07 -07:00
Valentin Shergin 2166d2bb79 Fabric: Trivial implementation of prelumiary view allocation on iOS
Summary:
@public
We have this feature in the current version of RN, so it would be nice to support that in Fabric as well. This should save us tens of ms of views creation during mounting.
And that's quite easy to do!

Reviewed By: fkgozali

Differential Revision: D8701992

fbshipit-source-id: 4e3049df009ffd65bb43043de388e81795e5e559
2018-06-29 20:02:38 -07:00
Sebastian Markbage 5d9326be29 Remove instanceHandle, pass event target instead + add dispatchToEmptyTarget
Summary:
Removes the concept of instance handle. Instead we pass the event target
to createNode and don't pass it to subsequent clones.

The life time of the event target is managed by native (the event emitter).
It has to be released manually.

Reviewed By: shergin

Differential Revision: D8688330

fbshipit-source-id: e11b61f147ea9ca4dfb453fe07063ed06f24b7ac
2018-06-29 15:32:27 -07:00
gengjiawen 7b1bd4d4f3 remove useless config in circle ci (#19980)
Summary:
The gradle path is unnecessary.
pass all current ci.
none
 [GENERAL] [INTERNAL] [CI] - remove useless config in circle ci.
Closes https://github.com/facebook/react-native/pull/19980

Differential Revision: D8700298

Pulled By: hramos

fbshipit-source-id: ed50cab035f0d78dc482023460692a2ce137fb48
2018-06-29 13:02:58 -07:00
Valentin Shergin 62f9ced099 Fabric: Subtle changes that make GCC compiler happy
Summary:
@public
Most of them are legit issues which should not be compilable anyways (but Clang tolerates thems).

Reviewed By: mdvacca

Differential Revision: D8655539

fbshipit-source-id: 645729fb9d6a120ce1ab2b07542abcdacd72320d
2018-06-29 12:18:27 -07:00
Valentin Shergin 712c2ed5d2 Fabric: Getting rid of `std::to_string()`
Summary:
@public
Suddenly, it is not supported on Android.
Luckelly `folly:to<std::string>()` is as good as `std::to_string()`.

Reviewed By: mdvacca

Differential Revision: D8655538

fbshipit-source-id: 2b3b970f6a261253aaa6b22dba8338dc66b7195d
2018-06-29 12:18:27 -07:00
Tim Yung b81c8b51fc RN: Add Support for `overflow` on Android (Take 2)
Summary:
Adds support for the `overflow` style property on React Native for Android.

This is the second attempt to do this. See 6110a4cc75 (D8666509) for the first attempt.

Similar to the first attempt, this sets `setClipChildren(false)` by default on all `ViewGroup` instances. However, this differs in how it implements `overflow: hidden`. Instead of conditionally setting `setClipChildren`, this manually clips children to the `ViewGroup`'s bounds  (which was incidentally what we were doing for background + border radius already).

Reviewed By: achen1

Differential Revision: D8690805

fbshipit-source-id: 58757825cd9d138c18c8758918d85b4ca1915f87
2018-06-29 12:18:27 -07:00
Tim Yung cfce6ee9d7 RN: Android Constants for Overflow Style
Summary:
Tidies up the hardcoded strings for referencing the `overflow` style values.

Also, the `OVERFLOW` case in the optimized view flattening code path is unnecessary because `OVERFLOW` is already in the `LAYOUT_ONLY_PROPS` set.

Reviewed By: achen1

Differential Revision: D8690804

fbshipit-source-id: 3befbe93ed761e57e45f9b50e59bffc8a29a407f
2018-06-29 12:18:27 -07:00
Tim Yung f090840f45 RN: Revert D8666509
Summary:
Reverts D8666509. Unfortunately, I misunderstood `setClipChildren` on Android.

When set on a `ViewGroup`, `setClipChildren` configures whether its //children// — not itself — are clipped to their bounds. This is unlike `overflow` (as it behaves on iOS) which configures whether the view itself is clipped to its bounds.

But they are definitely related. In theory, I think we could implement `overflow` using `setClipChildren` by:

- Setting `setClipChildren(false)` by default. (This part, I got right.)
- When `overflow` is set to `hidden` on a `View`, we create an extra `ViewGroup` (child) within the normal `ViewGroup` (parent). Then, we can set `setClipChildren(true)` on the parent `ViewGroup` which will cause the child `ViewGroup` to be clipped to its bounds.

However, I think the tricky thing will be to create the child `ViewGroup` without incurring unintentional side effects.

I need to decide whether or not this is worth trying. The alternative is to add a new `clipChildren` boolean prop that is Android-only, but I really hate further bifurcating the platform. But for now, I am reverting my mistake.

Reviewed By: achen1

Differential Revision: D8690551

fbshipit-source-id: 1ba3bbcc5458ffbd5c475430ea0382b3fd0916b2
2018-06-29 12:18:27 -07:00
Tim Yung d9fa1d70dc RNTester: Better View Overflow Example
Summary:
Improves the examples in `ViewExample.js` that tests overflow behavior. Notable:

- Test view flattening behavior by setting `overflow` on views that only have other layout-only styles.
- Test the default behavior when `overflow` is not set at all.

Reviewed By: achen1

Differential Revision: D8690560

fbshipit-source-id: 6320ef51305952d13bf5724b369651fdfd32ff21
2018-06-29 12:18:27 -07:00
Tim Yung b283dcdd3e RNTester: Cleanup ViewExample.js
Summary: Minor cleanup of ViewExample.js in the RNTester.

Reviewed By: sahrens

Differential Revision: D8690133

fbshipit-source-id: d034f6d215679dac7f19fab90729bb7e7ef39edd
2018-06-29 12:18:27 -07:00
David Vacca 2f3f1b02cd Avoid cleaning up Owner of YGNode during clonning
Summary:
This diff refactors the cloning mechanism for YogaNode used from Fabric UI renderer and RN iOS graphs.
Previously, we were cleaning the owner of the child's cloned node inside the C++ implementation of YogaNode. This was a mistake because this modified the last commited YogaTree, causing side effect in RN iOS graphs.

Reviewed By: shergin

Differential Revision: D8672627

fbshipit-source-id: c9902d00690e0361fd58aed84b506c42258bd995
2018-06-28 22:48:35 -07:00
Rafael Oleza 519b0c319f Move babel-preset-react-native to metro repository
Summary:
@public

From now, `babel-preset-react-native` is going to be called `metro-react-native-babel-preset` and it's going to use the same versioning system that other metro packages.

This solves a few problems:

* Automated publishing of this package: Currently we have to publish this package manually from the RN repository, so it's hard to make changes to `babel-preset-react-native` and have them available on `metro` (the plugin version has to be manually updated, the package has to be manually published to npm and metro has to be change to depend on the new version).
* Transforming package code before publishing: By being in Metro repository, we're going to transform its source code before publishing it to npm automatically using the same infra as other metro packages, which is going to prevent issues like the current one with Node v6 due to trailing commas added by prettier: https://circleci.com/gh/facebook/metro/2125
* Workspace usage: Now, this package is not going to be installed via npm internally, but instead be used directly from the yarn workspace.

Reviewed By: mjesun

Differential Revision: D8677254

fbshipit-source-id: 14abdd218af64056625c5a997458bfe51d2101bc
2018-06-28 15:56:28 -07:00