Skip to content

Commit 474aabf

Browse files
authored
feat: end support Node.js v18 (#317)
1 parent 9878524 commit 474aabf

File tree

6 files changed

+5
-18
lines changed

6 files changed

+5
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [18.x, 20.x, 22.x, 24.x]
18+
node-version: [20.x, 22.x, 24.x]
1919

2020
steps:
2121
- uses: actions/checkout@v4

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,7 @@ Statistics Avg Stdev Max
3838

3939
## Requirements
4040

41-
It works on Node.js versions greater than 18.x. The specific required Node.js versions are as follows:
42-
43-
- 18.x => 18.14.1+
44-
- 19.x => 19.7.0+
45-
- 20.x => 20.0.0+
46-
47-
Essentially, you can simply use the latest version of each major release.
41+
It works on Node.js versions greater than 20.x.
4842

4943
## Installation
5044

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"access": "public"
7878
},
7979
"engines": {
80-
"node": ">=18.14.1"
80+
"node": ">=20"
8181
},
8282
"devDependencies": {
8383
"@hono/eslint-config": "^1.0.1",

src/globals.ts

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

src/listener.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
buildOutgoingHttpHeaders,
2121
} from './utils'
2222
import { X_ALREADY_SENT } from './utils/response/constants'
23-
import './globals'
2423

2524
const outgoingEnded = Symbol('outgoingEnded')
2625
type OutgoingHasOutgoingEnded = Http2ServerResponse & {

src/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export class Request extends GlobalRequest {
3535
}
3636
// Check if body is ReadableStream like. This makes it compatbile with ReadableStream polyfills.
3737
if (typeof (options?.body as ReadableStream)?.getReader !== 'undefined') {
38-
// node 18 fetch needs half duplex mode when request body is stream
39-
// if already set, do nothing since a Request object was passed to the options or explicitly set by the user.
38+
// Half duplex mode is required when request body is a stream.
39+
// If already set, do nothing since a Request object was passed to the options or explicitly set by the user.
4040
;(options as any).duplex ??= 'half'
4141
}
4242
super(input, options)

0 commit comments

Comments
 (0)