angular-cn/packages/compiler-cli/ngcc/test
Pete Bacon Darwin fafa50d97f fix(ngcc): support ModuleWithProviders functions that delegate (#36948)
In #36892 the `ModuleWithProviders` type parameter becomes required.
This exposes a bug in ngcc, where it can only handle functions that have a
specific form:

```
function forRoot() {
  return { ... };
}
```

In other words, it only accepts functions that return an object literal.

In some libraries, the function instead returns a call to another function.
For example in `angular-in-memory-web-api`:

```
InMemoryWebApiModule.forFeature = function (dbCreator, options) {
  return InMemoryWebApiModule_1.forRoot(dbCreator, options);
};
```

This commit changes the parsing of such functions to use the
`PartialEvaluator`, which can evaluate these more complex function
bodies.

PR Close #36948
2020-05-06 13:35:48 -07:00
..
analysis fix(ngcc): support ModuleWithProviders functions that delegate (#36948) 2020-05-06 13:35:48 -07:00
dependencies perf(ngcc): read dependencies from entry-point manifest (#36486) 2020-04-09 11:33:28 -07:00
entry_point_finder perf(ngcc): speed up the `getBasePaths()` computation (#36881) 2020-05-04 12:50:02 -07:00
execution fix(ngcc): handle `ENOMEM` errors in worker processes (#36626) 2020-04-29 14:28:26 -07:00
helpers style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
host refactor(ngcc): move `getModuleWithProvidersFunctions()` into the analyzer (#36948) 2020-05-06 13:35:48 -07:00
integration fix(ngcc): recognize enum declarations emitted in JavaScript (#36550) 2020-04-28 15:59:57 -07:00
locking refactor(ngcc): improve locker pausing message (#36838) 2020-05-01 09:52:09 -07:00
logging refactor(ngcc): expose logging level on the logger (#35861) 2020-03-05 18:17:15 -05:00
migrations style(ngcc): reformat of ngcc after clang update (#36447) 2020-04-06 09:26:57 -07:00
packages feat(ngcc): allow async locking timeouts to be configured (#36838) 2020-05-01 09:52:10 -07:00
rendering fix(ngcc): support ModuleWithProviders functions that delegate (#36948) 2020-05-06 13:35:48 -07:00
sourcemaps fix(ngcc): don't crash on cyclic source-map references (#36452) 2020-04-06 13:19:53 -07:00
writing feat(ngcc): support reverting a file written by `FileWriter` (#36626) 2020-04-29 14:28:26 -07:00
BUILD.bazel refactor(ngcc): create new entry-point for cluster workers (#36637) 2020-04-16 16:05:12 -04:00
utils_spec.ts fix(ngcc): correctly identify relative Windows-style import paths (#36372) 2020-04-07 15:21:27 -07:00