angular-cn/packages/compiler-cli/ngcc/test
Pete Bacon Darwin f22a6eb00e fix(ngcc): correctly match aliased classes between src and dts files (#34254)
The naïve matching algorithm we previously used to match declarations in
source files to declarations in typings files was based only on the name
of the thing being declared.  This did not handle cases where the declared
item had been exported via an alias - a common scenario when one of the two
file sets (source or typings) has been flattened, while the other has not.

The new algorithm tries to overcome this by creating two maps of export
name to declaration (i.e. `Map<string, ts.Declaration>`).
One for the source files and one for the typings files.
It then joins these two together by matching export names, resulting in a
new map that maps source declarations to typings declarations directly
(i.e. `Map<ts.Declaration, ts.Declaration>`).

This new map can handle the declaration names being different between the
source and typings as long as they are ultimately both exported with the
same alias name.

Further more, there is one map for "public exports", i.e. exported via the
root of the source tree (the entry-point), and another map for "private
exports", which are exported from individual files in the source tree but
not necessarily from the root. This second map can be used to "guess"
the mapping between exports in a deep (non-flat) file tree, which can be
used by ngcc to add required private exports to the entry-point.

Fixes #33593

PR Close #34254
2019-12-18 11:25:01 -08:00
..
analysis fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
dependencies feat(ngcc): support ignoreMissingDependencies in ngcc config (#33192) 2019-10-17 19:43:39 -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 refactor(ngcc): add debug messages to help with debugging in parallel mode (#34437) 2019-12-17 11:39:18 -08:00
helpers refactor(ngcc): store whether to render legacy i18n message ids in the bundle (#34135) 2019-12-03 10:15:53 -08:00
host fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
integration fix(ngcc): fix undecorated child migration when `exportAs` is present (#34014) 2019-12-09 16:13:09 -08:00
logging feat(compiler-cli): ngcc - make logging more configurable (#29591) 2019-04-01 11:53:28 -07:00
migrations refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
packages test(ngcc): cleanup entry-point bundle testcases (#34415) 2019-12-16 07:45:36 -08:00
rendering fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
writing refactor(ngcc): abstract updating `package.json` files behind an interface (#32427) 2019-09-09 15:55:13 -04:00
BUILD.bazel fix(ngcc): do not emit ES2015 code in ES5 files (#33514) 2019-11-13 13:49:31 -08:00
utils_spec.ts refactor(ivy): ngcc - implement new module resolver (#29643) 2019-04-29 12:37:21 -07:00