@angular/compiler-cli 13.2.0-rc.1 → 13.2.3

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 (43) hide show
  1. package/bundles/{chunk-UESD6FVI.js → chunk-ALKVYGAK.js} +5 -5
  2. package/bundles/{chunk-UESD6FVI.js.map → chunk-ALKVYGAK.js.map} +0 -0
  3. package/bundles/{chunk-LMCFGUUV.js → chunk-C44PYKVA.js} +3 -3
  4. package/bundles/{chunk-LMCFGUUV.js.map → chunk-C44PYKVA.js.map} +0 -0
  5. package/bundles/{chunk-676MI6WZ.js → chunk-FXU7FMZC.js} +5 -5
  6. package/bundles/{chunk-676MI6WZ.js.map → chunk-FXU7FMZC.js.map} +1 -1
  7. package/bundles/{chunk-ADHVDA4A.js → chunk-K2Z44JHH.js} +1 -1
  8. package/bundles/{chunk-ADHVDA4A.js.map → chunk-K2Z44JHH.js.map} +1 -1
  9. package/bundles/{chunk-4QCYPOMC.js → chunk-NRJCXTRC.js} +4 -4
  10. package/bundles/{chunk-4QCYPOMC.js.map → chunk-NRJCXTRC.js.map} +1 -1
  11. package/bundles/{chunk-DH7A3OBN.js → chunk-O57ZKMWS.js} +2 -2
  12. package/bundles/{chunk-DH7A3OBN.js.map → chunk-O57ZKMWS.js.map} +0 -0
  13. package/bundles/{chunk-3XJZ4ZZZ.js → chunk-PJPAHVUO.js} +104 -73
  14. package/bundles/chunk-PJPAHVUO.js.map +6 -0
  15. package/bundles/{chunk-OOEI5KQH.js → chunk-XLVWXQAR.js} +6 -6
  16. package/bundles/{chunk-OOEI5KQH.js.map → chunk-XLVWXQAR.js.map} +1 -1
  17. package/bundles/{chunk-QBU7RUKB.js → chunk-XNYP2SFR.js} +8 -3
  18. package/bundles/chunk-XNYP2SFR.js.map +6 -0
  19. package/bundles/{chunk-O4XVCXRT.js → chunk-Z2HS4HDG.js} +2 -2
  20. package/bundles/{chunk-O4XVCXRT.js.map → chunk-Z2HS4HDG.js.map} +0 -0
  21. package/bundles/index.js +5 -5
  22. package/bundles/linker/babel/index.js +4 -4
  23. package/bundles/linker/babel/index.js.map +1 -1
  24. package/bundles/linker/index.js +4 -4
  25. package/bundles/ngcc/index.js +7 -7
  26. package/bundles/ngcc/main-ngcc.js +8 -8
  27. package/bundles/ngcc/main-ngcc.js.map +1 -1
  28. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +7 -7
  29. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
  30. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +1 -1
  31. package/bundles/private/localize.js +2 -2
  32. package/bundles/private/migrations.js +3 -3
  33. package/bundles/src/bin/ng_xi18n.js +5 -5
  34. package/bundles/src/bin/ngc.js +5 -5
  35. package/bundles_metadata.json +1 -1
  36. package/ngcc/src/packages/build_marker.d.ts +1 -1
  37. package/package.json +2 -3
  38. package/src/ngtsc/core/api/src/options.d.ts +0 -4
  39. package/src/ngtsc/imports/src/emitter.d.ts +16 -2
  40. package/src/ngtsc/indexer/src/api.d.ts +1 -0
  41. package/src/ngtsc/indexer/src/template.d.ts +4 -1
  42. package/bundles/chunk-3XJZ4ZZZ.js.map +0 -6
  43. package/bundles/chunk-QBU7RUKB.js.map +0 -6
@@ -34,7 +34,7 @@ import {
34
34
  ivyTransformFactory,
35
35
  retagAllTsFiles,
36
36
  untagAllTsFiles
37
- } from "./chunk-LMCFGUUV.js";
37
+ } from "./chunk-C44PYKVA.js";
38
38
  import {
39
39
  TypeScriptReflectionHost,
40
40
  isNamedClassDeclaration
@@ -79,7 +79,7 @@ import {
79
79
  toUnredirectedSourceFile,
80
80
  translateExpression,
81
81
  translateType
82
- } from "./chunk-QBU7RUKB.js";
82
+ } from "./chunk-XNYP2SFR.js";
83
83
  import {
84
84
  LogicalFileSystem,
85
85
  absoluteFrom,
@@ -89,7 +89,7 @@ import {
89
89
  getSourceFileOrError,
90
90
  join,
91
91
  resolve
92
- } from "./chunk-676MI6WZ.js";
92
+ } from "./chunk-FXU7FMZC.js";
93
93
  import {
94
94
  ActivePerfRecorder,
95
95
  DelegatingPerfRecorder,
@@ -162,7 +162,7 @@ var SymbolKind;
162
162
 
163
163
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
164
164
  import { HtmlParser, MessageBundle } from "@angular/compiler";
165
- import ts31 from "typescript";
165
+ import ts32 from "typescript";
166
166
 
167
167
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
168
168
  import { Xliff, Xliff2, Xmb } from "@angular/compiler";
@@ -267,7 +267,7 @@ function verifySupportedTypeScriptVersion() {
267
267
  }
268
268
 
269
269
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
270
- import ts29 from "typescript";
270
+ import ts30 from "typescript";
271
271
 
272
272
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
273
273
  var CycleAnalyzer = class {
@@ -1079,11 +1079,12 @@ var ExpressionVisitor = class extends RecursiveAstVisitor {
1079
1079
  this.boundTemplate = boundTemplate;
1080
1080
  this.targetToIdentifier = targetToIdentifier;
1081
1081
  this.identifiers = [];
1082
+ this.errors = [];
1082
1083
  }
1083
1084
  static getIdentifiers(ast, source, absoluteOffset, boundTemplate, targetToIdentifier) {
1084
1085
  const visitor = new ExpressionVisitor(source, absoluteOffset, boundTemplate, targetToIdentifier);
1085
1086
  visitor.visit(ast);
1086
- return visitor.identifiers;
1087
+ return { identifiers: visitor.identifiers, errors: visitor.errors };
1087
1088
  }
1088
1089
  visit(ast) {
1089
1090
  ast.visit(this);
@@ -1105,7 +1106,8 @@ var ExpressionVisitor = class extends RecursiveAstVisitor {
1105
1106
  identifierStart = ast.nameSpan.start - this.absoluteOffset;
1106
1107
  }
1107
1108
  if (!this.expressionStr.substring(identifierStart).startsWith(ast.name)) {
1108
- throw new Error(`Impossible state: "${ast.name}" not found in "${this.expressionStr}" at location ${identifierStart}`);
1109
+ this.errors.push(new Error(`Impossible state: "${ast.name}" not found in "${this.expressionStr}" at location ${identifierStart}`));
1110
+ return;
1109
1111
  }
1110
1112
  const absoluteStart = this.absoluteOffset + identifierStart;
1111
1113
  const span = new AbsoluteSourceSpan(absoluteStart, absoluteStart + ast.name.length);
@@ -1125,6 +1127,7 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1125
1127
  super();
1126
1128
  this.boundTemplate = boundTemplate;
1127
1129
  this.identifiers = /* @__PURE__ */ new Set();
1130
+ this.errors = [];
1128
1131
  this.targetIdentifierCache = /* @__PURE__ */ new Map();
1129
1132
  this.elementAndTemplateIdentifierCache = /* @__PURE__ */ new Map();
1130
1133
  }
@@ -1136,7 +1139,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1136
1139
  }
1137
1140
  visitElement(element) {
1138
1141
  const elementIdentifier = this.elementOrTemplateToIdentifier(element);
1139
- this.identifiers.add(elementIdentifier);
1142
+ if (elementIdentifier !== null) {
1143
+ this.identifiers.add(elementIdentifier);
1144
+ }
1140
1145
  this.visitAll(element.references);
1141
1146
  this.visitAll(element.inputs);
1142
1147
  this.visitAll(element.attributes);
@@ -1145,7 +1150,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1145
1150
  }
1146
1151
  visitTemplate(template) {
1147
1152
  const templateIdentifier = this.elementOrTemplateToIdentifier(template);
1148
- this.identifiers.add(templateIdentifier);
1153
+ if (templateIdentifier !== null) {
1154
+ this.identifiers.add(templateIdentifier);
1155
+ }
1149
1156
  this.visitAll(template.variables);
1150
1157
  this.visitAll(template.attributes);
1151
1158
  this.visitAll(template.templateAttrs);
@@ -1156,8 +1163,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1156
1163
  if (attribute.valueSpan === void 0) {
1157
1164
  return;
1158
1165
  }
1159
- const identifiers = ExpressionVisitor.getIdentifiers(attribute.value, attribute.valueSpan.toString(), attribute.valueSpan.start.offset, this.boundTemplate, this.targetToIdentifier.bind(this));
1166
+ const { identifiers, errors } = ExpressionVisitor.getIdentifiers(attribute.value, attribute.valueSpan.toString(), attribute.valueSpan.start.offset, this.boundTemplate, this.targetToIdentifier.bind(this));
1160
1167
  identifiers.forEach((id) => this.identifiers.add(id));
1168
+ this.errors.push(...errors);
1161
1169
  }
1162
1170
  visitBoundEvent(attribute) {
1163
1171
  this.visitExpression(attribute.handler);
@@ -1167,31 +1175,40 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1167
1175
  }
1168
1176
  visitReference(reference) {
1169
1177
  const referenceIdentifer = this.targetToIdentifier(reference);
1178
+ if (referenceIdentifer === null) {
1179
+ return;
1180
+ }
1170
1181
  this.identifiers.add(referenceIdentifer);
1171
1182
  }
1172
1183
  visitVariable(variable) {
1173
1184
  const variableIdentifier = this.targetToIdentifier(variable);
1185
+ if (variableIdentifier === null) {
1186
+ return;
1187
+ }
1174
1188
  this.identifiers.add(variableIdentifier);
1175
1189
  }
1176
1190
  elementOrTemplateToIdentifier(node) {
1191
+ var _a;
1177
1192
  if (this.elementAndTemplateIdentifierCache.has(node)) {
1178
1193
  return this.elementAndTemplateIdentifierCache.get(node);
1179
1194
  }
1180
1195
  let name;
1181
1196
  let kind;
1182
1197
  if (node instanceof TmplAstTemplate) {
1183
- name = node.tagName;
1198
+ name = (_a = node.tagName) != null ? _a : "ng-template";
1184
1199
  kind = IdentifierKind.Template;
1185
1200
  } else {
1186
- if (node.name.startsWith(":")) {
1187
- name = node.name.split(":").pop();
1188
- } else {
1189
- name = node.name;
1190
- }
1201
+ name = node.name;
1191
1202
  kind = IdentifierKind.Element;
1192
1203
  }
1204
+ if (name.startsWith(":")) {
1205
+ name = name.split(":").pop();
1206
+ }
1193
1207
  const sourceSpan = node.startSourceSpan;
1194
1208
  const start = this.getStartLocation(name, sourceSpan);
1209
+ if (start === null) {
1210
+ return null;
1211
+ }
1195
1212
  const absoluteSpan = new AbsoluteSourceSpan(start, start + name.length);
1196
1213
  const attributes = node.attributes.map(({ name: name2, sourceSpan: sourceSpan2 }) => {
1197
1214
  return {
@@ -1222,23 +1239,30 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1222
1239
  }
1223
1240
  const { name, sourceSpan } = node;
1224
1241
  const start = this.getStartLocation(name, sourceSpan);
1242
+ if (start === null) {
1243
+ return null;
1244
+ }
1225
1245
  const span = new AbsoluteSourceSpan(start, start + name.length);
1226
1246
  let identifier;
1227
1247
  if (node instanceof TmplAstReference) {
1228
1248
  const refTarget = this.boundTemplate.getReferenceTarget(node);
1229
1249
  let target = null;
1230
1250
  if (refTarget) {
1251
+ let node2 = null;
1252
+ let directive = null;
1231
1253
  if (refTarget instanceof TmplAstElement || refTarget instanceof TmplAstTemplate) {
1232
- target = {
1233
- node: this.elementOrTemplateToIdentifier(refTarget),
1234
- directive: null
1235
- };
1254
+ node2 = this.elementOrTemplateToIdentifier(refTarget);
1236
1255
  } else {
1237
- target = {
1238
- node: this.elementOrTemplateToIdentifier(refTarget.node),
1239
- directive: refTarget.directive.ref.node
1240
- };
1256
+ node2 = this.elementOrTemplateToIdentifier(refTarget.node);
1257
+ directive = refTarget.directive.ref.node;
1241
1258
  }
1259
+ if (node2 === null) {
1260
+ return null;
1261
+ }
1262
+ target = {
1263
+ node: node2,
1264
+ directive
1265
+ };
1242
1266
  }
1243
1267
  identifier = {
1244
1268
  name,
@@ -1259,7 +1283,8 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1259
1283
  getStartLocation(name, context) {
1260
1284
  const localStr = context.toString();
1261
1285
  if (!localStr.includes(name)) {
1262
- throw new Error(`Impossible state: "${name}" not found in "${localStr}"`);
1286
+ this.errors.push(new Error(`Impossible state: "${name}" not found in "${localStr}"`));
1287
+ return null;
1263
1288
  }
1264
1289
  return context.start.offset + localStr.indexOf(name);
1265
1290
  }
@@ -1267,8 +1292,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1267
1292
  if (ast instanceof ASTWithSource && ast.source !== null) {
1268
1293
  const targetToIdentifier = this.targetToIdentifier.bind(this);
1269
1294
  const absoluteOffset = ast.sourceSpan.start;
1270
- const identifiers = ExpressionVisitor.getIdentifiers(ast, ast.source, absoluteOffset, this.boundTemplate, targetToIdentifier);
1295
+ const { identifiers, errors } = ExpressionVisitor.getIdentifiers(ast, ast.source, absoluteOffset, this.boundTemplate, targetToIdentifier);
1271
1296
  identifiers.forEach((id) => this.identifiers.add(id));
1297
+ this.errors.push(...errors);
1272
1298
  }
1273
1299
  }
1274
1300
  };
@@ -1277,7 +1303,7 @@ function getTemplateIdentifiers(boundTemplate) {
1277
1303
  if (boundTemplate.target.template !== void 0) {
1278
1304
  visitor.visitAll(boundTemplate.target.template);
1279
1305
  }
1280
- return visitor.identifiers;
1306
+ return { identifiers: visitor.identifiers, errors: visitor.errors };
1281
1307
  }
1282
1308
 
1283
1309
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
@@ -1299,16 +1325,18 @@ function generateAnalysis(context) {
1299
1325
  } else {
1300
1326
  templateFile = templateMeta.file;
1301
1327
  }
1328
+ const { identifiers, errors } = getTemplateIdentifiers(boundTemplate);
1302
1329
  analysis.set(declaration, {
1303
1330
  name,
1304
1331
  selector,
1305
1332
  file: componentFile,
1306
1333
  template: {
1307
- identifiers: getTemplateIdentifiers(boundTemplate),
1334
+ identifiers,
1308
1335
  usedComponents,
1309
1336
  isInline: templateMeta.isInline,
1310
1337
  file: templateFile
1311
- }
1338
+ },
1339
+ errors
1312
1340
  });
1313
1341
  });
1314
1342
  return analysis;
@@ -2778,11 +2806,11 @@ var Environment = class {
2778
2806
  return translateExpression(ngExpr.expression, this.importManager);
2779
2807
  }
2780
2808
  canReferenceType(ref) {
2781
- const result = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports);
2809
+ const result = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports | ImportFlags.AllowRelativeDtsImports);
2782
2810
  return result.kind === 0;
2783
2811
  }
2784
2812
  referenceType(ref) {
2785
- const ngExpr = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports);
2813
+ const ngExpr = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports | ImportFlags.AllowRelativeDtsImports);
2786
2814
  assertSuccessfulReferenceEmit(ngExpr, this.contextFile, "symbol");
2787
2815
  return translateType(new ExpressionType(ngExpr.expression), this.importManager);
2788
2816
  }
@@ -5815,6 +5843,7 @@ var factory = {
5815
5843
 
5816
5844
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
5817
5845
  import { Binary } from "@angular/compiler";
5846
+ import ts28 from "typescript";
5818
5847
  var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
5819
5848
  constructor() {
5820
5849
  super(...arguments);
@@ -5828,6 +5857,9 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
5828
5857
  return [];
5829
5858
  }
5830
5859
  const typeLeft = symbolLeft.tsType;
5860
+ if (typeLeft.flags & (ts28.TypeFlags.Any | ts28.TypeFlags.Unknown)) {
5861
+ return [];
5862
+ }
5831
5863
  if (typeLeft.getNonNullableType() !== typeLeft)
5832
5864
  return [];
5833
5865
  const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
@@ -5843,7 +5875,8 @@ var factory2 = {
5843
5875
  code: ErrorCode.NULLISH_COALESCING_NOT_NULLABLE,
5844
5876
  name: ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE,
5845
5877
  create: (options) => {
5846
- if (options.strictNullChecks === false) {
5878
+ const strictNullChecks = options.strictNullChecks === void 0 ? !!options.strict : !!options.strictNullChecks;
5879
+ if (!strictNullChecks) {
5847
5880
  return null;
5848
5881
  }
5849
5882
  return new NullishCoalescingNotNullableCheck();
@@ -5851,7 +5884,7 @@ var factory2 = {
5851
5884
  };
5852
5885
 
5853
5886
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
5854
- import ts28 from "typescript";
5887
+ import ts29 from "typescript";
5855
5888
 
5856
5889
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
5857
5890
  var DiagnosticCategoryLabel;
@@ -5899,9 +5932,9 @@ var ExtendedTemplateCheckerImpl = class {
5899
5932
  function diagnosticLabelToCategory(label) {
5900
5933
  switch (label) {
5901
5934
  case DiagnosticCategoryLabel.Warning:
5902
- return ts28.DiagnosticCategory.Warning;
5935
+ return ts29.DiagnosticCategory.Warning;
5903
5936
  case DiagnosticCategoryLabel.Error:
5904
- return ts28.DiagnosticCategory.Error;
5937
+ return ts29.DiagnosticCategory.Error;
5905
5938
  case DiagnosticCategoryLabel.Suppress:
5906
5939
  return null;
5907
5940
  default:
@@ -5992,14 +6025,11 @@ var NgCompiler = class {
5992
6025
  this.constructionDiagnostics = [];
5993
6026
  this.nonTemplateDiagnostics = null;
5994
6027
  this.delegatingPerfRecorder = new DelegatingPerfRecorder(this.perfRecorder);
5995
- if (this.options._extendedTemplateDiagnostics === true && this.options.strictTemplates === false) {
5996
- throw new Error("The '_extendedTemplateDiagnostics' option requires 'strictTemplates' to also be enabled.");
5997
- }
5998
6028
  this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
5999
6029
  this.currentProgram = inputProgram;
6000
6030
  this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
6001
6031
  this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
6002
- const moduleResolutionCache = ts29.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6032
+ const moduleResolutionCache = ts30.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6003
6033
  this.moduleResolver = new ModuleResolver(inputProgram, this.options, this.adapter, moduleResolutionCache);
6004
6034
  this.resourceManager = new AdapterResourceLoader(adapter, this.options);
6005
6035
  this.cycleAnalyzer = new CycleAnalyzer(new ImportGraph(inputProgram.getTypeChecker(), this.delegatingPerfRecorder));
@@ -6055,7 +6085,7 @@ var NgCompiler = class {
6055
6085
  }
6056
6086
  for (const clazz of classesToUpdate) {
6057
6087
  this.compilation.traitCompiler.updateResources(clazz);
6058
- if (!ts29.isClassDeclaration(clazz)) {
6088
+ if (!ts30.isClassDeclaration(clazz)) {
6059
6089
  continue;
6060
6090
  }
6061
6091
  this.compilation.templateTypeChecker.invalidateClass(clazz);
@@ -6463,17 +6493,17 @@ function isAngularCorePackage(program) {
6463
6493
  return false;
6464
6494
  }
6465
6495
  return r3Symbols.statements.some((stmt) => {
6466
- if (!ts29.isVariableStatement(stmt)) {
6496
+ if (!ts30.isVariableStatement(stmt)) {
6467
6497
  return false;
6468
6498
  }
6469
- if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts29.SyntaxKind.ExportKeyword)) {
6499
+ if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts30.SyntaxKind.ExportKeyword)) {
6470
6500
  return false;
6471
6501
  }
6472
6502
  return stmt.declarationList.declarations.some((decl) => {
6473
- if (!ts29.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6503
+ if (!ts30.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6474
6504
  return false;
6475
6505
  }
6476
- if (decl.initializer === void 0 || decl.initializer.kind !== ts29.SyntaxKind.TrueKeyword) {
6506
+ if (decl.initializer === void 0 || decl.initializer.kind !== ts30.SyntaxKind.TrueKeyword) {
6477
6507
  return false;
6478
6508
  }
6479
6509
  return true;
@@ -6487,7 +6517,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
6487
6517
  var _a, _b, _c;
6488
6518
  if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
6489
6519
  yield makeConfigDiagnostic({
6490
- category: ts29.DiagnosticCategory.Error,
6520
+ category: ts30.DiagnosticCategory.Error,
6491
6521
  code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
6492
6522
  messageText: `
6493
6523
  Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
@@ -6506,7 +6536,7 @@ https://angular.io/guide/template-typecheck
6506
6536
  }
6507
6537
  if (options.extendedDiagnostics && options.strictTemplates === false) {
6508
6538
  yield makeConfigDiagnostic({
6509
- category: ts29.DiagnosticCategory.Error,
6539
+ category: ts30.DiagnosticCategory.Error,
6510
6540
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
6511
6541
  messageText: `
6512
6542
  Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
@@ -6523,7 +6553,7 @@ One of the following actions is required:
6523
6553
  const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
6524
6554
  if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
6525
6555
  yield makeConfigDiagnostic({
6526
- category: ts29.DiagnosticCategory.Error,
6556
+ category: ts30.DiagnosticCategory.Error,
6527
6557
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6528
6558
  messageText: `
6529
6559
  Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
@@ -6537,7 +6567,7 @@ ${allowedCategoryLabels.join("\n")}
6537
6567
  for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
6538
6568
  if (!allExtendedDiagnosticNames.includes(checkName)) {
6539
6569
  yield makeConfigDiagnostic({
6540
- category: ts29.DiagnosticCategory.Error,
6570
+ category: ts30.DiagnosticCategory.Error,
6541
6571
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
6542
6572
  messageText: `
6543
6573
  Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
@@ -6549,7 +6579,7 @@ ${allExtendedDiagnosticNames.join("\n")}
6549
6579
  }
6550
6580
  if (!allowedCategoryLabels.includes(category)) {
6551
6581
  yield makeConfigDiagnostic({
6552
- category: ts29.DiagnosticCategory.Error,
6582
+ category: ts30.DiagnosticCategory.Error,
6553
6583
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6554
6584
  messageText: `
6555
6585
  Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
@@ -6579,7 +6609,7 @@ var ReferenceGraphAdapter = class {
6579
6609
  for (const { node } of references) {
6580
6610
  let sourceFile = node.getSourceFile();
6581
6611
  if (sourceFile === void 0) {
6582
- sourceFile = ts29.getOriginalNode(node).getSourceFile();
6612
+ sourceFile = ts30.getOriginalNode(node).getSourceFile();
6583
6613
  }
6584
6614
  if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
6585
6615
  this.graph.add(source, node);
@@ -6618,7 +6648,7 @@ function versionMapFromProgram(program, driver) {
6618
6648
  }
6619
6649
 
6620
6650
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
6621
- import ts30 from "typescript";
6651
+ import ts31 from "typescript";
6622
6652
  var DelegatingCompilerHost2 = class {
6623
6653
  constructor(delegate) {
6624
6654
  this.delegate = delegate;
@@ -6708,7 +6738,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6708
6738
  entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
6709
6739
  if (entryPoint === null) {
6710
6740
  diagnostics.push({
6711
- category: ts30.DiagnosticCategory.Error,
6741
+ category: ts31.DiagnosticCategory.Error,
6712
6742
  code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
6713
6743
  file: void 0,
6714
6744
  start: void 0,
@@ -6748,10 +6778,10 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6748
6778
  return this.fileNameToModuleName !== void 0 ? this : null;
6749
6779
  }
6750
6780
  createCachedResolveModuleNamesFunction() {
6751
- const moduleResolutionCache = ts30.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
6781
+ const moduleResolutionCache = ts31.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
6752
6782
  return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
6753
6783
  return moduleNames.map((moduleName) => {
6754
- const module = ts30.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
6784
+ const module = ts31.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
6755
6785
  return module.resolvedModule;
6756
6786
  });
6757
6787
  };
@@ -6772,7 +6802,7 @@ var NgtscProgram = class {
6772
6802
  if (reuseProgram !== void 0) {
6773
6803
  retagAllTsFiles(reuseProgram);
6774
6804
  }
6775
- this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts31.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
6805
+ this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts32.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
6776
6806
  perfRecorder.phase(PerfPhase.Unaccounted);
6777
6807
  perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
6778
6808
  this.host.postProgramCreationCleanup();
@@ -6971,17 +7001,17 @@ function createProgram({ rootNames, options, host, oldProgram }) {
6971
7001
  }
6972
7002
 
6973
7003
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
6974
- import ts33 from "typescript";
7004
+ import ts34 from "typescript";
6975
7005
 
6976
7006
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
6977
- import ts32 from "typescript";
7007
+ import ts33 from "typescript";
6978
7008
  var GENERATED_FILES = /(.*?)\.(ngfactory|shim\.ngstyle|ngstyle|ngsummary)\.(js|d\.ts|ts)$/;
6979
7009
  function createMessageDiagnostic(messageText) {
6980
7010
  return {
6981
7011
  file: void 0,
6982
7012
  start: void 0,
6983
7013
  length: void 0,
6984
- category: ts32.DiagnosticCategory.Message,
7014
+ category: ts33.DiagnosticCategory.Message,
6985
7015
  messageText,
6986
7016
  code: DEFAULT_ERROR_CODE,
6987
7017
  source: SOURCE
@@ -6990,13 +7020,13 @@ function createMessageDiagnostic(messageText) {
6990
7020
 
6991
7021
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
6992
7022
  var defaultFormatHost = {
6993
- getCurrentDirectory: () => ts33.sys.getCurrentDirectory(),
7023
+ getCurrentDirectory: () => ts34.sys.getCurrentDirectory(),
6994
7024
  getCanonicalFileName: (fileName) => fileName,
6995
- getNewLine: () => ts33.sys.newLine
7025
+ getNewLine: () => ts34.sys.newLine
6996
7026
  };
6997
7027
  function formatDiagnostics(diags, host = defaultFormatHost) {
6998
7028
  if (diags && diags.length) {
6999
- return diags.map((diagnostic) => replaceTsWithNgInErrors(ts33.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7029
+ return diags.map((diagnostic) => replaceTsWithNgInErrors(ts34.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7000
7030
  } else {
7001
7031
  return "";
7002
7032
  }
@@ -7010,10 +7040,10 @@ function calcProjectFileAndBasePath(project, host = getFileSystem()) {
7010
7040
  return { projectFile, basePath };
7011
7041
  }
7012
7042
  function readConfiguration(project, existingOptions, host = getFileSystem()) {
7013
- var _a;
7043
+ var _a, _b;
7014
7044
  try {
7015
7045
  const fs = getFileSystem();
7016
- const readConfigFile = (configFile) => ts33.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7046
+ const readConfigFile = (configFile) => ts34.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7017
7047
  const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
7018
7048
  const { config: config2, error: error2 } = readConfigFile(configFile);
7019
7049
  if (error2) {
@@ -7045,7 +7075,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7045
7075
  basePath
7046
7076
  }, readAngularCompilerOptions(configFileName)), existingOptions);
7047
7077
  const parseConfigHost = createParseConfigHost(host, fs);
7048
- const { options, errors, fileNames: rootNames, projectReferences } = ts33.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7078
+ const { options, errors, fileNames: rootNames, projectReferences } = ts34.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7049
7079
  options.enableIvy = !!((_a = options.enableIvy) != null ? _a : true);
7050
7080
  let emitFlags = EmitFlags.Default;
7051
7081
  if (!(options.skipMetadataEmit || options.flatModuleOutFile)) {
@@ -7057,8 +7087,8 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7057
7087
  return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
7058
7088
  } catch (e) {
7059
7089
  const errors = [{
7060
- category: ts33.DiagnosticCategory.Error,
7061
- messageText: e.stack,
7090
+ category: ts34.DiagnosticCategory.Error,
7091
+ messageText: (_b = e.stack) != null ? _b : e.message,
7062
7092
  file: void 0,
7063
7093
  start: void 0,
7064
7094
  length: void 0,
@@ -7071,7 +7101,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7071
7101
  function createParseConfigHost(host, fs = getFileSystem()) {
7072
7102
  return {
7073
7103
  fileExists: host.exists.bind(host),
7074
- readDirectory: ts33.sys.readDirectory,
7104
+ readDirectory: ts34.sys.readDirectory,
7075
7105
  readFile: host.readFile.bind(host),
7076
7106
  useCaseSensitiveFileNames: fs.isCaseSensitive()
7077
7107
  };
@@ -7091,7 +7121,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7091
7121
  }
7092
7122
  } else {
7093
7123
  const parseConfigHost = createParseConfigHost(host, fs);
7094
- const { resolvedModule } = ts33.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts33.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7124
+ const { resolvedModule } = ts34.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts34.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7095
7125
  if (resolvedModule) {
7096
7126
  return absoluteFrom(resolvedModule.resolvedFileName);
7097
7127
  }
@@ -7101,12 +7131,13 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7101
7131
  function exitCodeFromResult(diags) {
7102
7132
  if (!diags)
7103
7133
  return 0;
7104
- if (diags.every((diag) => diag.category !== ts33.DiagnosticCategory.Error)) {
7134
+ if (diags.every((diag) => diag.category !== ts34.DiagnosticCategory.Error)) {
7105
7135
  return 0;
7106
7136
  }
7107
7137
  return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
7108
7138
  }
7109
7139
  function performCompilation({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics = defaultGatherDiagnostics, customTransformers, emitFlags = EmitFlags.Default, modifiedResourceFiles = null }) {
7140
+ var _a;
7110
7141
  let program;
7111
7142
  let emitResult;
7112
7143
  let allDiagnostics = [];
@@ -7133,8 +7164,8 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
7133
7164
  } catch (e) {
7134
7165
  program = void 0;
7135
7166
  allDiagnostics.push({
7136
- category: ts33.DiagnosticCategory.Error,
7137
- messageText: e.stack,
7167
+ category: ts34.DiagnosticCategory.Error,
7168
+ messageText: (_a = e.stack) != null ? _a : e.message,
7138
7169
  code: UNKNOWN_ERROR_CODE,
7139
7170
  file: void 0,
7140
7171
  start: void 0,
@@ -7160,7 +7191,7 @@ function defaultGatherDiagnostics(program) {
7160
7191
  return allDiagnostics;
7161
7192
  }
7162
7193
  function hasErrors(diags) {
7163
- return diags.some((d) => d.category === ts33.DiagnosticCategory.Error);
7194
+ return diags.some((d) => d.category === ts34.DiagnosticCategory.Error);
7164
7195
  }
7165
7196
 
7166
7197
  export {
@@ -7200,4 +7231,4 @@ export {
7200
7231
  * Use of this source code is governed by an MIT-style license that can be
7201
7232
  * found in the LICENSE file at https://angular.io/license
7202
7233
  */
7203
- //# sourceMappingURL=chunk-3XJZ4ZZZ.js.map
7234
+ //# sourceMappingURL=chunk-PJPAHVUO.js.map