From 2d9f541cca9d11de370f9f4ddca50f23972e3c6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:22:20 +0100 Subject: [PATCH] chore(deps-dev): bump husky from 8.0.3 to 9.0.11 (#3037) Also migrate the configuration for husky v9. Explain how to configure husky with Node Version Managers. --------- Signed-off-by: dependabot[bot] Co-authored-by: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> --- .husky/pre-commit | 3 --- docs/contributors/development.md | 11 ++++++----- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 36af219892..2312dc587f 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npx lint-staged diff --git a/docs/contributors/development.md b/docs/contributors/development.md index f5b3fff26b..3c1419495a 100644 --- a/docs/contributors/development.md +++ b/docs/contributors/development.md @@ -30,19 +30,20 @@ Typescript have been chosen as it's strongly typed and we believe it adds some s More information here: [Typescript](development.md#typescript) To enforce best practices we use ESLint and husky. -The latter performs ```eslint --fix``` on pre-commit event to make sure that committed code meets standards. +The latter performs lint checks on pre-commit event to make sure that committed code meets standards. -### Husky settings for nvm user +### Husky settings when using Node Version Managers -On commit, if the pre-commit hook generates an `Command not found` error, create a `.huskyrc` file in your home -directory and add the following content: +On commit, if you use a Node Version Manager, the pre-commit hook may generate an `Command not found` error. +If so, create a [startup file](https://typicode.github.io/husky/how-to.html#startup-files) and add the following content (this example is given for Linux or macOS when using nvm): ```bash # This loads nvm.sh and sets the correct PATH before running hook export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" ``` + For more details, see -- https://typicode.github.io/husky/#/?id=command-not-found +- https://typicode.github.io/husky/how-to.html#node-version-managers-and-guis - https://github.com/typicode/husky/issues/912 diff --git a/package-lock.json b/package-lock.json index b6b3a823f5..d882ff8fca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "eslint-plugin-unicorn": "~51.0.1", "expect-playwright": "~0.8.0", "fs-extra": "~11.2.0", - "husky": "~8.0.3", + "husky": "~9.0.11", "jest": "~29.7.0", "jest-environment-jsdom": "~29.7.0", "jest-extended": "~4.0.2", @@ -6554,15 +6554,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.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, "bin": { - "husky": "lib/bin.js" + "husky": "bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" @@ -17771,9 +17771,9 @@ "dev": true }, "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==", "dev": true }, "iconv-lite": { diff --git a/package.json b/package.json index 4314a78219..8a74743cb5 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "prepublishOnly": "pinst --disable", "postpublish": "pinst --enable", "prepare": "run-s prepare:*", - "prepare:husky": "husky install", + "prepare:husky": "husky", "utils-all": "run-s utils:build utils:test:*", "utils:build": "rollup --strictDeprecations --config scripts/utils/rollup.config.mjs", "utils:test:json": "node ./scripts/utils/dist/utils.mjs test/fixtures/bpmn/simple-start-task-end.bpmn --output json", @@ -139,7 +139,7 @@ "eslint-plugin-unicorn": "~51.0.1", "expect-playwright": "~0.8.0", "fs-extra": "~11.2.0", - "husky": "~8.0.3", + "husky": "~9.0.11", "jest": "~29.7.0", "jest-environment-jsdom": "~29.7.0", "jest-extended": "~4.0.2",