angular/packages/compiler-cli/private
Kristiyan Kostadinov 6beff5e8d7 refactor(compiler): rework and expose APIs to be used in schematics (#48730)
Reworks some of the existing compiler APIs to make them easier to use in a schematic and exposes a few new ones to surface information we already had. High-level list of changes:
* `getPotentialImportsFor` now requires a class reference, instead of a `PotentialDirective | PotentialPipe`.
* New `getNgModuleMetadata` method has been added to the type checker.
* New `getPipeMetadata` method has been added to the type checker.
* New `getUsedDirectives` method has been added to the type checker.
* New `getUsedPipes` method has been added to the type checker.
* The `decorator` property was exposed on the `TypeCheckableDirectiveMeta`. The property was already present at runtime, but it wasn't specified on the interface.

PR Close #48730
2023-01-13 12:24:32 -08:00
..
babel.d.ts refactor(localize): update version of Babel (#44931) 2022-02-24 21:42:54 +00:00
bazel.ts refactor: switch packages away from deep cross-package imports (#43431) 2021-10-01 18:28:43 +00:00
BUILD.bazel refactor(compiler): rework and expose APIs to be used in schematics (#48730) 2023-01-13 12:24:32 -08:00
localize.ts refactor: switch packages away from deep cross-package imports (#43431) 2021-10-01 18:28:43 +00:00
migrations.ts refactor(compiler): rework and expose APIs to be used in schematics (#48730) 2023-01-13 12:24:32 -08:00
README.md refactor: switch packages away from deep cross-package imports (#43431) 2021-10-01 18:28:43 +00:00
tooling.ts refactor(compiler-cli): expose tooling code through private entry-point (#43431) 2021-10-01 18:28:46 +00:00

This is a directory defining the @angular/compiler-cli/private entry-point. The entry-point can be used to expose code that is needed by other Angular framework packages, without having to expose code through the primary entry-point.

The primary entry-point has a couple of downsides when it comes to cross-package imports:

  • It exports various other things that will end up creating additional type dependencies. e.g. when the Angular localize package relies on it, it might end up accidentally relying on @types/node.
  • The primary entry-point has a larger build graph, slowing down local development as much more things can invalidate the dependent targets. A smaller subset leads to faster incremental builds.