Skip to content

Commit

Permalink
chore(deps-dev): bump husky from 8.0.3 to 9.0.11 (#3037)
Browse files Browse the repository at this point in the history
Also migrate the configuration for husky v9.
Explain how to configure husky with Node Version Managers.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Thomas Bouffard <[email protected]>
  • Loading branch information
dependabot[bot] and tbouffard authored Mar 26, 2024
1 parent e0a9a80 commit 2d9f541
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
11 changes: 6 additions & 5 deletions docs/contributors/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 2d9f541

Please sign in to comment.