Skip to content

Commit 3dd1d4d

Browse files
authored
Support Node.js v21 (#1834)
Signed-off-by: Matteo Collina <hello@matteocollina.com>
1 parent 3526e0a commit 3dd1d4d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
fail-fast: false
4343
matrix:
4444
os: [macOS-latest, windows-latest, ubuntu-latest]
45-
node-version: [14, 16, 18, 19, 20]
45+
node-version: [14, 16, 18, 19, 20, 21]
4646
exclude:
4747
- os: windows-latest
4848
node-version: 14

lib/proto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ function flush (cb) {
226226

227227
const stream = this[streamSym]
228228

229-
if ('flush' in stream) {
229+
if (typeof stream.flush === 'function') {
230230
stream.flush(cb || noop)
231231
} else if (cb) cb()
232232
}

0 commit comments

Comments
 (0)