balena-request
Advanced tools
Comparing version 11.4.2-increase-hw-f6a1223c27c2614e32c51a278569d17e38d92d54 to 11.4.2-klutchell-zlib-flush-env-5225683fc040ecaef373247dd425a7fca38f20fe
@@ -122,3 +122,13 @@ "use strict"; | ||
}; | ||
// Allow overriding this behaviour by setting the ZLIB_FLUSH env var | ||
// to one of the allowed zlib flush values (process.env.ZLIB_FLUSH="Z_NO_FLUSH"). | ||
// https://github.com/nodejs/node/blob/master/doc/api/zlib.md#zlib-constants | ||
if (process.env.ZLIB_FLUSH && zlib.constants[process.env.ZLIB_FLUSH]) { | ||
zlibOptions = { | ||
flush: zlib.constants[process.env.ZLIB_FLUSH], | ||
finishFlush: zlib.constants[process.env.ZLIB_FLUSH], | ||
}; | ||
} | ||
const gunzip = zlib.createGunzip(zlibOptions); | ||
gunzip.on('error', (e) => output.emit('error', e)); | ||
// Uncompress after or before piping through progress | ||
@@ -125,0 +135,0 @@ // depending on the response length available to us |
@@ -260,3 +260,2 @@ "use strict"; | ||
if (!IS_BROWSER) { | ||
opts.highWaterMark = 1024 * 1024; // about 1MB | ||
if (!headers['Accept-Encoding']) { | ||
@@ -263,0 +262,0 @@ headers['Accept-Encoding'] = 'compress, gzip'; |
@@ -8,5 +8,5 @@ # Change Log | ||
# v11.4.2 | ||
## (2021-09-02) | ||
## (2021-09-20) | ||
* increase node fetch buffer size [Zane Hitchcox] | ||
* Allow overriding the default zlib flush setting [Kyle Harding] | ||
@@ -13,0 +13,0 @@ # v11.4.1 |
@@ -140,3 +140,14 @@ /* | ||
// Allow overriding this behaviour by setting the ZLIB_FLUSH env var | ||
// to one of the allowed zlib flush values (process.env.ZLIB_FLUSH="Z_NO_FLUSH"). | ||
// https://github.com/nodejs/node/blob/master/doc/api/zlib.md#zlib-constants | ||
if (process.env.ZLIB_FLUSH && zlib.constants[process.env.ZLIB_FLUSH]) { | ||
zlibOptions = { | ||
flush: zlib.constants[process.env.ZLIB_FLUSH], | ||
finishFlush: zlib.constants[process.env.ZLIB_FLUSH], | ||
}; | ||
} | ||
const gunzip = zlib.createGunzip(zlibOptions); | ||
gunzip.on('error', (e) => output.emit('error', e)); | ||
@@ -143,0 +154,0 @@ // Uncompress after or before piping through progress |
@@ -274,3 +274,2 @@ /* | ||
if (!IS_BROWSER) { | ||
opts.highWaterMark = 1024 * 1024; // about 1MB | ||
if (!headers['Accept-Encoding']) { | ||
@@ -277,0 +276,0 @@ headers['Accept-Encoding'] = 'compress, gzip'; |
{ | ||
"name": "balena-request", | ||
"version": "11.4.2-increase-hw-f6a1223c27c2614e32c51a278569d17e38d92d54", | ||
"version": "11.4.2-klutchell-zlib-flush-env-5225683fc040ecaef373247dd425a7fca38f20fe", | ||
"description": "Balena HTTP client", | ||
@@ -67,4 +67,4 @@ "main": "build/request.js", | ||
"versionist": { | ||
"publishedAt": "2021-09-02T19:55:29.953Z" | ||
"publishedAt": "2021-09-20T14:39:59.868Z" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
175644
1918
8