mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Revert "Move react to peerDependencies"
This reverts commit 9f01f96770.
This commit is contained in:
@@ -82,13 +82,5 @@ module.exports = yeoman.generators.NamedBase.extend({
|
||||
{name: this.name}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
install: function() {
|
||||
if (this.options.upgrade) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.npmInstall('react', { '--save': true });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,19 +44,6 @@ module.exports = function upgrade(args, config) {
|
||||
'https://github.com/facebook/react-native/releases/tag/v' + semver.major(v) + '.' + semver.minor(v) + '.0'
|
||||
)
|
||||
);
|
||||
|
||||
// >= v0.21.0, we require react to be a peer depdendency
|
||||
if (semver.gte(v, '0.21.0') && !pak.dependencies['react']) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'\nYour \'package.json\' file doesn\'t seem to have \'react\' as a dependency.\n' +
|
||||
'\'react\' was changed from a dependency to a peer dependency in react-native v0.21.0.\n' +
|
||||
'Therefore, it\'s necessary to include \'react\' in your project\'s dependencies.\n' +
|
||||
'Just run \'npm install --save react\', then re-run \'react-native upgrade\'.\n'
|
||||
)
|
||||
);
|
||||
return Promise.resolve();
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
|
||||
+1
-3
@@ -102,9 +102,6 @@
|
||||
"bin": {
|
||||
"react-native": "local-cli/wrong-react-native.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^0.14.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"absolute-path": "^0.0.0",
|
||||
"art": "^0.10.0",
|
||||
@@ -136,6 +133,7 @@
|
||||
"optimist": "^0.6.1",
|
||||
"progress": "^1.1.8",
|
||||
"promise": "^7.1.1",
|
||||
"react": "^0.14.5",
|
||||
"react-timer-mixin": "^0.13.2",
|
||||
"react-transform-hmr": "^1.0.2",
|
||||
"rebound": "^0.0.13",
|
||||
|
||||
Reference in New Issue
Block a user