Skip to content

Commit 524bff6

Browse files
alan-agius4mgechev
authored andcommitted
fix(@angular/cli): add link to update guide post running Angular migrations
1 parent 2a1597a commit 524bff6

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

packages/angular/cli/commands/update-impl.ts

+21-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ const pickManifest = require('npm-pick-manifest') as (
3737

3838
const oldConfigFileNames = ['.angular-cli.json', 'angular-cli.json'];
3939

40+
const NG_VERSION_9_POST_MSG = colors.cyan(
41+
'\nYour project has been updated to Angular version 9!\n' +
42+
'For more info, please see: https://v9.angular.io/guide/updating-to-version-9',
43+
);
44+
4045
export class UpdateCommand extends Command<UpdateCommandSchema> {
4146
public readonly allowMissingWorkspace = true;
4247

@@ -428,7 +433,18 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
428433
options.createCommits,
429434
);
430435

431-
return success ? 0 : 1;
436+
if (success) {
437+
if (
438+
packageName === '@angular/core'
439+
&& (options.to || packageNode.package.version).split('.')[0] === '9'
440+
) {
441+
this.logger.info(NG_VERSION_9_POST_MSG);
442+
}
443+
444+
return 0;
445+
}
446+
447+
return 1;
432448
}
433449

434450
const requests: {
@@ -565,6 +581,10 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
565581
return 0;
566582
}
567583
}
584+
585+
if (migrations.some(m => m.package === '@angular/core' && m.to.split('.')[0] === '9')) {
586+
this.logger.info(NG_VERSION_9_POST_MSG);
587+
}
568588
}
569589

570590
return success ? 0 : 1;

0 commit comments

Comments
 (0)