@angular-eslint/bundled-angular-compiler 20.1.2-alpha.20 → 20.1.2-alpha.22

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 +36 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -279,7 +279,7 @@ __export(index_exports, {
279
279
  });
280
280
  module.exports = __toCommonJS(index_exports);
281
281
 
282
- // ../../node_modules/.pnpm/@angular+compiler@20.1.2/node_modules/@angular/compiler/fesm2022/compiler.mjs
282
+ // ../../node_modules/.pnpm/@angular+compiler@20.1.4/node_modules/@angular/compiler/fesm2022/compiler.mjs
283
283
  var _SELECTOR_REGEXP = new RegExp(
284
284
  `(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
285
285
  // 8: ","
@@ -17440,7 +17440,7 @@ var Parser2 = class {
17440
17440
  parseAction(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17441
17441
  const errors = [];
17442
17442
  this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
17443
- const sourceToLex = this._stripComments(input);
17443
+ const { stripped: sourceToLex } = this._stripComments(input);
17444
17444
  const tokens = this._lexer.tokenize(sourceToLex);
17445
17445
  const ast = new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 1, errors, 0, this._supportsDirectPipeReferences).parseChain();
17446
17446
  return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
@@ -17467,7 +17467,7 @@ var Parser2 = class {
17467
17467
  }
17468
17468
  _parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors) {
17469
17469
  this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
17470
- const sourceToLex = this._stripComments(input);
17470
+ const { stripped: sourceToLex } = this._stripComments(input);
17471
17471
  const tokens = this._lexer.tokenize(sourceToLex);
17472
17472
  return new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
17473
17473
  }
@@ -17515,8 +17515,12 @@ var Parser2 = class {
17515
17515
  for (let i = 0; i < expressions.length; ++i) {
17516
17516
  const expressionSpan = interpolatedTokens?.[i * 2 + 1]?.sourceSpan;
17517
17517
  const expressionText = expressions[i].text;
17518
- const sourceToLex = this._stripComments(expressionText);
17518
+ const { stripped: sourceToLex, hasComments } = this._stripComments(expressionText);
17519
17519
  const tokens = this._lexer.tokenize(sourceToLex);
17520
+ if (hasComments && sourceToLex.trim().length === 0 && tokens.length === 0) {
17521
+ errors.push(getParseError("Interpolation expression cannot only contain a comment", input, `at column ${expressions[i].start} in`, parseSourceSpan));
17522
+ continue;
17523
+ }
17520
17524
  const ast = new _ParseAST(expressionSpan ? expressionText : input, expressionSpan || parseSourceSpan, absoluteOffset, tokens, 0, errors, offsets[i], this._supportsDirectPipeReferences).parseChain();
17521
17525
  expressionNodes.push(ast);
17522
17526
  }
@@ -17528,7 +17532,7 @@ var Parser2 = class {
17528
17532
  * This is used for parsing the switch expression in ICUs.
17529
17533
  */
17530
17534
  parseInterpolationExpression(expression, parseSourceSpan, absoluteOffset) {
17531
- const sourceToLex = this._stripComments(expression);
17535
+ const { stripped: sourceToLex } = this._stripComments(expression);
17532
17536
  const tokens = this._lexer.tokenize(sourceToLex);
17533
17537
  const errors = [];
17534
17538
  const ast = new _ParseAST(expression, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
@@ -17605,7 +17609,7 @@ var Parser2 = class {
17605
17609
  }
17606
17610
  _stripComments(input) {
17607
17611
  const i = this._commentStart(input);
17608
- return i != null ? input.substring(0, i) : input;
17612
+ return i != null ? { stripped: input.substring(0, i), hasComments: true } : { stripped: input, hasComments: false };
17609
17613
  }
17610
17614
  _commentStart(input) {
17611
17615
  let outerQuote = null;
@@ -25061,11 +25065,26 @@ var BindingParser = class {
25061
25065
  return this._isAllowedAssignmentEvent(ast.args[0]);
25062
25066
  }
25063
25067
  if (ast instanceof PropertyRead || ast instanceof KeyedRead) {
25064
- return true;
25068
+ if (!hasRecursiveSafeReceiver(ast)) {
25069
+ return true;
25070
+ }
25065
25071
  }
25066
25072
  return false;
25067
25073
  }
25068
25074
  };
25075
+ function hasRecursiveSafeReceiver(ast) {
25076
+ if (ast instanceof SafePropertyRead || ast instanceof SafeKeyedRead) {
25077
+ return true;
25078
+ }
25079
+ if (ast instanceof ParenthesizedExpression) {
25080
+ return hasRecursiveSafeReceiver(ast.expression);
25081
+ }
25082
+ if (ast instanceof PropertyRead || ast instanceof KeyedRead || ast instanceof Call) {
25083
+ return hasRecursiveSafeReceiver(ast.receiver);
25084
+ }
25085
+ return false;
25086
+ }
25087
+ __name(hasRecursiveSafeReceiver, "hasRecursiveSafeReceiver");
25069
25088
  function isLegacyAnimationLabel(name) {
25070
25089
  return name[0] == "@";
25071
25090
  }
@@ -30542,7 +30561,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
30542
30561
  function compileDeclareClassMetadata(metadata) {
30543
30562
  const definitionMap = new DefinitionMap();
30544
30563
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
30545
- definitionMap.set("version", literal("20.1.2"));
30564
+ definitionMap.set("version", literal("20.1.4"));
30546
30565
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30547
30566
  definitionMap.set("type", metadata.type);
30548
30567
  definitionMap.set("decorators", metadata.decorators);
@@ -30561,7 +30580,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
30561
30580
  callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
30562
30581
  callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
30563
30582
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
30564
- definitionMap.set("version", literal("20.1.2"));
30583
+ definitionMap.set("version", literal("20.1.4"));
30565
30584
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30566
30585
  definitionMap.set("type", metadata.type);
30567
30586
  definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
@@ -30630,7 +30649,7 @@ function createDirectiveDefinitionMap(meta) {
30630
30649
  const definitionMap = new DefinitionMap();
30631
30650
  const minVersion = getMinimumVersionForPartialOutput(meta);
30632
30651
  definitionMap.set("minVersion", literal(minVersion));
30633
- definitionMap.set("version", literal("20.1.2"));
30652
+ definitionMap.set("version", literal("20.1.4"));
30634
30653
  definitionMap.set("type", meta.type.value);
30635
30654
  if (meta.isStandalone !== void 0) {
30636
30655
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -30957,7 +30976,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
30957
30976
  function compileDeclareFactoryFunction(meta) {
30958
30977
  const definitionMap = new DefinitionMap();
30959
30978
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
30960
- definitionMap.set("version", literal("20.1.2"));
30979
+ definitionMap.set("version", literal("20.1.4"));
30961
30980
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30962
30981
  definitionMap.set("type", meta.type.value);
30963
30982
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -30980,7 +30999,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
30980
30999
  function createInjectableDefinitionMap(meta) {
30981
31000
  const definitionMap = new DefinitionMap();
30982
31001
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
30983
- definitionMap.set("version", literal("20.1.2"));
31002
+ definitionMap.set("version", literal("20.1.4"));
30984
31003
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30985
31004
  definitionMap.set("type", meta.type.value);
30986
31005
  if (meta.providedIn !== void 0) {
@@ -31018,7 +31037,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
31018
31037
  function createInjectorDefinitionMap(meta) {
31019
31038
  const definitionMap = new DefinitionMap();
31020
31039
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
31021
- definitionMap.set("version", literal("20.1.2"));
31040
+ definitionMap.set("version", literal("20.1.4"));
31022
31041
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31023
31042
  definitionMap.set("type", meta.type.value);
31024
31043
  definitionMap.set("providers", meta.providers);
@@ -31042,7 +31061,7 @@ function createNgModuleDefinitionMap(meta) {
31042
31061
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
31043
31062
  }
31044
31063
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
31045
- definitionMap.set("version", literal("20.1.2"));
31064
+ definitionMap.set("version", literal("20.1.4"));
31046
31065
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31047
31066
  definitionMap.set("type", meta.type.value);
31048
31067
  if (meta.bootstrap.length > 0) {
@@ -31077,7 +31096,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
31077
31096
  function createPipeDefinitionMap(meta) {
31078
31097
  const definitionMap = new DefinitionMap();
31079
31098
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
31080
- definitionMap.set("version", literal("20.1.2"));
31099
+ definitionMap.set("version", literal("20.1.4"));
31081
31100
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31082
31101
  definitionMap.set("type", meta.type.value);
31083
31102
  if (meta.isStandalone !== void 0) {
@@ -31174,7 +31193,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
31174
31193
  return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
31175
31194
  }
31176
31195
  __name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
31177
- var VERSION = new Version("20.1.2");
31196
+ var VERSION = new Version("20.1.4");
31178
31197
  publishFacade(_global);
31179
31198
  // Annotate the CommonJS export names for ESM import in node:
31180
31199
  0 && (module.exports = {
@@ -31438,7 +31457,7 @@ publishFacade(_global);
31438
31457
 
31439
31458
  @angular/compiler/fesm2022/compiler.mjs:
31440
31459
  (**
31441
- * @license Angular v20.1.2
31460
+ * @license Angular v20.1.4
31442
31461
  * (c) 2010-2025 Google LLC. https://angular.io/
31443
31462
  * License: MIT
31444
31463
  *)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/bundled-angular-compiler",
3
- "version": "20.1.2-alpha.20",
3
+ "version": "20.1.2-alpha.22",
4
4
  "description": "A CJS bundled version of @angular/compiler",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",