angular-cn/packages/compiler-cli/ngcc/test/analysis
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
..
decoration_analyzer_spec.ts refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
migration_host_spec.ts perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
module_with_providers_analyzer_spec.ts refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
private_declarations_analyzer_spec.ts fix(ngcc): correctly match aliased classes between src and dts files (#34254) 2019-12-18 11:25:01 -08:00
references_registry_spec.ts perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
switch_marker_analyzer_spec.ts refactor(ngcc): use bundle src to create reflection hosts (#34254) 2019-12-18 11:25:01 -08:00
util_spec.ts fix(ivy): ngcc - do not analyze files outside the current package (#30591) 2019-06-26 08:00:03 -07:00