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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Husky to simple-git-hooks migration in mrm #954

Merged
merged 1 commit into from Mar 22, 2021
Merged

Husky to simple-git-hooks migration in mrm #954

merged 1 commit into from Mar 22, 2021

Conversation

ai
Copy link
Contributor

@ai ai commented Mar 22, 2021

mrm recently migrarted from husky to simple-git-hooks. I updated the text according to these changes.

This mrm migration brought these benefits to users:

  • simple-git-hooks has 0 dependencies and took 10 KB of node_modules space compared to 1 MB of husky 4.
  • simple-git-hooks doesn’t read config on every pre-commit hook call which increases the performance. It uses the husky 5 model when you need explicitly to call a script on config changes. But it is a good trade-off for lint-staged case. It should give around a 0.5 second performance boost for pre-commit.

Comparison with husky 5:

  1. We can start having all husky 5 benefits (performance, small size) without waiting for MIT license for husky 5.
  2. simple-git-hooks is smaller than husky 5.
  3. husky 5 requires extra scripts in package.json.
  4. husky 5 requires an extra pinst dependency for Yarn 2. simple-git-hooks has out-of-the box Yarn 2 support.

I already tested simple-git-hooks on Autoprefixer, PostCSS, Browserslist, and my commercial projects (with a big team). Everything works great. Other people reported about successful migration too. @toplenboren simple-git-hooks maintainer is always open for the changes and answers quickly.

@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #954 (7001281) into master (78039da) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #954   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          611       611           
  Branches       144       144           
=========================================
  Hits           611       611           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78039da...7001281. Read the comment docs.

@iiroj iiroj merged commit feb663b into lint-staged:master Mar 22, 2021
@iiroj
Copy link
Member

iiroj commented Mar 22, 2021

@ai thanks for the PR!

@okonet
Copy link
Collaborator

okonet commented Mar 22, 2021

This looks great indeed. I didn't know about this package.

@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2021

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants