@vue/compiler-ssr 3.2.44 → 3.2.45
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/compiler-ssr.cjs.js +12 -12
- package/package.json +3 -3
package/dist/compiler-ssr.cjs.js
CHANGED
|
@@ -166,16 +166,16 @@ function createSSRCompilerError(code, loc) {
|
|
|
166
166
|
return compilerDom.createCompilerError(code, loc, SSRErrorMessages);
|
|
167
167
|
}
|
|
168
168
|
const SSRErrorMessages = {
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
169
|
+
[62 /* SSRErrorCodes.X_SSR_UNSAFE_ATTR_NAME */]: `Unsafe attribute name for SSR.`,
|
|
170
|
+
[63 /* SSRErrorCodes.X_SSR_NO_TELEPORT_TARGET */]: `Missing the 'to' prop on teleport element.`,
|
|
171
|
+
[64 /* SSRErrorCodes.X_SSR_INVALID_AST_NODE */]: `Invalid AST node during SSR transform.`
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
// Note: this is a 2nd-pass codegen transform.
|
|
175
175
|
function ssrProcessTeleport(node, context) {
|
|
176
176
|
const targetProp = compilerDom.findProp(node, 'to');
|
|
177
177
|
if (!targetProp) {
|
|
178
|
-
context.onError(createSSRCompilerError(
|
|
178
|
+
context.onError(createSSRCompilerError(63 /* SSRErrorCodes.X_SSR_NO_TELEPORT_TARGET */, node.loc));
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
181
|
let target;
|
|
@@ -187,7 +187,7 @@ function ssrProcessTeleport(node, context) {
|
|
|
187
187
|
target = targetProp.exp;
|
|
188
188
|
}
|
|
189
189
|
if (!target) {
|
|
190
|
-
context.onError(createSSRCompilerError(
|
|
190
|
+
context.onError(createSSRCompilerError(63 /* SSRErrorCodes.X_SSR_NO_TELEPORT_TARGET */, targetProp.loc));
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
const disabledProp = compilerDom.findProp(node, 'disabled', false, true /* allow empty */);
|
|
@@ -396,7 +396,7 @@ const ssrTransformElement = (node, context) => {
|
|
|
396
396
|
]));
|
|
397
397
|
}
|
|
398
398
|
else {
|
|
399
|
-
context.onError(createSSRCompilerError(
|
|
399
|
+
context.onError(createSSRCompilerError(62 /* SSRErrorCodes.X_SSR_UNSAFE_ATTR_NAME */, key.loc));
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
}
|
|
@@ -931,7 +931,7 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
|
|
|
931
931
|
// TODO
|
|
932
932
|
break;
|
|
933
933
|
default:
|
|
934
|
-
context.onError(createSSRCompilerError(
|
|
934
|
+
context.onError(createSSRCompilerError(64 /* SSRErrorCodes.X_SSR_INVALID_AST_NODE */, child.loc));
|
|
935
935
|
// make sure we exhaust all possible types
|
|
936
936
|
const exhaustiveCheck = child;
|
|
937
937
|
return exhaustiveCheck;
|
|
@@ -963,7 +963,7 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
|
|
|
963
963
|
// `transformText` is not used during SSR compile.
|
|
964
964
|
break;
|
|
965
965
|
default:
|
|
966
|
-
context.onError(createSSRCompilerError(
|
|
966
|
+
context.onError(createSSRCompilerError(64 /* SSRErrorCodes.X_SSR_INVALID_AST_NODE */, child.loc));
|
|
967
967
|
// make sure we exhaust all possible types
|
|
968
968
|
const exhaustiveCheck = child;
|
|
969
969
|
return exhaustiveCheck;
|
|
@@ -984,7 +984,7 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
984
984
|
function checkDuplicatedValue() {
|
|
985
985
|
const value = compilerDom.findProp(node, 'value');
|
|
986
986
|
if (value) {
|
|
987
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
987
|
+
context.onError(compilerDom.createDOMCompilerError(58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
990
|
if (node.tagType === 0 /* ElementTypes.ELEMENT */) {
|
|
@@ -1041,7 +1041,7 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
break;
|
|
1043
1043
|
case 'file':
|
|
1044
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
1044
|
+
context.onError(compilerDom.createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
|
|
1045
1045
|
break;
|
|
1046
1046
|
default:
|
|
1047
1047
|
checkDuplicatedValue();
|
|
@@ -1063,7 +1063,7 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
else if (node.tag === 'select') ;
|
|
1065
1065
|
else {
|
|
1066
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
1066
|
+
context.onError(compilerDom.createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
|
|
1067
1067
|
}
|
|
1068
1068
|
return res;
|
|
1069
1069
|
}
|
|
@@ -1083,7 +1083,7 @@ function findValueBinding(node) {
|
|
|
1083
1083
|
|
|
1084
1084
|
const ssrTransformShow = (dir, node, context) => {
|
|
1085
1085
|
if (!dir.exp) {
|
|
1086
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
1086
|
+
context.onError(compilerDom.createDOMCompilerError(59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */));
|
|
1087
1087
|
}
|
|
1088
1088
|
return {
|
|
1089
1089
|
props: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-ssr",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.45",
|
|
4
4
|
"description": "@vue/compiler-ssr",
|
|
5
5
|
"main": "dist/compiler-ssr.cjs.js",
|
|
6
6
|
"types": "dist/compiler-ssr.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vue/shared": "3.2.
|
|
32
|
-
"@vue/compiler-dom": "3.2.
|
|
31
|
+
"@vue/shared": "3.2.45",
|
|
32
|
+
"@vue/compiler-dom": "3.2.45"
|
|
33
33
|
}
|
|
34
34
|
}
|