Skip to content

Commit 26d9b1e

Browse files
authored
feat!: drop Node.js < 22 support (#722)
## Summary - **BREAKING CHANGE**: Minimum supported Node.js version is now 22.0.0 - Remove `patchForNode16()` polyfills from production code (`src/utils.ts`, `src/index.ts`) - Delete old Node.js CI workflow (`.github/workflows/nodejs-old-versions.yml`) and test patches (`test/patch-for-node16-18.cjs`, `test/setup.ts`) - Remove polyfill devDependencies (`@ungap/structured-clone`, `string.prototype.towellformed`) - Simplify version-conditional test code across 10 test files (keySize ternaries, skipIf checks, version-branched assertions) - Update CI matrix: Node.js 22, 24, 25 only ## Test plan - [x] `vp check` passes (lint, format) - [x] `vp test run` passes (40 test files, 202 tests) Closes #718 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated minimum Node.js version requirement to 22.0.0 * Removed unused development dependencies * Simplified runtime initialization and test infrastructure * Updated CI workflows to test Node.js 22, 24, and 25 <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 46c6ac9 commit 26d9b1e

20 files changed

+20
-951
lines changed

.github/workflows/nodejs-old-versions.yml

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

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
fail-fast: false
4242
matrix:
4343
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
44-
node: ['20', '22', '24', '25']
44+
node: ['22', '24', '25']
4545

4646
name: Test (${{ matrix.os }}, ${{ matrix.node }})
4747
runs-on: ${{ matrix.os }}

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@
6161
"test": "vp run check && vp test run --reporter=dot",
6262
"bench": "vp test bench",
6363
"test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vp test run --reporter=dot --test-timeout 180000 keep-alive-header.test.ts",
64-
"test-node16": "node examples/httpclient.cjs && node examples/search_github.cjs && node examples/timing.cjs",
6564
"cov": "vp test run --reporter=dot --coverage",
6665
"ci": "vp run cov && vp run prepublishOnly && npm pack && attw --pack",
6766
"clean": "rm -rf dist && tsc -b --clean",
6867
"prepublishOnly": "vp run build",
69-
"prepare": "node -e \"const v = parseInt(process.versions.node, 10); if (v >= 20) require('child_process').execSync('vp config', {stdio: 'inherit'});\"",
68+
"prepare": "vp config",
7069
"check": "vp check",
7170
"check:fix": "vp check --fix"
7271
},
@@ -90,14 +89,12 @@
9089
"@types/selfsigned": "^2.1.0",
9190
"@types/tar-stream": "^2.2.3",
9291
"@typescript/native-preview": "7.0.0-dev.20260329.1",
93-
"@ungap/structured-clone": "^1.3.0",
9492
"@vitest/coverage-v8": "^4.1.0",
9593
"busboy": "^1.6.0",
9694
"cross-env": "^10.1.0",
9795
"iconv-lite": "^0.6.3",
9896
"proxy": "^1.0.2",
9997
"selfsigned": "^3.0.1",
100-
"string.prototype.towellformed": "^1.0.2",
10198
"tar-stream": "^2.2.0",
10299
"tshy": "^4.0.0",
103100
"tshy-after": "^1.4.1",
@@ -116,7 +113,7 @@
116113
}
117114
},
118115
"engines": {
119-
"node": ">= 18.19.0"
116+
"node": ">= 22.0.0"
120117
},
121118
"packageManager": "pnpm@10.33.0",
122119
"pnpm": {

0 commit comments

Comments
 (0)