5b42084912
Previously, while trying to build an `NgccReflectionHost`'s `privateDtsDeclarationMap`, `computePrivateDtsDeclarationMap()` would try to collect exported declarations from all source files of the program (i.e. without checking whether they were within the target package, as happens for declarations in `.d.ts` files). Most of the time, that would not be a problem, because external packages would be represented as `.d.ts` files in the program. But when an external package had no typings, the JS files would be used instead. As a result, the `ReflectionHost` would try to (unnecessarilly) parse the file in order to extract exported declarations, which in turn would be harmless in most cases. There are certain cases, though, where the `ReflectionHost` would throw an error, because it cannot parse the external package's JS file. This could happen, for example, in `UmdReflectionHost`, which expects the file to contain exactly one statement. See #34544 for more details on a real-world failure. This commit fixes the issue by ensuring that `computePrivateDtsDeclarationMap()` will only collect exported declarations from files within the target package. Jira issue: [FW-1794](https://angular-team.atlassian.net/browse/FW-1794) Fixes #34544 PR Close #34811 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
http | ||
language-service | ||
localize | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
zone.js | ||
BUILD.bazel | ||
README.md | ||
empty.ts | ||
goog.d.ts | ||
license-banner.txt | ||
system.d.ts | ||
tsconfig-build-no-strict.json | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT