angular/packages/compiler-cli/ngcc/test
JoostK e563d77128 fix(ngcc): do not analyze dependencies for non Angular entry-points (#32303)
When ngcc is called for a specific entry-point, it has to determine
which dependencies to transitively process. To accomplish this, ngcc
traverses the full import graph of the entry-points it encounters, for
which it uses a dependency host to find all module imports. Since
imports look different in the various bundle formats ngcc supports, a
specific dependency host is used depending on the information provided
in an entry-points `package.json` file. If there's not enough
information in the `package.json` file for ngcc to be able to determine
which dependency host to use, ngcc would fail with an error.

If, however, the entry-point is not compiled by Angular, it is not
necessary to process any of its dependencies. None of them can have
been compiled by Angular so ngcc does not need to know about them.
Therefore, this commit changes the behavior to avoid recursing into
dependencies of entry-points that are not compiled by Angular.

In particular, this fixes an issue for packages that have dependencies
on the `date-fns` package. This package has various secondary
entry-points that have a `package.json` file only containing a `typings`
field, without providing additional fields for ngcc to know which
dependency host to use. By not needing a dependency host at all, the
error is avoided.

Fixes #32302

PR Close #32303
2019-08-26 10:08:44 -07:00
..
analysis refactor(ivy): ngcc - remove formatProperty from EntryPointBundle (#32052) 2019-08-08 11:14:38 -07:00
dependencies fix(ngcc): handle deep imports that already have an extension (#32181) 2019-08-19 10:12:03 -07:00
entry_point_finder fix(ngcc): do not analyze dependencies for non Angular entry-points (#32303) 2019-08-26 10:08:44 -07:00
helpers fix(ivy): ngcc should only index .d.ts exports within the package (#32129) 2019-08-15 14:46:00 -07:00
host fix(ivy): ngcc should only index .d.ts exports within the package (#32129) 2019-08-15 14:46:00 -07:00
integration fix(ngcc): ignore format properties that exist but are undefined (#32205) 2019-08-20 09:55:25 -07:00
logging feat(compiler-cli): ngcc - make logging more configurable (#29591) 2019-04-01 11:53:28 -07:00
migrations refactor(ivy): ngcc - remove formatProperty from EntryPointBundle (#32052) 2019-08-08 11:14:38 -07:00
packages feat(ivy): show error when trying to publish NGCC'd packages (#32031) 2019-08-08 11:17:38 -07:00
rendering refactor(ivy): combine query load instructions (#32100) 2019-08-12 10:32:08 -07:00
writing fix(ivy): ngcc - correctly update package.json when createNewEntryPointFormats is true (#32052) 2019-08-08 11:14:38 -07:00
BUILD.bazel feat(ivy): ngcc - support ngcc "migrations" (#31544) 2019-07-23 21:11:40 -07:00
utils_spec.ts refactor(ivy): ngcc - implement new module resolver (#29643) 2019-04-29 12:37:21 -07:00