@angular/core 17.3.6 → 17.3.7

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.
@@ -29342,7 +29342,7 @@ function publishFacade(global) {
29342
29342
  }
29343
29343
 
29344
29344
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
29345
- var VERSION2 = new Version("17.3.6");
29345
+ var VERSION2 = new Version("17.3.7");
29346
29346
 
29347
29347
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
29348
29348
  var _I18N_ATTR = "i18n";
@@ -30408,7 +30408,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
30408
30408
  function compileDeclareClassMetadata(metadata) {
30409
30409
  const definitionMap = new DefinitionMap();
30410
30410
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
30411
- definitionMap.set("version", literal("17.3.6"));
30411
+ definitionMap.set("version", literal("17.3.7"));
30412
30412
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30413
30413
  definitionMap.set("type", metadata.type);
30414
30414
  definitionMap.set("decorators", metadata.decorators);
@@ -30477,7 +30477,7 @@ function createDirectiveDefinitionMap(meta) {
30477
30477
  const definitionMap = new DefinitionMap();
30478
30478
  const minVersion = getMinimumVersionForPartialOutput(meta);
30479
30479
  definitionMap.set("minVersion", literal(minVersion));
30480
- definitionMap.set("version", literal("17.3.6"));
30480
+ definitionMap.set("version", literal("17.3.7"));
30481
30481
  definitionMap.set("type", meta.type.value);
30482
30482
  if (meta.isStandalone) {
30483
30483
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -30776,7 +30776,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
30776
30776
  function compileDeclareFactoryFunction(meta) {
30777
30777
  const definitionMap = new DefinitionMap();
30778
30778
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
30779
- definitionMap.set("version", literal("17.3.6"));
30779
+ definitionMap.set("version", literal("17.3.7"));
30780
30780
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30781
30781
  definitionMap.set("type", meta.type.value);
30782
30782
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -30799,7 +30799,7 @@ function compileDeclareInjectableFromMetadata(meta) {
30799
30799
  function createInjectableDefinitionMap(meta) {
30800
30800
  const definitionMap = new DefinitionMap();
30801
30801
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
30802
- definitionMap.set("version", literal("17.3.6"));
30802
+ definitionMap.set("version", literal("17.3.7"));
30803
30803
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30804
30804
  definitionMap.set("type", meta.type.value);
30805
30805
  if (meta.providedIn !== void 0) {
@@ -30837,7 +30837,7 @@ function compileDeclareInjectorFromMetadata(meta) {
30837
30837
  function createInjectorDefinitionMap(meta) {
30838
30838
  const definitionMap = new DefinitionMap();
30839
30839
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
30840
- definitionMap.set("version", literal("17.3.6"));
30840
+ definitionMap.set("version", literal("17.3.7"));
30841
30841
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30842
30842
  definitionMap.set("type", meta.type.value);
30843
30843
  definitionMap.set("providers", meta.providers);
@@ -30861,7 +30861,7 @@ function createNgModuleDefinitionMap(meta) {
30861
30861
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
30862
30862
  }
30863
30863
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
30864
- definitionMap.set("version", literal("17.3.6"));
30864
+ definitionMap.set("version", literal("17.3.7"));
30865
30865
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30866
30866
  definitionMap.set("type", meta.type.value);
30867
30867
  if (meta.bootstrap.length > 0) {
@@ -30896,7 +30896,7 @@ function compileDeclarePipeFromMetadata(meta) {
30896
30896
  function createPipeDefinitionMap(meta) {
30897
30897
  const definitionMap = new DefinitionMap();
30898
30898
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
30899
- definitionMap.set("version", literal("17.3.6"));
30899
+ definitionMap.set("version", literal("17.3.7"));
30900
30900
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30901
30901
  definitionMap.set("type", meta.type.value);
30902
30902
  if (meta.isStandalone) {
@@ -30913,7 +30913,7 @@ function createPipeDefinitionMap(meta) {
30913
30913
  publishFacade(_global);
30914
30914
 
30915
30915
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version.mjs
30916
- var VERSION3 = new Version("17.3.6");
30916
+ var VERSION3 = new Version("17.3.7");
30917
30917
 
30918
30918
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
30919
30919
  var import_typescript5 = __toESM(require("typescript"), 1);
@@ -48226,16 +48226,20 @@ var TcbIfOp = class extends TcbOp {
48226
48226
  return void 0;
48227
48227
  }
48228
48228
  if (branch.expression === null) {
48229
- const branchScope = Scope3.forNodes(this.tcb, this.scope, null, branch.children, this.generateBranchGuard(index));
48229
+ const branchScope = this.getBranchScope(this.scope, branch, index);
48230
48230
  return import_typescript106.default.factory.createBlock(branchScope.render());
48231
48231
  }
48232
48232
  const expressionScope = Scope3.forNodes(this.tcb, this.scope, branch, [], null);
48233
48233
  expressionScope.render().forEach((stmt) => this.scope.addStatement(stmt));
48234
48234
  this.expressionScopes.set(branch, expressionScope);
48235
48235
  const expression = branch.expressionAlias === null ? tcbExpression(branch.expression, this.tcb, expressionScope) : expressionScope.resolve(branch.expressionAlias);
48236
- const bodyScope = Scope3.forNodes(this.tcb, expressionScope, null, branch.children, this.generateBranchGuard(index));
48236
+ const bodyScope = this.getBranchScope(expressionScope, branch, index);
48237
48237
  return import_typescript106.default.factory.createIfStatement(expression, import_typescript106.default.factory.createBlock(bodyScope.render()), this.generateBranch(index + 1));
48238
48238
  }
48239
+ getBranchScope(parentScope, branch, index) {
48240
+ const checkBody = this.tcb.env.config.checkControlFlowBodies;
48241
+ return Scope3.forNodes(this.tcb, parentScope, null, checkBody ? branch.children : [], checkBody ? this.generateBranchGuard(index) : null);
48242
+ }
48239
48243
  generateBranchGuard(index) {
48240
48244
  let guard = null;
48241
48245
  for (let i = 0; i <= index; i++) {
@@ -48281,9 +48285,10 @@ var TcbSwitchOp = class extends TcbOp {
48281
48285
  return null;
48282
48286
  }
48283
48287
  generateCase(index, switchValue, defaultCase) {
48288
+ const checkBodies = this.tcb.env.config.checkControlFlowBodies;
48284
48289
  if (index >= this.block.cases.length) {
48285
48290
  if (defaultCase !== null) {
48286
- const defaultScope = Scope3.forNodes(this.tcb, this.scope, null, defaultCase.children, this.generateGuard(defaultCase, switchValue));
48291
+ const defaultScope = Scope3.forNodes(this.tcb, this.scope, null, checkBodies ? defaultCase.children : [], checkBodies ? this.generateGuard(defaultCase, switchValue) : null);
48287
48292
  return import_typescript106.default.factory.createBlock(defaultScope.render());
48288
48293
  }
48289
48294
  return void 0;
@@ -48292,7 +48297,7 @@ var TcbSwitchOp = class extends TcbOp {
48292
48297
  if (current.expression === null) {
48293
48298
  return this.generateCase(index + 1, switchValue, current);
48294
48299
  }
48295
- const caseScope = Scope3.forNodes(this.tcb, this.scope, null, current.children, this.generateGuard(current, switchValue));
48300
+ const caseScope = Scope3.forNodes(this.tcb, this.scope, null, checkBodies ? current.children : [], checkBodies ? this.generateGuard(current, switchValue) : null);
48296
48301
  const caseValue = tcbExpression(current.expression, this.tcb, caseScope);
48297
48302
  return import_typescript106.default.factory.createIfStatement(import_typescript106.default.factory.createBinaryExpression(switchValue, import_typescript106.default.SyntaxKind.EqualsEqualsEqualsToken, caseValue), import_typescript106.default.factory.createBlock(caseScope.render()), this.generateCase(index + 1, switchValue, defaultCase));
48298
48303
  }
@@ -48330,7 +48335,7 @@ var TcbForOfOp = class extends TcbOp {
48330
48335
  return false;
48331
48336
  }
48332
48337
  execute() {
48333
- const loopScope = Scope3.forNodes(this.tcb, this.scope, this.block, this.block.children, null);
48338
+ const loopScope = Scope3.forNodes(this.tcb, this.scope, this.block, this.tcb.env.config.checkControlFlowBodies ? this.block.children : [], null);
48334
48339
  const initializerId = loopScope.resolve(this.block.item);
48335
48340
  if (!import_typescript106.default.isIdentifier(initializerId)) {
48336
48341
  throw new Error(`Could not resolve for loop variable ${this.block.item.name} to an identifier`);
@@ -48541,7 +48546,7 @@ var _Scope = class {
48541
48546
  this.opQueue.push(new TcbExpressionOp(this.tcb, this, node.expression), new TcbSwitchOp(this.tcb, this, node));
48542
48547
  } else if (node instanceof ForLoopBlock) {
48543
48548
  this.opQueue.push(new TcbForOfOp(this.tcb, this, node));
48544
- node.empty && this.appendChildren(node.empty);
48549
+ node.empty && this.tcb.env.config.checkControlFlowBodies && this.appendChildren(node.empty);
48545
48550
  } else if (node instanceof BoundText) {
48546
48551
  this.opQueue.push(new TcbExpressionOp(this.tcb, this, node.value));
48547
48552
  } else if (node instanceof Icu) {
@@ -51550,6 +51555,7 @@ var NgCompiler = class {
51550
51555
  alwaysCheckSchemaInTemplateBodies: true,
51551
51556
  checkTypeOfInputBindings: strictTemplates,
51552
51557
  honorAccessModifiersForInputBindings: false,
51558
+ checkControlFlowBodies: true,
51553
51559
  strictNullInputBindings: strictTemplates,
51554
51560
  checkTypeOfAttributes: strictTemplates,
51555
51561
  checkTypeOfDomBindings: false,
@@ -51573,6 +51579,7 @@ var NgCompiler = class {
51573
51579
  applyTemplateContextGuards: false,
51574
51580
  checkQueries: false,
51575
51581
  checkTemplateBodies: false,
51582
+ checkControlFlowBodies: false,
51576
51583
  alwaysCheckSchemaInTemplateBodies: this.closureCompilerEnabled,
51577
51584
  checkTypeOfInputBindings: false,
51578
51585
  strictNullInputBindings: false,