Commit Graph

932 Commits

Author SHA1 Message Date
Miguel Jimenez Esun 390ded871c Move out "genMockFunction" and "genMockFn" to "fn"
Summary: In the upcoming Jest version `genMockFunction` and `genMockFn` are deprecated, so we need to kill them.

Reviewed By: rafeca

Differential Revision: D8107155

fbshipit-source-id: 4f46ab58e6e34224eb95e9355385da44f005ea94
2018-05-23 13:40:06 -07:00
Héctor Ramos 3e0ebc7663 Revert bump to API 26 and fix Android tests failures
Summary:
This reverts a3931e9531

The open source `test_android` job is not configured to use Android 26 quite yet. I've spent a couple of days trying to get our Android tests back in working order, with no luck.

I'm reverting the change that bumped React Native to use build tools 26 + Android SDK 26. I encourage contributors interested in making this change happen to work on getting our Android tests working with API 26.

This will allow us to focus on getting `test_android` back to green, and _then_ we can work on bumping to API 26 while keeping tests green.

Reviewed By: fkgozali

Differential Revision: D8066226

fbshipit-source-id: 9bfd58a7f081c0971b78b331073e70545c21ca6d
2018-05-23 13:06:12 -07:00
Kevin Gozali f50df4f5ec iOS OSS: deployment target 8.0 => 9.0
Summary: Moving target deployment to iOS 9.0+ from now on, removing customization for iOS 8.

Reviewed By: shergin

Differential Revision: D8053439

fbshipit-source-id: 292c58f15c6e6caf8b28d15c1521812d6ed675c5
2018-05-22 01:16:45 -07:00
Dulmandakh a3931e9531 android compileSdkVersion 26, use buildToolsVersion 26.0.3
Summary:
Starting August 2018, Google Play will require targetSdkVersion 26 for new applications, and November 2018 for application updates.

This PR will use Android build tools 26.0.3 and compilerSdk 26, then support library version 26.0.2 to make targeting 26 easier in the future.

I think this PR will help to people compile and test their applications, thus make transition easier (smoother). Also we'll have opportunity and time to migrate code to target 26.

https://github.com/facebook/react-native/issues/18095

React Native on android must work as usual

Closes https://github.com/facebook/react-native/pull/19257

Differential Revision: D8010354

Pulled By: mdvacca

fbshipit-source-id: 63ba03585e918b38c2a2adb5d2f2e85d7ce46fae
2018-05-15 09:28:41 -07:00
Aaron Abramov 9fbff62b5f Use `hg root` for all CWD in test environment
Reviewed By: mjesun

Differential Revision: D7852925

fbshipit-source-id: 4baf8cddc43d388269577a337cfe5f329c86d0f6
2018-05-14 13:46:51 -07:00
Panagiotis Vekris 4767f9be45 v0.72.0 in xplat/js
Reviewed By: gabelevi

Differential Revision: D7956747

fbshipit-source-id: b1993de405c273b3cc1ed74f994e8e75bda0a985
2018-05-11 17:50:35 -07:00
Héctor Ramos c1e6f27823 Bump to Node 8
Summary:
Moving to Node 8 in React Native will allow us to be consistent with Facebook, e.g. trailing commas.

As of April 30, Node 4.x is end of life, and Node 6.x entered maintenance mode (see https://medium.com/the-node-js-collection/april-2018-release-updates-from-the-node-js-project-71687e1f7742).

This will require our docs to be updated to require Node 8 as a minimum. This should be done as part of the following PR: https://github.com/facebook/react-native-website/pull/355

Circle CI already runs all JS tests using Node 8, and it has an extra compatibility check that uses Node 6. This workflow is dropped as we no longer need to check for failures when Node 6 is used.

See https://github.com/facebook/react-native/issues/19226

[GENERAL] [BREAKING] [Node] - Bump minimum req. Node version to 8
Closes https://github.com/facebook/react-native/pull/19230

Differential Revision: D7979478

Pulled By: hramos

fbshipit-source-id: c91ec118f0a59c4daae5fcdbfc822ccead591304
2018-05-11 17:32:19 -07:00
Eli White 0e5c2633ee Prettier files with shebang
Reviewed By: yungsters

Differential Revision: D7974564

fbshipit-source-id: 00db563ce24868c0fde117e981936b83cec30e48
2018-05-11 13:52:30 -07:00
Eli White aba4ec0c09 Prettier RN local-cli
Reviewed By: yungsters

Differential Revision: D7962462

fbshipit-source-id: 0afe2092af8703895de91a6d1400315c3173aa6d
2018-05-11 13:00:50 -07:00
Mayank Patke d0822c3bcc v0.71.0 in xplat/js
Reviewed By: yungsters

Differential Revision: D7787035

fbshipit-source-id: 07defbbaa6fdc8f3016727fe6d6b1640efbf8ab6
2018-04-28 02:19:34 -07:00
Miguel Jimenez Esun e2bea00c33 Remove TransformCaching.js
Reviewed By: jeanlauliac

Differential Revision: D7707146

fbshipit-source-id: 47f4c47b22cf65cfee05f63ad7dd81a5faf9c504
2018-04-27 06:47:26 -07:00
Chirag Shah 57774a4a98 Use app name from app.json for registering application
Summary:
Currently when we change the app name in `app.json`, run `react-native eject` and then run the application, we get the following error `Application HelloWorld2 has not been registered`

<img src="https://user-images.githubusercontent.com/6805530/34646396-9a68ccd0-f38c-11e7-9a49-9f985dc20f14.png" width="33%" />

This PR picks up the app name from app.json while registering the application, which prevents the additional step for the user to change the app name while registering in the `index.js`

Tested using sinopia. The new app generated with the `react-native init HelloWorld` contains the changes made.

[CLI] [ENHANCEMENT] [index.js] - App name picked from from app.json for registering application.
Closes https://github.com/facebook/react-native/pull/17472

Differential Revision: D7788652

Pulled By: hramos

fbshipit-source-id: bf23318ae1994b06e5d5908f53818040db1ad5af
2018-04-27 06:02:02 -07:00
Jean Lauliac c6b96c0df7 react-native-github: remove old fs mock implementation
Reviewed By: rafeca

Differential Revision: D7652914

fbshipit-source-id: 5494305750e7616b5120169266c519f460ae7e6d
2018-04-25 07:37:10 -07:00
Rubén Norte d5e9e55fa3 Remove @providesModule from all modules
Summary:
This PR removes the need for having the `providesModule` tags in all the modules in the repository.

It configures Flow, Jest and Metro to get the module names from the filenames (`Libraries/Animated/src/nodes/AnimatedInterpolation.js` => `AnimatedInterpolation`)

* Checked the Flow configuration by running flow on the project root (no errors):

```
yarn flow
```

* Checked the Jest configuration by running the tests with a clean cache:

```
yarn jest --clearCache && yarn test
```

* Checked the Metro configuration by starting the server with a clean cache and requesting some bundles:

```
yarn run start --reset-cache
curl 'localhost:8081/IntegrationTests/AccessibilityManagerTest.bundle?platform=android'
curl 'localhost:8081/Libraries/Alert/Alert.bundle?platform=ios'
```

[INTERNAL] [FEATURE] [All] - Removed providesModule from all modules and configured tools.
Closes https://github.com/facebook/react-native/pull/18995

Reviewed By: mjesun

Differential Revision: D7729509

Pulled By: rubennorte

fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
2018-04-25 07:37:10 -07:00
Rafael Oleza 06ec0f0fd1 Expose the asyncRequireModulePath param
Reviewed By: mjesun

Differential Revision: D7709569

fbshipit-source-id: 871dd9c178b1e5c81163558201ef983315561211
2018-04-20 14:23:23 -07:00
Miguel Jimenez Esun fc694fef66 Clean buildBundle.js, index.js and Flow types
Reviewed By: davidaurelio

Differential Revision: D7628725

fbshipit-source-id: 3873e5c7a0c9b988335dcf9b8a11fcf0598a9f50
2018-04-20 07:43:26 -07:00
Miguel Jimenez Esun 11f102373d Clean server.js and runServer.js
Reviewed By: davidaurelio

Differential Revision: D7628734

fbshipit-source-id: 3788b35b0f9b5034d9152c5c3b297313fbec231a
2018-04-20 07:43:26 -07:00
Luciano Lima c4ab03a18e Add devDependencies support for templates
Summary:
Add devDependencies support to React Native templates.
Template can have a devDependencies.json file with devDependencies inside.
Using separate files to dependencies and devDependencies, it maintains compatibility with the current version.

Allows React Native templates to have devDependencies, which can help applications to have better organization, quality and testability. It's possible start a new app with some dependencies for dev support like prettier, reactotron, eslint packages and others.

Add a devDependencies.json file with at least one dependency (like prettier)

[CLI] [FEATURE] [local-cli/generator/templates.js] - Add support to devDependencies for react native templates
Closes https://github.com/facebook/react-native/pull/18164

Differential Revision: D7660744

Pulled By: hramos

fbshipit-source-id: 6fbb13832d2d1bd0c06bada0842c890dd99cf331
2018-04-17 16:44:51 -07:00
Avik Chaudhuri d2a1461d26 @allow-large-files clean up xplat/js for flow 0.70.0
Reviewed By: fishythefish

Differential Revision: D7643236

fbshipit-source-id: 1d9a95f1e249ce3fdc552a4ca92a6c63b267dae4
2018-04-17 05:42:01 -07:00
Angly Cat 0934c1778f Fix installing step of `run-ios` command
Summary:
To date if you create a new `react-native@0.55.0` project and try to build/run it for iOS via CLI, e.g. by running:

```
$ react-native init test
$ cd test
$ react-native run-ios --no-packager
```

the build would succeed, but installing will fail afterwards:

```
** BUILD SUCCEEDED **

Installing Build/Products/Debug-iphonesimulator/test.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier Build/Products/Debug-iphonesimulator/test.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
```

This fail happens because `/usr/libexec/PlistBuddy` can't find `Info.plist` file at the provided path.

This is a regression introduced by changes from PR #17963 (accepted in 5447ca6707). If you execute test plan from that PR, it would fail.

As per why:

By default, `run-ios` process's working directory is `$PROJECT_DIR/ios`.

According to [this line in `runIOS.js`](3cd2b43426/local-cli/runIOS/runIOS.js (L184)), `xcodebuild` places all artifacts in `build` directory.

And the default Xcode paths for products is `Build/Products` (at least of Xcode 9.2 which I use, and Xcode 9.3 which I tested this with also).

So, the required `Info.plist` file is actually being created at `$PROJECT_DIR/ios/build/Build/Products/Debug-iphonesimulator/test.app/Info.plist` (with double `build`, the first from `derivedDataPath` key, the second from default products path). Relatively to `run-ios` process's working directory, the path of the file is `build/Build/Products/Debug-iphonesimulator/test.app/Info.plist`.

PR #17963 changed correct path to incorrect, thus introducing this regression.

If changes from that PR are reverted, CLI doesn't fail on install step.

I catch this error on both existing project and a freshly created test project. I can build/run an app from Xcode just fine, but running from CLI still would fail. The other workaround is to change path of products artifacts in Xcode, which is user settings and therefore can't be commited to a project's repo with VCS.

Run:

```
$ react-native init test
$ cd test
$ react-native run-ios --no-packager
```

Ensure that it doesn't fail on install step and produce output similar to this:

```
Installing build/Build/Products/Debug-iphonesimulator/test.app
Launching org.reactjs.native.example.test
```

[CLI][BUGFIX][local-cli/runIOS/runIOS.js] - Fix failing of `run-ios` command on install step
Closes https://github.com/facebook/react-native/pull/18700

Differential Revision: D7555096

Pulled By: hramos

fbshipit-source-id: d877b867e89256f4356f22781d78308affbb9d9c
2018-04-09 12:43:53 -07:00
Mike Grabowski 9736ddc061 Fix `run-ios` not turning on Simulator app
Summary:
Right now, `run-ios` will "boot" Simulator in the headless mode in the background, as long as the Simulator.app is not running. It is exactly what "detox" does - it executes your test suite in the background.

It seems to me that the author of this change was testing it with `Simulator.app` open.

In order to fix this behavior, we have to make sure it runs before we attempt booting.

This passed through the release process since we don't use `run-ios` there (it recommends turning on XCode and testing manually which is what I have done recently too).

Differential Revision: D7535693

Pulled By: hramos

fbshipit-source-id: 881db7740ace805ecefb98bfdb660e32aafd4664
2018-04-06 14:34:04 -07:00
Mike Grabowski 159869d250 Fix: "Metro listenting on port undefined"
Summary:
Regression introduced in 2ad34075f1.

Fixes https://github.com/facebook/react-native/issues/18681
Closes https://github.com/facebook/react-native/pull/18722

Differential Revision: D7535684

Pulled By: hramos

fbshipit-source-id: 21bc79091148daba7b668965cd5becaa43117721
2018-04-06 10:44:07 -07:00
Angly Cat c6610577fd Fix launching iOS simulator regression
Summary:
PR #17284 (accepted in 2ad34075f1) introduced a couple of regressions.

~1. There's the code:~
```
.then((appName) => resolve(selectedSimulator.udid, appName));
/* ... */
.then((udid, appName) => {
```

~~This makes `appName` to be always `undefined` as per `resolve` accepts only 1 argument. This regression causes issues if an app name differs from a scheme name.~

~This PR fixes this by wrapping both values in an array.~

This was fixed in 589eae1432.

2. The code
```
child_process.execFileSync('xcrun', ['simctl', 'boot', selectedSimulator.udid]);
```
makes a simulator *boot*, but the simulator *doesn't launch*. That's a regression, which forces developers to launch simulators by other means (by running a number of elaborate console commands, by running Xcode, or by running a simulator manually).

This PR reverts that part of changes.

Create a blank project with a name that differs from scheme name. Try to `react-native run-ios` in it. See that a simulator is launched and installing succeeds. Without this changes simulator wouldn't launch, and installing step would fail because of app name mismatch.

[CLI][BUGFIX][local-cli/runIOS/runIOS.js] - Fix running on multiple simulators feature regressions
Closes https://github.com/facebook/react-native/pull/18711

Differential Revision: D7535150

Pulled By: hramos

fbshipit-source-id: 5c714231e9977c0c829b6f8c793497cd31cd46b5
2018-04-06 10:12:37 -07:00
gengjiawen 9b9b6c845e Inline and fix proguard rules
Summary:
The original proguard rules are put in the template, which is not very convenient and easy to get wrong. Because new rules get put, people also has two copy paste the rule. And there are also existing project import react native as a dependency. So the best way to  keep a android library project proguard rule is to manage the rule itself, using `consumerProguardFiles` like [dagger](46baef6d96/butterknife/build.gradle (L9)) and other android library project.

<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->

Use RNTester to build the release flavor (now it has bugs https://github.com/facebook/react-native/issues/18460, I keep my change in local for now), after build success, run to check if crash.

In the process, I also fix https://github.com/facebook/react-native/issues/12994 and https://github.com/facebook/react-native/issues/6624 by adding the following to proguard rules
```proguard
-keep,includedescriptorclasses class com.facebook.react.bridge.** { *; }
```

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

[ANDROID] [ENHANCEMENT and BUGFIX] [Proguard rules] - inline and fix proguard rules .

<!--
  **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

    CATEGORY
  [----------]      TYPE
  [ CLI      ] [-------------]    LOCATION
  [ DOCS     ] [ BREAKING    ] [-------------]
  [ GENERAL  ] [ BUGFIX      ] [ {Component} ]
  [ INTERNAL ] [ ENHANCEMENT ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {Message} |
  [----------] [-------------] [-------------]   |-----------|

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/18461

Differential Revision: D7527533

Pulled By: hramos

fbshipit-source-id: 447dbc16983bcfb597187b40c1be3987a8c5a832
2018-04-05 17:34:53 -07:00
Maël Nison 6be5d7827b Adds an experimental hook for custom resolutions
Reviewed By: mjesun

Differential Revision: D7337022

fbshipit-source-id: fea1ee345e4d3b5713fed6cdc33869fbba6f21e2
2018-04-05 09:00:04 -07:00
glevi@fb.com f3ef227904 Upgrade to Flow v0.69.0
Reviewed By: panagosg7

Differential Revision: D7437630

fbshipit-source-id: db9627afed89049c07a121296fbd52e2bfbf39bf
2018-03-29 06:54:06 -07:00
Andrew Jack ff1444e215 Add fresco proguard rules
Summary:
<!--
  Required: Write your motivation here.
  If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Adds proguard rules, which I missed off from the #18496 PR.

I've added the proguard rules as suggested in http://frescolib.org/docs/shipping.html, with the duplicates & unused libraries removed.

<!--
  Required: Write your test plan here. If you changed any code, please provide us with
  clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->
CI passes.
Build example project with proguard turned on.

<!--
  Does this PR require a documentation change?
  Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->

<!--
  Required.
  Help reviewers and the release process by writing your own release notes. See below for an example.
-->

[ANDROID] [BREAKING] [proguard] - Update Proguard config in template. If upgrading make sure you update your project's proguard file.

<!--
  **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

    CATEGORY
  [----------]      TYPE
  [ CLI      ] [-------------]    LOCATION
  [ DOCS     ] [ BREAKING    ] [-------------]
  [ GENERAL  ] [ BUGFIX      ] [ {Component} ]
  [ INTERNAL ] [ ENHANCEMENT ] [ {Filename}  ]
  [ IOS      ] [ FEATURE     ] [ {Directory} ]   |-----------|
  [ ANDROID  ] [ MINOR       ] [ {Framework} ] - | {Message} |
  [----------] [-------------] [-------------]   |-----------|

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

cc foghina & hramos
Closes https://github.com/facebook/react-native/pull/18499

Differential Revision: D7366113

Pulled By: foghina

fbshipit-source-id: 20864c34976bc3930d9fdcc9428f40f7a8d7a9b8
2018-03-22 10:01:26 -07:00
Artem Egorov ea92f47d90 While linking plugin ask for params only once
Summary:
Resolve #18333

CLI should ask users for params only once and waiting for response while linking plugin

Ran the `link` commands for iOS and Android and confirmed that params requested only once.

[CLI][FEATURE][local-cli/link/link.js] - Requesting link params only once for all platforms
Closes https://github.com/facebook/react-native/pull/18349

Differential Revision: D7342181

Pulled By: hramos

fbshipit-source-id: a10f0f7f2170f067d78b30e5a5221634b77da577
2018-03-20 14:49:55 -07:00
Rafael Oleza 15f0a7b76c Add getRunModuleStatement config param to configure the require() statements
Reviewed By: cpojer

Differential Revision: D7334078

fbshipit-source-id: c19340567c634e3173ee707e92389eaaa4e724e9
2018-03-20 07:24:56 -07:00
Rafael Oleza 6f339b6fcb Deprecate postProcessModules config param
Reviewed By: mjesun

Differential Revision: D7320671

fbshipit-source-id: 979108f0931f9ee0dd820025782137d4c726d19f
2018-03-20 07:24:56 -07:00
Sam Goldman 0d924dd629 Upgrade to Flow v0.68.0
Reviewed By: gabelevi

Differential Revision: D7310349

fbshipit-source-id: 70d29815dd7912704aec8a015c970be3fafeeba3
2018-03-19 18:31:36 -07:00
Jamie Lynch c2fd54fcb2 Enable obfuscation in ProGuard rules by default
Summary:
This PR enables obfuscation in ProGuard by default when creating a new project, and documents how developers can turn obfuscation off if they desire.

The ProGuard phase is currently disabled by default. If a developer wanted to enable ProGuard, the first thing they would see is the following line in their build.gradle file: `def enableProguardInReleaseBuilds = false`

It's really easy to assume that enabling this flag will setup code shrinking and obfuscation, as this is the default behaviour for a completely native Android Studio project, or when running ProGuard from the command line directly.

However, the generated ProGuard rules override the default behaviour. Without visually inspecting the rules file, searching for a mapping file, or analyzing the Dex file classes, this isn't immediately obvious, as the APK will be smaller, and gradle will show the Proguard task as completing.

Personally I find this confusing and really wasn't expecting for obfuscation to be disabled - most Android Error Reporting services allow deobfuscation of stacktraces via mapping files.

1. Create a new project using `react-native init MyProject`
2. Observe that `-dontobfuscate` is commented out

[ANDROID] [MINOR] [ProGuard] - Enables obfuscation by default in newly created projects
Closes https://github.com/facebook/react-native/pull/17754

Differential Revision: D7251680

Pulled By: hramos

fbshipit-source-id: cf9ca7753640643377a51daa4fa9065516197340
2018-03-16 18:56:08 -07:00
Thibault Malbranche dbd47592a1 Local cli/android/normalize project name
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Scoped packages are starting to be the new thing, and gradle does not work properly with '/' in the project name, so this PR links them and replaces '/' by '_' . This only affects android.

I added tests in the 2 impacted functions + a test file for the normalizer function

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

-->
[CLI] [BUGFIX] [local-cli/link/link.js] - On android, Scoped packages will now get the '/' replaced with '_' to ensure gradle works nicely.  ⚠️ However if you previously linked scoped packages, they will get linked again. ⚠️
Closes https://github.com/facebook/react-native/pull/18275

Differential Revision: D7305227

Pulled By: hramos

fbshipit-source-id: 1c95563e884175529692948b29407a7733c44353
2018-03-16 11:26:01 -07:00
Douglas Lowder 3002c4eb98 Fix tvOS react-native init release build (#18288)
Summary:
Add correct dependencies and linker flags to the HelloWorld template Xcode project so that HelloWorld-tvOSTests builds correctly for release builds.  Fixes #18288 .

Tested with `react-native init --version=https://github.com/dlowder-salesforce/react-native#tvos-init-release-fix` .

[IOS][BUGFIX][ local-cli/templates/ios/HelloWorld ]- fix release build for tvOS
Closes https://github.com/facebook/react-native/pull/18337

Differential Revision: D7240376

Pulled By: hramos

fbshipit-source-id: a4ad219e7d6b06bd6928d55ed7398f8fc9352e72
2018-03-12 11:50:44 -07:00
Nat Mote adabae2c0b Upgrade to Flow v0.67
Reviewed By: gabelevi

Differential Revision: D7208080

fbshipit-source-id: 81380aca39b7a74646a4a44af1e5571bc5629b77
2018-03-09 20:50:38 -08:00
Héctor Ramos f2ad77f90a Update additional license headers
Reviewed By: sophiebits

Differential Revision: D7196607

fbshipit-source-id: 9e6452f583b2b5616f5bb38f26f2ae33c14bb820
2018-03-08 12:10:14 -08:00
Eric Rozell ec884890b1 Fixing bugs in link and unlink
Summary:
Android uses the name of the package, not the config, for the `isInstalled` check. Sending both parameters to `isInstalled` so we have a consistent API.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

A bug was uncovered in the react-native link command where Android would not unlink because the wrong parameters were being sent to `isInstalled`.

Successfully linked and unlinked `react-native-fs` on Windows and Mac. Jest tests pass.

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI][BUGFIX][local-cli/link/link.js] - Fix issue with `isInstalled` check for Android
[CLI][BUGFIX][local-cli/link/unlink.js] - Fix issue with `isInstalled` check for Android
[CLI][BUGFIX][local-cli/link/ios/common/unregisterNativeModule.js] - Fix references to unregister implementations.
Closes https://github.com/facebook/react-native/pull/18207

Differential Revision: D7180885

Pulled By: hramos

fbshipit-source-id: 5f479cd9d7b1ebd8626b461e9dc1f22988e2c61f
2018-03-07 09:10:23 -08:00
Rafael Oleza 7be3d1cbaf Make the chrome debugger handle dynamic delta ids
Differential Revision: D7112419

fbshipit-source-id: 1d80c0c13144dd19bbcd5535383befc6567cacf7
2018-03-02 02:55:20 -08:00
Miguel Jimenez Esun 8a7f68e211 Remove optional parameter from server and enforce empty list everywhere
Reviewed By: jeanlauliac

Differential Revision: D6999448

fbshipit-source-id: 39a6b9333e3c3ec05bae5423fcc84ad17e1fdc06
2018-03-01 05:33:05 -08:00
Koen Punt 2ad34075f1 Xcode 9 supports running multiple simulators
Summary:
Since Xcode 9 you can run multiple simultaneously. And since I believe React Native advocates using the latest version of Xcode, we can safely remove this constraint.

Updated the unit tests. Furthermore it can be found in the [Xcode release notes](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/xcode_9/xcode_9.html#//apple_ref/doc/uid/TP40004626-CH8-SW12) that multiple simulators are now supported.

This can be tested with the CLI by running `react-native run-ios` twice, but with a different `--simulator` flag, e.g.;

    react-native run-ios --simulator "iPhone SE"
    react-native run-ios --simulator "iPhone X"

[IOS] [ENHANCEMENT] [local-cli/runIOS/findMatchingSimulator.js] - Allow running multiple simulators
Closes https://github.com/facebook/react-native/pull/17284

Differential Revision: D7102790

Pulled By: hramos

fbshipit-source-id: 750e7039201e28a1feda2bec1e78144fd9deff98
2018-02-27 14:11:00 -08:00
Jean Lauliac a759a44358 npmignore: ignore tests and fixtures
Summary:
This try to address #17672 and https://github.com/facebook/metro/issues/139. We should probably not include these folders in the released version of React Native, as they are used only for testing—am I incorrect?

cc MoOx, t4deu.

I ran:

```
npm pack
tar -t -f react-native-1000.0.0.tgz | less
```

Then verified that `__fixture__` was not part of the package.

https://github.com/facebook/react-native/pull/17672

[GENERAL] [BUGFIX] [.npmignore] - Do not publish test-specific files
Closes https://github.com/facebook/react-native/pull/18019

Differential Revision: D7098211

Pulled By: jeanlauliac

fbshipit-source-id: 0748ad8c064450bd2a9f4d6f49675a7f74fb300f
2018-02-27 08:42:14 -08:00
Miguel Jimenez Esun dabe8e0d01 Allow passing custom configs through the CLI ("js1 run")
Reviewed By: jeanlauliac

Differential Revision: D7081913

fbshipit-source-id: f5952599c840f2c65213bd2928b21f0c1d84f510
2018-02-26 03:48:43 -08:00
Ruben Bridgewater d2817f48a1 Use sync fs.mkdir
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

This ensures that errors are actually noticed in case it is not
possible to create the directory. This will also throw an error when used with the upcoming Node.js 10.x because there is no callback.

Refs: https://github.com/nodejs/node/pull/18668

[CLI][MINOR][local-cli/library/library.js] - Use sync fs.mkdir for error handling
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/18084

Differential Revision: D7083122

Pulled By: shergin

fbshipit-source-id: a13b64e57860e1ab2c15e0c008211dc0dca3b2d2
2018-02-25 21:49:28 -08:00
Jean Lauliac 33a893e18b react-native: prefer custom source extensions over default extensions
Reviewed By: mjesun

Differential Revision: D7066617

fbshipit-source-id: cdde7451cb817d62d6705071752fce0686cf04dc
2018-02-23 08:50:16 -08:00
Mats Byrkeland edb6ca72fd Fix ESLint warnings using 'yarn lint --fix'
Summary:
Hi! I would like to contribute to React Native, and I am just starting out. I forked the repo and found that it has quite a lot of ESLint warnings – many of which were automatically fixable. This PR is simply the result of running `yarn lint --fix` from the root folder.

Most changes are removing trailing spaces from comments.

Haven't really done any manual testing, since I haven't done any code changes manually. `yarn test` runs fine, `yarn flow` runs fine, `yarn prettier` is satisfied.

N/A

[INTERNAL][MINOR][] - Fix ESLint warnings
Closes https://github.com/facebook/react-native/pull/18047

Differential Revision: D7054948

Pulled By: hramos

fbshipit-source-id: d53e692698d1687de5821c3fb5cdb76a5e03b71e
2018-02-22 07:23:17 -08:00
Maël Nison 13ee1b5920 Uses Yargs instead of Command
Summary: This diff allows Metro to throw an error when a configuration file cannot be found, by using a new strict: true option.

Reviewed By: rafeca

Differential Revision: D6998613

fbshipit-source-id: b704633be18d5c007f1a022fa811d0a74c636fc9
2018-02-22 06:08:22 -08:00
Jean Lauliac 4454fdc219 fix Flow typing for OSS
Summary:
Add ignores for these requires, some of them mistakenly removed by da3424c929.

```
yarn flow
```

CircleCI should be green again.
Closes https://github.com/facebook/react-native/pull/18021

Differential Revision: D7025304

Pulled By: jeanlauliac

fbshipit-source-id: 731232093ae3ab39b3eff6fb2004ff4e7090d5ae
2018-02-19 10:41:33 -08:00
Tadeu Valentt 54dc11a5fb Fix #17610, Add fixtures to metro blacklist
Summary:
Include a default blacklist into the build settings to prevent
processing of incorrect fixture files by Metro.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Fix #17610 issue, preventing metro from processing fixture files

1. Have a working demo
2. Install https://github.com/oblador/react-native-vector-icons
3. Use in a component
4. Start the app
5. The app starts successfully and display the icons

[ GENERAL  ]  [ BUGFIX ]  [local-cli/util/Config.js] - Add default file blacklist
Closes https://github.com/facebook/react-native/pull/17672

Differential Revision: D7014627

Pulled By: hramos

fbshipit-source-id: 20974e6fdd0977eeeb1048c29c9d621c803c26e9
2018-02-16 20:48:15 -08:00
Caleb Meredith da3424c929 @allow-large-files Upgrade xplat/js to Flow v0.66
Reviewed By: gabelevi

Differential Revision: D7016717

fbshipit-source-id: 2bd2fd67074ba5d405ecd63a1aeb37354f8634c9
2018-02-16 20:24:57 -08:00
Sophie Alpert 26684cf3ad Update to MIT license
Summary: Manual changes.

Reviewed By: TheSavior, yungsters

Differential Revision: D7012152

fbshipit-source-id: de7459be3db13c687868b45059856f125c4f2eb1
2018-02-16 18:31:53 -08:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Alexander Chernoshej 5447ca6707 Change irrelevant Products path in ./local-cli/runIOS/runIOS.js
Summary:
https://github.com/facebook/react-native/issues/7308
and many of the same

Seems like xcode cli tool isn't create ./build directory any more but place Products
right inside ./Build (may check while creating single view ios application
in XCode)

* edit hardcoded path to {appName}.app

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Command `$ react-native run-ios` is often lead to `Entry, ":CFBundleIdentifier", Does Not Exist`
I find out how to fix it in current version of RN and Xcode cli tools

Just try to do `$ react native init {appName}` and then `$ react native run-ios` if everything fine it means my approach is right :)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17963

Differential Revision: D7014984

Pulled By: hramos

fbshipit-source-id: da62f130e6ebf7d3acd09d36525838d5c9684e75
2018-02-16 14:36:56 -08:00
aneophyte 21231084db Exclude jsbundle files from VCS
Summary:
jsbundle files can be generated, and are quite large and therefore, I think should be excluded from being committed to the repo.

[ GENERAL ][ MINOR ][local-cli/templates/_gitignore] - Included a new entry to ignore jsbundle files
Closes https://github.com/facebook/react-native/pull/17888

Differential Revision: D6977064

Pulled By: hramos

fbshipit-source-id: 9c7803004f3f4ec59cba3017213f68fba8225dbf
2018-02-16 14:09:28 -08:00
Andres Suarez 59401f89c1 Fold .eslintrc's into the root eslintrc
Reviewed By: TheSavior

Differential Revision: D6997050

fbshipit-source-id: 81e45d24343cca8336adb0de43bd766899ff03b6
2018-02-15 07:53:52 -08:00
Rafael Oleza 828cd78866 Pass cacheVersion param via the new API
Reviewed By: BYK

Differential Revision: D6980337

fbshipit-source-id: 72c01136b6720390ffec8593f0375c8756dc1d4a
2018-02-14 09:09:59 -08:00
Rafael Oleza 96ec2dcb71 Fix enableBabelRCLookup option in new CLI + global cache script
Reviewed By: BYK

Differential Revision: D6977885

fbshipit-source-id: 50245e046c7639f9fb4022a9cc5974d50831524c
2018-02-14 09:09:59 -08:00
Johan Ruokangas f8fee0a631 Pass port when running on device (fix #17973)
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Building for iOS device `react-native run-ios --device [id]` fails since port is not passed. This is a blocker for us and prevents us from updating to latest React Native stable.

I've tested this in our app and also in fresh app using RN master and verified that it works.

None.

[CLI] [BUGFIX] [local-cli/runIOS/runIOS.js] - Pass metro port when running on device
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17983

Differential Revision: D6988299

Pulled By: hramos

fbshipit-source-id: 5169706600f87f13b9c9c105eb7d6db7a40194f1
2018-02-14 08:17:35 -08:00
Eric Rozell 1673c570f9 Uses a single code path to link and unlink all platforms
Summary:
This commit removes special cases for linking iOS and Android platforms.

A previous commit opened up link and other commands for other platforms to provide their own behaviors. It left special cases in tact for iOS and Android. This PR removes the special case.

- Added jest tests related to the link command.
- Ran the `link` and `unlink` commands for iOS and Android and confirmed no changes.

https://github.com/facebook/react-native/pull/17745

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI][FEATURE][local-cli/link/link.js] - Removes special cases for linking in iOS and Android.
Closes https://github.com/facebook/react-native/pull/17961

Differential Revision: D6975951

Pulled By: hramos

fbshipit-source-id: 8dd5da35619e2124ce4b3b18db8b694757792363
2018-02-13 05:06:42 -08:00
Andres Suarez 488b6825c5 Namespace custom ESLint rules through eslint-plugin-lint
Reviewed By: mzlee

Differential Revision: D6934651

fbshipit-source-id: 3cb0c3550ad628e3b5c0bdaec8cde9d5579ea0af
2018-02-09 11:16:47 -08:00
Héctor Ramos 4f883bd0bc Restore copyright header
Summary:
Restoring the copyright header on some files, in order to fix an internal lint failure that is raised whenever these files are edited on open source.
Closes https://github.com/facebook/react-native/pull/17912

Differential Revision: D6938189

Pulled By: hramos

fbshipit-source-id: 6447d8ad6d7ecce0ef5f1821f63e44957bbf6d15
2018-02-08 17:52:11 -08:00
Brian Vaughn 6f007e8957 Ran rename-unsafe-lifecycles codemod on xplat/js
Reviewed By: trueadm

Differential Revision: D6889214

fbshipit-source-id: e815cda4b09f3650ae3b0b9a44ae6f5fcb48fe25
2018-02-08 10:58:31 -08:00
Eric Rozell a40bfa730e Enable platforms to configure CLI commands
Summary:
This change adds hooks via the `package.json` for a platform plugin to specify hooks for generating platform configurations. This change also adds hooks to allow platform plugins to participate in `link` and `unlink` commands. The goal is to move platform-specific code for platform plugins into their own repositories / node_modules.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

We need to be able to configure the CLI commands for plugin platforms (e.g., react-native-windows) in their own repositories.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

- All jest tests, including new tests, pass.
- `link` and `unlink` commands are successful on iOS and Android.

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

https://github.com/Microsoft/react-native-windows/pull/1601

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI][FEATURE][local-cli/core/index.js] - Allow platform plugins to contribute to the RNConfig.
[CLI][FEATURE][local-cli/link/link.js] - Allow platform plugins to participate in the `link` command.
[CLI][FEATURE][local-cli/link/unlink.js] - Allow platform plugins to participate in the `unlink` command.
Closes https://github.com/facebook/react-native/pull/17745

Differential Revision: D6883558

Pulled By: hramos

fbshipit-source-id: ea32fe21cedd4cc02c5c0d48229f2cdb2ac8142b
2018-02-08 09:47:28 -08:00
Marshall Roch 7aba456b04 @allow-large-files [flow] upgrade to v0.65.0
Reviewed By: gabelevi

Differential Revision: D6927764

fbshipit-source-id: 1cb21c6bf27e12624c23387485b263ee8e77f5e0
2018-02-07 17:37:56 -08:00
Maël Nison 752427b7b8 Uses findMetroConfig and fetchMetroConfig in the internal RN cli
Reviewed By: davidaurelio

Differential Revision: D6819226

fbshipit-source-id: 6436855cc5dce9ce7922d89df99c3cb90abb095e
2018-02-02 05:05:36 -08:00
Douglas Lowder a63fd378a4 Link both iOS and tvOS libraries with react-native link (fix #13783)
Summary:
Fix issues with the react-native CLI when linking iOS and tvOS libraries to a project created with `react-native init`. (#13783)

Verified the changes against test project at https://github.com/dlowder-salesforce/react-native-link-test.  Both `react-native link react-native-svg` and `react-native unlink react-native-svg` work correctly on this project.  Added new unit test for the new file added to `local-cli/link/ios`.

[CLI] [BUGFIX] `react-native link` has been fixed to correctly link iOS and tvOS targets.
[IOS] [BUGFIX] `react-native link` has been fixed to correctly link iOS and tvOS targets.
Closes https://github.com/facebook/react-native/pull/17231

Differential Revision: D6837567

Pulled By: hramos

fbshipit-source-id: 234d3d3966ae1b89cd16a37c95d303553f7ba5f5
2018-01-30 16:28:59 -08:00
Bhuwan Khattar 619a8c9f29 Pass hasteImplModulePath to JestHasteMap and everywhere else
Reviewed By: jeanlauliac

Differential Revision: D6641294

fbshipit-source-id: 36ebec95e69fe920c6cc10addd96406521cb4b82
2018-01-30 11:30:54 -08:00
Tom Duncalf 3f969cb1db Add minify flag to react-native bundle command
Summary:
We have found that it is useful to work with production rather than dev bundles when working on e.g. performance and animation tuning.

For a larger app, `react-native bundle` with `--dev false` can get very slow due to minification - in our case, this was especially true of library code (e.g. the AWS SDK taking nearly 15 secs to minify on a top-spec MBP 15"). This is fine when just building every now and then, but when making frequent changes and rebuilding, it becomes quite painful.

Currently there is no way to perform a release (non-dev) build, with minification disabled. This PR adds an optional `--minify` flag to enable developers to disable minification, reducing build times significantly for our use case.

Checked output bundle size, to ensure behaviour stays the same as the existing default when `--minify` is not specified, and that the `minify` flag gets passed through to Metro bundler correctly if specified.

N/A

[GENERAL] [ENHANCEMENT] [Bundler] - Added optional --minify flag to bundler
Closes https://github.com/facebook/react-native/pull/17702

Differential Revision: D6806356

Pulled By: shergin

fbshipit-source-id: c466a2dea692561f8b2002118662c3affc71b991
2018-01-30 00:42:54 -08:00
Joey Jiron afd988f85a fixed issue with runIOS not being able to launch tvOS app
Summary:
Yes.

Yes

Environment:
OS: MacOS X 10.12.6 (16G29)
Node: 8.9.4
Yarn: N/A
npm: 5.4.2
Watchman: Not Found
Xcode: 9.2 (9C40b)
Android Studio: N/A

[CLI iOS runIOS] When using `react-native-cli` to try to launch the tvOS scheme the user get's an error because the current implementation for launching simulators ignores any simulator/device who's name does not start with `iOS`

StackOverflow issue also found here :  https://stackoverflow.com/questions/48069690/how-to-select-project-to-run-tvos-version-with-npm-start

Actual command line steps
```
$npm i -g react-native-cli
...
$react-native init CoolProject
...
$cd CoolProject/
$react-native run-ios --simulator "Apple TV"  --scheme "CoolProject-tvOS"

Scanning folders for symlinks in /Users/jjiron/CoolProject/node_modules (7ms)
Found Xcode project CoolProject.xcodeproj
CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo'

Could not find Apple TV simulator
```

The cli tool should launch the tvOS application on the simulator.

The user get's an error message saying "Could not find Apple TV simulator"

Don't ignore appletv simulators when looking for simulators to launch. Also use the correct application build when selecting which app to launch on the simulator/device.

Added automated test for `findMatchingSimulator.js` to allow tvOS simulators

[react-native-cli] Fixed issue where you cannot launch tvOS app on Apple TV simulator
Closes https://github.com/facebook/react-native/pull/17660

Differential Revision: D6806327

Pulled By: hramos

fbshipit-source-id: 1a4f37058f3c5d8223012a3e4050e7bbfaafa6c4
2018-01-29 13:48:13 -08:00
Nico 29f8354c19 Prevents JS Debugger issues with CORS
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

See #17618

On certain networks, `xip.io` is used, but as the debugger will always using localhost a change upstream has resulted in a CORS issue (see screenshots in #17618). This change ensures that the debugger will always open with whatever configuration.

> This should be merged in as a patch of `0.52.x` as it affects current release, and `0.51.x` didn't have this issue.

Tested locally, could do with the people having the same issue in #17618 testing it out prior to merging.

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI] [BUGFIX] [local-cli/server/middleware/getDevToolsMiddleware.js] - Prevents JS Debugger issues with CORS
Closes https://github.com/facebook/react-native/pull/17720

Differential Revision: D6828205

Pulled By: hramos

fbshipit-source-id: 7e5d43db9faf7edc9444ba4214aca1a18e25dbd2
2018-01-27 02:36:12 -08:00
Avik Chaudhuri 298f3bb69a @allow-large-files flow 0.64 release
Reviewed By: gabelevi

Differential Revision: D6800250

fbshipit-source-id: 7c0902526cce77eb6931856ac24a0560c4fbbc88
2018-01-24 17:03:41 -08:00
gengjiawen d7a9ca2893 Remove redundant config in AndroidManifest.xml
Summary:
* remove redundant version code, name, miniSdk, targetSdk, they now are configed in build.gradle
* allowbackup = true is not a secure config

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Clean up redundant config and remove security risk config.

test android template still works.

none

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/17596

Differential Revision: D6768292

Pulled By: hramos

fbshipit-source-id: 9f32f17aebb9c1857d8b64d6687efe7c22e7bc79
2018-01-20 10:44:24 -08:00
Rafael Oleza 8c6b816caa Allow to attach the HMR server to an external http server
Reviewed By: BYK

Differential Revision: D6752279

fbshipit-source-id: 250255a3b1226f8aab6054e507cb3910cdcd6a85
2018-01-19 08:13:54 -08:00
Jean Lauliac b5e19adc02 metro: allow dynamic dependencies from within node_modules
Summary: Tries to adress https://github.com/facebook/metro/issues/65. We need a reasonnable workaround to support modules like `moment.js` that do dynamic requires but only in some cases. By replacing the call by a function that throws, we move the exception at runtime instead of happening at compile time. We don't want to do that for non-node_modules file because they are fixable directly, while `node_modules` are not fixable by people and they get completely blocked by the error at compile time.

Reviewed By: rafeca

Differential Revision: D6736989

fbshipit-source-id: a6e1fd9b56fa83907400884efd8f8594018b7c37
2018-01-18 08:09:02 -08:00
Rafael Oleza 709ede799c Upgrade connect dependency
Reviewed By: cpojer

Differential Revision: D6732727

fbshipit-source-id: 80181ef184c90e3312789579034d70e2c3bcbf98
2018-01-17 03:32:19 -08:00
Semen Zhydenko d2c569795c Typos in comments and log messages
Summary:
No code changes, no testing required.

alligned -> aligned
allignment -> alignment
completly -> completely
conseptually -> conceptually
decendents -> descendants
indefinetly -> indefinitely
dimention -> dimension
doesnt -> doesn't
safegaurd -> safeguard
intialization -> initialization
hierachy -> hierarchy
happend -> happened
gaurd -> guard
programatically -> programmatically
initalized -> initialized
immidiately -> immediately
occured -> occurred
unkown -> unknown
neccessary -> necessary
neccesarily -> necessarily
occuring -> occurring
comoponent -> component
propogate -> propagate
recieved -> received
referece -> reference
perfomance -> performance
recieving -> receiving
subsquently -> subsequently
scoll -> scroll
suprisingly -> surprisingly
targetting -> targeting
tranform -> transform
symetrical -> symmetrical
wtih -> with
Closes https://github.com/facebook/react-native/pull/17578

Differential Revision: D6718791

Pulled By: shergin

fbshipit-source-id: 4ab79c1131ec5971d35a0c7199eba7ec0a0918ad
2018-01-12 22:18:45 -08:00
Peter van der Zee bbbc18c4ee Remove unused `packagerInstance` option and rename it to `server`
Reviewed By: rafeca

Differential Revision: D6435505

fbshipit-source-id: e1912f20be517be49648b0eeb52c53f66e3fae55
2018-01-12 06:31:27 -08:00
Eli White 11a495cb32 Fixing eslint-comments warnings
Reviewed By: yungsters

Differential Revision: D6678252

fbshipit-source-id: ee93b7ee52520b750ca11fcc625cccf3cd82d075
2018-01-08 17:04:29 -08:00
glevi@fb.com 6b95c4fb14 @allow-large-files [Flow] Upgrade xplat/js to flow v0.63
Reviewed By: samwgoldman

Differential Revision: D6675320

fbshipit-source-id: 85575a6f30a50a3c40c6b46ba36f8cd33c091b1d
2018-01-08 12:49:53 -08:00
Michael S. Kazmier 33d710e8c5 adds --port option to `react-native run-ios` as well as patches port …
Summary:
The pull request adds the `--port` option to `run-ios` allowing a developer to build and launch a react-native app using a single command line like this:
```
react-native run-ios --port 8088
```

It defaults to the current port 8081.

This pull request fixes issue #9145 and issue #14113.

This patch also extends `run-android` to properly test and launch the packager with the specified port, extending the work done in PR:  ##15316

1. Create a new react-native app, or simply clone this branch and then update your version of react-native using `yarn add file:./path/to/this/fork/of/react-native`
2. run `react-native run-ios --port 8088`
3. watch the packager start on the desired port (8088 in this case) and watch your app in your simulator connect to the packager and launch the app.
Closes https://github.com/facebook/react-native/pull/16172

Differential Revision: D6612534

Pulled By: shergin

fbshipit-source-id: 50af449f5e4c32fb76ba95f4cb7bf179e35526d5
2018-01-04 20:11:10 -08:00
Rafael Oleza 4a1bb8fe8d Do not set minify=true when calculating the list of dependencies
Reviewed By: davidaurelio

Differential Revision: D6633160

fbshipit-source-id: ce45cae413959c232cb18b4b5ad51f04a52410a4
2017-12-23 09:16:30 -08:00
Mack Solomon 6661633390 use working getting started url
Summary:
android-setup.html does not seem to exist.
https://facebook.github.io/react-native/docs/android-setup.html (404)
Closes https://github.com/facebook/react-native/pull/17324

Differential Revision: D6630732

Pulled By: hramos

fbshipit-source-id: c1bd4750e3b72a0b1542a75f50d404807eabb8f1
2017-12-22 15:32:42 -08:00
Héctor Ramos 4e767013ed Fix buck failures on master
Summary:
WIP.
Closes https://github.com/facebook/react-native/pull/17295

Differential Revision: D6628523

Pulled By: hramos

fbshipit-source-id: ac2833e99de9e94340b8027469cc74a5b7379962
2017-12-22 11:30:26 -08:00
Héctor Ramos 4216cdef13 Do not use Node 8.x specific Stream.final
Summary:
grabbou: "This has been recently added to Node 8.x. Since it makes our tests to fail, I decided to
do a workaround that works for all the versions."

Originally patched in `0.52-stable` by grabbou

Fixes Node 6 JavaScript tests.
Closes https://github.com/facebook/react-native/pull/17298

Differential Revision: D6616521

Pulled By: hramos

fbshipit-source-id: 7256450d824a60a14006af7a68191222b3a5041a
2017-12-20 16:48:25 -08:00
Héctor Ramos 9b147a53d1 Clarify use of Flow props types in cli example
Summary:
This was introduced as part of a codemod a few months back. Hopefully this edit makes the example code clearer.
Closes https://github.com/facebook/react-native/pull/17189

Differential Revision: D6613378

Pulled By: hramos

fbshipit-source-id: da7263b3ce2b5c45d6e312807c88743fe10cd15d
2017-12-20 12:32:03 -08:00
Peter van der Zee 7a5d5a4035 Move formatBanner to metro-core
Reviewed By: rafeca

Differential Revision: D6555773

fbshipit-source-id: 9d10a3d03c88eeaa2d6845518da3dacab8b556b0
2017-12-15 06:36:00 -08:00
Peter van der Zee 29dafa1a86 Move Terminal to metro-core
Reviewed By: rafeca

Differential Revision: D6532920

fbshipit-source-id: d1463aa0759a6b6d5cc46b05157518a4ce3eb9bf
2017-12-15 06:36:00 -08:00
Héctor Ramos f4d627c8fa Fix failure due to missing Metro flow types
Summary:
Fixes the Flow failure due to an undefined Ast type.

Before:

```
 $ npm run flow -- check

> react-native@1000.0.0 flow /Users/hramos/git/react-native
> flow "check"

Error: local-cli/__tests__/fs-mock-test.js:27
 27:   beforeEach(() => {
       ^^^^^^^^^^ beforeEach. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:53
 53:       expect(content).toEqual('beep');
           ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:88
 88:         expect(content).toEqual('hello, world!');
             ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:100
100:       expect(content).toEqual('hello, world!');
           ^^^^^^ expect. Could not resolve name

Error: node_modules/metro/src/Bundler/util.js.flow:46
 46: ): Ast {
        ^^^ Ast. Could not resolve name

Error: node_modules/metro/src/ModuleGraph/worker/collect-dependencies.js.flow:283
283: const xp = (module.exports = (ast: Ast) =>
                                        ^^^ Ast. Could not resolve name

Error: node_modules/metro/src/assetTransformer.js.flow:29
 29: ): Promise<{ast: Ast}> {
                      ^^^ Ast. Could not resolve name
```

After

```
$ npm run flow -- check

> react-native@1000.0.0 flow /Users/hramos/git/react-native
> flow "check"

Error: local-cli/__tests__/fs-mock-test.js:27
 27:   beforeEach(() => {
       ^^^^^^^^^^ beforeEach. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:53
 53:       expect(content).toEqual('beep');
           ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:88
 88:         expect(content).toEqual('hello, world!');
             ^^^^^^ expect. Could not resolve name

Error: local-cli/__tests__/fs-mock-test.js:100
100:       expect(content).toEqual('hello, world!');
           ^^^^^^ expect. Could not resolve name
```

[ GENERAL ] [ BUGFIX] [ .flowconfig ] - Have Flow ignore Metro node_nodules
Closes https://github.com/facebook/react-native/pull/17187

Differential Revision: D6572303

Pulled By: hramos

fbshipit-source-id: aa256b9725970fcc2a6da6578c83e7c0875e3cfd
2017-12-14 15:19:08 -08:00
Nat Mote 914ae93336 Update to Flow v0.61.0
Reviewed By: gabelevi

Differential Revision: D6540122

fbshipit-source-id: 0ded15d3b368555d12c693feb4bf491bd9092355
2017-12-12 11:00:13 -08:00
Jean Lauliac ecec4319c4 metro-buck: add e2e testing of command
Reviewed By: davidaurelio

Differential Revision: D6533842

fbshipit-source-id: b641559eb3085bac57ab3a1cc80a3f2f86b7ec92
2017-12-11 11:18:52 -08:00
Adam Ernst 9f33fe2583 Upgrade to 1.9.1
Reviewed By: vjeux

Differential Revision: D6497877

fbshipit-source-id: 3b88b96e375ddf1fbe039a0593569bbdde40a2dc
2017-12-06 17:34:26 -08:00
Marshall Roch c8e72bb8b8 @allow-large-files [flow] deploy flow 0.60
Reviewed By: gabelevi

Differential Revision: D6466441

fbshipit-source-id: c51eeb53a2465498ad77b3865b5f8c03758d1d35
2017-12-04 13:31:21 -08:00
Sean Ballew ca106043fc Fix local-cli's installedGlobally check to work on Windows platforms
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

The react-native local-cli does a check to see if it is being run from a global install or not. If running from a global install, an error is printed and the CLI exits.

This check for a global install does not work on Windows. The check of `process.argv` does not contain the expected `node_modules/.bin/react-native`. It instead contains a direct path to the `wrong-react-native.js` file, as determined by the `node_modules/.bin/react-native.cmd` entry point.

This update will, on Windows platforms, do a global check by instead looking for the existence of a package.json above the node_modules. If not found, we assume a global install and print the error.

In a react-native project, I originally tried running the local react-native cli:

```
> yarn react-native --version
yarn run v1.3.2
$ E:\myproject\node_modules\.bin\react-native --version
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

I replaced the `wrong-react-native.js` with the modified version and reran the command:

```
> yarn react-native --version
yarn run v1.3.2
$ E:\myproject\node_modules\.bin\react-native --version
Scanning folders for symlinks in E:\myproject\node_modules (93ms)
0.50.3
Done in 1.86s.
```

<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAL  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->

[CLI] [BUGFIX] [local-cli/wrong-react-native.js] - Updated local-cli on Windows to check for the absence of a package.json file to determine if being run from a global installation or not.
Closes https://github.com/facebook/react-native/pull/17036

Differential Revision: D6471925

Pulled By: TheSavior

fbshipit-source-id: cc5560d1c102d05f378e5ae537f13d31b5343045
2017-12-04 11:17:10 -08:00
ashoat 343c5a97a0 Tell template app .flowconfig to look for .native.js files
Summary:
`metro-bundler` looks for `.native.js` files ([see here](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js#L458)). Packages such as `react-navigation` rely on this functionality ([see here](https://github.com/react-community/react-navigation/blob/master/src/PlatformHelpers.native.js)). This PR makes it so you can `react-native init`, `yarn add react-navigation`, and `flow` successfully!

1. `react-native init`
2. `yarn add react-navigation`
3. `flow`

[CLI] [MINOR] [Flow] - Tell template app .flowconfig to look for .native.js files
Closes https://github.com/facebook/react-native/pull/16816

Differential Revision: D6445363

Pulled By: shergin

fbshipit-source-id: c0ce7ed27a8a3291deaa09d98e822362f93929c8
2017-11-29 22:01:28 -08:00
Eli White 240039c6f2 Remove $FixMe flow suppression
Reviewed By: sahrens, kassens

Differential Revision: D6426829

fbshipit-source-id: b10e33117cf4adf6bb39fc95a9ffa1e268e7c835
2017-11-29 15:57:14 -08:00
Peter van der Zee aba148f733 Rename ReactPackager -> Metro
Reviewed By: cpojer

Differential Revision: D6435801

fbshipit-source-id: b8fae475040a64b62a73fbf337cafdaa637cbdef
2017-11-29 07:00:52 -08:00
Christoph Nakazawa 0091496891 Export Config/defaults on Metro's main module
Reviewed By: arcanis

Differential Revision: D6435529

fbshipit-source-id: a9549dc5900025fcc798ccb92b49e96c982c2e1e
2017-11-29 04:45:47 -08:00
Christoph Nakazawa 654fed46f4 Rename metro-bundler to metro
Reviewed By: davidaurelio

Differential Revision: D6413420

fbshipit-source-id: f13184b8157de2c3aeaa7f2647becc175f62cdbb
2017-11-29 03:35:29 -08:00
Peter van der Zee ae517307e7 Add a bundle type to logger output and type
Reviewed By: rafeca

Differential Revision: D6405599

fbshipit-source-id: 2f3da971d55fae28fbd94ed9f60d3bc2be176d6a
2017-11-28 04:46:25 -08:00
Jean Lauliac 7d969a05de packager-worker-for-buck: bundleCommand-test.js: add more consistency
Reviewed By: davidaurelio

Differential Revision: D6395673

fbshipit-source-id: 24516bd456a231708891e789f1d5aa5c18f4eeca
2017-11-23 03:16:19 -08:00
Jean Lauliac 7fd5aa84a1 packager-worker-for-buck: refactor and fix source map output
Reviewed By: davidaurelio

Differential Revision: D6385199

fbshipit-source-id: f104f7b000dde131b57b671d14d4ec4e0d30d7a2
2017-11-22 05:22:21 -08:00
Rafael Oleza 6d92046c56 Fix dependencies script when its running with dev=false
Reviewed By: alp

Differential Revision: D6307190

fbshipit-source-id: 21f339ff9c24d58df2630cd6b957e7539880f001
2017-11-11 07:18:37 -08:00
Caleb Meredith eb0d6470e5 Flow 0.59 xplat/js deploy
Reviewed By: avikchaudhuri

Differential Revision: D6300238

fbshipit-source-id: a6839fa2a9bbc50c3832a3f5b1cac2a6d2bd96b7
2017-11-10 21:15:48 -08:00
Douglas 45185947ee Fix tvOS compile issues; enable TVEventHandler in Modal (fix #15389)
Summary:
**Motivation**

Fix an issue (#15389) where `TVEventHandler` would not work when a modal was visible.  The solution adds the gesture recognizers from the native `RCTTVRemoteHandler` to the native modal view (except for the menu button recognizer, which still needs special handling in modals).  This PR also fixes some breakages in compiling React Native for tvOS.

**Test plan**

Compilation fixes should enable tvOS compile test to pass in Travis CI.

The modal fix can be tested with the following component, modified from the original source in #15389 .

``` javascript
import React, { Component } from 'react';
import ReactNative from 'ReactNative';
import {
    Text,
    View,
    StyleSheet,
    TouchableHighlight,
    TVEventHandler,
    Modal,
} from 'react-native';

export default class Events extends Component {

    constructor(props) {
        super(props);

        this.state = {
            modalVisible: false,
        };
        this._tvEventHandler = new TVEventHandler();
    }

    _enableTVEventHandler() {
        this._tvEventHandler.enable(this, (cmp, evt) => {
            const myTag = ReactNative.findNodeHandle(cmp);
            console.log('Event.js TVEventHandler: ', evt.eventType);
            // if (evt.eventType !== 'blur' && evt.eventType !== 'focus') {
            //  console.log('Event.js TVEventHandler: ', evt.eventType);
            // }
        });
    }

    _disableTVEventHandler() {
        if (this._tvEventHandler) {
            this._tvEventHandler.disable();
            delete this._tvEventHandler;
        }
    }

    componentDidMount() {
        this._enableTVEventHandler();
    }

    componentWillUnmount() {
        this._disableTVEventHandler();
    }

    _renderRow() {
        return (
            <View style={styles.row}>
                {
                    Array.from({ length: 7 }).map((_, index) => {
                        return (
                            <TouchableHighlight
                                key={index}
                                onPress={() => { this.setState({ modalVisible: !this.state.modalVisible }); }}
                            >
                                <View style={styles.item}>
                                    <Text style={styles.itemText}>{ index }</Text>
                                </View>
                            </TouchableHighlight>
                        );
                    })
                }
            </View>
        );
    }

    onTVEvent(cmp, evt) {
      console.log('Modal.js TVEventHandler: ', evt.eventType);
    }

    hideModal() {
      this.setState({
        modalVisible: false
      });
    }

    render() {
        return (
            <View style={styles.container}>
                <Modal visible={this.state.modalVisible}
                       onRequestClose={() => this.hideModal()}>
                    <View style={styles.modal}>
                        { this._renderRow() }
                        { this._renderRow() }
                    </View>
                </Modal>
                { this._renderRow() }
                { this._renderRow() }
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: 'darkslategrey',
    },
    row: {
        flexDirection: 'row',
        padding: 30,
    },
    item: {
        width: 200,
        height: 100,
        borderColor: 'cyan',
        borderWidth: 2,
        margin: 30,
        alignItems: 'center',
        justifyContent: 'center',
    },
    itemText: {
        fontSize: 40,
        color: 'cyan',
    },
    modal: {
        flex: 1,
        backgroundColor: 'steelblue',
    },
});
```
**Release Notes**

After this change, the `onRequestClose` property will be required for a `Modal` in Apple TV.
Closes https://github.com/facebook/react-native/pull/16076

Differential Revision: D6288801

Pulled By: hramos

fbshipit-source-id: 446ae94a060387324aa9e528bd93cdabc9b5b37f
2017-11-09 13:54:54 -08:00
Rafael Oleza e9393f694d Remove old bundler code from Server class
Reviewed By: mjesun

Differential Revision: D6255868

fbshipit-source-id: 74695129199c8be43e13c97f2ae2ca2c03b801eb
2017-11-08 12:41:41 -08:00
Rafael Oleza 0bbd9f042a BREAKING: Bump metro-bundler to v0.21.0
Summary:
`metro-bundler` v0.21 contains a rewritten bundling mechanism, with simplified logic and much faster rebuild times, called delta bundler. This release contains a couple of breaking changes:

* Now, when using a custom transformer, the list of additional babel plugins to apply are passed to the `transform()` method. These are used in non-dev mode for optimization purposes (Check 367a5f5db8 (diff-40653f0c822ac59a5af13d5b4ab31d84) to see how to handle them from the transformer).
* Now, when using a custom transformer outputting `rawMappings`, the transformer does not need to call the `compactMappings` method before returning (check d74685fd1d (diff-40653f0c822ac59a5af13d5b4ab31d84) for more info).
* We've removed support for two config parameters: `postProcessModules` and `postProcessBundleSourcemap`.

Reviewed By: davidaurelio

Differential Revision: D6186035

fbshipit-source-id: 242c5c2a954c6b9b6f339d345f888eaa44704579
2017-11-08 09:16:30 -08:00
Jean Lauliac 503b4521a6 metro-bundler: allow different run-before-main-module depending on entry point
Reviewed By: davidaurelio

Differential Revision: D6248242

fbshipit-source-id: 9471820fce926e676170e3024bd48c9d7335c1a7
2017-11-07 07:43:46 -08:00
Jean Lauliac 73a01be9bc packager-worker-for-buck: transformCommand: add test
Reviewed By: davidaurelio

Differential Revision: D6232002

fbshipit-source-id: 8bdd0dd0dabff4b92b4c2d7b4c3f7a2d90723bee
2017-11-06 03:46:35 -08:00
Nicolas Feignon 758111a706 Fix launchChrome for chromium on Ubuntu
Summary:
On Ubuntu (and maybe other distros), the executable for the chromium browser is 'chromium-browser' instead of 'chromium'.
This commit calls 'chromium-browser' before calling 'chromium' if it exists.

Start an example app on Android with "react-native init project && react-native run-android". Open DevTools: it opens chromium correctly.

[CLI] [BUGFIX] [local-cli/server/utils/launchChrome.js] - Fix launchChrome for chromium on Ubuntu
Closes https://github.com/facebook/react-native/pull/16658

Differential Revision: D6241686

Pulled By: hramos

fbshipit-source-id: 5cd435c3c42c29f0916679298e62e7a323468e37
2017-11-04 12:02:09 -07:00
Miguel Jimenez Esun a75fef48bf Add code for generating remote assets
Reviewed By: davidaurelio

Differential Revision: D6201839

fbshipit-source-id: 78c81eae03c6137ba9bbe33cd7aab8b87020f8d2
2017-11-03 06:15:15 -07:00
Avik Chaudhuri a48da14800 @allow-large-files Flow 0.58 upgrade for xplat/js
Reviewed By: yungsters

Differential Revision: D6219339

fbshipit-source-id: f003111500ef5971b9a95f26d43cee6644c16abe
2017-11-02 10:51:14 -07:00
Miguel Jimenez Esun 834b9d4e6e Adding @email tags to most of the tests
Reviewed By: rafeca

Differential Revision: D6185623

fbshipit-source-id: 30df83288fe85516d8d5a1617a4fb8fea826ed6f
2017-11-02 06:25:03 -07:00
Rafael Oleza 01b941927c Update shared/output modules to accept the output from the Delta Bundler
Reviewed By: davidaurelio

Differential Revision: D6186386

fbshipit-source-id: 6160f5a02891dbfb56c6350239703ace91e53690
2017-10-31 10:23:20 -07:00
Miguel Jimenez Esun bba46bcb37 Backed out changeset c188b39e104f
Reviewed By: fkgozali

Differential Revision: D6111799

fbshipit-source-id: 34213f79135fb605aa2af60182cc1182b10aa602
2017-10-20 12:32:37 -07:00
Miguel Jimenez Esun 90369808ee Support for remote assets
Reviewed By: davidaurelio

Differential Revision: D6030886

fbshipit-source-id: c188b39e104f5c3f65a98336fecbffc93091ff4c
2017-10-19 18:46:37 -07:00
Miron Pawlik 74146cb315 Make `react-native link` play nicely with CocoaPods-based iOS projects.
Summary:
The core React Native codebase already has full support for CocoaPods. However, `react-native link` doesn’t play nicely with CocoaPods, so installing third-party libs from the RN ecosystem is really hard.

This change will allow to link projects that contains its own `.podspec` file to CocoaPods-based projects. In case `link` detect `Podfile` in `iOS` directory, it will look for related `.podspec` file in linked project directory, and add it to `Podfile`. If `Podfile` and `.podspec` files are not present, it will fall back to previous implementation.

**Test Plan**
1. Build a React Native project where the iOS part uses CocoaPods to manage its dependencies. The most common scenario here is to have React Native be a Pod dependency, among others.
2. Install a RN-related library, that contains `.podspec` file, with `react-native link` (as an example it could be: [react-native-maps](https://github.com/airbnb/react-native-maps)
3. Building the resulting iOS workspace should succeed (and there should be new entry in `Podfile`)
Closes https://github.com/facebook/react-native/pull/15460

Differential Revision: D6078649

Pulled By: hramos

fbshipit-source-id: 9651085875892fd66299563ca0e42fb2bcc00825
2017-10-17 21:35:47 -07:00
Yamagishi Kazutoshi d980632233 Change indentation of package.json including Jest to 2 spaces
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.

<!-- What existing problem does the pull request solve? -->

Indentation of package.json including Jest is a hard tab. Since package.json generated by npm has two spaces, I want to make it the same.

<!--
A good test plan has the exact commands you ran and their output, provides screenshots or videos if t[he pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.

If you have added code that should be tested, add tests.
-->

![package.json diff](https://cloud.githubusercontent.com/assets/12539/24228268/80421416-0fb6-11e7-9af3-d034c1756379.png)

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/13099

Differential Revision: D4770208

Pulled By: ericnakagawa

fbshipit-source-id: 13f91068e40610473cd7b65e182a0fdc59af03ba
2017-10-15 10:50:20 -07:00
glevi@fb.com 720a99a890 @allow-large-files Deploy Flow v0.57.2
Reviewed By: samwgoldman

Differential Revision: D6058747

fbshipit-source-id: 8dd289a7156be82715abfd66755724e7d916c4e5
2017-10-13 21:46:08 -07:00
alejandro garcia 224d29447f Fixed navigation template
Summary:
- [x] Explain the **motivation** for making this change.

It fixes #14313
Closes https://github.com/facebook/react-native/pull/14495

Differential Revision: D6042094

Pulled By: hramos

fbshipit-source-id: d70e42bfee0a22882bad91cb885fb0cfc91c7d38
2017-10-12 11:44:20 -07:00
Alex Kotliarskyi cc86d12175 Android: put all non-drawable resources to `res/raw`
Summary: When we built packager asset system we were mostly concerned about images. However, this system can also be used to work with videos, animations and other binary resources. The code that sorts assets into Android resource folders currently just shoves all non-drawable resources under `drawable-mdpi`, which is not ideal. Talking to Android experts on the team, `raw` seems like a much better place for other resources.

Reviewed By: jeanlauliac

Differential Revision: D6026633

fbshipit-source-id: cc2199f60da411ea432972a02f52c459ff5c490a
2017-10-11 15:11:29 -07:00
Mike Grabowski 1f498010e8 Remove mockFs dependency
Summary:
This is first PR from the series I am going to be sending as a result of fixing 0.50-stable test suite. This one removes `mockFS` dependency that has been causing failures on Node 6.x container.

Here's build before this change: https://circleci.com/gh/facebook/react-native/22529
Here's build after this change: https://circleci.com/gh/facebook/react-native/22538 (green)

Note that the CI may be still red as there are other PRs to be addressed. You can see this in the wild on 0.50.
Closes https://github.com/facebook/react-native/pull/16301

Differential Revision: D6031352

Pulled By: hramos

fbshipit-source-id: 5c97ae6c87864c094e29e5d8987521071c67f5bd
2017-10-11 15:11:28 -07:00
Maxime Thirouin 78d570511a Remove unused variable in HelloNavigation example
Summary:
Because it's just unused :)
Closes https://github.com/facebook/react-native/pull/16294

Differential Revision: D6030121

Pulled By: ericnakagawa

fbshipit-source-id: c0e9ad75413cb2ab6fbf1b46517a033f36a627a7
2017-10-11 07:07:21 -07:00
Janic Duplessis 0cd69e8a02 Run eslint --fix
Summary:
CI is currently failing because of a lint issue, this fixes it and a bunch of other warnings that are auto-fixable.

**Test plan**
Quick manual test, cosmetic changes only.
Closes https://github.com/facebook/react-native/pull/16229

Differential Revision: D6009748

Pulled By: TheSavior

fbshipit-source-id: cabd44fed99dd90bd0b35626492719c139c89f34
2017-10-09 17:46:44 -07:00
Sam Goldman a16ef18a80 Upgrade Flow to v0.56.0
Reviewed By: calebmer

Differential Revision: D5958715

fbshipit-source-id: 7feda03a9540e69bf8d9b4eb89720248ff43294f
2017-10-02 21:11:05 -07:00
Jean Lauliac 53a339a459 RN buck: bundleCommand: add test for multiple bundles
Reviewed By: davidaurelio

Differential Revision: D5932971

fbshipit-source-id: 317e4503b87224cb3fa4ed7819b8af334d0b186b
2017-10-02 09:15:33 -07:00
Rafael Oleza 38ec30bc2e Fix error appearing when disconnecting HMR client
Reviewed By: cpojer

Differential Revision: D5944285

fbshipit-source-id: 5751f6ad2b999872aa3d33e1c7fca105b3156da4
2017-09-29 18:07:17 -07:00
Rafael Oleza a0e88c2a5b Add gating to the JS delta client on the remote debugger
Reviewed By: jeanlauliac

Differential Revision: D5940923

fbshipit-source-id: 1ef4cd52ef3567f2e726217636253802a2e6bb40
2017-09-29 13:32:02 -07:00
Jean Lauliac b3fc64285e metro-bundler: add fs#writeFileSync to the mock
Reviewed By: rafeca

Differential Revision: D5931412

fbshipit-source-id: 2b51617b57963c424446b04e9381e6500323af56
2017-09-29 10:24:14 -07:00
Rafael Oleza 15130d5fa2 Add Source Map support to e2e deltas in chrome debugger
Reviewed By: jeanlauliac

Differential Revision: D5917380

fbshipit-source-id: 31391bc03c420b8e7af5c840fbea2fb0dd5f7bbc
2017-09-29 05:45:38 -07:00
Rafael Oleza ace7273538 Add Delta Bundler client to JS remote debugger
Reviewed By: jeanlauliac

Differential Revision: D5899825

fbshipit-source-id: 9c5815ef234507034016becaabae754129b96c71
2017-09-29 05:45:38 -07:00
Rafael Oleza ee8aeddc52 Make Module.getName() synchronous
Reviewed By: cpojer

Differential Revision: D5911221

fbshipit-source-id: 2381d70008adff9e0f7613fe43c8fb562222acd6
2017-09-26 17:25:11 -07:00
esbenvb 43d394cb4b Updated support for WebStorm
Summary:
Added the executable path to the `COMMON_EDITORS`
Added the executable name to the arguments selections

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Need to be able to jump to specific files and line numbers in WebStorm and autodetect WebStorm as editor, without setting up any environment vars.

Start a new RN project in WebStorm, make some JS errors and click the errors to confirm that it will jump to the right file and line number in WebStorm.

Make sure that none of the other `COMMON_EDITORS` are running, unless you set the `REACT_EDITOR` environment variable.
Closes https://github.com/facebook/react-native/pull/15984

Differential Revision: D5911698

Pulled By: shergin

fbshipit-source-id: 54fced7539520553dd2a93bf7ca7e4f457b0bfc3
2017-09-26 15:03:52 -07:00
Rafael Oleza 34487c0591 Make the runBeforeMainModule config param to RN repo and make it absolute
Reviewed By: davidaurelio

Differential Revision: D5880700

fbshipit-source-id: 5df6781026030395900388c561283abadefa6511
2017-09-26 13:06:14 -07:00
Rafael Oleza e6596dc102 Move debugger client code to its own folder
Reviewed By: davidaurelio

Differential Revision: D5899764

fbshipit-source-id: 3498dd71a11b47841a492cf77df7c887404c1719
2017-09-26 05:17:40 -07:00
Rajesh Singh 979629504b Allow applicationId to be specified on build
Summary:
Added the ability to define a specific applicationId (in case it's different to the package name)

<details>
  Thanks for submitting a PR! Please read these instructions carefully:

  - [x] Explain the **motivation** for making this change.
  - [ ] Provide a **test plan** demonstrating that the code is solid.
  - [x] Match the **code formatting** of the rest of the codebase.
  - [x] Target the `master` branch, NOT a "stable" branch.

  Please read the [Contribution Guidelines](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md) to learn more about contributing to React Native.
</details>

We have a specific requirement that our package name differs from the applicationId but not in a way that allows us to add it as a suffix to our package name. I wanted to add the option to specify a specific applicationId.

`react-native run-android --appId <Specific Application Id>`
Closes https://github.com/facebook/react-native/pull/14524

Differential Revision: D5910259

Pulled By: shergin

fbshipit-source-id: 768fbc910f6b520dd18936f6bceeee136fca7025
2017-09-26 00:15:29 -07:00
Steven c1058b1e90 `react-native link` and `react-native unlink` update.
Summary:
1. Fix bug: Android project do not delete font files when run `react-native unlink`.
2. Add feature, link images to iOS project when run `react-native link`.
Closes https://github.com/facebook/react-native/pull/14801

Differential Revision: D5890051

Pulled By: hramos

fbshipit-source-id: 28223d181ac5ed51d70df29a56eb56b2cce9aecb
2017-09-22 05:46:38 -07:00
Andrew Hansen df8d0d1db9 use `uniqBy` for iteratee support
Summary:
I noticed `uniq` does not take a second parameter the way it's being used here. I think the function what was intended is [uniqBy](https://lodash.com/docs/4.17.4#uniqBy)
Closes https://github.com/facebook/react-native/pull/15615

Differential Revision: D5852155

Pulled By: hramos

fbshipit-source-id: 892d0bf7f24d30c24620350f698ffb416907ccc5
2017-09-18 02:45:32 -07:00
Christoph Nakazawa 2f78d19df2 Use the Config type from Metro
Reviewed By: davidaurelio

Differential Revision: D5832633

fbshipit-source-id: 8e4e0e6a2907e485a5627c87161af2d0672b4f56
2017-09-15 05:00:10 -07:00
Adam Miskiewicz 39f83c4a12 Refactor how symlinks are discovered in local-cli, support scoped modules
Summary:
This PR refactors the symlink finding logic in local-cli in order to support nested symlinked modules as well as symlinked scoped NPM modules.

Run tests, or try project with `npm link`'ed or `yarn link`'ed dependencies.
Closes https://github.com/facebook/react-native/pull/15776

Reviewed By: cpojer

Differential Revision: D5823008

Pulled By: jeanlauliac

fbshipit-source-id: f2daeceef37bed2f8a136a0a5918730f9832884c
2017-09-14 04:31:57 -07:00
Stepan Hruda 9731b58879 Add missing Contents.json, delete files that shouldn't be in .xcassets
Reviewed By: dinhviethoa

Differential Revision: D5802851

fbshipit-source-id: 78e4b375bd0a0ed48d30bfb7fc746de6a2bd999e
2017-09-12 22:45:33 -07:00
Christoph Nakazawa 12eb04b236 Branding: "packager" -> "Metro Bundler"
Summary:
This diff renames all the stragglers in comments and strings from variations of "packager" to "Metro Bundler". I did one of three:

* Rename "packager" to "Metro Bundler"
* Rename "react-native-packager" to "Metro Bundler"
* Remove "packager" when code inside of Metro implies that it's about Metro

I also removed `Glossary.md` because it is unmaintained and very old. mjesun is currently starting to write documentation for Metro which will supersede whatever was there before.

Reviewed By: mjesun

Differential Revision: D5802993

fbshipit-source-id: ba99cb5ed04d84b0f7b7a8a0bf28ed99280a940a
2017-09-11 19:43:13 -07:00
James Ide 023ac57337 Default enableBabelRCLookup (recursive) to false
Summary:
This is a breaking change that tells Metro to look at only the project's .babelrc file. Previously it would look at .babelrc files under node_modules and would run into issues because it didn't have the version of Babel nor the plugins/presets that `node_modules/randompackage/.babelrc` wanted. So as a workaround, people would write a postinstall step that deletes `node_modules/**/.babelrc`, which worked well. This flag (`getEnableBabelRCLookup = false`) has the same effect and hopefully fixes one source of cryptic bugs people run into.

To use the old behavior, create a config file named `rn-cli.config.js` with:
```js
module.exports = {
  getEnableBabelRCLookup() {
    return true;
  },
};
```

Go under node_modules, modify a used module to have a dummy .babelrc (`{"plugins": ["dummy"]}`) and ensure the JS bundle still loads.
Closes https://github.com/facebook/react-native/pull/15860

Differential Revision: D5798264

Pulled By: jeanlauliac

fbshipit-source-id: ce368b1d5671cc6c6261cbe3c39e61c9401fe37a
2017-09-11 03:47:52 -07:00
Hiten Parmar c88b2b2c65 Log error message when there are zero connected clients
Reviewed By: frantic

Differential Revision: D5789198

fbshipit-source-id: 0c927fe7efc204b7f1173da97cc69262867e632b
2017-09-08 15:30:35 -07:00
Trevor Brindle cb8a116d05 Use xcpretty for iOS build output if installed
Summary:
iOS/xcodebuild logging output sucks. It's completely unreadable because of how xcodebuild takes arguments. Fortunately a ruby gem has existed to fix this for years: xcpretty. You simply pipe xcodebuilds output to xcpretty and it cleans it up, showing relevant info in a more readable format.

This PR implements xcpretty output. It checks to see if xcpretty is in PATH, then uses it by default if it is, and can be disabled using a --verbose cli flag.

- Create a project from master
- run `react-native run-ios`
- Confirm output looks like this:

```tabrindle-mbp:shop-rn tabrindle$ make
Scanning 662 folders for symlinks in /Users/tabrindle/Developer/react-native/node_modules (5ms)
Found Xcode project Shop.xcodeproj
We couldn't boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time.
Launching iPhone 6 (iOS 10.3)...
Building using "xcodebuild -project Shop.xcodeproj -configuration Debug -scheme Shop -destination id=0CD9ABF3-A8E4-43D6-A52B-F437FF0F45A0 -derivedDataPath build"
▸ Building React/yoga [Debug]
▸ Check Dependencies
▸ Building React/double-conversion [Debug]
▸ Check Dependencies
▸ Running script 'Install Third Party'
▸ Building React/third-party [Debug]
▸ Check Dependencies
▸ Building React/jschelpers [Debug]
▸ Check Dependencies
▸ Building React/cxxreact [Debug]
▸ Check Dependencies
▸ Building React/React [Debug]
▸ Check Dependencies
▸ Running script 'Start Packager'
▸ Running script 'Include RCTJSCProfiler'
▸ Building RCTSettings/RCTSettings [Debug]
▸ Check Dependencies
▸ Building BVLinearGradient/BVLinearGradient [Debug]
▸ Check Dependencies
▸ Building RCTActionSheet/RCTActionSheet [Debug]
▸ Check Dependencies
▸ Building RCTLinking/RCTLinking [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/fishhook [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/RCTWebSocket [Debug]
▸ Check Dependencies
▸ Building RCTText/RCTText [Debug]
▸ Check Dependencies
▸ Building RCTNetwork/RCTNetwork [Debug]
▸ Check Dependencies
▸ Building RCTAnimation/RCTAnimation [Debug]
▸ Check Dependencies
▸ Building RCTGeolocation/RCTGeolocation [Debug]
▸ Check Dependencies
▸ Building ReactNativeNavigation/ReactNativeNavigation [Debug]
▸ Check Dependencies
▸ Building RNI18n/RNI18n [Debug]
▸ Check Dependencies
▸ Building RCTImage/RCTImage [Debug]
▸ Check Dependencies
▸ Building RNVectorIcons/RNVectorIcons [Debug]
▸ Check Dependencies
▸ Building RCTVibration/RCTVibration [Debug]
▸ Check Dependencies
▸ Building Shop/Shop [Debug]
▸ Check Dependencies
▸ Running script 'Bundle React Native code and images'
▸ Building Shop/ShopTests [Debug]
▸ Check Dependencies
▸ Build Succeeded
Installing build/Build/Products/Debug-iphonesimulator/Shop.app
Launching com.marketamerica.MAMobile
com.marketamerica.MAMobile: 43497```
- run `react-native run-ios --verbose`
- confirm output looks as normal

Nothing else should be affected. This is simply a developer experience change. If xcpretty is not already installed, nothing will change at all. Many of us using fastlane have been spoiled by this for years.
Closes https://github.com/facebook/react-native/pull/15607

Differential Revision: D5740684

Pulled By: shergin

fbshipit-source-id: 09ef21414b8b65be92595b19502b843fa943403d
2017-09-08 10:00:51 -07:00
Jean Lauliac 1de6ec46f8 RN local-cli: fix the reporter creation code
Reviewed By: mjesun

Differential Revision: D5766153

fbshipit-source-id: 4416e331a7170e49236bcd09555040fd7b5b61b5
2017-09-08 08:02:56 -07:00
Rafael Oleza 5e4f286f48 Use the new Delta HMR implementation from the internal React Native CLI
Reviewed By: jeanlauliac

Differential Revision: D5765025

fbshipit-source-id: fbf516c26382773c623bd3e0c2ba8b668bfd8b31
2017-09-08 06:30:03 -07:00
Marshall Roch 91b6b4efb9 @allow-large-files Flow v0.54.0
Reviewed By: leebyron

Differential Revision: D5773490

fbshipit-source-id: 2c54bb6326f23edbe9a969f3010f79da8189923e
2017-09-06 03:33:43 -07:00
Radek Czemerys 7d4a5b67d4 Add missing licence to findSymlinksPaths
Summary:
Missing licence added. Fixes #15759.
Closes https://github.com/facebook/react-native/pull/15795

Differential Revision: D5768995

Pulled By: hramos

fbshipit-source-id: 2ecad87670f25362344a8da9478a79e731fd0ac2
2017-09-05 13:17:26 -07:00
Miguel Jimenez Esun ef3fe66489 Remove nested "it"s
Reviewed By: jeanlauliac

Differential Revision: D5765323

fbshipit-source-id: 506865ef41ce272898cca9af28c0106ee3a0f57d
2017-09-05 05:18:30 -07:00
Rafael Oleza eb6ba0b041 Enable delta bundler on metro-bundler behind a cli argument
Reviewed By: mjesun

Differential Revision: D5761110

fbshipit-source-id: 83127f63679caffbc4f335f52f6f5eda398e8c05
2017-09-04 13:45:25 -07:00
Rafael Oleza c65d904264 Improve HMR performance by allowing to specify bundlingOptions to getShallowDependencies() method
Reviewed By: jeanlauliac

Differential Revision: D5745205

fbshipit-source-id: a69ac40bb676a809e3786681179e2b4bac392ce6
2017-09-01 09:02:21 -07:00