diff --git a/package-lock.json b/package-lock.json index e6fa249c4022..8288e03943ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -129,7 +129,7 @@ "event-to-promise": "^0.8.0", "graphql": "^16.8.1", "http-status-code": "^2.1.0", - "husky": "^8.0.3", + "husky": "^9.0.8", "jest": "29.7.0", "jest-expect-message": "1.1.3", "jest-fail-on-console": "^3.1.1", @@ -8244,15 +8244,15 @@ } }, "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.8", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.8.tgz", + "integrity": "sha512-/f3Oj+419kf2RkchD5GpFTPj8yAeMYuSs0vB+cgdi8pDxydI8zCFlK/kVQOCqAujahfW6fDBb7t/ZWxTfevOpA==", "dev": true, "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 1bdbaa23281a..83e86fc7dc88 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "post-lints": "node src/content-linter/scripts/post-lints.js", "postinstall": "cp package-lock.json .installed.package-lock.json && echo \"Updated .installed.package-lock.json\" # see husky/post-checkout and husky/post-merge", "precompute-pageinfo": "tsx src/pageinfo/scripts/precompute-pageinfo.ts", - "prepare": "husky install src/workflows/husky", + "prepare": "husky src/workflows/husky", "prettier": "prettier -w \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"", "prettier-check": "prettier -c \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"", "prevent-pushes-to-main": "node src/workflows/prevent-pushes-to-main.js", @@ -350,7 +350,7 @@ "event-to-promise": "^0.8.0", "graphql": "^16.8.1", "http-status-code": "^2.1.0", - "husky": "^8.0.3", + "husky": "^9.0.8", "jest": "29.7.0", "jest-expect-message": "1.1.3", "jest-fail-on-console": "^3.1.1", diff --git a/src/workflows/husky/post-checkout b/src/workflows/husky/post-checkout index 5f94a5bf6983..9d25ff784c46 100755 --- a/src/workflows/husky/post-checkout +++ b/src/workflows/husky/post-checkout @@ -1,6 +1,5 @@ #!/bin/sh [ -n "$CI" ] && exit 0 -. "$(dirname "$0")/_/husky.sh" # Same process in husky/post-merge echo "Check if any packages need to be installed" diff --git a/src/workflows/husky/post-merge b/src/workflows/husky/post-merge index db258bcc431b..cc54fe8fb203 100755 --- a/src/workflows/husky/post-merge +++ b/src/workflows/husky/post-merge @@ -1,6 +1,5 @@ #!/bin/sh [ -n "$CI" ] && exit 0 -. "$(dirname "$0")/_/husky.sh" # Same process in husky/post-checkout echo "Check if any packages need to be installed" diff --git a/src/workflows/husky/pre-commit b/src/workflows/husky/pre-commit index 0d3f3fc77cf5..68ad34b7abb5 100755 --- a/src/workflows/husky/pre-commit +++ b/src/workflows/husky/pre-commit @@ -1,6 +1,5 @@ #!/bin/sh [ -n "$CI" ] && exit 0 -. "$(dirname "$0")/_/husky.sh" # The --verbose flag tells lint-staged to *not* swallow the stdout # output even if it passes. diff --git a/src/workflows/husky/pre-push b/src/workflows/husky/pre-push index 1ba6d66439b3..002cd4bef9c6 100755 --- a/src/workflows/husky/pre-push +++ b/src/workflows/husky/pre-push @@ -1,5 +1,4 @@ #!/bin/sh [ -n "$CI" ] && exit 0 -. "$(dirname "$0")/_/husky.sh" npm run prevent-pushes-to-main