angular-cn/packages/core/schematics/migrations/undecorated-classes-with-di
Paul Gschwendtner 024c31da25 feat(core): add undecorated classes migration schematic (#31650)
Introduces a new migration schematic that follows the given
migration plan: https://hackmd.io/@alx/S1XKqMZeS.

First case: The schematic detects decorated directives which
inherit a constructor. The migration ensures that all base
classes until the class with the explicit constructor are
properly decorated with "@Directive()" or "@Component". In
case one of these classes is not decorated, the schematic
adds the abstract "@Directive()" decorator automatically.

Second case: The schematic detects undecorated declarations
and copies the inherited "@Directive()", "@Component" or
"@Pipe" decorator to the undecorated derived class. This
involves non-trivial import rewriting, identifier aliasing
and AOT metadata serializing
(as decorators are not always part of source files)

PR Close #31650
2019-08-13 14:40:52 -07:00
..
decorator_rewrite feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
BUILD.bazel feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
create_ngc_program.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
find_base_classes.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
import_manager.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
index.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
ng_declaration_collector.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
transform.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00
update_recorder.ts feat(core): add undecorated classes migration schematic (#31650) 2019-08-13 14:40:52 -07:00