mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor: remove all deep imports in language service
Removes all deep imports, which cause problems with vitest module resolution
This commit is contained in:
committed by
Kirill Cherkashin
parent
c3d4be4a61
commit
1ca9d28ea5
@@ -82,14 +82,17 @@ ts_project(
|
||||
"//:node_modules/typescript",
|
||||
"//packages/compiler",
|
||||
"//packages/compiler-cli/private",
|
||||
"//packages/compiler-cli/src/ngtsc/annotations",
|
||||
"//packages/compiler-cli/src/ngtsc/core",
|
||||
"//packages/compiler-cli/src/ngtsc/core:api",
|
||||
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
||||
"//packages/compiler-cli/src/ngtsc/docs",
|
||||
"//packages/compiler-cli/src/ngtsc/file_system",
|
||||
"//packages/compiler-cli/src/ngtsc/imports",
|
||||
"//packages/compiler-cli/src/ngtsc/incremental",
|
||||
"//packages/compiler-cli/src/ngtsc/indexer",
|
||||
"//packages/compiler-cli/src/ngtsc/logging",
|
||||
"//packages/compiler-cli/src/ngtsc/metadata",
|
||||
"//packages/compiler-cli/src/ngtsc/perf",
|
||||
"//packages/compiler-cli/src/ngtsc/program_driver",
|
||||
"//packages/compiler-cli/src/ngtsc/reflection",
|
||||
|
||||
@@ -33,6 +33,40 @@ export {NgTscPlugin, PluginCompilerHost} from './src/ngtsc/tsc_plugin';
|
||||
export {NgtscProgram} from './src/ngtsc/program';
|
||||
export {OptimizeFor} from './src/ngtsc/typecheck/api';
|
||||
|
||||
// Explicit exports for language service
|
||||
export {getAngularDecorators} from './src/ngtsc/annotations';
|
||||
export {
|
||||
NgCompiler,
|
||||
type NgCompilerOptions,
|
||||
type CompilationTicket,
|
||||
freshCompilationTicket,
|
||||
incrementalFromCompilerTicket,
|
||||
resourceChangeTicket,
|
||||
} from './src/ngtsc/core';
|
||||
export {type NgCompilerAdapter} from './src/ngtsc/core/api';
|
||||
export {Reference} from './src/ngtsc/imports';
|
||||
export {
|
||||
type DirectiveMeta,
|
||||
type InputMapping,
|
||||
isExternalResource,
|
||||
MetaKind,
|
||||
type PipeMeta,
|
||||
type Resource,
|
||||
} from './src/ngtsc/metadata';
|
||||
export {
|
||||
type DeclarationNode,
|
||||
isNamedClassDeclaration,
|
||||
type ReflectionHost,
|
||||
type ClassDeclaration,
|
||||
} from './src/ngtsc/reflection';
|
||||
export {isFatalDiagnosticError} from './src/ngtsc/diagnostics';
|
||||
export {PerfPhase} from './src/ngtsc/perf';
|
||||
export {type FileUpdate, type ProgramDriver} from './src/ngtsc/program_driver';
|
||||
export {TrackedIncrementalBuildStrategy} from './src/ngtsc/incremental';
|
||||
export {isShim} from './src/ngtsc/shims';
|
||||
export {getRootDirs} from './src/ngtsc/util/src/typescript';
|
||||
export * from './src/ngtsc/typecheck/api';
|
||||
|
||||
// **Note**: Explicit named exports to make this file work with CJS/ESM interop without
|
||||
// needing to use a default import. NodeJS will expose named CJS exports as named ESM exports.
|
||||
// TODO(devversion): Remove these duplicate exports once devmode&prodmode is combined/ESM.
|
||||
@@ -40,8 +74,14 @@ export {ConsoleLogger, Logger, LogLevel} from './src/ngtsc/logging';
|
||||
export {
|
||||
NodeJSFileSystem,
|
||||
absoluteFrom,
|
||||
FileSystem,
|
||||
AbsoluteFsPath,
|
||||
absoluteFromSourceFile,
|
||||
resolve,
|
||||
type FileStats,
|
||||
type PathSegment,
|
||||
type PathString,
|
||||
getSourceFileOrError,
|
||||
type FileSystem,
|
||||
type AbsoluteFsPath,
|
||||
NgtscCompilerHost,
|
||||
getFileSystem,
|
||||
setFileSystem,
|
||||
|
||||
Reference in New Issue
Block a user