feat(compiler-cli): report error if undecorated class with Angular features is discovered (#36921)

Previously in v9, we deprecated the pattern of undecorated base classes
that rely on Angular features. We ran a migration for this in version 9
and will run the same on in version 10 again.

To ensure that projects do not regress and start using the unsupported
pattern again, we report an error in ngtsc if such undecorated classes
are discovered.

We keep the compatibility code enabled in ngcc so that libraries
can be still be consumed, even if they have not been migrated yet.

Resolves FW-2130.

PR Close #36921
This commit is contained in:
Paul Gschwendtner
2020-05-04 21:20:00 +02:00
committed by Alex Rickabaugh
parent c6ecdc9a81
commit 4c92cf43cf
11 changed files with 146 additions and 591 deletions

View File

@ -13,6 +13,7 @@ export declare enum ErrorCode {
DIRECTIVE_MISSING_SELECTOR = 2004,
UNDECORATED_PROVIDER = 2005,
DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006,
UNDECORATED_CLASS_USING_ANGULAR_FEATURES = 2007,
SYMBOL_NOT_EXPORTED = 3001,
SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002,
CONFIG_FLAT_MODULE_NO_INDEX = 4001,