Skip to content

Commit

Permalink
Drop pump & readable-stream
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <hello@matteocollina.com>
  • Loading branch information
mcollina committed Oct 15, 2024
1 parent 7492d63 commit a2738a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const help = require('help-me')({
dir: path.join(__dirname, 'help'),
ext: '.txt'
})
const pump = require('pump')
const { pipeline } = require('stream')
const sjp = require('secure-json-parse')
const JoyCon = require('joycon')
const stripJsonComments = require('strip-json-comments')
Expand Down Expand Up @@ -79,7 +79,7 @@ if (cmd.h || cmd.help) {
opts.errorProps = opts.errorProps || ''

const res = build(opts)
pump(process.stdin, res)
pipeline(process.stdin, res, () => {})

// https://github.com/pinojs/pino/pull/358
/* istanbul ignore next */
Expand Down
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict'

const { isColorSupported } = require('colorette')
const pump = require('pump')
const { Transform } = require('readable-stream')
const { Transform, pipeline: pump } = require('node:stream')
const abstractTransport = require('pino-abstract-transport')
const colors = require('./lib/colors')
const {
Expand Down Expand Up @@ -169,7 +168,7 @@ function build (opts = {}) {
destination.write(line + '\n')
})

pump(source, stream, destination)
pump(source, stream, destination, () => {})
return stream
}, { parse: 'lines' })
}
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
"minimist": "^1.2.6",
"on-exit-leak-free": "^2.1.0",
"pino-abstract-transport": "^1.0.0",
"pump": "^3.0.0",
"readable-stream": "^4.0.0",
"secure-json-parse": "^2.4.0",
"sonic-boom": "^4.0.1",
"strip-json-comments": "^3.1.1"
Expand Down

0 comments on commit a2738a5

Please # to comment.