angular-cn/packages/compiler-cli/src/ngcc
Pete Bacon Darwin e31afb7118 fix(ivy): ngcc - identify all ESM5 decorated classes (#27848)
In ESM5 decorated classes can be indicated by calls to `__decorate()`.
Previously the `ReflectionHost.findDecoratedClasses()` call would identify
helper calls of the form:

```
SomeClass = tslib_1.__decorate(...);
```

But it was missing calls of the form:

```
SomeClass = SomeClass_1 = tslib_1.__decorate(...);
```

This form is common in `@NgModule()` decorations, where the class
being decorated is referenced inside the decorator or another
member.

This commit now ensures that a chain of assignments, of any length,
is now identified as a class decoration if it results in a call to
`__decorate()`.

Fixes #27841

PR Close #27848
2019-01-11 11:14:01 -08:00
..
src fix(ivy): ngcc - identify all ESM5 decorated classes (#27848) 2019-01-11 11:14:01 -08:00
test fix(ivy): ngcc - identify all ESM5 decorated classes (#27848) 2019-01-11 11:14:01 -08:00
BUILD.bazel refactor(ivy): split apart the 'metadata' package in the ngtsc compiler (#27743) 2019-01-08 16:36:18 -08:00
README.md build: use bazel version from node modules (#26691) 2018-10-30 16:19:13 -04:00
index.ts feat(ivy): ngcc project skeleton (#24897) 2018-07-27 17:15:31 -07:00
main-ngcc.ts feat(ivy): ngcc project skeleton (#24897) 2018-07-27 17:15:31 -07:00

README.md

Angular Compatibility Compiler (ngcc)

This compiler will convert node_modules compiled with ngc, into node_modules which appear to have been compiled with ngtsc.

This conversion will allow such "legacy" packages to be used by the Ivy rendering engine.

Building

The project is built using Bazel:

yarn bazel build //packages/compiler-cli/src/ngcc

Unit Testing

The unit tests are built and run using Bazel:

yarn bazel test //packages/compiler-cli/src/ngcc/test

Integration Testing

There are tests that check the behaviour of the overall executable:

yarn bazel test //packages/compiler-cli/test/ngcc