@marko/compiler 5.21.3 → 5.21.4

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.
@@ -326,12 +326,18 @@ function parseMarko(file) {
326
326
  },
327
327
 
328
328
  onAttrMethod(part) {
329
- const prefix = "function";
330
329
  currentAttr.end = part.end;
331
- currentAttr.value = (0, _babelUtils.parseExpression)(
330
+ currentAttr.value = withLoc(
331
+ t.functionExpression(
332
+ undefined,
333
+ (0, _babelUtils.parseExpression)(
332
334
  file,
333
- prefix + parser.read(part),
334
- part.start - prefix.length);
335
+ `${parser.read(part.params)}=>{}`,
336
+ part.params.start).
337
+ params,
338
+ (0, _babelUtils.parseScript)(file, parser.read(part.body), part.body.start).body[0]),
339
+
340
+ part);
335
341
 
336
342
  },
337
343
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/compiler",
3
3
  "description": "Marko template to JS compiler.",
4
- "version": "5.21.3",
4
+ "version": "5.21.4",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/marko/issues/new?template=Bug_report.md",
7
7
  "dependencies": {