@angular/compiler-cli 14.0.0-next.0 → 14.0.0-next.1

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-XHMJ6POQ.js → chunk-4KQK6VRA.js} +6 -6
  2. package/bundles/{chunk-XHMJ6POQ.js.map → chunk-4KQK6VRA.js.map} +1 -1
  3. package/bundles/{chunk-UESD6FVI.js → chunk-ALKVYGAK.js} +5 -5
  4. package/bundles/{chunk-UESD6FVI.js.map → chunk-ALKVYGAK.js.map} +0 -0
  5. package/bundles/{chunk-LMCFGUUV.js → chunk-C44PYKVA.js} +3 -3
  6. package/bundles/{chunk-LMCFGUUV.js.map → chunk-C44PYKVA.js.map} +0 -0
  7. package/bundles/{chunk-XDGI7TS4.js → chunk-CKFLH7L7.js} +98 -73
  8. package/bundles/chunk-CKFLH7L7.js.map +6 -0
  9. package/bundles/{chunk-676MI6WZ.js → chunk-FXU7FMZC.js} +5 -5
  10. package/bundles/{chunk-676MI6WZ.js.map → chunk-FXU7FMZC.js.map} +1 -1
  11. package/bundles/{chunk-5CHRTEXL.js → chunk-JMLPLN5C.js} +4 -4
  12. package/bundles/{chunk-5CHRTEXL.js.map → chunk-JMLPLN5C.js.map} +1 -1
  13. package/bundles/{chunk-ADHVDA4A.js → chunk-K2Z44JHH.js} +1 -1
  14. package/bundles/{chunk-ADHVDA4A.js.map → chunk-K2Z44JHH.js.map} +1 -1
  15. package/bundles/{chunk-OFPFDCGQ.js → chunk-PKOZO2VO.js} +2 -2
  16. package/bundles/{chunk-OFPFDCGQ.js.map → chunk-PKOZO2VO.js.map} +0 -0
  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-QBU7RUKB.js.map +0 -6
  43. package/bundles/chunk-XDGI7TS4.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,10 +1175,16 @@ 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) {
@@ -1192,6 +1206,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1192
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;
1258
+ }
1259
+ if (node2 === null) {
1260
+ return null;
1241
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
  }
@@ -3177,9 +3205,6 @@ var AstTranslator = class {
3177
3205
  addParseSpanInfo(node, ast.sourceSpan);
3178
3206
  return node;
3179
3207
  }
3180
- visitQuote(ast) {
3181
- return NULL_AS_ANY;
3182
- }
3183
3208
  visitSafePropertyRead(ast) {
3184
3209
  let node;
3185
3210
  const receiver = wrapForDiagnostics(this.translate(ast.receiver));
@@ -3320,9 +3345,6 @@ var VeSafeLhsInferenceBugDetector = class {
3320
3345
  visitPropertyWrite(ast) {
3321
3346
  return false;
3322
3347
  }
3323
- visitQuote(ast) {
3324
- return false;
3325
- }
3326
3348
  visitSafePropertyRead(ast) {
3327
3349
  return false;
3328
3350
  }
@@ -5815,6 +5837,7 @@ var factory = {
5815
5837
 
5816
5838
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
5817
5839
  import { Binary } from "@angular/compiler";
5840
+ import ts28 from "typescript";
5818
5841
  var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
5819
5842
  constructor() {
5820
5843
  super(...arguments);
@@ -5828,6 +5851,9 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
5828
5851
  return [];
5829
5852
  }
5830
5853
  const typeLeft = symbolLeft.tsType;
5854
+ if (typeLeft.flags & (ts28.TypeFlags.Any | ts28.TypeFlags.Unknown)) {
5855
+ return [];
5856
+ }
5831
5857
  if (typeLeft.getNonNullableType() !== typeLeft)
5832
5858
  return [];
5833
5859
  const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
@@ -5843,7 +5869,8 @@ var factory2 = {
5843
5869
  code: ErrorCode.NULLISH_COALESCING_NOT_NULLABLE,
5844
5870
  name: ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE,
5845
5871
  create: (options) => {
5846
- if (options.strictNullChecks === false) {
5872
+ const strictNullChecks = options.strictNullChecks === void 0 ? !!options.strict : !!options.strictNullChecks;
5873
+ if (!strictNullChecks) {
5847
5874
  return null;
5848
5875
  }
5849
5876
  return new NullishCoalescingNotNullableCheck();
@@ -5851,7 +5878,7 @@ var factory2 = {
5851
5878
  };
5852
5879
 
5853
5880
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
5854
- import ts28 from "typescript";
5881
+ import ts29 from "typescript";
5855
5882
 
5856
5883
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
5857
5884
  var DiagnosticCategoryLabel;
@@ -5899,9 +5926,9 @@ var ExtendedTemplateCheckerImpl = class {
5899
5926
  function diagnosticLabelToCategory(label) {
5900
5927
  switch (label) {
5901
5928
  case DiagnosticCategoryLabel.Warning:
5902
- return ts28.DiagnosticCategory.Warning;
5929
+ return ts29.DiagnosticCategory.Warning;
5903
5930
  case DiagnosticCategoryLabel.Error:
5904
- return ts28.DiagnosticCategory.Error;
5931
+ return ts29.DiagnosticCategory.Error;
5905
5932
  case DiagnosticCategoryLabel.Suppress:
5906
5933
  return null;
5907
5934
  default:
@@ -5992,14 +6019,11 @@ var NgCompiler = class {
5992
6019
  this.constructionDiagnostics = [];
5993
6020
  this.nonTemplateDiagnostics = null;
5994
6021
  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
6022
  this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
5999
6023
  this.currentProgram = inputProgram;
6000
6024
  this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
6001
6025
  this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
6002
- const moduleResolutionCache = ts29.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6026
+ const moduleResolutionCache = ts30.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6003
6027
  this.moduleResolver = new ModuleResolver(inputProgram, this.options, this.adapter, moduleResolutionCache);
6004
6028
  this.resourceManager = new AdapterResourceLoader(adapter, this.options);
6005
6029
  this.cycleAnalyzer = new CycleAnalyzer(new ImportGraph(inputProgram.getTypeChecker(), this.delegatingPerfRecorder));
@@ -6055,7 +6079,7 @@ var NgCompiler = class {
6055
6079
  }
6056
6080
  for (const clazz of classesToUpdate) {
6057
6081
  this.compilation.traitCompiler.updateResources(clazz);
6058
- if (!ts29.isClassDeclaration(clazz)) {
6082
+ if (!ts30.isClassDeclaration(clazz)) {
6059
6083
  continue;
6060
6084
  }
6061
6085
  this.compilation.templateTypeChecker.invalidateClass(clazz);
@@ -6463,17 +6487,17 @@ function isAngularCorePackage(program) {
6463
6487
  return false;
6464
6488
  }
6465
6489
  return r3Symbols.statements.some((stmt) => {
6466
- if (!ts29.isVariableStatement(stmt)) {
6490
+ if (!ts30.isVariableStatement(stmt)) {
6467
6491
  return false;
6468
6492
  }
6469
- if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts29.SyntaxKind.ExportKeyword)) {
6493
+ if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts30.SyntaxKind.ExportKeyword)) {
6470
6494
  return false;
6471
6495
  }
6472
6496
  return stmt.declarationList.declarations.some((decl) => {
6473
- if (!ts29.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6497
+ if (!ts30.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6474
6498
  return false;
6475
6499
  }
6476
- if (decl.initializer === void 0 || decl.initializer.kind !== ts29.SyntaxKind.TrueKeyword) {
6500
+ if (decl.initializer === void 0 || decl.initializer.kind !== ts30.SyntaxKind.TrueKeyword) {
6477
6501
  return false;
6478
6502
  }
6479
6503
  return true;
@@ -6487,7 +6511,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
6487
6511
  var _a, _b, _c;
6488
6512
  if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
6489
6513
  yield makeConfigDiagnostic({
6490
- category: ts29.DiagnosticCategory.Error,
6514
+ category: ts30.DiagnosticCategory.Error,
6491
6515
  code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
6492
6516
  messageText: `
6493
6517
  Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
@@ -6506,7 +6530,7 @@ https://angular.io/guide/template-typecheck
6506
6530
  }
6507
6531
  if (options.extendedDiagnostics && options.strictTemplates === false) {
6508
6532
  yield makeConfigDiagnostic({
6509
- category: ts29.DiagnosticCategory.Error,
6533
+ category: ts30.DiagnosticCategory.Error,
6510
6534
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
6511
6535
  messageText: `
6512
6536
  Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
@@ -6523,7 +6547,7 @@ One of the following actions is required:
6523
6547
  const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
6524
6548
  if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
6525
6549
  yield makeConfigDiagnostic({
6526
- category: ts29.DiagnosticCategory.Error,
6550
+ category: ts30.DiagnosticCategory.Error,
6527
6551
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6528
6552
  messageText: `
6529
6553
  Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
@@ -6537,7 +6561,7 @@ ${allowedCategoryLabels.join("\n")}
6537
6561
  for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
6538
6562
  if (!allExtendedDiagnosticNames.includes(checkName)) {
6539
6563
  yield makeConfigDiagnostic({
6540
- category: ts29.DiagnosticCategory.Error,
6564
+ category: ts30.DiagnosticCategory.Error,
6541
6565
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
6542
6566
  messageText: `
6543
6567
  Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
@@ -6549,7 +6573,7 @@ ${allExtendedDiagnosticNames.join("\n")}
6549
6573
  }
6550
6574
  if (!allowedCategoryLabels.includes(category)) {
6551
6575
  yield makeConfigDiagnostic({
6552
- category: ts29.DiagnosticCategory.Error,
6576
+ category: ts30.DiagnosticCategory.Error,
6553
6577
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6554
6578
  messageText: `
6555
6579
  Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
@@ -6579,7 +6603,7 @@ var ReferenceGraphAdapter = class {
6579
6603
  for (const { node } of references) {
6580
6604
  let sourceFile = node.getSourceFile();
6581
6605
  if (sourceFile === void 0) {
6582
- sourceFile = ts29.getOriginalNode(node).getSourceFile();
6606
+ sourceFile = ts30.getOriginalNode(node).getSourceFile();
6583
6607
  }
6584
6608
  if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
6585
6609
  this.graph.add(source, node);
@@ -6618,7 +6642,7 @@ function versionMapFromProgram(program, driver) {
6618
6642
  }
6619
6643
 
6620
6644
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
6621
- import ts30 from "typescript";
6645
+ import ts31 from "typescript";
6622
6646
  var DelegatingCompilerHost2 = class {
6623
6647
  constructor(delegate) {
6624
6648
  this.delegate = delegate;
@@ -6708,7 +6732,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6708
6732
  entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
6709
6733
  if (entryPoint === null) {
6710
6734
  diagnostics.push({
6711
- category: ts30.DiagnosticCategory.Error,
6735
+ category: ts31.DiagnosticCategory.Error,
6712
6736
  code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
6713
6737
  file: void 0,
6714
6738
  start: void 0,
@@ -6748,10 +6772,10 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6748
6772
  return this.fileNameToModuleName !== void 0 ? this : null;
6749
6773
  }
6750
6774
  createCachedResolveModuleNamesFunction() {
6751
- const moduleResolutionCache = ts30.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
6775
+ const moduleResolutionCache = ts31.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
6752
6776
  return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
6753
6777
  return moduleNames.map((moduleName) => {
6754
- const module = ts30.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
6778
+ const module = ts31.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
6755
6779
  return module.resolvedModule;
6756
6780
  });
6757
6781
  };
@@ -6772,7 +6796,7 @@ var NgtscProgram = class {
6772
6796
  if (reuseProgram !== void 0) {
6773
6797
  retagAllTsFiles(reuseProgram);
6774
6798
  }
6775
- this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts31.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
6799
+ this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts32.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
6776
6800
  perfRecorder.phase(PerfPhase.Unaccounted);
6777
6801
  perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
6778
6802
  this.host.postProgramCreationCleanup();
@@ -6971,17 +6995,17 @@ function createProgram({ rootNames, options, host, oldProgram }) {
6971
6995
  }
6972
6996
 
6973
6997
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
6974
- import ts33 from "typescript";
6998
+ import ts34 from "typescript";
6975
6999
 
6976
7000
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
6977
- import ts32 from "typescript";
7001
+ import ts33 from "typescript";
6978
7002
  var GENERATED_FILES = /(.*?)\.(ngfactory|shim\.ngstyle|ngstyle|ngsummary)\.(js|d\.ts|ts)$/;
6979
7003
  function createMessageDiagnostic(messageText) {
6980
7004
  return {
6981
7005
  file: void 0,
6982
7006
  start: void 0,
6983
7007
  length: void 0,
6984
- category: ts32.DiagnosticCategory.Message,
7008
+ category: ts33.DiagnosticCategory.Message,
6985
7009
  messageText,
6986
7010
  code: DEFAULT_ERROR_CODE,
6987
7011
  source: SOURCE
@@ -6990,13 +7014,13 @@ function createMessageDiagnostic(messageText) {
6990
7014
 
6991
7015
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
6992
7016
  var defaultFormatHost = {
6993
- getCurrentDirectory: () => ts33.sys.getCurrentDirectory(),
7017
+ getCurrentDirectory: () => ts34.sys.getCurrentDirectory(),
6994
7018
  getCanonicalFileName: (fileName) => fileName,
6995
- getNewLine: () => ts33.sys.newLine
7019
+ getNewLine: () => ts34.sys.newLine
6996
7020
  };
6997
7021
  function formatDiagnostics(diags, host = defaultFormatHost) {
6998
7022
  if (diags && diags.length) {
6999
- return diags.map((diagnostic) => replaceTsWithNgInErrors(ts33.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7023
+ return diags.map((diagnostic) => replaceTsWithNgInErrors(ts34.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7000
7024
  } else {
7001
7025
  return "";
7002
7026
  }
@@ -7010,10 +7034,10 @@ function calcProjectFileAndBasePath(project, host = getFileSystem()) {
7010
7034
  return { projectFile, basePath };
7011
7035
  }
7012
7036
  function readConfiguration(project, existingOptions, host = getFileSystem()) {
7013
- var _a;
7037
+ var _a, _b;
7014
7038
  try {
7015
7039
  const fs = getFileSystem();
7016
- const readConfigFile = (configFile) => ts33.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7040
+ const readConfigFile = (configFile) => ts34.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7017
7041
  const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
7018
7042
  const { config: config2, error: error2 } = readConfigFile(configFile);
7019
7043
  if (error2) {
@@ -7045,7 +7069,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7045
7069
  basePath
7046
7070
  }, readAngularCompilerOptions(configFileName)), existingOptions);
7047
7071
  const parseConfigHost = createParseConfigHost(host, fs);
7048
- const { options, errors, fileNames: rootNames, projectReferences } = ts33.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7072
+ const { options, errors, fileNames: rootNames, projectReferences } = ts34.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7049
7073
  options.enableIvy = !!((_a = options.enableIvy) != null ? _a : true);
7050
7074
  let emitFlags = EmitFlags.Default;
7051
7075
  if (!(options.skipMetadataEmit || options.flatModuleOutFile)) {
@@ -7057,8 +7081,8 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7057
7081
  return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
7058
7082
  } catch (e) {
7059
7083
  const errors = [{
7060
- category: ts33.DiagnosticCategory.Error,
7061
- messageText: e.stack,
7084
+ category: ts34.DiagnosticCategory.Error,
7085
+ messageText: (_b = e.stack) != null ? _b : e.message,
7062
7086
  file: void 0,
7063
7087
  start: void 0,
7064
7088
  length: void 0,
@@ -7071,7 +7095,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7071
7095
  function createParseConfigHost(host, fs = getFileSystem()) {
7072
7096
  return {
7073
7097
  fileExists: host.exists.bind(host),
7074
- readDirectory: ts33.sys.readDirectory,
7098
+ readDirectory: ts34.sys.readDirectory,
7075
7099
  readFile: host.readFile.bind(host),
7076
7100
  useCaseSensitiveFileNames: fs.isCaseSensitive()
7077
7101
  };
@@ -7091,7 +7115,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7091
7115
  }
7092
7116
  } else {
7093
7117
  const parseConfigHost = createParseConfigHost(host, fs);
7094
- const { resolvedModule } = ts33.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts33.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7118
+ const { resolvedModule } = ts34.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts34.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7095
7119
  if (resolvedModule) {
7096
7120
  return absoluteFrom(resolvedModule.resolvedFileName);
7097
7121
  }
@@ -7101,12 +7125,13 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7101
7125
  function exitCodeFromResult(diags) {
7102
7126
  if (!diags)
7103
7127
  return 0;
7104
- if (diags.every((diag) => diag.category !== ts33.DiagnosticCategory.Error)) {
7128
+ if (diags.every((diag) => diag.category !== ts34.DiagnosticCategory.Error)) {
7105
7129
  return 0;
7106
7130
  }
7107
7131
  return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
7108
7132
  }
7109
7133
  function performCompilation({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics = defaultGatherDiagnostics, customTransformers, emitFlags = EmitFlags.Default, modifiedResourceFiles = null }) {
7134
+ var _a;
7110
7135
  let program;
7111
7136
  let emitResult;
7112
7137
  let allDiagnostics = [];
@@ -7133,8 +7158,8 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
7133
7158
  } catch (e) {
7134
7159
  program = void 0;
7135
7160
  allDiagnostics.push({
7136
- category: ts33.DiagnosticCategory.Error,
7137
- messageText: e.stack,
7161
+ category: ts34.DiagnosticCategory.Error,
7162
+ messageText: (_a = e.stack) != null ? _a : e.message,
7138
7163
  code: UNKNOWN_ERROR_CODE,
7139
7164
  file: void 0,
7140
7165
  start: void 0,
@@ -7160,7 +7185,7 @@ function defaultGatherDiagnostics(program) {
7160
7185
  return allDiagnostics;
7161
7186
  }
7162
7187
  function hasErrors(diags) {
7163
- return diags.some((d) => d.category === ts33.DiagnosticCategory.Error);
7188
+ return diags.some((d) => d.category === ts34.DiagnosticCategory.Error);
7164
7189
  }
7165
7190
 
7166
7191
  export {
@@ -7200,4 +7225,4 @@ export {
7200
7225
  * Use of this source code is governed by an MIT-style license that can be
7201
7226
  * found in the LICENSE file at https://angular.io/license
7202
7227
  */
7203
- //# sourceMappingURL=chunk-XDGI7TS4.js.map
7228
+ //# sourceMappingURL=chunk-CKFLH7L7.js.map