Socket
Socket
Sign inDemoInstall

compression

Package Overview
Dependencies
11
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.3 to 1.7.4

10

HISTORY.md

@@ -0,1 +1,11 @@

1.7.4 / 2019-03-18
==================
* deps: compressible@~2.0.16
- Mark `text/less` as compressible
- deps: mime-db@'>= 1.38.0 < 2'
* deps: on-headers@~1.0.2
- Fix `res.writeHead` patch missing return value
* perf: prevent unnecessary buffer copy
1.7.3 / 2018-07-15

@@ -2,0 +12,0 @@ ==================

15

index.js

@@ -88,3 +88,3 @@ /*!

return stream
? stream.write(Buffer.from(chunk, encoding))
? stream.write(toBuffer(chunk, encoding))
: _write.call(this, chunk, encoding)

@@ -116,3 +116,3 @@ }

return chunk
? stream.end(Buffer.from(chunk, encoding))
? stream.end(toBuffer(chunk, encoding))
: stream.end()

@@ -280,1 +280,12 @@ }

}
/**
* Coerce arguments to Buffer
* @private
*/
function toBuffer (chunk, encoding) {
return !Buffer.isBuffer(chunk)
? Buffer.from(chunk, encoding)
: chunk
}

24

package.json
{
"name": "compression",
"description": "Node.js compression middleware",
"version": "1.7.3",
"version": "1.7.4",
"contributors": [

@@ -14,5 +14,5 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>",

"bytes": "3.0.0",
"compressible": "~2.0.14",
"compressible": "~2.0.16",
"debug": "2.6.9",
"on-headers": "~1.0.1",
"on-headers": "~1.0.2",
"safe-buffer": "5.1.2",

@@ -23,12 +23,12 @@ "vary": "~1.1.2"

"after": "0.8.2",
"eslint": "4.19.1",
"eslint-config-standard": "11.0.0",
"eslint-plugin-import": "2.13.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-promise": "3.8.0",
"eslint-plugin-standard": "3.1.0",
"eslint": "5.15.1",
"eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-markdown": "1.0.0",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-standard": "4.0.0",
"istanbul": "0.4.5",
"mocha": "2.5.3",
"supertest": "1.1.0"
"mocha": "6.0.2",
"supertest": "4.0.0"
},

@@ -35,0 +35,0 @@ "files": [

@@ -154,3 +154,3 @@ # compression

var app = express()
app.use(compression({filter: shouldCompress}))
app.use(compression({ filter: shouldCompress }))

@@ -157,0 +157,0 @@ function shouldCompress (req, res) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc