Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vue/compiler-ssr

Package Overview
Dependencies
Maintainers
1
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/compiler-ssr - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

44

dist/compiler-ssr.cjs.js

@@ -24,3 +24,2 @@ 'use strict';

const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`);
const SSR_RESOLVE_CSS_VARS = Symbol(`ssrResolveCssVars`);
const ssrHelpers = {

@@ -42,4 +41,3 @@ [SSR_INTERPOLATE]: `ssrInterpolate`,

[SSR_RENDER_TELEPORT]: `ssrRenderTeleport`,
[SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`,
[SSR_RESOLVE_CSS_VARS]: `ssrResolveCssVars`
[SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`
};

@@ -659,3 +657,3 @@ // Note: these are helpers imported from @vue/server-renderer

const context = createSSRTransformContext(ast, options);
// inject <style vars> resolution
// inject SFC <style> CSS variables
// we do this instead of inlining the expression to ensure the vars are

@@ -665,8 +663,3 @@ // only resolved once per render

const varsExp = compilerDom.processExpression(compilerDom.createSimpleExpression(options.ssrCssVars, false), compilerDom.createTransformContext(compilerDom.createRoot([]), options));
context.body.push(compilerDom.createCompoundExpression([
`const _cssVars = _${ssrHelpers[SSR_RESOLVE_CSS_VARS]}(`,
varsExp,
options.scopeId ? `, ${JSON.stringify(options.scopeId)}` : ``,
`)`
]));
context.body.push(compilerDom.createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]));
}

@@ -948,3 +941,2 @@ const isFragment = ast.children.length > 1 && ast.children.some(c => !compilerDom.isText(c));

}
context.helper(SSR_RESOLVE_CSS_VARS);
if (node.type === 10 /* IF_BRANCH */) {

@@ -964,10 +956,24 @@ for (const child of node.children) {

!compilerDom.findDir(node, 'for')) {
node.props.push({
type: 7 /* DIRECTIVE */,
name: 'bind',
arg: undefined,
exp: compilerDom.createSimpleExpression(`_cssVars`, false),
modifiers: [],
loc: compilerDom.locStub
});
if (compilerDom.isBuiltInType(node.tag, 'Suspense')) {
for (const child of node.children) {
if (child.type === 1 /* ELEMENT */ &&
child.tagType === 3 /* TEMPLATE */) {
// suspense slot
child.children.forEach(injectCssVars);
}
else {
injectCssVars(child);
}
}
}
else {
node.props.push({
type: 7 /* DIRECTIVE */,
name: 'bind',
arg: undefined,
exp: compilerDom.createSimpleExpression(`_cssVars`, false),
modifiers: [],
loc: compilerDom.locStub
});
}
}

@@ -974,0 +980,0 @@ }

{
"name": "@vue/compiler-ssr",
"version": "3.0.2",
"version": "3.0.3",
"description": "@vue/compiler-ssr",

@@ -31,5 +31,5 @@ "main": "dist/compiler-ssr.cjs.js",

"dependencies": {
"@vue/shared": "3.0.2",
"@vue/compiler-dom": "3.0.2"
"@vue/shared": "3.0.3",
"@vue/compiler-dom": "3.0.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc