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

workbox-streams

Package Overview
Dependencies
Maintainers
6
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-streams - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0

44

build/workbox-streams.dev.js

@@ -5,2 +5,3 @@ this.workbox = this.workbox || {};

// @ts-ignore
try {

@@ -26,3 +27,2 @@ self['workbox:streams:7.0.0'] && _();

*/
function _getReaderFromSource(source) {

@@ -34,3 +34,2 @@ if (source instanceof Response) {

}
throw new WorkboxError_js.WorkboxError('opaque-streams-source', {

@@ -40,7 +39,5 @@ type: source.type

}
if (source instanceof ReadableStream) {
return source.getReader();
}
return new Response(source).body.getReader();

@@ -61,4 +58,2 @@ }

*/
function concatenate(sourcePromises) {

@@ -72,3 +67,2 @@ {

}
const readerPromises = sourcePromises.map(sourcePromise => {

@@ -95,5 +89,3 @@ return Promise.resolve(sourcePromise).then(source => {

}
i++;
if (i >= readerPromises.length) {

@@ -103,3 +95,2 @@ // Log all the messages in the group at once in a single group.

logger_js.logger.groupCollapsed(`Concatenating ${readerPromises.length} sources.`);
for (const message of logMessages) {

@@ -112,13 +103,10 @@ if (Array.isArray(message)) {

}
logger_js.logger.log('Finished reading all sources.');
logger_js.logger.groupEnd();
}
controller.close();
streamDeferred.resolve();
return;
} // The `pull` method is defined because we're inside it.
}
// The `pull` method is defined because we're inside it.
return this.pull(controller);

@@ -132,3 +120,2 @@ } else {

}
streamDeferred.reject(error);

@@ -138,3 +125,2 @@ throw error;

},
cancel() {

@@ -144,6 +130,4 @@ {

}
streamDeferred.resolve();
}
});

@@ -177,11 +161,8 @@ return {

*/
function createHeaders(headersInit = {}) {
// See https://github.com/GoogleChrome/workbox/issues/1461
const headers = new Headers(headersInit);
if (!headers.has('content-type')) {
headers.set('content-type', 'text/html');
}
return headers;

@@ -214,3 +195,2 @@ }

*/
function concatenateToResponse(sourcePromises, headersInit) {

@@ -249,3 +229,2 @@ const {

*/
function isSupported() {

@@ -278,3 +257,2 @@ return canConstructReadableStream_js.canConstructReadableStream();

*/
function strategy(sourceFunctions, headersInit) {

@@ -296,3 +274,2 @@ return async ({

});
if (isSupported()) {

@@ -303,19 +280,14 @@ const {

} = concatenateToResponse(sourcePromises, headersInit);
if (event) {
event.waitUntil(done);
}
return response;
}
{
logger_js.logger.log(`The current browser doesn't support creating response ` + `streams. Falling back to non-streaming response instead.`);
} // Fallback to waiting for everything to finish, and concatenating the
}
// Fallback to waiting for everything to finish, and concatenating the
// responses.
const blobPartsPromises = sourcePromises.map(async sourcePromise => {
const source = await sourcePromise;
if (source instanceof Response) {

@@ -332,5 +304,5 @@ return source.blob();

const blobParts = await Promise.all(blobPartsPromises);
const headers = createHeaders(headersInit); // Constructing a new Response from a Blob source is well-supported.
const headers = createHeaders(headersInit);
// Constructing a new Response from a Blob source is well-supported.
// So is constructing a new Blob from multiple source Blobs or strings.
return new Response(new Blob(blobParts), {

@@ -349,3 +321,3 @@ headers

}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private));
})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private);
//# sourceMappingURL=workbox-streams.dev.js.map

8

package.json
{
"name": "workbox-streams",
"version": "7.0.0",
"version": "7.1.0",
"license": "MIT",

@@ -26,6 +26,6 @@ "author": "Google's Web DevRel Team",

"dependencies": {
"workbox-core": "7.0.0",
"workbox-routing": "7.0.0"
"workbox-core": "7.1.0",
"workbox-routing": "7.1.0"
},
"gitHead": "c1d11636823e5e3a89520f7a531970a39304b14a"
"gitHead": "9e69c4269c35e2db9fbba4d13e4e6206c7b66d2a"
}
// @ts-ignore
try{self['workbox:streams:7.0.0']&&_()}catch(e){}
try{self['workbox:streams:7.1.0']&&_()}catch(e){}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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