Skip to content

Commit 6b16a9e

Browse files
authored
chore(deps): remove through2 and bl (#31)
1 parent 35b430d commit 6b16a9e

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

‎commit-stream.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import through2 from 'through2'
1+
import { Transform } from 'node:stream'
22
import { stripVTControlCharacters } from 'node:util'
33

44
export default function commitStream (ghUser, ghProject) {
55
let commit
66

7-
return through2.obj(onLine, onEnd)
7+
return new Transform({ objectMode: true, transform: onLine, flush: onEnd })
88

99
function addLine (line) {
1010
line = stripVTControlCharacters(line)

‎package.json‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,12 @@
2626
"@semantic-release/github": "^12.0.6",
2727
"@semantic-release/npm": "^13.1.5",
2828
"@semantic-release/release-notes-generator": "^14.1.0",
29-
"bl": "^6.0.1",
3029
"conventional-changelog-conventionalcommits": "^9.3.1",
3130
"list-stream": "^2.1.0",
3231
"readable-stream": "^4.3.0",
3332
"semantic-release": "^25.0.3",
3433
"split2": "^4.2.0"
3534
},
36-
"dependencies": {
37-
"through2": "^4.0.2"
38-
},
3935
"release": {
4036
"branches": [
4137
"main"

‎test.js‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import nodeTest from 'node:test'
55
import split2 from 'split2'
66
import listStream from 'list-stream'
77
import { pipeline } from 'readable-stream'
8-
import bl from 'bl'
98

109
function test (name, fn) {
1110
return nodeTest(name, (_, done) => fn({
@@ -22,13 +21,13 @@ function gitToList (t, gitCmd, user, repo, callback) {
2221
repo = undefined
2322
}
2423
const child = spawn('bash', ['-c', gitCmd])
25-
child.stderr.pipe(bl((_, out) => {
26-
t.strictEqual(out.toString(), '')
27-
}))
24+
let stderr = ''
25+
child.stderr.setEncoding('utf8').on('data', (chunk) => { stderr += chunk })
2826
child.on('error', (err) => {
2927
t.error(err, 'error from child')
3028
})
3129
child.on('close', (code) => {
30+
t.strictEqual(stderr, '')
3231
t.strictEqual(code, 0, 'exit code zero')
3332
setImmediate(t.end.bind(t))
3433
})

0 commit comments

Comments
 (0)