From a4170bd7747e04702849729a0c332e2b72800cd3 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Sun, 21 Oct 2018 20:31:08 -0400 Subject: [PATCH] fix(@schematics/angular): migrate build-angular for 7.0 RC users Fixes #12647 --- .../schematics/angular/migrations/migration-collection.json | 5 +++++ packages/schematics/angular/migrations/update-7/index.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/migrations/migration-collection.json b/packages/schematics/angular/migrations/migration-collection.json index fab2b498dcc3..39c979c1fe90 100644 --- a/packages/schematics/angular/migrations/migration-collection.json +++ b/packages/schematics/angular/migrations/migration-collection.json @@ -14,6 +14,11 @@ "version": "7.0.0-rc.0", "factory": "./update-7/index#polyfillMetadataRule", "description": "Update an Angular CLI project to version 7." + }, + "migration-04": { + "version": "7.0.3", + "factory": "./update-7", + "description": "Update an Angular CLI project to version 7." } } } diff --git a/packages/schematics/angular/migrations/update-7/index.ts b/packages/schematics/angular/migrations/update-7/index.ts index 75757e75ec59..bb76ee807e4d 100644 --- a/packages/schematics/angular/migrations/update-7/index.ts +++ b/packages/schematics/angular/migrations/update-7/index.ts @@ -19,8 +19,11 @@ export { polyfillMetadataRule } from './polyfill-metadata'; export default function(): Rule { return (tree, context) => { const existing = getPackageJsonDependency(tree, '@angular-devkit/build-angular'); - const type = existing ? existing.type : NodeDependencyType.Dev; + if (existing && latestVersions.DevkitBuildAngular === existing.version) { + return; + } + const type = existing ? existing.type : NodeDependencyType.Dev; addPackageJsonDependency( tree, {