@vue/compiler-ssr 3.2.23 → 3.2.27
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 +11 -16
- package/package.json +3 -3
package/dist/compiler-ssr.cjs.js
CHANGED
|
@@ -145,17 +145,16 @@ function createSSRCompilerError(code, loc) {
|
|
|
145
145
|
return compilerDom.createCompilerError(code, loc, SSRErrorMessages);
|
|
146
146
|
}
|
|
147
147
|
const SSRErrorMessages = {
|
|
148
|
-
[61 /*
|
|
149
|
-
[62 /*
|
|
150
|
-
[63 /*
|
|
151
|
-
[64 /* X_SSR_INVALID_AST_NODE */]: `Invalid AST node during SSR transform.`
|
|
148
|
+
[61 /* X_SSR_UNSAFE_ATTR_NAME */]: `Unsafe attribute name for SSR.`,
|
|
149
|
+
[62 /* X_SSR_NO_TELEPORT_TARGET */]: `Missing the 'to' prop on teleport element.`,
|
|
150
|
+
[63 /* X_SSR_INVALID_AST_NODE */]: `Invalid AST node during SSR transform.`
|
|
152
151
|
};
|
|
153
152
|
|
|
154
153
|
// Note: this is a 2nd-pass codegen transform.
|
|
155
154
|
function ssrProcessTeleport(node, context) {
|
|
156
155
|
const targetProp = compilerDom.findProp(node, 'to');
|
|
157
156
|
if (!targetProp) {
|
|
158
|
-
context.onError(createSSRCompilerError(
|
|
157
|
+
context.onError(createSSRCompilerError(62 /* X_SSR_NO_TELEPORT_TARGET */, node.loc));
|
|
159
158
|
return;
|
|
160
159
|
}
|
|
161
160
|
let target;
|
|
@@ -167,7 +166,7 @@ function ssrProcessTeleport(node, context) {
|
|
|
167
166
|
target = targetProp.exp;
|
|
168
167
|
}
|
|
169
168
|
if (!target) {
|
|
170
|
-
context.onError(createSSRCompilerError(
|
|
169
|
+
context.onError(createSSRCompilerError(62 /* X_SSR_NO_TELEPORT_TARGET */, targetProp.loc));
|
|
171
170
|
return;
|
|
172
171
|
}
|
|
173
172
|
const disabledProp = compilerDom.findProp(node, 'disabled', false, true /* allow empty */);
|
|
@@ -581,14 +580,10 @@ const ssrTransformElement = (node, context) => {
|
|
|
581
580
|
node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)];
|
|
582
581
|
}
|
|
583
582
|
}
|
|
584
|
-
else {
|
|
583
|
+
else if (!hasDynamicVBind) {
|
|
585
584
|
// Directive transforms.
|
|
586
585
|
const directiveTransform = context.directiveTransforms[prop.name];
|
|
587
|
-
if (
|
|
588
|
-
// no corresponding ssr directive transform found.
|
|
589
|
-
context.onError(createSSRCompilerError(61 /* X_SSR_CUSTOM_DIRECTIVE_NO_TRANSFORM */, prop.loc));
|
|
590
|
-
}
|
|
591
|
-
else if (!hasDynamicVBind) {
|
|
586
|
+
if (directiveTransform) {
|
|
592
587
|
const { props, ssrTagParts } = directiveTransform(prop, node, context);
|
|
593
588
|
if (ssrTagParts) {
|
|
594
589
|
openTag.push(...ssrTagParts);
|
|
@@ -628,7 +623,7 @@ const ssrTransformElement = (node, context) => {
|
|
|
628
623
|
]));
|
|
629
624
|
}
|
|
630
625
|
else {
|
|
631
|
-
context.onError(createSSRCompilerError(
|
|
626
|
+
context.onError(createSSRCompilerError(61 /* X_SSR_UNSAFE_ATTR_NAME */, key.loc));
|
|
632
627
|
}
|
|
633
628
|
}
|
|
634
629
|
}
|
|
@@ -689,7 +684,7 @@ function isTrueFalseValue(prop) {
|
|
|
689
684
|
function isTextareaWithValue(node, prop) {
|
|
690
685
|
return !!(node.tag === 'textarea' &&
|
|
691
686
|
prop.name === 'bind' &&
|
|
692
|
-
compilerDom.
|
|
687
|
+
compilerDom.isStaticArgOf(prop.arg, 'value'));
|
|
693
688
|
}
|
|
694
689
|
function mergeCall(call, arg) {
|
|
695
690
|
const existing = call.arguments[0];
|
|
@@ -823,7 +818,7 @@ function processChildren(children, context, asFragment = false, disableNestedFra
|
|
|
823
818
|
// TODO
|
|
824
819
|
break;
|
|
825
820
|
default:
|
|
826
|
-
context.onError(createSSRCompilerError(
|
|
821
|
+
context.onError(createSSRCompilerError(63 /* X_SSR_INVALID_AST_NODE */, child.loc));
|
|
827
822
|
// make sure we exhaust all possible types
|
|
828
823
|
const exhaustiveCheck = child;
|
|
829
824
|
return exhaustiveCheck;
|
|
@@ -855,7 +850,7 @@ function processChildren(children, context, asFragment = false, disableNestedFra
|
|
|
855
850
|
// `transformText` is not used during SSR compile.
|
|
856
851
|
break;
|
|
857
852
|
default:
|
|
858
|
-
context.onError(createSSRCompilerError(
|
|
853
|
+
context.onError(createSSRCompilerError(63 /* X_SSR_INVALID_AST_NODE */, child.loc));
|
|
859
854
|
// make sure we exhaust all possible types
|
|
860
855
|
const exhaustiveCheck = child;
|
|
861
856
|
return exhaustiveCheck;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-ssr",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.27",
|
|
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.27",
|
|
32
|
+
"@vue/compiler-dom": "3.2.27"
|
|
33
33
|
}
|
|
34
34
|
}
|