@angular/compiler-cli 14.1.0-next.4 → 14.1.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 (84) hide show
  1. package/bundles/{chunk-TUMJDJFX.js → chunk-3AXTYLAQ.js} +8 -11
  2. package/bundles/chunk-3AXTYLAQ.js.map +6 -0
  3. package/bundles/{chunk-W6KM7BUM.js → chunk-4JF5LVDW.js} +5 -8
  4. package/bundles/chunk-4JF5LVDW.js.map +6 -0
  5. package/bundles/{chunk-NJ7YQMH6.js → chunk-4N37OTSF.js} +19 -23
  6. package/bundles/chunk-4N37OTSF.js.map +6 -0
  7. package/bundles/{chunk-R4NY3TJC.js → chunk-ACXPVP2W.js} +1 -1
  8. package/bundles/chunk-ACXPVP2W.js.map +6 -0
  9. package/bundles/{chunk-WGBFSDVQ.js → chunk-CYVTLM4Z.js} +2 -6
  10. package/bundles/chunk-CYVTLM4Z.js.map +6 -0
  11. package/bundles/{chunk-LX5Q27EF.js → chunk-E7NQQTT7.js} +1 -1
  12. package/bundles/{chunk-LX5Q27EF.js.map → chunk-E7NQQTT7.js.map} +1 -1
  13. package/bundles/{chunk-QEIAOLAL.js → chunk-FFOD6G3X.js} +5 -9
  14. package/bundles/chunk-FFOD6G3X.js.map +6 -0
  15. package/bundles/{chunk-OLGEBPBY.js → chunk-FM6NPN5V.js} +3 -3
  16. package/bundles/{chunk-OLGEBPBY.js.map → chunk-FM6NPN5V.js.map} +0 -0
  17. package/bundles/{chunk-JXRNV3VY.js → chunk-HE5WHX7C.js} +11 -12
  18. package/bundles/chunk-HE5WHX7C.js.map +6 -0
  19. package/bundles/{chunk-2IMT6JFI.js → chunk-NFCN3OZI.js} +1 -1
  20. package/bundles/chunk-NFCN3OZI.js.map +6 -0
  21. package/bundles/{chunk-T7MYRXIE.js → chunk-TOKOIIBI.js} +2 -2
  22. package/bundles/chunk-TOKOIIBI.js.map +6 -0
  23. package/bundles/{chunk-JRBVL2HZ.js → chunk-TSVR3WF5.js} +8 -4
  24. package/bundles/chunk-TSVR3WF5.js.map +6 -0
  25. package/bundles/{chunk-RUNC33XY.js → chunk-X2UHASWN.js} +58 -54
  26. package/bundles/chunk-X2UHASWN.js.map +6 -0
  27. package/bundles/{chunk-GMSUYBZP.js → chunk-XYNRD7NE.js} +1 -33
  28. package/bundles/{chunk-GMSUYBZP.js.map → chunk-XYNRD7NE.js.map} +0 -0
  29. package/bundles/{chunk-K4XEMWX4.js → chunk-ZBS75WH7.js} +221 -95
  30. package/bundles/chunk-ZBS75WH7.js.map +6 -0
  31. package/bundles/index.js +11 -13
  32. package/bundles/index.js.map +1 -1
  33. package/bundles/linker/babel/index.js +13 -17
  34. package/bundles/linker/babel/index.js.map +1 -1
  35. package/bundles/linker/index.js +5 -5
  36. package/bundles/ngcc/index.js +11 -11
  37. package/bundles/ngcc/main-ngcc.js +12 -12
  38. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +11 -11
  39. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
  40. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +3 -3
  41. package/bundles/private/bazel.js +2 -2
  42. package/bundles/private/localize.js +4 -4
  43. package/bundles/private/migrations.js +6 -6
  44. package/bundles/private/tooling.js +3 -3
  45. package/bundles/src/bin/ng_xi18n.js +9 -12
  46. package/bundles/src/bin/ng_xi18n.js.map +1 -1
  47. package/bundles/src/bin/ngc.js +8 -8
  48. package/bundles_metadata.json +1 -1
  49. package/linker/src/linker_import_generator.d.ts +1 -1
  50. package/ngcc/src/host/commonjs_umd_utils.d.ts +2 -2
  51. package/ngcc/src/host/esm5_host.d.ts +1 -1
  52. package/ngcc/src/packages/build_marker.d.ts +1 -1
  53. package/package.json +2 -2
  54. package/src/ngtsc/core/api/src/public_options.d.ts +1 -1
  55. package/src/ngtsc/core/src/compiler.d.ts +2 -2
  56. package/src/ngtsc/diagnostics/src/error_code.d.ts +33 -3
  57. package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +4 -1
  58. package/src/ngtsc/incremental/src/state.d.ts +1 -1
  59. package/src/ngtsc/indexer/src/context.d.ts +1 -1
  60. package/src/ngtsc/metadata/src/registry.d.ts +2 -1
  61. package/src/ngtsc/perf/src/recorder.d.ts +1 -1
  62. package/src/ngtsc/reflection/src/host.d.ts +1 -1
  63. package/src/ngtsc/scope/src/dependency.d.ts +1 -1
  64. package/src/ngtsc/translator/src/api/ast_factory.d.ts +2 -2
  65. package/src/ngtsc/translator/src/import_manager.d.ts +1 -1
  66. package/src/ngtsc/typecheck/extended/api/extended_template_checker.d.ts +1 -1
  67. package/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.d.ts +10 -0
  68. package/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.d.ts +11 -0
  69. package/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.d.ts +11 -0
  70. package/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.d.ts +11 -0
  71. package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
  72. package/src/transformers/api.d.ts +2 -2
  73. package/bundles/chunk-2IMT6JFI.js.map +0 -6
  74. package/bundles/chunk-JRBVL2HZ.js.map +0 -6
  75. package/bundles/chunk-JXRNV3VY.js.map +0 -6
  76. package/bundles/chunk-K4XEMWX4.js.map +0 -6
  77. package/bundles/chunk-NJ7YQMH6.js.map +0 -6
  78. package/bundles/chunk-QEIAOLAL.js.map +0 -6
  79. package/bundles/chunk-R4NY3TJC.js.map +0 -6
  80. package/bundles/chunk-RUNC33XY.js.map +0 -6
  81. package/bundles/chunk-T7MYRXIE.js.map +0 -6
  82. package/bundles/chunk-TUMJDJFX.js.map +0 -6
  83. package/bundles/chunk-W6KM7BUM.js.map +0 -6
  84. package/bundles/chunk-WGBFSDVQ.js.map +0 -6
@@ -30,11 +30,11 @@ import {
30
30
  aliasTransformFactory,
31
31
  declarationTransformFactory,
32
32
  ivyTransformFactory
33
- } from "./chunk-RUNC33XY.js";
33
+ } from "./chunk-X2UHASWN.js";
34
34
  import {
35
35
  TypeScriptReflectionHost,
36
36
  isNamedClassDeclaration
37
- } from "./chunk-2IMT6JFI.js";
37
+ } from "./chunk-NFCN3OZI.js";
38
38
  import {
39
39
  AbsoluteModuleStrategy,
40
40
  AliasStrategy,
@@ -73,7 +73,7 @@ import {
73
73
  toUnredirectedSourceFile,
74
74
  translateExpression,
75
75
  translateType
76
- } from "./chunk-JRBVL2HZ.js";
76
+ } from "./chunk-TSVR3WF5.js";
77
77
  import {
78
78
  LogicalFileSystem,
79
79
  absoluteFrom,
@@ -84,18 +84,14 @@ import {
84
84
  getSourceFileOrError,
85
85
  join,
86
86
  resolve
87
- } from "./chunk-T7MYRXIE.js";
87
+ } from "./chunk-TOKOIIBI.js";
88
88
  import {
89
89
  ActivePerfRecorder,
90
90
  DelegatingPerfRecorder,
91
91
  PerfCheckpoint,
92
92
  PerfEvent,
93
93
  PerfPhase
94
- } from "./chunk-R4NY3TJC.js";
95
- import {
96
- __spreadProps,
97
- __spreadValues
98
- } from "./chunk-GMSUYBZP.js";
94
+ } from "./chunk-ACXPVP2W.js";
99
95
 
100
96
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
101
97
  var DEFAULT_ERROR_CODE = 100;
@@ -157,7 +153,7 @@ var SymbolKind;
157
153
 
158
154
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
159
155
  import { HtmlParser, MessageBundle } from "@angular/compiler";
160
- import ts33 from "typescript";
156
+ import ts34 from "typescript";
161
157
 
162
158
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
163
159
  import { Xliff, Xliff2, Xmb } from "@angular/compiler";
@@ -262,7 +258,7 @@ function verifySupportedTypeScriptVersion() {
262
258
  }
263
259
 
264
260
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
265
- import ts31 from "typescript";
261
+ import ts32 from "typescript";
266
262
 
267
263
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
268
264
  var CycleAnalyzer = class {
@@ -502,13 +498,13 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
502
498
  if (transitivePath !== null) {
503
499
  visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
504
500
  }
505
- const diagnostic = __spreadProps(__spreadValues({
501
+ const diagnostic = {
506
502
  category: ts5.DiagnosticCategory.Error,
507
503
  code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
508
- file: transitiveReference.getSourceFile()
509
- }, getPosOfDeclaration(transitiveReference)), {
504
+ file: transitiveReference.getSourceFile(),
505
+ ...getPosOfDeclaration(transitiveReference),
510
506
  messageText: `Unsupported private ${descriptor} ${name}. This ${descriptor} is visible to consumers via ${visibleVia}, but is not exported from the top-level library entrypoint.`
511
- });
507
+ };
512
508
  diagnostics.push(diagnostic);
513
509
  }
514
510
  });
@@ -1567,11 +1563,11 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
1567
1563
  this.visitExpression(text.value);
1568
1564
  }
1569
1565
  visitReference(reference) {
1570
- const referenceIdentifer = this.targetToIdentifier(reference);
1571
- if (referenceIdentifer === null) {
1566
+ const referenceIdentifier = this.targetToIdentifier(reference);
1567
+ if (referenceIdentifier === null) {
1572
1568
  return;
1573
1569
  }
1574
- this.identifiers.add(referenceIdentifer);
1570
+ this.identifiers.add(referenceIdentifier);
1575
1571
  }
1576
1572
  visitVariable(variable) {
1577
1573
  const variableIdentifier = this.targetToIdentifier(variable);
@@ -1909,19 +1905,19 @@ var StandaloneComponentScopeReader = class {
1909
1905
  seen.add(ref.node);
1910
1906
  const dirMeta = this.metaReader.getDirectiveMetadata(ref);
1911
1907
  if (dirMeta !== null) {
1912
- dependencies.add(__spreadProps(__spreadValues({}, dirMeta), { ref }));
1908
+ dependencies.add({ ...dirMeta, ref });
1913
1909
  isPoisoned = isPoisoned || dirMeta.isPoisoned || !dirMeta.isStandalone;
1914
1910
  continue;
1915
1911
  }
1916
1912
  const pipeMeta = this.metaReader.getPipeMetadata(ref);
1917
1913
  if (pipeMeta !== null) {
1918
- dependencies.add(__spreadProps(__spreadValues({}, pipeMeta), { ref }));
1914
+ dependencies.add({ ...pipeMeta, ref });
1919
1915
  isPoisoned = isPoisoned || !pipeMeta.isStandalone;
1920
1916
  continue;
1921
1917
  }
1922
1918
  const ngModuleMeta = this.metaReader.getNgModuleMetadata(ref);
1923
1919
  if (ngModuleMeta !== null) {
1924
- dependencies.add(__spreadProps(__spreadValues({}, ngModuleMeta), { ref }));
1920
+ dependencies.add({ ...ngModuleMeta, ref });
1925
1921
  let ngModuleScope;
1926
1922
  if (ref.node.getSourceFile().isDeclarationFile) {
1927
1923
  ngModuleScope = this.dtsModuleReader.resolve(ref);
@@ -2604,7 +2600,7 @@ function requiresInlineTypeCheckBlock(ref, env, usedPipes, reflector) {
2604
2600
  return TcbInliningRequirement.MustInline;
2605
2601
  } else if (!checkIfGenericTypeBoundsCanBeEmitted(ref.node, reflector, env)) {
2606
2602
  return TcbInliningRequirement.ShouldInlineForGenericBounds;
2607
- } else if (Array.from(usedPipes.values()).some((pipeRef) => !env.canReferenceType(pipeRef))) {
2603
+ } else if (usedPipes.some((pipeRef) => !env.canReferenceType(pipeRef))) {
2608
2604
  return TcbInliningRequirement.MustInline;
2609
2605
  } else {
2610
2606
  return TcbInliningRequirement.None;
@@ -2961,10 +2957,11 @@ Consider enabling the 'strictTemplates' option in your tsconfig.json for better
2961
2957
  }
2962
2958
  };
2963
2959
  function makeInlineDiagnostic(templateId, code, node, messageText, relatedInformation) {
2964
- return __spreadProps(__spreadValues({}, makeDiagnostic(code, node, messageText, relatedInformation)), {
2960
+ return {
2961
+ ...makeDiagnostic(code, node, messageText, relatedInformation),
2965
2962
  componentFile: node.getSourceFile(),
2966
2963
  templateId
2967
- });
2964
+ };
2968
2965
  }
2969
2966
 
2970
2967
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
@@ -4534,7 +4531,14 @@ var TypeCheckContextImpl = class {
4534
4531
  boundTarget,
4535
4532
  templateDiagnostics
4536
4533
  });
4537
- const inliningRequirement = requiresInlineTypeCheckBlock(ref, shimData.file, pipes, this.reflector);
4534
+ const usedPipes = [];
4535
+ for (const name of boundTarget.getUsedPipes()) {
4536
+ if (!pipes.has(name)) {
4537
+ continue;
4538
+ }
4539
+ usedPipes.push(pipes.get(name));
4540
+ }
4541
+ const inliningRequirement = requiresInlineTypeCheckBlock(ref, shimData.file, usedPipes, this.reflector);
4538
4542
  if (this.inlining === InliningMode.Error && inliningRequirement === TcbInliningRequirement.MustInline) {
4539
4543
  shimData.oobRecorder.requiresInlineTcb(templateId, ref.node);
4540
4544
  this.perf.eventCount(PerfEvent.SkipGenerateTcbNoInline);
@@ -4857,11 +4861,12 @@ var SymbolBuilder = class {
4857
4861
  return null;
4858
4862
  }
4859
4863
  const directives = this.getDirectivesOfNode(element);
4860
- return __spreadProps(__spreadValues({}, symbolFromDeclaration), {
4864
+ return {
4865
+ ...symbolFromDeclaration,
4861
4866
  kind: SymbolKind.Element,
4862
4867
  directives,
4863
4868
  templateNode: element
4864
- });
4869
+ };
4865
4870
  }
4866
4871
  getDirectivesOfNode(element) {
4867
4872
  var _a;
@@ -4884,14 +4889,15 @@ var SymbolBuilder = class {
4884
4889
  return null;
4885
4890
  }
4886
4891
  const isComponent = (_a2 = meta.isComponent) != null ? _a2 : null;
4887
- const directiveSymbol = __spreadProps(__spreadValues({}, symbol), {
4892
+ const directiveSymbol = {
4893
+ ...symbol,
4888
4894
  tsSymbol: symbol.tsSymbol,
4889
4895
  selector: meta.selector,
4890
4896
  isComponent,
4891
4897
  ngModule,
4892
4898
  kind: SymbolKind.Directive,
4893
4899
  isStructural: meta.isStructural
4894
- });
4900
+ };
4895
4901
  return directiveSymbol;
4896
4902
  }).filter((d) => d !== null);
4897
4903
  }
@@ -5028,11 +5034,12 @@ var SymbolBuilder = class {
5028
5034
  if (target === null) {
5029
5035
  continue;
5030
5036
  }
5031
- bindings.push(__spreadProps(__spreadValues({}, symbolInfo), {
5037
+ bindings.push({
5038
+ ...symbolInfo,
5032
5039
  tsSymbol: symbolInfo.tsSymbol,
5033
5040
  kind: SymbolKind.Binding,
5034
5041
  target
5035
- }));
5042
+ });
5036
5043
  }
5037
5044
  if (bindings.length === 0) {
5038
5045
  return null;
@@ -5149,13 +5156,14 @@ var SymbolBuilder = class {
5149
5156
  if (symbolInfo === null) {
5150
5157
  return null;
5151
5158
  }
5152
- return __spreadProps(__spreadValues({
5153
- kind: SymbolKind.Pipe
5154
- }, symbolInfo), {
5155
- classSymbol: __spreadProps(__spreadValues({}, pipeInstance), {
5159
+ return {
5160
+ kind: SymbolKind.Pipe,
5161
+ ...symbolInfo,
5162
+ classSymbol: {
5163
+ ...pipeInstance,
5156
5164
  tsSymbol: pipeInstance.tsSymbol
5157
- })
5158
- });
5165
+ }
5166
+ };
5159
5167
  }
5160
5168
  getSymbolOfTemplateExpression(expression) {
5161
5169
  if (expression instanceof ASTWithSource3) {
@@ -5187,13 +5195,14 @@ var SymbolBuilder = class {
5187
5195
  if (whenTrueSymbol === null) {
5188
5196
  return null;
5189
5197
  }
5190
- return __spreadProps(__spreadValues({}, whenTrueSymbol), {
5198
+ return {
5199
+ ...whenTrueSymbol,
5191
5200
  kind: SymbolKind.Expression,
5192
5201
  tsType: this.getTypeChecker().getTypeAtLocation(node)
5193
- });
5202
+ };
5194
5203
  } else {
5195
5204
  const symbolInfo = this.getSymbolOfTsNode(node);
5196
- return symbolInfo === null ? null : __spreadProps(__spreadValues({}, symbolInfo), { kind: SymbolKind.Expression });
5205
+ return symbolInfo === null ? null : { ...symbolInfo, kind: SymbolKind.Expression };
5197
5206
  }
5198
5207
  }
5199
5208
  getSymbolOfTsNode(node) {
@@ -5442,9 +5451,10 @@ var TemplateTypeCheckerImpl = class {
5442
5451
  const fileRecord = this.state.get(sfPath);
5443
5452
  const templateId = fileRecord.sourceManager.getTemplateId(clazz);
5444
5453
  const mapping = fileRecord.sourceManager.getSourceMapping(templateId);
5445
- return __spreadProps(__spreadValues({}, makeTemplateDiagnostic(templateId, mapping, sourceSpan, category, ngErrorCode(errorCode), message, relatedInformation)), {
5454
+ return {
5455
+ ...makeTemplateDiagnostic(templateId, mapping, sourceSpan, category, ngErrorCode(errorCode), message, relatedInformation),
5446
5456
  __ngCode: errorCode
5447
- });
5457
+ };
5448
5458
  }
5449
5459
  getOrCreateCompletionEngine(component) {
5450
5460
  if (this.completionCache.has(component)) {
@@ -5885,7 +5895,12 @@ var factory = {
5885
5895
 
5886
5896
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
5887
5897
  import { TmplAstTemplate as TmplAstTemplate4 } from "@angular/compiler";
5888
- var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Set(["ngIf", "ngFor", "ngSwitchCase", "ngSwitchDefault"]);
5898
+ var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
5899
+ ["ngIf", "NgIf"],
5900
+ ["ngFor", "NgForOf"],
5901
+ ["ngSwitchCase", "NgSwitchCase"],
5902
+ ["ngSwitchDefault", "NgSwitchDefault"]
5903
+ ]);
5889
5904
  var MissingControlFlowDirectiveCheck = class extends TemplateCheckWithVisitor {
5890
5905
  constructor() {
5891
5906
  super(...arguments);
@@ -5909,7 +5924,8 @@ var MissingControlFlowDirectiveCheck = class extends TemplateCheckWithVisitor {
5909
5924
  return [];
5910
5925
  }
5911
5926
  const sourceSpan = controlFlowAttr.keySpan || controlFlowAttr.sourceSpan;
5912
- const errorMessage = `The \`*${controlFlowAttr.name}\` directive was used in the template, but the \`CommonModule\` was not imported. Please make sure that the \`CommonModule\` is included into the \`@Component.imports\` array of this component.`;
5927
+ const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(controlFlowAttr.name);
5928
+ const errorMessage = `The \`*${controlFlowAttr.name}\` directive was used in the template, but neither the \`${correspondingImport}\` directive nor the \`CommonModule\` was imported. Please make sure that either the \`${correspondingImport}\` directive or the \`CommonModule\` is included in the \`@Component.imports\` array of this component.`;
5913
5929
  const diagnostic = ctx.makeTemplateDiagnostic(sourceSpan, errorMessage);
5914
5930
  return [diagnostic];
5915
5931
  }
@@ -5922,6 +5938,39 @@ var factory2 = {
5922
5938
  }
5923
5939
  };
5924
5940
 
5941
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
5942
+ import { TmplAstTemplate as TmplAstTemplate5 } from "@angular/compiler";
5943
+ var MissingNgForOfLetCheck = class extends TemplateCheckWithVisitor {
5944
+ constructor() {
5945
+ super(...arguments);
5946
+ this.code = ErrorCode.MISSING_NGFOROF_LET;
5947
+ }
5948
+ visitNode(ctx, component, node) {
5949
+ const isTemplate = node instanceof TmplAstTemplate5;
5950
+ if (!(node instanceof TmplAstTemplate5)) {
5951
+ return [];
5952
+ }
5953
+ if (node.templateAttrs.length === 0) {
5954
+ return [];
5955
+ }
5956
+ const attr = node.templateAttrs.find((x) => x.name === "ngFor");
5957
+ if (attr === void 0) {
5958
+ return [];
5959
+ }
5960
+ if (node.variables.length > 0) {
5961
+ return [];
5962
+ }
5963
+ const errorString = "Your ngFor is missing a value. Did you forget to add the `let` keyword?";
5964
+ const diagnostic = ctx.makeTemplateDiagnostic(attr.sourceSpan, errorString);
5965
+ return [diagnostic];
5966
+ }
5967
+ };
5968
+ var factory3 = {
5969
+ code: ErrorCode.MISSING_NGFOROF_LET,
5970
+ name: ExtendedTemplateDiagnosticName.MISSING_NGFOROF_LET,
5971
+ create: () => new MissingNgForOfLetCheck()
5972
+ };
5973
+
5925
5974
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
5926
5975
  import { Binary } from "@angular/compiler";
5927
5976
  import ts29 from "typescript";
@@ -5955,7 +6004,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
5955
6004
  return [diagnostic];
5956
6005
  }
5957
6006
  };
5958
- var factory3 = {
6007
+ var factory4 = {
5959
6008
  code: ErrorCode.NULLISH_COALESCING_NOT_NULLABLE,
5960
6009
  name: ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE,
5961
6010
  create: (options) => {
@@ -5967,6 +6016,76 @@ var factory3 = {
5967
6016
  }
5968
6017
  };
5969
6018
 
6019
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
6020
+ import { SafeCall as SafeCall2, SafeKeyedRead as SafeKeyedRead2, SafePropertyRead as SafePropertyRead5 } from "@angular/compiler";
6021
+ import ts30 from "typescript";
6022
+ var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
6023
+ constructor() {
6024
+ super(...arguments);
6025
+ this.code = ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE;
6026
+ }
6027
+ visitNode(ctx, component, node) {
6028
+ if (!(node instanceof SafeCall2) && !(node instanceof SafePropertyRead5) && !(node instanceof SafeKeyedRead2))
6029
+ return [];
6030
+ const symbolLeft = ctx.templateTypeChecker.getSymbolOfNode(node.receiver, component);
6031
+ if (symbolLeft === null || symbolLeft.kind !== SymbolKind.Expression) {
6032
+ return [];
6033
+ }
6034
+ const typeLeft = symbolLeft.tsType;
6035
+ if (typeLeft.flags & (ts30.TypeFlags.Any | ts30.TypeFlags.Unknown)) {
6036
+ return [];
6037
+ }
6038
+ if (typeLeft.getNonNullableType() !== typeLeft)
6039
+ return [];
6040
+ const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
6041
+ if (symbol.kind !== SymbolKind.Expression) {
6042
+ return [];
6043
+ }
6044
+ const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
6045
+ if (templateMapping === null) {
6046
+ return [];
6047
+ }
6048
+ const advice = node instanceof SafePropertyRead5 ? `the '?.' operator can be replaced with the '.' operator` : `the '?.' operator can be safely removed`;
6049
+ const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, `The left side of this optional chain operation does not include 'null' or 'undefined' in its type, therefore ${advice}.`);
6050
+ return [diagnostic];
6051
+ }
6052
+ };
6053
+ var factory5 = {
6054
+ code: ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE,
6055
+ name: ExtendedTemplateDiagnosticName.OPTIONAL_CHAIN_NOT_NULLABLE,
6056
+ create: (options) => {
6057
+ const strictNullChecks = options.strictNullChecks === void 0 ? !!options.strict : !!options.strictNullChecks;
6058
+ if (!strictNullChecks) {
6059
+ return null;
6060
+ }
6061
+ return new OptionalChainNotNullableCheck();
6062
+ }
6063
+ };
6064
+
6065
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.mjs
6066
+ import { TmplAstBoundAttribute as TmplAstBoundAttribute3 } from "@angular/compiler";
6067
+ var STYLE_SUFFIXES = ["px", "%", "em"];
6068
+ var SuffixNotSupportedCheck = class extends TemplateCheckWithVisitor {
6069
+ constructor() {
6070
+ super(...arguments);
6071
+ this.code = ErrorCode.SUFFIX_NOT_SUPPORTED;
6072
+ }
6073
+ visitNode(ctx, component, node) {
6074
+ if (!(node instanceof TmplAstBoundAttribute3))
6075
+ return [];
6076
+ if (!node.keySpan.toString().startsWith("attr.") || !STYLE_SUFFIXES.some((suffix) => node.name.endsWith(`.${suffix}`))) {
6077
+ return [];
6078
+ }
6079
+ const diagnostic = ctx.makeTemplateDiagnostic(node.keySpan, `The ${STYLE_SUFFIXES.map((suffix) => `'.${suffix}'`).join(", ")} suffixes are only supported on style bindings.`);
6080
+ return [diagnostic];
6081
+ }
6082
+ };
6083
+ var factory6 = {
6084
+ code: ErrorCode.SUFFIX_NOT_SUPPORTED,
6085
+ name: ExtendedTemplateDiagnosticName.SUFFIX_NOT_SUPPORTED,
6086
+ create: () => new SuffixNotSupportedCheck()
6087
+ };
6088
+
5970
6089
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
5971
6090
  import { TmplAstTextAttribute as TmplAstTextAttribute4 } from "@angular/compiler";
5972
6091
  var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
@@ -6000,14 +6119,14 @@ var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
6000
6119
  return [diagnostic];
6001
6120
  }
6002
6121
  };
6003
- var factory4 = {
6122
+ var factory7 = {
6004
6123
  code: ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING,
6005
6124
  name: ExtendedTemplateDiagnosticName.TEXT_ATTRIBUTE_NOT_BINDING,
6006
6125
  create: () => new TextAttributeNotBindingSpec()
6007
6126
  };
6008
6127
 
6009
6128
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
6010
- import ts30 from "typescript";
6129
+ import ts31 from "typescript";
6011
6130
 
6012
6131
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
6013
6132
  var DiagnosticCategoryLabel;
@@ -6023,12 +6142,12 @@ var ExtendedTemplateCheckerImpl = class {
6023
6142
  var _a, _b, _c, _d, _e;
6024
6143
  this.partialCtx = { templateTypeChecker, typeChecker };
6025
6144
  this.templateChecks = /* @__PURE__ */ new Map();
6026
- for (const factory5 of templateCheckFactories) {
6027
- const category = diagnosticLabelToCategory((_e = (_d = (_b = (_a = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _a.checks) == null ? void 0 : _b[factory5.name]) != null ? _d : (_c = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _c.defaultCategory) != null ? _e : DiagnosticCategoryLabel.Warning);
6145
+ for (const factory8 of templateCheckFactories) {
6146
+ const category = diagnosticLabelToCategory((_e = (_d = (_b = (_a = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _a.checks) == null ? void 0 : _b[factory8.name]) != null ? _d : (_c = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _c.defaultCategory) != null ? _e : DiagnosticCategoryLabel.Warning);
6028
6147
  if (category === null) {
6029
6148
  continue;
6030
6149
  }
6031
- const check = factory5.create(options);
6150
+ const check = factory8.create(options);
6032
6151
  if (check === null) {
6033
6152
  continue;
6034
6153
  }
@@ -6042,11 +6161,12 @@ var ExtendedTemplateCheckerImpl = class {
6042
6161
  }
6043
6162
  const diagnostics = [];
6044
6163
  for (const [check, category] of this.templateChecks.entries()) {
6045
- const ctx = __spreadProps(__spreadValues({}, this.partialCtx), {
6164
+ const ctx = {
6165
+ ...this.partialCtx,
6046
6166
  makeTemplateDiagnostic: (span, message, relatedInformation) => {
6047
6167
  return this.partialCtx.templateTypeChecker.makeTemplateDiagnostic(component, span, category, check.code, message, relatedInformation);
6048
6168
  }
6049
- });
6169
+ };
6050
6170
  diagnostics.push(...check.run(ctx, component, template));
6051
6171
  }
6052
6172
  return diagnostics;
@@ -6055,9 +6175,9 @@ var ExtendedTemplateCheckerImpl = class {
6055
6175
  function diagnosticLabelToCategory(label) {
6056
6176
  switch (label) {
6057
6177
  case DiagnosticCategoryLabel.Warning:
6058
- return ts30.DiagnosticCategory.Warning;
6178
+ return ts31.DiagnosticCategory.Warning;
6059
6179
  case DiagnosticCategoryLabel.Error:
6060
- return ts30.DiagnosticCategory.Error;
6180
+ return ts31.DiagnosticCategory.Error;
6061
6181
  case DiagnosticCategoryLabel.Suppress:
6062
6182
  return null;
6063
6183
  default:
@@ -6072,9 +6192,12 @@ ${value}`);
6072
6192
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
6073
6193
  var ALL_DIAGNOSTIC_FACTORIES = [
6074
6194
  factory,
6075
- factory3,
6195
+ factory4,
6196
+ factory5,
6076
6197
  factory2,
6077
- factory4
6198
+ factory7,
6199
+ factory3,
6200
+ factory6
6078
6201
  ];
6079
6202
 
6080
6203
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
@@ -6154,7 +6277,7 @@ var NgCompiler = class {
6154
6277
  this.currentProgram = inputProgram;
6155
6278
  this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
6156
6279
  this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
6157
- const moduleResolutionCache = ts31.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6280
+ const moduleResolutionCache = ts32.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
6158
6281
  this.moduleResolver = new ModuleResolver(inputProgram, this.options, this.adapter, moduleResolutionCache);
6159
6282
  this.resourceManager = new AdapterResourceLoader(adapter, this.options);
6160
6283
  this.cycleAnalyzer = new CycleAnalyzer(new ImportGraph(inputProgram.getTypeChecker(), this.delegatingPerfRecorder));
@@ -6210,7 +6333,7 @@ var NgCompiler = class {
6210
6333
  }
6211
6334
  for (const clazz of classesToUpdate) {
6212
6335
  this.compilation.traitCompiler.updateResources(clazz);
6213
- if (!ts31.isClassDeclaration(clazz)) {
6336
+ if (!ts32.isClassDeclaration(clazz)) {
6214
6337
  continue;
6215
6338
  }
6216
6339
  this.compilation.templateTypeChecker.invalidateClass(clazz);
@@ -6251,9 +6374,10 @@ var NgCompiler = class {
6251
6374
  addMessageTextDetails(diagnostics) {
6252
6375
  return diagnostics.map((diag) => {
6253
6376
  if (diag.code && COMPILER_ERRORS_WITH_GUIDES.has(ngErrorCode(diag.code))) {
6254
- return __spreadProps(__spreadValues({}, diag), {
6377
+ return {
6378
+ ...diag,
6255
6379
  messageText: diag.messageText + `. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG${ngErrorCode(diag.code)}`
6256
- });
6380
+ };
6257
6381
  }
6258
6382
  return diag;
6259
6383
  });
@@ -6620,17 +6744,17 @@ function isAngularCorePackage(program) {
6620
6744
  return false;
6621
6745
  }
6622
6746
  return r3Symbols.statements.some((stmt) => {
6623
- if (!ts31.isVariableStatement(stmt)) {
6747
+ if (!ts32.isVariableStatement(stmt)) {
6624
6748
  return false;
6625
6749
  }
6626
- if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts31.SyntaxKind.ExportKeyword)) {
6750
+ if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts32.SyntaxKind.ExportKeyword)) {
6627
6751
  return false;
6628
6752
  }
6629
6753
  return stmt.declarationList.declarations.some((decl) => {
6630
- if (!ts31.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6754
+ if (!ts32.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
6631
6755
  return false;
6632
6756
  }
6633
- if (decl.initializer === void 0 || decl.initializer.kind !== ts31.SyntaxKind.TrueKeyword) {
6757
+ if (decl.initializer === void 0 || decl.initializer.kind !== ts32.SyntaxKind.TrueKeyword) {
6634
6758
  return false;
6635
6759
  }
6636
6760
  return true;
@@ -6644,7 +6768,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
6644
6768
  var _a, _b, _c;
6645
6769
  if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
6646
6770
  yield makeConfigDiagnostic({
6647
- category: ts31.DiagnosticCategory.Error,
6771
+ category: ts32.DiagnosticCategory.Error,
6648
6772
  code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
6649
6773
  messageText: `
6650
6774
  Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
@@ -6663,7 +6787,7 @@ https://angular.io/guide/template-typecheck
6663
6787
  }
6664
6788
  if (options.extendedDiagnostics && options.strictTemplates === false) {
6665
6789
  yield makeConfigDiagnostic({
6666
- category: ts31.DiagnosticCategory.Error,
6790
+ category: ts32.DiagnosticCategory.Error,
6667
6791
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
6668
6792
  messageText: `
6669
6793
  Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
@@ -6680,7 +6804,7 @@ One of the following actions is required:
6680
6804
  const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
6681
6805
  if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
6682
6806
  yield makeConfigDiagnostic({
6683
- category: ts31.DiagnosticCategory.Error,
6807
+ category: ts32.DiagnosticCategory.Error,
6684
6808
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6685
6809
  messageText: `
6686
6810
  Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
@@ -6690,11 +6814,11 @@ ${allowedCategoryLabels.join("\n")}
6690
6814
  `.trim()
6691
6815
  });
6692
6816
  }
6693
- const allExtendedDiagnosticNames = ALL_DIAGNOSTIC_FACTORIES.map((factory5) => factory5.name);
6817
+ const allExtendedDiagnosticNames = ALL_DIAGNOSTIC_FACTORIES.map((factory8) => factory8.name);
6694
6818
  for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
6695
6819
  if (!allExtendedDiagnosticNames.includes(checkName)) {
6696
6820
  yield makeConfigDiagnostic({
6697
- category: ts31.DiagnosticCategory.Error,
6821
+ category: ts32.DiagnosticCategory.Error,
6698
6822
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
6699
6823
  messageText: `
6700
6824
  Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
@@ -6706,7 +6830,7 @@ ${allExtendedDiagnosticNames.join("\n")}
6706
6830
  }
6707
6831
  if (!allowedCategoryLabels.includes(category)) {
6708
6832
  yield makeConfigDiagnostic({
6709
- category: ts31.DiagnosticCategory.Error,
6833
+ category: ts32.DiagnosticCategory.Error,
6710
6834
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
6711
6835
  messageText: `
6712
6836
  Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
@@ -6736,7 +6860,7 @@ var ReferenceGraphAdapter = class {
6736
6860
  for (const { node } of references) {
6737
6861
  let sourceFile = node.getSourceFile();
6738
6862
  if (sourceFile === void 0) {
6739
- sourceFile = ts31.getOriginalNode(node).getSourceFile();
6863
+ sourceFile = ts32.getOriginalNode(node).getSourceFile();
6740
6864
  }
6741
6865
  if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
6742
6866
  this.graph.add(source, node);
@@ -6775,7 +6899,7 @@ function versionMapFromProgram(program, driver) {
6775
6899
  }
6776
6900
 
6777
6901
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
6778
- import ts32 from "typescript";
6902
+ import ts33 from "typescript";
6779
6903
  var DelegatingCompilerHost2 = class {
6780
6904
  constructor(delegate) {
6781
6905
  this.delegate = delegate;
@@ -6865,7 +6989,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6865
6989
  entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
6866
6990
  if (entryPoint === null) {
6867
6991
  diagnostics.push({
6868
- category: ts32.DiagnosticCategory.Error,
6992
+ category: ts33.DiagnosticCategory.Error,
6869
6993
  code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
6870
6994
  file: void 0,
6871
6995
  start: void 0,
@@ -6908,10 +7032,10 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
6908
7032
  return this.fileNameToModuleName !== void 0 ? this : null;
6909
7033
  }
6910
7034
  createCachedResolveModuleNamesFunction() {
6911
- const moduleResolutionCache = ts32.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
7035
+ const moduleResolutionCache = ts33.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
6912
7036
  return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
6913
7037
  return moduleNames.map((moduleName) => {
6914
- const module = ts32.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
7038
+ const module = ts33.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
6915
7039
  return module.resolvedModule;
6916
7040
  });
6917
7041
  };
@@ -6932,7 +7056,7 @@ var NgtscProgram = class {
6932
7056
  if (reuseProgram !== void 0) {
6933
7057
  retagAllTsFiles(reuseProgram);
6934
7058
  }
6935
- this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts33.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
7059
+ this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts34.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
6936
7060
  perfRecorder.phase(PerfPhase.Unaccounted);
6937
7061
  perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
6938
7062
  this.host.postProgramCreationCleanup();
@@ -7133,17 +7257,17 @@ function createProgram({ rootNames, options, host, oldProgram }) {
7133
7257
  }
7134
7258
 
7135
7259
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
7136
- import ts35 from "typescript";
7260
+ import ts36 from "typescript";
7137
7261
 
7138
7262
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
7139
- import ts34 from "typescript";
7263
+ import ts35 from "typescript";
7140
7264
  var GENERATED_FILES = /(.*?)\.(ngfactory|shim\.ngstyle|ngstyle|ngsummary)\.(js|d\.ts|ts)$/;
7141
7265
  function createMessageDiagnostic(messageText) {
7142
7266
  return {
7143
7267
  file: void 0,
7144
7268
  start: void 0,
7145
7269
  length: void 0,
7146
- category: ts34.DiagnosticCategory.Message,
7270
+ category: ts35.DiagnosticCategory.Message,
7147
7271
  messageText,
7148
7272
  code: DEFAULT_ERROR_CODE,
7149
7273
  source: SOURCE
@@ -7152,13 +7276,13 @@ function createMessageDiagnostic(messageText) {
7152
7276
 
7153
7277
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
7154
7278
  var defaultFormatHost = {
7155
- getCurrentDirectory: () => ts35.sys.getCurrentDirectory(),
7279
+ getCurrentDirectory: () => ts36.sys.getCurrentDirectory(),
7156
7280
  getCanonicalFileName: (fileName) => fileName,
7157
- getNewLine: () => ts35.sys.newLine
7281
+ getNewLine: () => ts36.sys.newLine
7158
7282
  };
7159
7283
  function formatDiagnostics(diags, host = defaultFormatHost) {
7160
7284
  if (diags && diags.length) {
7161
- return diags.map((diagnostic) => replaceTsWithNgInErrors(ts35.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7285
+ return diags.map((diagnostic) => replaceTsWithNgInErrors(ts36.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
7162
7286
  } else {
7163
7287
  return "";
7164
7288
  }
@@ -7175,13 +7299,13 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7175
7299
  var _a, _b;
7176
7300
  try {
7177
7301
  const fs = getFileSystem();
7178
- const readConfigFile = (configFile) => ts35.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7302
+ const readConfigFile = (configFile) => ts36.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
7179
7303
  const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
7180
7304
  const { config: config2, error: error2 } = readConfigFile(configFile);
7181
7305
  if (error2) {
7182
7306
  return parentOptions;
7183
7307
  }
7184
- const existingNgCompilerOptions = __spreadValues(__spreadValues({}, config2.angularCompilerOptions), parentOptions);
7308
+ const existingNgCompilerOptions = { ...config2.angularCompilerOptions, ...parentOptions };
7185
7309
  if (config2.extends && typeof config2.extends === "string") {
7186
7310
  const extendedConfigPath = getExtendedConfigPath(configFile, config2.extends, host, fs);
7187
7311
  if (extendedConfigPath !== null) {
@@ -7202,12 +7326,14 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7202
7326
  emitFlags: EmitFlags.Default
7203
7327
  };
7204
7328
  }
7205
- const existingCompilerOptions = __spreadValues(__spreadValues({
7329
+ const existingCompilerOptions = {
7206
7330
  genDir: basePath,
7207
- basePath
7208
- }, readAngularCompilerOptions(configFileName)), existingOptions);
7331
+ basePath,
7332
+ ...readAngularCompilerOptions(configFileName),
7333
+ ...existingOptions
7334
+ };
7209
7335
  const parseConfigHost = createParseConfigHost(host, fs);
7210
- const { options, errors, fileNames: rootNames, projectReferences } = ts35.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7336
+ const { options, errors, fileNames: rootNames, projectReferences } = ts36.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
7211
7337
  options.enableIvy = !!((_a = options.enableIvy) != null ? _a : true);
7212
7338
  let emitFlags = EmitFlags.Default;
7213
7339
  if (!(options.skipMetadataEmit || options.flatModuleOutFile)) {
@@ -7219,7 +7345,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7219
7345
  return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
7220
7346
  } catch (e) {
7221
7347
  const errors = [{
7222
- category: ts35.DiagnosticCategory.Error,
7348
+ category: ts36.DiagnosticCategory.Error,
7223
7349
  messageText: (_b = e.stack) != null ? _b : e.message,
7224
7350
  file: void 0,
7225
7351
  start: void 0,
@@ -7233,7 +7359,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
7233
7359
  function createParseConfigHost(host, fs = getFileSystem()) {
7234
7360
  return {
7235
7361
  fileExists: host.exists.bind(host),
7236
- readDirectory: ts35.sys.readDirectory,
7362
+ readDirectory: ts36.sys.readDirectory,
7237
7363
  readFile: host.readFile.bind(host),
7238
7364
  useCaseSensitiveFileNames: fs.isCaseSensitive()
7239
7365
  };
@@ -7253,7 +7379,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7253
7379
  }
7254
7380
  } else {
7255
7381
  const parseConfigHost = createParseConfigHost(host, fs);
7256
- const { resolvedModule } = ts35.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts35.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7382
+ const { resolvedModule } = ts36.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts36.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
7257
7383
  if (resolvedModule) {
7258
7384
  return absoluteFrom(resolvedModule.resolvedFileName);
7259
7385
  }
@@ -7263,7 +7389,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
7263
7389
  function exitCodeFromResult(diags) {
7264
7390
  if (!diags)
7265
7391
  return 0;
7266
- if (diags.every((diag) => diag.category !== ts35.DiagnosticCategory.Error)) {
7392
+ if (diags.every((diag) => diag.category !== ts36.DiagnosticCategory.Error)) {
7267
7393
  return 0;
7268
7394
  }
7269
7395
  return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
@@ -7296,7 +7422,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
7296
7422
  } catch (e) {
7297
7423
  program = void 0;
7298
7424
  allDiagnostics.push({
7299
- category: ts35.DiagnosticCategory.Error,
7425
+ category: ts36.DiagnosticCategory.Error,
7300
7426
  messageText: (_a = e.stack) != null ? _a : e.message,
7301
7427
  code: UNKNOWN_ERROR_CODE,
7302
7428
  file: void 0,
@@ -7323,7 +7449,7 @@ function defaultGatherDiagnostics(program) {
7323
7449
  return allDiagnostics;
7324
7450
  }
7325
7451
  function hasErrors(diags) {
7326
- return diags.some((d) => d.category === ts35.DiagnosticCategory.Error);
7452
+ return diags.some((d) => d.category === ts36.DiagnosticCategory.Error);
7327
7453
  }
7328
7454
 
7329
7455
  export {
@@ -7363,4 +7489,4 @@ export {
7363
7489
  * found in the LICENSE file at https://angular.io/license
7364
7490
  */
7365
7491
  // Closure Compiler ignores @suppress and similar if the comment contains @license.
7366
- //# sourceMappingURL=chunk-K4XEMWX4.js.map
7492
+ //# sourceMappingURL=chunk-ZBS75WH7.js.map