angular-cn/packages
Pete Bacon Darwin fac20bd8d1 fix(ivy): ngcc - resolve `main` property paths correctly (#31509)
There are two places in the ngcc processing where it needs to load the
content of a file given by a general path:

* when determining the format of an entry-point.
 To do this ngcc uses the value of the relevant property in package.json.
 But in the case of `main` it must parse the contents of the entry-point
 file to decide whether the format is UMD or CommonJS.

* when parsing the source files for dependencies to determine the order in
which compilation must occur. The relative imports in each file are parsed
and followed recursively, looking for external imports.

Previously, we naively assumed that the path would match the file name exactly.
But actually we must consider the standard module resolution conventions.
E.g. the extension (.js) may be missing, or the path may refer to a directory
containing an index.js file.

This commit fixes both places.

This commit now requires the `DependencyHost` instances to check
the existence of more files than before (at worst all the different possible
post-fixes). This should not create a significant performance reduction for
ngcc. Since the results of the checks will be cached, and similar work is
done inside the TS compiler, so what we lose in doing it here, is saved later
in the processing. The main performance loss would be where there are lots
of files that need to be parsed for dependencies that do not end up being
processed by TS. But compared to the main ngcc processing this dependency
parsing is a small proportion of the work done and so should not impact
much on the overall performance of ngcc.

// FW-1444

PR Close #31509
2019-07-12 11:37:35 -04:00
..
animations build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
bazel refactor(bazel): remove unused lockfile (#31458) 2019-07-09 13:49:43 -07:00
benchpress build: remove unreferenced tsconfig-build.json files (#30858) 2019-06-05 09:03:36 -07:00
common docs: remove inappropriate link (#31091) 2019-06-19 15:31:56 -07:00
compiler fix(ivy): handle ICUs with placeholders in case other nested ICUs are present (#31516) 2019-07-12 11:37:16 -04:00
compiler-cli fix(ivy): ngcc - resolve `main` property paths correctly (#31509) 2019-07-12 11:37:35 -04:00
core fix(ivy): handle ICUs with placeholders in case other nested ICUs are present (#31516) 2019-07-12 11:37:16 -04:00
docs refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
elements build: update to rules_nodejs 0.32.2 (#31325) 2019-07-01 14:16:42 -07:00
examples docs: api doc cleanup (#31377) 2019-07-08 09:51:59 -07:00
forms build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
http build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
language-service refactor(language-service): Remove NgLSHost -> NgLS dependency (#31122) 2019-06-19 15:19:56 -07:00
platform-browser docs: add platform to glossary (#30731) 2019-06-12 11:46:25 -07:00
platform-browser-dynamic build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
platform-server docs: add platform to glossary (#30731) 2019-06-12 11:46:25 -07:00
platform-webworker build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
platform-webworker-dynamic build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
private/testing test(ivy): add onlyInIvy perf counter expectations (#30339) 2019-05-09 11:22:00 -07:00
router Revert "fix(router): adjust UrlTree redirect to replace URL if in eager update (#31168)" (#31344) 2019-06-28 11:40:27 -07:00
service-worker build: update to rules_nodejs 0.32.2 (#31325) 2019-07-01 14:16:42 -07:00
upgrade feat(upgrade): provide unit test helpers for wiring up injectors (#16848) 2019-06-20 17:04:01 -07:00
zone.js fix: use the correct WTF array to iterate over (#31208) 2019-07-11 15:08:54 -04:00
BUILD.bazel build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
README.md Revert "docs: Remove unneeded file (#18106)" 2017-07-20 16:46:47 -05:00
empty.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
goog.d.ts test(ivy): add bundling test `todo_i18n` (#27420) 2018-12-04 19:59:12 -08:00
license-banner.txt build: bump year (#27880) 2019-01-11 11:15:59 -08:00
system.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
tsconfig-build.json build: update to rules_typescript 0.25.1 (#28625) 2019-02-21 07:46:21 -08:00
tsconfig-test.json build: disable must-use-promises check in ts_library tsetse for tests as... (#31325) 2019-07-01 14:16:42 -07:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00
types.d.ts build: switch to typescript's es2015 typings (#28570) 2019-02-06 14:17:55 -05:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT