Release script no longer auto-updates peerDependencies react version (#11292)

* Release script ensures peer dep matches release major version, but otherwise no longer auto-updates them to exactly match the release version.
* f
This commit is contained in:
Brian Vaughn
2017-10-20 08:53:15 -07:00
committed by GitHub
parent 845b1afdc5
commit fa5adb3bc4

View File

@@ -42,8 +42,15 @@ const update = async ({cwd, dry, version}) => {
}
if (project !== 'react') {
json.peerDependencies.react = `^${version}`;
const peerVersion = json.peerDependencies.react.replace('^', '');
// Release engineers can manually update minor and bugfix versions,
// But we should ensure that major versions always match.
if (semver.major(version) !== semver.major(peerVersion)) {
json.peerDependencies.react = `^${semver.major(version)}.0.0`;
}
}
await writeJson(path, json, {spaces: 2});
};
await Promise.all(projects.map(updateProjectPackage));