Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unpipe package and use native unpipe method #543

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading