angular/packages/compiler-cli
Paul Gschwendtner d01576b104 refactor(compiler-cli): properly preserve file overview comments (#54819)
This commit updates the logic for preserving file overview comments
to be more reliable and less dependent on previous transforms.

Previously, with the old import manager, we had a utility called
`addImport` that always separated import statements and non-import
statements. This meant that the non-emitted statement from Tsickle
for the synthetic file-overview comments no longer lived at the
beginning of the file.

`addImports` tried to overcome this by adding another new non-emitted
statement *before* all imports. This then was later used by the
transform (or was assumed!) to attach the synthetic file overview
comments if the original tsickle AST Node is no longer at the top.

This logic can be improved, because the import manager shouldn't need to
bother about this fileoverview non-emitted statement, and the logic for
re-attaching the fileoverview comment should be local. This commit fixes
this and makes it a local transform.

PR Close #54819
2024-03-15 15:09:41 -07:00
..
integrationtest refactor: fix a number of typos throughout the codebase (#52249) 2023-10-25 16:51:24 -07:00
linker refactor(compiler-cli): update ImportGenerator abstraction for new manager (#54819) 2024-03-15 15:09:40 -07:00
ngcc refactor(compiler-cli): add back ngcc as a no-op with a warning (#50045) 2023-04-28 18:18:40 +02:00
private refactor(compiler-cli): group initializer-API based transforms into single transform (#54200) 2024-02-01 15:58:50 +00:00
src refactor(compiler-cli): properly preserve file overview comments (#54819) 2024-03-15 15:09:41 -07:00
test refactor(compiler-cli): properly preserve file overview comments (#54819) 2024-03-15 15:09:41 -07:00
BUILD.bazel refactor(compiler-cli): add transform to support signal input in JIT (#53808) 2024-01-10 12:21:05 +00:00
esbuild.config.js refactor: remove __ESM_IMPORT_META_URL__ workaround now that we can use ESM (#48521) 2022-12-19 19:50:41 +00:00
index.ts refactor(language-service): Make a variety of fixes to the language service to build in g3. (#54726) 2024-03-07 10:49:01 -08:00
package.json feat(core): support TypeScript 5.4 (#54414) 2024-02-26 18:29:09 -08: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