1381301afe
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 #41557 |
||
---|---|---|
.circleci | ||
.devcontainer | ||
.github | ||
.husky | ||
.ng-dev | ||
.vscode | ||
.yarn | ||
aio | ||
dev-infra | ||
docs | ||
goldens | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.bazelversion | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmessage | ||
.mailmap | ||
.npmrc | ||
.nvmrc | ||
.pullapprove.yml | ||
.yarnrc | ||
BUILD.bazel | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE | ||
browser-providers.conf.js | ||
gulpfile.js | ||
karma-js.conf.js | ||
package.json | ||
renovate.json | ||
test-events.js | ||
test-main.js | ||
tslint.json | ||
yarn.lock | ||
yarn.lock.readme.md |
README.md
Angular - One framework. Mobile & desktop.
Angular is a development platform for building mobile and desktop web applications
using Typescript/JavaScript and other languages.
Contributing Guidelines
·
Submit an Issue
·
Blog
Documentation
Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.
Advanced
Development Setup
Prerequisites
- Install Node.js which includes Node Package Manager
Setting Up a Project
Install the Angular CLI globally:
npm install -g @angular/cli
Create workspace:
ng new [PROJECT NAME]
Run the application:
cd [PROJECT NAME]
ng serve
Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.
Quickstart
Ecosystem
Changelog
Learn about the latest improvements.
Upgrading
Check out our upgrade guide to find out the best way to upgrade your project.
Contributing
Contributing Guidelines
Read through our contributing guidelines to learn about our submission process, coding rules and more.
Want to Help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
Code of Conduct
Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.
Community
Join the conversation and help the community.
Love Angular? Give our repo a star ⭐ ⬆️.