From abb23b4cf680b19338d6e5e8fd21be1f26e93c9d Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 17 Apr 2024 15:20:29 +0200 Subject: [PATCH] chore: upgrade husky to v9 --- .husky/post-merge | 1 + .husky/pre-commit | 1 + bin/hooks/{postMerge => postMerge.sh} | 0 package-lock.json | 12 ++++++------ package.json | 10 ++-------- 5 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 .husky/post-merge create mode 100644 .husky/pre-commit rename bin/hooks/{postMerge => postMerge.sh} (100%) diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100644 index 0000000..24c539d --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1 @@ +./bin/hooks/postMerge.sh diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..aded6d5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +./bin/checkPackageVersions.sh && npx lint-staged diff --git a/bin/hooks/postMerge b/bin/hooks/postMerge.sh similarity index 100% rename from bin/hooks/postMerge rename to bin/hooks/postMerge.sh diff --git a/package-lock.json b/package-lock.json index 6c11b45..1bb2dd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "eslint-plugin-lodash": "^7.1.0", "fs-extra": "^11.2.0", "html-webpack-plugin": "^5.5.4", - "husky": "^8.0.3", + "husky": "^9.0.11", "lerna": "^8.1.2", "lint-staged": "^15.2.0", "mini-css-extract-plugin": "^2.7.6", @@ -9279,14 +9279,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.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "bin": { - "husky": "lib/bin.js" + "husky": "bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" diff --git a/package.json b/package.json index db210c6..b141f80 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "packages/*" ], "scripts": { - "prepare": "husky install", + "prepare": "husky", "build": "better-npm-run build", "dev": "better-npm-run dev", "util:lint": "ESLINT_STRICT=true eslint --ext .tsx --ext .ts $(ls -d ./packages/*/* | grep -E '(src|test|grammar)$')", @@ -51,12 +51,6 @@ "prettier --parser scss --write" ] }, - "husky": { - "hooks": { - "pre-commit": "./bin/checkPackageVersions.sh && lint-staged", - "post-merge": "./bin/hooks/postMerge" - } - }, "dependencies": { "@babel/core": "^7.23.5", "@babel/plugin-transform-runtime": "^7.23.4", @@ -81,7 +75,7 @@ "eslint-plugin-lodash": "^7.1.0", "fs-extra": "^11.2.0", "html-webpack-plugin": "^5.5.4", - "husky": "^8.0.3", + "husky": "^9.0.11", "lerna": "^8.1.2", "lint-staged": "^15.2.0", "mini-css-extract-plugin": "^2.7.6",