angular/packages/compiler-cli/test
Alex Rickabaugh 2cf7d0fd05 fix(ivy): disable use of aliasing in template type-checking (#34649)
FileToModuleHost aliasing supports compilation within environments that have
two properties:

1. A `FileToModuleHost` exists which defines canonical module names for any
   given TS file.
2. Dependency restrictions exist which prevent the import of arbitrary files
   even if such files are within the .d.ts transitive closure of a
   compilation ("strictdeps").

In such an environment, generated imports can only go through import paths
which are already present in the user program. The aliasing system supports
the generation and consumption of such imports at runtime.

`FileToModuleHost` aliasing does not emit re-exports in .d.ts files. This
means that it's safe to rely on alias re-exports in generated .js code (they
are guaranteed to exist at runtime) but not in template type-checking code
(since TS will not be able to follow such imports). Therefore, non-aliased
imports should be used in template type-checking code.

This commit adds a `NoAliasing` flag to `ImportFlags` and sets it when
generating imports in template type-checking code. The testing environment
is also patched to support resolution of FileToModuleHost canonical paths
within the template type-checking program, enabling testing of this change.

PR Close #34649
2020-01-23 10:31:49 -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:09 -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:09 -05:00
ngtsc fix(ivy): disable use of aliasing in template type-checking (#34649) 2020-01-23 10:31:49 -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:09 -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:09 -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:10 -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