@vue/compiler-ssr-canary
Advanced tools
Comparing version 3.20240715.0-minor.0 to 3.20240812.0-minor.0
/** | ||
* @vue/compiler-ssr-canary v3.20240715.0-minor.0 | ||
* @vue/compiler-ssr-canary v3.20240812.0-minor.0 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -24,7 +24,13 @@ * @license MIT | ||
const SSR_RENDER_LIST = Symbol(`ssrRenderList`); | ||
const SSR_INCLUDE_BOOLEAN_ATTR = Symbol(`ssrIncludeBooleanAttr`); | ||
const SSR_INCLUDE_BOOLEAN_ATTR = Symbol( | ||
`ssrIncludeBooleanAttr` | ||
); | ||
const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); | ||
const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); | ||
const SSR_RENDER_DYNAMIC_MODEL = Symbol(`ssrRenderDynamicModel`); | ||
const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol(`ssrGetDynamicModelProps`); | ||
const SSR_RENDER_DYNAMIC_MODEL = Symbol( | ||
`ssrRenderDynamicModel` | ||
); | ||
const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol( | ||
`ssrGetDynamicModelProps` | ||
); | ||
const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); | ||
@@ -97,6 +103,3 @@ const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); | ||
const ssrTransformFor = compilerDom.createStructuralDirectiveTransform( | ||
"for", | ||
compilerDom.processFor | ||
); | ||
const ssrTransformFor = compilerDom.createStructuralDirectiveTransform("for", compilerDom.processFor); | ||
function ssrProcessFor(node, context, disableNestedFragments = false) { | ||
@@ -364,2 +367,21 @@ const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1); | ||
} | ||
} else if (directives.length && !node.children.length) { | ||
const tempId = `_temp${context.temps++}`; | ||
propsExp.arguments = [ | ||
compilerDom.createAssignmentExpression( | ||
compilerDom.createSimpleExpression(tempId, false), | ||
mergedProps | ||
) | ||
]; | ||
rawChildrenMap.set( | ||
node, | ||
compilerDom.createConditionalExpression( | ||
compilerDom.createSimpleExpression(`"textContent" in ${tempId}`, false), | ||
compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ | ||
compilerDom.createSimpleExpression(`${tempId}.textContent`, false) | ||
]), | ||
compilerDom.createSimpleExpression(`${tempId}.innerHTML ?? ''`, false), | ||
false | ||
) | ||
); | ||
} | ||
@@ -653,3 +675,3 @@ if (needTagForRuntime) { | ||
context.pushStringPart(`>`); | ||
processChildren(node, context, false, true); | ||
processChildren(node, context, false, true, true); | ||
context.pushStringPart(`</${tag.value.content}>`); | ||
@@ -656,0 +678,0 @@ } |
{ | ||
"name": "@vue/compiler-ssr-canary", | ||
"version": "3.20240715.0-minor.0", | ||
"version": "3.20240812.0-minor.0", | ||
"description": "@vue/compiler-ssr", | ||
@@ -31,5 +31,5 @@ "main": "dist/compiler-ssr.cjs.js", | ||
"dependencies": { | ||
"@vue/shared": "npm:@vue/shared-canary@3.20240715.0-minor.0", | ||
"@vue/compiler-dom": "npm:@vue/compiler-dom-canary@3.20240715.0-minor.0" | ||
"@vue/shared": "npm:@vue/shared-canary@3.20240812.0-minor.0", | ||
"@vue/compiler-dom": "npm:@vue/compiler-dom-canary@3.20240812.0-minor.0" | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
# @vue/compiler-ssr | ||
# @vue/compiler-ssr |
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
47500
1379
2
+ Added@vue/compiler-core-canary@3.20240812.0-minor.0(transitive)
+ Added@vue/compiler-dom-canary@3.20240812.0-minor.0(transitive)
+ Added@vue/shared-canary@3.20240812.0-minor.0(transitive)
+ Addedentities@5.0.0(transitive)
- Removed@vue/compiler-core-canary@3.20240715.0-minor.0(transitive)
- Removed@vue/compiler-dom-canary@3.20240715.0-minor.0(transitive)
- Removed@vue/shared-canary@3.20240715.0-minor.0(transitive)
- Removedentities@4.5.0(transitive)
Updated@vue/compiler-dom@npm:@vue/compiler-dom-canary@3.20240812.0-minor.0
Updated@vue/shared@npm:@vue/shared-canary@3.20240812.0-minor.0