angular-cn/packages/compiler-cli
George Kalpakas 284af7308b fix(ngcc): do not fail hard when a format-path points to a non-existing or empty file (#40985)
Previously, when `ngcc` encountered an entry-point with a format-path
that pointed to a non-existing or empty file it would throw an error and
stop processing the remaining tasks.

In the past, we used to ignore such format-paths and continue processing
the rest of the tasks ([see code][1]). This was changed to a hard
failure in 2954d1b5ca. Looking at the code
history, the reason for changing the behavior was an (incorrect)
assumption that the condition could not fail. This assumption failed to
take into account the case where a 3rd-party library has an invalid
format-path in its `package.json`. This is an issue with the library,
but it should not prevent `ngcc` from processing other
packages/entry-points/formats.

This commit fixes this by reporting the task as failed but not throwing
an error, thus allowing `ngcc` to continue processing other tasks.

[1]: https://github.com/angular/angular/blob/3077c9a1f89c5bd75fb96c16e/packages/compiler-cli/ngcc/src/main.ts#L124

Fixes #40965

PR Close #40985
2021-02-26 08:26:33 -08:00
..
integrationtest feat(core): drop support for zone.js 0.10.x (#40823) 2021-02-24 07:58:29 -08:00
linker refactor(compiler-cli): implement `ɵɵngDeclarePipe()` (#40803) 2021-02-12 09:00:16 -08:00
ngcc fix(ngcc): do not fail hard when a format-path points to a non-existing or empty file (#40985) 2021-02-26 08:26:33 -08:00
src refactor(compiler-cli): separate out constant target of g3 patch (#40950) 2021-02-22 15:19:45 -08:00
test refactor(compiler): retrieve variables from context inside nested template listener (#40833) 2021-02-17 11:45:46 -08:00
BUILD.bazel fix(compiler-cli): report non-template diagnostics (#40331) 2021-01-13 10:55:04 -08:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
tsconfig-build.json build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00