angular-cn/packages/core/schematics/test
Paul Gschwendtner 6f5f481fda refactor(core): undecorated-classes-with-di migration should ignore referenced resources (#32953)
Currently the undecorated-classes-with-di migration leverages NGC in order
to work with metadata resolution. Since NGC by default tries to resolve referenced
resources on initialization of the underlying TS program, it can result in unexpected
migration failures due to missing resource files.

This is especially an issue since the CLI wraps the `AngularCompilerProgram` with
special logic (i.e. to support SCSS preprocessing etc.). We don't have all of this since
we instantiate a vanilla NGC program.

The solution to the problem is to simply treat resource requests as valid, and returning
a fake content. The migration is not dependent on templates or stylesheets.. so it's the
simplest and most robust solution.

Fixes #32826

PR Close #32953
2019-10-02 14:54:33 -07:00
..
google3 test(core): remove "enableIvy" compiler option from migration tests (#32954) 2019-10-02 14:53:41 -07:00
BUILD.bazel build: temporarily disable dynamic queries migration (#32837) 2019-09-24 17:57:15 -07:00
dynamic_queries_migration_spec.ts build: temporarily disable dynamic queries migration (#32837) 2019-09-24 17:57:15 -07:00
helpers.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
line_mappings_spec.ts feat(core): template-var-assignment update schematic (#29608) 2019-04-02 15:47:32 -07:00
missing_injectable_migration_spec.ts test(core): remove "enableIvy" compiler option from migration tests (#32954) 2019-10-02 14:53:41 -07:00
move_document_migration_spec.ts test(core): remove "enableIvy" compiler option from migration tests (#32954) 2019-10-02 14:53:41 -07:00
project_tsconfig_paths_spec.ts refactor(core): migrations should parse cli workspace config as json5 (#30582) 2019-05-21 17:26:22 -07:00
renderer_to_renderer2_migration_spec.ts test(core): remove "enableIvy" compiler option from migration tests (#32954) 2019-10-02 14:53:41 -07:00
static_queries_migration_template_spec.ts refactor(core): static-queries migration should never use ngtsc (#32954) 2019-10-02 14:53:41 -07:00
static_queries_migration_usage_spec.ts test(core): remove "enableIvy" compiler option from migration tests (#32954) 2019-10-02 14:53:41 -07:00
template_var_assignment_migration_spec.ts test(core): remove "enableIvy" compiler option from migration tests (#32954) 2019-10-02 14:53:41 -07:00
test-migrations.json build: temporarily disable dynamic queries migration (#32837) 2019-09-24 17:57:15 -07:00
undecorated_classes_with_decorated_fields_migration_spec.ts feat(core): add undecorated classes with decorated fields schematic (#32130) 2019-08-22 10:05:38 -07:00
undecorated_classes_with_di_migration_spec.ts refactor(core): undecorated-classes-with-di migration should ignore referenced resources (#32953) 2019-10-02 14:54:33 -07:00