mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
Bundler integrations and workspace reconfigurations can change how module specifiers resolve without editing any individual source file—for example when alias tables, export conditions, or package layouts change between builds. While `invalidate_module_resolution` re-runs previously failed resolutions after file creation or deletion, callers also need a way to flush positive cached resolutions without discarding parsed ASTs. Add `ResolutionCache::clear_all` and `QueryEngine::clear_resolution_cache` to clear both host-internal and engine-level resolution caches and evict queries derived from any importer's resolutions while preserving cached `ParseFile` results. Expose `clear_resolution_cache` on `Analyzer`, `TestAnalyzer`, `WasmAnalyzer`, and the sidecar JSON-RPC server, returning the deduplicated list of stale module IDs while preserving virtual module IDs verbatim instead of normalizing backslashes. Surface `clearResolutionCache` on `IAnalyzer`, `WasmAnalyzer`, `NapiAnalyzer`, `SidecarAnalyzer`, and `HybridCompiler`. In `HybridCompiler`, sequence `clearResolutionCache` through the serialized update queue so evicted analyses are dropped from the TypeScript file cache, recorded for incremental emit, and refreshed on the following delta pass.
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