angular-cn/packages/compiler-cli/ngcc/test
JoostK c4e039a43a fix(ngcc): correctly read static properties for aliased classes (#32619)
In ESM2015 bundles, a class with decorators may be emitted as follows:

```javascript
var MyClass_1;
let MyClass = MyClass_1 = class MyClass {};
MyClass.decorators = [/* here be decorators */];
```

Such a class has two declarations: the publicly visible `let MyClass`
and the implementation `class MyClass {}` node. In #32539 a refactoring
took place to handle such classes more consistently, however the logic
to find static properties was mistakenly kept identical to its broken
state before the refactor, by looking for static properties on the
implementation symbol (the one for `class MyClass {}`) whereas the
static properties need to be obtained from the symbol corresponding with
the `let MyClass` declaration, as that is where the `decorators`
property is assigned to in the example above.

This commit fixes the behavior by looking for static properties on the
public declaration symbol. This fixes an issue where decorators were not
found for classes that do in fact have decorators, therefore preventing
the classes from being compiled for Ivy.

Fixes #31791

PR Close #32619
2019-09-12 13:18:20 -07:00
..
analysis fix(ngcc): consistently use outer declaration for classes (#32539) 2019-09-12 11:12:10 -07:00
dependencies perf(ngcc): process tasks in parallel in async mode (#32427) 2019-09-09 15:55:13 -04:00
entry_point_finder fix(ngcc): do not analyze dependencies for non Angular entry-points (#32303) 2019-08-26 10:08:44 -07:00
execution perf(ngcc): process tasks in parallel in async mode (#32427) 2019-09-09 15:55:13 -04:00
helpers perf(ngcc): process tasks in parallel in async mode (#32427) 2019-09-09 15:55:13 -04:00
host fix(ngcc): correctly read static properties for aliased classes (#32619) 2019-09-12 13:18:20 -07:00
integration perf(ngcc): process tasks in parallel in async mode (#32427) 2019-09-09 15:55:13 -04:00
logging feat(compiler-cli): ngcc - make logging more configurable (#29591) 2019-04-01 11:53:28 -07:00
migrations refactor(ivy): ngcc - remove `formatProperty` from `EntryPointBundle` (#32052) 2019-08-08 11:14:38 -07:00
packages refactor(ngcc): abstract updating `package.json` files behind an interface (#32427) 2019-09-09 15:55:13 -04:00
rendering refactor(ivy): move directive, component and pipe factories to ngFactoryFn (#31953) 2019-08-27 13:57:00 -07:00
writing refactor(ngcc): abstract updating `package.json` files behind an interface (#32427) 2019-09-09 15:55:13 -04:00
BUILD.bazel refactor(ngcc): implement task selection for parallel task execution (#32427) 2019-09-09 15:55:13 -04:00
utils_spec.ts refactor(ivy): ngcc - implement new module resolver (#29643) 2019-04-29 12:37:21 -07:00