@vue/compiler-ssr 3.2.7 → 3.2.11
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 +15 -15
- package/package.json +3 -3
package/dist/compiler-ssr.cjs.js
CHANGED
|
@@ -145,17 +145,17 @@ function createSSRCompilerError(code, loc) {
|
|
|
145
145
|
return compilerDom.createCompilerError(code, loc, SSRErrorMessages);
|
|
146
146
|
}
|
|
147
147
|
const SSRErrorMessages = {
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
148
|
+
[61 /* X_SSR_CUSTOM_DIRECTIVE_NO_TRANSFORM */]: `Custom directive is missing corresponding SSR transform and will be ignored.`,
|
|
149
|
+
[62 /* X_SSR_UNSAFE_ATTR_NAME */]: `Unsafe attribute name for SSR.`,
|
|
150
|
+
[63 /* X_SSR_NO_TELEPORT_TARGET */]: `Missing the 'to' prop on teleport element.`,
|
|
151
|
+
[64 /* X_SSR_INVALID_AST_NODE */]: `Invalid AST node during SSR transform.`
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
// Note: this is a 2nd-pass codegen transform.
|
|
155
155
|
function ssrProcessTeleport(node, context) {
|
|
156
156
|
const targetProp = compilerDom.findProp(node, 'to');
|
|
157
157
|
if (!targetProp) {
|
|
158
|
-
context.onError(createSSRCompilerError(
|
|
158
|
+
context.onError(createSSRCompilerError(63 /* X_SSR_NO_TELEPORT_TARGET */, node.loc));
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
let target;
|
|
@@ -167,7 +167,7 @@ function ssrProcessTeleport(node, context) {
|
|
|
167
167
|
target = targetProp.exp;
|
|
168
168
|
}
|
|
169
169
|
if (!target) {
|
|
170
|
-
context.onError(createSSRCompilerError(
|
|
170
|
+
context.onError(createSSRCompilerError(63 /* X_SSR_NO_TELEPORT_TARGET */, targetProp.loc));
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
const disabledProp = compilerDom.findProp(node, 'disabled', false, true /* allow empty */);
|
|
@@ -574,7 +574,7 @@ const ssrTransformElement = (node, context) => {
|
|
|
574
574
|
node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)];
|
|
575
575
|
}
|
|
576
576
|
else if (prop.name === 'slot') {
|
|
577
|
-
context.onError(compilerDom.createCompilerError(
|
|
577
|
+
context.onError(compilerDom.createCompilerError(40 /* X_V_SLOT_MISPLACED */, prop.loc));
|
|
578
578
|
}
|
|
579
579
|
else if (isTextareaWithValue(node, prop) && prop.exp) {
|
|
580
580
|
if (!hasDynamicVBind) {
|
|
@@ -586,7 +586,7 @@ const ssrTransformElement = (node, context) => {
|
|
|
586
586
|
const directiveTransform = context.directiveTransforms[prop.name];
|
|
587
587
|
if (!directiveTransform) {
|
|
588
588
|
// no corresponding ssr directive transform found.
|
|
589
|
-
context.onError(createSSRCompilerError(
|
|
589
|
+
context.onError(createSSRCompilerError(61 /* X_SSR_CUSTOM_DIRECTIVE_NO_TRANSFORM */, prop.loc));
|
|
590
590
|
}
|
|
591
591
|
else if (!hasDynamicVBind) {
|
|
592
592
|
const { props, ssrTagParts } = directiveTransform(prop, node, context);
|
|
@@ -628,7 +628,7 @@ const ssrTransformElement = (node, context) => {
|
|
|
628
628
|
]));
|
|
629
629
|
}
|
|
630
630
|
else {
|
|
631
|
-
context.onError(createSSRCompilerError(
|
|
631
|
+
context.onError(createSSRCompilerError(62 /* X_SSR_UNSAFE_ATTR_NAME */, key.loc));
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
}
|
|
@@ -823,7 +823,7 @@ function processChildren(children, context, asFragment = false, disableNestedFra
|
|
|
823
823
|
// TODO
|
|
824
824
|
break;
|
|
825
825
|
default:
|
|
826
|
-
context.onError(createSSRCompilerError(
|
|
826
|
+
context.onError(createSSRCompilerError(64 /* X_SSR_INVALID_AST_NODE */, child.loc));
|
|
827
827
|
// make sure we exhaust all possible types
|
|
828
828
|
const exhaustiveCheck = child;
|
|
829
829
|
return exhaustiveCheck;
|
|
@@ -855,7 +855,7 @@ function processChildren(children, context, asFragment = false, disableNestedFra
|
|
|
855
855
|
// `transformText` is not used during SSR compile.
|
|
856
856
|
break;
|
|
857
857
|
default:
|
|
858
|
-
context.onError(createSSRCompilerError(
|
|
858
|
+
context.onError(createSSRCompilerError(64 /* X_SSR_INVALID_AST_NODE */, child.loc));
|
|
859
859
|
// make sure we exhaust all possible types
|
|
860
860
|
const exhaustiveCheck = child;
|
|
861
861
|
return exhaustiveCheck;
|
|
@@ -876,7 +876,7 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
876
876
|
function checkDuplicatedValue() {
|
|
877
877
|
const value = compilerDom.findProp(node, 'value');
|
|
878
878
|
if (value) {
|
|
879
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
879
|
+
context.onError(compilerDom.createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
if (node.tagType === 0 /* ELEMENT */) {
|
|
@@ -933,7 +933,7 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
933
933
|
}
|
|
934
934
|
break;
|
|
935
935
|
case 'file':
|
|
936
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
936
|
+
context.onError(compilerDom.createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
|
|
937
937
|
break;
|
|
938
938
|
default:
|
|
939
939
|
checkDuplicatedValue();
|
|
@@ -955,7 +955,7 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
955
955
|
}
|
|
956
956
|
else if (node.tag === 'select') ;
|
|
957
957
|
else {
|
|
958
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
958
|
+
context.onError(compilerDom.createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
|
|
959
959
|
}
|
|
960
960
|
return res;
|
|
961
961
|
}
|
|
@@ -975,7 +975,7 @@ function findValueBinding(node) {
|
|
|
975
975
|
|
|
976
976
|
const ssrTransformShow = (dir, node, context) => {
|
|
977
977
|
if (!dir.exp) {
|
|
978
|
-
context.onError(compilerDom.createDOMCompilerError(
|
|
978
|
+
context.onError(compilerDom.createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */));
|
|
979
979
|
}
|
|
980
980
|
return {
|
|
981
981
|
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.11",
|
|
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/vue-next/tree/master/packages/compiler-ssr#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vue/shared": "3.2.
|
|
32
|
-
"@vue/compiler-dom": "3.2.
|
|
31
|
+
"@vue/shared": "3.2.11",
|
|
32
|
+
"@vue/compiler-dom": "3.2.11"
|
|
33
33
|
}
|
|
34
34
|
}
|