marko 5.39.49 → 5.39.50

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.
@@ -773,7 +773,8 @@ function getClassHydrationMode(file, visited = new Set()) {
773
773
 
774
774
  visited.add(fileName);
775
775
 
776
- if (meta.component) {
776
+ // A legacy `w-bind` widget can register through a dependency instead of `component`.
777
+ if (meta.component || meta.widgetBind) {
777
778
  return meta.classHydration = CLASS_HYDRATION_SELF;
778
779
  }
779
780
 
@@ -10,14 +10,13 @@ function enter(path) {
10
10
  'You must provide a promise argument to the "<await>" tag, eg: "<await(promise)>".'
11
11
  );
12
12
  } else if (args.length > 1) {
13
- const {
14
- loc: { start }
15
- } = args[1].node;
16
- const {
17
- loc: { end }
18
- } = args[args.length - 1].node;
13
+ // A built argument has no loc, so the error then marks the tag.
14
+ const first = args[1].node;
15
+ const last = args[args.length - 1].node;
19
16
  throw path.hub.file.buildCodeFrameError(
20
- { loc: { start, end } },
17
+ first.loc && last.loc ?
18
+ { loc: { start: first.loc.start, end: last.loc.end } } :
19
+ path.node,
21
20
  'You can only pass one argument to the "<await>" tag.'
22
21
  );
23
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.39.49",
3
+ "version": "5.39.50",
4
4
  "private": false,
5
5
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
6
6
  "keywords": [
@@ -67,8 +67,8 @@
67
67
  },
68
68
  "types": "index.d.ts",
69
69
  "dependencies": {
70
- "@marko/compiler": "^5.42.16",
71
- "@marko/runtime-tags": "^6.4.10",
70
+ "@marko/compiler": "^5.42.17",
71
+ "@marko/runtime-tags": "^6.4.11",
72
72
  "app-module-path": "^2.2.0",
73
73
  "argly": "^1.2.0",
74
74
  "browser-refresh-client": "1.1.4",
@@ -83,7 +83,7 @@
83
83
  "warp10": "^2.1.0"
84
84
  },
85
85
  "devDependencies": {
86
- "marko": "5.39.49"
86
+ "marko": "5.39.50"
87
87
  },
88
88
  "engines": {
89
89
  "node": ">=22.12.0"
@@ -773,7 +773,8 @@ function getClassHydrationMode(file, visited = new Set()) {
773
773
 
774
774
  visited.add(fileName);
775
775
 
776
- if (meta.component) {
776
+ // A legacy `w-bind` widget can register through a dependency instead of `component`.
777
+ if (meta.component || meta.widgetBind) {
777
778
  return (meta.classHydration = CLASS_HYDRATION_SELF);
778
779
  }
779
780
 
@@ -10,14 +10,13 @@ export function enter(path) {
10
10
  'You must provide a promise argument to the "<await>" tag, eg: "<await(promise)>".',
11
11
  );
12
12
  } else if (args.length > 1) {
13
- const {
14
- loc: { start },
15
- } = args[1].node;
16
- const {
17
- loc: { end },
18
- } = args[args.length - 1].node;
13
+ // A built argument has no loc, so the error then marks the tag.
14
+ const first = args[1].node;
15
+ const last = args[args.length - 1].node;
19
16
  throw path.hub.file.buildCodeFrameError(
20
- { loc: { start, end } },
17
+ first.loc && last.loc
18
+ ? { loc: { start: first.loc.start, end: last.loc.end } }
19
+ : path.node,
21
20
  'You can only pass one argument to the "<await>" tag.',
22
21
  );
23
22
  }