⚠️ Changes for >=3
can now be found in https://github.com/typicode/husky/releases
>= 2.13.2
. If you're already using husky v2
and don't use an old version of Git, you can safely upgrade.Due to issues with Git < 2.13.2
, this version is a rollback and is the same as husky v2.4.1
. Changes introduced in v2.5.0
and v2.6.0
will be published in v3.0.0
.
HUSKY_USE_YARN
setting to use Yarn to run Husky<= 8.6.0
Deprecated
CWD
in debug messagesDeprecated
HUSKY_SKIP_HOOKS
to skip all hooksHUSKY_DEBUG=1
effective like HUSKY_DEBUG=true
run-node/run-node
rather than .bin/run-node
.
rather than source
Node 6
supportis-ci
and support more CIs1.3.0
change related to stdin
due to a bug on Windowsstdin
if hook is running in a terminalexeca
dependencypackage.json
doesn't existHUSKY_SKIP_INSTALL
value first before checking if .git
exists.git/hooks
if it doesn't existAfter a year of pre-releases and a complete rewrite, this marks the first stable release of husky 🐶🎉.
Below you'll find consolidated changes since 0.14.3
. There's no change in code between 1.0.0-rc.15
and 1.0.0
.
Hooks
sendemail-validate
hookConfig
scripts
field to husky
fieldpre-commit
rather than precommit
).huskyrc
configPackage managers
Environment variables
HUSKY_SKIP_INSTALL
environment variable for skipping git hooks installationHUSKY_GIT_STDIN
environment variable for pre-push
, pre-receive
, post-receive
and post-rewrite
to access arguments passed by Git via stdinGIT_PARAMS
to HUSKY_GIT_PARAMS
Messages
--no-verify
message more accurate and only show it for hooks that can be skippedUpgrade
husky-upgrade
command to automatically migrate hooks in package.json
scripts
Other
Node 4
supportnvm
support (see Node version management in docs)Huge thanks to all the Contributors and Patreon Supporters! 🙏
--no-verify
message more accurate and only show it for hooks that can be skippedHUSKY_GIT_PARAMS
containing only the first Git paramnode_modules/husky
is missing, show message but do not crashdependencies
HUSKY_GIT_STDIN
environment variable for pre-push
, pre-receive
, post-receive
and post-rewrite
to access arguments passed by Git via stdin.cosmiconfig
dependencypackage.json
normalization errorpnpm
yorkie
hooksrun-node
dependencyGIT_PARAMS
becomes HUSKY_GIT_PARAMS
1.0.0
versioningGIT_STDIN
for the moment. Needs more testing.rc.10
, rc.11
and rc.12
are broken for some GUI clients due to read
command
.git/hooks
directory doesn't exitv0.14
git hooks wouldn't have been uninstalledpostinstall
script to install
upgrader
from OS X/Linux[[
errorgit
command failshusky-upgrade
Node 4
supportsendemail-validate
hook #173HUSKY_SKIP_INSTALL
environment variable for skipping git hooks installation #178.huskyrc
config #209pnpm
supportyarn
is the only package manager installedscripts
field to husky
fieldpre-commit
rather than precommit
)nvm
supporthusky-upgrade
commandscripts
(but still run them)PATH
#150HOME
nvm
was installed with Brewnpm@5
Error: Cannot find module
warning when uninstallingNode 0.12
supportnvm
if it's already in PATH
--no-verify
message for prepare-commit-msg
#137Fixes issue with OS X + brew where nvm was loaded even when npm was already present
that was introduced in v0.13.0
as it was preventing Husky to load nvm
in some cases #106husky
a little less verbose by defaultOS X + brew
where nvm
was loaded even when npm
was already presentv1.9
on Windowsnode_modules
directory (i.e. ./node_modules/A/node_modules/husky
).git
not found and git
not in PATH
)npm
is already present in path, doesn't load nvm
default or .nvmrc
version, which makes things faster in terminal. In GUI apps, the behavior is unchanged.