From 25af147a8cf618b4ba3fda9f74b5f8d5a40fa2ae Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Mon, 14 Oct 2019 13:00:24 +0300 Subject: [PATCH] refactor(ngcc): fix formatting of missing dependencies error (#33139) Previously, the list of missing dependencies was not explicitly joined, which resulted in the default `,` joiner being used during stringification. This commit explicitly joins the missing dependency lines to avoid unnecessary commas. Before: ``` The target entry-point "some-entry-point" has missing dependencies: - dependency 1 , - dependency 2 , - dependency 3 ``` After: ``` The target entry-point "some-entry-point" has missing dependencies: - dependency 1 - dependency 2 - dependency 3 ``` PR Close #33139 --- packages/compiler-cli/ngcc/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/ngcc/src/main.ts b/packages/compiler-cli/ngcc/src/main.ts index b8ba6faeb2..60858f5ed4 100644 --- a/packages/compiler-cli/ngcc/src/main.ts +++ b/packages/compiler-cli/ngcc/src/main.ts @@ -360,7 +360,7 @@ function getTargetedEntryPoints( if (invalidTarget !== undefined) { throw new Error( `The target entry-point "${invalidTarget.entryPoint.name}" has missing dependencies:\n` + - invalidTarget.missingDependencies.map(dep => ` - ${dep}\n`)); + invalidTarget.missingDependencies.map(dep => ` - ${dep}\n`).join('')); } if (entryPointInfo.entryPoints.length === 0) { markNonAngularPackageAsProcessed(fs, pkgJsonUpdater, absoluteTargetEntryPointPath);