Skip to content

Commit

Permalink
Readable stream v3 (#105)
Browse files Browse the repository at this point in the history
* fix(package): update readable-stream to version 3.1.0

Closes #101

* No longer need to emit close in _destroy()
  • Loading branch information
ralphtheninja authored Dec 17, 2018
1 parent 1b97da2 commit 53bfc8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions level-ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,8 @@ WriteStream.prototype._final = function (cb) {
}

WriteStream.prototype._destroy = function (err, cb) {
var self = this

this._buffer = null
cb(err)

// TODO when the next readable-stream (mirroring node v10) is out:
// remove this. Since nodejs/node#19836, streams always emit close.
process.nextTick(function () {
self.emit('close')
})
}

module.exports = WriteStream
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"main": "level-ws.js",
"dependencies": {
"inherits": "^2.0.3",
"readable-stream": "^2.2.8",
"readable-stream": "^3.1.0",
"xtend": "^4.0.1"
},
"devDependencies": {
Expand Down

0 comments on commit 53bfc8c

Please sign in to comment.