Commit Graph

641 Commits

Author SHA1 Message Date
David Aurelio dc783d97e8 Make `postMinifyProcess` non-optional
Reviewed By: cpojer

Differential Revision: D5052315

fbshipit-source-id: 4c3573fc6e97b4f561f371179ea2dd6f89fac05a
2017-05-12 11:45:37 -07:00
Jean Lauliac d0c2b068d7 packager: DependencyGraph: remove re-exported functions
Reviewed By: davidaurelio, cpojer

Differential Revision: D5052149

fbshipit-source-id: 43f3877ceea038762ded6c42ab0481d215db2118
2017-05-12 10:37:03 -07:00
David Aurelio c44e37bf74 Require transformer options to be present throughout
Summary: `transformModulePath` used to be an optional string, because `ConfigT` allowed for an optional `getTransformModulePath` method. Effectively, we required it to be present. This builds on top of the cleanups around `ConfigT` and gets rid of the flow error suppressions

Reviewed By: jeanlauliac

Differential Revision: D5037466

fbshipit-source-id: bc5c9cbc566e7aa74e7f6397e69fa87cdac7bc00
2017-05-11 16:47:43 -07:00
Gabe Levi 9e6c44095b Deploy v0.46.0
Reviewed By: zertosh

Differential Revision: D5039894

fbshipit-source-id: 2e4a0c26550ae3a0dc01b33d1d939ec0218127be
2017-05-11 09:17:53 -07:00
Jean Lauliac c948ae8168 packager: rename node-haste/index to DependencyGraph
Summary: I've been confused for a long time by this, and I think it's better late than never. I propose we rename that file to make it more explicit where that class lives, and so that it's consistent with the test file, name `DependencyGraph-test.js`

Reviewed By: davidaurelio

Differential Revision: D5020556

fbshipit-source-id: d54a501c3995f3fea16a5bfc6ca72993f73c4873
2017-05-10 03:48:32 -07:00
Max Sherman 7dd2cd30af Fix Promise resolve callback error
Reviewed By: theoy

Differential Revision: D5032525

fbshipit-source-id: 19680cef70f11cccf2abf03d1c1b7e72ac32e43e
2017-05-09 16:47:34 -07:00
Max Sherman de4d35536d Bump packager's inspector message timeout to 30s
Reviewed By: pakoito

Differential Revision: D5024083

fbshipit-source-id: b80054aa995bbd1008479bdb4da001ffa4ac897d
2017-05-09 14:36:12 -07:00
Dan Abramov 863e66e449 Explain how to use React Developer Tools
Summary:
Existing instructions are a bit misleading, as Chrome extension is not supposed to work, but there is still a supported way to run them.
Closes https://github.com/facebook/react-native/pull/13707

Differential Revision: D5010169

Pulled By: gaearon

fbshipit-source-id: f9558c9ccb04196854b2eef6ff40a998350b65db
2017-05-05 11:49:26 -07:00
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
Dan Abramov c451dd6cce Update message with instructions
Summary:
The middleware for automatically converting Systrace traces to HTML and popping the browser hasn't worked properly for a while, since the version on Homebrew generates some code that uses `Object.observe`, which was deleted from Chrome ages ago. People have complained about it, but fixing it properly has proven to be harder than expected, so I suggest we simply update the message with instructions for people to load it on Chrome, which is what all of us have been doing anyway (AFAIK).
Closes https://github.com/facebook/react-native/pull/12445

Reviewed By: javache

Differential Revision: D4700153

Pulled By: gaearon

fbshipit-source-id: 0c33099babed93b3c70d36ae9dfc7d82460c8269
2017-03-20 10:49:43 -07:00
Nick cbd46aaa7c more accurate product-name regex
Summary:
Some projects define multiple targets, including app extensions, which are built with a “.appex” extension.   This fix prevents the buildProject method from selecting any app extension (e.g. a Today.appex today-widget extension) as the product name.

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.

When building our workspace, ReactNative was failing to install the app to the simulator because it calculated an incorrect path to the app itself.   It was attempting to install "Today.app" when it should have been installing "Remitly.app".   I discovered that ReactNative parses the build output to identify the generated app name, and that this was broken when the build also generated an app extension.  The f
Closes https://github.com/facebook/react-native/pull/13001

Differential Revision: D4735360

fbshipit-source-id: afeeb2073ccd65c95916b153fcde574b5343af8c
2017-03-18 13:16:08 -07:00
Lukas Piatkowski 60142adc72 Extract PackagerConnectionSettings to ensure easier reusability of PackagerConnection module
Reviewed By: cwdick

Differential Revision: D4689535

fbshipit-source-id: f698837f407a03bf91521cc5e921c66f5755e6e0
2017-03-17 10:02:34 -07:00
Andrew Jack 35046984db Add TextLayoutBuilder proguard rule
Summary:
To enable users to use run proguard in their Android applications.

Fixes: #11891

[TextLayoutBuilder](https://github.com/facebookincubator/TextLayoutBuilder) is built as a Jar rather than an AAR so the proguard rules cannot be provided with the binary.

This PR adds the rules that are included in TextLayoutBuilder https://github.com/facebookincubator/TextLayoutBuilder/blob/master/proguard-android.txt

- Created an `react-native init ProguardTest` project with proguard turned on for v0.41.0
- Make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/12511

Differential Revision: D4718029

Pulled By: mkonicek

fbshipit-source-id: 9e3f11c8b9b54eb8e52aa6f44cacd00857a882a5
2017-03-15 17:46:15 -07:00
Charles Dick af590b0c74 remove the old heap profiler visualization code
Differential Revision: D4650983

fbshipit-source-id: 1f791acdd3e2d96e7881ea037045fafa2c6d781a
2017-03-15 06:47:34 -07:00
Jean Lauliac 7098c450d8 packager: attachHMRServer.js: Flow
Summary:
The breakage fixed by changeset [1] could have been identified earlier if we had typing on `attachHMRServer`, so I spent some time on that. This has revealed in turn a few functions across the codebase that were incorrectly typed, and that are now fixed.

[1] packager: attachHMRServer.js: fix callsite of Server#getModuleForPath()

Reviewed By: davidaurelio

Differential Revision: D4706241

fbshipit-source-id: fc4285245921ae45d5781a47d626fc0559dba998
2017-03-15 06:20:48 -07:00
Jean Lauliac 4ac585b34b packager: attachHMRServer.js: fix callsite of Server#getModuleForPath()
Summary: In a previous changeset, Server#getModuleForPath() started returning `Promise<Module>` instead of `Module`, but the callsites in HMR haven't been updated, causing it to break. This would have been caught if `attachHMRServer.js` was using flow, that I'm considering doing in a following up diff. This would also have been caught if we had better integration testing of HMR. Good news however,it was caught by the OSS e2e test, that covers Hot Reloading.

Reviewed By: davidaurelio

Differential Revision: D4705937

fbshipit-source-id: fe787bc6ae50024759c7f7aeed747394fdce9aa1
2017-03-14 11:32:54 -07:00
Jean Lauliac 4203c9c837 packager: fix buildBundle() options
Summary: The problem with `bundleOpts` is that it discards Flow typing, so it prevents reinforcing the integration of `Bundler` into `Server`. This changeset removes the `bundleOpts` to solve that issues. Instead, it makes the options explicit so that there is less uncertaintly. I love making options explicit, because they force callsites to take a consicious decision about what is really needed, making them more robust. They also expose oddities that probably needs refatoring, for example having a `resolutionRequest` in the bundle options does not seem correct, it should be an implementation details. Likewise, `onProgress` should probably be exposed differently, as it does not affect the content of the bundle itself.

Reviewed By: davidaurelio

Differential Revision: D4697729

fbshipit-source-id: d543870ba024e7588c10b101fa51429c77cc5ddc
2017-03-14 11:04:51 -07:00
Yann Pringault 68695bdb26 Fix indent for .babelrc in HelloWorld template
Summary:
Minor code formatting.
Each time I run `react-native init` I must reindent this file.
Closes https://github.com/facebook/react-native/pull/12850

Differential Revision: D4691374

fbshipit-source-id: dc02b021e2f320f1046e4e6d024ba675a4213de8
2017-03-10 13:45:58 -08:00
Richard Evans 4471c32b08 CLI: Assign project root concat back to project roots.
Summary:
With the latest version of React Native I noted my setup with React Native Storybook stopped working because it stopped searching all the right project roots. I found that it had to do with the change here bce6ece5f6

**Test plan (required)**

Run the CLI with a project root other then the root directory and ensure that it displays both the specified project root and the actual root directory.
Closes https://github.com/facebook/react-native/pull/12659

Differential Revision: D4658137

Pulled By: ericvicenti

fbshipit-source-id: 97d3784348f92394df111f189c6b00dd0165b75e
2017-03-06 00:19:20 -08:00
Alexey Kureev c97c1e5516 Fix symlink resolving for examples in the repo
Summary:
Motivation:
Few days ago gaearon [filed an issue](https://github.com/facebook/react-native/issues/12406) that examples in the react-native repo doesn't work after the [recent changes in local-cli](bce6ece5f6). This PR fixes reported bug.

**Test plan (required)**
- No UI changes
- [x] Run UIExplorer from XCode (no package.json in the folder) and check if packager/application runs correctly

cc davidaurelio satya164 grabbou
Closes https://github.com/facebook/react-native/pull/12435

Differential Revision: D4657370

Pulled By: ericvicenti

fbshipit-source-id: 72ee4b96cae37c7ed2794ed4490ce7b4fbbd66c3
2017-03-05 17:34:41 -08:00
Jeff Morrison 59257d6976 fbobjc
Reviewed By: gabelevi

Differential Revision: D4652687

fbshipit-source-id: 6069c8bc24f0b88da3537ada877cdb7d1d4eccfd
2017-03-04 19:30:34 -08:00
Ke Mao 8bfab2c733 Improve command-line experience for capturing mobile JS heap
Reviewed By: cwdick

Differential Revision: D4612319

fbshipit-source-id: 607a09286abdd83368996ffc553b3ce984b62f34
2017-03-01 19:26:28 -08:00
Eli Perkins 1b0d8ac43b Use appropriate capitalization of Xcode
Summary:
[Xcode](https://developer.apple.com/xcode/) is spelled with a lowercase `c`. 😄

**Test plan (required)**

ctrl-f project for `XCode`, case sensitive, find-and-replace with `Xcode`.

Make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/12572

Differential Revision: D4622075

Pulled By: hramos

fbshipit-source-id: d64f0b10254cd624a71844ebaefa6fc29bc1ea57
2017-02-27 22:47:14 -08:00
Bhuwan Khattar 234f4f538d Introduce HasteImpl
Summary:
Similar to https://github.com/facebook/jest/pull/2877, this introduces an optional config `HasteImpl` of type `{getHasteName(filePath: string): (string|void)}` that returns the haste name for a module at filePath if it is a haste module or undefined otherwise.

This allows us to inject a custom implementation of haste's module id resolution rather than only relying on `providesModule` annotations

Reviewed By: davidaurelio

Differential Revision: D4589372

fbshipit-source-id: 4d1983dfbf09c9d67faf725e86ae86ab42433b7d
2017-02-27 14:04:58 -08:00
Martin Konicek 17c175a149 CLI: Add support for templates fetched from npm
Summary:
This PR allows anyone to publish templates for React Native.

It's possible for people to publish modules for React Native, we should also support custom templates. A suggestion from a Cordova mantainer where they did the same thing suggests this is useful:
https://github.com/mkonicek/AppTemplateFeedback/issues/1

I published a sample template [react-native-template-demo](https://www.npmjs.com/package/react-native-template-demo).

(GitHub: https://github.com/mkonicek/react-native-template-demo)

With this PR anyone can then use that template:

`react-native init MyApp --template demo`

The convention is: if someone publishes an npm package called `react-native-template-foo`, people can use it by running `react-native init MyApp --template foo`.

Use a template called `react-native-template-demo` from npm:

`react-native init MyApp --template demo`

Use a local template:

`react-native init MyApp --template file:///path_to/react-native-template-dem
Closes https://github.com/facebook/react-native/pull/12548

Differential Revision: D4620567

Pulled By: mkonicek

fbshipit-source-id: bb40d457a7fec28edb577f08137e73241072de3a
2017-02-27 14:04:57 -08:00
Michael Bolin 48cb932c6e Apply auto-formatter for BUCK files in fbandroid.
fbshipit-source-id: 278ce6f67f5df830b2218e3aca69be103d3c56a6
2017-02-27 14:04:56 -08:00
Gabe Levi 4a60be62bc Deploy v0.40.0
Reviewed By: yungsters

Differential Revision: D4612331

fbshipit-source-id: 3eaa2f99d3181227166064cbee29b9245401a775
2017-02-24 12:45:56 -08:00
Adam Miskiewicz b0bdbeb5c3 Fix flowconfig in starter project
Summary:
In the .flowconfig in the starter project, we're missing the correct suppression comments.

This should fix the flow issues in the e2e tests.
Closes https://github.com/facebook/react-native/pull/12533

Differential Revision: D4603657

Pulled By: ericvicenti

fbshipit-source-id: a07ec947d3ba746279c58e2d95c2293f54e06933
2017-02-22 19:52:08 -08:00
Martin Konicek df008a31e4 CLI template: Bump version of react-navigation dependency
Summary: Beta 1 is old, bump to the latest version.

Reviewed By: mkonicek

Differential Revision:
D4601561
Ninja: OSS only

fbshipit-source-id: f0aa7aa861dc2a2cb40ac171259c69b7d47d0dc4
2017-02-22 15:31:07 -08:00
Lukas Piatkowski a2addbd932 BREAKING: Change the js1 - packager - RN App protocol to version 2
Reviewed By: cwdick

Differential Revision: D4551991

fbshipit-source-id: 395c38ee5c71ddc24d8743e7ec90cc89de087503
2017-02-16 04:30:00 -08:00
Michael Bolin f9df89ac95 Fix copy/paste bug in open source BUCK file for React Native.
Reviewed By: bestander, lacker

Differential Revision: D4562337

fbshipit-source-id: 2ca24344435b650a9c740eba9b196e70015b5cdb
2017-02-15 09:46:24 -08:00
Moses Gunesch c6c1c02b75 Don't add duplicate font entries to plist during link (iOS)
Summary:
**Test plan**

1. Add fonts using `react-native link` and a `"rnpm"` config in package.json
2. Manually delete one or more fonts from Xcode's Resources folder using Remove References option
3. Run `react-native link` again

With the patch in this PR, the plist will not accidentally get populated with duplicate entries.
Closes https://github.com/facebook/react-native/pull/12048

Differential Revision: D4560432

fbshipit-source-id: aba3733acfd5373f8d654406b06b8338b137bc07
2017-02-14 17:16:54 -08:00
Dan Abramov 934cd82941 Move DevTools integration into its own repo
Summary:
The way React DevTools integration was set up in RN was not entirely supported by the React team, and we had to disable it in c3b25c9059 so that we can move forward with enabling Fiber support in React Native.

Here, I am moving the DevTools client setup from RN repo to [React DevTools repo](https://github.com/facebook/react-devtools/blob/master/packages/react-devtools-core/README.md#requirereact-devtools-coreconnecttodevtoolsoptions) so that we can keep it in sync with the rest of React DevTools. This is also a part of a larger effort to consolidate DevTools code (https://github.com/facebook/react-devtools/issues/489). It allows us to remove the double injection of the hook, an lets us replace the `eval` hack with a regular dependency. The implementation [lives here now](https://github.com/facebook/react-devtools/blob/master/packages/react-devtools-core/src/backend.js).

This change re-enables Nuclide Inspector with React Native Stack reconciler and prepares it for compatibi
Closes https://github.com/facebook/react-native/pull/12316

Reviewed By: zertosh

Differential Revision: D4545322

Pulled By: gaearon

fbshipit-source-id: ab949916c1a92c6b41cd41e7e1edf9697a71de2e
2017-02-14 14:03:46 -08:00
Lukas Piatkowski d8f48d1b51 Refactor the packager server for further protocol changes
Reviewed By: cwdick

Differential Revision: D4543321

fbshipit-source-id: f7d5823b0d340f8ca17b3dd6caf4e158fa918bcf
2017-02-14 09:45:57 -08:00
Michael Bolin 6a4f7c0993 Eliminate the need for `import re` in a BUCK file.
Reviewed By: mzlee

Differential Revision: D4550304

fbshipit-source-id: 59a101a35ea33aa8043046f64b675fab0f6f889a
2017-02-13 22:32:37 -08:00
Jeff Morrison 64f3688473 fbobjc deploy
Reviewed By: gabelevi

Differential Revision: D4544571

fbshipit-source-id: 0b0776d91dea647b0b84a9ca400019aef49963f4
2017-02-13 10:30:39 -08:00
Max Sherman a97f665629 Guard against small window where sending a message can crash the packager
Reviewed By: davidaurelio

Differential Revision: D4541015

fbshipit-source-id: 025039c593f7f0f6e40f5fd38ccc07e50f7d04b0
2017-02-10 09:30:08 -08:00
Alex Kotliarskyi a6e4977662 Don't include assets that are not used on the platform
Reviewed By: fkgozali

Differential Revision: D4534622

fbshipit-source-id: 7c6024177cca4c69cb5631f4a7b0f00315f7fca7
2017-02-09 11:15:25 -08:00
Martin Konicek ab81db65c5 CLI: Add README to app template, lint
Reviewed By: mkonicek

Differential Revision:
D4522116
Ninja: oss only

fbshipit-source-id: d17e0e8badcfe97eaea092e5d5274e02904a534d
2017-02-07 10:32:29 -08:00
Martin Konicek 4551e9347a CLI: Update Navigation app template
Summary:
Update the template that will be used by `react-native init --template navigation`. The goal is to make it easier for people to get started by demonstrating a few very basic concepts such as navigation, lists and text input.

**Test plan (required)**

<img src="https://cloud.githubusercontent.com/assets/346214/22697898/ced66f52-ed4a-11e6-9b90-df6daef43199.gif" alt="Android Example" height="800" style="float: left"/>

<img src="https://cloud.githubusercontent.com/assets/346214/22697901/cfeab3e4-ed4a-11e6-8552-d76585317ac2.gif" alt="iOS Example" height="800"/>
Closes https://github.com/facebook/react-native/pull/12260

Differential Revision: D4521758

Pulled By: mkonicek

fbshipit-source-id: d7d9e481dd3373917ac68ec9169b9ac3267547a9
2017-02-07 09:16:08 -08:00
Martin Konicek a54d449e94 CLI: Add support for project templates
Summary:
Currently it is not trivial for people to get started with React Native. `react-native init MyApp` just creates a simple app with a single screen. People have to spend time figuring out how to add more screens, or how to accomplish very basic tasks such as rendering a list of data or handling text input.

Let's add an option: `react-native init --template navigation` - this creates a "starter" app which can be easily tweaked into the actual app the person wants to build.

**Test plan (required)**

- Checked that 'react-native init MyApp' still works as before:

<img width="487" alt="screenshot 2017-02-02 16 56 28" src="https://cloud.githubusercontent.com/assets/346214/22559344/b2348ebe-e968-11e6-9032-d1c33216f490.png">

<img width="603" alt="screenshot 2017-02-02 16 58 04" src="https://cloud.githubusercontent.com/assets/346214/22559370/c96a2ca6-e968-11e6-91f7-7afb967920fc.png">

- Ran 'react-native init MyNavApp --template'. This prints the available templates:

```
$ react-native init MyNavApp
Closes https://github.com/facebook/react-native/pull/12170

Differential Revision: D4516241

Pulled By: mkonicek

fbshipit-source-id: 8ac081157919872e92947ed64ea64fb48078614d
2017-02-06 12:31:25 -08:00
Eric Vicenti bc74dd1e14 Eject CLI command to re-create native folders
Summary:
The iOS and Android native folders of a React Native app can be difficult to maintain. This introduces a new workflow for creating and maintaining the native code of your app.

Now it will be possible to:

1. Remove the native iOS or Android folders
2. Create an `app.json` for your app, with at least a `name` and `displayName`
3. Run `react-native eject`, and the native code for your app will be generated

Then, as usual, you can run `react-native run-ios` and `react-native run-android`, to build and launch your app

For apps that don't have any native code, it will be possible to ignore the `ios` and `android` folders from version control.

Eject step tested in RN app by deleting native folders.

mkonicek, what is the best way to test `react-native init`?

As follow-up items, we can enable the following:

- Configuring app icon and launch screen from the `app.json`
- Automatically run `react-native link` for native libraries
- A
Closes https://github.com/facebook/react-native/pull/12162

Differential Revision: D4509138

Pulled By: ericvicenti

fbshipit-source-id: 0ee213e68f0a3d44bfce337e3ec43e5024bacc66
2017-02-03 12:58:46 -08:00
Mike Grabowski 2f5556df39 Remove build artifacts
Summary:
Ignores `bundle.js` that is a webpack bundle and got most likely accidentally released. Already cherry-picked to 0.42

Fixes #12183
Closes https://github.com/facebook/react-native/pull/12185

Differential Revision: D4507535

Pulled By: mkonicek

fbshipit-source-id: 2ab404534b345cf531f408b654c34a30abd01458
2017-02-03 06:58:35 -08:00
Christoph Pojer a2c84d14ce Remove `react-packager` indirection.
Summary:
This moves the `src` directory one level up and removes the `react-packager` folder. Personally, I always disliked this indirection. I'm reorganizing some things in RNP, so this seems to make sense.

Not sure if I forgot to update any paths. Can anyone advice if there are more places that need change?

Reviewed By: jeanlauliac

Differential Revision: D4487867

fbshipit-source-id: d63f9c79d6238300df9632d2e6a4e6a4196d5ccb
2017-02-02 05:44:15 -08:00
Jirat K 1c249e4804 Use Yarn for Install/Uninstall CLI if available
Summary:
Make `react-native install` and `uninstall` cli to use yarn if available (fixes #11122)

**Test plan Yarn**

1. Publish to Sinopia: https://github.com/facebook/react-native/tree/master/react-native-cli
2. react-native init AwesomeApp
3. react-native install react-native-fit-image
4. react-native uninstall react-native-fit-image

**Test plan NPM**
1. Publish to Sinopia: https://github.com/facebook/react-native/tree/master/react-native-cli
2. react-native init AwesomeAppNPM --npm
3. react-native install react-native-fit-image
4. react-native uninstall react-native-fit-image

**output (yarn.lock)**

```
> react-native install react-native-fit-image
yarn add v0.16.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency
└─ react-native-fit-image@1.4.6
  Done in 4.11s.
rnpm-install info Module react-native-fit-image has been successfully
Closes https://github.com/facebook/react-native/pull/11174

Differential Revision: D4441872

fbshipit-source-id: 05bd30e1ad14bdbe861259c88e1f18df77cfa54f
2017-02-02 05:13:33 -08:00
Pavlos Vinieratos 5e6f39aace allow for dark background in the debugger view
Summary:
I prefer a darker environment when coding, and having the Chrome window be dark except the part that I cannot hide, is making my eyes hurt. This is for the people that prefer the darker color scheme when developing.
Closes https://github.com/facebook/react-native/pull/11878

Differential Revision: D4494415

Pulled By: mkonicek

fbshipit-source-id: 423473ec073e6ddd0d14322c22ee37abed1c55bc
2017-02-02 04:43:51 -08:00
Peggy Rayzis a45246e354 Fix .gitignore of HelloWorld template to commit third party JARs
Summary:
Hi RN team! Thanks for all that you do. 🎉

**Motivation:**
I noticed in the [Buck docs](https://buckbuild.com/article/exopackage.html) (scroll down to Step 2) that it expects third party JARs to live in version control. Currently, the HelloWorld template ignores these dependencies from version control, which is a bit confusing.
Closes https://github.com/facebook/react-native/pull/11738

Differential Revision: D4494423

Pulled By: mkonicek

fbshipit-source-id: 37b946ad9c30af2b47b409bae6830bba5917491a
2017-02-02 04:13:59 -08:00
Martin Konicek 3ee3d2b4b2 CLI: Add basic Navigation template (Chat)
Summary:
Basic template using 'react-navigation' to make it easy to get started.

Not duplicating all the files in `android` and `ios` folders. These will be taken from the `HelloWorld` template. Let's not duplicate all of these files (it's a lot and they are large, especially the Xcode projects).

**Test plan (required)**

The app works locally. This PR is just a preparation for a next PR that will add support for 'react-native init --template Navigation'. Will have a proper test plan there.
Closes https://github.com/facebook/react-native/pull/12153

Differential Revision: D4494776

Pulled By: mkonicek

fbshipit-source-id: b43eafd7a1424477f9493a3eb4083ba4dd3d3846
2017-02-02 03:28:35 -08:00
Martin Konicek e3d4ace3ae BREAKING: [CLI] New app template: Resize UI when keyboard is shown on Android
Summary:
When building the Chat example for react-navigation, I realized the default Android behavior doesn't actually work:

<img width="868" alt="screenshot 2017-02-01 15 15 25" src="https://cloud.githubusercontent.com/assets/346214/22512559/518e3bf0-e891-11e6-9a86-2dafac5b250f.png">

(From https://developer.android.com/guide/topics/manifest/activity-element.html)

In my app there's a `<ListView>` and a `<TextInput>` below it. Without this PR the UI pans which is a very bad user experience.

Keyboard is hidden:

<img width="437" alt="screenshot 2017-02-01 15 21 15" src="https://cloud.githubusercontent.com/assets/346214/22512814/23fc93d4-e892-11e6-9e45-94041dbe8eba.png">

Keyboard is shown:

<img width="439" alt="screenshot 2017-02-01 15 26 56" src="https://cloud.githubusercontent.com/assets/346214/22513062/e4e1835c-e892-11e6-93b7-fe5616135b91.png">

 ---

Let's use "adjustResize", it seems to be a reasonable default in most cases and people can always change the constant in their AndroidManifest.xml
Closes https://github.com/facebook/react-native/pull/12154

Differential Revision: D4496428

fbshipit-source-id: c300ebe55bd93f8b243e0d7d0d6a132bc3a5a1c1
2017-02-01 12:58:28 -08:00
Charles Dick 76e3d45c34 Add cell size to JSC heap capture visualization
Reviewed By: bnham

Differential Revision: D4469000

fbshipit-source-id: 3e572bb7bdd83f79009d2059d543e03e6a57bba0
2017-02-01 10:58:30 -08:00
John Shelley b5421410ba Android - Update Gradle to 2.2.3
Summary:
Currently React Native's local cli is a bit behind in its android gradle plugin version. This PR is an attempt to update the local cli, to allow for better support moving forward.
* Updates the gradle plugin version to 2.2.3
* Updates the gradle wrapper to 2.14.1
* Uses the `all` for the project wrapper to include sources for API completion

**Test plan (required)**

* Perform all required steps here: https://github.com/facebook/react-native/tree/master/react-native-cli
   * Run the local npm tests and e2e tests (no longer available)
   * Test the local cli by using Sinopia

Make sure tests pass on both Travis and Circle CI.

TO NOTE: In a previous issue (https://github.com/facebook/react-native/issues/11500) I was able to update to 2.2.3 comfortably, however there may be other issue I am not aware of. This PR is intended to start discussion on what it will take to update.
Closes https://github.com/facebook/react-native/pull/11930

Differential Revision: D4489926

Pulled By: mkonicek

fbshipit-source-id: 35ff5ac6b1b8893854538d6b9fe2c2e042ecca9f
2017-01-31 13:13:32 -08:00