Commit Graph

583 Commits

Author SHA1 Message Date
David Aurelio 11eef69936 Force `'default'` transform variant to be present
Summary: Enforces a `'default'` property to be present on the transform variant mapping. This will allow us to simplify transforms of assets and json to only provide one variant for the new Buck build system.

Reviewed By: jeanlauliac

Differential Revision: D5002052

fbshipit-source-id: 2a7240c1b2450f62de686c46ab2c2e5a75dea399
2017-05-04 08:31:10 -07:00
Jean Lauliac 4a86f93982 packager: add support for relative files with custom extensions
Reviewed By: cpojer

Differential Revision: D4994139

fbshipit-source-id: 5e47c5bc6f8b2cd750f1ca0df940c23234c66600
2017-05-04 05:21:44 -07:00
David Aurelio edf1774945 Resolve path at callsite rather than in `Config.loadFile`
Summary:
Resolve path at callsite rather than in `Config.loadFile`

`Config.loadFile` should not expose unexpected behavior as joining paths together. This moves that responsibility to the call site. `path.resolve` returns the second argument if it is an absolute path.

Reviewed By: bestander

Differential Revision: D4986130

fbshipit-source-id: c80a588ffa86011bcd5a2c393ad5d6eedc6c61ae
2017-05-03 06:51:47 -07:00
David Aurelio b9fb229c80 Get rid of FBism in `Config`
Summary: `cwd` was needed for FB-internal reasons, was untyped, and goes away.

Reviewed By: martinbigio

Differential Revision: D4986076

fbshipit-source-id: b093476cabc4f73fb63d37052f4041073c174f06
2017-05-03 06:51:47 -07:00
David Aurelio 6a4e113736 Stronger config types
Summary:
Splits `ConfigT` into `ConfigT` (core + packager configuration) and `RNConfig` (RN CLI configuration).
Also guarantees that all values on `ConfigT` have a default when loading user configuration.

Reviewed By: jeanlauliac

Differential Revision: D4985965

fbshipit-source-id: bf036e22d6809e49746a9c3aa240ec403a085342
2017-05-03 06:51:47 -07:00
David Aurelio d2505e7615 disable `no-alert` eslint rule for node code
Summary: `no-alert` doesn’t play nice with flow type spreads. We don’t need it for node, anyway.

Reviewed By: jeanlauliac

Differential Revision: D4993096

fbshipit-source-id: 95785843d3263520c063a43864c8053cbaa5083d
2017-05-03 06:51:47 -07:00
Lukas Piatkowski 976a181a1c Add additional post process of SourceMap after the minification of JS
Reviewed By: davidaurelio

Differential Revision: D4955229

fbshipit-source-id: ac4e5f917839d43d73b80d98b4813d8ccf1d41ef
2017-05-03 03:45:41 -07:00
Jean Lauliac e135bacb48 packager: Server: remove last declareOpts usage and replace by Flow types
Summary:
`declareOpts` prevents strong Flow typing, and promotes default values, that may be different from a function to another (my goal is to remove defaults from the whole codebase except perhaps the public API). This changeset replaces it by Flow types and fixes callsites to be explicit on values.

This is the last callsite of `declareOpts` so I'll remove it, in a separate diff.

Reviewed By: cpojer

Differential Revision: D4970650

fbshipit-source-id: e5ea2e06febde892d28c9dc59dc2920d4033bb01
2017-05-03 03:31:30 -07:00
David Aurelio 89b3cc1f2f Replace `Config.get` with three individual methods
Summary:
Gets rid of `Config.get` in favor of three methods with names that express intend. The logic for applying defaults was used from one callsite only, and was moved there.

This is the starting point to make the config loading system a better place, including a strong return type and defaults always applied.

Reviewed By: martinbigio

Differential Revision: D4985774

fbshipit-source-id: 98300547c3eafd5948814d57ce93e71d43572eb8
2017-05-03 03:00:56 -07:00
David Aurelio 58ba7fc075 Unify source map types
Summary: deduplicates / unifies types for source maps across the code base

Reviewed By: jeanlauliac

Differential Revision: D4955924

fbshipit-source-id: 25cb71031dce835dd7d2bc1c27d6b20050906e81
2017-04-28 12:35:23 -07:00
David Aurelio 414d5a3023 Change postprocessing hook to work on `ModuleTransport` instances
Reviewed By: amnn

Differential Revision: D4962283

fbshipit-source-id: 25b609bcd4b8d7a881e35426010f15530548e301
2017-04-28 10:03:07 -07:00
Sokovikov 99341315c4 open in editor fix, show tip instead of error
Summary:
if REACT_EDITOR not set we need to show a pro tip. For now error is shown

now:

<img width="967" alt="screen shot 2017-04-11 at 14 48 06" src="https://cloud.githubusercontent.com/assets/1488195/24905942/da7ae876-1ec6-11e7-8f4d-a2505ee1958f.png">

after fix:

<img width="641" alt="screen shot 2017-04-11 at 14 49 38" src="https://cloud.githubusercontent.com/assets/1488195/24905957/e60637d6-1ec6-11e7-92ad-ba03dbf3ebff.png">

1) REACT_EDITOR is not set
2) use unknown or terminal editor (I use neovim)
3) make a red box in UIExplorer
4) click on stacktrace line
Closes https://github.com/facebook/react-native/pull/13443

Differential Revision: D4963762

Pulled By: hramos

fbshipit-source-id: 8425d6e7c6f786e8ac51ebc9b7d721bb69dd7313
2017-04-28 06:18:30 -07:00
Ashok Menon 978592faab Order modules in bundle by path.
Reviewed By: davidaurelio

Differential Revision: D4835227

fbshipit-source-id: 4974036fed7452447501fc07445afaa349e521c9
2017-04-27 17:46:40 -07:00
Gabe Levi a7009077ed Deploy v0.45.0
Reviewed By: samwgoldman

Differential Revision: D4965967

fbshipit-source-id: 090f35efe225b1803141d3062d68e1e626907029
2017-04-27 17:20:46 -07:00
Jean Lauliac 1f8d1002ef packager: buck library: expose asset content
Reviewed By: davidaurelio

Differential Revision: D4945778

fbshipit-source-id: ea132a3d284ed09c59c69afbdd7b707af9e521b9
2017-04-25 12:04:01 -07:00
David Aurelio 3e08a28987 Remove irrelevant options from cache key
Reviewed By: jeanlauliac

Differential Revision: D4938131

fbshipit-source-id: 88b686bc5ee6946297e1fd1b91d46fa618f0d9d7
2017-04-25 04:02:06 -07:00
Paulus Esterhazy c58e19ef33 Fix run-ios when specifying a scheme as cli arg
Summary:
The cli arg `--scheme` allows you to override the inferred scheme.
The runOnDevice command takes this override into account, but run-ios
doesn't. This commit fixes this discrepancy.

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.

Currently if a custom scheme is specified, `run-ios` will fail with the following message

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

This PR fixes this.

Tested manually from CLI.
Closes https://github.com/facebook/react-native/pull/13548

Differential Revision: D4914531

Pulled By: javache

fbshipit-source-id: 071710947e90e6194e0229751e33068565e010b2
2017-04-19 11:30:36 -07:00
Jean Lauliac aef286791a packager: assetPathUtils: @flow
Reviewed By: cpojer

Differential Revision: D4913888

fbshipit-source-id: 31ddb4b9ede65e1b6caf740a245c3a11326d15d6
2017-04-19 10:41:08 -07:00
Gabe Levi 92f900c79d Upgrade to v0.44.0
Reviewed By: zertosh

Differential Revision: D4893660

fbshipit-source-id: ed85f5d4c585164d464a7e009888a28e5af339cd
2017-04-17 09:33:20 -07:00
Brian Vaughn 6564edce5e Ran PropTypes -> prop-types codemod against Libraries/FBReactKit/js/react-native-github
Reviewed By: acdlite

Differential Revision: D4876709

fbshipit-source-id: 3a5e92bfc74287b7a9054546c438580bed0147af
2017-04-12 16:15:15 -07:00
Christoph Pojer deebf15a56 Move formatBanner into packager folder
Reviewed By: davidaurelio

Differential Revision: D4868954

fbshipit-source-id: 7a28019c781262bcf4aab0ad2e67868d35ebf9fb
2017-04-12 02:44:51 -07:00
Karan Thakkar 840dc0cc82 Allow configuring the app source folder for android
Summary:
I have been working on integrating React Native into an existing app and realised that the source folder for android code is currently hardcoded as `app`. Being a legacy codebase we can't really change that. So I wanted to be able to customise this folder name so that I can integrate RN seamlessly and start it from the CLI without having to run it from Android Studio.

- Create a barebones RN app
- `react-native run-android` works successfully
- Refactor the name of the app folder inside the android directory to `TestFolderName` using Android Studio
- `react-native run-android` now fails
- Changing this command to `react-native run-android --appFolder=TestFolderName` works successfully
Closes https://github.com/facebook/react-native/pull/13273

Differential Revision: D4833396

Pulled By: ericvicenti

fbshipit-source-id: 4c62cee6aaa2cc78eede5c7756459430022fffde
2017-04-11 12:25:39 -07:00
Andres Suarez e67b8fe761 Use flow 0.43.1
Reviewed By: nmote

Differential Revision: D4851923

fbshipit-source-id: 018f61c3a45e32c899287848d36129e3601145a4
2017-04-08 14:05:11 -07:00
Adam Perry 403f356082 Stop yarn error message appearing for Windows users of local-cli
Summary:
On windows, recent versions of local-cli will display a yarn error to stderr when starting the packager (see https://github.com/expo/xde/issues/91, https://github.com/react-community/create-react-native-app/issues/101, https://github.com/react-community/create-react-native-app/issues/113#issuecomment-289185491 for examples of users hitting this in the wild), even though no package management action is being taken.

From what I can tell this is what happens:

* [`local-cli/util/yarn.js` does not ignore stderr on Windows](6fa87134fc/local-cli/util/yarn.js (L25))
* [`local-cli/util/PackageManager.js` calls the above function when it's require'd](6fa87134fc/local-cli/util/PackageManager.js (L20))

For Windows users who don't have yarn installed, this means that the 'yarn is not recognized as an internal or external command..." error displays wh
Closes https://github.com/facebook/react-native/pull/13355

Differential Revision: D4848084

Pulled By: hramos

fbshipit-source-id: f32176354e0bd7ff6d7009ea30dca64ff23ae3d5
2017-04-07 11:17:00 -07:00
Max Sherman 6fa87134fc Use the absolute path to the sourcemap in the CS bundle
Reviewed By: davidaurelio

Differential Revision: D4831377

fbshipit-source-id: b7da81264a65bea1827237cdd34567b29579acd4
2017-04-06 09:30:31 -07:00
Gabe Levi 4f243f1ecd Deploy v0.43.0
Reviewed By: zertosh

Differential Revision: D4835081

fbshipit-source-id: a9ab33648320fb19b8cc7ab212e68fada7810b90
2017-04-05 18:31:06 -07:00
Vojtech Novak cd4545f812 configurable devEnabled in React.gradle
Summary:
This PR adds support for configurable devEnabled option when building an android app. This is currently hardcoded.

The reason for making this configurable is this: I have an app that uses code-push and 3 buildConfigs. I want to have a debugging version which has `devEnabled = true`, then a staging version which has `devEnabled = false` (this version of the app is used internally for testing and should behave just like a release version of the app, and when the tests succeed the changes are promoted into the release version to the users out there, using code-push). The last version is a standard release version with `devEnabled = false`.

Currently, `devEnabled` is hardwired like this: `!targetName.toLowerCase().contains("release")` so by default my `staging` buildConfig will have `devEnabled = true` but I'd like it to be false.

With this PR it'd be possible to configure this as follows, while not breaking the current behavior.
`'devDisabledIn${productFlavor}${buildType}'`
`'devDisabledIn${buildType
Closes https://github.com/facebook/react-native/pull/11438

Differential Revision: D4630513

Pulled By: hramos

fbshipit-source-id: b6817cf4c144fc948f76785e9cb5f93a13a6a6a2
2017-04-05 12:50:31 -07:00
Fred Blau d8f23f79c7 Allow specifying an appIdSuffix to run-android
Summary:
Motivation

Currently react-native run-android instals and starts your app, but if you have more than one variant, it doesn't know which one to start.  This allows developers to pass in the suffix specified in build.gradle, so that the correct app is started.

Test Plan

verify that `react-native run-android` runs properly
verify that `react-native run-android --appIdSuffix validSuffix` runs properly
Closes https://github.com/facebook/react-native/pull/13169

Differential Revision: D4823391

Pulled By: ericvicenti

fbshipit-source-id: 31ed35fd79403804b4781e81eb49f1c4627d7f8e
2017-04-04 16:45:27 -07:00
Sai Grandhi 0fe0fc038b Make copy button work on android emulator in Linux using xsel
Summary:
Resolves issue [#13165](https://github.com/facebook/react-native/issues/13165). The copy button in the redbox for RN android is not currently supported for Linux. This pull request provides the copy button functionality to Linux RN users.

I have tested the updated code locally.
Firstly, I edited `index.android.js` that caused the following error.
![pasted image at 2017_03_27 10_21 am](https://cloud.githubusercontent.com/assets/22376429/24426834/f567c5dc-13d6-11e7-8e3b-a650e2f6237c.png)
After I clicked the copy button and pasted from the clipboard into the chrome address bar, the message appeared.
![pasted_image_at_2017_03_27_10_21_am](https://cloud.githubusercontent.com/assets/22376429/24426896/2c0d4d64-13d7-11e7-8650-da19c44b177d.png)
Closes https://github.com/facebook/react-native/pull/13188

Differential Revision: D4819796

Pulled By: ericvicenti

fbshipit-source-id: 9adc6e93330f89240a505a403e4913dc10e5a31f
2017-04-04 10:20:19 -07:00
Jean Lauliac 8755338728 packager: get rid of type `any` in ResolutionRequest
Summary:
One of my changeset broke the "ModuleGraph" code without warning earlier because we are using `any`, that equivalent to having no typing at all. This changeset fixes the types so that `ResolutionRequest` is exactly what it actually is: a class usable for any `Module`-looking class, including the normal one, and the "ModuleGraph" one used for Buck builds. That way, the ModuleGraph's `Module` is typechecked against `Moduleish`.

Concretely this change mostly migrates the `Module` to its generic parameter counterpart `TModule` inside `ResolutionRequest`.

Reviewed By: kentaromiura

Differential Revision: D4826256

fbshipit-source-id: fcd7ca08ac6c35e4e9ca983e2aab260e352bcb4e
2017-04-04 07:15:23 -07:00
Jhen d38644eee5 Add Atom Beta to launchEditor
Summary:
Support [the pre-release of Atom](https://github.com/atom/atom/releases/tag/v1.16.0-beta0) for launchEditor in RN packager.

Open the pre-release of Atom and use the following code: (use the built-in [openFileInEditor](292cc82d0e/Libraries/Core/Devtools/openFileInEditor.js) module)

```js
import openFileInEditor from 'openFileInEditor'

openFileInEditor(file, lineNumber)
```
Closes https://github.com/facebook/react-native/pull/13255

Differential Revision: D4819130

Pulled By: ericvicenti

fbshipit-source-id: eb542295ee9489dad0fe9084e51c4141d33f1fbf
2017-04-03 09:15:29 -07:00
Shruti Malugu edbb48c67a Replacing all instances of [UIApplication sharedApplication] wi…
Summary:
…th RCTSharedApplication()

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

- [ ] Explain the **motivation** for making this change.
          Using React Native latest version with Cocoapods 1.2.0 causes the following error inside iOS app extensions

> /react-native/React/Modules/RCTAccessibilityManager.m:67:70: ‘sharedApplication’ is unavailable: not available on iOS (App Extension) — Use view controller based solutions where appropriate instead.

Moving the use of [UIApplication sharedApplication] to RCTSharedApplication() which is safe on app extension

- [ ] Provide a **test plan** demonstrating that the code is solid.
        I am not sure how to test such that all the features which touch the modified code are tested.

- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

What existing problem does the pull request solve?
    Using React Native latest v
Closes https://github.com/facebook/react-native/pull/13227

Differential Revision: D4816338

Pulled By: javache

fbshipit-source-id: e3e3c77882990ad1817b0b633521cff52571ecd0
2017-04-01 03:34:41 -07:00
Koen Punt 8daf985fc3 match plist indentation with xcode format
Summary:
xcode has its own way of indentation of the plist.

fixes #11668
Closes https://github.com/facebook/react-native/pull/11670

Differential Revision: D4410865

fbshipit-source-id: 8c65e7719d228b07f58b1ccb86b369e319067f02
2017-03-31 03:03:10 -07:00
Brent Vatne b80e2c8799 Move packager initialization events to reporter
Summary:
This PR depends on #13172

Packager events are mostly logged through the TerminalReporter by default (#13172 makes this configurable). But there are a few things that aren't passed through TerminalReporter.

- We [log a banner with some information about the port and what's going on](8c7b32d5f1/local-cli/server/server.js (L22-L32))
- Also [a message about looking for JS files](8c7b32d5f1/local-cli/server/server.js (L34-L38)) (not sure what that is for / if it is useful beyond telling the user what directory root they started the packager in, but that's another thing).
- If the packager fails to start, then [we log an error message](8c7b32d5f1/local-cli/server/server.js (L41-L61)).

This pull request changes those log messages to be handled by TerminalReporter. I tri
Closes https://github.com/facebook/react-native/pull/13209

Differential Revision: D4809759

Pulled By: davidaurelio

fbshipit-source-id: 2c427ec0c1accaf54bf6b2d1da882cd6bfaa7829
2017-03-31 02:17:22 -07:00
Brent Vatne 5f5da4e122 Add support for custom log reporter cli option for local server
Summary:
In Expo tools such as XDE, exp we listen listen to stdout from the packager process and print it in our own buffer. In the case of XDE, an electron app, our log pane is DOM-based, and before printing each log chunk we need to remove special tty characters and sometimes parse it to get information that we need (eg: progress bar). By using a custom reporter, we can take the raw events and pass them along in a format that is easy to consume by XDE and exp. This same motivation applies to create-react-native-app, where we currently don't show a progress bar in the terminal, but we can with this change.

Create `LogReporter.js` in the root of a project with the CLI changes included in this PR.

```
class LogReporter {
  update(event) {
    console.log(JSON.stringify(event));
  }
}

module.exports = LogReporter;
```

Now, run `react-native start --customLogReporterPath=LogReporter.js` -- all of the raw events will be output as JSON (while the logs
Closes https://github.com/facebook/react-native/pull/13172

Differential Revision: D4795760

Pulled By: hramos

fbshipit-source-id: 80164b2f30e33a3f9965f4865a8404f8640a52c1
2017-03-30 18:15:49 -07:00
Sam Corcos c31a65669e Add comma to prevent build error when react.gradle is uncommented
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

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

At the moment, if you uncomment the react specific code in `build.gradle` you'll get a compilation error. Adding a comma prevents this error.

No tests are necessary. This is a simple fix.

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/martink
Closes https://github.com/facebook/react-native/pull/13212

Differential Revision: D4802065

Pulled By: javache

fbshipit-source-id: 0ddfe16241381d7e4ac0e48be1bada21d9df2068
2017-03-30 10:20:56 -07:00
Build Service 12de9729bd @allow-large-files [i18n] remove unused generated strings.xml files on master
fbshipit-source-id: c3151e7f8c346b1ece67ea37b88110b16e1a9107
2017-03-29 21:02:38 -07:00
Build Service 7f35abb26a @allow-large-files @ignore-conflict-markers[i18n] translation auto-update for i18n/instagram.config.json on master
fbshipit-source-id: 680e36c342abcc80279979ca461eb08449d535bb
2017-03-29 21:02:38 -07:00
Build Service c21760af4f @allow-large-files @ignore-conflict-markers[i18n] translation auto-update for i18n/fb4a.config.json on master
fbshipit-source-id: e973b0d453b88fc9f6cf54e1fd97ef7780cafe87
2017-03-29 21:02:38 -07:00
Build Service b6f1a3b6d7 @allow-large-files @ignore-conflict-markers[i18n] translation auto-update for i18n/adsmanager.config.json on master
fbshipit-source-id: f52efb222ea7385f8d291395b2edef5f28dea713
2017-03-29 21:02:38 -07:00
Build Service 944adb76d1 @allow-large-files [i18n] remove unused generated strings.xml files on master
fbshipit-source-id: 8efabef352fa71b3c18c1a8e318d66850fdd5e56
2017-03-29 17:13:58 -07:00
Build Service 9a596018f8 @allow-large-files @ignore-conflict-markers[i18n] translation auto-update for i18n/instagram.config.json on master
fbshipit-source-id: 951f549645f4010bd01ab6486a2b3b617a901b04
2017-03-29 17:13:58 -07:00
Build Service 5012f8938e @allow-large-files @ignore-conflict-markers[i18n] translation auto-update for i18n/fb4a.config.json on master
fbshipit-source-id: 2d84aa83e9efaaa89838da7c8d9595692b6bccdd
2017-03-29 17:13:58 -07:00
Build Service 7f346973d1 @allow-large-files @ignore-conflict-markers[i18n] translation auto-update for i18n/adsmanager.config.json on master
fbshipit-source-id: 156680756e04fc7ef69017c49324ff0b7acd030f
2017-03-29 17:13:57 -07:00
Benjamin Eckel 140c5f657c Make run-ios --device example copy-pastable
Summary:
This changes the single quotes to double quotes so this command can be copy-pasted.

If a user copy pastes the run-on-device example in bash they will be presented with a confusing prompt because bash expects another terminating single quote.

```
~ben (master *) ~/code/transit: react-native run-ios --device 'Max's iPhone'
>
>
```

It seems minor but this could be just confusing enough to frustrate a beginner or someone not familiar with bash.

This can be tested by running:

```
react-native run-ios --help
```

and verifying that the "run on device" example is changed:

```diff
- react-native run-ios --device 'Max's iPhone'
+ react-native run-ios --device "Max's iPhone"
```
Closes https://github.com/facebook/react-native/pull/13145

Differential Revision: D4776305

Pulled By: hramos

fbshipit-source-id: 9500551bfc106cd1687468f7ecc4c91089e1f703
2017-03-29 11:45:56 -07:00
Tim Yung 5643bbc11d RN: Add "Maintain Priority" Checkbox
Summary:
Adds a new checkbox to the Chrome Debugger page that prevents the tab from being deprioritized by Google Chrome.

This is accomplished by embedding an inaudible sound byte (in 10Hz range) that loops on a low volume.

Reviewed By: kassens

Differential Revision: D4786288

fbshipit-source-id: 949d96ed3c0eac92ad56cdd119418df9ec6d0846
2017-03-28 18:50:56 -07:00
Tim Yung 696b49e3b8 RN: Refactor Chrome Debugger JS
Summary:
Refactors JavaScript in the `debugger.html` used to operate the Chrome Debugger.

- Pull out all view-related logic into a global `Page` object.
- Persist the dark theme across debug sessions using `localStorage`.

Reviewed By: kassens

Differential Revision: D4786235

fbshipit-source-id: ab959d1c95465a10b4538b14d9c87a51ae3b7078
2017-03-28 18:50:56 -07:00
jrodiger f891985bd8 Update runAndroid.js to fix startServerInNewWindow() (Windows)
Summary:
**Motivation**
Resolves issue: #12367. The issue is that the packager does not launch automatically on Windows when running `react-native run-android` like it does on OSX. The proposed change fixes this issue, and causes the packager to be launched automatically on Windows 10. Also note the updated code uses the syntax described in the [Node.js documentation](https://nodejs.org/api/all.html#child_process_spawning_bat_and_cmd_files_on_windows) on spawning .bat files on Windows.

**Test plan**
Manually tested on Windows 10.

Running just `react-native run-android` now results in the packager launching, without needing to run `react-native start` in a new command prompt window.

**Screenshot:**
![packager](https://cloud.githubusercontent.com/assets/17132071/23641540/8d82bb7c-02c2-11e7-9c47-d1c9b582bd65.png)
Closes https://github.com/facebook/react-native/pull/12755

Differential Revision: D4767321

fbshipit-source-id: a14f369ba99939aa44d0ee3403e1d262e2657e6e
2017-03-23 18:20:10 -07:00
Gabe Levi d868e86df0 Deploy v0.42.0
Reviewed By: zertosh

Differential Revision: D4732064

fbshipit-source-id: 12fb8f9aff983ff5d1cb01f413bab761259829f9
2017-03-23 16:46:23 -07:00
Yann Pringault 8a8f34ae10 Improve dark mode for debugger
Summary:
* Added a label so we can click on the text to toggle the dark mode
* Added `height: 100%` in the CSS to make the dark background fill the entire view
* Improving JS code with `classList.toggle()` instead of redundant `if else` and fragile `document.styleSheets` access
* Adjusted the link color in dark mode to be less flashy

![image](https://cloud.githubusercontent.com/assets/5436545/24155304/bb80bb9a-0e53-11e7-9298-ce2c1ec6672c.png)

![image](https://cloud.githubusercontent.com/assets/5436545/24155311/c27e85f8-0e53-11e7-87ae-0245f54870c5.png)
Closes https://github.com/facebook/react-native/pull/13052

Differential Revision: D4748893

fbshipit-source-id: a81266c52b24f8e5dcedf0b9f37134688342d8d2
2017-03-23 04:38:57 -07:00