angular/packages
JoostK cfd67c1c81 refactor(compiler-cli): track a dependency on a default import on WrappedNodeExpr (#41586)
Previously, the `DefaultImportRecorder` interface was used as follows:

1. During the analysis phase, the default import declaration of an
   identifier was recorded.

2. During the emit phase each emitted identifier would be recorded.
   The information from step 1 would then be used to determine the
   default import declaration of the identifier which would be
   registered as used.

3. A TypeScript transform would taint all default imports that were
   registered as used in step 2 such that the imports are not elided
   by TypeScript.

In incremental compilations, a file may have to be emitted even if its
analysis data has been reused from the prior compilation. This would
mean that step 1 is not executed, resulting in a mismatch in step 2 and
ultimately in incorrectly eliding the default. This was mitigated by
storing the mapping from identifier to import declaration on the
`ts.SourceFile` instead of a member of `DefaultImportTracker` such that
it would also be visible to the `DefaultImportRecorder` of subsequent
compiles even if step 1 had not been executed.

Ultimately however, the information that is being recorded into the
`DefaultImportRecorder` has a longer lifetime than a single
`DefaultImportRecorder` instance, as that is only valid during a single
compilation whereas the identifier to import declaration mapping
outlives a single compilation. This commit replaces the registration of
this mapping by attaching the default import declaration on the output
AST node that captures the identifier. This enables the removal of
all of the `DefaultImportRecorder` usages throughout the analysis phase
together with the `DefaultImportRecorder` interface itself.

PR Close #41586
2021-04-13 07:37:29 -07:00
..
animations fix(animations): error when setting position before starting animation (#28255) 2021-02-19 12:09:02 -08:00
bazel fix(bazel): add missing dependency on tslib (#41480) 2021-04-07 09:39:49 -07:00
benchpress fix(dev-infra): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:46 -08:00
common docs(common): change misspelled constant (#41136) 2021-03-09 08:57:41 -08:00
compiler fix(compiler-cli): show a more specific error for Ivy NgModules (#41534) 2021-04-13 07:34:47 -07:00
compiler-cli refactor(compiler-cli): track a dependency on a default import on WrappedNodeExpr (#41586) 2021-04-13 07:37:29 -07:00
core fix(core): error if DebugRenderer2.destroyNode is called twice in a row (#41565) 2021-04-12 10:30:13 -07:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements ci: fix elements test on older browsers (#41324) 2021-03-24 08:28:47 -07:00
examples docs: improve description, examples of DecimalPipe's digitsInfo parameter (#40714) 2021-02-26 15:42:29 -08:00
forms docs(forms): fix the short description for DefaultValueAccessor (#41409) 2021-04-01 12:07:04 -07:00
language-service fix(language-service): use 'any' instead of failing for inline TCBs (#41513) 2021-04-12 21:02:21 -07:00
localize build: update yargs dependency to 16.2.0. (#41392) 2021-04-01 13:41:26 -07:00
misc/angular-in-memory-web-api release: bump angular-in-web-memory-api package to 0.12.0 (#41487) 2021-04-07 09:35:17 -07:00
platform-browser refactor(platform-browser): cast response of JSON.parse (#41020) 2021-03-01 15:48:24 -08:00
platform-browser-dynamic refactor(core): don't use innerHTML in DOMTestComponentRenderer (#41099) 2021-03-08 08:39:11 -08:00
platform-server build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
private/testing build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
router fix(router): handle new navigations from a NavigationEnd event (#41262) (#41511) 2021-04-08 16:52:04 -07:00
service-worker fix(service-worker): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:45 -08:00
upgrade fix(upgrade): fix HMR for hybrid applications (#40045) 2020-12-10 13:40:53 -08:00
zone.js docs: update year (#40925) 2021-02-22 12:37:40 -08:00
BUILD.bazel build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt docs: update year (#40925) 2021-02-22 12:37:40 -08:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

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