refactor: migrate husky 9 (#7505)

* build: migrate hook bootstrap to husky v9

* chore: update commit-msg hook format for husky v9

* chore: bump husky to the latest minor
This commit is contained in:
Jay 2026-03-15 13:38:22 +02:00 committed by GitHub
parent 740da889f1
commit 7e1a65c3a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 12 deletions

View File

@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx commitlint --edit "$1"

12
package-lock.json generated
View File

@ -39,7 +39,7 @@
"get-stream": "^3.0.0",
"gulp": "^4.0.2",
"handlebars": "^4.7.8",
"husky": "^8.0.3",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"memoizee": "^0.4.17",
"minimist": "^1.2.8",
@ -7705,16 +7705,16 @@
}
},
"node_modules/husky": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
"integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==",
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true,
"license": "MIT",
"bin": {
"husky": "lib/bin.js"
"husky": "bin.js"
},
"engines": {
"node": ">=14"
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"

View File

@ -57,8 +57,7 @@
"start": "node ./sandbox/server.js",
"examples": "node ./examples/server.js",
"fix": "eslint --fix lib/**/*.js",
"prepare": "husky install && npm run prepare:hooks",
"prepare:hooks": "npx husky set .husky/commit-msg \"npx commitlint --edit $1\""
"prepare": "husky"
},
"repository": {
"type": "git",
@ -108,7 +107,7 @@
"get-stream": "^3.0.0",
"gulp": "^4.0.2",
"handlebars": "^4.7.8",
"husky": "^8.0.3",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"memoizee": "^0.4.17",
"minimist": "^1.2.8",