From 04b0900b15d1d81586748decdc266819a9620ffe Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Mar 2026 20:26:29 +0000 Subject: [PATCH] chore: upgrade husky from ^8 to ^9 Migrates hook files to husky v9 format (removes shebang and sourcing lines). Updates prepare script from "husky install" to "husky". https://claude.ai/code/session_01HNvBcQzT1SviRqkUpP5Xce --- .dry-aged-deps.json | 1 - .husky/commit-msg | 4 +--- .husky/pre-commit | 4 +--- .husky/pre-push | 4 +--- package.json | 4 ++-- yarn.lock | 8 ++++---- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.dry-aged-deps.json b/.dry-aged-deps.json index 98caa3b..af83b26 100644 --- a/.dry-aged-deps.json +++ b/.dry-aged-deps.json @@ -10,7 +10,6 @@ "eslint-plugin-jsonc": "Major version upgrade; blocked by eslint 8.x constraint", "eslint-plugin-no-secrets": "Major version upgrade; blocked by eslint 8.x constraint", "eslint-plugin-unicorn": "Major version upgrade; blocked by eslint 8.x constraint", - "husky": "Major version upgrade; requires migration to new config format", "jest": "Pinned to ^27; upgrade requires ts-jest migration", "jest-junit": "Major version upgrade; blocked by jest 27.x constraint", "ts-jest": "Pinned to jest 27.x; upgrade requires jest migration" diff --git a/.husky/commit-msg b/.husky/commit-msg index ab5829a..ad405e3 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,2 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" npx --no -- cspell lint --show-suggestions "${1}" -npx --no -- commitlint --edit "${1}" \ No newline at end of file +npx --no -- commitlint --edit "${1}" diff --git a/.husky/pre-commit b/.husky/pre-commit index 9759cc2..1361e50 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" -git diff --name-only --staged | npx cspell lint --dot --gitignore --show-suggestions --no-must-find-files --file-list stdin \ No newline at end of file +git diff --name-only --staged | npx cspell lint --dot --gitignore --show-suggestions --no-must-find-files --file-list stdin diff --git a/.husky/pre-push b/.husky/pre-push index 82f2bab..686edaa 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,5 +1,3 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" npm run test npm run eslint -npx dry-aged-deps --check \ No newline at end of file +npx dry-aged-deps --check diff --git a/package.json b/package.json index d27faa9..184512a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "eslint": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools", "eslint:json": "eslint --no-eslintrc --no-error-on-unmatched-pattern --config .eslintrc-json.json --ext .json .", "package": "mkdir -p dist/js && npm pack --pack-destination dist/js", - "prepare": "husky install", + "prepare": "husky", "spellcheck": "cspell lint --gitignore --dot --show-suggestions -e \".git/**\" \"**\"", "test": "jest --passWithNoTests --all --updateSnapshot && npm run eslint && npm run spellcheck && npm run eslint:json", "test:update": "jest --updateSnapshot", @@ -45,7 +45,7 @@ "eslint-plugin-prettier": "^5", "eslint-plugin-unicorn": "^42.0.0", "http-status-codes": "^2.2.0", - "husky": "^8.0.1", + "husky": "^9", "jest": "^27", "jest-junit": "^13", "json-schema": "^0.4.0", diff --git a/yarn.lock b/yarn.lock index d7222f7..9ddf5f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3132,10 +3132,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@^8.0.1: - version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" - integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== +husky@^9: + version "9.1.7" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d" + integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA== iconv-lite@0.4.24: version "0.4.24"