Skip to content

Commit

Permalink
fix: use 'readable-stream' instead of 'stream' (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
qm3ster authored Sep 29, 2020
1 parent 6cea539 commit 04184e1
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/pub.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var pump = require('pump')
var path = require('path')
var fs = require('fs')
var concat = require('concat-stream')
var Writable = require('stream').Writable
var Writable = require('readable-stream').Writable
var helpMe = require('help-me')({
dir: path.join(__dirname, '..', 'doc')
})
Expand Down
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var EventEmitter = require('events').EventEmitter
var Store = require('./store')
var mqttPacket = require('mqtt-packet')
var Writable = require('stream').Writable
var Writable = require('readable-stream').Writable
var inherits = require('inherits')
var reInterval = require('reinterval')
var validations = require('./validations')
Expand Down
2 changes: 1 addition & 1 deletion lib/connect/ali.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

var Transform = require('stream').Transform
var Transform = require('readable-stream').Transform
var duplexify = require('duplexify')

/* global FileReader */
Expand Down
2 changes: 1 addition & 1 deletion lib/connect/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const WS = require('ws')
const debug = require('debug')('mqttjs:ws')
const duplexify = require('duplexify')
const urlModule = require('url')
const Transform = require('stream').Transform
const Transform = require('readable-stream').Transform

let WSS_OPTIONS = [
'rejectUnauthorized',
Expand Down
2 changes: 1 addition & 1 deletion lib/connect/wx.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

var Transform = require('stream').Transform
var Transform = require('readable-stream').Transform
var duplexify = require('duplexify')

/* global wx */
Expand Down
2 changes: 1 addition & 1 deletion lib/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
var xtend = require('xtend')

var Readable = require('stream').Readable
var Readable = require('readable-stream').Readable
var streamsOpts = { objectMode: true }
var defaultStoreOptions = {
clean: true
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"minimist": "^1.2.5",
"mqtt-packet": "^6.3.2",
"pump": "^3.0.0",
"readable-stream": "^3.6.0",
"reinterval": "^1.1.0",
"split2": "^3.1.0",
"ws": "^7.3.1",
Expand Down
2 changes: 1 addition & 1 deletion test/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var abstractClientTests = require('./abstract_client')
var net = require('net')
var eos = require('end-of-stream')
var mqttPacket = require('mqtt-packet')
var Duplex = require('stream').Duplex
var Duplex = require('readable-stream').Duplex
var Connection = require('mqtt-connection')
var MqttServer = require('./server').MqttServer
var util = require('util')
Expand Down
2 changes: 1 addition & 1 deletion test/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

var Transform = require('stream').Transform
var Transform = require('readable-stream').Transform

module.exports.testStream = function () {
return new Transform({
Expand Down

0 comments on commit 04184e1

Please sign in to comment.