From 6d64d30efa3aedcfd7d32eb9e7e1c29c90c7ea6e Mon Sep 17 00:00:00 2001 From: Damyan Petev Date: Wed, 3 Jun 2020 11:10:06 +0300 Subject: [PATCH] fix(igx,upgrade): ignore projects without sourceRoot --- packages/igx-templates/Update.spec.ts | 6 ++++-- packages/igx-templates/Update.ts | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/igx-templates/Update.spec.ts b/packages/igx-templates/Update.spec.ts index 95ca8f218..9c023a720 100644 --- a/packages/igx-templates/Update.spec.ts +++ b/packages/igx-templates/Update.spec.ts @@ -140,7 +140,8 @@ export class HomeComponent { "node_modules/igniteui-angular/styles/igniteui-angular.css", "node_modules/igniteui-dockmanager/styles/themes/test" ] - } + }, + "test-e2e": {} } }`, expected: @@ -155,7 +156,8 @@ export class HomeComponent { "node_modules/@infragistics/igniteui-angular/styles/igniteui-angular.css", "node_modules/@infragistics/igniteui-dockmanager/styles/themes/test" ] - } + }, + "test-e2e": {} } }`}, { path: "src/app.module.ts", diff --git a/packages/igx-templates/Update.ts b/packages/igx-templates/Update.ts index 6dd5aec88..dfda1dead 100644 --- a/packages/igx-templates/Update.ts +++ b/packages/igx-templates/Update.ts @@ -75,7 +75,10 @@ export async function updateWorkspace(rootPath: string): Promise { } for (const entry of Object.keys(workspaceConfig.projects)) { - workspaces.push(path.join(rootPath, workspaceConfig.projects[entry].sourceRoot)); + if (workspaceConfig.projects[entry].sourceRoot) { + // ignore projects without sourceRoot (likely older e2e proj) + workspaces.push(path.join(rootPath, workspaceConfig.projects[entry].sourceRoot)); + } } // once all workspace are gotten, get all files for all workspaces const logicFiles = [];