@vue/compiler-ssr 3.5.6 → 3.5.7

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.6
2
+ * @vue/compiler-ssr v3.5.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -62,7 +62,7 @@ const ssrTransformIf = compilerDom.createStructuralDirectiveTransform(
62
62
  /^(if|else|else-if)$/,
63
63
  compilerDom.processIf
64
64
  );
65
- function ssrProcessIf(node, context, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
65
+ function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) {
66
66
  const [rootBranch] = node.branches;
67
67
  const ifStatement = compilerDom.createIfStatement(
68
68
  rootBranch.condition,
@@ -86,7 +86,7 @@ function ssrProcessIf(node, context, disableNestedFragments = false, disableComm
86
86
  currentIf.alternate = branchBlockStatement;
87
87
  }
88
88
  }
89
- if (!currentIf.alternate && !disableCommentAsIfAlternate) {
89
+ if (!currentIf.alternate && !disableComment) {
90
90
  currentIf.alternate = compilerDom.createBlockStatement([
91
91
  compilerDom.createCallExpression(`_push`, ["`<!---->`"])
92
92
  ]);
@@ -991,7 +991,7 @@ function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) {
991
991
  withSlotScopeId
992
992
  );
993
993
  }
994
- function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
994
+ function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableComment = false) {
995
995
  if (asFragment) {
996
996
  context.pushStringPart(`<!--[-->`);
997
997
  }
@@ -1027,7 +1027,9 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
1027
1027
  context.pushStringPart(shared.escapeHtml(child.content));
1028
1028
  break;
1029
1029
  case 3:
1030
- context.pushStringPart(`<!--${child.content}-->`);
1030
+ if (!disableComment) {
1031
+ context.pushStringPart(`<!--${child.content}-->`);
1032
+ }
1031
1033
  break;
1032
1034
  case 5:
1033
1035
  context.pushStringPart(
@@ -1037,12 +1039,7 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
1037
1039
  );
1038
1040
  break;
1039
1041
  case 9:
1040
- ssrProcessIf(
1041
- child,
1042
- context,
1043
- disableNestedFragments,
1044
- disableCommentAsIfAlternate
1045
- );
1042
+ ssrProcessIf(child, context, disableNestedFragments, disableComment);
1046
1043
  break;
1047
1044
  case 11:
1048
1045
  ssrProcessFor(child, context, disableNestedFragments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-ssr",
3
- "version": "3.5.6",
3
+ "version": "3.5.7",
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.6",
32
- "@vue/compiler-dom": "3.5.6"
31
+ "@vue/shared": "3.5.7",
32
+ "@vue/compiler-dom": "3.5.7"
33
33
  }
34
34
  }