angular-cn/packages/compiler-cli/ngcc/test
Pete Bacon Darwin bdcbd9ed4b fix(ivy): ngcc - teach Esm5ReflectionHost about aliased variables (#29092)
Sometimes, in ESM5 code, aliases to exported variables are used internally
to refer to the exported value. This prevented some analysis from being
able to match up a reference to an export to the actual export itself.

For example in the following code:

```
var HttpClientXsrfModule = /** @class */ (function () {
  function HttpClientXsrfModule() {
  }
  HttpClientXsrfModule_1 = HttpClientXsrfModule;
  HttpClientXsrfModule.withOptions = function (options) {
      if (options === void 0) { options = {}; }
      return {
          ngModule: HttpClientXsrfModule_1,
          providers: [],
      };
  };
  var HttpClientXsrfModule_1;
  HttpClientXsrfModule = HttpClientXsrfModule_1 = tslib_1.__decorate([
      NgModule({
          providers: [],
      })
  ], HttpClientXsrfModule);
  return HttpClientXsrfModule;
}());
```

We were not able to tell that the `ngModule: HttpClientXsrfModule_1` property
assignment was actually meant to refer to the `function HttpClientXrsfModule()`
declaration.  This caused the `ModuleWithProviders` processing to fail.

This commit ensures that we can compile typings files using the ESM5
format, so we can now update the examples boilerplate tool so that it
does not need to compile the ESM2015 format at all.

PR Close #29092
2019-03-20 14:45:55 -04:00
..
analysis refactor(ivy): move ngcc into a higher level folder (#29092) 2019-03-20 14:45:54 -04:00
helpers refactor(ivy): ngcc - simplify `Transformer.transform` API (#29092) 2019-03-20 14:45:54 -04:00
host fix(ivy): ngcc - teach Esm5ReflectionHost about aliased variables (#29092) 2019-03-20 14:45:55 -04:00
integration feat(ivy): ngcc - support only compiling the first format property to match (#29092) 2019-03-20 14:45:54 -04:00
packages refactor(ivy): ngcc - remove flat-format and use AbsoluteFsPath (#29092) 2019-03-20 14:45:54 -04:00
rendering refactor(ivy): ngcc - simplify `Transformer.transform` API (#29092) 2019-03-20 14:45:54 -04:00
BUILD.bazel build(ivy): ngcc - only test under `no-ivy-aot` mode (#29092) 2019-03-20 14:45:54 -04:00