Skip to content

Commit 7743cf0

Browse files
committed
fix(@schematics/angular): migrate build-angular for 7.0 RC users
Fixes #12647
1 parent a53cf44 commit 7743cf0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
},
1818
"migration-04": {
1919
"version": "7.1.0-beta.0",
20-
"factory": "./update-7/index#typeScriptHelpersRule",
20+
"factory": "./update-7/index#typeScriptHelpersRule"
21+
},
22+
"migration-05": {
23+
"version": "7.0.3",
24+
"factory": "./update-7",
2125
"description": "Update an Angular CLI project to version 7."
2226
}
2327
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ export { typeScriptHelpersRule } from './typescript-helpers';
2020
export default function(): Rule {
2121
return (tree, context) => {
2222
const existing = getPackageJsonDependency(tree, '@angular-devkit/build-angular');
23-
const type = existing ? existing.type : NodeDependencyType.Dev;
23+
if (existing && latestVersions.DevkitBuildAngular === existing.version) {
24+
return;
25+
}
2426

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

0 commit comments

Comments
 (0)