Skip to content

Commit de30292

Browse files
authored
Merge pull request #153 from Automattic/replace/through
refactor: replace `through` with `stream.PassThrough`
2 parents a4e585c + 15bfae7 commit de30292

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

lib/shell.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ const _shell = require('shelljs');
88
const path = require('path');
99
const parse = require('yargs-parser');
1010
const Promise = require('./promise');
11-
const stdoutStream = require('through');
12-
const stderrStream = require('through');
11+
const {PassThrough} = require('stream');
1312

1413
/*
1514
* Helper to parse a command into useful metadataz
@@ -70,8 +69,8 @@ module.exports = class Shell {
7069
constructor(log = new Log()) {
7170
this.log = log;
7271
this.running = [];
73-
this.stdout = stdoutStream();
74-
this.stderr = stderrStream();
72+
this.stdout = new PassThrough();
73+
this.stderr = new PassThrough();
7574
};
7675

7776
/**

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
"semver": "^7.7.3",
118118
"shelljs": "^0.10.0",
119119
"string-argv": "0.1.1",
120-
"through": "^2.3.8",
121120
"transliteration": "^2.6.0",
122121
"winston": "^3.11.0",
123122
"yargs": "^16.1.0"

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,11 +3351,6 @@ text-table@^0.2.0:
33513351
resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz"
33523352
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
33533353

3354-
through@^2.3.8:
3355-
version "2.3.8"
3356-
resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz"
3357-
integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==
3358-
33593354
to-fast-properties@^2.0.0:
33603355
version "2.0.0"
33613356
resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz"

0 commit comments

Comments
 (0)