@marko/compiler 5.37.10 → 5.37.12
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.
|
@@ -39,7 +39,7 @@ Object.assign(_printer.default.prototype, {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
this.token(node.escape ? "${" : "$!{");
|
|
42
|
-
this.print(node.value
|
|
42
|
+
this.print(node.value);
|
|
43
43
|
this.token("}");
|
|
44
44
|
},
|
|
45
45
|
MarkoScriptlet(node, parent) {
|
|
@@ -56,12 +56,12 @@ Object.assign(_printer.default.prototype, {
|
|
|
56
56
|
!statementCouldHaveUnenclosedNewline(node.body[0]))
|
|
57
57
|
{
|
|
58
58
|
// TODO should determine if node has unenclosed newlines.
|
|
59
|
-
this.print(node.body[0]
|
|
59
|
+
this.print(node.body[0]);
|
|
60
60
|
} else {
|
|
61
61
|
this.token("{");
|
|
62
62
|
this.newline();
|
|
63
63
|
this.indent();
|
|
64
|
-
this.printSequence(node.body
|
|
64
|
+
this.printSequence(node.body);
|
|
65
65
|
this.dedent();
|
|
66
66
|
this.token("}");
|
|
67
67
|
}
|
|
@@ -69,7 +69,7 @@ Object.assign(_printer.default.prototype, {
|
|
|
69
69
|
MarkoClass(node) {
|
|
70
70
|
this.token("class");
|
|
71
71
|
this.token(" ");
|
|
72
|
-
this.print(node.body
|
|
72
|
+
this.print(node.body);
|
|
73
73
|
},
|
|
74
74
|
MarkoAttribute(node) {
|
|
75
75
|
const value = node.value;
|
|
@@ -84,7 +84,7 @@ Object.assign(_printer.default.prototype, {
|
|
|
84
84
|
|
|
85
85
|
if (node.arguments && node.arguments.length) {
|
|
86
86
|
this.token("(");
|
|
87
|
-
this.printList(node.arguments
|
|
87
|
+
this.printList(node.arguments);
|
|
88
88
|
this.token(")");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -95,18 +95,18 @@ Object.assign(_printer.default.prototype, {
|
|
|
95
95
|
!(value.id || value.async || value.generator))
|
|
96
96
|
{
|
|
97
97
|
this.token("(");
|
|
98
|
-
this.printList(value.params
|
|
98
|
+
this.printList(value.params);
|
|
99
99
|
this.token(") ");
|
|
100
|
-
this.print(value.body
|
|
100
|
+
this.print(value.body);
|
|
101
101
|
} else {
|
|
102
102
|
this.token(node.bound ? ":=" : "=");
|
|
103
|
-
printWithParansIfNeeded.call(this, value
|
|
103
|
+
printWithParansIfNeeded.call(this, value);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
MarkoSpreadAttribute(node) {
|
|
108
108
|
this.token("...");
|
|
109
|
-
printWithParansIfNeeded.call(this, node.value
|
|
109
|
+
printWithParansIfNeeded.call(this, node.value);
|
|
110
110
|
},
|
|
111
111
|
MarkoText(node, parent) {
|
|
112
112
|
const parentBody = parent.body;
|
|
@@ -136,7 +136,7 @@ Object.assign(_printer.default.prototype, {
|
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
MarkoTagBody(node) {
|
|
139
|
-
this.printSequence(node.body,
|
|
139
|
+
this.printSequence(node.body, { indent: true });
|
|
140
140
|
},
|
|
141
141
|
MarkoTag(node) {
|
|
142
142
|
const isDynamicTag = !t.isStringLiteral(node.name);
|
|
@@ -158,7 +158,7 @@ Object.assign(_printer.default.prototype, {
|
|
|
158
158
|
} else {
|
|
159
159
|
if (isDynamicTag) {
|
|
160
160
|
this.token("${");
|
|
161
|
-
this.print(node.name
|
|
161
|
+
this.print(node.name);
|
|
162
162
|
this.token("}");
|
|
163
163
|
} else {
|
|
164
164
|
this.token(tagName);
|
|
@@ -166,22 +166,22 @@ Object.assign(_printer.default.prototype, {
|
|
|
166
166
|
|
|
167
167
|
if (node.typeArguments) {
|
|
168
168
|
this.token("<");
|
|
169
|
-
this.printList(node.typeArguments.params
|
|
169
|
+
this.printList(node.typeArguments.params);
|
|
170
170
|
this.token(">");
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
if (node.var) {
|
|
174
174
|
this.token("/");
|
|
175
|
-
this.print(node.var
|
|
175
|
+
this.print(node.var);
|
|
176
176
|
|
|
177
177
|
if (node.var.typeAnnotation) {
|
|
178
|
-
this.print(node.var.typeAnnotation
|
|
178
|
+
this.print(node.var.typeAnnotation);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
if (node.arguments && node.arguments.length) {
|
|
183
183
|
this.token("(");
|
|
184
|
-
this.printList(node.arguments
|
|
184
|
+
this.printList(node.arguments);
|
|
185
185
|
this.token(")");
|
|
186
186
|
}
|
|
187
187
|
|
|
@@ -191,11 +191,11 @@ Object.assign(_printer.default.prototype, {
|
|
|
191
191
|
this.token(" ");
|
|
192
192
|
}
|
|
193
193
|
this.token("<");
|
|
194
|
-
this.printList(node.body.typeParameters.params
|
|
194
|
+
this.printList(node.body.typeParameters.params);
|
|
195
195
|
this.token(">");
|
|
196
196
|
}
|
|
197
197
|
this.token("|");
|
|
198
|
-
this.printList(node.body.params
|
|
198
|
+
this.printList(node.body.params);
|
|
199
199
|
this.token("|");
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -206,7 +206,7 @@ Object.assign(_printer.default.prototype, {
|
|
|
206
206
|
this.token(" ");
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
this.printJoin(node.attributes,
|
|
209
|
+
this.printJoin(node.attributes, { separator: spaceSeparator });
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -220,7 +220,7 @@ Object.assign(_printer.default.prototype, {
|
|
|
220
220
|
} else {
|
|
221
221
|
this.token(">");
|
|
222
222
|
this.newline();
|
|
223
|
-
this.print(node.body
|
|
223
|
+
this.print(node.body);
|
|
224
224
|
this.token("</");
|
|
225
225
|
if (!isDynamicTag) {
|
|
226
226
|
this.token(tagName);
|
|
@@ -234,14 +234,14 @@ function spaceSeparator() {
|
|
|
234
234
|
this.token(" ");
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
function printWithParansIfNeeded(value
|
|
237
|
+
function printWithParansIfNeeded(value) {
|
|
238
238
|
const needsParans = expressionCouldHaveUnenclosedWhitespace(value);
|
|
239
239
|
|
|
240
240
|
if (needsParans) {
|
|
241
241
|
this.token("(");
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
this.print(value
|
|
244
|
+
this.print(value);
|
|
245
245
|
|
|
246
246
|
if (needsParans) {
|
|
247
247
|
this.token(")");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/compiler",
|
|
3
|
-
"version": "5.37.
|
|
3
|
+
"version": "5.37.12",
|
|
4
4
|
"description": "Marko template to JS compiler.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babel",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@babel/traverse": "^7.25.3",
|
|
67
67
|
"@babel/types": "^7.25.2",
|
|
68
68
|
"@luxass/strip-json-comments": "^1.3.2",
|
|
69
|
-
"@marko/babel-utils": "^6.5.
|
|
69
|
+
"@marko/babel-utils": "^6.5.6",
|
|
70
70
|
"complain": "^1.6.0",
|
|
71
71
|
"he": "^1.2.0",
|
|
72
72
|
"htmljs-parser": "^5.5.2",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"source-map-support": "^0.5.21"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@marko/translator-default": "^6.0.
|
|
83
|
+
"@marko/translator-default": "^6.0.14"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|