Skip to content

Commit

Permalink
fix(nx): fix migration of angular.json for with no architect property
Browse files Browse the repository at this point in the history
  • Loading branch information
MSakamaki authored and vsavkin committed Jul 3, 2019
1 parent 9278a8e commit d80c381
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/schematics/migrations/update-8-0-0/update-8-0-0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ function addDependencies() {
const dependencies = readJsonInTree(host, 'package.json').dependencies;
const builders = new Set<string>();
const projects = readJsonInTree(host, 'angular.json').projects;
Object.values<any>(projects).forEach(project => {
Object.values<any>(project.architect).forEach(target => {
const [builderDependency] = target.builder.split(':');
builders.add(builderDependency);
Object.values<any>(projects)
.filter(project => typeof project === 'object')
.forEach(project => {
Object.values<any>(project.architect).forEach(target => {
const [builderDependency] = target.builder.split(':');
builders.add(builderDependency);
});
});
});
const newDependencies = {};
const newDevDependencies = {
'@nrwl/workspace': '8.0.0'
Expand Down

0 comments on commit d80c381

Please sign in to comment.