angular-cn/packages/compiler-cli/ngcc/src/analysis
Pete Bacon Darwin f690a4e0af fix(ivy): ngcc - do not analyze files outside the current package (#30591)
Our module resolution prefers `.js` files over `.d.ts` files because
occasionally libraries publish their typings in the same directory
structure as the compiled JS files, i.e. adjacent to each other.

The standard TS module resolution would pick up the typings
file and add that to the `ts.Program` and so they would be
ignored by our analyzers. But we need those JS files, if they
are part of the current package.

But this meant that we also bring in JS files from external
imports from outside the package, which is not desired.
This was happening for the `@fire/storage` enty-point
that was importing the `firebase/storage` path.

In this commit we solve this problem, for the case of imports
coming from a completely different package, by saying that any
file that is outside the package root directory must be an external
import and so we do not analyze those files.

This does not solve the potential problem of imports between
secondary entry-points within a package but so far that does
not appear to be a problem.

PR Close #30591
2019-06-26 08:00:03 -07:00
..
decoration_analyzer.ts fix(ivy): ngcc - do not analyze files outside the current package (#30591) 2019-06-26 08:00:03 -07:00
module_with_providers_analyzer.ts refactor(ivy): ngcc - use `.has()` to check Map membership (#25445) 2019-05-16 12:11:05 -07:00
ngcc_references_registry.ts refactor(ivy): move ngcc into a higher level folder (#29092) 2019-03-20 14:45:54 -04:00
private_declarations_analyzer.ts refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
switch_marker_analyzer.ts fix(ivy): ngcc - do not analyze files outside the current package (#30591) 2019-06-26 08:00:03 -07:00
util.ts fix(ivy): ngcc - do not analyze files outside the current package (#30591) 2019-06-26 08:00:03 -07:00