@angular/core 17.3.6 → 17.3.8

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.
@@ -15354,7 +15354,37 @@ var SCHEMA = [
15354
15354
  "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default",
15355
15355
  "summary^[HTMLElement]|",
15356
15356
  "time^[HTMLElement]|dateTime",
15357
- ":svg:cursor^:svg:|"
15357
+ ":svg:cursor^:svg:|",
15358
+ ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",
15359
+ ":math:math^:math:|",
15360
+ ":math:maction^:math:|",
15361
+ ":math:menclose^:math:|",
15362
+ ":math:merror^:math:|",
15363
+ ":math:mfenced^:math:|",
15364
+ ":math:mfrac^:math:|",
15365
+ ":math:mi^:math:|",
15366
+ ":math:mmultiscripts^:math:|",
15367
+ ":math:mn^:math:|",
15368
+ ":math:mo^:math:|",
15369
+ ":math:mover^:math:|",
15370
+ ":math:mpadded^:math:|",
15371
+ ":math:mphantom^:math:|",
15372
+ ":math:mroot^:math:|",
15373
+ ":math:mrow^:math:|",
15374
+ ":math:ms^:math:|",
15375
+ ":math:mspace^:math:|",
15376
+ ":math:msqrt^:math:|",
15377
+ ":math:mstyle^:math:|",
15378
+ ":math:msub^:math:|",
15379
+ ":math:msubsup^:math:|",
15380
+ ":math:msup^:math:|",
15381
+ ":math:mtable^:math:|",
15382
+ ":math:mtd^:math:|",
15383
+ ":math:mtext^:math:|",
15384
+ ":math:mtr^:math:|",
15385
+ ":math:munder^:math:|",
15386
+ ":math:munderover^:math:|",
15387
+ ":math:semantics^:math:|"
15358
15388
  ];
15359
15389
  var _ATTR_TO_PROP = new Map(Object.entries({
15360
15390
  "class": "className",
@@ -29342,7 +29372,7 @@ function publishFacade(global) {
29342
29372
  }
29343
29373
 
29344
29374
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
29345
- var VERSION2 = new Version("17.3.6");
29375
+ var VERSION2 = new Version("17.3.8");
29346
29376
 
29347
29377
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
29348
29378
  var _I18N_ATTR = "i18n";
@@ -30408,7 +30438,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
30408
30438
  function compileDeclareClassMetadata(metadata) {
30409
30439
  const definitionMap = new DefinitionMap();
30410
30440
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
30411
- definitionMap.set("version", literal("17.3.6"));
30441
+ definitionMap.set("version", literal("17.3.8"));
30412
30442
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30413
30443
  definitionMap.set("type", metadata.type);
30414
30444
  definitionMap.set("decorators", metadata.decorators);
@@ -30477,7 +30507,7 @@ function createDirectiveDefinitionMap(meta) {
30477
30507
  const definitionMap = new DefinitionMap();
30478
30508
  const minVersion = getMinimumVersionForPartialOutput(meta);
30479
30509
  definitionMap.set("minVersion", literal(minVersion));
30480
- definitionMap.set("version", literal("17.3.6"));
30510
+ definitionMap.set("version", literal("17.3.8"));
30481
30511
  definitionMap.set("type", meta.type.value);
30482
30512
  if (meta.isStandalone) {
30483
30513
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -30776,7 +30806,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
30776
30806
  function compileDeclareFactoryFunction(meta) {
30777
30807
  const definitionMap = new DefinitionMap();
30778
30808
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
30779
- definitionMap.set("version", literal("17.3.6"));
30809
+ definitionMap.set("version", literal("17.3.8"));
30780
30810
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30781
30811
  definitionMap.set("type", meta.type.value);
30782
30812
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -30799,7 +30829,7 @@ function compileDeclareInjectableFromMetadata(meta) {
30799
30829
  function createInjectableDefinitionMap(meta) {
30800
30830
  const definitionMap = new DefinitionMap();
30801
30831
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
30802
- definitionMap.set("version", literal("17.3.6"));
30832
+ definitionMap.set("version", literal("17.3.8"));
30803
30833
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30804
30834
  definitionMap.set("type", meta.type.value);
30805
30835
  if (meta.providedIn !== void 0) {
@@ -30837,7 +30867,7 @@ function compileDeclareInjectorFromMetadata(meta) {
30837
30867
  function createInjectorDefinitionMap(meta) {
30838
30868
  const definitionMap = new DefinitionMap();
30839
30869
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
30840
- definitionMap.set("version", literal("17.3.6"));
30870
+ definitionMap.set("version", literal("17.3.8"));
30841
30871
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30842
30872
  definitionMap.set("type", meta.type.value);
30843
30873
  definitionMap.set("providers", meta.providers);
@@ -30861,7 +30891,7 @@ function createNgModuleDefinitionMap(meta) {
30861
30891
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
30862
30892
  }
30863
30893
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
30864
- definitionMap.set("version", literal("17.3.6"));
30894
+ definitionMap.set("version", literal("17.3.8"));
30865
30895
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30866
30896
  definitionMap.set("type", meta.type.value);
30867
30897
  if (meta.bootstrap.length > 0) {
@@ -30896,7 +30926,7 @@ function compileDeclarePipeFromMetadata(meta) {
30896
30926
  function createPipeDefinitionMap(meta) {
30897
30927
  const definitionMap = new DefinitionMap();
30898
30928
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
30899
- definitionMap.set("version", literal("17.3.6"));
30929
+ definitionMap.set("version", literal("17.3.8"));
30900
30930
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30901
30931
  definitionMap.set("type", meta.type.value);
30902
30932
  if (meta.isStandalone) {
@@ -30913,7 +30943,7 @@ function createPipeDefinitionMap(meta) {
30913
30943
  publishFacade(_global);
30914
30944
 
30915
30945
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version.mjs
30916
- var VERSION3 = new Version("17.3.6");
30946
+ var VERSION3 = new Version("17.3.8");
30917
30947
 
30918
30948
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
30919
30949
  var import_typescript5 = __toESM(require("typescript"), 1);
@@ -48226,16 +48256,20 @@ var TcbIfOp = class extends TcbOp {
48226
48256
  return void 0;
48227
48257
  }
48228
48258
  if (branch.expression === null) {
48229
- const branchScope = Scope3.forNodes(this.tcb, this.scope, null, branch.children, this.generateBranchGuard(index));
48259
+ const branchScope = this.getBranchScope(this.scope, branch, index);
48230
48260
  return import_typescript106.default.factory.createBlock(branchScope.render());
48231
48261
  }
48232
48262
  const expressionScope = Scope3.forNodes(this.tcb, this.scope, branch, [], null);
48233
48263
  expressionScope.render().forEach((stmt) => this.scope.addStatement(stmt));
48234
48264
  this.expressionScopes.set(branch, expressionScope);
48235
48265
  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));
48266
+ const bodyScope = this.getBranchScope(expressionScope, branch, index);
48237
48267
  return import_typescript106.default.factory.createIfStatement(expression, import_typescript106.default.factory.createBlock(bodyScope.render()), this.generateBranch(index + 1));
48238
48268
  }
48269
+ getBranchScope(parentScope, branch, index) {
48270
+ const checkBody = this.tcb.env.config.checkControlFlowBodies;
48271
+ return Scope3.forNodes(this.tcb, parentScope, null, checkBody ? branch.children : [], checkBody ? this.generateBranchGuard(index) : null);
48272
+ }
48239
48273
  generateBranchGuard(index) {
48240
48274
  let guard = null;
48241
48275
  for (let i = 0; i <= index; i++) {
@@ -48281,9 +48315,10 @@ var TcbSwitchOp = class extends TcbOp {
48281
48315
  return null;
48282
48316
  }
48283
48317
  generateCase(index, switchValue, defaultCase) {
48318
+ const checkBodies = this.tcb.env.config.checkControlFlowBodies;
48284
48319
  if (index >= this.block.cases.length) {
48285
48320
  if (defaultCase !== null) {
48286
- const defaultScope = Scope3.forNodes(this.tcb, this.scope, null, defaultCase.children, this.generateGuard(defaultCase, switchValue));
48321
+ const defaultScope = Scope3.forNodes(this.tcb, this.scope, null, checkBodies ? defaultCase.children : [], checkBodies ? this.generateGuard(defaultCase, switchValue) : null);
48287
48322
  return import_typescript106.default.factory.createBlock(defaultScope.render());
48288
48323
  }
48289
48324
  return void 0;
@@ -48292,7 +48327,7 @@ var TcbSwitchOp = class extends TcbOp {
48292
48327
  if (current.expression === null) {
48293
48328
  return this.generateCase(index + 1, switchValue, current);
48294
48329
  }
48295
- const caseScope = Scope3.forNodes(this.tcb, this.scope, null, current.children, this.generateGuard(current, switchValue));
48330
+ const caseScope = Scope3.forNodes(this.tcb, this.scope, null, checkBodies ? current.children : [], checkBodies ? this.generateGuard(current, switchValue) : null);
48296
48331
  const caseValue = tcbExpression(current.expression, this.tcb, caseScope);
48297
48332
  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
48333
  }
@@ -48330,7 +48365,7 @@ var TcbForOfOp = class extends TcbOp {
48330
48365
  return false;
48331
48366
  }
48332
48367
  execute() {
48333
- const loopScope = Scope3.forNodes(this.tcb, this.scope, this.block, this.block.children, null);
48368
+ const loopScope = Scope3.forNodes(this.tcb, this.scope, this.block, this.tcb.env.config.checkControlFlowBodies ? this.block.children : [], null);
48334
48369
  const initializerId = loopScope.resolve(this.block.item);
48335
48370
  if (!import_typescript106.default.isIdentifier(initializerId)) {
48336
48371
  throw new Error(`Could not resolve for loop variable ${this.block.item.name} to an identifier`);
@@ -48541,7 +48576,7 @@ var _Scope = class {
48541
48576
  this.opQueue.push(new TcbExpressionOp(this.tcb, this, node.expression), new TcbSwitchOp(this.tcb, this, node));
48542
48577
  } else if (node instanceof ForLoopBlock) {
48543
48578
  this.opQueue.push(new TcbForOfOp(this.tcb, this, node));
48544
- node.empty && this.appendChildren(node.empty);
48579
+ node.empty && this.tcb.env.config.checkControlFlowBodies && this.appendChildren(node.empty);
48545
48580
  } else if (node instanceof BoundText) {
48546
48581
  this.opQueue.push(new TcbExpressionOp(this.tcb, this, node.value));
48547
48582
  } else if (node instanceof Icu) {
@@ -51550,6 +51585,7 @@ var NgCompiler = class {
51550
51585
  alwaysCheckSchemaInTemplateBodies: true,
51551
51586
  checkTypeOfInputBindings: strictTemplates,
51552
51587
  honorAccessModifiersForInputBindings: false,
51588
+ checkControlFlowBodies: true,
51553
51589
  strictNullInputBindings: strictTemplates,
51554
51590
  checkTypeOfAttributes: strictTemplates,
51555
51591
  checkTypeOfDomBindings: false,
@@ -51573,6 +51609,7 @@ var NgCompiler = class {
51573
51609
  applyTemplateContextGuards: false,
51574
51610
  checkQueries: false,
51575
51611
  checkTemplateBodies: false,
51612
+ checkControlFlowBodies: false,
51576
51613
  alwaysCheckSchemaInTemplateBodies: this.closureCompilerEnabled,
51577
51614
  checkTypeOfInputBindings: false,
51578
51615
  strictNullInputBindings: false,