Skip to content

Commit

Permalink
fix(@angular/cli): display post migration message when updating from …
Browse files Browse the repository at this point in the history
…previous major version

Fixes #17256

(cherry picked from commit 4f50aa0)
  • Loading branch information
alan-agius4 authored and dgp1130 committed Mar 23, 2020
1 parent 9b03013 commit cc913e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/angular/cli/commands/update-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
if (success) {
if (
packageName === '@angular/core'
&& options.from
&& +options.from.split('.')[0] < 9
&& (options.to || packageNode.package.version).split('.')[0] === '9'
) {
this.logger.info(NG_VERSION_9_POST_MSG);
Expand Down Expand Up @@ -675,7 +677,7 @@ export class UpdateCommand extends Command<UpdateCommandSchema> {
}
}

if (migrations.some(m => m.package === '@angular/core' && m.to.split('.')[0] === '9')) {
if (migrations.some(m => m.package === '@angular/core' && m.to.split('.')[0] === '9' && +m.from.split('.')[0] < 9)) {
this.logger.info(NG_VERSION_9_POST_MSG);
}
}
Expand Down

0 comments on commit cc913e2

Please sign in to comment.