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
This commit is contained in:
George Kalpakas 2019-10-14 13:00:24 +03:00 committed by Miško Hevery
parent 1a34fbce25
commit 25af147a8c
1 changed files with 1 additions and 1 deletions

View File

@ -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);