angular/packages/compiler-cli
JoostK 7052e27677 refactor(compiler-cli): improve DX for reference emit failures (#44587)
In certain scenarios, the compiler may have crashed with an
`Unable to write a reference` error which would be particularly hard
to diagnose. One of the primary reasons for this failure is when the
`rootDir` option is configured---typically the case for libraries---
and a source file is imported using a relative import from an external
entry-point. This would normally report TS6059 for the invalid relative
import, but the crash prevents this error from being surfaced.

This commit refactors the reference emit logic to result in an explicit
`Failure` state with a reason as to why the failure occurred. This state
is then used to report a `FatalDiagnosticException`, preventing a hard
crash.

Closes #44414

PR Close #44587
2022-01-06 23:44:24 +00:00
..
integrationtest build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
linker build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
ngcc build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
private refactor(compiler-cli): expose tooling code through private entry-point (#43431) 2021-10-01 18:28:46 +00:00
src refactor(compiler-cli): improve DX for reference emit failures (#44587) 2022-01-06 23:44:24 +00:00
test refactor(compiler-cli): improve DX for reference emit failures (#44587) 2022-01-06 23:44:24 +00:00
BUILD.bazel build: update visibility for npm package targets to work with new integration test structure (#44238) 2021-12-08 13:42:41 -05:00
esbuild.config.js refactor: setup bundling for @angular/compiler-cli package (#43431) 2021-10-01 18:28:42 +00:00
import_meta_url.d.ts refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
index.ts build: switch all instances from ng_rollup_bundle to app_bundle (#44490) 2022-01-04 12:14:14 -08:00
package.json feat(core): support TypeScript 4.5 (#44164) 2021-11-30 11:59:02 -05:00
tsconfig-build.json refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) 2021-12-01 10:36:30 -08:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00