@marko/translator-default 6.0.4 → 6.0.6

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.
package/dist/index.js CHANGED
@@ -497,6 +497,7 @@ function getRuntimeEntryFiles(output, optimize) {
497
497
  `${base}runtime/components/attach-detach.js`,
498
498
  `${base}runtime/helpers/assign.js`,
499
499
  `${base}runtime/helpers/class-value.js`,
500
+ `${base}runtime/helpers/of-fallback.js`,
500
501
  `${base}runtime/helpers/dynamic-tag.js`,
501
502
  `${base}runtime/helpers/attr-tag.js`,
502
503
  `${base}runtime/helpers/merge.js`,
@@ -67,7 +67,10 @@ function _default(path) {
67
67
  if (parsed.id) {
68
68
  (0, _babelUtils.diagnosticDeprecate)(path, {
69
69
  label: "Component class should not have a name.",
70
- loc: parsed.id.loc
70
+ loc: parsed.id.loc,
71
+ fix() {
72
+ parsed.id = null;
73
+ }
71
74
  });
72
75
  }
73
76
 
@@ -44,10 +44,13 @@ function exit(path) {
44
44
  block
45
45
  );
46
46
  } else if (ofAttr) {
47
- let ofAttrValue = _compiler.types.logicalExpression(
48
- "||",
49
- ofAttr.value,
50
- _compiler.types.arrayExpression([])
47
+ let ofAttrValue = _compiler.types.callExpression(
48
+ (0, _babelUtils.importDefault)(
49
+ path.hub.file,
50
+ "marko/src/runtime/helpers/of-fallback.js",
51
+ "of_fallback"
52
+ ),
53
+ [ofAttr.value]
51
54
  );
52
55
  allowedAttributes.push("of");
53
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/translator-default",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
4
4
  "description": "Translates Marko templates to the default Marko runtime.",
5
5
  "keywords": [
6
6
  "babel",
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.24.1",
32
- "@marko/babel-utils": "^6.4.3",
32
+ "@marko/babel-utils": "^6.5.1",
33
33
  "magic-string": "^0.30.8",
34
34
  "self-closing-tags": "^1.0.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@marko/compiler": "^5.37.3",
38
- "marko": "^5.35.3"
37
+ "@marko/compiler": "^5.37.4",
38
+ "marko": "^5.35.7"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@marko/compiler": "^5.16.1",