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

Build: Upgrade husky package to the latest version #32077

Merged
merged 3 commits into from
Jun 8, 2021

Conversation

RhnSharma
Copy link
Contributor

Fixes #31967
Hi @shivapoudel @talldan, how does this look?
Thanks

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @RhnSharma! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label May 21, 2021
@shivapoudel
Copy link
Contributor

@RhnSharma Husky 6.0.0 has a lot of changes. Can you migrate husky denoted in package.json to the .husky folder?

@RhnSharma
Copy link
Contributor Author

@shivapoudel Could you please explain what I need to do?

@shivapoudel
Copy link
Contributor

Plese see the migration guide for husky here https://typicode.github.io/husky/#/?id=husky-4-to-6-cli

@RhnSharma
Copy link
Contributor Author

@shivapoudel @talldan I migrated husky to version 6. How does this look?
Thanks

@gziolo gziolo added the [Type] Build Tooling Issues or PRs related to build tooling label Jun 7, 2021
@gziolo
Copy link
Member

gziolo commented Jun 7, 2021

I haven't tested it yet, but it looks like everything is on track.

Can you explain why .husky/.gitignore file is necessary?

@shivapoudel
Copy link
Contributor

@gziolo Inside the .husky/_ directory there exists husky.sh file which is generated on husky install by default and we just need to push only git hooks inside the .husky directory. Most importantly this ignorance is also built by husky so no worries.

@RhnSharma Can you also add "prepare": "husky install", in the package.json script section so that on npm install git hooks are installed? Seems like missing, my friend :)

@RhnSharma
Copy link
Contributor Author

@shivapoudel I added the prepare script to package.json. Please take a look at it and let me know if this needs any changes.
Thanks

Copy link
Contributor

@shivapoudel shivapoudel left a comment

Choose a reason for hiding this comment

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

@gziolo @RhnSharma Each step required for husky migration exists and looks good on my end 👍

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

I took it for a spin and everything works as expected. Nice work. Thank you!

@gziolo gziolo changed the title Upgrade husky package to the latest version Build: Upgrade husky package to the latest version Jun 8, 2021
@gziolo gziolo merged commit 8bc2494 into WordPress:trunk Jun 8, 2021
@github-actions
Copy link

github-actions bot commented Jun 8, 2021

Congratulations on your first merged pull request, @RhnSharma! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts:

https://profiles.wordpress.org/me/profile/edit/

And if you don't have a WordPress.org account, you can create one on this page:

https://login.wordpress.org/register

Kudos!

@github-actions github-actions bot added this to the Gutenberg 10.9 milestone Jun 8, 2021
gziolo added a commit that referenced this pull request Jul 6, 2021
* With husky 7.0.0, .husky/.gitignore is now unnecessary and can be removed
Ref: #32077 (comment)
CC @gziolo

* Declare files that will always have LF line endings on checkout

* Git ignore Windows specific files and remove composer vendor dir

* Remove special handling for PHP files from .gitattributes

* Unfortunately vendor dir is required to pass the test

Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
sarayourfriend pushed a commit that referenced this pull request Jul 15, 2021
* With husky 7.0.0, .husky/.gitignore is now unnecessary and can be removed
Ref: #32077 (comment)
CC @gziolo

* Declare files that will always have LF line endings on checkout

* Git ignore Windows specific files and remove composer vendor dir

* Remove special handling for PHP files from .gitattributes

* Unfortunately vendor dir is required to pass the test

Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade husky package to the latest version
3 participants