From 369bad96b754fbcfe83611f3427740318d0ccaaf Mon Sep 17 00:00:00 2001 From: weyusi Date: Mon, 22 Apr 2019 20:08:50 +0930 Subject: [PATCH] refactor: use new method of accessing zlib constants "Accessing the constants directly from the module is currently still possible but is deprecated." https://nodejs.org/api/zlib.html#zlib_zlib_constants --- lib/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filter.js b/lib/filter.js index beab7f0..87297b0 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -115,7 +115,7 @@ function logicGzip () { assetPath.on('end', () => { if (assetTxt.length) { // gzip compress using highest level - zlib.gzip(assetTxt, { level: zlib.Z_BEST_COMPRESSION }, (err, Input) => { + zlib.gzip(assetTxt, { level: zlib.constants.Z_BEST_COMPRESSION }, (err, Input) => { if (!err) { // Save the compressed file to .gz route.set(path + '.gz', Input)