Commit Graph

541 Commits

Author SHA1 Message Date
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
Martín Bigio 37b5cd45e1 Add `temp` node dependency
Reviewed By: @vjeux

Differential Revision: D2445915
2015-09-21 17:49:37 -07:00
Christoph Pojer 24b0064eae Upgrade jest to 0.5.6
Reviewed By: @vjeux

Differential Revision: D2459297
2015-09-21 14:39:55 -07:00
Christoph Pojer fa01b2e4cb Codemod tests to use top-level-requires
Reviewed By: @DmitrySoshnikov

Differential Revision: D2456250
2015-09-19 15:41:29 -07:00
Christoph Pojer 3fca7f4d7b inline requires + preprocessor updates
Reviewed By: @DmitrySoshnikov

Differential Revision: D2455903
2015-09-19 15:22:33 -07:00
Alexsander Akers 9a2d05d9b2 Move color processing to JS
Reviewed By: @vjeux

Differential Revision: D2346353
2015-09-17 17:20:45 -07:00
facebook-github-bot-6 0d09f22dbf Get back 100% in sync with fb codebase 2015-09-16 10:30:53 -07:00
Christoph Pojer 6e991cf96a Simplify jest config + update to jest 0.5.5 in react-native-github
Reviewed By: @DmitrySoshnikov

Differential Revision: D2445071
2015-09-16 10:24:58 -07:00
Martin Konicek 42eb5464fd Release React Native for Android
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.

See the Known Issues guide on the website.

We will work with the community to reach platform parity with iOS.
2015-09-14 18:13:39 +01:00
Xiqi Liu b45f89e69f Add Jest test to check dependency version matches.
Reviewed By: @vjeux

Differential Revision: D2396634
2015-09-11 01:25:27 -07:00
Christopher Chedeau c0488c71d3 [npm] Fix connect/
Summary:
We had an old version of connect internally and a new version on github. Unfortunately, internally we picked up the od one and externally we picked the new one. This diff removes the internal version and downgrades the external version. It also updates package.json to make sure we have the same versions that are installed, somehow they mismatch!?
2015-09-08 11:31:52 -08:00
Amjad Masad 8586f89322 [react-packager] Update sane to fix bug and add new features
Summary:
Updates sane to get:

1. Fix error plumbing (surface watchman errors correctly)
2. Better capability testing
3. Use watchman's globbing
4. Other minor fixes
2015-09-08 01:25:29 -08:00
Christopher Chedeau 8831bb10a1 [npm] Upgrade all the modules to their latest version 2015-09-04 14:48:23 -08:00
Tadeu Zagallo b9f12056e9 [ReactNative] Update uglify-js
Summary:
Uglify had already been updated, but was accidentally changed
back to the previous version. Update it again.

@allow-crlf-text
2015-09-04 07:23:01 -08:00
James Ide 7f65971761 [npm] Update to stacktrace-parser@0.1.3 and ws@0.8.0 to satisfy io.js 3 / Node 4
Summary:
The previous version of stacktrace-parser 0.1.2 had an line in its package.json file that required Node <= 2.x. That line was removed, so it no longer warns on io.js 3.x or Node 4.x.

Similarly, ws 0.8.0 was published with support for the new V8, so it compiles with io.js 3.x and therefore should work with Node 4.x.

Updated the Travis file as well to run on io.js 3.x.

Fixes #2258, #2455

Closes https://github.com/facebook/react-native/pull/2398
Github Author: James Ide <ide@jameside.com>
2015-09-02 11:20:56 -08:00
Ben Alpert 75df3b537a Don't report failures to npm
Summary:
This suppresses this output from npm:

```
npm ERR! Failed at the react-native@0.9.0 start script './packager/packager.sh'.
npm ERR! This is most likely a problem with the react-native package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./packager/packager.sh
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-native
```

We don't seem to have any automated scripts that rely on the exit code of npm start (or even call it at all).
Closes https://github.com/facebook/react-native/pull/2415
Github Author: Ben Alpert <balpert@fb.com>
2015-08-24 19:32:27 -08:00
Amjad Masad a008704b51 [react-packager] Add bser to be used in a socket server implementation 2015-08-24 17:04:32 -08:00
Amjad Masad 8c5626cd87 [react-packager] check in the progress module 2015-08-24 16:09:33 -08:00
Martin Konicek 934e7b9afd [ReactNative][oss] Make package.json in consistent with github 2015-08-21 08:09:21 -07:00
Amjad Masad 6debfce374 [react-native] Update graceful-fs and use it in _build_bundle.js 2015-08-20 23:58:51 -07:00
Amjad Masad 9d96d00163 [react-native] Check in babel-plugin to inline __DEV__
Summary:
This plugin resolves __DEV__ to the value of `NODE_ENV === 'development'`. This can then be evaluated and dead code can be removed by uglifyjs.
2015-08-15 13:17:48 -07:00
Amjad Masad 8bd1cb8cce [react-native] Add babel-plugin-node-env-inline plugin
Summary:
Check in the `process.env.NODE_ENV` inline plugin. This will be used in conjuction with uglifyjs to eliminate dead code resulting from environment checks.
2015-08-14 10:46:05 -08:00
Amjad Masad 7bfc1baf7f [react-packager] Upgrade uglifyjs for Max call stack bug
Summary:
We're hitting an issue with large code size and `Maximum call stack size exceeded` error. https://github.com/mishoo/UglifyJS2/issues/414
We're seeing on inconsistently failing on landcastle.
2015-08-13 14:35:13 -08:00
James Ide abdd0e09b3 [npm] Upgrade to stacktrace-parser 0.1.2, which supports io.js
Summary:
stacktrace-parser used to list only Node 0.10 under its list of supported engines. This new version includes Node 1.x and 2.x (i.e. io.js) as well, which addresses the warning during `npm install`.

There's no problem with using the older version of stacktrace-parser; this just clears the warning.

Closes https://github.com/facebook/react-native/pull/1738
Github Author: James Ide <ide@jameside.com>
2015-08-12 11:12:59 -08:00
James Ide 47e1d1aef8 [Async] Enable async/await and update UIExplorer and tests
Summary:
- Enables async/await in .babelrc and transformer.js
- Adds regenerator to package.json. Users still need to explicitly require the regenerator runtime -- this is so that you only pay for what you use.
- Update AsyncStorage examples in UIExplorer to use async/await
- Update promise tests in UIExplorer to use async/await in addition to the promise API

Closes https://github.com/facebook/react-native/pull/1765
Github Author: James Ide <ide@jameside.com>
2015-08-04 05:35:13 -08:00
Alex Kotliarskyi 58a403d3c8 [ReactNative] Pin babel version
Summary:
Currently minor version babel updates add and remove transforms, but internal
version is checked in and pinned to 5.6.4. Until we figure out how to update
internal deps systematically, we need to make sure OSS edition of RN matches
internal, otherwise we get test failures due to package version mismatches.
2015-07-27 11:20:22 -08:00
James Ide c8373d2ad6 [Chrome Debugger] Update ws dependency to 0.7.2
Summary:
ws 0.7.2 officially supports io.js

Closes https://github.com/facebook/react-native/pull/2013
Github Author: James Ide <ide@jameside.com>
2015-07-24 15:52:49 -08:00
Ben Alpert 710d29efae [ReactNative] Update React to 0.14-beta1 2015-07-23 18:07:58 -08:00
John Ku 72694a722e Include jestSupport for npm package
Summary:
https://github.com/facebook/react-native/pull/1639 was closed for unknown reason. This will help unit test with Jest without manually copying them into node_modules/react-native.
Closes https://github.com/facebook/react-native/pull/1848
Github Author: John Ku <john.cmyk@gmail.com>
2015-07-15 19:00:15 -08:00
James Ide 19ddbac113 [Versions] Update versions in package.json and podspec to 0.7.1
Summary:
When developing against master I want to rely on the version numbers being reasonably accurate.
Closes https://github.com/facebook/react-native/pull/1804
Github Author: James Ide <ide@jameside.com>
2015-07-14 17:57:07 -08:00
Forbes Lindesay ebd046ae21 Remove bluebird 2015-07-14 10:25:16 -08:00
James Ide 40a043109d [io.js] Print a warning message if the user is not on io.js 2.x
Summary:
Detects if the user is on Node or io.js 1.x and prints a banner explaining how to upgrade. We probably should link to more detailed upgrade docs so this is just a start.

I also added a function to format banners that is kind of useful.

Addresses part of #1737

![packager-banner](https://cloud.githubusercontent.com/assets/379606/8447050/ad615402-1f67-11e5-8c02-ece5f7488135.png)

Closes https://github.com/facebook/react-native/pull/1824
Github Author: James Ide <ide@jameside.com>
2015-07-10 00:32:46 -08:00
Spencer Ahrens fd2cb763df [ReactNative] add immutable dependency for NavigationRouteStack 2015-07-09 02:53:02 -08:00
Dmitry Soshnikov 555236865b [react-native][jest] Sync to 0.5.x and update to io.js 2015-06-29 20:36:34 -08:00
Amjad Masad 1d43a37973 [react-packager] Check-in babel-core 2015-06-24 16:12:37 -08:00
Alex Kotliarskyi 0a6c1d6148 [ReactNative] Disable mocking "promise" in OSS Jest tests 2015-06-24 10:25:13 -08:00
Forbes Lindesay 8e07b39a1e Update promise to 7.0.3
Summary:
Updates promise, and more importantly asap.  This fixes some nasty race conditions.

See:

 - https://github.com/then/promise/issues/99
 - https://github.com/then/promise/issues/93

@public

Test Plan:
sh Libraries/FBReactKit/runJestTests.sh
Open Catalyst and check it works
2015-06-17 02:42:53 -08:00
James Ide 9218c0bfb7 Update version in package.json to 0.6.0
Summary:
The version in master should at least match the latest rc's version.
Closes https://github.com/facebook/react-native/pull/1599
Github Author: James Ide <ide+github@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-06-15 14:13:09 -08:00
Tadeu Zagallo ae9e4089fc [ReactNative] Revert packager ignoring node_modules 2015-06-11 10:45:32 -08:00
Brent Vatne 57ce9fb11a [package.json] Leave the protocol choice for a Github repo to npm
Summary:
Fixes #1371
Closes https://github.com/facebook/react-native/pull/1447
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-06-01 09:36:18 -08:00
Leonardo YongUk Kim 7e0064f097 Add the license field on package.json
Summary:
Add the license field on package.json
Closes https://github.com/facebook/react-native/pull/1409
Github Author: Leonardo YongUk Kim <dalinaum@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-28 12:00:46 -08:00
Tadeu Zagallo ebae151f24 [ReactNative] Update sane fork + FileWatcher config 2015-05-28 07:12:41 -08:00
Tadeu Zagallo 21b3304a95 [ReactNative] Add option to file watcher to ignore node_modules 2015-05-28 01:18:47 -08:00
Tadeu Zagallo 380ba2aab4 [ReactNative] Add babel to package.json 2015-05-27 17:00:14 -08:00
Jared Forsyth 52725437d4 Upgrating linting to use babel-eslint 2015-05-22 11:16:35 -08:00
Amjad Masad eec67aff4d [react-packager] Update worker-farm to get custom error props
Summary:
@public
In my previous worker-farm update, the implementation wasn't complete.
Errors only passed the "data" property. This fixes the problem by passing all custom
props.

Test Plan:
1. `./Libraries/FBReactKit/runJestTests.sh`
2. `./Libraries/FBReactKit/runJestTests.sh PackagerIntegration`
2015-05-22 08:51:11 -08:00
Spencer Ahrens 11b515b1b0 [ReactNative] clean lint in all of Libraries/ 2015-05-19 13:47:04 -08:00
Spencer Ahrens 1c70f33511 [ReactNative] clean lint for Libraries/Components 2015-05-18 15:54:07 -08:00
Tadeu Zagallo eedb880f6e [ReactNative] Bump package.json version to 0.4.4 2015-05-17 19:05:14 -08:00
Amjad Masad 407d8d4cf6 [react-native] Update jest to get perf bugfix 2015-05-17 02:51:35 -08:00
Dmitry Soshnikov 545edba913 [jest] Update to v0.4.4 2015-05-17 00:20:42 -08:00
Christopher Chedeau 766983f69b [react native] Bump jest-cli version to 0.4.3 in RN packages 2015-05-14 10:32:44 -08:00
Amjad Masad a6b29a0b1a [react-packager] Update worker farm 2015-05-13 17:54:19 -08:00
Philipp von Weitershausen b47e89a397 Back out D2063283: [react-packager] Update worker farm 2015-05-13 12:41:47 -08:00
Gabe Levi 1e42fea0af Bump the react-native .flowconfig Flow version to v0.11.0 2015-05-13 13:38:54 -07:00
Amjad Masad 4a137aa840 [react-packager] Update worker farm
Summary:
@public
Adds a couple of things:
* `autoStart` option, which warms up the worker farm as opposed to spin up children on demand
* worker-farm now passes properties on errors from children to parent (for line/col number in errors without resorting to hacks)

Test Plan:
* Run the server with --reset-cache
* things work
2015-05-13 13:24:36 -07:00
Alex Kotliarskyi 41612f37b0 0.4.2 2015-05-08 13:37:49 -07:00
Gabe Levi e433b6a57e Bump jstransform version for react-native 2015-05-07 18:45:56 -08:00
Amjad Masad 7362f11c22 [react-packager] Use gracful-fs to avoid EMFILE errors
Summary:
@public
Currently, every time we call into the packager we have to change the ulimit to make sure
we don't hit the EMFILE error (the packager uses as much concurrency as possible).

Using graceful-fs, the fs module -- with monkey patching -- becomes intelligent enough to recover
from EMFILE errors.

Test Plan:
* set `ulimit -n 256*
* start server
* request from your browser: http://localhost:8081/RKJSModules/MainBundle/CatalystBundle.includeRequire.bundle
* it works
2015-05-05 14:30:43 -08:00
Amjad Masad bd591505f1 [react-packager] update sane 2015-05-05 10:37:59 -08:00
Amjad Masad b532ec000f [react-packager] Update sane to use watch-project 2015-05-04 10:36:07 -08:00
James Ide 1cff06dca3 [podspec] Include podspec in npm distribution
Summary:
The way RCT_EXPORT_MODULE currently works, any module that is included as a pod also needs react itself to be included as a pod.

npm seems to be the preferred way to get the latest copy of react (compared to github directly or the cocoapods repo) so what this diff enables is including react as a pod if it was installed via npm.
Closes https://github.com/facebook/react-native/pull/1057
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-29 08:14:24 -08:00
Ben Alpert 1f98c843b0 [react-native] Update react-tools to 0.13.2* 2015-04-24 10:58:28 -08:00
Alex Kotliarskyi aaaa9a98ef [ReactNative] Update stacktrace-parser 2015-04-17 15:39:24 -08:00
Amjad Masad 320605e5af [react-packager] Update sane to get windows fixes (and others) 2015-04-14 09:56:32 -08:00
Forbes Lindesay 96c47cd2e5 Add the promise library as a dependency 2015-04-10 16:25:10 -08:00
Amjad Masad bd7b9da64a [react-packager] Implement new style asset packaging (with dimensions) 2015-04-08 13:11:21 -08:00
Christopher Chedeau 21a054e9fc [ReactNative] Update package.json 2015-04-07 22:16:30 -08:00
Alex Kotliarskyi 645f2a73bc [ReactNative] npm install --save chalk 2015-04-07 15:39:35 -08:00
Ben Alpert f66c1643f5 [react-native] Update react to 0.13.1, jstransform alongside 2015-04-02 10:58:51 -08:00
Pilwon Huh 87599bfcd1 [react-packager] Switch from Q to Bluebird as promises library
Summary:
This PR improves performance of `react-packager` by switching the promises library from the [Q](https://github.com/kriskowal/q) to [Bluebird](https://github.com/petkaantonov/bluebird).

[Here is the test result](https://github.com/facebook/react-native/issues/361#issuecomment-87829808) showing a noticeable difference. (2x speed improvement)

Please refer to [this issue](https://github.com/facebook/react-native/issues/361) for more details.
Closes https://github.com/facebook/react-native/pull/516
Github Author: Pilwon Huh <pilwon@gmail.com>

Test Plan:
./runJestTests
start app and click around
2015-03-31 21:24:13 -08:00
Amjad Masad c9d4dd3695 [react-native] v0.3.1 2015-03-31 13:28:44 -08:00
Amjad Masad c94f7c3656 [React Native] Sync from github 2015-03-27 22:09:11 -08:00
Amjad Masad 35589d6f09 [react-packager] move dependencies to root package.json 2015-03-26 21:45:55 -08:00
Tadeu Zagallo 20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
Alex Kotliarskyi 0fe0af2048 [ReactNative] Add react-native-start bin to react-native packge 2015-03-25 18:14:29 -08:00
Christopher Chedeau 546d03d8ed [ReactNative] Update package.json to be npm-ready 2015-03-25 18:08:07 -08:00
Eric Vicenti eb16bb4dfd [ReactNative] Fix OSS Dependency Issues 2015-03-24 16:15:23 -08:00
Tadeu Zagallo 57ee9e7dc0 [ReactNative] Use oss TimerMixin 2015-03-24 10:46:05 -08:00
Christopher Chedeau 87f42ab450 [ReactNative] Remove react-native/package.json 2015-03-22 20:17:01 -08:00
Tadeu Zagallo b881028494 [ReactNative] Add root package.json name back 2015-03-20 17:38:23 -08:00
Alex Kotliarskyi 0c5f9e3662 [ReactNative] Add missing websocket dependency 2015-03-20 15:29:56 -08:00
Christopher Chedeau 737cae8f19 [ReactNative] Remove duplicate package.json with the same name 2015-03-19 09:04:39 -08:00
Amjad Masad eabe9f43c8 [react-packager] package.json cleanup (seperate packager into it's own package) 2015-03-11 17:42:46 -08:00
Alex Kotliarskyi 378e59b90a [ReactNative] Make tests run on TravisCI 2015-03-10 18:33:20 -08:00
Ben Alpert 582c05f4a0 [React Native] Update React to v0.13.0-rc2 2015-03-06 17:12:53 -08:00
Amjad Masad 668c53ab9c [react-packager] Cleanup package.json 2015-03-03 00:30:06 -08:00
Amjad Masad bb7040808e [react-packager] Add uglify-js library 2015-03-02 21:10:01 -08:00
Amjad Masad 96312af117 [react-packager] Fix lint errors 2015-02-25 20:29:42 -08:00
Amjad Masad cf7d196c45 [react-packager] Fix jest tests 2015-02-25 14:17:42 -08:00
Amjad Masad 00553c6d06 [react-packager][cleanup options 1/2] add npm installed joi validation library 2015-02-23 13:11:35 -08:00
Spencer Ahrens efae175a8e [react-packager][streamline oss] Move open sourced JS source to react-native-github 2015-02-19 21:25:11 -08:00