Socket
Socket
Sign inDemoInstall

@vue/compiler-ssr

Package Overview
Dependencies
Maintainers
14
Versions
226
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.0-beta.5 to 3.0.0-beta.6

81

dist/compiler-ssr.cjs.js

@@ -46,3 +46,3 @@ 'use strict';

const ssrTransformIf = compilerDom.createStructuralDirectiveTransform(/^(if|else|else-if)$/, compilerDom.processIf);
// This is called during the 2nd transform pass to construct the SSR-sepcific
// This is called during the 2nd transform pass to construct the SSR-specific
// codegen nodes.

@@ -82,3 +82,3 @@ function ssrProcessIf(node, context) {

const ssrTransformFor = compilerDom.createStructuralDirectiveTransform('for', compilerDom.processFor);
// This is called during the 2nd transform pass to construct the SSR-sepcific
// This is called during the 2nd transform pass to construct the SSR-specific
// codegen nodes.

@@ -129,3 +129,4 @@ function ssrProcessFor(node, context) {

[58 /* X_SSR_UNSAFE_ATTR_NAME */]: `Unsafe attribute name for SSR.`,
[59 /* X_SSR_NO_TELEPORT_TARGET */]: `No target prop on teleport element.`
[59 /* X_SSR_NO_TELEPORT_TARGET */]: `No target prop on teleport element.`,
[60 /* X_SSR_INVALID_AST_NODE */]: `Invalid AST node during ssr transform`
};

@@ -686,25 +687,55 @@

const child = children[i];
if (child.type === 1 /* ELEMENT */) {
if (child.tagType === 0 /* ELEMENT */) {
ssrProcessElement(child, context);
}
else if (child.tagType === 1 /* COMPONENT */) {
ssrProcessComponent(child, context);
}
else if (child.tagType === 2 /* SLOT */) {
ssrProcessSlotOutlet(child, context);
}
switch (child.type) {
case 1 /* ELEMENT */:
switch (child.tagType) {
case 0 /* ELEMENT */:
ssrProcessElement(child, context);
break;
case 1 /* COMPONENT */:
ssrProcessComponent(child, context);
break;
case 2 /* SLOT */:
ssrProcessSlotOutlet(child, context);
break;
case 3 /* TEMPLATE */:
// TODO
break;
default:
context.onError(createSSRCompilerError(60 /* X_SSR_INVALID_AST_NODE */, child.loc));
// make sure we exhaust all possible types
const exhaustiveCheck = child;
return exhaustiveCheck;
}
break;
case 2 /* TEXT */:
context.pushStringPart(shared.escapeHtml(child.content));
break;
case 3 /* COMMENT */:
// no need to escape comment here because the AST can only
// contain valid comments.
context.pushStringPart(`<!--${child.content}-->`);
break;
case 5 /* INTERPOLATION */:
context.pushStringPart(compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [child.content]));
break;
case 9 /* IF */:
ssrProcessIf(child, context);
break;
case 11 /* FOR */:
ssrProcessFor(child, context);
break;
case 10 /* IF_BRANCH */:
// no-op - handled by ssrProcessIf
break;
case 12 /* TEXT_CALL */:
case 8 /* COMPOUND_EXPRESSION */:
// no-op - these two types can never appear as template child node since
// `transformText` is not used during SSR compile.
break;
default:
context.onError(createSSRCompilerError(60 /* X_SSR_INVALID_AST_NODE */, child.loc));
// make sure we exhaust all possible types
const exhaustiveCheck = child;
return exhaustiveCheck;
}
else if (child.type === 2 /* TEXT */) {
context.pushStringPart(shared.escapeHtml(child.content));
}
else if (child.type === 5 /* INTERPOLATION */) {
context.pushStringPart(compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [child.content]));
}
else if (child.type === 9 /* IF */) {
ssrProcessIf(child, context);
}
else if (child.type === 11 /* FOR */) {
ssrProcessFor(child, context);
}
}

@@ -711,0 +742,0 @@ if (asFragment) {

{
"name": "@vue/compiler-ssr",
"version": "3.0.0-beta.5",
"version": "3.0.0-beta.6",
"description": "@vue/compiler-ssr",

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

"dependencies": {
"@vue/shared": "3.0.0-beta.5",
"@vue/compiler-dom": "3.0.0-beta.5"
"@vue/shared": "3.0.0-beta.6",
"@vue/compiler-dom": "3.0.0-beta.6"
}
}
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