diff --git a/.husky/commit-msg b/.husky/commit-msg old mode 100755 new mode 100644 index 80416c7b..70bd3dd2 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npx --no-install commitlint --edit "$1" diff --git a/.husky/post-commit b/.husky/post-commit old mode 100755 new mode 100644 index bd6c6964..7fd81f57 --- a/.husky/post-commit +++ b/.husky/post-commit @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npm run release:dry-run diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100755 new mode 100644 index cf0c46b9..041c660c --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npx --no-install lint-staged diff --git a/package-lock.json b/package-lock.json index f7dbacf1..dd2ff38c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@commitlint/cli": "^18.6.0", "@commitlint/config-conventional": "^18.6.0", "eslint": "^8.56.0", - "husky": "^8.0.3", + "husky": "^9.0.6", "lint-staged": "^15.2.0", "npm-run-all": "^4.1.5", "prettier": "^3.2.4", @@ -6003,14 +6003,14 @@ } }, "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.0.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.6.tgz", + "integrity": "sha512-EEuw/rfTiMjOfuL7pGO/i9otg1u36TXxqjIA6D9qxVjd/UXoDOsLor/BSFf5hTK50shwzCU3aVVwdXDp/lp7RA==", "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" diff --git a/package.json b/package.json index 1f625fc6..014fd8f7 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@commitlint/cli": "^18.6.0", "@commitlint/config-conventional": "^18.6.0", "eslint": "^8.56.0", - "husky": "^8.0.3", + "husky": "^9.0.6", "lint-staged": "^15.2.0", "npm-run-all": "^4.1.5", "prettier": "^3.2.4", @@ -80,11 +80,11 @@ "prerelease": "git switch main && git pull && npm ci && npm run clean && npm test && npm run clean", "release": "standard-version", "release:dry-run": "standard-version --dry-run", - "prepare": "husky install" + "prepare": "husky" }, "lint-staged": { "*.{js,jsx,cjs,mjs,ts,tsx}": "eslint --cache --fix", - "!(*.snap)": "prettier --cache --write", + "!(**/*.snap|.husky/**)": "prettier --cache --write", "!(CHANGELOG).md": "remark --frail" }, "standard-version": { diff --git a/test/__snapshots__/init.test.js.snap b/test/__snapshots__/init.test.js.snap index d3da9b7c..8d4693f2 100644 --- a/test/__snapshots__/init.test.js.snap +++ b/test/__snapshots__/init.test.js.snap @@ -27,7 +27,7 @@ exports[`update "package.json" 1`] = ` "root": true, }, "lint-staged": { - "!(*.snap)": "prettier --cache --write", + "!(**/*.snap|.husky/**)": "prettier --cache --write", "!(CHANGELOG).md": "remark --frail", "*.css": "xyz", "*.{js,jsx,cjs,mjs,ts,tsx}": "eslint --cache --fix", @@ -54,7 +54,7 @@ exports[`update "package.json" 1`] = ` "lint:styles:fix": "npm run prettier -- --write", "lint:types": "tsc --noEmit", "lint:types:watch": "npm run lint:types -- --watch", - "prepare": "husky install", + "prepare": "husky", "prerelease": "git switch main && git pull && npm ci && npm run clean && npm test && npm run clean", "pretest": "npm run lint", "prettier": "prettier --cache .", @@ -100,7 +100,7 @@ exports[`update "package.json" without fields 1`] = ` "root": true, }, "lint-staged": { - "!(*.snap)": "prettier --cache --write", + "!(**/*.snap|.husky/**)": "prettier --cache --write", "!(CHANGELOG).md": "remark --frail", "*.{js,jsx,cjs,mjs,ts,tsx}": "eslint --cache --fix", }, @@ -125,7 +125,7 @@ exports[`update "package.json" without fields 1`] = ` "lint:styles:fix": "npm run prettier -- --write", "lint:types": "tsc --noEmit", "lint:types:watch": "npm run lint:types -- --watch", - "prepare": "husky install", + "prepare": "husky", "prerelease": "git switch main && git pull && npm ci && npm run clean && npm test && npm run clean", "pretest": "npm run lint", "prettier": "prettier --cache .", @@ -257,26 +257,17 @@ jobs: `; exports[`write ".husky/commit-msg" 1`] = ` -"#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npx --no-install commitlint --edit "$1" +"npx --no-install commitlint --edit "$1" " `; exports[`write ".husky/post-commit" 1`] = ` -"#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npm run release:dry-run +"npm run release:dry-run " `; exports[`write ".husky/pre-commit" 1`] = ` -"#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npx --no-install lint-staged +"npx --no-install lint-staged " `;