From fa646751b97fb90df21b4713686bb3880de1274a Mon Sep 17 00:00:00 2001 From: 343dev <343dev@users.noreply.github.com> Date: Tue, 23 Dec 2025 16:26:00 +0700 Subject: [PATCH 1/4] Update Node.js to v20.19.0 and dependencies --- .github/workflows/ci-nodejs.yml | 2 +- package-lock.json | 341 +++++++------------------------- package.json | 8 +- 3 files changed, 73 insertions(+), 278 deletions(-) diff --git a/.github/workflows/ci-nodejs.yml b/.github/workflows/ci-nodejs.yml index ea4d494..7b97be8 100644 --- a/.github/workflows/ci-nodejs.yml +++ b/.github/workflows/ci-nodejs.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [18.18.0, latest] + node-version: [20.19.0, latest] os: [ ubuntu-latest, # x64 ubuntu-24.04-arm, # arm64 diff --git a/package-lock.json b/package-lock.json index 8267adf..f60468d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,9 +12,9 @@ "@343dev/gifsicle": "1.0.0", "@343dev/guetzli": "1.1.0", "cli-progress": "3.12.0", - "commander": "13.1.0", + "commander": "14.0.2", "fdir": "6.5.0", - "p-limit": "6.2.0", + "p-limit": "7.2.0", "sharp": "0.34.5", "svgo": "4.0.0" }, @@ -25,12 +25,12 @@ "@343dev/eslint-config": "3.0.0", "@vitest/coverage-v8": "4.0.16", "eslint": "9.39.2", - "lint-staged": "15.5.2", + "lint-staged": "16.2.7", "simple-git-hooks": "2.13.1", "vitest": "4.0.16" }, "engines": { - "node": ">=18.18" + "node": ">=20.19.0" } }, "node_modules/@343dev/eslint-config": { @@ -2543,42 +2543,34 @@ } }, "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.1.1.tgz", + "integrity": "sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A==", "dev": true, "license": "MIT", "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" + "slice-ansi": "^7.1.0", + "string-width": "^8.0.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "dev": true, - "license": "MIT" - }, "node_modules/cli-truncate/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz", + "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", + "get-east-asian-width": "^1.3.0", "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2612,12 +2604,12 @@ "license": "MIT" }, "node_modules/commander": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", - "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/concat-map": { @@ -3600,30 +3592,6 @@ "dev": true, "license": "MIT" }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, "node_modules/expect-type": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", @@ -3883,19 +3851,6 @@ "node": ">= 0.4" } }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -4084,16 +4039,6 @@ "dev": true, "license": "MIT" }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" - } - }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4350,13 +4295,16 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", + "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", "dev": true, "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.1" + }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4496,19 +4444,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-string": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", @@ -4765,68 +4700,39 @@ "node": ">= 0.8.0" } }, - "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, "node_modules/lint-staged": { - "version": "15.5.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.5.2.tgz", - "integrity": "sha512-YUSOLq9VeRNAo/CTaVmhGDKG+LBtA8KF1X4K5+ykMSwWST1vDxJRB2kv2COgLb1fvpCo+A/y9A0G0znNVmdx4w==", + "version": "16.2.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.2.7.tgz", + "integrity": "sha512-lDIj4RnYmK7/kXMya+qJsmkRFkGolciXjrsZ6PC25GdTfWOAWetR0ZbsNXRAj1EHHImRSalc+whZFg56F5DVow==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^5.4.1", - "commander": "^13.1.0", - "debug": "^4.4.0", - "execa": "^8.0.1", - "lilconfig": "^3.1.3", - "listr2": "^8.2.5", + "commander": "^14.0.2", + "listr2": "^9.0.5", "micromatch": "^4.0.8", + "nano-spawn": "^2.0.0", "pidtree": "^0.6.0", "string-argv": "^0.3.2", - "yaml": "^2.7.0" + "yaml": "^2.8.1" }, "bin": { "lint-staged": "bin/lint-staged.js" }, "engines": { - "node": ">=18.12.0" + "node": ">=20.17" }, "funding": { "url": "https://opencollective.com/lint-staged" } }, - "node_modules/lint-staged/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/listr2": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz", - "integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz", + "integrity": "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==", "dev": true, "license": "MIT", "dependencies": { - "cli-truncate": "^4.0.0", + "cli-truncate": "^5.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", "log-update": "^6.1.0", @@ -4834,7 +4740,7 @@ "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/locate-path": { @@ -4880,52 +4786,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", - "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.3.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", - "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, "node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", @@ -4987,13 +4847,6 @@ "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", "license": "CC0-1.0" }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -5021,19 +4874,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mimic-function": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", @@ -5077,6 +4917,19 @@ "dev": true, "license": "MIT" }, + "node_modules/nano-spawn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-2.0.0.tgz", + "integrity": "sha512-tacvGzUY5o2D8CBh2rrwxyNojUsZNU2zjNTzKQrkgGJQTbGAfArVWXSKMBokBeeg6C7OLRGUEyoFlYbfeWQIqw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/nano-spawn?sponsor=1" + } + }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", @@ -5125,35 +4978,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", @@ -5275,16 +5099,16 @@ "license": "MIT" }, "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^4.0.0" + "mimic-function": "^5.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5327,15 +5151,15 @@ } }, "node_modules/p-limit": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", - "integrity": "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.2.0.tgz", + "integrity": "sha512-ATHLtwoTNDloHRFFxFJdHnG6n2WUeFjaR8XQMFdKIv0xkXjrER8/iG9iu265jOM95zXHAfv9oTkqhrfbIzosrQ==", "license": "MIT", "dependencies": { - "yocto-queue": "^1.1.1" + "yocto-queue": "^1.2.1" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5718,22 +5542,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", - "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", @@ -6080,17 +5888,17 @@ } }, "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", + "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" @@ -6321,19 +6129,6 @@ "node": ">=4" } }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/strip-indent": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz", diff --git a/package.json b/package.json index 889ca1c..3f69dcd 100644 --- a/package.json +++ b/package.json @@ -43,15 +43,15 @@ }, "type": "module", "engines": { - "node": ">=18.18" + "node": ">=20.19.0" }, "dependencies": { "@343dev/gifsicle": "1.0.0", "@343dev/guetzli": "1.1.0", "cli-progress": "3.12.0", - "commander": "13.1.0", + "commander": "14.0.2", "fdir": "6.5.0", - "p-limit": "6.2.0", + "p-limit": "7.2.0", "sharp": "0.34.5", "svgo": "4.0.0" }, @@ -59,7 +59,7 @@ "@343dev/eslint-config": "3.0.0", "@vitest/coverage-v8": "4.0.16", "eslint": "9.39.2", - "lint-staged": "15.5.2", + "lint-staged": "16.2.7", "simple-git-hooks": "2.13.1", "vitest": "4.0.16" }, From 40eb07d8cf61c09a5523dd707ad9c3a4f0e5c3ea Mon Sep 17 00:00:00 2001 From: 343dev <343dev@users.noreply.github.com> Date: Tue, 23 Dec 2025 16:57:26 +0700 Subject: [PATCH 2/4] Reformat CHANGELOG.md to follow Keep a Changelog standard --- CHANGELOG.md | 313 ++++++++++++++++++++++++++++----------------------- 1 file changed, 175 insertions(+), 138 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d98f42e..84bd326 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,294 +1,331 @@ # Changelog -## 11.0.0 (2025-05-04) +All notable changes to this project will be documented in this file. -### Breaking Changes +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [11.0.0] - 2025-05-04 + +### Added -- Replaced [imagemin/gifsicle-bin](https://github.com/imagemin/gifsicle-bin) package with [343dev/gifsicle](https://github.com/343dev/gifsicle). - Added new configuration parameters in [.optimiztrc.cjs](.optimiztrc.cjs): - [optimize.gif.lossy.gamma](https://github.com/343dev/optimizt/blob/a53d5b82facf4d24a25d2e60d9dd15868e79acbf/.optimiztrc.cjs#L55) - [optimize.gif.lossless.gamma](https://github.com/343dev/optimizt/blob/a53d5b82facf4d24a25d2e60d9dd15868e79acbf/.optimiztrc.cjs#L62) -- Updated gifsicle to version 1.96. +- Improved Platform Support: Added arm64 binary versions for `guetzli` and `gifsicle`. -### Benefits +### Changed -- **Reduced Dependencies**: Total project dependencies decreased from 218 to 41. -- **Improved Platform Support**: Added arm64 binary versions for `guetzli` and `gifsicle`. - -### Important Note About Gamma Parameters - -The new gamma parameters were added because of changes in gifsicle 1.96. In this version: +- Replaced [imagemin/gifsicle-bin](https://github.com/imagemin/gifsicle-bin) package with [343dev/gifsicle](https://github.com/343dev/gifsicle). +- Updated gifsicle to version 1.96. +- Reduced Dependencies: Total project dependencies decreased from 218 to 41. -- The `--lossy` option now measures color errors using the color space selected by `--gamma` (defaults to sRGB). -- A new algorithm for computing color differences has been implemented. -- This means `--lossy=N` will behave differently than in previous versions and may compress less than expected. -- For behavior similar to previous versions, use `--lossy=N --gamma=1`. + The new gamma parameters were added because of changes in gifsicle 1.96. In this version: + - The `--lossy` option now measures color errors using the color space selected by `--gamma` (defaults to sRGB). + - A new algorithm for computing color differences has been implemented. + - This means `--lossy=N` will behave differently than in previous versions and may compress less than expected. + - For behavior similar to previous versions, use `--lossy=N --gamma=1`. -## 10.0.0 (2024-10-28) +## [10.0.0] - 2024-10-28 -Breaking Changes: +### Changed - Supported Node.js version updated to 18.18 or higher. -- Replaced “gif2webp” with “sharp” for GIF-to-WebP conversions. -- Removed the “webpGif” section from [.optimiztrc.cjs](.optimiztrc.cjs). +- Replaced "gif2webp" with "sharp" for GIF-to-WebP conversions. - Fine-tuned params in [.optimiztrc.cjs](.optimiztrc.cjs). +### Removed + +- Removed the "webpGif" section from [.optimiztrc.cjs](.optimiztrc.cjs). -## 9.1.1 (2024-10-22) +## [9.1.1] - 2024-10-22 + +### Changed - Replaced [imagemin/guetzli-bin](https://github.com/imagemin/guetzli-bin) with [343dev/guetzli](https://github.com/343dev/guetzli). +## [9.1.0] - 2024-10-16 -## 9.1.0 (2024-10-16) +### Changed - Disabled parallel optimization of JPEG files in Lossless mode. -Guetzli uses a huge amount of RAM. In my case, when optimizing a file of about 30 MB, one process could use up to 12 GB of memory. If there are multiple files, parallel optimization with Guetzli consumes all available RAM, causing the system to use Swap, leading to slowdowns and freezes. + Guetzli uses a huge amount of RAM. In my case, when optimizing a file of about 30 MB, one process could use up to 12 GB of memory. If there are multiple files, parallel optimization with Guetzli consumes all available RAM, causing the system to use Swap, leading to slowdowns and freezes. -For this reason I decided to disable parallel optimization of JPEG files in Lossless mode. Now, it will take more time but will have less impact on the OS performance. + For this reason I decided to disable parallel optimization of JPEG files in Lossless mode. Now, it will take more time but will have less impact on the OS performance. +## [9.0.2] - 2024-10-08 -## 9.0.2 (2024-10-08) +### Fixed - Fixed Guetzli install. +## [9.0.1] - 2024-10-08 -## 9.0.1 (2024-10-08) +### Fixed - Fixed installing on Windows. +## [9.0.0] - 2024-10-03 -## 9.0.0 (2024-10-03) +### Added -- Improved image processing workflow. Check the [migration guide](./MIGRATION.md) for details. -- Added an interactive log for image processing. -- Changed the “File already exists” message from “error” to “info,” now only shown in verbose mode. -- Added a notice that animated AVIF is not supported (unfortunately). -- Fixed the progress indicator in conversion mode. It now correctly shows the total number of items. -- Fixed output to the user directory. The original folder structure is now preserved (I hope so!). +- Added an interactive log for image processing. +- Added a notice that animated AVIF is not supported (unfortunately). -## 8.0.0 (2024-08-05) +### Changed -❤️ Thank you for using Optimizt. If you have any suggestions or feedback, please don't hesitate to [open an issue](https://github.com/343dev/optimizt/issues). - -Here are the changes in this version: - -- Added EXIF Orientation tag support for JPEG. -- Removed convert ratio check for AVIF and WebP. -- Improved JPEG lossless optimization process. -- Changed configuration file format to CJS. - -[Migration guide](./MIGRATION.md). - - -## 7.0.0 (02.02.2024) - -SVGO config updated. - -Minimum Node.js version is set to 18.17. +- Improved image processing workflow. Check the [migration guide](./MIGRATION.md) for details. +- Changed the "File already exists" message from "error" to "info," now only shown in verbose mode. -Check out [migration guide](./MIGRATION.md). +### Fixed +- Fixed the progress indicator in conversion mode. It now correctly shows the total number of items. +- Fixed output to the user directory. The original folder structure is now preserved (I hope so!). -## 6.0.0 (27.08.2023) +## [8.0.0] - 2024-08-05 -Drop support for Node.js 14. +### Added +- Added EXIF Orientation tag support for JPEG. -## 5.0.1 (04.06.2023) +### Changed -Fixed an [issue](https://github.com/funbox/optimizt/issues/63) with an incorrect path to the configuration file on Windows systems. +- Improved JPEG lossless optimization process. +- Changed configuration file format to CJS. +### Removed -## 5.0.0 (19.05.2023) +- Removed convert ratio check for AVIF and WebP. -Removed `removeOffCanvasPaths` plugin from SVGO config due to known bugs: [svg/svgo#1732](https://github.com/svg/svgo/issues/1732), [svg/svgo#1646](https://github.com/svg/svgo/issues/1646). +## [7.0.0] - 2024-02-02 -Removed import of `removeUnknownsAndDefaults` plugin from the default config to make it easy to redefine the config on the user side. +### Changed -Check out [migration guide](./MIGRATION.md). +- SVGO config updated. +- Minimum Node.js version is set to 18.17. +## [6.0.0] - 2023-08-27 -## 4.1.1 (27.02.2023) +### Removed -Fixed installation and included the configuration file to the package. +- Drop support for Node.js 14. +## [5.0.1] - 2023-06-04 -## 4.1.0 (27.01.2023) +### Fixed -Added `--config` flag, which allows specifying path to file with custom settings. +- Fixed an [issue](https://github.com/funbox/optimizt/issues/63) with an incorrect path to the configuration file on Windows systems. -See more in README. +## [5.0.0] - 2023-05-19 +### Removed -## 4.0.0 (27.05.2022) +- Removed `removeOffCanvasPaths` plugin from SVGO config due to known bugs: [svg/svgo#1732](https://github.com/svg/svgo/issues/1732), [svg/svgo#1646](https://github.com/svg/svgo/issues/1646). +- Removed import of `removeUnknownsAndDefaults` plugin from the default config to make it easy to redefine the config on the user side. -This package is now pure ESM. +## [4.1.1] - 2023-02-27 -In lossy mode, JPEG files are now processed by sharp module. +### Fixed +- Fixed installation and included the configuration file to the package. -## 3.1.2 (06.05.2022) +## [4.1.0] - 2023-01-27 -Fixed total saved size calculation. +### Added -Added file format to the success message in conversion mode. +- Added `--config` flag, which allows specifying path to file with custom settings. +## [4.0.0] - 2022-05-27 -## 3.1.1 (08.04.2022) +### Changed -Removed logging unsupported symbols in CI environment. +- This package is now pure ESM. +- In lossy mode, JPEG files are now processed by sharp module. +## [3.1.2] - 2022-05-06 -## 3.1.0 (04.02.2022) +### Added -Added `--output` flag, which allows output to be written to provided directory. +- Added file format to the success message in conversion mode. +### Fixed -## 3.0.0 (31.01.2022) +- Fixed total saved size calculation. -Removed [pngquant-bin](https://github.com/imagemin/pngquant-bin) due to license issues. +## [3.1.1] - 2022-04-08 +### Removed -## 2.7.5 (23.09.2021) +- Removed logging unsupported symbols in CI environment. -Fixed “Cannot find module” error that occurred if Optimizt was installed using Yarn. +## [3.1.0] - 2022-02-04 +### Added -## 2.7.4 (22.09.2021) +- Added `--output` flag, which allows output to be written to provided directory. -Fixed SVG processing. +## [3.0.0] - 2022-01-31 +### Removed -## 2.7.3 (14.09.2021) +- Removed [pngquant-bin](https://github.com/imagemin/pngquant-bin) due to license issues. -Updated project dependencies. +## [2.7.5] - 2021-09-23 -Optimizt now has bigger file sizes for AVIF images. See: +### Fixed -- -- +- Fixed "Cannot find module" error that occurred if Optimizt was installed using Yarn. +## [2.7.4] - 2021-09-22 -## 2.7.2 (21.06.2021) +### Fixed -Sometimes Optimizt could return empty JPEG files. Now it's fixed. +- Fixed SVG processing. +## [2.7.3] - 2021-09-14 -## 2.7.1 (18.06.2021) +### Changed -Added “Differences between ‘lossy’ and ‘lossless’” section to [README.md](README.md). +- Updated project dependencies. +- Optimizt now has bigger file sizes for AVIF images. See: + - + - -Disabled cursor hiding in progress bar. +## [2.7.2] - 2021-06-21 +### Fixed -## 2.7.0 (16.06.2021) +- Sometimes Optimizt could return empty JPEG files. Now it's fixed. -Added display of summary. +## [2.7.1] - 2021-06-18 +### Added -## 2.6.1 (11.06.2021) +- Added "Differences between 'lossy' and 'lossless'" section to [README.md](README.md). -Fixed “Only YUV color space input jpeg is supported” error. -Now Optimizt may set sRGB color space for images before processing them. +### Changed +- Disabled cursor hiding in progress bar. -## 2.6.0 (28.05.2021) +## [2.7.0] - 2021-06-16 -Spinner was replaced with a progress bar. +### Added +- Added display of summary. -## 2.5.0 (08.04.2021) +## [2.6.1] - 2021-06-11 -Added `--force` flag to CLI, which allows creating AVIF and WebP even if output file size increased or file already exists. +### Fixed -Added [workflows](./workflows) directory with examples of GitHub Actions workflows. +- Fixed "Only YUV color space input jpeg is supported" error. Now Optimizt may set sRGB color space for images before processing them. -Enabled use of [LZW compression](https://github.com/kohler/gifsicle/commit/0fd160b506ab0c4bce9f6852b494dc2b4ac9733f) -to optimize GIF files in lossy mode. +## [2.6.0] - 2021-05-28 +### Changed -## 2.4.2 (19.02.2021) +- Spinner was replaced with a progress bar. -Fixed ratio logging. +## [2.5.0] - 2021-04-08 +### Added -## 2.4.1 (16.02.2021) +- Added `--force` flag to CLI, which allows creating AVIF and WebP even if output file size increased or file already exists. +- Added [workflows](./workflows) directory with examples of GitHub Actions workflows. -Added Troubleshooting section to [README.md](README.md). +### Changed -Added error handler for `jpegoptim` child process. +- Enabled use of [LZW compression](https://github.com/kohler/gifsicle/commit/0fd160b506ab0c4bce9f6852b494dc2b4ac9733f) to optimize GIF files in lossy mode. +## [2.4.2] - 2021-02-19 -## 2.4.0 (27.01.2021) +### Fixed -Added AVIF support. +- Fixed ratio logging. +## [2.4.1] - 2021-02-16 -## 2.3.1 (25.01.2021) +### Added -Fixed GIF to WebP conversion. +- Added Troubleshooting section to [README.md](README.md). +- Added error handler for `jpegoptim` child process. +## [2.4.0] - 2021-01-27 -## 2.3.0 (25.01.2021) +### Added -Bye-bye imagemin. Now we use optimizers directly. +- Added AVIF support. -Added a limit on the number of optimization tasks run simultaneously. +## [2.3.1] - 2021-01-25 -Fixed a bug with JPEG processing (jpegoptim could crash with some files). +### Fixed +- Fixed GIF to WebP conversion. -## 2.2.0 (28.10.2020) +## [2.3.0] - 2021-01-25 -Updated dependencies. +### Added -Unpinned dependencies versions to major range. +- Added a limit on the number of optimization tasks run simultaneously. +### Changed +- Bye-bye imagemin. Now we use optimizers directly. -## 2.1.0 (27.10.2020) +### Fixed -Added disabling coloring output when no TTY found. +- Fixed a bug with JPEG processing (jpegoptim could crash with some files). +## [2.2.0] - 2020-10-28 -## 2.0.1 (12.10.2020) +### Changed -Removed unused logic from [formatBytes](lib/formatBytes.js). +- Updated dependencies. +- Unpinned dependencies versions to major range. -Optimized [prepareFilePaths](lib/prepareFilePaths.js) function. +## [2.1.0] - 2020-10-27 -Updated images used in README. +### Added +- Added disabling coloring output when no TTY found. -## 2.0.0 (07.10.2020) +## [2.0.1] - 2020-10-12 -Prepared the package for publishing on GitHub. +### Changed -Updated some deps, fixed small linter errors, added LICENSE. +- Removed unused logic from [formatBytes](lib/formatBytes.js). +- Optimized [prepareFilePaths](lib/prepareFilePaths.js) function. +- Updated images used in README. +## [2.0.0] - 2020-10-07 -## 1.0.1 (09.06.2020) +### Changed -We continue the glorious tradition of “Publish first, think later”. +- Prepared the package for publishing on GitHub. +- Updated some deps, fixed small linter errors, added LICENSE. -Removed useless files from the bundled package. +## [1.0.1] - 2020-06-09 +### Changed -## 1.0.0 (18.05.2020) +- Removed useless files from the bundled package. -First major version! +## [1.0.0] - 2020-05-18 -The script does everything described in [README](./README.md): +### Added -1. Compresses raster images lossy and lossless. +- The script does everything described in [README](./README.md): + 1. Compresses raster images lossy and lossless. + 2. Optimizes SVG files preserving their readability. + 3. Generates WebP versions while optimizing raster images. -2. Optimizes SVG files preserving their readability. +### Changed -3. Generates WebP versions while optimizing raster images. +- First major version! +## [0.1.0] - 2020-04-06 -## 0.1.0 (06.04.2020) +### Added -Init version. +- Init version. From f6255bee5fa0100c2c3ca85638ee7e641867c64e Mon Sep 17 00:00:00 2001 From: 343dev <343dev@users.noreply.github.com> Date: Tue, 23 Dec 2025 18:03:06 +0700 Subject: [PATCH 3/4] Update CHANGELOG --- CHANGELOG.md | 12 ++++++++++++ MIGRATION.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84bd326..142c6c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [12.0.0] - 2025-12-23 + +### Added + +- Configure trusted publishing for npm package to enhance security by eliminating token-based publishing risks (see [npm trusted publishers](https://docs.npmjs.com/trusted-publishers)). + +### Changed + +- **BREAKING:** Increase minimum Node.js version to 20.19.0 due to dependency requirements. +- **BREAKING:** Update SVGO config in default [.optimiztrc.cjs](.optimiztrc.cjs) to migrate from v3 to v4 (see [migration guide](./MIGRATION.md)). +- Update all dependencies to latest versions with a 7-day cooling period and fix versions to prevent security vulnerabilities during installations. + ## [11.0.0] - 2025-05-04 ### Added diff --git a/MIGRATION.md b/MIGRATION.md index 587ab7e..5330784 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,5 +1,35 @@ # Migration +## 11.0.0 → 12.0.0 + +The SVGO configuration has been updated to be compatible with SVGO v4 (see [migration guide](https://svgo.dev/docs/migrations/migration-from-v3-to-v4/)). If you use a custom [.optimiztrc.cjs](.optimiztrc.cjs) file, update your SVG plugins configuration to match the new format. + +See the changes in commit [8c1215e](https://github.com/343dev/optimizt/commit/8c1215e2441ce03770d36d5c7ae31e28e9ef5659): + +```diff +diff --git a/.optimiztrc.cjs b/.optimiztrc.cjs +index ca611d2..148dcd4 100644 +--- a/.optimiztrc.cjs ++++ b/.optimiztrc.cjs +@@ -71,14 +71,8 @@ module.exports = { + indent: 2, + }, + plugins: [ +- { +- name: 'preset-default', +- params: { +- overrides: { +- removeViewBox: false, +- }, +- }, +- }, ++ 'preset-default', ++ 'removeTitle', + 'cleanupListOfValues', + 'convertStyleToAttrs', + 'reusePaths', +``` + ## 10.0.0 → 11.0.0 If you use an external configuration file (`.optimiztrc.cjs`), add the following parameters with a value of `1` to preserve the previous behavior: From 8e3c8d9c6733c50d4551604fe157c6d68465590f Mon Sep 17 00:00:00 2001 From: 343dev <343dev@users.noreply.github.com> Date: Tue, 23 Dec 2025 18:05:40 +0700 Subject: [PATCH 4/4] 12.0.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f60468d..d8cd7e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@343dev/optimizt", - "version": "11.0.0", + "version": "12.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@343dev/optimizt", - "version": "11.0.0", + "version": "12.0.0", "license": "MIT", "dependencies": { "@343dev/gifsicle": "1.0.0", diff --git a/package.json b/package.json index 3f69dcd..04e32a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@343dev/optimizt", - "version": "11.0.0", + "version": "12.0.0", "description": "CLI image optimization tool", "keywords": [ "svg",