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

@vue/server-renderer

Package Overview
Dependencies
Maintainers
1
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/server-renderer - npm Package Compare versions

Comparing version 3.0.0-rc.9 to 3.0.0-rc.10

52

dist/server-renderer.cjs.js

@@ -160,8 +160,16 @@ 'use strict';

const res = setupComponent(instance, true /* isSSR */);
if (shared.isPromise(res)) {
return res
.catch(err => {
vue.warn(`[@vue/server-renderer]: Uncaught error in async setup:\n`, err);
})
.then(() => renderComponentSubTree(instance));
const hasAsyncSetup = shared.isPromise(res);
const prefetch = vnode.type.serverPrefetch;
if (hasAsyncSetup || prefetch) {
let p = hasAsyncSetup
? res.catch(err => {
vue.warn(`[@vue/server-renderer]: Uncaught error in async setup:\n`, err);
})
: Promise.resolve();
if (prefetch) {
p = p.then(() => prefetch.call(instance.proxy)).catch(err => {
vue.warn(`[@vue/server-renderer]: Uncaught error in serverPrefetch:\n`, err);
});
}
return p.then(() => renderComponentSubTree(instance));
}

@@ -176,3 +184,3 @@ else {

if (shared.isFunction(comp)) {
renderVNode(push, renderComponentRoot(instance), instance);
renderVNode(push, (instance.subTree = renderComponentRoot(instance)), instance);
}

@@ -206,3 +214,3 @@ else {

else if (instance.render) {
renderVNode(push, renderComponentRoot(instance), instance);
renderVNode(push, (instance.subTree = renderComponentRoot(instance)), instance);
}

@@ -266,11 +274,3 @@ else {

}
if (scopeId) {
openTag += ` ${scopeId}`;
const treeOwnerId = parentComponent && parentComponent.type.__scopeId;
// vnode's own scopeId and the current rendering component's scopeId is
// different - this is a slot content node.
if (treeOwnerId && treeOwnerId !== scopeId) {
openTag += ` ${treeOwnerId}-s`;
}
}
openTag += resolveScopeId(scopeId, vnode, parentComponent);
push(openTag + `>`);

@@ -304,2 +304,20 @@ if (!shared.isVoidTag(tag)) {

}
function resolveScopeId(scopeId, vnode, parentComponent) {
let res = ``;
if (scopeId) {
res = ` ${scopeId}`;
}
if (parentComponent) {
const treeOwnerId = parentComponent.type.__scopeId;
// vnode's own scopeId and the current rendering component's scopeId is
// different - this is a slot content node.
if (treeOwnerId && treeOwnerId !== scopeId) {
res += ` ${treeOwnerId}-s`;
}
if (vnode === parentComponent.subTree) {
res += resolveScopeId(parentComponent.vnode.scopeId, parentComponent.vnode, parentComponent.parent);
}
}
return res;
}
function applySSRDirectives(vnode, rawProps, dirs) {

@@ -306,0 +324,0 @@ const toMerge = [];

@@ -157,8 +157,16 @@ 'use strict';

const res = setupComponent(instance, true /* isSSR */);
if (shared.isPromise(res)) {
return res
.catch(err => {
vue.warn(`[@vue/server-renderer]: Uncaught error in async setup:\n`, err);
})
.then(() => renderComponentSubTree(instance));
const hasAsyncSetup = shared.isPromise(res);
const prefetch = vnode.type.serverPrefetch;
if (hasAsyncSetup || prefetch) {
let p = hasAsyncSetup
? res.catch(err => {
vue.warn(`[@vue/server-renderer]: Uncaught error in async setup:\n`, err);
})
: Promise.resolve();
if (prefetch) {
p = p.then(() => prefetch.call(instance.proxy)).catch(err => {
vue.warn(`[@vue/server-renderer]: Uncaught error in serverPrefetch:\n`, err);
});
}
return p.then(() => renderComponentSubTree(instance));
}

@@ -173,3 +181,3 @@ else {

if (shared.isFunction(comp)) {
renderVNode(push, renderComponentRoot(instance), instance);
renderVNode(push, (instance.subTree = renderComponentRoot(instance)), instance);
}

@@ -203,3 +211,3 @@ else {

else if (instance.render) {
renderVNode(push, renderComponentRoot(instance), instance);
renderVNode(push, (instance.subTree = renderComponentRoot(instance)), instance);
}

@@ -263,11 +271,3 @@ else {

}
if (scopeId) {
openTag += ` ${scopeId}`;
const treeOwnerId = parentComponent && parentComponent.type.__scopeId;
// vnode's own scopeId and the current rendering component's scopeId is
// different - this is a slot content node.
if (treeOwnerId && treeOwnerId !== scopeId) {
openTag += ` ${treeOwnerId}-s`;
}
}
openTag += resolveScopeId(scopeId, vnode, parentComponent);
push(openTag + `>`);

@@ -301,2 +301,20 @@ if (!shared.isVoidTag(tag)) {

}
function resolveScopeId(scopeId, vnode, parentComponent) {
let res = ``;
if (scopeId) {
res = ` ${scopeId}`;
}
if (parentComponent) {
const treeOwnerId = parentComponent.type.__scopeId;
// vnode's own scopeId and the current rendering component's scopeId is
// different - this is a slot content node.
if (treeOwnerId && treeOwnerId !== scopeId) {
res += ` ${treeOwnerId}-s`;
}
if (vnode === parentComponent.subTree) {
res += resolveScopeId(parentComponent.vnode.scopeId, parentComponent.vnode, parentComponent.parent);
}
}
return res;
}
function applySSRDirectives(vnode, rawProps, dirs) {

@@ -303,0 +321,0 @@ const toMerge = [];

{
"name": "@vue/server-renderer",
"version": "3.0.0-rc.9",
"version": "3.0.0-rc.10",
"description": "@vue/server-renderer",

@@ -18,3 +18,4 @@ "main": "index.js",

"type": "git",
"url": "git+https://github.com/vuejs/vue-next.git"
"url": "git+https://github.com/vuejs/vue-next.git",
"directory": "packages/server-renderer"
},

@@ -31,8 +32,8 @@ "keywords": [

"peerDependencies": {
"vue": "3.0.0-rc.9"
"vue": "3.0.0-rc.10"
},
"dependencies": {
"@vue/shared": "3.0.0-rc.9",
"@vue/compiler-ssr": "3.0.0-rc.9"
"@vue/shared": "3.0.0-rc.10",
"@vue/compiler-ssr": "3.0.0-rc.10"
}
}
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