@vue/compiler-ssr 3.5.20 → 3.5.22

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-ssr v3.5.20
2
+ * @vue/compiler-ssr v3.5.22
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -59,7 +59,7 @@ const ssrHelpers = {
59
59
  compilerDom.registerRuntimeHelpers(ssrHelpers);
60
60
 
61
61
  const ssrTransformIf = compilerDom.createStructuralDirectiveTransform(
62
- /^(if|else|else-if)$/,
62
+ /^(?:if|else|else-if)$/,
63
63
  compilerDom.processIf
64
64
  );
65
65
  function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) {
@@ -298,6 +298,14 @@ const ssrTransformElement = (node, context) => {
298
298
  const hasCustomDir = node.props.some(
299
299
  (p) => p.type === 7 && !shared.isBuiltInDirective(p.name)
300
300
  );
301
+ const vShowPropIndex = node.props.findIndex(
302
+ (i) => i.type === 7 && i.name === "show"
303
+ );
304
+ if (vShowPropIndex !== -1) {
305
+ const vShowProp = node.props[vShowPropIndex];
306
+ node.props.splice(vShowPropIndex, 1);
307
+ node.props.push(vShowProp);
308
+ }
301
309
  const needMergeProps = hasDynamicVBind || hasCustomDir;
302
310
  if (needMergeProps) {
303
311
  const { props, directives } = compilerDom.buildProps(
@@ -1365,6 +1373,7 @@ function compile(source, options = {}) {
1365
1373
  ...options,
1366
1374
  hoistStatic: false,
1367
1375
  nodeTransforms: [
1376
+ compilerDom.transformVBindShorthand,
1368
1377
  ssrTransformIf,
1369
1378
  ssrTransformFor,
1370
1379
  compilerDom.trackVForSlotScopes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-ssr",
3
- "version": "3.5.20",
3
+ "version": "3.5.22",
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.5.20",
32
- "@vue/compiler-dom": "3.5.20"
31
+ "@vue/shared": "3.5.22",
32
+ "@vue/compiler-dom": "3.5.22"
33
33
  }
34
34
  }