@angular/compiler-cli 18.2.7 → 18.2.9

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.
@@ -10,7 +10,7 @@ import {
10
10
  tryParseSignalInputMapping,
11
11
  tryParseSignalModelMapping,
12
12
  tryParseSignalQueryFromInitializer
13
- } from "./chunk-CJ4RFYFH.js";
13
+ } from "./chunk-APDLWLLW.js";
14
14
  import {
15
15
  ImportManager,
16
16
  ImportedSymbolsTracker,
@@ -18,7 +18,7 @@ import {
18
18
  isAliasImportDeclaration,
19
19
  loadIsReferencedAliasDeclarationPatch,
20
20
  reflectClassMember
21
- } from "./chunk-4SRBDAXN.js";
21
+ } from "./chunk-PGXXZYOH.js";
22
22
 
23
23
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.mjs
24
24
  import ts from "typescript";
@@ -536,4 +536,4 @@ export {
536
536
  * Use of this source code is governed by an MIT-style license that can be
537
537
  * found in the LICENSE file at https://angular.dev/license
538
538
  */
539
- //# sourceMappingURL=chunk-E2AYBPM4.js.map
539
+ //# sourceMappingURL=chunk-26NKUA5V.js.map
@@ -45,7 +45,7 @@ import {
45
45
  translateStatement,
46
46
  translateType,
47
47
  typeNodeToValueExpr
48
- } from "./chunk-4SRBDAXN.js";
48
+ } from "./chunk-PGXXZYOH.js";
49
49
  import {
50
50
  PerfCheckpoint,
51
51
  PerfEvent,
@@ -4066,6 +4066,7 @@ function makeUnknownComponentDeferredImportDiagnostic(ref, rawExpr) {
4066
4066
  }
4067
4067
 
4068
4068
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
4069
+ var IN_PROGRESS_RESOLUTION = {};
4069
4070
  var LocalModuleScopeRegistry = class {
4070
4071
  constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
4071
4072
  this.localReader = localReader;
@@ -4138,8 +4139,12 @@ var LocalModuleScopeRegistry = class {
4138
4139
  }
4139
4140
  getScopeOfModuleReference(ref) {
4140
4141
  if (this.cache.has(ref.node)) {
4141
- return this.cache.get(ref.node);
4142
+ const cachedValue = this.cache.get(ref.node);
4143
+ if (cachedValue !== IN_PROGRESS_RESOLUTION) {
4144
+ return cachedValue;
4145
+ }
4142
4146
  }
4147
+ this.cache.set(ref.node, IN_PROGRESS_RESOLUTION);
4143
4148
  this.sealed = true;
4144
4149
  const ngModule = this.localReader.getNgModuleMetadata(ref);
4145
4150
  if (ngModule === null) {
@@ -4159,10 +4164,12 @@ var LocalModuleScopeRegistry = class {
4159
4164
  for (const decl of ngModule.imports) {
4160
4165
  const importScope = this.getExportedScope(decl, diagnostics, ref.node, "import");
4161
4166
  if (importScope !== null) {
4162
- if (importScope === "invalid" || importScope.exported.isPoisoned) {
4163
- diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawImports, "import"));
4167
+ if (importScope === "invalid" || importScope === "cycle" || importScope.exported.isPoisoned) {
4164
4168
  isPoisoned = true;
4165
- if (importScope === "invalid") {
4169
+ if (importScope !== "cycle") {
4170
+ diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawImports, "import"));
4171
+ }
4172
+ if (importScope === "invalid" || importScope === "cycle") {
4166
4173
  continue;
4167
4174
  }
4168
4175
  }
@@ -4229,10 +4236,12 @@ var LocalModuleScopeRegistry = class {
4229
4236
  }
4230
4237
  for (const decl of ngModule.exports) {
4231
4238
  const exportScope = this.getExportedScope(decl, diagnostics, ref.node, "export");
4232
- if (exportScope === "invalid" || exportScope !== null && exportScope.exported.isPoisoned) {
4233
- diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawExports, "export"));
4239
+ if (exportScope === "invalid" || exportScope === "cycle" || exportScope !== null && exportScope.exported.isPoisoned) {
4234
4240
  isPoisoned = true;
4235
- if (exportScope === "invalid") {
4241
+ if (exportScope !== "cycle") {
4242
+ diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawExports, "export"));
4243
+ }
4244
+ if (exportScope === "invalid" || exportScope === "cycle") {
4236
4245
  continue;
4237
4246
  }
4238
4247
  } else if (exportScope !== null) {
@@ -4300,6 +4309,10 @@ var LocalModuleScopeRegistry = class {
4300
4309
  }
4301
4310
  return this.dependencyScopeReader.resolve(ref);
4302
4311
  } else {
4312
+ if (this.cache.get(ref.node) === IN_PROGRESS_RESOLUTION) {
4313
+ diagnostics.push(makeDiagnostic(type === "import" ? ErrorCode.NGMODULE_INVALID_IMPORT : ErrorCode.NGMODULE_INVALID_EXPORT, identifierOfNode(ref.node) || ref.node, `NgModule "${type}" field contains a cycle`));
4314
+ return "cycle";
4315
+ }
4303
4316
  return this.getScopeOfModuleReference(ref);
4304
4317
  }
4305
4318
  }
@@ -14757,4 +14770,4 @@ export {
14757
14770
  * Use of this source code is governed by an MIT-style license that can be
14758
14771
  * found in the LICENSE file at https://angular.dev/license
14759
14772
  */
14760
- //# sourceMappingURL=chunk-CJ4RFYFH.js.map
14773
+ //# sourceMappingURL=chunk-APDLWLLW.js.map