From 62499a1a51613543c58b06afee6c8129d52f4c98 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 2 Nov 2026 13:03:23 +1100 Subject: [PATCH] chore(deps): remove through2 and bl --- commit-stream.js | 4 ++-- package.json | 4 ---- test.js | 7 +++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/commit-stream.js b/commit-stream.js index b53b216..0ed4a48 100644 --- a/commit-stream.js +++ b/commit-stream.js @@ -1,10 +1,10 @@ -import through2 from 'through2' +import { Transform } from 'node:stream' import { stripVTControlCharacters } from 'node:util' export default function commitStream (ghUser, ghProject) { let commit - return through2.obj(onLine, onEnd) + return new Transform({ objectMode: true, transform: onLine, flush: onEnd }) function addLine (line) { line = stripVTControlCharacters(line) diff --git a/package.json b/package.json index ee5f07f..6304411 100644 --- a/package.json +++ b/package.json @@ -26,16 +26,12 @@ "@semantic-release/github": "^12.0.6", "@semantic-release/npm": "^13.1.5", "@semantic-release/release-notes-generator": "^14.1.0", - "bl": "^6.0.1", "conventional-changelog-conventionalcommits": "^9.3.1", "list-stream": "^2.1.0", "readable-stream": "^4.3.0", "semantic-release": "^25.0.3", "split2": "^4.2.0" }, - "dependencies": { - "through2": "^4.0.2" - }, "release": { "branches": [ "main" diff --git a/test.js b/test.js index cd24a0c..11c3504 100644 --- a/test.js +++ b/test.js @@ -5,7 +5,6 @@ import nodeTest from 'node:test' import split2 from 'split2' import listStream from 'list-stream' import { pipeline } from 'readable-stream' -import bl from 'bl' function test (name, fn) { return nodeTest(name, (_, done) => fn({ @@ -22,13 +21,13 @@ function gitToList (t, gitCmd, user, repo, callback) { repo = undefined } const child = spawn('bash', ['-c', gitCmd]) - child.stderr.pipe(bl((_, out) => { - t.strictEqual(out.toString(), '') - })) + let stderr = '' + child.stderr.setEncoding('utf8').on('data', (chunk) => { stderr += chunk }) child.on('error', (err) => { t.error(err, 'error from child') }) child.on('close', (code) => { + t.strictEqual(stderr, '') t.strictEqual(code, 0, 'exit code zero') setImmediate(t.end.bind(t)) })