chore(deps): migrate to husky 9.0.6 #786
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates from [email protected] to [email protected]. Husky provides support for Git Hooks.
To avoid the error
[ERR_REQUIRE_ESM]
when installing dependencies after the upgrade, scripts/prepare.js is migrated to.husky/install.mjs
according to the recommendations in Husky > CI server and Docker.require('husky')
used for Husky8
is replaced byimport('husky')
needed for Husky9
.The following lines are removed from .husky/pre-commit. These are not needed in Husky
9
:Local Verification
On a local Ubuntu 22.04 system (not a CI system) with Node.js
20
...Installation
Execute:
Ensure that there are no errors or deprecation warnings. The following log lines should be displayed:
Hook check
Make a change to
cypress/e2e/1-getting-started/todo.cy.js
(for instance, add// comment
as a new line at the end of the file) and commit the change.Ensure that the Husky hook runs successfully with the following output:
CI verification
Manually run GitHub workflow chrome-docker.yml and under step
Chrome
check that the following appears, with no errors from Husky:References