Commit Graph

4 Commits

Author SHA1 Message Date
Sawyer Hood 9425bcff8f Updated a warning string in upgrade.js
Summary:
I inserted an 'in' in the warning message that is displayed when the user's package.json file doesn't have a valid version number for react native.

Test plan
---------------
-run upgrade.js on a project with an invalid version number.
Closes https://github.com/facebook/react-native/pull/7314

Differential Revision: D3245839

fb-gh-sync-id: e38f3be0884d8c75f9610faced85d5c81c24a49e
fbshipit-source-id: e38f3be0884d8c75f9610faced85d5c81c24a49e
2016-04-30 18:21:17 -07: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
Satyajit Sahoo 80bf431f98 Add warnings while upgrading RN with `react-native upgrade`
Summary: Closes https://github.com/facebook/react-native/pull/4854

Reviewed By: svcscm

Differential Revision: D2803252

Pulled By: foghina

fb-gh-sync-id: e6b05b19cf45773d7683ae8ae35643f400e51692
2016-01-05 09:58:28 -08: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