@angular/compiler-cli 18.2.0 → 18.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/bundles/{chunk-WYWH4ABE.js → chunk-5DVL3S3Z.js} +43 -43
  2. package/bundles/{chunk-KCKRBU6N.js → chunk-B4ZOGV3N.js} +31 -31
  3. package/bundles/{chunk-ZLQQWV6U.js → chunk-C5NJ4RJW.js} +5 -5
  4. package/bundles/{chunk-ZHNORXPH.js → chunk-GWDW5CWS.js} +12 -12
  5. package/bundles/{chunk-K32LEXRQ.js → chunk-J46GT65M.js} +159 -171
  6. package/bundles/chunk-J46GT65M.js.map +6 -0
  7. package/bundles/{chunk-LYJKWJUC.js → chunk-SBDNBITT.js} +3 -3
  8. package/bundles/{chunk-2SSA4Y5F.js → chunk-T7RBRO42.js} +130 -125
  9. package/bundles/chunk-T7RBRO42.js.map +6 -0
  10. package/bundles/{chunk-ERN7RQQ7.js → chunk-THQF5ZZE.js} +5 -5
  11. package/bundles/{chunk-QYV344EV.js → chunk-WR7TUJ7M.js} +7 -7
  12. package/bundles/{chunk-3W345P4E.js → chunk-XNL3EK5H.js} +7 -7
  13. package/bundles/{chunk-JA5OGHV4.js → chunk-XQOVJNXK.js} +3 -3
  14. package/bundles/index.js +12 -12
  15. package/bundles/linker/babel/index.js +12 -12
  16. package/bundles/linker/index.js +4 -4
  17. package/bundles/ngcc/index.js +1 -1
  18. package/bundles/private/bazel.js +1 -1
  19. package/bundles/private/localize.js +3 -3
  20. package/bundles/private/migrations.js +4 -4
  21. package/bundles/private/tooling.js +6 -6
  22. package/bundles/src/bin/ng_xi18n.js +10 -10
  23. package/bundles/src/bin/ngc.js +8 -8
  24. package/bundles_metadata.json +1 -1
  25. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  26. package/package.json +2 -2
  27. package/src/ngtsc/annotations/component/src/handler.d.ts +2 -1
  28. package/src/ngtsc/annotations/component/src/resources.d.ts +1 -0
  29. package/src/ngtsc/core/api/src/public_options.d.ts +7 -0
  30. package/src/ngtsc/docs/src/entities.d.ts +9 -6
  31. package/src/ngtsc/docs/src/function_extractor.d.ts +16 -6
  32. package/bundles/chunk-2SSA4Y5F.js.map +0 -6
  33. package/bundles/chunk-K32LEXRQ.js.map +0 -6
  34. /package/bundles/{chunk-WYWH4ABE.js.map → chunk-5DVL3S3Z.js.map} +0 -0
  35. /package/bundles/{chunk-KCKRBU6N.js.map → chunk-B4ZOGV3N.js.map} +0 -0
  36. /package/bundles/{chunk-ZLQQWV6U.js.map → chunk-C5NJ4RJW.js.map} +0 -0
  37. /package/bundles/{chunk-ZHNORXPH.js.map → chunk-GWDW5CWS.js.map} +0 -0
  38. /package/bundles/{chunk-LYJKWJUC.js.map → chunk-SBDNBITT.js.map} +0 -0
  39. /package/bundles/{chunk-ERN7RQQ7.js.map → chunk-THQF5ZZE.js.map} +0 -0
  40. /package/bundles/{chunk-QYV344EV.js.map → chunk-WR7TUJ7M.js.map} +0 -0
  41. /package/bundles/{chunk-3W345P4E.js.map → chunk-XNL3EK5H.js.map} +0 -0
  42. /package/bundles/{chunk-JA5OGHV4.js.map → chunk-XQOVJNXK.js.map} +0 -0
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { MaybeForwardRefExpression, outputAst as o, R3DeclareDependencyMetadata, R3DependencyMetadata, R3Reference } from '@angular/compiler';
9
9
  import { AstObject, AstValue } from '../../ast/ast_value';
10
- export declare const PLACEHOLDER_VERSION = "18.2.0";
10
+ export declare const PLACEHOLDER_VERSION = "18.2.2";
11
11
  export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
12
12
  /**
13
13
  * Parses the value of an enum from the AST value's symbol name.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "18.2.0",
3
+ "version": "18.2.2",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -53,7 +53,7 @@
53
53
  "yargs": "^17.2.1"
54
54
  },
55
55
  "peerDependencies": {
56
- "@angular/compiler": "18.2.0",
56
+ "@angular/compiler": "18.2.2",
57
57
  "typescript": ">=5.4 <5.6"
58
58
  },
59
59
  "repository": {
@@ -68,7 +68,8 @@ export declare class ComponentDecoratorHandler implements DecoratorHandler<Decor
68
68
  private readonly enableLetSyntax;
69
69
  private readonly localCompilationExtraImportsTracker;
70
70
  private readonly jitDeclarationRegistry;
71
- constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, metaReader: MetadataReader, scopeReader: ComponentScopeReader, dtsScopeReader: DtsModuleScopeResolver, scopeRegistry: LocalModuleScopeRegistry, typeCheckScopeRegistry: TypeCheckScopeRegistry, resourceRegistry: ResourceRegistry, isCore: boolean, strictCtorDeps: boolean, resourceLoader: ResourceLoader, rootDirs: ReadonlyArray<string>, defaultPreserveWhitespaces: boolean, i18nUseExternalIds: boolean, enableI18nLegacyMessageIdFormat: boolean, usePoisonedData: boolean, i18nNormalizeLineEndingsInICUs: boolean, moduleResolver: ModuleResolver, cycleAnalyzer: CycleAnalyzer, cycleHandlingStrategy: CycleHandlingStrategy, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, depTracker: DependencyTracker | null, injectableRegistry: InjectableClassRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, hostDirectivesResolver: HostDirectivesResolver, importTracker: ImportedSymbolsTracker, includeClassMetadata: boolean, compilationMode: CompilationMode, deferredSymbolTracker: DeferredSymbolTracker, forbidOrphanRendering: boolean, enableBlockSyntax: boolean, enableLetSyntax: boolean, localCompilationExtraImportsTracker: LocalCompilationExtraImportsTracker | null, jitDeclarationRegistry: JitDeclarationRegistry);
71
+ private readonly i18nPreserveSignificantWhitespace;
72
+ constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, metaReader: MetadataReader, scopeReader: ComponentScopeReader, dtsScopeReader: DtsModuleScopeResolver, scopeRegistry: LocalModuleScopeRegistry, typeCheckScopeRegistry: TypeCheckScopeRegistry, resourceRegistry: ResourceRegistry, isCore: boolean, strictCtorDeps: boolean, resourceLoader: ResourceLoader, rootDirs: ReadonlyArray<string>, defaultPreserveWhitespaces: boolean, i18nUseExternalIds: boolean, enableI18nLegacyMessageIdFormat: boolean, usePoisonedData: boolean, i18nNormalizeLineEndingsInICUs: boolean, moduleResolver: ModuleResolver, cycleAnalyzer: CycleAnalyzer, cycleHandlingStrategy: CycleHandlingStrategy, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, depTracker: DependencyTracker | null, injectableRegistry: InjectableClassRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, hostDirectivesResolver: HostDirectivesResolver, importTracker: ImportedSymbolsTracker, includeClassMetadata: boolean, compilationMode: CompilationMode, deferredSymbolTracker: DeferredSymbolTracker, forbidOrphanRendering: boolean, enableBlockSyntax: boolean, enableLetSyntax: boolean, localCompilationExtraImportsTracker: LocalCompilationExtraImportsTracker | null, jitDeclarationRegistry: JitDeclarationRegistry, i18nPreserveSignificantWhitespace: boolean);
72
73
  private literalCache;
73
74
  private elementSchemaRegistry;
74
75
  /**
@@ -101,6 +101,7 @@ export interface ExtractTemplateOptions {
101
101
  i18nNormalizeLineEndingsInICUs: boolean;
102
102
  enableBlockSyntax: boolean;
103
103
  enableLetSyntax: boolean;
104
+ preserveSignificantWhitespace?: boolean;
104
105
  }
105
106
  export declare function extractTemplate(node: ClassDeclaration, template: TemplateDeclaration, evaluator: PartialEvaluator, depTracker: DependencyTracker | null, resourceLoader: ResourceLoader, options: ExtractTemplateOptions, compilationMode: CompilationMode): ParsedTemplateWithSource;
106
107
  export declare function parseTemplateDeclaration(node: ClassDeclaration, decorator: Decorator, component: Map<string, ts.Expression>, containingFile: string, evaluator: PartialEvaluator, depTracker: DependencyTracker | null, resourceLoader: ResourceLoader, defaultPreserveWhitespaces: boolean): TemplateDeclaration;
@@ -357,6 +357,13 @@ export interface I18nOptions {
357
357
  * The default is `false`, but this will be switched in a future major release.
358
358
  */
359
359
  i18nNormalizeLineEndingsInICUs?: boolean;
360
+ /**
361
+ * Whether or not to preserve whitespace when extracting messages with the legacy (View Engine)
362
+ * pipeline.
363
+ *
364
+ * Defaults to `true`.
365
+ */
366
+ i18nPreserveWhitespaceForLegacyExtraction?: boolean;
360
367
  }
361
368
  /**
362
369
  * Options that specify compilation target.
@@ -106,7 +106,7 @@ export interface PipeEntry extends ClassEntry {
106
106
  pipeName: string;
107
107
  isStandalone: boolean;
108
108
  }
109
- export interface FunctionEntry extends DocEntry {
109
+ export interface FunctionSignatureMetadata extends DocEntry {
110
110
  params: ParameterEntry[];
111
111
  returnType: string;
112
112
  returnDescription?: string;
@@ -143,11 +143,14 @@ export interface ParameterEntry {
143
143
  isOptional: boolean;
144
144
  isRestParam: boolean;
145
145
  }
146
+ export type FunctionEntry = FunctionDefinitionEntry & DocEntry & {
147
+ implementation: FunctionSignatureMetadata;
148
+ };
146
149
  /** Interface describing a function with overload signatures. */
147
- export interface FunctionWithOverloads {
150
+ export interface FunctionDefinitionEntry {
148
151
  name: string;
149
- signatures: FunctionEntry[];
150
- implementation: FunctionEntry | null;
152
+ signatures: FunctionSignatureMetadata[];
153
+ implementation: FunctionSignatureMetadata | null;
151
154
  }
152
155
  /**
153
156
  * Docs entry describing an initializer API function.
@@ -163,8 +166,8 @@ export interface FunctionWithOverloads {
163
166
  * constructs. Initializer APIs are explicitly denoted via a JSDoc tag.
164
167
  */
165
168
  export interface InitializerApiFunctionEntry extends DocEntry {
166
- callFunction: FunctionWithOverloads;
167
- subFunctions: FunctionWithOverloads[];
169
+ callFunction: FunctionDefinitionEntry;
170
+ subFunctions: FunctionDefinitionEntry[];
168
171
  __docsMetadata__?: {
169
172
  /**
170
173
  * Whether types should be shown in the signature
@@ -6,17 +6,27 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import ts from 'typescript';
9
- import { FunctionEntry, ParameterEntry } from './entities';
9
+ import { EntryType, FunctionEntry, ParameterEntry } from './entities';
10
10
  export type FunctionLike = ts.FunctionDeclaration | ts.MethodDeclaration | ts.MethodSignature | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration;
11
11
  export declare class FunctionExtractor {
12
12
  private name;
13
- private declaration;
13
+ private exportDeclaration;
14
14
  private typeChecker;
15
- constructor(name: string, declaration: FunctionLike, typeChecker: ts.TypeChecker);
15
+ constructor(name: string, exportDeclaration: FunctionLike, typeChecker: ts.TypeChecker);
16
16
  extract(): FunctionEntry;
17
- /** Gets all overloads for the function (excluding this extractor's FunctionDeclaration). */
18
- getOverloads(): ts.FunctionDeclaration[];
19
- private getSymbol;
20
17
  }
21
18
  /** Extracts parameters of the given parameter declaration AST nodes. */
22
19
  export declare function extractAllParams(params: ts.NodeArray<ts.ParameterDeclaration>, typeChecker: ts.TypeChecker): ParameterEntry[];
20
+ export declare function extractCallSignatures(name: string, typeChecker: ts.TypeChecker, type: ts.Type): {
21
+ name: string;
22
+ entryType: EntryType;
23
+ description: string;
24
+ generics: import("./entities").GenericEntry[];
25
+ isNewType: boolean;
26
+ jsdocTags: import("./entities").JsDocTagEntry[];
27
+ params: ParameterEntry[];
28
+ rawComment: string;
29
+ returnType: string;
30
+ }[];
31
+ /** Finds the implementation of the given function declaration overload signature. */
32
+ export declare function findImplementationOfFunction(node: FunctionLike, typeChecker: ts.TypeChecker): FunctionLike | undefined;