Skip to content

Commit 7076631

Browse files
authored
Merge pull request #28 from commenthol/chore-bump
BREAKING: Maintenance, min supported Node version v18
2 parents c4e2bc6 + 52b6a09 commit 7076631

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1789
-1077
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
node: [ 20 ]
19+
node: [ 20, 22 ]
2020
name: Node ${{ matrix.node }}
2121
steps:
2222
- uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1+
# 4.0.0 (2025-02-09)
2+
3+
- fix: linting with eslint prettier (#e309f0e)
4+
- BREAKING CHANGE: min supported node@18 (#0375148)
5+
- chore: bump dependencies (#8af1300)
6+
- chore(ci): add node@22 (#2c097a4)
7+
18
# 3.2.1 (2024-10-04)
29

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

613
# 3.2.0 (2024-07-21)
714

8-
- docs: update ci badge (#e99f6b2)
915
- chore: deprecate node 18 (#f3931fe)
16+
- docs: update ci badge (#e99f6b2)
1017
- chore: bump dependencies (#5b4de1f)
1118

1219
# 3.1.4 (2024-03-13)
@@ -149,3 +156,4 @@
149156
- first version (#41890c0)
150157
- Initial commit (#d298779)
151158

159+

benchmarks/basic.bench.js

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,42 @@ const bench = require('fastbench')
33
const max = JSON.parse(process.env.MAX || 10000)
44
const stream = max === 1 ? process.stderr : undefined
55

6-
const {
7-
bunyan,
8-
debug,
9-
pino,
10-
pinoAsync,
11-
debugLevel,
12-
debugLevelAsync
13-
} = require('./instances.js')(stream)
6+
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
7+
require('./instances.js')(stream)
148

15-
const run = bench([
16-
function benchDebug (done) {
17-
debug('hello world')
18-
process.nextTick(done)
19-
},
20-
function benchBunyan (done) {
21-
bunyan.debug('hello world')
22-
process.nextTick(done)
23-
},
24-
function benchPino (done) {
25-
pino.debug('hello world')
26-
process.nextTick(done)
27-
},
28-
function benchDebugLevel (done) {
29-
debugLevel.debug('hello world')
30-
process.nextTick(done)
31-
},
32-
function benchPinoAsync (done) {
33-
pinoAsync.debug('hello world')
34-
process.nextTick(done)
35-
},
36-
function benchDebugLevelAsync (done) {
37-
debugLevelAsync.debug('hello world')
38-
process.nextTick(done)
39-
}
40-
], max)
9+
const run = bench(
10+
[
11+
function benchDebug(done) {
12+
debug('hello world')
13+
process.nextTick(done)
14+
},
15+
function benchBunyan(done) {
16+
bunyan.debug('hello world')
17+
process.nextTick(done)
18+
},
19+
function benchPino(done) {
20+
pino.debug('hello world')
21+
process.nextTick(done)
22+
},
23+
function benchDebugLevel(done) {
24+
debugLevel.debug('hello world')
25+
process.nextTick(done)
26+
},
27+
function benchPinoAsync(done) {
28+
pinoAsync.debug('hello world')
29+
process.nextTick(done)
30+
},
31+
function benchDebugLevelAsync(done) {
32+
debugLevelAsync.debug('hello world')
33+
process.nextTick(done)
34+
}
35+
],
36+
max
37+
)
4138

4239
const final = () => {
4340
pinoAsync.flush()
4441
debugLevelAsync.flush()
4542
}
4643

47-
run((final))
44+
run(final)

benchmarks/deep-j.bench.js

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,46 @@ const bench = require('fastbench')
33
const max = JSON.parse(process.env.MAX || 10000)
44
const stream = max === 1 ? process.stderr : undefined
55

6-
const {
7-
bunyan,
8-
debug,
9-
pino,
10-
pinoAsync,
11-
debugLevel,
12-
debugLevelAsync
13-
} = require('./instances.js')(stream)
6+
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
7+
require('./instances.js')(stream)
148

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

19-
const run = bench([
20-
function benchDebug (done) {
21-
debug('deep %j', deep)
22-
process.nextTick(done)
23-
},
24-
function benchBunyan (done) {
25-
bunyan.debug('deep %j', deep)
26-
process.nextTick(done)
27-
},
28-
function benchPino (done) {
29-
pino.debug('deep %j', deep)
30-
process.nextTick(done)
31-
},
32-
function benchDebugLevel (done) {
33-
debugLevel.debug('deep %j', deep)
34-
process.nextTick(done)
35-
},
36-
function benchPinoAsync (done) {
37-
pinoAsync.debug('deep %j', deep)
38-
process.nextTick(done)
39-
},
40-
function benchDebugLevelAsync (done) {
41-
debugLevelAsync.debug('deep %j', deep)
42-
process.nextTick(done)
43-
}
44-
], max)
13+
const run = bench(
14+
[
15+
function benchDebug(done) {
16+
debug('deep %j', deep)
17+
process.nextTick(done)
18+
},
19+
function benchBunyan(done) {
20+
bunyan.debug('deep %j', deep)
21+
process.nextTick(done)
22+
},
23+
function benchPino(done) {
24+
pino.debug('deep %j', deep)
25+
process.nextTick(done)
26+
},
27+
function benchDebugLevel(done) {
28+
debugLevel.debug('deep %j', deep)
29+
process.nextTick(done)
30+
},
31+
function benchPinoAsync(done) {
32+
pinoAsync.debug('deep %j', deep)
33+
process.nextTick(done)
34+
},
35+
function benchDebugLevelAsync(done) {
36+
debugLevelAsync.debug('deep %j', deep)
37+
process.nextTick(done)
38+
}
39+
],
40+
max
41+
)
4542

4643
const final = () => {
4744
pinoAsync.flush()
4845
debugLevelAsync.flush()
4946
}
5047

51-
run((final))
48+
run(final)

benchmarks/deep.bench.js

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,46 @@ const bench = require('fastbench')
33
const max = JSON.parse(process.env.MAX || 10000)
44
const stream = max === 1 ? process.stderr : undefined
55

6-
const {
7-
bunyan,
8-
debug,
9-
pino,
10-
pinoAsync,
11-
debugLevel,
12-
debugLevelAsync
13-
} = require('./instances.js')(stream)
6+
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
7+
require('./instances.js')(stream)
148

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

19-
const run = bench([
20-
function benchDebug (done) {
21-
debug(deep)
22-
process.nextTick(done)
23-
},
24-
function benchBunyan (done) {
25-
bunyan.debug(deep)
26-
process.nextTick(done)
27-
},
28-
function benchPino (done) {
29-
pino.debug(deep)
30-
process.nextTick(done)
31-
},
32-
function benchDebugLevel (done) {
33-
debugLevel.debug(deep)
34-
process.nextTick(done)
35-
},
36-
function benchPinoAsync (done) {
37-
pinoAsync.debug(deep)
38-
process.nextTick(done)
39-
},
40-
function benchDebugLevelAsync (done) {
41-
debugLevelAsync.debug(deep)
42-
process.nextTick(done)
43-
}
44-
], max)
13+
const run = bench(
14+
[
15+
function benchDebug(done) {
16+
debug(deep)
17+
process.nextTick(done)
18+
},
19+
function benchBunyan(done) {
20+
bunyan.debug(deep)
21+
process.nextTick(done)
22+
},
23+
function benchPino(done) {
24+
pino.debug(deep)
25+
process.nextTick(done)
26+
},
27+
function benchDebugLevel(done) {
28+
debugLevel.debug(deep)
29+
process.nextTick(done)
30+
},
31+
function benchPinoAsync(done) {
32+
pinoAsync.debug(deep)
33+
process.nextTick(done)
34+
},
35+
function benchDebugLevelAsync(done) {
36+
debugLevelAsync.debug(deep)
37+
process.nextTick(done)
38+
}
39+
],
40+
max
41+
)
4542

4643
const final = () => {
4744
pinoAsync.flush()
4845
debugLevelAsync.flush()
4946
}
5047

51-
run((final))
48+
run(final)

benchmarks/format-s.bench.js

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,42 @@ const bench = require('fastbench')
33
const max = JSON.parse(process.env.MAX || 10000)
44
const stream = max === 1 ? process.stderr : undefined
55

6-
const {
7-
bunyan,
8-
debug,
9-
pino,
10-
pinoAsync,
11-
debugLevel,
12-
debugLevelAsync
13-
} = require('./instances.js')(stream)
6+
const { bunyan, debug, pino, pinoAsync, debugLevel, debugLevelAsync } =
7+
require('./instances.js')(stream)
148

15-
const run = bench([
16-
function benchDebug (done) {
17-
debug('hello %s', 'world')
18-
process.nextTick(done)
19-
},
20-
function benchBunyan (done) {
21-
bunyan.debug('hello %s', 'world')
22-
process.nextTick(done)
23-
},
24-
function benchPino (done) {
25-
pino.debug('hello %s', 'world')
26-
process.nextTick(done)
27-
},
28-
function benchDebugLevel (done) {
29-
debugLevel.debug('hello %s', 'world')
30-
process.nextTick(done)
31-
},
32-
function benchPinoAsync (done) {
33-
pinoAsync.debug('hello %s', 'world')
34-
process.nextTick(done)
35-
},
36-
function benchDebugLevelAsync (done) {
37-
debugLevelAsync.debug('hello %s', 'world')
38-
process.nextTick(done)
39-
}
40-
], max)
9+
const run = bench(
10+
[
11+
function benchDebug(done) {
12+
debug('hello %s', 'world')
13+
process.nextTick(done)
14+
},
15+
function benchBunyan(done) {
16+
bunyan.debug('hello %s', 'world')
17+
process.nextTick(done)
18+
},
19+
function benchPino(done) {
20+
pino.debug('hello %s', 'world')
21+
process.nextTick(done)
22+
},
23+
function benchDebugLevel(done) {
24+
debugLevel.debug('hello %s', 'world')
25+
process.nextTick(done)
26+
},
27+
function benchPinoAsync(done) {
28+
pinoAsync.debug('hello %s', 'world')
29+
process.nextTick(done)
30+
},
31+
function benchDebugLevelAsync(done) {
32+
debugLevelAsync.debug('hello %s', 'world')
33+
process.nextTick(done)
34+
}
35+
],
36+
max
37+
)
4138

4239
const final = () => {
4340
pinoAsync.flush()
4441
debugLevelAsync.flush()
4542
}
4643

47-
run((final))
44+
run(final)

0 commit comments

Comments
 (0)