Skip to content

Commit

Permalink
fix(@schematics/angular): migrate build-angular for 7.0 RC users
Browse files Browse the repository at this point in the history
Fixes #12647
  • Loading branch information
clydin authored and kyliau committed Oct 23, 2018
1 parent 0e0284f commit 52f297b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
}
5 changes: 4 additions & 1 deletion packages/schematics/angular/migrations/update-7/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
{
Expand Down

0 comments on commit 52f297b

Please sign in to comment.