From b6f93fbe7e8c2b66215177d8144f1f811e89230c Mon Sep 17 00:00:00 2001 From: Shinrai Date: Thu, 30 Jul 2026 20:52:36 -0700 Subject: [PATCH] deps: drop Node 20, bump chalk to 6 and commander to 15 Node 20 reached EOL in April 2026. chalk 6 requires Node >=22 and commander 15 requires Node >=22.12.0, so this drops Node 20 support and updates engines.node accordingly. API usage of both packages is unchanged: chalk's .bold/.yellow/.magenta etc. are untouched; commander's lone --no-symlinks option is unaffected by the v15 --no-* default-handling fix (only paired options change). CI and publish matrices updated to min_node_version: 22 to match. --- .github/workflows/ci.yml | 12 +++++----- .github/workflows/publish.yml | 4 ++-- package-lock.json | 45 +++++++++++++++++++++++++++-------- package.json | 6 ++--- 4 files changed, 46 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49dad7c..c1c49eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,10 +54,10 @@ on: required: false default: "lts/*" min_node_version: - description: "Minimum Node.js version for matrix testing (default: 20, oldest non-EOL)" + description: "Minimum Node.js version for matrix testing (default: 22, oldest non-EOL LTS)" type: string required: false - default: "20" + default: "22" max_node_major: description: "Override max Node.js major version (default: 22)" type: string @@ -184,12 +184,12 @@ jobs: .gitignore debug: ${{ github.event.inputs.debug == 'true' }} node_version: ${{ github.event.inputs.node_version || 'lts/*' }} - min_node_version: ${{ github.event.inputs.min_node_version || '20' }} + min_node_version: ${{ github.event.inputs.min_node_version || '22' }} max_node_major: ${{ github.event.inputs.max_node_major || '22' }} - # LTS-only matrix (even majors: 20, 22, 24, …) on every event. Odd majors - # (21, 23, …) are non-LTS interim releases, and the native-binding test + # LTS-only matrix (even majors: 22, 24, …) on every event. Odd majors + # (23, 25, …) are non-LTS interim releases, and the native-binding test # toolchain (vitest 4 / rolldown / vite 8) excludes them via `engines` - # (`^20.19.0 || >=22.12.0`), so a "full matrix" on them only re-discovers a + # (`>=22.12.0`), so a "full matrix" on them only re-discovers a # known toolchain gap ("Cannot find native binding") rather than a real # per-version regression. workflow_dispatch can still opt out (set false). lts_only_matrix: ${{ github.event.inputs.lts_only_matrix != 'false' }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9914a0b..814b87a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -63,7 +63,7 @@ on: description: "Minimum Node.js version for matrix testing (enables matrix when set)" type: string required: false - default: "20" + default: "22" max_node_major: description: "Override max Node.js major version (default: 22)" type: string @@ -101,7 +101,7 @@ jobs: publish_to_github_packages: ${{ github.event.inputs.publish_to_github_packages != 'false' }} publish_command: "" github_packages_publish_command: "" - min_node_version: ${{ github.event.inputs.min_node_version || '20' }} + min_node_version: ${{ github.event.inputs.min_node_version || '22' }} max_node_major: ${{ github.event.inputs.max_node_major || '22' }} test_command: "npm test" # Use defaults: NODE_ENV=development, NODE_OPTIONS=--conditions=development # test_command: "NODE_OPTIONS='--conditions=slothlet-dev' npm test" # Override NODE_OPTIONS only diff --git a/package-lock.json b/package-lock.json index 7523e73..c232830 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,8 @@ "dependencies": { "@cldmv/slothlet": "^3.7.0", "@cldmv/wisp": "^1.0.1", - "chalk": "^5.4.1", - "commander": "^14.0.0", + "chalk": "^6.0.0", + "commander": "^15.0.0", "marked": "^15.0.12", "marked-terminal": "^7.3.0" }, @@ -156,6 +156,19 @@ "vitest": ">=1.0.0" } }, + "node_modules/@cldmv/vitest-runner/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@cldmv/wisp": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@cldmv/wisp/-/wisp-1.0.1.tgz", @@ -1208,12 +1221,12 @@ } }, "node_modules/chalk": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", - "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-6.0.0.tgz", + "integrity": "sha512-2uNTXIuTTxk7ciZgAU1BQcgnchcG0xXnrs6jzkQfj9SsRa9M2s5zE8WT96hS6KmG4MzWHSrvH43DF1m4XRkrFg==", "license": "MIT", "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" + "node": ">=22" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -1321,12 +1334,12 @@ "license": "MIT" }, "node_modules/commander": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", - "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", "license": "MIT", "engines": { - "node": ">=20" + "node": ">=22.12.0" } }, "node_modules/convert-source-map": { @@ -2406,6 +2419,18 @@ "marked": ">=1 <16" } }, + "node_modules/marked-terminal/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/mdast-util-find-and-replace": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz", diff --git a/package.json b/package.json index dddc35b..43a0b09 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "license": "Apache-2.0", "engines": { - "node": ">=20.19.0" + "node": ">=22.12.0" }, "author": { "name": "Shinrai", @@ -81,8 +81,8 @@ "dependencies": { "@cldmv/slothlet": "^3.7.0", "@cldmv/wisp": "^1.0.1", - "chalk": "^5.4.1", - "commander": "^14.0.0", + "chalk": "^6.0.0", + "commander": "^15.0.0", "marked": "^15.0.12", "marked-terminal": "^7.3.0" },