Skip to content

Commit 52f297b

Browse files
clydinkyliau
authored andcommitted
fix(@schematics/angular): migrate build-angular for 7.0 RC users
Fixes #12647
1 parent 0e0284f commit 52f297b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/schematics/angular/migrations/migration-collection.json

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"version": "7.0.0-rc.0",
1515
"factory": "./update-7/index#polyfillMetadataRule",
1616
"description": "Update an Angular CLI project to version 7."
17+
},
18+
"migration-04": {
19+
"version": "7.0.3",
20+
"factory": "./update-7",
21+
"description": "Update an Angular CLI project to version 7."
1722
}
1823
}
1924
}

packages/schematics/angular/migrations/update-7/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ export { polyfillMetadataRule } from './polyfill-metadata';
1919
export default function(): Rule {
2020
return (tree, context) => {
2121
const existing = getPackageJsonDependency(tree, '@angular-devkit/build-angular');
22-
const type = existing ? existing.type : NodeDependencyType.Dev;
22+
if (existing && latestVersions.DevkitBuildAngular === existing.version) {
23+
return;
24+
}
2325

26+
const type = existing ? existing.type : NodeDependencyType.Dev;
2427
addPackageJsonDependency(
2528
tree,
2629
{

0 commit comments

Comments
 (0)