@angular/compiler-cli 19.0.0-rc.0 → 19.0.0-rc.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 (47) hide show
  1. package/bundles/{chunk-STORTTKY.js → chunk-37JMVF7H.js} +8 -8
  2. package/bundles/{chunk-V2Z4WDVR.js → chunk-6RLW23PZ.js} +3 -3
  3. package/bundles/{chunk-5UDS2TPQ.js → chunk-77D5CI2U.js} +7 -7
  4. package/bundles/{chunk-4W4CWRSP.js → chunk-F33AEX64.js} +5 -5
  5. package/bundles/{chunk-GBKXY6BH.js → chunk-FKXFEX7K.js} +3 -3
  6. package/bundles/{chunk-TRCFFQ47.js → chunk-NC4E5UYB.js} +73 -64
  7. package/bundles/chunk-NC4E5UYB.js.map +6 -0
  8. package/bundles/{chunk-S2JI2WY5.js → chunk-OM3GHCE5.js} +193 -159
  9. package/bundles/chunk-OM3GHCE5.js.map +6 -0
  10. package/bundles/{chunk-PXQLBKVP.js → chunk-P6YTDBL7.js} +31 -31
  11. package/bundles/{chunk-I6R3GL3L.js → chunk-Q2WE7ECN.js} +5 -5
  12. package/bundles/{chunk-NS33RCEE.js → chunk-RJMMB5HJ.js} +12 -12
  13. package/bundles/{chunk-TQQOHNLL.js → chunk-WLQBAON6.js} +108 -94
  14. package/bundles/chunk-WLQBAON6.js.map +6 -0
  15. package/bundles/index.js +12 -12
  16. package/bundles/linker/babel/index.js +12 -12
  17. package/bundles/linker/index.js +4 -4
  18. package/bundles/ngcc/index.js +1 -1
  19. package/bundles/private/bazel.js +1 -1
  20. package/bundles/private/localize.js +3 -3
  21. package/bundles/private/migrations.js +4 -4
  22. package/bundles/private/tooling.js +6 -6
  23. package/bundles/src/bin/ng_xi18n.js +10 -10
  24. package/bundles/src/bin/ngc.js +8 -8
  25. package/bundles_metadata.json +1 -1
  26. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  27. package/package.json +3 -3
  28. package/src/ngtsc/docs/src/entities.d.ts +4 -2
  29. package/src/ngtsc/docs/src/type_alias_extractor.d.ts +1 -0
  30. package/src/ngtsc/imports/src/emitter.d.ts +1 -1
  31. package/src/ngtsc/metadata/src/api.d.ts +5 -0
  32. package/src/ngtsc/metadata/src/util.d.ts +5 -2
  33. package/src/ngtsc/reflection/src/typescript.d.ts +6 -0
  34. package/src/ngtsc/typecheck/api/checker.d.ts +1 -1
  35. package/src/ngtsc/typecheck/src/checker.d.ts +1 -1
  36. package/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.d.ts +4 -4
  37. package/bundles/chunk-S2JI2WY5.js.map +0 -6
  38. package/bundles/chunk-TQQOHNLL.js.map +0 -6
  39. package/bundles/chunk-TRCFFQ47.js.map +0 -6
  40. /package/bundles/{chunk-STORTTKY.js.map → chunk-37JMVF7H.js.map} +0 -0
  41. /package/bundles/{chunk-V2Z4WDVR.js.map → chunk-6RLW23PZ.js.map} +0 -0
  42. /package/bundles/{chunk-5UDS2TPQ.js.map → chunk-77D5CI2U.js.map} +0 -0
  43. /package/bundles/{chunk-4W4CWRSP.js.map → chunk-F33AEX64.js.map} +0 -0
  44. /package/bundles/{chunk-GBKXY6BH.js.map → chunk-FKXFEX7K.js.map} +0 -0
  45. /package/bundles/{chunk-PXQLBKVP.js.map → chunk-P6YTDBL7.js.map} +0 -0
  46. /package/bundles/{chunk-I6R3GL3L.js.map → chunk-Q2WE7ECN.js.map} +0 -0
  47. /package/bundles/{chunk-NS33RCEE.js.map → chunk-RJMMB5HJ.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 = "19.0.0-rc.0";
10
+ export declare const PLACEHOLDER_VERSION = "19.0.0-rc.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": "19.0.0-rc.0",
3
+ "version": "19.0.0-rc.2",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -43,7 +43,7 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "@babel/core": "7.25.2",
46
+ "@babel/core": "7.26.0",
47
47
  "@jridgewell/sourcemap-codec": "^1.4.14",
48
48
  "reflect-metadata": "^0.2.0",
49
49
  "chokidar": "^4.0.0",
@@ -53,7 +53,7 @@
53
53
  "yargs": "^17.2.1"
54
54
  },
55
55
  "peerDependencies": {
56
- "@angular/compiler": "19.0.0-rc.0",
56
+ "@angular/compiler": "19.0.0-rc.2",
57
57
  "typescript": ">=5.5 <5.7"
58
58
  },
59
59
  "repository": {
@@ -85,13 +85,15 @@ export interface ConstantEntry extends DocEntry {
85
85
  type: string;
86
86
  }
87
87
  /** Documentation entity for a type alias. */
88
- export type TypeAliasEntry = ConstantEntry;
88
+ export interface TypeAliasEntry extends ConstantEntry {
89
+ generics: GenericEntry[];
90
+ }
89
91
  /** Documentation entity for a TypeScript class. */
90
92
  export interface ClassEntry extends DocEntry {
91
93
  isAbstract: boolean;
92
94
  members: MemberEntry[];
93
- generics: GenericEntry[];
94
95
  extends?: string;
96
+ generics: GenericEntry[];
95
97
  implements: string[];
96
98
  }
97
99
  /** Documentation entity for a TypeScript interface. */
@@ -12,6 +12,7 @@ export declare function extractTypeAlias(declaration: ts.TypeAliasDeclaration):
12
12
  name: string;
13
13
  type: string;
14
14
  entryType: EntryType;
15
+ generics: import("./entities").GenericEntry[];
15
16
  rawComment: string;
16
17
  description: string;
17
18
  jsdocTags: import("./entities").JsDocTagEntry[];
@@ -67,7 +67,7 @@ export declare enum ImportFlags {
67
67
  * an import then `null` should be used.
68
68
  */
69
69
  export type ImportedFile = ts.SourceFile | 'unknown' | null;
70
- export declare const enum ReferenceEmitKind {
70
+ export declare enum ReferenceEmitKind {
71
71
  Success = 0,
72
72
  Failed = 1
73
73
  }
@@ -20,6 +20,11 @@ export interface NgModuleMeta {
20
20
  imports: Reference<ClassDeclaration>[];
21
21
  exports: Reference<ClassDeclaration>[];
22
22
  schemas: SchemaMetadata[];
23
+ /**
24
+ * Whether the module had some issue being analyzed.
25
+ * This means it likely does not have complete and reliable metadata.
26
+ */
27
+ isPoisoned: boolean;
23
28
  /**
24
29
  * The raw `ts.Expression` which gave rise to `declarations`, if one exists.
25
30
  *
@@ -10,8 +10,11 @@ import { OwningModule, Reference } from '../../imports';
10
10
  import { ClassDeclaration, ReflectionHost } from '../../reflection';
11
11
  import { DirectiveMeta, DirectiveTypeCheckMeta, HostDirectiveMeta, HostDirectiveMetaForGlobalMode, InputMapping, MetadataReader, NgModuleMeta, PipeMeta } from './api';
12
12
  import { ClassPropertyMapping } from './property_mapping';
13
- export declare function extractReferencesFromType(checker: ts.TypeChecker, def: ts.TypeNode, bestGuessOwningModule: OwningModule | null): Reference<ClassDeclaration>[];
14
- export declare function extraReferenceFromTypeQuery(checker: ts.TypeChecker, typeNode: ts.TypeQueryNode, origin: ts.TypeNode, bestGuessOwningModule: OwningModule | null): Reference<ClassDeclaration<ts.ClassDeclaration>>;
13
+ export declare function extractReferencesFromType(checker: ts.TypeChecker, def: ts.TypeNode, bestGuessOwningModule: OwningModule | null): {
14
+ result: Reference<ClassDeclaration>[];
15
+ isIncomplete: boolean;
16
+ };
17
+ export declare function extraReferenceFromTypeQuery(checker: ts.TypeChecker, typeNode: ts.TypeQueryNode, origin: ts.TypeNode, bestGuessOwningModule: OwningModule | null): Reference<ClassDeclaration> | null;
15
18
  export declare function readBooleanType(type: ts.TypeNode): boolean | null;
16
19
  export declare function readStringType(type: ts.TypeNode): string | null;
17
20
  export declare function readMapType<T>(type: ts.TypeNode, valueTransform: (type: ts.TypeNode) => T | null): {
@@ -60,6 +60,12 @@ export declare class TypeScriptReflectionHost implements ReflectionHost {
60
60
  }
61
61
  export declare function reflectNameOfDeclaration(decl: ts.Declaration): string | null;
62
62
  export declare function reflectIdentifierOfDeclaration(decl: ts.Declaration): ts.Identifier | null;
63
+ export declare class TypeEntityToDeclarationError extends Error {
64
+ }
65
+ /**
66
+ * @throws {TypeEntityToDeclarationError} if the type cannot be converted
67
+ * to a declaration.
68
+ */
63
69
  export declare function reflectTypeEntityToDeclaration(type: ts.EntityName, checker: ts.TypeChecker): {
64
70
  node: ts.Declaration;
65
71
  from: string | null;
@@ -128,7 +128,7 @@ export interface TemplateTypeChecker {
128
128
  /**
129
129
  * In the context of an Angular trait, generate potential imports for a directive.
130
130
  */
131
- getPotentialImportsFor(toImport: Reference<ClassDeclaration>, inComponent: ts.ClassDeclaration, importMode: PotentialImportMode): ReadonlyArray<PotentialImport>;
131
+ getPotentialImportsFor(toImport: Reference<ClassDeclaration>, inContext: ts.Node, importMode: PotentialImportMode): ReadonlyArray<PotentialImport>;
132
132
  /**
133
133
  * Get the primary decorator for an Angular class (such as @Component). This does not work for
134
134
  * `@Injectable`.
@@ -134,7 +134,7 @@ export declare class TemplateTypeCheckerImpl implements TemplateTypeChecker {
134
134
  getPrimaryAngularDecorator(target: ts.ClassDeclaration): ts.Decorator | null;
135
135
  getOwningNgModule(component: ts.ClassDeclaration): ts.ClassDeclaration | null;
136
136
  private emit;
137
- getPotentialImportsFor(toImport: Reference<ClassDeclaration>, inContext: ts.ClassDeclaration, importMode: PotentialImportMode): ReadonlyArray<PotentialImport>;
137
+ getPotentialImportsFor(toImport: Reference<ClassDeclaration>, inContext: ts.Node, importMode: PotentialImportMode): ReadonlyArray<PotentialImport>;
138
138
  private getScopeData;
139
139
  private scopeDataOfDirectiveMeta;
140
140
  private scopeDataOfPipeMeta;
@@ -6,9 +6,9 @@
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import ts from 'typescript';
9
- import { ImportedSymbolsTracker } from '../../../imports';
10
- import { TemplateTypeChecker, TypeCheckingConfig } from '../../../typecheck/api';
11
- import { SourceFileValidatorRule } from './api';
9
+ import type { ImportedSymbolsTracker } from '../../../imports';
10
+ import type { TemplateTypeChecker, TypeCheckingConfig } from '../../../typecheck/api';
11
+ import type { SourceFileValidatorRule } from './api';
12
12
  /**
13
13
  * Rule that flags unused symbols inside of the `imports` array of a component.
14
14
  */
@@ -18,7 +18,7 @@ export declare class UnusedStandaloneImportsRule implements SourceFileValidatorR
18
18
  private importedSymbolsTracker;
19
19
  constructor(templateTypeChecker: TemplateTypeChecker, typeCheckingConfig: TypeCheckingConfig, importedSymbolsTracker: ImportedSymbolsTracker);
20
20
  shouldCheck(sourceFile: ts.SourceFile): boolean;
21
- checkNode(node: ts.Node): ts.Diagnostic | null;
21
+ checkNode(node: ts.Node): ts.Diagnostic | ts.Diagnostic[] | null;
22
22
  private getUnusedSymbols;
23
23
  /**
24
24
  * Determines if an import reference *might* be coming from a shared imports array.