Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
chore: update dependency: pump version 2.0 (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte authored and daviddias committed Jan 12, 2018
1 parent f56d7fc commit 210dabb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"promisify-es6": "^1.0.3",
"pull-defer": "^0.2.2",
"pull-pushable": "^2.1.2",
"pump": "^1.0.3",
"pump": "^2.0.0",
"qs": "^6.5.1",
"readable-stream": "^2.3.3",
"stream-http": "^2.7.2",
Expand Down
3 changes: 2 additions & 1 deletion src/log/tail.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module.exports = (send) => {
if (err) {
return callback(err)
}
const outputStream = pump(response, ndjson.parse())
const outputStream = ndjson.parse()
pump(response, outputStream)
callback(null, outputStream)
})
})
Expand Down
5 changes: 3 additions & 2 deletions src/utils/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ class ConverterStream extends TransformStream {
}

function converter (inputStream, callback) {
const outputStream = pump(
const outputStream = new ConverterStream()
pump(
inputStream,
new ConverterStream(),
outputStream,
(err) => {
if (err) {
callback(err)
Expand Down
3 changes: 2 additions & 1 deletion src/utils/send-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ function onRes (buffer, cb) {

// Return a stream of JSON objects
if (chunkedObjects && isJson) {
const outputStream = pump(res, ndjson.parse())
const outputStream = ndjson.parse()
pump(res, outputStream)
res.on('end', () => {
let err = res.trailers['x-stream-error']
if (err) {
Expand Down

0 comments on commit 210dabb

Please sign in to comment.