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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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