angular-cn/packages/compiler-cli/test
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
..
compliance revert: refactor(ivy): remove styleSanitizer instruction in favor of an inline param (#34480) (#34910) 2020-01-22 15:59:33 -05:00
diagnostics build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
helpers fix(ivy): handle namespaced imports correctly (#31367) 2019-07-09 09:40:30 -07:00
metadata build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
ngtsc refactor(ivy): introduce the 'core' package and split apart NgtscProgram (#34887) 2020-01-24 08:59:59 -08:00
transformers build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
BUILD.bazel build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
extract_i18n_spec.ts feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
mocks.ts fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngc_spec.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
perform_compile_spec.ts fix(compiler): return enableIvy true when using `readConfiguration` (#32234) 2019-08-21 10:06:25 -07:00
perform_watch_spec.ts fix(ivy): recompile component when template changes in ngc watch mode (#33551) 2019-11-12 13:55:09 -08:00
test_support.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
typescript_support_spec.ts feat(ivy): verify whether TypeScript version is supported (#33377) 2019-10-24 15:46:23 -07:00