@vue/compiler-ssr-canary
Advanced tools
Comparing version 3.20240415.0 to 3.20240422.0
/** | ||
* @vue/compiler-ssr-canary v3.20240415.0 | ||
* @vue/compiler-ssr-canary v3.20240422.0 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -59,3 +59,3 @@ * @license MIT | ||
); | ||
function ssrProcessIf(node, context, disableNestedFragments = false) { | ||
function ssrProcessIf(node, context, disableNestedFragments = false, disableCommentAsIfAlternate = false) { | ||
const [rootBranch] = node.branches; | ||
@@ -84,3 +84,3 @@ const ifStatement = compilerDom.createIfStatement( | ||
} | ||
if (!currentIf.alternate) { | ||
if (!currentIf.alternate && !disableCommentAsIfAlternate) { | ||
currentIf.alternate = compilerDom.createBlockStatement([ | ||
@@ -375,3 +375,6 @@ compilerDom.createCallExpression(`_push`, ["`<!---->`"]) | ||
if (prop.name === "html" && prop.exp) { | ||
rawChildrenMap.set(node, prop.exp); | ||
rawChildrenMap.set( | ||
node, | ||
compilerDom.createCompoundExpression([`(`, prop.exp, `) ?? ''`]) | ||
); | ||
} else if (prop.name === "text" && prop.exp) { | ||
@@ -623,2 +626,9 @@ node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; | ||
*/ | ||
true, | ||
/** | ||
* TransitionGroup filters out comment children at runtime and thus | ||
* doesn't expect comments to be present during hydration. We need to | ||
* account for that by disabling the empty comment that is otherwise | ||
* rendered for a falsy v-if that has no v-else specified. (#6715) | ||
*/ | ||
true | ||
@@ -642,3 +652,3 @@ ); | ||
} else { | ||
processChildren(node, context, true, true); | ||
processChildren(node, context, true, true, true); | ||
} | ||
@@ -961,3 +971,3 @@ } | ||
} | ||
function processChildren(parent, context, asFragment = false, disableNestedFragments = false) { | ||
function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableCommentAsIfAlternate = false) { | ||
if (asFragment) { | ||
@@ -1008,3 +1018,8 @@ context.pushStringPart(`<!--[-->`); | ||
case 9: | ||
ssrProcessIf(child, context, disableNestedFragments); | ||
ssrProcessIf( | ||
child, | ||
context, | ||
disableNestedFragments, | ||
disableCommentAsIfAlternate | ||
); | ||
break; | ||
@@ -1011,0 +1026,0 @@ case 11: |
{ | ||
"name": "@vue/compiler-ssr-canary", | ||
"version": "3.20240415.0", | ||
"version": "3.20240422.0", | ||
"description": "@vue/compiler-ssr", | ||
@@ -31,5 +31,5 @@ "main": "dist/compiler-ssr.cjs.js", | ||
"dependencies": { | ||
"@vue/shared": "npm:@vue/shared-canary@3.20240415.0", | ||
"@vue/compiler-dom": "npm:@vue/compiler-dom-canary@3.20240415.0" | ||
"@vue/shared": "npm:@vue/shared-canary@3.20240422.0", | ||
"@vue/compiler-dom": "npm:@vue/compiler-dom-canary@3.20240422.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46502
1352
+ Added@vue/compiler-core-canary@3.20240422.0(transitive)
+ Added@vue/compiler-dom-canary@3.20240422.0(transitive)
+ Added@vue/shared-canary@3.20240422.0(transitive)
- Removed@vue/compiler-core-canary@3.20240415.0(transitive)
- Removed@vue/compiler-dom-canary@3.20240415.0(transitive)
- Removed@vue/shared-canary@3.20240415.0(transitive)
Updated@vue/compiler-dom@npm:@vue/compiler-dom-canary@3.20240422.0