diff --git a/bin/pub.js b/bin/pub.js index 94b066b40..fb7d0d63f 100755 --- a/bin/pub.js +++ b/bin/pub.js @@ -7,7 +7,7 @@ var pump = require('pump') var path = require('path') var fs = require('fs') var concat = require('concat-stream') -var Writable = require('readable-stream').Writable +var Writable = require('stream').Writable var helpMe = require('help-me')({ dir: path.join(__dirname, '..', 'doc') }) diff --git a/lib/client.js b/lib/client.js index 08fc443a1..bd06948e0 100644 --- a/lib/client.js +++ b/lib/client.js @@ -6,7 +6,7 @@ var EventEmitter = require('events').EventEmitter var Store = require('./store') var mqttPacket = require('mqtt-packet') -var Writable = require('readable-stream').Writable +var Writable = require('stream').Writable var inherits = require('inherits') var reInterval = require('reinterval') var validations = require('./validations') diff --git a/lib/connect/ali.js b/lib/connect/ali.js index e7fe6a3c5..691b6d874 100644 --- a/lib/connect/ali.js +++ b/lib/connect/ali.js @@ -1,6 +1,6 @@ 'use strict' -var Transform = require('readable-stream').Transform +var Transform = require('stream').Transform var duplexify = require('duplexify') /* global FileReader */ diff --git a/lib/connect/ws.js b/lib/connect/ws.js index 77844e30b..b91b94be9 100644 --- a/lib/connect/ws.js +++ b/lib/connect/ws.js @@ -5,7 +5,7 @@ const debug = require('debug')('mqttjs:ws') const duplexify = require('duplexify') const Buffer = require('safe-buffer').Buffer const urlModule = require('url') -const Transform = require('readable-stream').Transform +const Transform = require('stream').Transform let WSS_OPTIONS = [ 'rejectUnauthorized', diff --git a/lib/connect/wx.js b/lib/connect/wx.js index b9c7a0705..250f15aac 100644 --- a/lib/connect/wx.js +++ b/lib/connect/wx.js @@ -1,6 +1,6 @@ 'use strict' -var Transform = require('readable-stream').Transform +var Transform = require('stream').Transform var duplexify = require('duplexify') /* global wx */ diff --git a/lib/store.js b/lib/store.js index efbfabf09..ac870dae9 100644 --- a/lib/store.js +++ b/lib/store.js @@ -5,7 +5,7 @@ */ var xtend = require('xtend') -var Readable = require('readable-stream').Readable +var Readable = require('stream').Readable var streamsOpts = { objectMode: true } var defaultStoreOptions = { clean: true diff --git a/package.json b/package.json index 0574823a5..a4a839659 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ "minimist": "^1.2.5", "mqtt-packet": "^6.3.2", "pump": "^3.0.0", - "readable-stream": "^2.3.6", "reinterval": "^1.1.0", "split2": "^3.1.0", "ws": "^7.3.1", diff --git a/test/client.js b/test/client.js index c38548822..14882d428 100644 --- a/test/client.js +++ b/test/client.js @@ -9,7 +9,7 @@ var net = require('net') var eos = require('end-of-stream') var mqttPacket = require('mqtt-packet') var Buffer = require('safe-buffer').Buffer -var Duplex = require('readable-stream').Duplex +var Duplex = require('stream').Duplex var Connection = require('mqtt-connection') var MqttServer = require('./server').MqttServer var util = require('util')