@vue/server-renderer
Advanced tools
Comparing version 3.2.1 to 3.2.2
@@ -508,5 +508,3 @@ 'use strict'; | ||
.then(buffer => unrollBuffer$1(buffer, stream)) | ||
.then(() => { | ||
stream.push(null); | ||
}) | ||
.then(() => stream.push(null)) | ||
.catch(error => { | ||
@@ -583,18 +581,27 @@ stream.destroy(error); | ||
const encoder = new TextEncoder(); | ||
writer.ready.then(() => { | ||
renderToSimpleStream(input, context, { | ||
push(content) { | ||
// #4287 CloudFlare workers do not implement `ready` property | ||
let hasReady = false; | ||
try { | ||
hasReady = shared.isPromise(writer.ready); | ||
} | ||
catch (e) { } | ||
renderToSimpleStream(input, context, { | ||
push(content) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (hasReady) { | ||
yield writer.ready; | ||
} | ||
if (content != null) { | ||
writer.write(encoder.encode(content)); | ||
return writer.write(encoder.encode(content)); | ||
} | ||
else { | ||
writer.close(); | ||
return writer.close(); | ||
} | ||
}, | ||
destroy(err) { | ||
// TODO better error handling? | ||
console.log(err); | ||
writer.close(); | ||
} | ||
}); | ||
}); | ||
}, | ||
destroy(err) { | ||
// TODO better error handling? | ||
console.log(err); | ||
writer.close(); | ||
} | ||
}); | ||
@@ -601,0 +608,0 @@ } |
@@ -505,5 +505,3 @@ 'use strict'; | ||
.then(buffer => unrollBuffer$1(buffer, stream)) | ||
.then(() => { | ||
stream.push(null); | ||
}) | ||
.then(() => stream.push(null)) | ||
.catch(error => { | ||
@@ -580,18 +578,27 @@ stream.destroy(error); | ||
const encoder = new TextEncoder(); | ||
writer.ready.then(() => { | ||
renderToSimpleStream(input, context, { | ||
push(content) { | ||
// #4287 CloudFlare workers do not implement `ready` property | ||
let hasReady = false; | ||
try { | ||
hasReady = shared.isPromise(writer.ready); | ||
} | ||
catch (e) { } | ||
renderToSimpleStream(input, context, { | ||
push(content) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (hasReady) { | ||
yield writer.ready; | ||
} | ||
if (content != null) { | ||
writer.write(encoder.encode(content)); | ||
return writer.write(encoder.encode(content)); | ||
} | ||
else { | ||
writer.close(); | ||
return writer.close(); | ||
} | ||
}, | ||
destroy(err) { | ||
// TODO better error handling? | ||
console.log(err); | ||
writer.close(); | ||
} | ||
}); | ||
}); | ||
}, | ||
destroy(err) { | ||
// TODO better error handling? | ||
console.log(err); | ||
writer.close(); | ||
} | ||
}); | ||
@@ -598,0 +605,0 @@ } |
@@ -490,5 +490,3 @@ import { ssrContextKey, warn as warn$1, Fragment, Static, Comment, Text, mergeProps, ssrUtils, createApp, createVNode } from 'vue'; | ||
.then(buffer => unrollBuffer$1(buffer, stream)) | ||
.then(() => { | ||
stream.push(null); | ||
}) | ||
.then(() => stream.push(null)) | ||
.catch(error => { | ||
@@ -563,18 +561,27 @@ stream.destroy(error); | ||
const encoder = new TextEncoder(); | ||
writer.ready.then(() => { | ||
renderToSimpleStream(input, context, { | ||
push(content) { | ||
// #4287 CloudFlare workers do not implement `ready` property | ||
let hasReady = false; | ||
try { | ||
hasReady = isPromise(writer.ready); | ||
} | ||
catch (e) { } | ||
renderToSimpleStream(input, context, { | ||
push(content) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (hasReady) { | ||
yield writer.ready; | ||
} | ||
if (content != null) { | ||
writer.write(encoder.encode(content)); | ||
return writer.write(encoder.encode(content)); | ||
} | ||
else { | ||
writer.close(); | ||
return writer.close(); | ||
} | ||
}, | ||
destroy(err) { | ||
// TODO better error handling? | ||
console.log(err); | ||
writer.close(); | ||
} | ||
}); | ||
}); | ||
}, | ||
destroy(err) { | ||
// TODO better error handling? | ||
console.log(err); | ||
writer.close(); | ||
} | ||
}); | ||
@@ -581,0 +588,0 @@ } |
{ | ||
"name": "@vue/server-renderer", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "@vue/server-renderer", | ||
@@ -34,8 +34,8 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"vue": "3.2.1" | ||
"vue": "3.2.2" | ||
}, | ||
"dependencies": { | ||
"@vue/shared": "3.2.1", | ||
"@vue/compiler-ssr": "3.2.1" | ||
"@vue/shared": "3.2.2", | ||
"@vue/compiler-ssr": "3.2.2" | ||
} | ||
} |
@@ -95,4 +95,3 @@ # @vue/server-renderer | ||
input: App | VNode, | ||
context?: SSRContext, | ||
Ctor?: { new (): ReadableStream } | ||
context?: SSRContext | ||
): ReadableStream | ||
@@ -99,0 +98,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108979
2721
177
+ Added@vue/compiler-core@3.2.2(transitive)
+ Added@vue/compiler-dom@3.2.2(transitive)
+ Added@vue/compiler-ssr@3.2.2(transitive)
+ Added@vue/reactivity@3.2.2(transitive)
+ Added@vue/runtime-core@3.2.2(transitive)
+ Added@vue/runtime-dom@3.2.2(transitive)
+ Added@vue/shared@3.2.2(transitive)
+ Addedvue@3.2.2(transitive)
- Removed@vue/compiler-core@3.2.1(transitive)
- Removed@vue/compiler-dom@3.2.1(transitive)
- Removed@vue/compiler-ssr@3.2.1(transitive)
- Removed@vue/reactivity@3.2.1(transitive)
- Removed@vue/runtime-core@3.2.1(transitive)
- Removed@vue/runtime-dom@3.2.1(transitive)
- Removed@vue/shared@3.2.1(transitive)
- Removedvue@3.2.1(transitive)
Updated@vue/compiler-ssr@3.2.2
Updated@vue/shared@3.2.2