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

Remove deprecated lines in Husky pre-commit script #13396

Merged
merged 8 commits into from
Aug 23, 2024

Conversation

ErlingHauan
Copy link
Contributor

@ErlingHauan ErlingHauan commented Aug 20, 2024

Description

When running git commit we got the following warning:

husky - DEPRECATED

Please remove the following two lines from .husky/pre-commit:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

They WILL FAIL in v10.0.0

In this PR these lines were removed, as recommended under the section "How to migrate" at the bottom of this page: https://github.com/typicode/husky/releases/tag/v9.0.1

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)

@ErlingHauan ErlingHauan linked an issue Aug 20, 2024 that may be closed by this pull request
@ErlingHauan ErlingHauan changed the title 13395 deprecated lines in husky pre commit script Remove deprecated lines in Husky pre-commit script Aug 20, 2024
@github-actions github-actions bot added the skip-releasenotes Issues that do not make sense to list in our release notes label Aug 20, 2024
@ErlingHauan ErlingHauan marked this pull request as ready for review August 20, 2024 08:52
@Jondyr Jondyr self-requested a review August 22, 2024 08:58
Copy link
Member

@Jondyr Jondyr left a comment

Choose a reason for hiding this comment

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

Should we also change the setup for husky in package.json?

- `"setup": "husky install && node development/setup.js && yarn run git:ignore-revs",`
+ `"setup": "husky && node development/setup.js && yarn run git:ignore-revs",`

From the migration guide:
package.json

{
  "scripts": {
-   "prepare": "husky install"
+   "prepare": "husky"
  }
}

@ErlingHauan
Copy link
Contributor Author

ErlingHauan commented Aug 22, 2024

Should we also change the setup for husky in package.json?

Good catch! Fixed now 😊

@ErlingHauan ErlingHauan requested a review from Jondyr August 22, 2024 10:25
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.72%. Comparing base (f0afd1a) to head (9979c3d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13396   +/-   ##
=======================================
  Coverage   93.72%   93.72%           
=======================================
  Files        1438     1438           
  Lines       19929    19929           
  Branches     2417     2417           
=======================================
  Hits        18679    18679           
  Misses       1002     1002           
  Partials      248      248           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ErlingHauan ErlingHauan merged commit 0ca075b into main Aug 23, 2024
9 checks passed
@ErlingHauan ErlingHauan deleted the 13395-deprecated-lines-in-husky-pre-commit-script branch August 23, 2024 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-releasenotes Issues that do not make sense to list in our release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated lines in Husky pre-commit script
3 participants