@angular-eslint/bundled-angular-compiler 21.1.1-alpha.0 → 21.1.1-alpha.2

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 (2) hide show
  1. package/dist/index.js +24 -46
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -281,7 +281,7 @@ __export(index_exports, {
281
281
  });
282
282
  module.exports = __toCommonJS(index_exports);
283
283
 
284
- // ../../node_modules/.pnpm/@angular+compiler@21.0.1/node_modules/@angular/compiler/fesm2022/compiler.mjs
284
+ // ../../node_modules/.pnpm/@angular+compiler@21.0.3/node_modules/@angular/compiler/fesm2022/compiler.mjs
285
285
  var _SELECTOR_REGEXP = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
286
286
  var CssSelector = class _CssSelector {
287
287
  static {
@@ -644,6 +644,7 @@ var SecurityContext;
644
644
  SecurityContext2[SecurityContext2["SCRIPT"] = 3] = "SCRIPT";
645
645
  SecurityContext2[SecurityContext2["URL"] = 4] = "URL";
646
646
  SecurityContext2[SecurityContext2["RESOURCE_URL"] = 5] = "RESOURCE_URL";
647
+ SecurityContext2[SecurityContext2["ATTRIBUTE_NO_BINDING"] = 6] = "ATTRIBUTE_NO_BINDING";
647
648
  })(SecurityContext || (SecurityContext = {}));
648
649
  var MissingTranslationStrategy;
649
650
  (function(MissingTranslationStrategy2) {
@@ -3523,6 +3524,10 @@ var Identifiers = class {
3523
3524
  name: "\u0275\u0275sanitizeStyle",
3524
3525
  moduleName: CORE
3525
3526
  };
3527
+ static validateAttribute = {
3528
+ name: "\u0275\u0275validateAttribute",
3529
+ moduleName: CORE
3530
+ };
3526
3531
  static sanitizeResourceUrl = {
3527
3532
  name: "\u0275\u0275sanitizeResourceUrl",
3528
3533
  moduleName: CORE
@@ -3547,10 +3552,6 @@ var Identifiers = class {
3547
3552
  name: "\u0275\u0275trustConstantResourceUrl",
3548
3553
  moduleName: CORE
3549
3554
  };
3550
- static validateIframeAttribute = {
3551
- name: "\u0275\u0275validateIframeAttribute",
3552
- moduleName: CORE
3553
- };
3554
3555
  static inputDecorator = {
3555
3556
  name: "Input",
3556
3557
  moduleName: CORE
@@ -18380,8 +18381,9 @@ function SECURITY_SCHEMA() {
18380
18381
  _SECURITY_SCHEMA = {};
18381
18382
  registerContext(SecurityContext.HTML, ["iframe|srcdoc", "*|innerHTML", "*|outerHTML"]);
18382
18383
  registerContext(SecurityContext.STYLE, ["*|style"]);
18383
- registerContext(SecurityContext.URL, ["*|formAction", "area|href", "area|ping", "audio|src", "a|href", "a|ping", "blockquote|cite", "body|background", "del|cite", "form|action", "img|src", "input|src", "ins|cite", "q|cite", "source|src", "track|src", "video|poster", "video|src"]);
18384
+ registerContext(SecurityContext.URL, ["*|formAction", "area|href", "area|ping", "audio|src", "a|href", "a|xlink:href", "a|ping", "blockquote|cite", "body|background", "del|cite", "form|action", "img|src", "input|src", "ins|cite", "q|cite", "source|src", "track|src", "video|poster", "video|src", "annotation|href", "annotation|xlink:href", "annotation-xml|href", "annotation-xml|xlink:href", "maction|href", "maction|xlink:href", "malignmark|href", "malignmark|xlink:href", "math|href", "math|xlink:href", "mroot|href", "mroot|xlink:href", "msqrt|href", "msqrt|xlink:href", "merror|href", "merror|xlink:href", "mfrac|href", "mfrac|xlink:href", "mglyph|href", "mglyph|xlink:href", "msub|href", "msub|xlink:href", "msup|href", "msup|xlink:href", "msubsup|href", "msubsup|xlink:href", "mmultiscripts|href", "mmultiscripts|xlink:href", "mprescripts|href", "mprescripts|xlink:href", "mi|href", "mi|xlink:href", "mn|href", "mn|xlink:href", "mo|href", "mo|xlink:href", "mpadded|href", "mpadded|xlink:href", "mphantom|href", "mphantom|xlink:href", "mrow|href", "mrow|xlink:href", "ms|href", "ms|xlink:href", "mspace|href", "mspace|xlink:href", "mstyle|href", "mstyle|xlink:href", "mtable|href", "mtable|xlink:href", "mtd|href", "mtd|xlink:href", "mtr|href", "mtr|xlink:href", "mtext|href", "mtext|xlink:href", "mover|href", "mover|xlink:href", "munder|href", "munder|xlink:href", "munderover|href", "munderover|xlink:href", "semantics|href", "semantics|xlink:href", "none|href", "none|xlink:href"]);
18384
18385
  registerContext(SecurityContext.RESOURCE_URL, ["applet|code", "applet|codebase", "base|href", "embed|src", "frame|src", "head|profile", "html|manifest", "iframe|src", "link|href", "media|src", "object|codebase", "object|data", "script|src"]);
18386
+ registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, ["animate|attributeName", "set|attributeName", "animateMotion|attributeName", "animateTransform|attributeName", "unknown|attributeName", "iframe|sandbox", "iframe|allow", "iframe|allowFullscreen", "iframe|referrerPolicy", "iframe|csp", "iframe|fetchPriority", "unknown|sandbox", "unknown|allow", "unknown|allowFullscreen", "unknown|referrerPolicy", "unknown|csp", "unknown|fetchPriority"]);
18385
18387
  }
18386
18388
  return _SECURITY_SCHEMA;
18387
18389
  }
@@ -18390,11 +18392,6 @@ function registerContext(ctx, specs) {
18390
18392
  for (const spec of specs) _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
18391
18393
  }
18392
18394
  __name(registerContext, "registerContext");
18393
- var IFRAME_SECURITY_SENSITIVE_ATTRS = /* @__PURE__ */ new Set(["sandbox", "allow", "allowfullscreen", "referrerpolicy", "csp", "fetchpriority"]);
18394
- function isIframeSecuritySensitiveAttr(attrName) {
18395
- return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
18396
- }
18397
- __name(isIframeSecuritySensitiveAttr, "isIframeSecuritySensitiveAttr");
18398
18395
  var ElementSchemaRegistry = class {
18399
18396
  static {
18400
18397
  __name(this, "ElementSchemaRegistry");
@@ -22126,11 +22123,10 @@ function processLexicalScope(unit, ops, savedView) {
22126
22123
  }
22127
22124
  }
22128
22125
  __name(processLexicalScope, "processLexicalScope");
22129
- var sanitizerFns = /* @__PURE__ */ new Map([[SecurityContext.HTML, Identifiers.sanitizeHtml], [SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl], [SecurityContext.SCRIPT, Identifiers.sanitizeScript], [SecurityContext.STYLE, Identifiers.sanitizeStyle], [SecurityContext.URL, Identifiers.sanitizeUrl]]);
22126
+ var sanitizerFns = /* @__PURE__ */ new Map([[SecurityContext.HTML, Identifiers.sanitizeHtml], [SecurityContext.RESOURCE_URL, Identifiers.sanitizeResourceUrl], [SecurityContext.SCRIPT, Identifiers.sanitizeScript], [SecurityContext.STYLE, Identifiers.sanitizeStyle], [SecurityContext.URL, Identifiers.sanitizeUrl], [SecurityContext.ATTRIBUTE_NO_BINDING, Identifiers.validateAttribute]]);
22130
22127
  var trustedValueFns = /* @__PURE__ */ new Map([[SecurityContext.HTML, Identifiers.trustConstantHtml], [SecurityContext.RESOURCE_URL, Identifiers.trustConstantResourceUrl]]);
22131
22128
  function resolveSanitizers(job) {
22132
22129
  for (const unit of job.units) {
22133
- const elements = createOpXrefMap(unit);
22134
22130
  if (job.kind !== CompilationJobKind.Host) {
22135
22131
  for (const op of unit.create) {
22136
22132
  if (op.kind === OpKind.ExtractedAttribute) {
@@ -22145,37 +22141,18 @@ function resolveSanitizers(job) {
22145
22141
  case OpKind.Attribute:
22146
22142
  case OpKind.DomProperty:
22147
22143
  let sanitizerFn = null;
22148
- if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.indexOf(SecurityContext.URL) > -1 && op.securityContext.indexOf(SecurityContext.RESOURCE_URL) > -1) {
22144
+ if (Array.isArray(op.securityContext) && op.securityContext.length === 2 && op.securityContext.includes(SecurityContext.URL) && op.securityContext.includes(SecurityContext.RESOURCE_URL)) {
22149
22145
  sanitizerFn = Identifiers.sanitizeUrlOrResourceUrl;
22150
22146
  } else {
22151
22147
  sanitizerFn = sanitizerFns.get(getOnlySecurityContext(op.securityContext)) ?? null;
22152
22148
  }
22153
22149
  op.sanitizer = sanitizerFn !== null ? importExpr(sanitizerFn) : null;
22154
- if (op.sanitizer === null) {
22155
- let isIframe = false;
22156
- if (job.kind === CompilationJobKind.Host || op.kind === OpKind.DomProperty) {
22157
- isIframe = true;
22158
- } else {
22159
- const ownerOp = elements.get(op.target);
22160
- if (ownerOp === void 0 || !isElementOrContainerOp(ownerOp)) {
22161
- throw Error("Property should have an element-like owner");
22162
- }
22163
- isIframe = isIframeElement(ownerOp);
22164
- }
22165
- if (isIframe && isIframeSecuritySensitiveAttr(op.name)) {
22166
- op.sanitizer = importExpr(Identifiers.validateIframeAttribute);
22167
- }
22168
- }
22169
22150
  break;
22170
22151
  }
22171
22152
  }
22172
22153
  }
22173
22154
  }
22174
22155
  __name(resolveSanitizers, "resolveSanitizers");
22175
- function isIframeElement(op) {
22176
- return op.kind === OpKind.ElementStart && op.tag?.toLowerCase() === "iframe";
22177
- }
22178
- __name(isIframeElement, "isIframeElement");
22179
22156
  function getOnlySecurityContext(securityContext) {
22180
22157
  if (Array.isArray(securityContext)) {
22181
22158
  if (securityContext.length > 1) {
@@ -23359,6 +23336,10 @@ function ingestElement(unit, element2) {
23359
23336
  ingestNodes(unit, element2.children);
23360
23337
  const endOp = createElementEndOp(id, element2.endSourceSpan ?? element2.startSourceSpan);
23361
23338
  unit.create.push(endOp);
23339
+ const fieldInput = element2.inputs.find((input) => input.name === "field" && input.type === BindingType.Property);
23340
+ if (fieldInput) {
23341
+ unit.create.push(createControlCreateOp(fieldInput.sourceSpan));
23342
+ }
23362
23343
  if (i18nBlockId !== null) {
23363
23344
  OpList.insertBefore(createI18nEndOp(i18nBlockId, element2.endSourceSpan ?? element2.startSourceSpan), endOp);
23364
23345
  }
@@ -23855,9 +23836,6 @@ function ingestElementBindings(unit, op, element2) {
23855
23836
  console.error(`On component ${unit.job.componentName}, the binding ${input.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`);
23856
23837
  }
23857
23838
  bindings.push(createBindingOp(op.xref, BINDING_KINDS.get(input.type), input.name, convertAstWithInterpolation(unit.job, astOf(input.value), input.i18n), input.unit, input.securityContext, false, false, null, asMessage(input.i18n) ?? null, input.sourceSpan));
23858
- if (input.type === BindingType.Property && input.name === "field") {
23859
- unit.create.push(createControlCreateOp(input.sourceSpan));
23860
- }
23861
23839
  }
23862
23840
  unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
23863
23841
  unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
@@ -29909,7 +29887,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
29909
29887
  function compileDeclareClassMetadata(metadata) {
29910
29888
  const definitionMap = new DefinitionMap();
29911
29889
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
29912
- definitionMap.set("version", literal("21.0.1"));
29890
+ definitionMap.set("version", literal("21.0.3"));
29913
29891
  definitionMap.set("ngImport", importExpr(Identifiers.core));
29914
29892
  definitionMap.set("type", metadata.type);
29915
29893
  definitionMap.set("decorators", metadata.decorators);
@@ -29928,7 +29906,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
29928
29906
  callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
29929
29907
  callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
29930
29908
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
29931
- definitionMap.set("version", literal("21.0.1"));
29909
+ definitionMap.set("version", literal("21.0.3"));
29932
29910
  definitionMap.set("ngImport", importExpr(Identifiers.core));
29933
29911
  definitionMap.set("type", metadata.type);
29934
29912
  definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
@@ -30005,7 +29983,7 @@ function createDirectiveDefinitionMap(meta) {
30005
29983
  const definitionMap = new DefinitionMap();
30006
29984
  const minVersion = getMinimumVersionForPartialOutput(meta);
30007
29985
  definitionMap.set("minVersion", literal(minVersion));
30008
- definitionMap.set("version", literal("21.0.1"));
29986
+ definitionMap.set("version", literal("21.0.3"));
30009
29987
  definitionMap.set("type", meta.type.value);
30010
29988
  if (meta.isStandalone !== void 0) {
30011
29989
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -30351,7 +30329,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
30351
30329
  function compileDeclareFactoryFunction(meta) {
30352
30330
  const definitionMap = new DefinitionMap();
30353
30331
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
30354
- definitionMap.set("version", literal("21.0.1"));
30332
+ definitionMap.set("version", literal("21.0.3"));
30355
30333
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30356
30334
  definitionMap.set("type", meta.type.value);
30357
30335
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -30378,7 +30356,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
30378
30356
  function createInjectableDefinitionMap(meta) {
30379
30357
  const definitionMap = new DefinitionMap();
30380
30358
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
30381
- definitionMap.set("version", literal("21.0.1"));
30359
+ definitionMap.set("version", literal("21.0.3"));
30382
30360
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30383
30361
  definitionMap.set("type", meta.type.value);
30384
30362
  if (meta.providedIn !== void 0) {
@@ -30420,7 +30398,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
30420
30398
  function createInjectorDefinitionMap(meta) {
30421
30399
  const definitionMap = new DefinitionMap();
30422
30400
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
30423
- definitionMap.set("version", literal("21.0.1"));
30401
+ definitionMap.set("version", literal("21.0.3"));
30424
30402
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30425
30403
  definitionMap.set("type", meta.type.value);
30426
30404
  definitionMap.set("providers", meta.providers);
@@ -30448,7 +30426,7 @@ function createNgModuleDefinitionMap(meta) {
30448
30426
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
30449
30427
  }
30450
30428
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
30451
- definitionMap.set("version", literal("21.0.1"));
30429
+ definitionMap.set("version", literal("21.0.3"));
30452
30430
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30453
30431
  definitionMap.set("type", meta.type.value);
30454
30432
  if (meta.bootstrap.length > 0) {
@@ -30487,7 +30465,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
30487
30465
  function createPipeDefinitionMap(meta) {
30488
30466
  const definitionMap = new DefinitionMap();
30489
30467
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
30490
- definitionMap.set("version", literal("21.0.1"));
30468
+ definitionMap.set("version", literal("21.0.3"));
30491
30469
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30492
30470
  definitionMap.set("type", meta.type.value);
30493
30471
  if (meta.isStandalone !== void 0) {
@@ -30562,7 +30540,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
30562
30540
  return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
30563
30541
  }
30564
30542
  __name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
30565
- var VERSION = new Version("21.0.1");
30543
+ var VERSION = new Version("21.0.3");
30566
30544
  publishFacade(_global);
30567
30545
  // Annotate the CommonJS export names for ESM import in node:
30568
30546
  0 && (module.exports = {
@@ -30828,7 +30806,7 @@ publishFacade(_global);
30828
30806
 
30829
30807
  @angular/compiler/fesm2022/compiler.mjs:
30830
30808
  (**
30831
- * @license Angular v21.0.1
30809
+ * @license Angular v21.0.3
30832
30810
  * (c) 2010-2025 Google LLC. https://angular.dev/
30833
30811
  * License: MIT
30834
30812
  *)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/bundled-angular-compiler",
3
- "version": "21.1.1-alpha.0",
3
+ "version": "21.1.1-alpha.2",
4
4
  "description": "A CJS bundled version of @angular/compiler",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",