fix(schematics): use migrate-only flag to skip installation during upgrade

This commit is contained in:
Jason Jean 2018-05-17 01:30:15 -04:00 committed by Victor Savkin
parent 2bf35c8789
commit 31b1150229
2 changed files with 14 additions and 8 deletions

View File

@ -34,13 +34,18 @@ export default {
execSync('npm install', { stdio: [0, 1, 2] });
}
execSync('ng update @angular/cli --from 1.7.4 --to 6.0.1', {
execSync(
'ng update @angular/cli --from 1.7.4 --to 6.0.1 --migrate-only',
{
stdio: [0, 1, 2]
});
// TODO: remove --next before releasing 6.0.0 final
execSync('ng update @nrwl/schematics --from 1.0.3 --to 6.0.0 --next', {
}
);
execSync(
'ng generate @schematics/update:migrate --package @nrwl/schematics --collection @nrwl/schematics/migrations/migrations.json --from 1.0.3 --to 6.0.0',
{
stdio: [0, 1, 2]
});
}
);
} catch (e) {
console.warn(stripIndents`
The automatic upgrade to Nx 6 has failed with the following error: ${e}.

View File

@ -344,7 +344,8 @@ const updatePackageJson = updateJsonInTree('package.json', json => {
'@ngrx/store': '5.2.0',
'@ngrx/store-devtools': '5.2.0',
'@nrwl/nx': '6.0.0'
// todo: Change to 6.0.0 when it is released
'@nrwl/nx': '6.0.0-rc.3'
};
json.devDependencies = {
...json.devDependencies,