@vue/server-renderer 3.4.0-rc.1 → 3.4.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server-renderer.cjs.js +9 -5
- package/dist/server-renderer.cjs.prod.js +4 -2
- package/dist/server-renderer.d.ts +1 -1
- package/dist/server-renderer.esm-browser.js +104 -93
- package/dist/server-renderer.esm-browser.prod.js +1 -1
- package/dist/server-renderer.esm-bundler.js +48 -12
- package/package.json +4 -4
|
@@ -205,7 +205,7 @@ function pushWarningContext(vnode) {
|
|
|
205
205
|
function popWarningContext() {
|
|
206
206
|
stack.pop();
|
|
207
207
|
}
|
|
208
|
-
function warn(msg, ...args) {
|
|
208
|
+
function warn$1(msg, ...args) {
|
|
209
209
|
pauseTracking();
|
|
210
210
|
const instance = stack.length ? stack[stack.length - 1].component : null;
|
|
211
211
|
const appWarnHandler = instance && instance.appContext.config.warnHandler;
|
|
@@ -332,7 +332,7 @@ const ErrorTypeStrings = {
|
|
|
332
332
|
[11]: "app warnHandler",
|
|
333
333
|
[12]: "ref function",
|
|
334
334
|
[13]: "async component loader",
|
|
335
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://
|
|
335
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
336
336
|
};
|
|
337
337
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
338
338
|
let res;
|
|
@@ -379,7 +379,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
|
|
|
379
379
|
if (contextVNode) {
|
|
380
380
|
pushWarningContext(contextVNode);
|
|
381
381
|
}
|
|
382
|
-
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
382
|
+
warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
383
383
|
if (contextVNode) {
|
|
384
384
|
popWarningContext();
|
|
385
385
|
}
|
|
@@ -442,6 +442,8 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
442
442
|
return name ? classify(name) : isRoot ? `App` : `Anonymous`;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
const warn = warn$1 ;
|
|
446
|
+
|
|
445
447
|
function ssrRenderList(source, renderItem) {
|
|
446
448
|
if (shared.isArray(source) || shared.isString(source)) {
|
|
447
449
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
@@ -637,7 +639,9 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
|
|
|
637
639
|
let p = hasAsyncSetup ? res : Promise.resolve();
|
|
638
640
|
if (prefetches) {
|
|
639
641
|
p = p.then(
|
|
640
|
-
() => Promise.all(
|
|
642
|
+
() => Promise.all(
|
|
643
|
+
prefetches.map((prefetch) => prefetch.call(instance.proxy))
|
|
644
|
+
)
|
|
641
645
|
).catch(() => {
|
|
642
646
|
});
|
|
643
647
|
}
|
|
@@ -994,7 +998,7 @@ function renderToStream(input, context = {}) {
|
|
|
994
998
|
return renderToNodeStream(input, context);
|
|
995
999
|
}
|
|
996
1000
|
function renderToNodeStream(input, context = {}) {
|
|
997
|
-
const stream = new (require("stream")).Readable({ read() {
|
|
1001
|
+
const stream = new (require("node:stream")).Readable({ read() {
|
|
998
1002
|
} }) ;
|
|
999
1003
|
if (!stream) {
|
|
1000
1004
|
throw new Error(
|
|
@@ -362,7 +362,9 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
|
|
|
362
362
|
let p = hasAsyncSetup ? res : Promise.resolve();
|
|
363
363
|
if (prefetches) {
|
|
364
364
|
p = p.then(
|
|
365
|
-
() => Promise.all(
|
|
365
|
+
() => Promise.all(
|
|
366
|
+
prefetches.map((prefetch) => prefetch.call(instance.proxy))
|
|
367
|
+
)
|
|
366
368
|
).catch(() => {
|
|
367
369
|
});
|
|
368
370
|
}
|
|
@@ -719,7 +721,7 @@ function renderToStream(input, context = {}) {
|
|
|
719
721
|
return renderToNodeStream(input, context);
|
|
720
722
|
}
|
|
721
723
|
function renderToNodeStream(input, context = {}) {
|
|
722
|
-
const stream = new (require("stream")).Readable({ read() {
|
|
724
|
+
const stream = new (require("node:stream")).Readable({ read() {
|
|
723
725
|
} }) ;
|
|
724
726
|
if (!stream) {
|
|
725
727
|
throw new Error(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { VNode, ComponentInternalInstance, App, Slots, Component } from 'vue';
|
|
3
|
-
import { Readable, Writable } from 'stream';
|
|
3
|
+
import { Readable, Writable } from 'node:stream';
|
|
4
4
|
import { ComponentPublicInstance, Directive } from '@vue/runtime-core';
|
|
5
5
|
export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared';
|
|
6
6
|
|