marko 6.0.0-next.3.19 → 6.0.0-next.3.20

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.
@@ -3810,6 +3810,7 @@ function getMemberExpressionPropString(expr) {
3810
3810
  case "NumericLiteral":
3811
3811
  return "" + expr.property.value;
3812
3812
  case "Identifier":
3813
+ if (expr.computed) return;
3813
3814
  return expr.property.name;
3814
3815
  }
3815
3816
  }
@@ -4424,7 +4425,7 @@ var native_tag_default = {
4424
4425
  if (node.var) {
4425
4426
  for (const ref of tag.scope.getBinding(node.var.name).referencePaths) {
4426
4427
  setReferencesScope(ref);
4427
- if (!ref.parentPath?.isCallExpression()) {
4428
+ if (!isInvokedFunction(ref)) {
4428
4429
  tagExtra[kGetterId] = getRegisterUID(section, bindingName);
4429
4430
  break;
4430
4431
  }
@@ -4497,7 +4498,7 @@ var native_tag_default = {
4497
4498
  }
4498
4499
  for (const reference of references) {
4499
4500
  const referenceSection = getSection(reference);
4500
- if (reference.parentPath?.isCallExpression()) {
4501
+ if (isInvokedFunction(reference)) {
4501
4502
  reference.parentPath.replaceWith(
4502
4503
  import_compiler28.types.expressionStatement(
4503
4504
  createScopeReadExpression(referenceSection, nodeRef2)
@@ -4887,6 +4888,10 @@ function isChangeHandler(propName) {
4887
4888
  function buildUndefined() {
4888
4889
  return import_compiler28.types.unaryExpression("void", import_compiler28.types.numericLiteral(0));
4889
4890
  }
4891
+ function isInvokedFunction(expr) {
4892
+ const { parent, node } = expr;
4893
+ return parent.type === "CallExpression" && parent.callee === node;
4894
+ }
4890
4895
 
4891
4896
  // src/translator/core/for.ts
4892
4897
  var kForMarkerBinding = Symbol("for marker binding");
@@ -9203,7 +9208,7 @@ var tag_default = {
9203
9208
  );
9204
9209
  }
9205
9210
  tag.node.attributes.splice(
9206
- ++i,
9211
+ i + 1,
9207
9212
  0,
9208
9213
  import_compiler53.types.markoAttribute(attr2.node.name + "Change", changeValue)
9209
9214
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.0-next.3.19",
3
+ "version": "6.0.0-next.3.20",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",