Commit Graph

541 Commits

Author SHA1 Message Date
Andrew Clark 0a712f5335 Revert D4615201: Sync React Native with React 16.0.0-alpha.3
Differential Revision: D4615201

fbshipit-source-id: e86961f37209c73838b5a4a564bc81eb48a911c2
2017-02-27 14:04:58 -08:00
Andrew Clark 24a7665df5 Sync React Native with React 16.0.0-alpha.3
Reviewed By: sebmarkbage

Differential Revision: D4615201

fbshipit-source-id: fc62b44aa866e096faa1cb048db361bb8c6ab11f
2017-02-27 14:04:58 -08:00
David Aurelio b6ca952eeb Symbolicate stack traces off the main process
Summary:
Moves stack trace symbolication to a worker process.

The worker process is spawned laziliy, and is treated as an exclusive resource (requests are queued).

This helps keeping the server process responsive when symbolicating.

Reviewed By: cpojer

Differential Revision: D4602722

fbshipit-source-id: 5da97e53afd9a1ab981c5ba4b02a7d1d869dee71
2017-02-27 14:04:57 -08:00
Bhuwan Khattar cf1bc8d644 s/react-native.js/react-native-implementation.js/
Summary: Renaming since a file with the same name as a package confuses packager

Reviewed By: cpojer

Differential Revision: D4613215

fbshipit-source-id: 5cfae71d0bb1eef2675689b37a9b42596d25678d
2017-02-27 14:04:57 -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
Nicholas Tate fe2ff122dc Docker Testing Environment for Android & JS
Summary:
Created a containerized environment to run unit and integration tests for both javascript and android as well as a Jenkinsfile using the new 2.0 Pipeline syntax for integration into a Jenkins CI cluster.

Here is a quick summary of the changes:

* The android image is built from two separate dockerfiles. There is a base image that handles the heavy lifting of dependencies that are infrequently changed while the secondary image extends the base and allows for much quicker incremental builds on code updates.
* The javascript image is simple and is relatively quick to build, therefore there is no base image for any react specific javascript dependencies and it is all packaged in a single docker image.
* A new `scripts/docker` has been created including some javascript files and shell scripts to aid in the running of the tests
* The instrumentation test runner script can be passed various flags to control which tests run since the entire suite takes a significant amount of time to run synchronously
* Jen
Closes https://github.com/facebook/react-native/pull/11902

Differential Revision: D4609238

Pulled By: ericvicenti

fbshipit-source-id: a317f3ac3be898180b009254a9604ca7d579a8b9
2017-02-24 10:59:53 -08:00
Cristian Carlesso 570c564e77 Update Jest to 19.0.2
Reviewed By: cpojer

Differential Revision: D4608167

fbshipit-source-id: c30febe287b4a7ad0237039cfdd5b6bd6fb66d1d
2017-02-24 08:30:50 -08:00
Jean Lauliac 564126f2bf packager: BatchProcessor: use Promise for processBatch()
Reviewed By: cpojer

Differential Revision: D4572495

fbshipit-source-id: 4a18b6ae16ea588104c337f2085707be07609005
2017-02-20 08:45:21 -08:00
Jean Lauliac 1a5b56d070 packager: introducing async/await, return of the yarn
Summary:
The first time I tried to commit this changeset, it was causing many new packages to be installed, because the dependency would depend on newer versions that what we have installed. So, I had made a diff so upgrade all the babel packages. Unfortunately this caused some problem as the newer versions of Babel are more strict on some syntaxes. Of course, these have to be addressed, but I don't want this changeset to be coupled with Babel upgrades and the issues that arise from it.

So instead, I decided to install the slightly older version of the async-to-generator module. At first I tried with just doing:

    yarn add babel-plugin-transform-async-to-generator@6.16.0

But, `yarn` is stubborn: because this module depends on a caret version of `babel-helper-remap-async-to-generator`, it installs the very last version of it, that itself needs more recent versions of other Babel modules. So, instead, I add to install a slightly older version of the dependency manually, then then the plugin:

    yarn add babel-helper-remap-async-to-generator@6.16.0
    yarn add babel-plugin-transform-async-to-generator@6.16.0

This allows us to have a `yarn.lock` with only a minimal amount of changes, and uncouple this change from any Babel upgrades. Because we only have a few new modules, the `node_modules` folder also stays the same, 133M, and it gives us confidence this will not cause significant startup time regressions.

Reviewed By: cpojer

Differential Revision: D4578733

fbshipit-source-id: deb0f720b895b7196aaf432adec3e56f18663940
2017-02-20 08:45:18 -08:00
Jean Lauliac c27c45cd45 Revert D4559304: FBReactKit/js: upgrade babel dependencies
Differential Revision: D4559304

fbshipit-source-id: fb371aecf48a2dc957ccc6d6715b8ee694335fec
2017-02-16 11:15:49 -08:00
Jean Lauliac 8be2a27aab Revert D4559167: packager: introducing async/await
Differential Revision: D4559167

fbshipit-source-id: de887a737ad1d02ef07a431ee0713d0bad65eb85
2017-02-16 10:59:57 -08:00
Jean Lauliac 26304dacf1 packager: introducing async/await
Summary:
allow-large-files

By using async/await the code is (1) less nested, (2) more compact and (3) more robust (no exceptions running away, and much less risks of forgetting to call the callback/resolve, or mistakenly calling it twice). I now tend to think we could switch to it for all the callsites that are not in a perf-critical path.

I switched from 'request' to 'node-fetch' because 'request' has an annoying callback with 2 arguments. So it's simpler to use an interface that's (1) already returning a Promise and (2) that is becoming standard.

This changeset was a way for me to start experiment with introducing async/await in packager codebase, and it looks pretty good so far.

Reviewed By: cpojer

Differential Revision: D4559167

fbshipit-source-id: 89a328c5766c2ba890e9d0e67a81a38dac6cfc73
2017-02-15 13:47:52 -08:00
Jean Lauliac 8d0c90c2b8 FBReactKit/js: upgrade babel dependencies
Reviewed By: zertosh, bestander

Differential Revision: D4559304

fbshipit-source-id: 797555447f789d09150b0d4b95b27fcac0aacdc6
2017-02-15 13:47:52 -08:00
Sebastian Markbage b1da7a5f5d Sync React
Summary:
Syncs the latest changes from the React GitHub repo and takes a dependency on React 16 alpha.

I had to hide the type checker stuff behind `__DEV__` because they now throw in production.

Also disabled flow for findNodeHandle for now since we have some further clean up to do.

Reviewed By: spicyj

Differential Revision: D4526535

fbshipit-source-id: af5d282e75afbb293560b62fc72657461c24bdd1
2017-02-14 20:00:34 -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
Jeff Morrison 64f3688473 fbobjc deploy
Reviewed By: gabelevi

Differential Revision: D4544571

fbshipit-source-id: 0b0776d91dea647b0b84a9ca400019aef49963f4
2017-02-13 10:30:39 -08:00
Sebastian Markbage 0cb7316311 Unmock and disable tests in the React renderer
Summary:
We should unmock React just because we do that elsewhere and tests work better
that way. I was trying to get React tests working in this repo but because
we do so many special things in the React Core repo I gave up.

These test run in the React Core repo already.

Reviewed By: spicyj, bvaughn

Differential Revision: D4541126

fbshipit-source-id: ffbb1b76aac910a976222db91b80b8839fcecc60
2017-02-10 13:49:29 -08:00
Marc Horowitz aada1afa2e Add scripts to fetch external third-party dependencies.
Summary:
This downloads, uncompresses, and configures folly and its
dependencies: boost, double-conversion, and glog.

Reviewed By: bestander

Differential Revision: D4434066

fbshipit-source-id: 8f9d18448ef139e450a8c45a64d6a066d731ac8f
2017-02-01 14:14:32 -08:00
Gabe Levi a4bfac907e Deploy v0.38.0
Reviewed By: jeffmo

Differential Revision: D4428858

fbshipit-source-id: 10dc69349a2b563e1fa444a8b0612e3b2d4ccd1c
2017-01-18 11:13:30 -08:00
Jean Lauliac 28f1c67ced packager: centralize babelRegisterOnly callsites
Reviewed By: davidaurelio

Differential Revision: D4380987

fbshipit-source-id: db34e56b2025fb072798ef2cc3e52f3d1cb7c33c
2017-01-06 06:13:54 -08:00
David Aurelio 21e8d2a47b Upgrade babel dependencies
Reviewed By: bestander

Differential Revision: D4377311

fbshipit-source-id: 4d9e70b08de94be839d0562fcd4d320feaffc4d6
2017-01-03 10:44:24 -08:00
Cristian Carlesso a69b480cae Update RN to Jest 18
Reviewed By: cpojer

Differential Revision: D4335580

fbshipit-source-id: c48b6882b89aa20f9f58783b5a17edf94df22223
2016-12-19 04:43:30 -08:00
Jean Lauliac 26ed94c0fd packager: Terminal abstraction to manage TTYs
Reviewed By: cpojer

Differential Revision: D4293146

fbshipit-source-id: 66e943b026197d293b5a518b4f97a0bced8d11bb
2016-12-14 05:14:06 -08:00
Jeff Morrison d926aecd77 fbsource
Reviewed By: samwgoldman

Differential Revision: D4314897

fbshipit-source-id: fbe11da4c63bf34d010220d74177cb3ca4cbee6d
2016-12-13 18:58:34 -08:00
Martin Konicek 9b0e15cbb2 Remove dependency on Yeoman
Summary:
We stopped using Yeoman in https://github.com/facebook/react-native/pull/10786

I almost forgot to remove the now-unused dependency :)

**Test Plan**

- Published react-native to Sinopia
- Ran `react-native init MyApp`
- The app was generated correctly
- The app's node_modules folder doesn't contain Yeoman

Reviewed By: cpojer

Differential Revision: D4291619

fbshipit-source-id: 44c1ef8035fa2d8c40d4e8c505207245e1a95d3c
2016-12-07 10:43:48 -08:00
Andres Suarez 6470c3fb51 Remove unused deps
Reviewed By: davidaurelio

Differential Revision: D4267485

fbshipit-source-id: 1118328960258969c775f61f598341d1d48d336a
2016-12-05 08:43:28 -08:00
Tim Yung c76f5e1ae5 RN: Move `core` to Shared
Reviewed By: cpojer

Differential Revision: D4250233

fbshipit-source-id: 8c42bed47559c477be039d47e3f4fd1fac503152
2016-11-29 23:13:50 -08:00
Gabe Levi bf901d926e Deploy v0.36.0
Reviewed By: zertosh

Differential Revision: D4237912

fbshipit-source-id: cc251884350ffa3c8715a4920f90bd301e8a9b7f
2016-11-28 10:13:31 -08:00
Jean Lauliac 5d30045211 packager: add GlobalTransformCache
Reviewed By: davidaurelio

Differential Revision: D4175938

fbshipit-source-id: 1f57d594b4c8c8189feb2ea6d4d4011870ffd85f
2016-11-24 09:58:31 -08:00
David Aurelio ca58e0af82 BREAKING kill deprecated asset support
Summary:
This removes support for `require('image!…')`, which has been deprecated for a long time.

It is still possible to use images that are already bundled by the native app using the `nativeImageSource` module.
Check http://facebook.github.io/react-native/docs/images.html for detailed documentation.

Reviewed By: matryoshcow

Differential Revision: D4231208

fbshipit-source-id: 05ec4c1ca0fabdc3fbb652f8ad1acdf240a67955
2016-11-24 05:43:38 -08:00
Andres Suarez 7e6ff74bc9 Update babel & friends
Summary:
* babel 6.19.0 (https://github.com/babel/babel/releases/tag/v6.19.0)
* babylon 6.14.1 (https://github.com/babel/babylon/releases/tag/v6.14.0)
  * Now supports optional names for function types and object type indexers.

Reviewed By: bestander

Differential Revision: D4219045

fbshipit-source-id: d694c079e3176f426949f7859b6d2dfaab60a707
2016-11-22 10:43:28 -08:00
Martin Konicek a477aec10d Rewrite 'react-native init' and 'react-native upgrade' without using Yeoman in preparation for templates support
Summary:
This is the manually imported version of https://github.com/facebook/react-native/pull/10786

This was mostly straigthforward by replacing the local-cli folder with the version I had in my local git checkout,
plus a few other files I listed with git diff --name-only.

Reviewed By: hramos

Differential Revision: D4201118

fbshipit-source-id: 4d0fb54b0edda9de1abba427958e420fd2ac105c
2016-11-18 18:28:51 -08:00
Christoph Pojer ba19897baa Update Jest
Reviewed By: kentaromiura

Differential Revision: D4196928

fbshipit-source-id: 601fae51cb7e04668bf59f0344f5e22d063cc15f
2016-11-17 21:58:28 -08:00
Joe Savona 2a2ba52ab5 update to graphql@0.8.2
Reviewed By: kassens

Differential Revision: D4183254

fbshipit-source-id: ecc648d51e61f020ad5f624585e2a6fe01584381
2016-11-17 13:13:30 -08:00
Andres Suarez 13ae1a3c03 redux, react-redux and redux-thunk to devDeps
Reviewed By: davidaurelio

Differential Revision: D4189290

fbshipit-source-id: 31c08688c2ecd74fa259096060034ae3083e1909
2016-11-16 06:58:47 -08:00
Andres Suarez c22b00e58f Revert D4182752: redux, react-redux and redux-thunk to devDeps
Differential Revision: D4182752

fbshipit-source-id: ba6af3a754ae4a719605aa68f730c741da192a55
2016-11-16 00:58:31 -08:00
Andres Suarez 262a0fab76 redux, react-redux and redux-thunk to devDeps
Reviewed By: davidaurelio

Differential Revision: D4182752

fbshipit-source-id: e224310be4bb7ff91467d408ecf053e98e0029b5
2016-11-16 00:13:51 -08:00
Andres Suarez 0c9eeef88e Keep flow-bin only in devDeps
Reviewed By: davidaurelio, jeffmo

Differential Revision: D4182434

fbshipit-source-id: 71f46e4af6df01dc211599294867d17899318fd1
2016-11-15 07:58:42 -08:00
Christoph Pojer 3bd949cac7 Update Jest + jest-haste-map
Reviewed By: voideanvalue

Differential Revision: D4180887

fbshipit-source-id: f6ee6901e63206824f0639c81b64167b66da2168
2016-11-15 06:58:45 -08:00
Andres Suarez 72157cf991 Remove parse
Reviewed By: davidaurelio

Differential Revision: D4174312

fbshipit-source-id: 024ae3da56c1afd882f808c15a3b90db35627587
2016-11-15 04:59:48 -08:00
Gabe Levi 61d1a4fb39 Deploy v0.35.0
Reviewed By: davidaurelio

Differential Revision: D4177391

fbshipit-source-id: c02cf98ed275b7032103b11eab6d0e189f8d8f24
2016-11-14 20:45:17 -08:00
Konstantin Raev 015a497cf1 Revert D4149694: [RN] Update Jest + jest-haste-map
Differential Revision: D4149694

fbshipit-source-id: 65a39bc1d0a0f9e7094ebc8dec9233e432a5e14d
2016-11-14 12:43:51 -08:00
Andres Suarez 5f6cd3d145 graphlib-dot to devDeps
Reviewed By: sam-swarr

Differential Revision: D4169984

fbshipit-source-id: c47091f261420dbe54f69f91a3826f0590c10bd5
2016-11-14 10:29:35 -08:00
Andres Suarez c9c8e5ca32 Dedupe babel-* deps
Reviewed By: davidaurelio

Differential Revision: D4154815

fbshipit-source-id: bbccdaadbdd4e8a5528cb28211fa8f22546794db
2016-11-10 08:29:01 -08:00
Christoph Pojer 2382ffe9bc Update Jest + jest-haste-map
Reviewed By: matryoshcow

Differential Revision: D4149694

fbshipit-source-id: 4f8378c419ddc7978e05dfcf2112e833775391be
2016-11-10 06:28:38 -08:00
Andres Suarez 50d18280e7 Tidy up deps
Summary:
* `module-deps` isn't unused anywhere - though it once was part of the packager.
* `jstransform` is used in `/website`, but that has its own `package.json` - which is meant to be installed when you're going to push a site update (see the README).
* `JSONStream`,`duplexer`, `opener` and `split` are used internally (that's why they're devDeps).

Reviewed By: davidaurelio

Differential Revision: D4147609

fbshipit-source-id: 75c5f3568a55c49cd2802165cd1f23aa84c07943
2016-11-09 00:14:02 -08:00
Jeff Morrison bd3be5bd24 Update fbsource
Reviewed By: zertosh

Differential Revision: D4111832

fbshipit-source-id: 301969a1c828fb87e7e09c1eea3cd44799b89509
2016-11-08 12:43:48 -08:00
Jean Lauliac ea016db37b JSTransformer/worker: cache transformed code as separate files
Reviewed By: davidaurelio, cpojer

Differential Revision: D4051477

fbshipit-source-id: 0179ce18dd20c00083ae05b5cf5f925659e7c056
2016-11-08 03:43:37 -08:00
Andres Suarez d2bdc24ecd Move graphql from deps to devDeps
Reviewed By: cpojer

Differential Revision: D4139626

fbshipit-source-id: 52e5c19cf3b472c0b62a0ae18fb7bb21f0d88841
2016-11-07 03:13:35 -08:00
Andres Suarez 237ab33ff4 Upgrade to lodash@^4.16.6
Summary:
This diff updates `lodash` so that it's optimally deduped, resulting in:

* reducing the packager's load time by ~300-400ms.
* reduces the size of `node_modules` from ~225MB to ~148MB.
* reduces the time to do a clean `yarn install` from 35s to 18s.

Lots of dependencies (including every `babel-*`) use `lodash@4`, by having `lodash@3` as a root dependency, each package had to have it's own copy of `lodash@4`. Now, there's only one.

The uses of `lodash` in RN are restricted to the CLI/packager, and the uses are pretty basic. The breaking APIs don't really seem to affect us https://github.com/lodash/lodash/wiki/Changelog#v400.

Reviewed By: bestander

Differential Revision: D4124836

fbshipit-source-id: 0849c385fcafe10b463e684fea47be6775982386
2016-11-06 02:43:32 -08:00
Matthew Dapena-Tretter a643784144 Allow arguments in the editor env var
Reviewed By: frantic

Differential Revision: D4129207

fbshipit-source-id: a92fbbbe917db9c9afc0d970e3ac546e2a14bced
2016-11-04 12:59:17 -07:00
Jan Kassens 0bbf9db832 Add graphql@0.6.2
Reviewed By: cpojer

Differential Revision: D4129981

fbshipit-source-id: bc45ffa6b4f0eb49a607f0e645ad9b582a274ab8
2016-11-04 09:58:43 -07:00
David Aurelio 3683beb88a RN: Update React (2/2)
Reviewed By: kentaromiura

Differential Revision: D4026114

fbshipit-source-id: 67808af91454d95941fea01eef58a4d9086f46e1
2016-11-04 05:43:44 -07:00
David Aurelio b76ab8e3a1 RN: Update React (1/2)
Reviewed By: kentaromiura

Differential Revision: D4026052

fbshipit-source-id: 5ad128be6a1fafb0c2bf831219c1f54234944eed
2016-11-04 05:43:43 -07:00
Andres Suarez 680df8900b Update babel and co.
Summary:
This update is necessary in order to update to [Flow 0.34.0](https://github.com/facebook/flow/releases/tag/v0.34.0) - which has new syntax to annotate [variance](https://flowtype.org/blog/2016/10/04/Property-Variance.html). The new syntax is available starting in [babel 6.18.0](https://github.com/babel/babel/releases/tag/v6.18.0) and [babylon 6.13.0](https://github.com/babel/babylon/releases/tag/v6.13.0) - both must be used in conjunction.

Transitive dependencies were also updated, otherwise `node_modules` wouldn't dedupe enough (increasing from ~225MB to 300+MB).

This diff copies D4051237.

Reviewed By: yungsters

Differential Revision: D4113693

fbshipit-source-id: 0b834683a9930822f5f77099858c6e5484c09e7c
2016-11-02 05:43:43 -07:00
Cristian Carlesso 6d3e074dd4 Adding Jest preset so that people can configure Jest using react-native as preset
Reviewed By: cpojer

Differential Revision: D4081817

fbshipit-source-id: 43cf2ec467ea69651705162b6a58e0b3f1ad1dbf
2016-10-31 12:58:35 -07:00
David Aurelio 61ddf0effe Update all the babel things
Reviewed By: bestander

Differential Revision: D4051237

fbshipit-source-id: ebe919d336b8e4f5d58ef12186026aac37cbc7f2
2016-10-22 06:43:52 -07:00
Tim Yung 4804190be1 RN: Upgrade to ESLint v3.8.1
Reviewed By: zertosh

Differential Revision: D4045668

fbshipit-source-id: d7859eb50e9366e033e3dd6c3b184716fcb88a1c
2016-10-20 08:58:52 -07:00
Cristian Carlesso 6a462fb085 Moving the jest configuration from jest-react-native to react native.
Reviewed By: cpojer

Differential Revision: D3923609

fbshipit-source-id: 62804df81b064871b499ae8c091e13dd1e0f229b
2016-10-17 08:44:05 -07:00
Ovidiu Viorel Iepure ceb9ce36ae Rate limit HasteMap
Reviewed By: davidaurelio

Differential Revision: D4021676

fbshipit-source-id: 383f9a17ac8ede72f41939192ec25a6277a36864
2016-10-14 12:13:41 -07:00
Cristian Carlesso 9ffe2ee0d8 Updating jest to 16.0.1
Reviewed By: cpojer

Differential Revision: D4001464

fbshipit-source-id: cbbf6a9d77605657151c86334fbc03d21f16e5fd
2016-10-13 13:13:46 -07:00
David Aurelio aef3d8128f Add `js_file` rule
Reviewed By: matryoshcow

Differential Revision: D3900455

fbshipit-source-id: 61384ade035db978ef3ca258e4c0109bcb450692
2016-10-05 09:28:50 -07:00
Ovidiu Viorel Iepure 6130650d93 Replacing node-haste with jest-haste-map
Summary: Modified `node-haste` implementation to use the much faster `jest-haste-map` under the hood. The underlying `fastfs` now gets passed the entire file list from the `jest-haste-map` rather than crawl the filesystem.

Reviewed By: cpojer

Differential Revision: D3724387

fbshipit-source-id: 447d58ea0edf283662ec23d1e2deee992cf8d240
2016-10-03 05:28:56 -07:00
Tim Yung 0e2591e90b RN: Fix `flow-bin` Dependency
Reviewed By: jeffmo

Differential Revision: D3957804

fbshipit-source-id: a05026d36e5d3eff45dbc982250d3ff887cbb581
2016-10-02 20:58:42 -07:00
Tim Yung feced42fea RN: Upgrade ESLint Packages
Reviewed By: vjeux

Differential Revision: D3946990

fbshipit-source-id: f1be05ee7efed63e54c133d790b193b61e40ea36
2016-10-01 17:58:31 -07:00
Jeff Morrison 1a9853da37 fbobjc
Reviewed By: gabelevi

Differential Revision: D3949455

fbshipit-source-id: 1cbce4a85fe5b8798496752863bbca64b078aa9c
2016-10-01 11:16:21 -07:00
David Aurelio 7a02b400be Update `source-map` to v0.5.6
Summary: The newer versions of `source-map` fixed some bugs related to decoding mappings.

Reviewed By: bestander

Differential Revision: D3923727

fbshipit-source-id: cc1c87bbadeb128316965823d81ef5ca46a6845c
2016-09-26 09:13:33 -07:00
zxcpoiu f839627605 update base64-js version. follow up #6961
Summary:
**Motivation**
This is originally a follow up of PR #6327 by dewe and jeremyong
And mkonicek indicated this should split into a separate PR.

Now philikon takes over #6327 as #6961

**Test Plan:**
According to #6961 and #6889
Load WebSocketExample in UIExplorer app and start websocket test server script and test sending binary data on both iOS and Android
Closes https://github.com/facebook/react-native/pull/6937

Reviewed By: javache

Differential Revision: D3669596

Pulled By: mkonicek

fbshipit-source-id: 342e29eb34de882bcbd9f297aab71dd6bb236748
2016-09-20 05:43:36 -07:00
Cristian Carlesso 7b2080e118 Removing automatically reset modules between test run
Reviewed By: bestander

Differential Revision: D3886125

fbshipit-source-id: c8f47c3466add1e2c89649a1c6f47b01f0d7a89e
2016-09-19 12:43:55 -07:00
James Ide 0162be8fc3 Change React version to 15.3.1 (no more RC)
Summary:
React 15.3.1 has been published; stop using the RC.
Closes https://github.com/facebook/react-native/pull/9783

Reviewed By: bestander

Differential Revision: D3876515

Pulled By: mkonicek

fbshipit-source-id: 2ad990b55359e445dad9119b7434930c0cc72eda
2016-09-16 06:13:35 -07:00
Kevin Lacker 857bae4ea3 Replace the deprecated esprima-fb parser with flow-parser, on the RN website
Summary:
(I changed a ton from when I previously submitted this PR so please take another look if you already did.)

PROBLEM: the no-longer-maintained `esprima-fb` parser does not support class properties, leading our website docgen to die if we use class properties, which we're gonna do real soon now
SOLUTION: use `flow-parser` instead, which the flow team is maintaining including all the fancy-pants ES? stuff that FB uses internally.

This removes the `esprima-fb` parser from jsdocs and replaces it with `flow-parser`. It's almost the same, I checked by diffing all the parser json output and it only had a few irrelevant differences. I had to add a file of constants so that we could remove esprima-fb altogether, too.

This also adds a couple unit tests, so that we can test that jsDocs works programmatically. They don't run if you run the regular RN tests, you have to run `npm test` from the `/website/` subdirectory.
Closes https://github.com/facebook/react-native/pull/9890

Differential Revision: D3865629

Pulled By: bestander

fbshipit-source-id: 8f561b78ca4a02f3f7b45e55904ec2fa911e3bb6
2016-09-14 14:28:44 -07:00
David Aurelio 24736d1188 module graph
Summary:
This piece of code can assemble all transitive dependencies of a set of entry modules. It is supposed to replace `ResolutionRequest.getOrderedDependencies`.

It has the following advantages:
- has minimal API surface to other components of the system (uses two functions, exposes one function)
- allows to separate concerns into loading + transforming files, resolving dependencies, gathering all modules belonging to a bundle (this code), and bundling
- allows to specify multiple entry points
- allows to use any kind of dependency ID as entry point (haste IDs, node module IDs, relative paths, absolute paths – depends on the resolver)
- allows to skip files, which allows callers to incrementally update previously retrieved collections of modules

Reviewed By: cpojer

Differential Revision: D3627346

fbshipit-source-id: 84b7aa693ca6e89ba3c1ab2af9a004e2e0aaed3d
2016-09-14 10:28:34 -07:00
kentaromiura 8689b0f21c Adding jest and jest babel preset to the react-native init command
Summary:
Adding jest and its presets to the react-native init command

**Test plan (required)**
run react-native init foo (using `npm link` to use the local `react-native` version)
inside foo there are now a .babelrc file and the package.json is set up as described by
https://facebook.github.io/jest/docs/tutorial-react-native.html#setup
Closes https://github.com/facebook/react-native/pull/9719

Differential Revision: D3843037

Pulled By: bestander

fbshipit-source-id: 004e27ebd3f257a202ed43f378d6fe6cc23ced52
2016-09-09 17:43:42 -07:00
Gabe Levi 85a6f011b6 Deploy v0.32.0
Reviewed By: jeffmo

Differential Revision: D3821852

fbshipit-source-id: 01fd16707cba860a830d682a2af2bdd542605abf
2016-09-06 13:43:47 -07:00
Christoph Pojer d7fdc448d5 Update to Jest 15
Reviewed By: kassens

Differential Revision: D3805404

fbshipit-source-id: 0aa60cf1be889b306b41876f7b09f4f7f933fcf1
2016-09-02 05:58:34 -07:00
Pieter De Baets 3aee63e6a2 Reverted commit D3780708
Reviewed By: jsaluja

Differential Revision: D3780708

fbshipit-source-id: 6c3ff6b77bce1d6b05fc35c98fd8ac3fc7d7f7bd
2016-08-29 22:29:02 -07:00
Prashanth Sampath Kumar 0fe49c5b6c Adding react-native-camera
Reviewed By: jsaluja

Differential Revision: D3780708

fbshipit-source-id: d5e614fad82925940adce762eaf4ffbd38b1cd5b
2016-08-29 16:29:29 -07:00
Jeff Morrison 5a5c56c8a9 fbsource deploy
Reviewed By: gabelevi, bestander

Differential Revision: D3753032

fbshipit-source-id: 47aadb8a54f47c40f0133966df588d42cdbe0d80
2016-08-23 10:28:53 -07:00
Paul O'Shannessy 7655e537ed Upgrade to React v15.3.1-rc.2
Reviewed By: spicyj, sebmarkbage

Differential Revision: D3720586

fbshipit-source-id: c739762a2c263b7dd0c321311e4c173e9dcacfcf
2016-08-16 11:28:32 -07:00
Adam Miskiewicz 757ab0b936 Add `--config` option to CLI to allow passing a path to an `rn-cli.config.js`
Summary:
Currently we just try to resolve a rn-cli.config.js file by walking up the tree from node_modules/react-native. In non-standard uses of RN, when your copy of RN may not live within node_modules, it's impossible to use rn-cli.config.js. This PR adds a "config" flag to the cli that let's you pass in a path to rn-cli.config.js.

cc ide
Closes https://github.com/facebook/react-native/pull/7883

Differential Revision: D3382823

Pulled By: bestander

fbshipit-source-id: b946f3bb355050fc2fe99273d0e99e441dbed111
2016-08-12 11:58:33 -07:00
Tim Yung 1a37527606 JS1: Bump `sane` Dependency Version
Reviewed By: jingc

Differential Revision: D3700427

fbshipit-source-id: caa444d0be352a28e18339c1e35037a6b9ee622c
2016-08-10 17:28:33 -07:00
Pieter De Baets 910d0e1d8b Have React only as a peer dependency
Reviewed By: davidaurelio

Differential Revision: D3683793

fbshipit-source-id: 6ffb8c24e81cfb33b11b9f99d440220287161fb6
2016-08-09 03:58:36 -07:00
Pieter De Baets cb59264e73 Specify React dependency correctly
fbshipit-source-id: c25ad1b942e75d9a631134fc277306931c7bc859
2016-08-08 04:28:32 -07:00
Pieter De Baets 631b1beeb6 Unbreak upgrade to React 15.3.0
fbshipit-source-id: 0373b4dd11895f3b1c76a904a0a59b70aaa845f9
2016-08-08 03:58:29 -07:00
James Ide 02b71cb7b5 Use React 15.3.0 instead of 15.3.0-rc.2
Summary:
React 15.3.0 was officially released. We especially should try not depend on RCs in RN releases and npm doesn't handle RC versions well.
Closes https://github.com/facebook/react-native/pull/9279

Differential Revision: D3683587

fbshipit-source-id: fc4f8a030769232b7697434a419e1e07e482e308
2016-08-08 02:28:30 -07:00
Konstantin Raev 1f603ffca9 Fixed version of jest to 14.1.0
Reviewed By: cpojer

Differential Revision: D3655343

fbshipit-source-id: 5987b0e3f247c68f9d6b70de39992da4dc0df4ed
2016-08-03 05:28:29 -07:00
Gabe Levi e34dd4f938 Deploy v0.30.0
Reviewed By: avikchaudhuri

Differential Revision: D3654213

fbshipit-source-id: b03879345ad9beae73a055c1b2e7211d074a08f0
2016-08-02 20:58:28 -07:00
Mike Grabowski e8b508144f Merge `rnpm cli` into react-native
Summary:
This is an initial step of rewriting the CLI interface to use `rnpm` one (commander, plugins etc.).

It's scope is to move all existing commands to use rnpm CLI interface, so that we get plugins, flags and our existing ecosystem working out of the box.

<s>This is still WIP and some of the commands are left commented out.</s>

For the `config` of `rnpm` (functions get info about project and dependency), <s>I am thinking we can merge them with</s> we decided to merge it with [`default.config.js`](e57683e420/local-cli/default.config.js (L33)), so they are available on the `new Config()` [instance](e57683e420/local-cli/cliEntry.js (L59)) (which means we don't have to change anything and current plugins, like runIOS and runAndroid can just start using it [w/o depending on any extra argument](https://github.com/grabbou/react-native/blob/e57683e420210749a5a6b802b4e
Closes https://github.com/facebook/react-native/pull/7899

Differential Revision: D3613193

Pulled By: bestander

fbshipit-source-id: 09a072f3b21e5239dfcd8da88a205bd28dc5d037
2016-07-30 09:13:46 -07:00
David Aurelio 667aaa4621 Bring back node-haste to fbsource
Summary:
Since jest stopped using node-haste a while ago, we are the only client left.
This brings back node-haste back to fbsource to allow us to iterate faster.

Reviewed By: bestander

Differential Revision: D3641341

fbshipit-source-id: a859f8834765723a3515e2cf265581b9dd83997c
2016-07-29 11:15:02 -07:00
Christoph Pojer 75ecaf4190 Update to 14.0
Reviewed By: kassens

Differential Revision: D3627753

fbshipit-source-id: 35b8246c8cb61e60908d8c233a6e72063bf67096
2016-07-27 22:13:26 -07:00
Paul O’Shannessy 5db5ee9f55 Upgrade to React v15.3.0-rc.2
Summary:
There were several fixes to how calls to propType checkers. This is to
account for the new deprecation warning - React.PropTypes will not be
part of production builds in the future.

Note: There is still a warning about an invalid argument to `React.PropTypes.oneOf` (React is running that validation sooner now). Specifically [both of these](b1e49832ef/Libraries/Components/Touchable/TouchableWithoutFeedback.js (L44-L45)) because `View.AccessibilityTraits` is actually undefined in tests (didn't look into why you conditionally set that).

**Test plan (required)**

`npm test` & fixed all warnings due to proptype secret
Closes https://github.com/facebook/react-native/pull/8758

Reviewed By: zpao

Differential Revision: D3564288

Pulled By: bestander

fbshipit-source-id: 1ff1f90907f41855e364048aa730ccd239c522b4
2016-07-21 09:13:29 -07:00
Bart den Hollander 25ed41cc94 update yeoman-generator to 0.21 because of RegExp DoS issue
Summary:
Installing react-native gives a warning because of outdated version of yeoman-generator. The warning is ```npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue```.
This MR will update the yeoman-generator version to 0.21.0 to resolve this warning.
Closes https://github.com/facebook/react-native/pull/8859

Reviewed By: matryoshcow

Differential Revision: D3580087

Pulled By: bestander

fbshipit-source-id: 4daddd804679ab8e95e59cf0d0005f87d2f48e1c
2016-07-19 04:37:01 -07:00
Konstantin Raev 7aeaf7d941 Updated React to 15.2.1
Reviewed By: zpao

Differential Revision: D3569832

fbshipit-source-id: 2a2aea8c68fb15e2772d30ddce03bad73fd0a259
2016-07-15 14:43:31 -07:00
Konstantin Raev 6eb318d87d update flow to v0.29.0
Reviewed By: davidaurelio

Differential Revision: D3569889

fbshipit-source-id: b2330456db2cde8296b2dc8d05bcb4db9638db6e
2016-07-15 10:58:31 -07:00
Konstantin Raev eb7442ba09 Opt in to use fetch from node_modules
Reviewed By: davidaurelio

Differential Revision: D3555235

fbshipit-source-id: 801b28278d0f424e86852d588d4348966751255e
2016-07-14 04:58:42 -07:00
Mark Oswald 91ff6868a5 Use HTTP range requests (responses) to serve mp4 from assets
Summary:
This PR solves a problem when video assets are used from third-party React Native components (e.g. [react-native-video](https://github.com/brentvatne/react-native-video). The video will not work while the assets are served from the react native packager because the used video component (iOS) relies on HTTP range requests.

I added a small fix that allows ranged requests (e.g. mp4) to be served in ranges.

To test this:

1. make new react native project
1. add [react-native-video](https://github.com/brentvatne/react-native-video) to xcode project
1. add video component to your project
```
import Video from 'react-native-video';
var resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
/* ... /*
render() {
    let source = resolveAssetSource(require('./someVideoFile.mp4')) || {};
    return <Video /*....*/ source={source} />;
}
```

That should not work (if video is smaller than a few megabytes, open app a few times). Then add my fix, that should do the trick.
Closes https://github.com/facebook/react-native/pull/8219

Reviewed By: davidaurelio

Differential Revision: D3542485

Pulled By: frantic

fbshipit-source-id: e4f2e4d3aaafa8445e965259bf04ad107dba8a4f
2016-07-13 03:58:22 -07:00
tychota c4fc504094 Fix the yeoman-environment version
Summary:
This closes #8610.
The release of 1.6.2 of yeoman-environment break react-native (since there is no lib folder)
Yeoman will be removed from RN as #8197 anyway.

Thanks cpsubrian, RobTS

**Test plan (required)**

I installed the 1.2.7 version and copied it in react-native nodes_modules.
Then I ran react-native upgrade

<img width="1337" alt="screen shot 2016-07-06 at 21 09 33" src="https://cloud.githubusercontent.com/assets/13785185/16631160/075fc422-43be-11e6-8625-92f03075b007.png">
Closes https://github.com/facebook/react-native/pull/8614

Differential Revision: D3524043

fbshipit-source-id: 1def4854ca0fd881b8a935f37c86eb373dfd97c5
2016-07-06 13:13:27 -07:00
Jeff Morrison 7795918eb4 Unrevert D3518381
Reviewed By: gabelevi

Differential Revision: D3522895

fbshipit-source-id: 52f28c7f3142566a07d8bc845be882aeda098809
2016-07-06 12:58:41 -07:00
Ian Childs 0fde81c816 Reverted commit D3518381
Reviewed By: gabelevi

Differential Revision: D3518381

fbshipit-source-id: 645c25191d5e7cff7689bd4dc583c478eba46496
2016-07-06 09:43:37 -07:00
Jeff Morrison a8e6a236cc fbobjc -> Flow v0.28
Reviewed By: gabelevi

Differential Revision: D3518381

fbshipit-source-id: 2dd5f89177aaefbd098ba1fd3c193da111ff14c7
2016-07-06 08:58:42 -07:00
David Aurelio 0d58314fa6 Update eslint
Reviewed By: bestander

Differential Revision: D3517152

fbshipit-source-id: 785b273cf197f313ddba769377c2a9f672c4b10b
2016-07-05 10:58:50 -07:00
David Aurelio bd60d828c5 Remove `node_modules/react` from the list of discoverable haste modules
Summary: This removes `node_modules/react` from the list of directories that are used for haste module resolutions. Modules required from React are now imported with `require('react/lib/…')`.

Reviewed By: astreet

Differential Revision: D3509863

fbshipit-source-id: 32cd34e2b8496f0a6676dbe6bb1eacc18124c01e
2016-07-05 06:44:33 -07:00
Christoph Pojer 65eee61f24 Update to 13.1
Reviewed By: kentaromiura

Differential Revision: D3516030

fbshipit-source-id: 739003d8c1984207312b650e424397a419c5eb6a
2016-07-05 01:13:51 -07:00
Ben Alpert 1a0c69f4b7 Update to React 15.2.0 final
Summary: This should have literally no changes from the RC that affect RN -- just a version bump.

Reviewed By: vjeux

Differential Revision: D3511116

fbshipit-source-id: 5bb3a330c0d2e78a2f3dfbb0e948c99607d2e66e
2016-07-01 14:28:21 -07:00
Christoph Pojer 52d5450ced Update Jest and add Jest-REPL/Jest-Runtime
Reviewed By: elynde

Differential Revision: D3496544

fbshipit-source-id: a19ae23bff88e99ef15ecc800378899c79cdee18
2016-06-29 19:58:31 -07:00
Sam Pepose 8b803c6143 Updated babylon/babel-* packages to latest version
Reviewed By: yungsters

Differential Revision: D3493809

fbshipit-source-id: aa2a8c804d6e2aae8afc9af8c1a577be28e998b8
2016-06-28 15:28:24 -07:00
Peter deHaan 550fed5ce8 Update ws dependency
Summary:
Fixes #7643
Closes https://github.com/facebook/react-native/pull/7644

Reviewed By: javache

Differential Revision: D3450187

Pulled By: davidaurelio

fbshipit-source-id: 59ffa1d6a198cc50e08973eee3a71653965b8467
2016-06-22 10:43:24 -07:00
Tim Yung 2c57f6e38f RN: Enable Flow Object Type Lint Rule
Reviewed By: voideanvalue

Differential Revision: D3460466

fbshipit-source-id: 9f5ca9a8a22827ab13b1b93044390bf6a95908af
2016-06-20 18:13:32 -07:00
Ben Alpert 92d6632d7a Update React to 15.2.0-rc.1
Summary:
Notable changes (excluding DOM-only things):

- Improved warning messages for propTypes and key warnings
- Production error codes
- Improved performance in DEV mode
- More accurate data in ReactPerf instrumentation
- Experimental JSON test renderer
- Minor bug fixes

Full changelog: fef495942a...c66f40f749.

Reviewed By: AaaChiuuu

Differential Revision: D3442002

fbshipit-source-id: 940fc65ba5d0b742417bbe2fcbd36eb9dc7443e1
2016-06-16 14:44:18 -07:00
Jeff Morrison df46891dfe v0.27.0: fbsource
Reviewed By: gabelevi

Differential Revision: D3421744

fbshipit-source-id: d72275fa70687a188c6175dbd193ab8d79d9051e
2016-06-13 14:28:25 -07:00
Konstantin Raev 592d5fb8f3 Changed version of React dependency to ~
Summary:
React has some internal code related only to React Native.
Some times React needs to update them which will result in a breaking change for React Native but it would not be a breaking change for React public API, so no major version bump will happen.
It means that a non breaking API bump may result in a break for React Native.
That is why React Native should not depend on a ^ of React version.

However React is a peer dependency to React Native and we want to give some flexibility to users to update React independently, so we don't fix the version strict and use ~ to allow patches.

This will be fixed once we extract RN specific code from React into an independent dependency.

Reviewed By: avaly

Differential Revision: D3398202

fbshipit-source-id: cca520f4b80c9ed5ae6fb1444f3d0bf7ffb9c9dd
2016-06-07 04:43:30 -07:00
James a966c85fce Added ReactCommon to package.json to allow for building locally
Summary:
This pull request solves an error building from source as noted in https://github.com/facebook/react-native/issues/7911 and https://github.com/facebook/react-native/pull/7118. The error says BUILD FAILED due to cxxreact module not found. Previously the ReactCommon folder was excluded when installed from npm. There may be a better way to include this folder, but I'm unfamiliar with FB's build process.

**Test plan (required)**

Create a new sample project by npm init, npm install --save https://github.com/opensports/react-native.git. Then run react-native run-android and the project should build successfully.
Closes https://github.com/facebook/react-native/pull/7929

Differential Revision: D3391332

fbshipit-source-id: 710cb741cea2e212767b21d606e3a459347b0fb9
2016-06-05 14:13:20 -07:00
Martin Konicek 7028929d8f react-native link calls into rnpm
Summary:
An initial integration of rnpm into 'react-native link'.

**Test plan (required)**

    react-native init MyApp
    cd MyApp
    # copied local-cli into MyApp's node_modules
    npm install --save react-native-vector-icons
    react-native link react-native-vector-icons

The link code ran, Android build files were modified.
Closes https://github.com/facebook/react-native/pull/7895

Reviewed By: bestander

Differential Revision: D3379197

Pulled By: mkonicek

fbshipit-source-id: 597158623ed072d7a7fc55a01624233a0f79de23
2016-06-03 09:13:20 -07:00
Basil Hosmer fe5c2615dd react-native-github: turn on strict type args in Flow, codemod stragglers
Reviewed By: frantic

Differential Revision: D3374980

fbshipit-source-id: 6dbefeffa588f676c8e162ba7ac7912b61a7711a
2016-06-03 02:43:57 -07:00
Steven Luscher 1b2d4266b9 Update `fbjs-scripts` to ^0.7.0
Summary:
`fbjs-scripts` 0.4.0 has Babel 5 as a dependency, which causes some amount of havoc when you're trying to use `react-native` in a project that's otherwise dependent on Babel 6 and using the flat-installing npm >=3.
Closes https://github.com/facebook/react-native/pull/7855

Reviewed By: frantic

Differential Revision: D3371679

Pulled By: steveluscher

fbshipit-source-id: 9f7643171d89da0de0492e7e97875f472725e990
2016-06-02 11:43:19 -07:00
Konstantin Raev 0b6764d18e Made React version not exact again
Summary:
React is a peer dependency and apps may depend on a wider range of versions of React, so strict dependency is not a good choice.
Also `react-native init` does `npm install react` internally creating package.json with `react: ^0.15.x`, this change makes versions consistent as well.

Reviewed By: matryoshcow

Differential Revision: D3365433

fbshipit-source-id: d2810662c36129ff9af184c359ac190544db75da
2016-05-31 08:28:33 -07:00
Gabe Levi d81cf658ef Deploy v0.26.0
Reviewed By: bhosmer, samwgoldman

Differential Revision: D3361342

fbshipit-source-id: c062656e3789784929102ba04c54be3be774d7dc
2016-05-27 17:58:32 -07:00
Robert Rose 98dd91825f Fixing Issue #7526
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

Fixing a bug detailed in Issue #7526 where Android app was crashing when using a binary number.

**Test plan:**
- Build & Run UIExplorer
- Build & Run UIExplorer with `const binaryNumber = 0b101010` inserted into UIExplorerApp.android.js
- Use `react-native init` to create a new blank project, then replace files in node_modules and insert `const binaryNumber = 0b101010` into index.android.js.
Closes https://github.com/facebook/react-native/pull/7730

Reviewed By: avaly

Differential Revision: D3353119

Pulled By: bestander

fbshipit-source-id: 098442da32a29c369f5932b7a4004e8d7f4cb91f
2016-05-26 13:43:29 -07:00
Eric Rozell 68af89dcbf Update node-haste dependency to 2.12.0
Summary:
Update to node-haste 2.12.0 to support pass through configuration of supported platforms.
Closes https://github.com/facebook/react-native/pull/7660

Differential Revision: D3335034

Pulled By: mkonicek

fbshipit-source-id: d238b90a90d51654301d61251ceb26d183fef57a
2016-05-23 10:28:34 -07:00
Shiran Ginige a3f50ec8a0 Fixing the issue on packager (failing with siblings error)
Summary:
The packager was failing with below error after a fresh clone

npm ERR! peerinvalid The package react@15.1.0 does not satisfy its siblings' peerDependencies requirements!

Changed the dependancy for **^react@15.1.0-alpha.1** to **^react@15.1.0** and it was fixed.
Closes https://github.com/facebook/react-native/pull/7692

Differential Revision: D3334425

fbshipit-source-id: ee86fc2e3c6f19b2430658d91d0a88c50bcf11de
2016-05-23 06:13:20 -07:00
Janic Duplessis 6961fd23ba Use a separate babel config for the local-cli and the packager
Summary:
This separates the babel config of the local-cli and the packager from the one used by the transforms of the packager since it doesn't run in the same environment and the local-cli/packager doesn't require react specific transforms and runs in node 4 so we can also avoid some es2015 transforms that node already supports.

I had to move the code in cli.js so it can still run in node 0.12 that doesn't support `const` since it is no longer transformed.

**Test plan**
Run the local-cli on node 0.12 and there should be a message saying that it requires at least node 4.
Run the local-cli on node 4 and 5 and everything should work the same as before.

I was also hoping for some perf gains but there was nothing noticeable. I did benchmark the babel-register call and it stayed pretty much the same. As for runtime performance it can help if there are optimisations for es2015 features in node.
Closes https://github.com/facebook/react-native/pull/6155

Reviewed By: bestander

Differential Revision: D3301008

Pulled By: davidaurelio

fbshipit-source-id: 504180d158a1e50bc03e28fb0d1e53d0731ce32f
2016-05-21 06:58:26 -07:00
Christoph Pojer 3977d0f5b9 Update to 12.1.
Reviewed By: vjeux

Differential Revision: D3329411

fbshipit-source-id: b59977beedcaa6c1f59d422566fae785c8537b16
2016-05-20 13:58:28 -07:00
Mike Grabowski 149d0b91c2 Merge rnpm into react-native
Summary:
This is initial (first step) in the merging process. For now, we are just going to move our code as is into `local-cli` folder (first commit). There were other tweaks made in separate commits to make it easier to go through the code as the diff is expected to be rather large. The purpose of this is to make it easier to start working in small batches and improving the CLI incrementally on a daily basis.

Current codebase will still leave in `rnpm` organisation on Github where we keep working on new features, bugs and ship releases to `npm` until we finish our integration and provide a nice interface for users to migrate (in case it changes at all)

Flow, Jest and npm will ignore this folder for now until we integrate it properly.

Tests are to be rewritten from mocha to jest in `rnpm/link`. We will hook them all up as soon as we start using them in local-cli.

For now, there's no point in having them running and possibly breaking the builds.

We will announce next steps with Kureev later this week
Closes https://github.com/facebook/react-native/pull/7550

Differential Revision: D3327772

Pulled By: mkonicek

fbshipit-source-id: 90faa4bd78476d93ed21b1253e0d95c755d28a30
2016-05-20 04:58:26 -07:00
Alex Kotliarskyi 858643dbdf Add transform-react-jsx-source to react-native preset
Summary:
Putting this up as request for comments.

The PR adds [transform-react-jsx-source](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx-source) to the list of plugins that come by default with the `react-native` preset. It will enable the use of a bunch of really cool tooling around JSX, however those are generally useful only in development mode. Is changing `react-native` preset the right thing to do in this case? Is there a way to enable this transform only in DEV? Should I add this somewhere else?
Closes https://github.com/facebook/react-native/pull/6351

Differential Revision: D3302906

Pulled By: frantic

fbshipit-source-id: 012d3a4142168f9f90d30d1686115d4dc3996eb9
2016-05-18 12:43:24 -07:00
Gabe Levi 0c40f96c32 Upgrade to v0.25.0
Reviewed By: jeffmo

Differential Revision: D3308221

fbshipit-source-id: c17b5ed861cfc201b8bd36f9c01218da25960001
2016-05-16 17:13:23 -07:00
David Aurelio e34c9c4e5f Include forwarding modules into npm package
Reviewed By: bestander

Differential Revision: D3301666

fbshipit-source-id: 723d87f1df217f0f1f78661bb6c41a9bbfab6814
2016-05-14 16:28:26 -07:00
Ben Alpert a95405f419 Update to React 15.1.0-alpha.1
Reviewed By: zpao

Differential Revision: D3283057

fbshipit-source-id: c37ea3818597e5c0f37ed3c7502c791c02183ea8
2016-05-10 15:58:24 -07:00
Pieter De Baets e76998531c upgrade graceful-fs to v4.1.3 (2)
Reviewed By: bestander

Differential Revision: D3260213

fb-gh-sync-id: a23a275d022006dd44c993217385a3fe6d6ff88c
fbshipit-source-id: a23a275d022006dd44c993217385a3fe6d6ff88c
2016-05-04 13:58:29 -07:00
Pieter De Baets c4e79a4f54 upgrade node-haste to v2.11.0
Reviewed By: davidaurelio

Differential Revision: D3259486

fb-gh-sync-id: 220378ca5d2b83d30b196a2a825a9becaf6b2b32
fbshipit-source-id: 220378ca5d2b83d30b196a2a825a9becaf6b2b32
2016-05-04 13:58:28 -07:00
Adam Ernst 3105dc8d6e Reverted commit D3259193
Reviewed By: davidaurelio

Differential Revision: D3259193

fb-gh-sync-id: 563d40261fb0b1c1def2e0c33f6197d858a1c54a
fbshipit-source-id: 563d40261fb0b1c1def2e0c33f6197d858a1c54a
2016-05-04 12:12:27 -07:00
David Aurelio 7518c2f827 upgrade graceful-fs to v4.1.3
Reviewed By: davidaurelio

Differential Revision: D3259193

fb-gh-sync-id: d3f956fb1dc555df1bd5938a428c61de99b2fd95
fbshipit-source-id: d3f956fb1dc555df1bd5938a428c61de99b2fd95
2016-05-04 11:27:19 -07:00
Pieter De Baets 2760df761d Cleanup InitializeJavascriptAppEngine
Reviewed By: davidaurelio

Differential Revision: D3235141

fb-gh-sync-id: 86fc844c5e9d9ea57d504696bac30671c2079e7a
fbshipit-source-id: 86fc844c5e9d9ea57d504696bac30671c2079e7a
2016-05-04 10:50:32 -07:00
Konstantin Raev ec5016ad8f Fixed path to regenerator-runtime
Summary:
Since 0.8.43 regenerator has regenerator-runtime dependency.
Fixes one js test in trunk
Closes https://github.com/facebook/react-native/pull/7351

Reviewed By: davidaurelio

Differential Revision: D3252699

Pulled By: bestander

fb-gh-sync-id: cedb122eb8e9f3a5e40a5313482bc2282511c71e
fbshipit-source-id: cedb122eb8e9f3a5e40a5313482bc2282511c71e
2016-05-04 05:19:31 -07:00
Kelvin Sherlock 46ba1532fd babel-preset - transform-es2015-constants was replaced by check-es2015-constants.
Summary:
The babel plugin transform-es2015-constants was replaced by check-es2015-constants.

References:

T2970
rBW0a3b3b03dbcfc8d1e809a0eaf6270eec8de80763
T3053

This patch updates the babel preset to use check-es2015-constants which should be more future-proof and will receive bug fixes.
Closes https://github.com/facebook/react-native/pull/6943

Reviewed By: davidaurelio

Differential Revision: D3189222

Pulled By: bestander

fb-gh-sync-id: a5ec23e297e1d3591d51641dd567049f4310b107
fbshipit-source-id: a5ec23e297e1d3591d51641dd567049f4310b107
2016-05-03 06:43:27 -07:00
Janic Duplessis f8f9362c05 Reverted commit D3242754
Summary:
This separates the babel config of the local-cli and the packager from the one used by the transforms of the packager since it doesn't run in the same environment and the local-cli/packager doesn't require react specific transforms and runs in node 4 so we can also avoid some es2015 transforms that node already supports.

I had to move the code in cli.js so it can still run in node 0.12 that doesn't support `const` since it is no longer transformed.

**Test plan**
Run the local-cli on node 0.12 and there should be a message saying that it requires at least node 4.
Run the local-cli on node 4 and 5 and everything should work the same as before.

I was also hoping for some perf gains but there was nothing noticeable. I did benchmark the babel-register call and it stayed pretty much the same. As for runtime performance it can help if there are optimisations for es2015 features in node.
Closes https://github.com/facebook/react-native/pull/6155

Differential Revision: D3242754

Pulled By: eczarny

fb-gh-sync-id: 6cd349e284b7d92a1b2cc8b5c0e26adbfb0d9a2f
fbshipit-source-id: 6cd349e284b7d92a1b2cc8b5c0e26adbfb0d9a2f
2016-04-30 16:54:31 -07:00
Janic Duplessis 19429f79b2 Use a separate babel config for the local-cli and the packager
Summary:
This separates the babel config of the local-cli and the packager from the one used by the transforms of the packager since it doesn't run in the same environment and the local-cli/packager doesn't require react specific transforms and runs in node 4 so we can also avoid some es2015 transforms that node already supports.

I had to move the code in cli.js so it can still run in node 0.12 that doesn't support `const` since it is no longer transformed.

**Test plan**
Run the local-cli on node 0.12 and there should be a message saying that it requires at least node 4.
Run the local-cli on node 4 and 5 and everything should work the same as before.

I was also hoping for some perf gains but there was nothing noticeable. I did benchmark the babel-register call and it stayed pretty much the same. As for runtime performance it can help if there are optimisations for es2015 features in node.
Closes https://github.com/facebook/react-native/pull/6155

Differential Revision: D3242754

Pulled By: davidaurelio

fb-gh-sync-id: 02880c841c10562d5f107e1c975d668e55cc619f
fbshipit-source-id: 02880c841c10562d5f107e1c975d668e55cc619f
2016-04-30 16:25:24 -07:00
Sebastian Markbage ba8878d12c Update react package to stable release
Summary:
react-native is about to do a branch cut for the next stable release. We want
this version to use a stable release of react so we released one.

This should be the same as the previous alpha. The is mostly changes to DOM / testing and not RN:

https://github.com/facebook/react/commits/15.0.2-dev

AFAIK there are no behavior changes to RN.

I had to add ReactPropTransferer from downstream since this moved out of React Core and into www.

Reviewed By: zpao

Differential Revision: D3245046

fb-gh-sync-id: 7e460315699fd5bff36d89751ce94edb75dd4733
fbshipit-source-id: 7e460315699fd5bff36d89751ce94edb75dd4733
2016-04-30 11:58:32 -07:00
Jeff Morrison 7e9720f0ae Deploy Flow 0.24.0 to fbsource
Reviewed By: gabelevi

Differential Revision: D3241183

fb-gh-sync-id: a40da6d4d30abf720d0f95d76be803d669fc92c3
fbshipit-source-id: a40da6d4d30abf720d0f95d76be803d669fc92c3
2016-04-29 13:43:27 -07:00
David Aurelio 8375778496 Upgrade node-haste to 2.10.1
Reviewed By: bestander

Differential Revision: D3238180

fb-gh-sync-id: 06d62a5855864301a5480e349cfec2c0a2d5b79f
fbshipit-source-id: 06d62a5855864301a5480e349cfec2c0a2d5b79f
2016-04-29 04:44:32 -07:00
David Aurelio e3c18c3990 Upgrade to node-haste@2.10.0 and allow to specify extra node modules
Summary: This upgrades to node-haste@2.10.0 and allows to expose folders as additional node modules from rn-cli.config.js

Reviewed By: bestander

Differential Revision: D3232595

fb-gh-sync-id: dffca66fec55a79a2b3af1d6ec1b8799b2bbcf59
fbshipit-source-id: dffca66fec55a79a2b3af1d6ec1b8799b2bbcf59
2016-04-28 06:33:27 -07:00
Sebastian Markbage 8e43b24a36 Update React to alpha.3
Summary:
Sync new React fixes.

Includes...

https://github.com/facebook/react/pull/6584
https://github.com/facebook/react/pull/6587
https://github.com/facebook/react/pull/6588
https://github.com/facebook/react/pull/6590

Since this require PanResponder to be restored I also included D3210771 here.

Reviewed By: spicyj

Differential Revision: D3221285

fb-gh-sync-id: cbb6b1dd0fd0443d246957ceb94b6a424c09c24e
fbshipit-source-id: cbb6b1dd0fd0443d246957ceb94b6a424c09c24e
2016-04-25 20:38:26 -07:00
David Aurelio 61c53d4939 Jest: Un-blacklist React main module
Summary:
testing jest for react 15

Closes #7212
Closes https://github.com/facebook/react-native/pull/7213

Differential Revision: D3219118

fb-gh-sync-id: 6a0fe9f3b404274779e39e037bb88d0e6ce36cfd
fbshipit-source-id: 6a0fe9f3b404274779e39e037bb88d0e6ce36cfd
2016-04-25 09:07:28 -07:00
Konstantin Raev 7d9fe365a7 Fixed e2e tests for HMR
Summary:HMR e2e test red-screened because of the wrong path to react.

**Test plan (required)**

Make sure e2e tests pass
Closes https://github.com/facebook/react-native/pull/7209

Reviewed By: mkonicek

Differential Revision: D3218896

Pulled By: bestander

fb-gh-sync-id: 8c5c4ceda34bd2d273e9de16ed670592d1fde3b9
fbshipit-source-id: 8c5c4ceda34bd2d273e9de16ed670592d1fde3b9
2016-04-25 08:12:30 -07:00
Christoph Pojer 0bf737ff0a Update to 11.0.1
Reviewed By: kassens

Differential Revision: D3183738

fb-gh-sync-id: 07be9e1d60413a6d929b15cd72eeba416a6bfc6d
fbshipit-source-id: 07be9e1d60413a6d929b15cd72eeba416a6bfc6d
2016-04-25 01:16:23 -07:00
Ben Alpert 9be37ca60e Update to 15.0.2-alpha.2
Reviewed By: zpao

Differential Revision: D3210045

fb-gh-sync-id: 6a1862c8f5f1f759e002cc9663719cb55723c342
fbshipit-source-id: 6a1862c8f5f1f759e002cc9663719cb55723c342
2016-04-21 17:25:29 -07:00
Sebastian Markbage 47a470a97c Move React Core Integration to a Dependency
Summary:Adding the react native renderer dependency and various fixes to support React 15.

Don't use dispatchID for touchableHandleResponderGrant

This callback argument was removed because "IDs" no longer exist. Instead, we'll
use the tag from the event target.

The corresponding PR on React Core is: https://github.com/facebook/react/pull/6338

Reviewed By: spicyj

Differential Revision: D3159788

fb-gh-sync-id: 60e5cd2aa0af69d83fcdac3dfde0a85a748cb7b9
fbshipit-source-id: 60e5cd2aa0af69d83fcdac3dfde0a85a748cb7b9
2016-04-21 09:28:23 -07:00
Konstantin Raev fb6133efcf fixed immutable.js to be 3.7.x because 3.8.0 breaks flow checks
Summary: Closes https://github.com/facebook/react-native/pull/7014

Differential Revision: D3188876

fb-gh-sync-id: 800e1bf31dfd698a4aa076e64bf27b090b841e40
fbshipit-source-id: 800e1bf31dfd698a4aa076e64bf27b090b841e40
2016-04-16 01:34:19 -07:00
Gabe Levi 719c9aa6fe Bump package.json flow-bin version to v0.23.0
Reviewed By: bestander

Differential Revision: D3182609

fb-gh-sync-id: 23392ecbdc589aaa8b76465f64f28790e7e61903
fbshipit-source-id: 23392ecbdc589aaa8b76465f64f28790e7e61903
2016-04-14 19:19:31 -07:00
James Ide eaba2abc0b Use function refs and support composed refs
Summary:Fixes an issue where if you implement `renderScrollComponent` and have a `ref` callback on the returned element, the ref used to be clobbered by the ref that ListView adds to the element.

This is accomplished by converting the ref from a legacy string-based ref to a callback-based ref, and then using `cloneReferencedElement`, which is a simple utility to compose callback refs.
Closes https://github.com/facebook/react-native/pull/6441

Differential Revision: D3064250

Pulled By: mkonicek

fb-gh-sync-id: 2d55d04e2144a1cc08900a57a1fc0dab07c87eea
fbshipit-source-id: 2d55d04e2144a1cc08900a57a1fc0dab07c87eea
2016-04-14 06:41:22 -07:00
David Aurelio 9ffb227fa6 Clean up node_modules
Reviewed By: bestander

Differential Revision: D3168034

fb-gh-sync-id: bf4c5d44bb10989ac838f3d150c0931fadadfa7b
fbshipit-source-id: bf4c5d44bb10989ac838f3d150c0931fadadfa7b
2016-04-12 07:32:19 -07:00
Konstantin Raev d0566d8bc3 Fixed images required from node_modules
Summary:This fixes https://github.com/facebook/react-native/issues/6638 by resolving AssetRegistry relatively.
Closes https://github.com/facebook/react-native/pull/6822

Reviewed By: davidaurelio

Differential Revision: D3144463

Pulled By: bestander

fb-gh-sync-id: d3eeb24ae9e08a32f742c50ae5f0314fd33d1b6b
fbshipit-source-id: d3eeb24ae9e08a32f742c50ae5f0314fd33d1b6b
2016-04-06 07:59:29 -07:00
Martin Bigio 40f13742b3 Use `^` version for react-native preset
Summary:See https://github.com/facebook/react-native/issues/6798
Closes https://github.com/facebook/react-native/pull/6814

Differential Revision: D3138776

fb-gh-sync-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
fbshipit-source-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
2016-04-05 07:58:25 -07:00
Satyajit Sahoo f2c647fa75 Update eslint and babel-eslint
Summary:cc bestander
Closes https://github.com/facebook/react-native/pull/6705

Reviewed By: mkonicek

Differential Revision: D3114562

Pulled By: bestander

fb-gh-sync-id: ca9b3af99394f3883c9f7cd7c462b699c4d8ca95
fbshipit-source-id: ca9b3af99394f3883c9f7cd7c462b699c4d8ca95
2016-03-30 06:47:18 -07:00
Kyle Corbitt bbeeaa1274 Update version number in repo for ecosystem compatibility
Summary:In https://github.com/facebook/react-native/pull/5241 ide updated the version number to be a fake one so that people wouldn't send in PRs just bumping the version.

Unfortunately, this leads to compatibility issues when developing against `master` with 3rd-party components that declare React Native as a `peerDependency`. For example, I'm using [react-native-orientation](https://github.com/yamill/react-native-orientation) which has a peerDependency of `"react-native": ">=0.5"`.

I see a few ways to deal with this:

1. Only develop against the releases on npm, not git snapshots.
2. Ask ecosystem projects to not include a minimum version of `react-native` in their peerDependencies.
3. Track the RN release numbers in the git repository (eg it would be 0.19 right now).
4. Make the release number on master huge (1000 in this PR) so it's obviously a fake number but will still comply with >= checks.

I don't think option 2 is good because it's reasonable for a package author to want to specify a minimum R
Closes https://github.com/facebook/react-native/pull/5556

Differential Revision: D3110274

fb-gh-sync-id: 8638157d44ee99945337fbf585936b50699f0341
fbshipit-source-id: 8638157d44ee99945337fbf585936b50699f0341
2016-03-29 12:34:19 -07:00
Satyajit Sahoo a7cde8045b Apply react.gradle from node_modules/react-native
Summary:The goal is to minimize the number of files we need to bootstrap. This allows us to make the upgrade process smoother for everyone.

If someone needs to customize the file, we already provide some config options. The ability to copy the file and modify it is always there for those few who need it.

**Test plan**

Generate a new project with the updated template.  The app should build and run fine both in debug and production mode.

Related #6292
Closes https://github.com/facebook/react-native/pull/6610

Differential Revision: D3109099

Pulled By: foghina

fb-gh-sync-id: 13fc89e60daed30bf6349e532a140c1b6f8f053a
fbshipit-source-id: 13fc89e60daed30bf6349e532a140c1b6f8f053a
2016-03-29 07:39:21 -07:00
Janic Duplessis bc54a45542 Revert strict mode in transform-es2015-modules-commonjs
Summary:See discussion here https://github.com/facebook/react-native/pull/5796#issuecomment-202002658

**Test plan (required)**
Change the babel-preset-react-native dependency to `"babel-preset-react-native": "file:./babel-preset",` so it uses the local babel-preset instead of the one from npm.
```
./packager/packager.sh --reset-cache
```
open `http://localhost:8081/Examples/UIExplorer/UIExplorerApp.android.bundle?platform=android&dev=true&hot=false&minify=false` and there should not be any added 'strict mode'.
Closes https://github.com/facebook/react-native/pull/6686

Reviewed By: mkonicek

Differential Revision: D3103122

Pulled By: bestander

fb-gh-sync-id: 85658ee01bb73f13dacb2b6a48ab121324c13118
fbshipit-source-id: 85658ee01bb73f13dacb2b6a48ab121324c13118
2016-03-29 07:26:22 -07:00
Satyajit Sahoo 230e7c0b31 Pinned esint and babel-eslint versions
Summary:Tests seem to be broken on CI due to failing dependency of `babel-eslint` on `eslint` < `2.0.0`.

cc bestander
Closes https://github.com/facebook/react-native/pull/6669

Differential Revision: D3102085

fb-gh-sync-id: a9fe36725aac293fbe60f282342297f776d715b2
fbshipit-source-id: a9fe36725aac293fbe60f282342297f776d715b2
2016-03-26 11:00:23 -07:00
Konstantin Raev 993835c815 Allow react-native init <version> + removed sinopia from being required for e2e testing
Reviewed By: mkonicek, frantic

Differential Revision: D3087524

fb-gh-sync-id: 048e23b55916a6be17fa9fabb6e41b0b2f3f7a16
shipit-source-id: 048e23b55916a6be17fa9fabb6e41b0b2f3f7a16
2016-03-24 05:31:23 -07:00
Tim Yung a72f45bb61 RN: Upgrade to node-haste@2.9.4
Reviewed By: davidaurelio

Differential Revision: D3091056

fb-gh-sync-id: ad6f53306a95290424258f092b596a601fa7be7b
shipit-source-id: ad6f53306a95290424258f092b596a601fa7be7b
2016-03-23 18:52:26 -07:00
David Aurelio e691b7c9f4 Uprgade node-haste dependency to v2.9.2
Reviewed By: jingc

Differential Revision: D3078868

fb-gh-sync-id: 33dd5bee0d32ee93939030c25228e25fe314c0ee
shipit-source-id: 33dd5bee0d32ee93939030c25228e25fe314c0ee
2016-03-21 17:03:24 -07:00
Kyle Corbitt 322f210e64 flowconfig adds flow/ folder
Summary:This change adds the `flow/` folder to the generated `.flowconfig` in new/upgraded projects. The absence of this folder was causing flow bugs to appear in projects consuming react-native that weren't visible in react-native itself. By including the same definition in consuming projects these errors disappear. Fixes https://github.com/facebook/react-native/issues/6428.

**Test plan (required)**

Tested `react-native upgrade` with this change and ensured that the generated `.flowconfig` works and didn't throw flow errors.
Closes https://github.com/facebook/react-native/pull/6430

Differential Revision: D3071701

fb-gh-sync-id: f28f4d8f7e63669386766b6f226144adeda32c85
shipit-source-id: f28f4d8f7e63669386766b6f226144adeda32c85
2016-03-21 06:26:34 -07:00
Konstantin Raev 84183ffc30 Improved OSS flow and lint reporting
Summary:- lint bot is now managed by Circle CI
- checked that flow and lint errors are caught both by bot and CI
- flow fix for npm 3
- Travis is now using npm 2 and Circle CI npm 3
- Refactored Travis script to be able to be able to fail on multiple lines
Closes https://github.com/facebook/react-native/pull/6508

Differential Revision: D3069500

Pulled By: davidaurelio

fb-gh-sync-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
shipit-source-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
2016-03-18 08:10:26 -07:00
David Aurelio f9d79b3415 Upgrade node-haste to v2.9.1 to make module order deterministic
Summary:Changing the order of transformation and extraction of dependencies made the order of modules dependent on the time when the worker pool returns a result.
node-haste v2.9.1 addresses this issue and makes the order of dependencies deterministic.

This also bumps the packager versions to enforce cache invalidation.

Reviewed By: martinbigio

Differential Revision: D3065063

fb-gh-sync-id: 1d45b066e45c3f64092f779c3fce3becf6739409
shipit-source-id: 1d45b066e45c3f64092f779c3fce3becf6739409
2016-03-17 14:59:52 -07:00
Konstantin Raev ceb6bd5272 Npm publish
Summary:This work allows automated release deployment.

Previous semi-automation lived in release.sh and I split it into two pieces:
- test-manual-e2e.sh - that just tests that current commit is buildable and makes a quick e2e installation for manual testing
- publish-npm.js - that makes publish based on what current branch and tags are on commit that is tested/deployed by CI

This simplified `Releases.md` guide and requires you to just run
```
git checkout -b 0.22-stable
git tag v0.22.0-rc
git push origin 0.22-stable --tags
```
to have a successful npm release.
Closes https://github.com/facebook/react-native/pull/6453

Reviewed By: mkonicek

Differential Revision: D3047938

Pulled By: bestander

fb-gh-sync-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
shipit-source-id: dbebf4c3a0bc2c2a0ef75c54595ab5654f91b8ea
2016-03-15 09:22:26 -07:00
Christoph Pojer 11342f284a Update Jest to 0.9.0
Reviewed By: yungsters, voideanvalue

Differential Revision: D3050870

fb-gh-sync-id: c0b83f836eb1e522c01d01b2434880358b71b5ec
shipit-source-id: c0b83f836eb1e522c01d01b2434880358b71b5ec
2016-03-14 18:53:25 -07:00
David Aurelio 11202a77a3 Update node-haste to v2.9.0
Reviewed By: martinbigio

Differential Revision: D3047397

fb-gh-sync-id: 1b2d2d0a38be97cb1ac127375305cf39ab302845
shipit-source-id: 1b2d2d0a38be97cb1ac127375305cf39ab302845
2016-03-14 08:56:23 -07:00
Dan Abramov 2e9c888dcd Update hot reloading dependencies
Summary:These updates include important changes to correctness in the linked and underlying packages:

* https://github.com/gaearon/babel-plugin-react-transform/releases/tag/v2.0.1
* https://github.com/gaearon/babel-plugin-react-transform/releases/tag/v2.0.2
* https://github.com/gaearon/react-proxy/releases/tag/v1.1.3
* https://github.com/gaearon/react-proxy/releases/tag/v1.1.4
* etc

We need to include these if we want to ship hot reloading.

Create a new project with those versions of packages.

<img width="761" alt="screen shot 2016-03-06 at 18 49 20" src="https://cloud.githubusercontent.com/assets/810438/13556222/2d45ca62-e3cc-11e5-8a3f-a2346efe19dd.png">

Verify hot reloading still works.

![](http://cl.ly/2J150y0Y3E1z/download/Screen%20Recording%202016-03-06%20at%2018.48.gif)

martinbigio skevy

I wasn’t sure whether to touch the shrinkwrap.
Closes https://github.com/facebook/react-native/pull/6325

Reviewed By: yungsters

Differential Revision: D3019470

Pulled By: martinbigio

fb-gh-sync-id: 99bad390cd898f58aa7f74494066561a81eb40e6
shipit-source-id: 99bad390cd898f58aa7f74494066561a81eb40e6
2016-03-11 16:28:21 -08:00
Janic Duplessis fd816b1349 Update node-haste and replace fast-path with node-haste's version to fix Windows compatibility
Summary:This is the last bits needed to fix Windows compatibility on master, most of the work was done in node-haste.

**Test plan**
Run npm test
Run the packager using Windows and Mac

cc cpojer davidaurelio
Closes https://github.com/facebook/react-native/pull/6260

Reviewed By: dmmiller, bestander

Differential Revision: D3005397

Pulled By: davidaurelio

fb-gh-sync-id: e16847808ebfa8b234315b2093dba204c9c1e869
shipit-source-id: e16847808ebfa8b234315b2093dba204c9c1e869
2016-03-11 06:00:30 -08:00
Konstantin Raev d24db57d8e fixed jest tests: added /website/ folder to jest ignore list
Summary:If website has node_modules installed `npm tests`

**Test plan (required)**

```
cd website && npm install
cd .. && npm test
```

Before this fix we see this error:
Error: Failed to build DependencyGraph: providesModule naming collision:
  Duplicate module name: ViewportMetrics
  Paths: react-native/node_modules/react/lib/ViewportMetrics.js collides with react-native/website/node_modules/react/lib/ViewportMetrics.js
Closes https://github.com/facebook/react-native/pull/6170

Differential Revision: D3001147

Pulled By: bestander

fb-gh-sync-id: a040edf097183e6899c0ff49785ff36bd465eb61
shipit-source-id: a040edf097183e6899c0ff49785ff36bd465eb61
2016-03-10 08:50:24 -08:00
Tim Yung d8e794c260 RN: Upgrade ESLint to v2.2.0
Reviewed By: FBNeal

Differential Revision: D3031604

fb-gh-sync-id: d6baa194b9e4dc947823a16bd457b2a8cf822c75
shipit-source-id: d6baa194b9e4dc947823a16bd457b2a8cf822c75
2016-03-09 14:08:33 -08:00
Tim Yung 13937474f3 ESLint: Improve Flow & React Support
Reviewed By: cpojer

Differential Revision: D3027504

fb-gh-sync-id: 10e934a253bb6e7305cab1a5a9b1c318e7e440ac
shipit-source-id: 10e934a253bb6e7305cab1a5a9b1c318e7e440ac
2016-03-09 14:08:28 -08:00
Konstantin Raev 6b610995be Fixes to flow after trunk was broken
Reviewed By: mkonicek

Differential Revision: D3029511

fb-gh-sync-id: c7ac945de1676ad03136c83cbcb5a75f5a0b82b6
shipit-source-id: c7ac945de1676ad03136c83cbcb5a75f5a0b82b6
2016-03-09 06:09:24 -08:00
Kureev Alexey db3a00d58c Replace underscore by lodash
Summary:As far as we agreed to merge `rnpm` into react-native core, we need to align our dependencies to exclude duplications. One of the steps forward would be to use the same utilities library. According to the thread on fb, everybody is fine with replacing underscore by lodash (which we use internally for rnpm).

So, here we go!

cc mkonicek davidaurelio grabbou

**Test plan**
```
$ npm test
```
![image](https://cloud.githubusercontent.com/assets/2273613/13173972/ee34c922-d700-11e5-971b-68ff7322b6d6.png)

**Code formatting**

Changes are aligned with the current [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
Closes https://github.com/facebook/react-native/pull/6030

Differential Revision: D3016271

Pulled By: davidaurelio

fb-gh-sync-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45
shipit-source-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45
2016-03-09 03:09:44 -08:00
Konstantin Raev 3c2bf6304c react native updated to flow@0.22
Summary:Flow got updated and it broke CI
Closes https://github.com/facebook/react-native/pull/6371

Differential Revision: D3026874

fb-gh-sync-id: e1866cd885cefcef45da6d0d66ff5f3fe6d9beda
shipit-source-id: e1866cd885cefcef45da6d0d66ff5f3fe6d9beda
2016-03-08 16:22:08 -08:00
David Aurelio ab926cca33 Update uglifyjs to newest release
Summary: We need a newer release of uglify in order not to include //# sourceMappingURL= comments

Reviewed By: martinbigio

Differential Revision: D3025104

fb-gh-sync-id: f39a2fa859c3279908abd47e84288ef6a0a17e4a
shipit-source-id: f39a2fa859c3279908abd47e84288ef6a0a17e4a
2016-03-08 12:22:25 -08:00
Martin Konicek 10e990f415 Don't publish shrinkwrap
Summary:See comments on https://github.com/facebook/react-native/pull/6346
We cannot publish the shrinkwrap file to npm and make the same file
work with the internal fb infra.

We've never had the shrinkwrap file in a release of RN, keeping it
that way for now should be ok.

Reviewed By: bestander

Differential Revision: D3024260

fb-gh-sync-id: 477509eb9a9890c1955a957ece922d692cd35aab
shipit-source-id: 477509eb9a9890c1955a957ece922d692cd35aab
2016-03-08 08:50:29 -08:00
Adam Miskiewicz f5edabf3db Update Babel/React Dependencies
Summary:PR does as it says -- updates Babel dependencies to latest versions.

In general, this changes nothing for 99.9% of users (everyone that isn't FB). If they were to `npm install react-native` right now, they would get all of these dependencies anyway.

However, this does revert a previous change where we were using "~" instead of "^" in front of the Babel deps in order to attempt to lock them to minor dependencies. However, due to the fact that each Babel package uses "^", and there are so many interdependencies, this actually would cause an issue where multiple versions of babel-core, et. al. to be installed.

*Edit* - In addition, we add React to `devDependencies` so that it behaves properly in testing, now that it's a peer dependency.
Closes https://github.com/facebook/react-native/pull/5811

Reviewed By: davidaurelio

Differential Revision: D2931184

Pulled By: martinbigio

fb-gh-sync-id: 7b9fc640d37fb2d98fc1808860f9f64074aff475
shipit-source-id: 7b9fc640d37fb2d98fc1808860f9f64074aff475
2016-03-03 21:19:23 -08:00
Satyajit Sahoo 36f1961003 Use flow-bin to typecheck locally, update ESLint to 2.0
Summary:Using local version of the Flow make it easy to have project specific version instead of relying on the user to have the correct version installed globally. For example, React Native uses an older version of Flow, while I have the latest version installed. Now I cannot typecheck the code because my version doesn't match the `.flowconfig`.

**Test plan (required)**

Run `npm run lint` and `npm run flow` to run `eslint` and `flow`.

cc bestander mkonicek
Closes https://github.com/facebook/react-native/pull/6145

Reviewed By: dmmiller

Differential Revision: D2976616

Pulled By: bestander

fb-gh-sync-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5
shipit-source-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5
2016-03-03 04:15:59 -08:00
David Aurelio ad8a335864 Remove knowledge of fbjs from the packager
Summary:Follow-up to https://github.com/facebook/react-native/pull/5084

This…
- changes all requires within RN to `require('fbjs/lib/…')`
- updates `.flowconfig`
- updates `packager/blacklist.js`
- adapts tests
- removes things from `Libraries/vendor/{core,emitter}` that are also in fbjs
- removes knowledge of `fbjs` from the packager

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

Reviewed By: bestander

Differential Revision: D2926835

fb-gh-sync-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
shipit-source-id: 2095e22b2f38e032599d1f2601722b3560e8b6e9
2016-03-02 04:28:38 -08:00
Martín Bigio d7cee3a5f9 bump node-haste to 2.4.0
Reviewed By: sam-swarr

Differential Revision: D2982427

fb-gh-sync-id: 3a78f6e10c6af8eb92a711dd59760215c3f21b14
shipit-source-id: 3a78f6e10c6af8eb92a711dd59760215c3f21b14
2016-02-26 15:17:37 -08:00
David Aurelio b41ad9f5dc Upgrade node-haste to v2.3.0
Summary: This updates to the latest published node-haste version, and also adapts code and tests to that version. Future upgrades should be easier.

Reviewed By: bestander

Differential Revision: D2963144

fb-gh-sync-id: 9fd2c84fc49643fb85ee5d9674a5e458d43d44ca
shipit-source-id: 9fd2c84fc49643fb85ee5d9674a5e458d43d44ca
2016-02-23 06:10:33 -08:00
David Aurelio 89ea985540 Restrict the version range of node-haste to ~2.0.0
Summary: This restricts the version range of node-haste to >=2.0.0 <2.1.0, because 2.1.0 has a breaking change.

Reviewed By: mkonicek

Differential Revision: D2958263

fb-gh-sync-id: b8a1c39857731865fd16f5287af53ad0536781c2
shipit-source-id: b8a1c39857731865fd16f5287af53ad0536781c2
2016-02-21 01:34:32 -08:00
Christoph Pojer 44ea74c2c7 Update jest to 0.9.0-fb2
Reviewed By: davidaurelio

Differential Revision: D2953741

fb-gh-sync-id: 10a76c7c00f542740eb820c400429ea81a7073ea
shipit-source-id: 10a76c7c00f542740eb820c400429ea81a7073ea
2016-02-19 04:40:35 -08:00
Christoph Pojer fa3a67e251 Install node-haste2 and remove DependencyResolver
Summary: This installs the 2.0 version of node-haste, removes the DependencyResolver and fixes up all the tests.

Reviewed By: davidaurelio

Differential Revision: D2943416

fb-gh-sync-id: aa83d436a33f910d12ed4cc6e2ad8d5742c123a5
shipit-source-id: aa83d436a33f910d12ed4cc6e2ad8d5742c123a5
2016-02-18 18:03:34 -08:00
Christoph Pojer 82eeca659e Update + use node-haste2
Summary:This updates jest to 0.9 which will result in *much* faster startup time (1s vs. 10-15s) and better runtime overall (2-3x).

The route gen and cli integration tests are failing locally, but also on master. javache is this expected right now or is this related to my changes?

Reviewed By: javache

Differential Revision: D2943137

fb-gh-sync-id: 8b39ba5f51e30fbc5bacb84d67013ab0a4061f6e
shipit-source-id: 8b39ba5f51e30fbc5bacb84d67013ab0a4061f6e
2016-02-18 00:14:34 -08:00
Martin Konicek 403176ae93 Also release Android sources to npm
Summary:Turns out also having sources (besides binaries in /android) in npm is useful:
https://facebook.github.io/react-native/docs/android-building-from-source.html

Reviewed By: mkonicek

Differential Revision:D2947237
Ninja: oss-only

fb-gh-sync-id: 80e3e79c9c5a5f54fd54e91ac147249a68c74847
shipit-source-id: 80e3e79c9c5a5f54fd54e91ac147249a68c74847
2016-02-17 16:54:40 -08:00
Christoph Pojer 9a918ef48f Improve performance of node-haste2 and react-packager
Reviewed By: davidaurelio

Differential Revision: D2911210

fb-gh-sync-id: 8ac2f213e8a9e089281bb065f9a7190d2e0f5b18
shipit-source-id: 8ac2f213e8a9e089281bb065f9a7190d2e0f5b18
2016-02-16 02:01:59 -08:00
David Aurelio 6c55d5b851 Replace custom rolled stable string hashing with library
Reviewed By: cpojer

Differential Revision: D2937202

fb-gh-sync-id: dc08547c71da2bc35cfad108e63fd5e87f0ba734
shipit-source-id: dc08547c71da2bc35cfad108e63fd5e87f0ba734
2016-02-15 06:59:01 -08:00
Adam Miskiewicz 75869519e6 Add npm-shrinkwrap.json to npm
Reviewed By: svcscm

Differential Revision: D2933826

fb-gh-sync-id: 48def92bfd9eb929cc092bea90bcbe1ed53f8675
shipit-source-id: 48def92bfd9eb929cc092bea90bcbe1ed53f8675
2016-02-13 15:28:32 -08:00
Adam Miskiewicz 28116ec3db Reverted commit D2803288
Summary:
As spicyj mentioned in commit 6a838a4, the ideal state of affairs when it comes to consuming `react` and `fbjs` from NPM is for the packager not to have knowledge of either package. This PR addresses the `fbjs` part of that, and relies on https://github.com/facebook/fbjs/pull/95. **DO NOT MERGE** until #95 (or a variation) is in `fbjs` and is released to npm.

This PR does several things:

1. Adds stub modules within RN that expose `fbjs` modules to be required using Haste. After discussing a few ideas with spicyj, this seemed like a good option to keep internal FB devs happy (and not make them change the way they write JS), but allow for removing packager complexity and fit in better with the NPM ecosystem. Note -- it skips stubbing `fetch`, `ExecutionEnvironment`, and `ErrorUtils`, due to the fact that these need to have Native specific implementations, and there's no reason for those implementations to exist in `fbjs`.
2. Removes the modules that were previously being used in lieu of their `fbjs` eq
Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2803288

Pulled By: javache

fb-gh-sync-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1
shipit-source-id: 121ae811ce4cc30e6ea79246f85a1e4f65648ce1
2016-02-11 02:45:34 -08:00
Adam Miskiewicz 98e5e2b427 Remove knowledge of fbjs from the packager
Summary:
As spicyj mentioned in commit 6a838a4, the ideal state of affairs when it comes to consuming `react` and `fbjs` from NPM is for the packager not to have knowledge of either package. This PR addresses the `fbjs` part of that, and relies on https://github.com/facebook/fbjs/pull/95. **DO NOT MERGE** until #95 (or a variation) is in `fbjs` and is released to npm.

This PR does several things:

1. Adds stub modules within RN that expose `fbjs` modules to be required using Haste. After discussing a few ideas with spicyj, this seemed like a good option to keep internal FB devs happy (and not make them change the way they write JS), but allow for removing packager complexity and fit in better with the NPM ecosystem. Note -- it skips stubbing `fetch`, `ExecutionEnvironment`, and `ErrorUtils`, due to the fact that these need to have Native specific implementations, and there's no reason for those implementations to exist in `fbjs`.
2. Removes the modules that were previously being used in lieu of their `fbjs` eq
Closes https://github.com/facebook/react-native/pull/5084

Reviewed By: bestander

Differential Revision: D2803288

Pulled By: davidaurelio

fb-gh-sync-id: fd257958ee2f8696eebe9048c1e7628c168bf4a2
shipit-source-id: fd257958ee2f8696eebe9048c1e7628c168bf4a2
2016-02-11 02:21:37 -08:00
Adam Miskiewicz 9f01f96770 Move `react` to peerDependencies
Summary:
This PR moves `react` from dependencies to peerDependencies.

In general, this would have only been important for those people using packages that depend on `react` and were using npm@2...npm@3 would automatically de-dupe.

However, when #5812 gets merged, dependencies will be scoped to react-native (on both npm@2 & npm@3), thus breaking projects that are using a package like `react-redux` for example, which depends on `react`. There would be two copies of React installed, and due to the use of haste modules in `react`, this would break the packager and cause naming collisions.

This PR does three things -

1. Moves the dependency from dependencies to peerDependencies
2. Updates the local-cli to run `npm install react --save` when a new project is initialized.
3. Updates `react-native upgrade` to warn if `react` is not listed in the package.json's dependencies.

**Note: This will require a shrinkwrap update.**
Closes https://github.com/facebook/react-native/pull/5813

Reviewed By: svcscm

Differential Revision: D2918380

Pulled By: androidtrunkagent

fb-gh-sync-id: 6e4234a45284be2fdf6fedf29e70b2d2d0262486
shipit-source-id: 6e4234a45284be2fdf6fedf29e70b2d2d0262486
2016-02-09 15:38:37 -08:00
Martin Konicek 702f999b05 Consume Android artifacts from npm
Summary:
This lets us say goodbye to Maven Central. This will greatly simplify
and speed up the release process as releasing Android artifacts to
Maven Central adds a lot of [complexity](https://github.com/facebook/react-native/blob/master/Releases-publish.md)
and delays the whole release by several hours when we have to wait
for the artifacts to propagate.

This diff assumes there's a local Maven repo at
`node_modules/react-native/android`.

The second part once this lands is to change our `release.sh` script to
output the artifacts under `react-native/android` before publishing to
npm.

This adds 3.7MB to the size of `node_modules` of any app. However,
we just download eagerly what we'd normally download later via Gradle.

**Test plan**

Released RN including a local Maven repo into Sinopia:

    $ cd react-native
    # Updated version in gradle.properties to 0.21.0
    $ ./gradlew ReactAndroid:installArchives
    # Moved everything in .m2/repository/com/facebook/react to react-native/android
    $ ls react-native/android
    com/facebook/react/react-native/0.21.0/react-native-0.21.0.aar
    com/facebook/react/react-native/0.21.0/react-native-0.21.0.pom
    com/facebook/react/react-native/maven-metadata.xml
    ...

    # Set version in package.json to 0.21.0
    $ npm set registry http://localhost:4873/
    $ npm publish

Created and ran an app:

   $ cd /tmp
   $ react-native init AndroidNpm
   $ cd AndroidNpm
   $ react-native run-android

It worked.

Checked that we're using the artifacts from node_modules/react-native/android:

    $ cd android
    $ ./gradlew app:dependencies
    compile - Classpath for compiling the main sources.
    +--- com.android.support:appcompat-v7:23.0.1
    |    \--- com.android.support:support-v4:23.0.1
    |         \--- com.android.support:support-annotations:23.0.1
    \--- com.facebook.react:react-native:+ -> 0.21.0
         +--- com.google.code.findbugs:jsr305:3.0.0
         +--- com.facebook.stetho:stetho-okhttp:1.2.0
    ...

Checked that Android Studio can find the source jars (you can navigate to RN sources in Android Studio). Opened the new project as described in the [docs](https://facebook.github.io/react-native/docs/android-setup.html#editing-your-app-s-java-code-in-android-studio).

public

Reviewed By: bestander

Differential Revision: D2912557

fb-gh-sync-id: 251c180518a3fb9bb8e80963b236e982d65533be
shipit-source-id: 251c180518a3fb9bb8e80963b236e982d65533be
2016-02-09 06:37:34 -08:00
Adam Miskiewicz e6cb02d61a Use "babel-preset-react-native"
Summary:
Rather than specifying Babel plugins in the `.babelrc` packaged with react-native, leverage a Babel preset to define the plugins (https://github.com/exponentjs/babel-preset-react-native).

This allows for a much better user experience for those who want (or need) to override options in their project's `.babelrc`.

Prior to this PR, if a user wanted to use a custom babel-plugin (or a custom set of babel plugins), they'd have either 1) manually override the `.babelrc` in the react-packager directory (or fork RN), or 2) specify a custom transformer to use when running the packager that loaded their own `.babelrc`. Note - the custom transformer was necessary because without it, RN's `.babelrc` options would supersede the options defined in the project's `.babelrc`...potentially causing issues with plugin ordering.

This PR makes the transformer check for the existence of a project-level `.babelrc`, and if it it's there, it _doesn't_ use the react-native `.babelrc`. This prevents any oddities with Babel plug
Closes https://github.com/facebook/react-native/pull/5214

Reviewed By: davidaurelio

Differential Revision: D2881814

Pulled By: martinbigio

fb-gh-sync-id: 4168144b7a365fae62bbeed094d8a03a48b4798c
2016-02-03 08:15:32 -08:00
Christoph Pojer 717207a23f Hotfix jest startup time
Summary:
I talked about this a bunch before. node-haste2 will resolve this issue. Right now node-haste1 looks into eevery single node_module recursively even though we only need to look into a finite-set of them. Some node_modules are huge so it takes a long time. haste2 doesn't eagerly look into node_modules so it doesn't have this issue. This diff blacklists the modules from node-haste but since we use the `resolve` npm module as a fallback we'll still be able to require them.

public

Reviewed By: kassens

Differential Revision: D2852384

fb-gh-sync-id: 113f1bd9c66fcd712c2549a7110a3e752b0e4a69
2016-01-22 11:35:35 -08:00
James Ide 66cd8f71eb Set the versions in package.json and React.podspec to 0.0.0-master
Summary:
The current versions in these files is 0.12.0, which is out of date. Better to claim no version than the wrong version, so this diff changes the versions to 0.0.0-master.

Release branches will still have the correct versions.
Closes https://github.com/facebook/react-native/pull/5241

Reviewed By: svcscm

Differential Revision: D2819277

Pulled By: javache

fb-gh-sync-id: 99d4682e5d1f571e241f306caf309b2944483909
2016-01-13 06:15:01 -08:00
David Aurelio 324493edae Require transform file eagerly in transform worker
Summary:
One consequence we didn't predict after introducing the Internal Transform Pipeline, was that when the workers would get started, we won't require the external transformer the user specified up until the first time each worker received a job. There're 2 visible consequences of this: (1) the transform progress bar seems to get stuck for about 5 seconds the first time the packager receives a request and (2) the first N (# of cores) HMR requests take way longer (about 4 seconds with FB's transformer instead of << 1 second) as we need to require lots of modules.

This diff creates a temporary file for the js transformer workers that requires the user-specified transform file eagerly.
That makes sure workers have imported babel and the transforms before receiving the first request.

There are better ways to do this, like adding an `init()` method to the workers and call that eagerly. I will follow with another diff doing that.

public

Reviewed By: javache

Differential Revision: D2812153

fb-gh-sync-id: 15be316b792d1acd878ed9303bea398aa0b52e1d
2016-01-08 08:35:32 -08:00
Christoph Pojer b84ad2ab0d Updates for haste2 inside of jest
Summary:
I'm working on deploying haste2 with jest. This updates all the files that require changes for this to work and they are backwards compatible with the current version of jest.

* package.json was just outdated. I think haste1's liberal handling with collisions made this a "non-issue"
* env.js didn't properly set up ErrorUtils, also unsure why that isn't a problem in jest right now already?
* some things were mocking things they shouldn't
* Because of the regex that matches against providesModule and System.import, it isn't possible to list module names more than once. We have multiple tests reusing the same providesModule ids and using System.import with modules that only exist virtually within that test. Splitting up the strings makes the regexes work (we do the same kind of splitting on www sometimes if we need to) and using different providesModule names in different test files fixes the problem. I think the BundlesLayoutIntegration-test is going to be deleted, so this doesn't even matter.

public

Reviewed By: voideanvalue

Differential Revision: D2809681

fb-gh-sync-id: 8fe6ed8b5a1be28ba141e9001de143e502693281
2016-01-08 06:52:29 -08:00
David Aurelio b064094687 Add support for promise rejection tracking
Summary:
Adds support for tracking unhandled rejections with `console.warn` (= yellow box).

I will create a follow-up with proper error stack formatting.

related: #4971
fixes: #4045, #4142

public

{F59857438}

{F59857439}

Reviewed By: bestander

Differential Revision: D2803126

fb-gh-sync-id: 376b33e42a967675a04338cbff3ec315a77d1037
2016-01-07 12:02:56 -08:00
Martín Bigio 0b9f623cd0 babel-plugin-react-transform should be a regular dependency
Reviewed By: vjeux

Differential Revision: D2803782

fb-gh-sync-id: 58c3660dde226479dbfd180ce6a83f91b5a15465
2016-01-06 14:51:29 -08:00
James Ide 7100df0062 Move react-transform-hmr dep to "dependencies"
Summary:
It is required from the RN app JS, so it needs to be in prod dependencies.

cc martinbigio
Closes https://github.com/facebook/react-native/pull/5091

Reviewed By: svcscm

Differential Revision: D2798891

Pulled By: martinbigio

fb-gh-sync-id: 976ccf4d96338c8e3d7e457710559be51c4f7405
2016-01-04 15:15:43 -08:00
Ben Alpert 5bf1f4c05e Install fbjs@0.6.0, react@0.14.4
Reviewed By: zpao

Differential Revision: D2794354

fb-gh-sync-id: 57f5bc4ded5cc7eee17debdac76dc2934071dd54
2015-12-30 11:41:01 -08:00
Martín Bigio 52b248426e Fix Shrinkwrap & package.json
Reviewed By: vjeux

Differential Revision: D2791699

fb-gh-sync-id: 180687718ded0f4c4078ccf56ca0eb114966c8bf
2015-12-29 09:11:29 -08:00
Martín Bigio 24c908e794 Dependencies for Hot Loading
Reviewed By: vjeux

Differential Revision: D2789683

fb-gh-sync-id: 6c8f5a601040505eb597db3d6f50ec6abaa6cd6e
2015-12-28 16:44:52 -08:00
Christoph Pojer b7e939b38d Update all tests to use Jasmine 2
Reviewed By: vjeux

Differential Revision: D2782581

fb-gh-sync-id: 1d938a2bbdd8670c917c1793234dfdcb29fd4511
2015-12-23 10:08:01 -08:00
Johan Lindskogen afbff9bf88 Add support for binary type data (ArrayBuffer)
Summary:
Entirely based on https://github.com/facebook/react-native/pull/1829
I just updated the diff to be compatible with the current master branch.
Closes https://github.com/facebook/react-native/pull/4483

Reviewed By: svcscm

Differential Revision: D2783425

Pulled By: nicklockwood

fb-gh-sync-id: 1cc67c0741cff3b071530877d688f6b8c1061e3f
2015-12-23 10:07:37 -08:00
Christoph Pojer 699d748bb3 Upgrade jest to 0.8.2
Reviewed By: vjeux

Differential Revision: D2781488

fb-gh-sync-id: f70c2cab9533ae64a98fc39b6aa9f7c2127d6fde
2015-12-23 10:07:09 -08:00
Christopher Chedeau 5384c47d9a Revert package.json change 2015-12-22 10:32:20 -08:00
Martin Konicek e35469e1db Upgrade fbjs-haste to 0.3.4
Summary:
public

Attempt to fix https://travis-ci.org/facebook/react-native/builds

Steps:

    cd .../react-native-github
    npm install fbjs-haste@0.3.4
    # manually update npm-shrinkwrap.json (normally done using npm shrinkwrap --dev but the shrinkwrap file is out of date)

Reviewed By: zpao

Differential Revision: D2755259

fb-gh-sync-id: c5237adcc14e9e21cc09dfad765eff16ddf28484
2015-12-14 11:16:32 -08:00
Martin Konicek 4626de9ba3 Update fbjs-haste
Reviewed By: bestander

Differential Revision: D2754889

fb-gh-sync-id: 5484fbd1079b1434b2853179e663eff30d03b82d
2015-12-14 09:06:33 -08:00
Christopher Chedeau 402fd06725 Introduce code-analysis bot 2015-12-11 08:44:12 -08:00
David Aurelio 5dc40afbf6 Add for-of transform to babel configurations
Summary:
Adds babel-plugin-transform-es2015-for-of to babel configuration.

public

Reviewed By: tadeuzagallo

Differential Revision: D2712220

fb-gh-sync-id: cc6dd9e6e70946607ef9bb9f659eb628cf2eb555
2015-12-02 04:14:30 -08:00
Bram 710b443af1 bugfix #3997: react-native bundle not working on windows 10
Summary: fixes https://github.com/facebook/react-native/issues/3997

the root cause is in

Mon, 09 Nov 2015 13:22:47 GMT ReactNativePackager:SocketServer uncaught error Error: listen EACCES C:\Users\donald\AppData\Local\Temp\react-packager-9248a9803ac72b509b389b456696850d

This means that the socket server cannot create the socket.

cfr https://gist.github.com/domenic/2790533 the socket name is not a valid windows socket name.
Closes https://github.com/facebook/react-native/pull/4071

Reviewed By: mkonicek

Differential Revision: D2699546

Pulled By: davidaurelio

fb-gh-sync-id: 6c6494c14c42bb17506b8559001419c9f85e91e3
2015-11-27 08:22:29 -08:00
Tadeu Zagallo 8d347d6add Bump babel-core to 6.1.20
Reviewed By: davidaurelio

Differential Revision: D2656437

fb-gh-sync-id: 237b3c285ab83cae2099a1ca043e22e7e5afc691
2015-11-16 04:04:21 -08:00
David Aurelio 21bae9b294 Unbreak jest tests (and travis e2e tests)
Reviewed By: mkonicek

Differential Revision: D2652002

fb-gh-sync-id: 8aab8da47dd737acc4ee9acddc484bd3bbdf1184
2015-11-14 03:26:24 -08:00
Flavio daCosta eae91cc680 Don’t report failure to npm-start with arg support
Summary: This supports passing args to `npm start` as referenced in [this comment][comment] while still returning 0 on failure from an npm perspective.

This builds off the npm change in [this commit][commit] and discussed in this [PR].

[comment]: https://github.com/facebook/react-native/pull/2415#issuecomment-141309448
[commit]: 75df3b537a
[PR]: https://github.com/facebook/react-native/pull/2415
Closes https://github.com/facebook/react-native/pull/3002

Reviewed By: svcscm

Differential Revision: D2647258

Pulled By: spicyj

fb-gh-sync-id: 2385254d23a37a99a53f53308e4688bc1fc3124e
2015-11-12 09:27:29 -08:00
Ben Alpert b90fe8e2e8 Use external babel helpers
Reviewed By: vjeux

Differential Revision: D2643810

fb-gh-sync-id: a415e2449a98b6070c688c1c250eb8a908b40409
2015-11-12 07:04:55 -08:00
Tadeu Zagallo 86c3e385ef Bump fbjs-scripts version 2015-11-11 13:41:16 +00:00
Ben Alpert c73809d116 Update to React 0.14.2
Summary: Not many changes. Notably, this includes https://github.com/facebook/react/pull/5166 which fixes Chrome debugging in RN (in a web worker, `window.dispatchEvent` is available but `document` is not).

Fixes facebook/react-native#4007.

public

Reviewed By: sebmarkbage

Differential Revision: D2638788

fb-gh-sync-id: f6838af54fb0da855bac7edba0adce5d0094d0d9
2015-11-10 15:36:32 -08:00
Tadeu Zagallo 4bd012e796 Update package.json and shrinkwrap with babel 6
Summary: public

Update package.json and npm-shrinkwrap.json  with all the packages necessary for babel 6.

Reviewed By: davidaurelio

Differential Revision: D2631290

fb-gh-sync-id: 3ec4cbf902379256478f940f2711cab5de5f7e6e
2015-11-10 10:55:15 -08:00
Ben Alpert 3b9cc4c2a5 npm install react-haste@0.14.0
Summary: Install react-haste and fbjs-haste, remove react-tools, update npm-shrinkwrap.json. This only updates the npm packages; the subsequent commit will update the repo to work correctly with this new version.

public

Reviewed By: vjeux

Differential Revision: D2608597

fb-gh-sync-id: a372e4033f7c5091fa15b068853dd00ee69f5f75
2015-11-06 19:52:24 -08:00
Brent Vatne 0da2004e88 Expose additional private modules
Summary: - TextInputState as TextInput.State
- Touchable
- flattenStyle as StyleSheet.flatten
- ReactNativeART as ART

Original discussion in #1821
Closes https://github.com/facebook/react-native/pull/3308

Reviewed By: sebmarkbage

Differential Revision: D2527152

Pulled By: javache

fb-gh-sync-id: 19d4ef9d4c0e6587b9f0793e1ca624aebb034f3b
2015-11-05 03:35:18 -08:00
Christoph Pojer 7041a22bd0 Update jest to 0.7.1
Reviewed By: frantic

Differential Revision: D2614935

fb-gh-sync-id: 64cc4fb439f0c53f0eb0588c22e0291813a7e334
2015-11-04 14:42:13 -08:00
Christoph Pojer 787e421815 Add moduleNameMapper config
Summary: This adds the moduleNameMapper config which corresponds to the same config in flow.

public

Reviewed By: voideanvalue

Differential Revision: D2582879

fb-gh-sync-id: f116b86a7d4196c39faa366a521fe8401769b173
2015-10-26 17:03:28 -07:00
Christoph Pojer 725de1d236 Update to 0.6.1
Summary: This version should be more stable and has the `moduleNameMapper` feature that frantic was asking for - I will send a follow-up diff for that. I also fixed an issue with `module.parent` and a module inside of yeoman that thought it was owning the universe.

See https://github.com/facebook/jest/blob/master/CHANGELOG.md#061 for a changelog since 0.5.6.

public

allow-crlf-text

Reviewed By: javache

Differential Revision: D2579041

fb-gh-sync-id: cb918875557f219239f49fc0ad49ac61d0884173
2015-10-26 15:37:23 -07:00
Martín Bigio 2856be9a07 Bring back global cli module check
Summary: public

This was introduced by vjeux on 0a5967d and removed on 0686b01. I guess it was removed accidentally as this this is a nice warning to have that should prevent n00bs from commiting a common mistake

Reviewed By: frantic

Differential Revision: D2563885

fb-gh-sync-id: 9fae145bbec587514f118d1d28d076b1d82f0630
2015-10-26 15:36:29 -07:00
Martín Bigio 849aa4dae6 Move `private-cli` commands to `local-cli`
Summary: public

We cannot remove `local-cli` because is referenced by the global cli explicitly. If we do so, people would have to upgrate this global thin cli which will cause some pain. So, lets move `private-cli` commands into `local-cli` instead.

Reviewed By: frantic

Differential Revision: D2571983

fb-gh-sync-id: 712c29430203660fb6f0d5f23813cb2a7156ee48
2015-10-26 15:36:04 -07:00
Alex Kotliarskyi f0cf0b0288 npm install --save opn
Reviewed By: mkonicek

Differential Revision: D2570884

fb-gh-sync-id: 89f9ab8e8b04081442da28e8c30caa80b454d696
2015-10-23 11:32:29 -07:00
Martín Bigio 32aeeea313 Fix cli entry points
Reviewed By: frantic

Differential Revision: D2565954

fb-gh-sync-id: 6fde9e1dbefd71944e8f857e9a40619bf599ef75
2015-10-22 10:13:13 -07:00
Martin Konicek 58ea08dfdb Fix react-tools dependency
Reviewed By: foghina, spicyj

Differential Revision: D2570237

fb-gh-sync-id: 4340953702112af704cac97e7d27313c573eee20
2015-10-22 08:38:27 -07:00
Martin Konicek 62ac37275f Actually revert 2608efccb6
Summary: We need to keep both babel and babel-core top level. `npm-shrinkwrap` defines that to be at the top level but that's only used when cloning the github repo. When publishing to npm and installing from npm, it has no effect (it's not published anywhere).

This file assumes `babel-core` is at the top level: https://github.com/facebook/react-native/blob/master/packager/babelRegisterOnly.js

public

Reviewed By: davidaurelio

Differential Revision: D2565054

fb-gh-sync-id: 7d6a079d88e09c1ba0478cf4041948e330da639a
2015-10-21 09:34:26 -07:00
Martín Bigio 088c193a22 Start packager through cli
Reviewed By: frantic

Differential Revision: D2561066

fb-gh-sync-id: 1743153a84947da5d0e54aca7e1919cf5df3a965
2015-10-21 03:03:59 -07:00
Martín Bigio 34c91800d2 Revert 2608efc
Reviewed By: frantic

Differential Revision: D2561665

fb-gh-sync-id: fe7c3a63a8644e122703637c2d4ead21b75a373f
2015-10-21 03:03:53 -07:00
Samarendra M Hedaoo 54b5b62f78 Adding http as failover for react-tools git repo.
Summary: Fixes #2797 for me.

Most times git://github.com/facebook/react-tools times out. So adding
http as a fail-over so that if git protocol doesn't work while cloning
the react-tools repo as a dependency, http would atleast work and ensure
that a simple "react-native init myProject" doesn't fail.

Submitting a PR so that http is used as a failover when cloning. (I guess that is what git+http does in package.json)
Closes https://github.com/facebook/react-native/pull/3514

Reviewed By: svcscm

Differential Revision: D2561417

Pulled By: spicyj

fb-gh-sync-id: ac421a7f57474124875a5cabdc5a34801019f6cd
2015-10-20 13:49:25 -07:00
Martin Konicek 82fad33af7 Breaking change: Remove redundant packager entry point
Summary: We have too many ways to start the packager:
- react-native start
- npm start
- ./packager/packager.sh
- ./packager/launchPackager.command

This removes yet another one. According to the [npm docs](https://docs.npmjs.com/files/package.json)
this creates `/usr/local/bin/react-native-start`. Let's kill it.

public

Reviewed By: martinbigio

Differential Revision: D2559953

fb-gh-sync-id: e3b41a0622e6168fe686cdf9c93714dbf02f5965
2015-10-20 09:54:30 -07:00
Martín Bigio 17c59ace46 Add `node-fetch` node module to repo
Reviewed By: vjeux

Differential Revision: D2542225

fb-gh-sync-id: a94e799d5595eb7909b42bc8acb6d80259ca1609
2015-10-19 15:00:26 -07:00
James Ide 2608efccb6 exclusively use babel-core
Summary: We don't need babel the CLI tool... just babel-core suffices. Remove babel, which speeds up npm install, and just use babel-core.
Closes https://github.com/facebook/react-native/pull/2476

Reviewed By: svcscm

Differential Revision: D2550081

Pulled By: martinbigio

fb-gh-sync-id: 4390a48ff4cc4ea78217e8af00322b7342e98c95
2015-10-16 09:24:23 -07:00
Martin Bigio 6f04687436 Include `private-cli` on npm export
Reviewed By: @vjeux

Differential Revision: D2532645

fb-gh-sync-id: 94e45cd0e799dd450feb6e1a8e9fc85a6655dffb
2015-10-12 13:02:24 -07:00
Martin Konicek 264cb8962a Don't publish /ReactAndroid/build to npm, update version on master
Summary: @​public

See the discussion in https://github.com/facebook/react-native/pull/3019

This is temporary Gradle output and can be huge (>100MB).

Reviewed By: @foghina

Differential Revision: D2531612

fb-gh-sync-id: 8874d39b1a9b35dc4b4ce465dd149589db75bb29
2015-10-12 11:11:40 -07:00
James Ide 4f0a7250cc Add Node >= 4 requirement to package.json and packager/package.json
Summary: When you try to install these with old Node you'll now get a message from npm telling you that your version of Node is old. This makes it more obvious what's going on and hopefully reduces the number of issues we get due to people using an old version of Node.
Closes https://github.com/facebook/react-native/pull/3296

Reviewed By: @​svcscm

Differential Revision: D2526500

Pulled By: @vjeux

fb-gh-sync-id: 036e10a8d1819ea082e419cd328a458202f0e071
2015-10-09 14:44:23 -07:00
Pieter De Baets 7c1b6b0fb6 Vendor tinycolor; strip unnecessary components
Reviewed By: @vjeux

Differential Revision: D2503048
2015-10-05 04:41:26 -07:00
James Ide 3cdd8d0320 Include ReactAndroid with the npm distribution
Summary: Enables building RN Android from source while keeping it in sync with the iOS distribution.
Closes https://github.com/facebook/react-native/pull/3019

Reviewed By: @​svcscm

Differential Revision: D2506390

Pulled By: @vjeux
2015-10-03 11:49:33 -07:00
Christopher Chedeau b90d622945 Import event-target-shim npm module
Reviewed By: @foghina

Differential Revision: D2498747
2015-10-01 12:32:24 -07:00
Henry Zhu e45b7ffb1e update lint packages, fix lint errors
Summary: @​cesarandreu pointed out running eslint on react-native resulted in `t.isReferencedIdentifier is not a function` issues on the babel #linting channel on slack.

- update eslint, babel-eslint, eslint-plugin-react
- fix eslint errors: `Error - t.isReferencedIdentifier is not a function`
- fix lint npm script

I see there's also https://github.com/facebook/react-native/pull/1736 from @ide which would fix it tooCloses https://github.com/facebook/react-native/pull/1874

Reviewed By: @vjeux

Differential Revision: D2495878

Pulled By: @frantic
2015-09-30 21:02:37 -07:00
James Ide e15035f30b Delete SampleApp
Summary: The sample app's code has been converted to Yeoman generator templates. Tell people to run the UIExplorer instead, or the `react-native init` project (which is the same as the SampleApp). This will slightly reduce the size of the npm package and cleans up unused files.
Closes https://github.com/facebook/react-native/pull/3025

Reviewed By: @​svcscm

Differential Revision: D2484901

Pulled By: @foghina
2015-09-29 09:21:33 -07:00
Donald Wong 428f76d8a2 Reverting D2475270 2015-09-24 14:11:42 -07:00
Christoph Pojer 252c12c353 Update to 0.5.8
Reviewed By: @vjeux

Differential Revision: D2475270
2015-09-24 10:58:32 -07:00
Martín Bigio 51917f6cd9 Add portfinder dev dependency
Reviewed By: @vjeux

Differential Revision: D2468120
2015-09-23 19:29:40 -07:00
Aaron Chiu 9f62d54cce merge .flowconfig files part 1
Differential Revision: D2472462

committer: Service User <svcscm@fb.com>
2015-09-23 13:02:27 -07:00
Martín Bigio a85884275d Temp dependency should be a dev one
Reviewed By: @vjeux

Differential Revision: D2468639
2015-09-22 18:24:26 -07:00