angular-cn/packages
JoostK 1381301afe refactor(compiler-cli): track a dependency on a default import on `WrappedNodeExpr` ()
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 
2021-04-12 17:05:10 -07:00
..
animations feat(core): support TypeScript 4.2 () 2021-03-17 09:10:25 -07:00
bazel fix(bazel): add missing dependency on `tslib` () 2021-04-07 09:39:49 -07:00
benchpress fix(dev-infra): update type castings for JSON.parse usage () 2021-02-09 10:48:43 -08:00
common feat(common): add `historyGo` method to `Location` service () 2021-04-06 09:25:58 -07:00
compiler refactor(compiler-cli): introduce declaration function to declare class metadata () 2021-04-12 10:41:17 -07:00
compiler-cli refactor(compiler-cli): track a dependency on a default import on `WrappedNodeExpr` () 2021-04-12 17:05:10 -07:00
core build: update several dependencies () 2021-04-12 16:46:29 -07:00
docs
elements ci: fix `elements` test on older browsers () 2021-03-24 08:28:46 -07:00
examples docs: improve description, examples of DecimalPipe's digitsInfo parameter () 2021-02-26 15:42:29 -08:00
forms refactor(forms): add base class for all built-in ControlValueAccessors () 2021-04-08 10:24:10 -07:00
language-service test(language-service): Add test to expose bug caused by source file change () 2021-04-09 12:22:31 -07:00
localize build: update yargs dependency to 16.2.0. () 2021-03-30 16:59:38 -07:00
misc/angular-in-memory-web-api release: bump angular-in-web-memory-api package to 0.12.0 () 2021-04-07 09:35:17 -07:00
platform-browser fix(platform-browser): configure `XhrFactory` to use `BrowserXhr` () 2021-03-29 15:14:16 -07:00
platform-browser-dynamic feat(core): support TypeScript 4.2 () 2021-03-17 09:10:25 -07:00
platform-server fix(platform-browser): configure `XhrFactory` to use `BrowserXhr` () 2021-03-29 15:14:16 -07:00
private/testing build: update .bazelversion () 2021-01-26 11:35:54 -08:00
router fix(router): handle new navigations from a NavigationEnd event () 2021-04-08 10:23:04 -07:00
service-worker feat(core): support TypeScript 4.2 () 2021-03-17 09:10:25 -07:00
upgrade feat(core): support TypeScript 4.2 () 2021-03-17 09:10:25 -07:00
zone.js build: update several dependencies () 2021-04-12 16:46:29 -07:00
BUILD.bazel build: replace @types/trusted-types dep with minimal type defs () 2020-10-15 09:08:00 -07:00
README.md
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic () 2020-09-30 09:13:59 -04:00
empty.ts
goog.d.ts
license-banner.txt docs: update year () 2021-02-22 12:37:40 -08:00
system.d.ts
tsconfig-build-no-strict.json
tsconfig-build.json
tsconfig-test.json
tsconfig.json fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic () 2020-09-30 09:13:59 -04:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs () 2020-10-15 09:08:00 -07:00

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