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.1.3 to 3.1.4

53

dist/compiler-ssr.cjs.js

@@ -400,11 +400,7 @@ 'use strict';

const vnodeNodeTransforms = [...baseNodeTransforms, ...compilerDom.DOMNodeTransforms];
const vnodeDirectiveTransforms = {
...baseDirectiveTransforms,
...compilerDom.DOMDirectiveTransforms
};
const vnodeDirectiveTransforms = Object.assign(Object.assign({}, baseDirectiveTransforms), compilerDom.DOMDirectiveTransforms);
function createVNodeSlotBranch(props, children, parentContext) {
// apply a sub-transform using vnode-based transforms.
const rawOptions = rawOptionsMap.get(parentContext.root);
const subOptions = {
...rawOptions,
const subOptions = Object.assign(Object.assign({}, rawOptions), {
// overwrite with vnode-based transforms

@@ -414,8 +410,3 @@ nodeTransforms: [

...(rawOptions.nodeTransforms || [])
],
directiveTransforms: {
...vnodeDirectiveTransforms,
...(rawOptions.directiveTransforms || {})
}
};
], directiveTransforms: Object.assign(Object.assign({}, vnodeDirectiveTransforms), (rawOptions.directiveTransforms || {})) });
// wrap the children with a wrapper template for proper children treatment.

@@ -454,4 +445,4 @@ const wrapperNode = {

// inherit parent scope analysis state
childContext.scopes = { ...parentContext.scopes };
childContext.identifiers = { ...parentContext.identifiers };
childContext.scopes = Object.assign({}, parentContext.scopes);
childContext.identifiers = Object.assign({}, parentContext.identifiers);
childContext.imports = parentContext.imports;

@@ -1100,14 +1091,7 @@ // traverse

function compile(template, options = {}) {
options = {
...options,
// apply DOM-specific parsing options
...compilerDom.parserOptions,
ssr: true,
scopeId: options.mode === 'function' ? null : options.scopeId,
options = Object.assign(Object.assign(Object.assign({}, options), compilerDom.parserOptions), { ssr: true, scopeId: options.mode === 'function' ? null : options.scopeId,
// always prefix since compiler-ssr doesn't have size concern
prefixIdentifiers: true,
prefixIdentifiers: true,
// disable optimizations that are unnecessary for ssr
cacheHandlers: false,
hoistStatic: false
};
cacheHandlers: false, hoistStatic: false });
const ast = compilerDom.baseParse(template, options);

@@ -1117,6 +1101,3 @@ // Save raw options for AST. This is needed when performing sub-transforms

rawOptionsMap.set(ast, options);
compilerDom.transform(ast, {
...options,
hoistStatic: false,
nodeTransforms: [
compilerDom.transform(ast, Object.assign(Object.assign({}, options), { hoistStatic: false, nodeTransforms: [
ssrTransformIf,

@@ -1134,16 +1115,10 @@ ssrTransformFor,

...(options.nodeTransforms || []) // user transforms
],
directiveTransforms: {
], directiveTransforms: Object.assign({
// reusing core v-bind
bind: compilerDom.transformBind,
bind: compilerDom.transformBind,
// model and show has dedicated SSR handling
model: ssrTransformModel,
show: ssrTransformShow,
model: ssrTransformModel, show: ssrTransformShow,
// the following are ignored during SSR
on: compilerDom.noopDirectiveTransform,
cloak: compilerDom.noopDirectiveTransform,
once: compilerDom.noopDirectiveTransform,
...(options.directiveTransforms || {}) // user transforms
}
});
on: compilerDom.noopDirectiveTransform, cloak: compilerDom.noopDirectiveTransform, once: compilerDom.noopDirectiveTransform }, (options.directiveTransforms || {}) // user transforms
) }));
// traverse the template AST and convert into SSR codegen AST

@@ -1150,0 +1125,0 @@ // by replacing ast.codegenNode.

{
"name": "@vue/compiler-ssr",
"version": "3.1.3",
"version": "3.1.4",
"description": "@vue/compiler-ssr",

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

"dependencies": {
"@vue/shared": "3.1.3",
"@vue/compiler-dom": "3.1.3"
"@vue/shared": "3.1.4",
"@vue/compiler-dom": "3.1.4"
}
}
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