angular/packages/compiler-cli/src
Paul Gschwendtner f8c02b69b9 refactor(compiler-cli): restrict read option values for signal-based queries (#54257)
The `read` option for queries can rely on lexical variables inside the
class. These constructs are fine from a technical perspective in
TypeScript, but in practice, when the component/directive definition is
being created, the read value is extracted into the definition,
**outside** of the class. This breaks `this` references.

To fix this, we are restricting the `read` option to literal values.
Similar to `descendants`. Literal references are in practice constructs
like:

 - `read: bla.X`
 - `read: X`

 where `bla` or `X` is never a `ThisKeywoord`- hence fixing the issue
 and also simplifying the patterns for easier single file compilation.

PR Close #54257
2024-02-06 16:04:10 +00:00
..
bin refactor(compiler-cli): drop tsickle code paths (#50602) 2023-08-17 10:23:49 -07:00
ngtsc refactor(compiler-cli): restrict read option values for signal-based queries (#54257) 2024-02-06 16:04:10 +00:00
transformers refactor(compiler-cli): add JIT transform for signal-based queries (#54257) 2024-02-06 16:04:10 +00:00
extract_i18n.ts refactor(compiler-cli): remove dependency on minimist (#43644) 2021-10-04 17:31:03 -07:00
main.ts refactor(compiler-cli): drop tsickle code paths (#50602) 2023-08-17 10:23:49 -07:00
perform_compile.ts refactor(compiler): clean up compatibility code for old TS versions (#52099) 2023-10-10 09:37:38 -07:00
perform_watch.ts refactor(compiler-cli): update emit signature to support for strongly typed emitCallback (#47893) 2022-11-01 04:44:28 -07:00
typescript_support.ts feat(core): support TypeScript 5.3 (#52572) 2023-11-09 22:56:41 +00:00
version.ts docs: fix package name in version.ts files in different packages (#41208) 2021-05-10 10:26:34 -04:00
version_helpers.ts refactor(compiler-cli): move version number helpers out of diagnostics subfolder (#44269) 2021-12-01 10:36:30 -08:00