GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — chore(deps): update dependency husky to v9 by renovate[bot] · Pull Request #38 · phcode-dev/tsIntelligence Conversation
|
| Package | Change | Age | Confidence |
|---|---|---|---|
| husky | 8.0.3 → 9.1.7 |
v9.1.7Full Changelog: typicode/husky@v9.1.6...v9.1.7
v9.1.6Full Changelog: typicode/husky@v9.1.5...v9.1.6
v9.1.5pre-merge-commit hook by @RainMeoCat in #1497Full Changelog: typicode/husky@v9.1.4...v9.1.5
v9.1.4v9.1.3PATHv9.1.2Show a message instead of automatically removing deprecated code.
This only concerns projects that still have the following code in their hooks:
- #!/usr/bin/env sh # <- This is deprecated, remove it - . "$(dirname -- "$0")/_/husky.sh" # <- This is deprecated, remove it # Rest of your hook code
Hooks with these lines will fail in v10.0.0
v9.1.1Super saiyan god dog! It's over 9.0.0!
You can now run package commands directly, no need for npx or equivalents.
It makes writing hooks more intuitive and is also slightly faster 🐺⚡️
# .husky/pre-commit - npx jest + jest # ~0.2s faster
A new recipe has been added to the docs. Lint staged files without external dependencies (inspired by Prettier docs). Feel free to modify it.
# .husky/pre-commit prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown git update-index --again
For more advanced use cases, see lint-staged.
bunx husky init command#!/usr/bin/env sh and . "$(dirname -- "$0")/_/husky.sh" are deprecated. husky command will automatically remove them, no action required.~/.huskyrc please move it to .config/husky/init.shSupport for these will be removed in v10.
If Git hooks don't fit your workflow, you can disable Husky globally. Just add export HUSKY=0 to .config/husky/init.sh.
I've seen some confusion about this on X, so just a heads-up!
Husky is downloaded over 45M times per month and used by ~1.5M projects. If your company wants to sponsor, you can do so here: GitHub Sponsors.
Have a nice summer ☀️ I'm open to new opportunities/consulting so feel free to drop me a message 😉
v9.1.0v9.0.11package-lock.json by @btea in #1383export HUSKY=0 in init (fixes #1393) by @typicode in #1395v9.0.10v9.0.9v9.0.8v9.0.7~/.huskyrc correctly (compatibility with v8)v9.0.6v9.0.5v9.0.4v9.0.3v9.0.2v9.0.1Kicking off the year with an exciting update!
Note: install using husky@latest to get the bug fixes that were released after.
husky initnpm pkg set scripts.prepare="husky install" npm run prepare npx husky add .husky/pre-commit "npm test"
Adding husky to a project is now easier than ever. It's just a single line that does the same as above. No need to read the docs to get started anymore.
npx husky init
npx husky add .husky/pre-commit "npm test" git add --chmod=+x .husky/pre-commit # On Windows
Adding a hook is as simple as creating a file. This can be accomplished using your favorite editor, a script or a basic echo command. For example, on Linux/macOS:
echo "npm test" > .husky/pre-commit
v8 was already the most compact Git hooks manager at approximately 6kB.
v9 takes this a step further, reducing the size to just 3kB, likely making it the smallest devDependency in your toolkit.
To give you an idea of how small it is, the biggest file in the project is the MIT license 😄
Additional features are in the pipeline for v9. Stay tuned 🙌
--provenance for safer publishing.$XDG_CONFIG_HOME support. Move ~/.huskyrc to ~/.config/husky/init.sh for centralized configuration.husky install. Use husky or husky some/dir for the same functionality (deprecation notice to be added)..git is missing; it now triggers a warning instead of failure.HUSKY_DEBUG=1 with HUSKY=2 for debugging.ESM for module usage.v9 is backward compatible with v8, allowing you to freely upgrade and migrate your hooks later.
Here are the steps to migrate:
package.json
{
"scripts": {
- "prepare": "husky install"
+ "prepare": "husky"
}
}.husky/pre-commit
- #!/usr/bin/env sh - . "$(dirname -- "$0")/_/husky.sh" npm test
Note: sh will be used to run hooks, even if a shebang is set.
If you were using husky as a module:
- const husky = require('husky') - // ... + import husky from 'husky' + console.log(husky())
📅 Schedule: (in timezone Asia/Calcutta)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
bd95ee6 to
249502b
Compare
249502b to
1ae2b56
Compare
1ae2b56 to
b3c156d
Compare
c155bf1 to
076dcab
Compare
100c25f to
58ae3af
Compare
58ae3af to
47c926a
Compare
47c926a to
18b4faa
Compare
18b4faa to
0cb605d
Compare
0cb605d to
a8a54f5
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.