Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump husky from 4.3.8 to 5.0.9 #5147

Merged
merged 3 commits into from Feb 20, 2021
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 15, 2021

Bumps husky from 4.3.8 to 5.0.9.

Release notes

Sourced from husky's releases.

v5.0.9

  • fix(install): do not fail if not inside a Git directory (closes #851)

See https://github.com/typicode/husky/releases/tag/v5.0.0 for v5 release notes

v5.0.8

  • fix(install): better handle Git <2.9 (#846) closes #844

v5.0.7

  • fix(shell): double quote params (#824)

v5.0.6

  • Remove unused files

v5.0.5

  • Fix custom directory support #827

v5.0.0

馃憠 See https://typicode.github.io/husky for breaking changes and new installation instructions.

Note about the license

Husky 5 is released under The Parity Public License.

It doesn't affect you if you're using husky in an Open Source project or if you're a sponsor. You're free to use it as usual and I hope you'll enjoy this new release 鉂わ笍

If you're using husky in a commercial project, you may want to consider becoming a sponsor to support the project. You can also try it for 30 days.

This is only for a limited time, husky will be MIT again later.

Migrating

Important Husky v5 brings a lot of improvements but is also very different from v4. Git hooks won't work if you only upgrade husky dependency, existing config needs to be migrated too.

The best way to switch to v5 is to follow the new installation instructions and migrate existing hooks command using husky add.

v5.0.0-alpha.5

No release notes provided.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [husky](https://github.com/typicode/husky) from 4.3.8 to 5.0.9.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v4.3.8...v5.0.9)

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the pr: dependencies relates to dependencies label Feb 15, 2021
@jeddy3
Copy link
Member

jeddy3 commented Feb 15, 2021

This will require a review to go in.

I followed the new husky installation instructions.

@mattxwang
Copy link
Member

mattxwang commented Feb 16, 2021

Hm, just chiming in here: upgrading to this version of husky actually breaks the lint-staged action (while it works going from master). To reproduce:

  • I am on macOS Big Sur 11.2.1, and am using zsh as my shell; I'm on Node v14 LTS
  • switch to this branch; create a test branch from it
  • run npm install; verify that husky was installed properly via npx husky install
  • made a trivial error (ex delete half of a rule)
  • add and commit - no precommit hook is ran, I am not given an eslint error. my commit is successful.

I have also tried removing node_modules and re-installing from a clean slate, as well as cloning the repository fresh; neither has changed this behaviour.

Not sure if it's something wrong with my configuration, but in my other contributions to this repo the lint-staged hook has worked properly. @jeddy3 are you able to replicate?

@mattxwang
Copy link
Member

mattxwang commented Feb 16, 2021

As an update, trying on Node 15.8.0 gives me a specific error message:

$ git commit -m "a commit that should fail lint-staged" 
.husky/pre-commit: line 4: lint-staged: command not found
husky - pre-commit hook exited with code 127 (error)

@jeddy3
Copy link
Member

jeddy3 commented Feb 17, 2021

@malsf21 Thanks for testing locally. Yep, I suspect something between lint-staged and husky is up.

Labelling as "needs revision", if anyone has time to investigate.

@mattxwang
Copy link
Member

I think I've resolved it! Two things I'll note:

  1. I changed the default migration in .husky/pre-commit (which runs lint-staged) to use npx lint-staged instead. After testing, it now correctly runs all of our linting hooks.
  2. By association, I think we are supposed to commit the .husky folder. This is what the project itself does, so I assume this is standard? Regardless, not committing these changes won't run the husky hooks at all, which was the problem we were facing earlier.

Thoughts @jeddy3? Are you able to reproduce on your local environment?

@jeddy3
Copy link
Member

jeddy3 commented Feb 19, 2021

@mattxwang Thank you for digging deeper into the issue and resolving it!

I was able to reproduce it working locally. I think we can merge.

Copy link
Member

@mattxwang mattxwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I'll leave a positive review then 馃槉

@mattxwang
Copy link
Member

(and I'll make a similar edit in stylelint/postcss-css-in-js#113 )

@jeddy3 jeddy3 merged commit 57c5d89 into master Feb 20, 2021
@jeddy3 jeddy3 deleted the dependabot/npm_and_yarn/husky-5.0.9 branch February 20, 2021 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: dependencies relates to dependencies
Development

Successfully merging this pull request may close these issues.

None yet

2 participants