Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 20 ]
node: [ 20, 22 ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# 4.0.0 (2025-02-09)

- fix: linting with eslint prettier (#e309f0e)
- BREAKING CHANGE: min supported node@18 (#0375148)
- chore: bump dependencies (#8af1300)
- chore(ci): add node@22 (#2c097a4)

# 3.2.1 (2024-10-04)

- chore: bump dependencies (#5e03ed9)
- fix: remove deprecated res._headers (#93e54ad)

# 3.2.0 (2024-07-21)

- docs: update ci badge (#e99f6b2)
- chore: deprecate node 18 (#f3931fe)
- docs: update ci badge (#e99f6b2)
- chore: bump dependencies (#5b4de1f)

# 3.1.4 (2024-03-13)
Expand Down Expand Up @@ -149,3 +156,4 @@
- first version (#41890c0)
- Initial commit (#d298779)


67 changes: 32 additions & 35 deletions benchmarks/basic.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,42 @@ const bench = require('fastbench')
const max = JSON.parse(process.env.MAX || 10000)
const stream = max === 1 ? process.stderr : undefined

const {
bunyan,
debug,
pino,
pinoAsync,
debugLevel,
debugLevelAsync
} = require('./instances.js')(stream)
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
require('./instances.js')(stream)

const run = bench([
function benchDebug (done) {
debug('hello world')
process.nextTick(done)
},
function benchBunyan (done) {
bunyan.debug('hello world')
process.nextTick(done)
},
function benchPino (done) {
pino.debug('hello world')
process.nextTick(done)
},
function benchDebugLevel (done) {
debugLevel.debug('hello world')
process.nextTick(done)
},
function benchPinoAsync (done) {
pinoAsync.debug('hello world')
process.nextTick(done)
},
function benchDebugLevelAsync (done) {
debugLevelAsync.debug('hello world')
process.nextTick(done)
}
], max)
const run = bench(
[
function benchDebug(done) {
debug('hello world')
process.nextTick(done)
},
function benchBunyan(done) {
bunyan.debug('hello world')
process.nextTick(done)
},
function benchPino(done) {
pino.debug('hello world')
process.nextTick(done)
},
function benchDebugLevel(done) {
debugLevel.debug('hello world')
process.nextTick(done)
},
function benchPinoAsync(done) {
pinoAsync.debug('hello world')
process.nextTick(done)
},
function benchDebugLevelAsync(done) {
debugLevelAsync.debug('hello world')
process.nextTick(done)
}
],
max
)

const final = () => {
pinoAsync.flush()
debugLevelAsync.flush()
}

run((final))
run(final)
67 changes: 32 additions & 35 deletions benchmarks/deep-j.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,46 @@ const bench = require('fastbench')
const max = JSON.parse(process.env.MAX || 10000)
const stream = max === 1 ? process.stderr : undefined

const {
bunyan,
debug,
pino,
pinoAsync,
debugLevel,
debugLevelAsync
} = require('./instances.js')(stream)
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
require('./instances.js')(stream)

const deep = require('../package.json')
deep.deep = Object.assign({}, JSON.parse(JSON.stringify(deep)))
deep.deep.deep = Object.assign({}, JSON.parse(JSON.stringify(deep)))

const run = bench([
function benchDebug (done) {
debug('deep %j', deep)
process.nextTick(done)
},
function benchBunyan (done) {
bunyan.debug('deep %j', deep)
process.nextTick(done)
},
function benchPino (done) {
pino.debug('deep %j', deep)
process.nextTick(done)
},
function benchDebugLevel (done) {
debugLevel.debug('deep %j', deep)
process.nextTick(done)
},
function benchPinoAsync (done) {
pinoAsync.debug('deep %j', deep)
process.nextTick(done)
},
function benchDebugLevelAsync (done) {
debugLevelAsync.debug('deep %j', deep)
process.nextTick(done)
}
], max)
const run = bench(
[
function benchDebug(done) {
debug('deep %j', deep)
process.nextTick(done)
},
function benchBunyan(done) {
bunyan.debug('deep %j', deep)
process.nextTick(done)
},
function benchPino(done) {
pino.debug('deep %j', deep)
process.nextTick(done)
},
function benchDebugLevel(done) {
debugLevel.debug('deep %j', deep)
process.nextTick(done)
},
function benchPinoAsync(done) {
pinoAsync.debug('deep %j', deep)
process.nextTick(done)
},
function benchDebugLevelAsync(done) {
debugLevelAsync.debug('deep %j', deep)
process.nextTick(done)
}
],
max
)

const final = () => {
pinoAsync.flush()
debugLevelAsync.flush()
}

run((final))
run(final)
67 changes: 32 additions & 35 deletions benchmarks/deep.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,46 @@ const bench = require('fastbench')
const max = JSON.parse(process.env.MAX || 10000)
const stream = max === 1 ? process.stderr : undefined

const {
bunyan,
debug,
pino,
pinoAsync,
debugLevel,
debugLevelAsync
} = require('./instances.js')(stream)
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
require('./instances.js')(stream)

const deep = require('../package.json')
deep.deep = Object.assign({}, JSON.parse(JSON.stringify(deep)))
deep.deep.deep = Object.assign({}, JSON.parse(JSON.stringify(deep)))

const run = bench([
function benchDebug (done) {
debug(deep)
process.nextTick(done)
},
function benchBunyan (done) {
bunyan.debug(deep)
process.nextTick(done)
},
function benchPino (done) {
pino.debug(deep)
process.nextTick(done)
},
function benchDebugLevel (done) {
debugLevel.debug(deep)
process.nextTick(done)
},
function benchPinoAsync (done) {
pinoAsync.debug(deep)
process.nextTick(done)
},
function benchDebugLevelAsync (done) {
debugLevelAsync.debug(deep)
process.nextTick(done)
}
], max)
const run = bench(
[
function benchDebug(done) {
debug(deep)
process.nextTick(done)
},
function benchBunyan(done) {
bunyan.debug(deep)
process.nextTick(done)
},
function benchPino(done) {
pino.debug(deep)
process.nextTick(done)
},
function benchDebugLevel(done) {
debugLevel.debug(deep)
process.nextTick(done)
},
function benchPinoAsync(done) {
pinoAsync.debug(deep)
process.nextTick(done)
},
function benchDebugLevelAsync(done) {
debugLevelAsync.debug(deep)
process.nextTick(done)
}
],
max
)

const final = () => {
pinoAsync.flush()
debugLevelAsync.flush()
}

run((final))
run(final)
67 changes: 32 additions & 35 deletions benchmarks/format-s.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,42 @@ const bench = require('fastbench')
const max = JSON.parse(process.env.MAX || 10000)
const stream = max === 1 ? process.stderr : undefined

const {
bunyan,
debug,
pino,
pinoAsync,
debugLevel,
debugLevelAsync
} = require('./instances.js')(stream)
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
require('./instances.js')(stream)

const run = bench([
function benchDebug (done) {
debug('hello %s', 'world')
process.nextTick(done)
},
function benchBunyan (done) {
bunyan.debug('hello %s', 'world')
process.nextTick(done)
},
function benchPino (done) {
pino.debug('hello %s', 'world')
process.nextTick(done)
},
function benchDebugLevel (done) {
debugLevel.debug('hello %s', 'world')
process.nextTick(done)
},
function benchPinoAsync (done) {
pinoAsync.debug('hello %s', 'world')
process.nextTick(done)
},
function benchDebugLevelAsync (done) {
debugLevelAsync.debug('hello %s', 'world')
process.nextTick(done)
}
], max)
const run = bench(
[
function benchDebug(done) {
debug('hello %s', 'world')
process.nextTick(done)
},
function benchBunyan(done) {
bunyan.debug('hello %s', 'world')
process.nextTick(done)
},
function benchPino(done) {
pino.debug('hello %s', 'world')
process.nextTick(done)
},
function benchDebugLevel(done) {
debugLevel.debug('hello %s', 'world')
process.nextTick(done)
},
function benchPinoAsync(done) {
pinoAsync.debug('hello %s', 'world')
process.nextTick(done)
},
function benchDebugLevelAsync(done) {
debugLevelAsync.debug('hello %s', 'world')
process.nextTick(done)
}
],
max
)

const final = () => {
pinoAsync.flush()
debugLevelAsync.flush()
}

run((final))
run(final)
Loading