angular-cn/packages/compiler-cli/ngcc/test/host
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
..
commonjs_host_import_helper_spec.ts refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
commonjs_host_spec.ts fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
esm5_host_import_helper_spec.ts refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
esm5_host_spec.ts fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
esm2015_host_import_helper_spec.ts refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
esm2015_host_spec.ts fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
umd_host_import_helper_spec.ts refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
umd_host_spec.ts fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
util.ts fix(ngcc): properly detect origin of constructor param types (#33901) 2019-11-19 11:38:33 -08:00