Skip to content

Commit

Permalink
remove unpipe package and use native unpipe() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillip9587 committed Oct 22, 2024
1 parent 966bc9d commit e390856
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
unreleased
=========================

* remove `unpipe` package and use native `unpipe()` method

2.0.1 / 2024-09-10
=========================

Expand Down
3 changes: 1 addition & 2 deletions lib/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var destroy = require('destroy')
var getBody = require('raw-body')
var iconv = require('iconv-lite')
var onFinished = require('on-finished')
var unpipe = require('unpipe')
var zlib = require('zlib')

/**
Expand Down Expand Up @@ -96,7 +95,7 @@ function read (req, res, next, parse, debug, options) {

// unpipe from stream and destroy
if (stream !== req) {
unpipe(req)
req.unpipe()
destroy(stream, true)
}

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"on-finished": "2.4.1",
"qs": "6.13.0",
"raw-body": "^3.0.0",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
"type-is": "~1.6.18"
},
"devDependencies": {
"eslint": "8.34.0",
Expand Down

0 comments on commit e390856

Please sign in to comment.