angular-cn/packages/compiler-cli/test/ngtsc
Alex Rickabaugh 24b2f1da2b refactor(ivy): introduce the 'core' package and split apart NgtscProgram (#34887)
Previously, NgtscProgram lived in the main @angular/compiler-cli package
alongside the legacy View Engine compiler. As a result, the main package
depended on all of the ngtsc internal packages, and a significant portion of
ngtsc logic lived in NgtscProgram.

This commit refactors NgtscProgram and moves the main logic of compilation
into a new 'core' package. The new package defines a new API which enables
implementers of TypeScript compilers (compilers built using the TS API) to
support Angular transpilation as well. It involves a new NgCompiler type
which takes a ts.Program and performs Angular analysis and transformations,
as well as an NgCompilerHost which wraps an input ts.CompilerHost and adds
any extra Angular files.

Together, these two classes are used to implement a new NgtscProgram which
adapts the legacy api.Program interface used by the View Engine compiler
onto operations on the new types. The new NgtscProgram implementation is
significantly smaller and easier to reason about.

The new NgCompilerHost replaces the previous GeneratedShimsHostWrapper which
lived in the 'shims' package.

A new 'resource' package is added to support the HostResourceLoader which
previously lived in the outer compiler package.

As a result of the refactoring, the dependencies of the outer
@angular/compiler-cli package on ngtsc internal packages are significantly
trimmed.

This refactoring was driven by the desire to build a plugin interface to the
compiler so that tsc_wrapped (another consumer of the TS compiler APIs) can
perform Angular transpilation on user request.

PR Close #34887
2020-01-24 08:59:59 -08:00
..
fake_core feat(ivy): throw compilation error when providing undecorated classes (#34460) 2019-12-18 15:04:49 -08:00
BUILD.bazel test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34736) 2020-01-15 14:58:07 -05:00
component_indexing_spec.ts feat(ivy): index template references, variables, bound attributes/events (#31535) 2019-07-25 13:09:10 -07:00
env.ts fix(ivy): disable use of aliasing in template type-checking (#34649) 2020-01-23 10:31:48 -08:00
incremental_error_spec.ts perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
incremental_spec.ts fix(ivy): correctly emit component when it's removed from its module (#34912) 2020-01-23 13:30:10 -08:00
modulewithproviders_spec.ts refactor(ivy): include generic type for `ModuleWithProviders` in .d.ts files (#34235) 2019-12-10 16:34:47 -08:00
monorepo_spec.ts fix(ivy): emit fs-relative paths when rootDir(s) aren't in effect (#33828) 2019-11-19 12:41:24 -08:00
ngtsc_spec.ts fix(ivy): more accurate detection of pipes in host bindings (#34655) 2020-01-21 13:22:00 -05:00
scope_spec.ts fix(ivy): don't produce template diagnostics when scope is invalid (#34460) 2019-12-18 15:04:49 -08:00
sourcemap_utils.ts refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
template_mapping_spec.ts perf(ivy): move attributes array into component def (#32798) 2019-10-09 13:16:55 -07:00
template_typecheck_spec.ts refactor(ivy): introduce the 'core' package and split apart NgtscProgram (#34887) 2020-01-24 08:59:59 -08:00