From 3cc6c428fb8fadee3e0d737ee5cef2bc90c55342 Mon Sep 17 00:00:00 2001 From: Stephen Cresswell <229672+cressie176@users.noreply.github.com> Date: Sun, 24 Nov 2024 10:16:58 +0000 Subject: [PATCH] Remove readable-stream - see #729 --- lib/connection.js | 7 ++---- package-lock.json | 59 ++++------------------------------------------- package.json | 1 - test/frame.js | 3 +-- test/mux.js | 3 +-- test/util.js | 4 +--- 6 files changed, 9 insertions(+), 68 deletions(-) diff --git a/lib/connection.js b/lib/connection.js index 1c58ac5f..9a1bd3dd 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -10,9 +10,7 @@ var frame = require('./frame'); var HEARTBEAT = frame.HEARTBEAT; var Mux = require('./mux').Mux; -var Duplex = - require('stream').Duplex || - require('readable-stream/duplex'); +var Duplex = require('stream').Duplex; var EventEmitter = require('events'); var Heart = require('./heartbeat').Heart; @@ -22,8 +20,7 @@ var inspect = require('./format').inspect; var BitSet = require('./bitset').BitSet; var fmt = require('util').format; -var PassThrough = require('stream').PassThrough || - require('readable-stream/passthrough'); +var PassThrough = require('stream').PassThrough; var IllegalOperationError = require('./error').IllegalOperationError; var stackCapture = require('./error').stackCapture; diff --git a/package-lock.json b/package-lock.json index 6024ad5a..9b11fabe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "dependencies": { "@acuminous/bitsyntax": "^0.1.2", "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", "url-parse": "~1.5.10" }, "devDependencies": { @@ -789,11 +788,6 @@ "safe-buffer": "~5.1.1" } }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1181,7 +1175,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -1288,11 +1283,6 @@ "node": ">=0.10.0" } }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2206,17 +2196,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -2432,11 +2411,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -3421,11 +3395,6 @@ "safe-buffer": "~5.1.1" } }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3701,7 +3670,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "is-binary-path": { "version": "2.1.0", @@ -3775,11 +3745,6 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4462,17 +4427,6 @@ "safe-buffer": "^5.1.0" } }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4641,11 +4595,6 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", diff --git a/package.json b/package.json index e610a680..ec1707c6 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "dependencies": { "@acuminous/bitsyntax": "^0.1.2", "buffer-more-ints": "~1.0.0", - "readable-stream": "1.x >=1.1.9", "url-parse": "~1.5.10" }, "devDependencies": { diff --git a/test/frame.js b/test/frame.js index 53551afc..5037e663 100644 --- a/test/frame.js +++ b/test/frame.js @@ -7,8 +7,7 @@ var connection = require('../lib/connection'); var Frames = connection.Connection; var HEARTBEAT = require('../lib/frame').HEARTBEAT; var Stream = require('stream'); -var PassThrough = Stream.PassThrough || - require('readable-stream/passthrough'); +var PassThrough = Stream.PassThrough; var defs = require('../lib/defs'); diff --git a/test/mux.js b/test/mux.js index b785ac05..395f6e15 100644 --- a/test/mux.js +++ b/test/mux.js @@ -2,8 +2,7 @@ var assert = require('assert'); var Mux = require('../lib/mux').Mux; -var PassThrough = require('stream').PassThrough || - require('readable-stream/passthrough'); +var PassThrough = require('stream').PassThrough; var latch = require('./util').latch; var schedule = require('./util').schedule; diff --git a/test/util.js b/test/util.js index 0cc8122d..919ea7b9 100644 --- a/test/util.js +++ b/test/util.js @@ -2,9 +2,7 @@ var crypto = require('crypto'); var Connection = require('../lib/connection').Connection; -var PassThrough = - require('stream').PassThrough || - require('readable-stream/passthrough'); +var PassThrough = require('stream').PassThrough; var defs = require('../lib/defs'); var assert = require('assert');