mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
Bundler-backed AnalysisHost implementations resolve dependencies into both in-bundle modules and bundle-external dependencies, distinguish runtime imports from type-only imports, and assign opaque virtual module IDs that are not filesystem paths. Previously, the query engine assumed every extracted specifier had uniform type-only semantics, treated resolved modules as in-project paths unless they ended in .d.ts, and computed relative paths across emitted imports and debug metadata. Classify extracted static imports, re-exports, dynamic import() expressions, and TSImportType queries with exact ImportKind and type_only flags and forward both on ResolveRequest. Track authoritative external module flags in FileIdInterner and QueryEngine so external modules pass external = true to AnalysisHost::load, stay out of ProgramFiles, coordinator roots, and core compilation, and preserve or rebase their original OwningReference specifiers instead of emitting paths to resolved external files. Propagate IdKind onto AnalysisResult, FileUpdate, FileInvalidation, and WASM ModuleRef entry points. When either side of a reference or a compiled file carries IdKind::Virtual, emit the module ID verbatim across cross-file import emission, class debug info, and HMR identifiers without path diffing or rootDir stripping.