Skip to content

Commit 817c4d7

Browse files
committed
chore: migrate husky v4 to v9, switch changelog to changelog-git
- Replace husky-v4 (yarn-based) with husky v9 (.husky/pre-commit) - Remove old husky config from package.json - Switch from @changesets/changelog-github to @changesets/changelog-git (commit links only, no author thank-you messages)
1 parent 52357de commit 817c4d7

4 files changed

Lines changed: 16 additions & 192 deletions

File tree

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
3-
"changelog": ["@changesets/changelog-github", { "repo": "styled-components/jest-styled-components" }],
3+
"changelog": "@changesets/changelog-git",
44
"commit": false,
55
"fixed": [],
66
"linked": [],

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec lint-staged

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@
2525
"test:web:watch": "jest --watch",
2626
"test:native": "jest --color --config .jest.native.json",
2727
"test:preact": "jest --color --config .jest.preact.json",
28-
"lint:pkg": "publint --pack npm && attw --pack ."
28+
"lint:pkg": "publint --pack npm && attw --pack .",
29+
"prepare": "husky"
2930
},
3031
"devDependencies": {
3132
"@arethetypeswrong/cli": "^0.18.2",
3233
"@babel/core": "^7.0.0",
3334
"@babel/preset-env": "^7.16.4",
3435
"@babel/preset-react": "^7.0.0",
3536
"@biomejs/biome": "^2.4.8",
36-
"@changesets/changelog-github": "^0.6.0",
37+
"@changesets/changelog-git": "^0.2.1",
3738
"@changesets/cli": "^2.30.0",
3839
"@testing-library/react": "^12.1.2",
3940
"@types/styled-components": "^5.1.15",
@@ -43,7 +44,7 @@
4344
"enzyme": "^3.6.0",
4445
"enzyme-adapter-preact-pure": "^3.3.0",
4546
"enzyme-to-json": "^3.3.1",
46-
"husky-v4": "^4.3.8",
47+
"husky": "^9.1.7",
4748
"jest": "^27.3.1",
4849
"lint-staged": "^12.1.1",
4950
"preact": "^10.0.0-beta.2",
@@ -63,11 +64,6 @@
6364
"peerDependencies": {
6465
"styled-components": ">= 5"
6566
},
66-
"husky": {
67-
"hooks": {
68-
"pre-commit": "lint-staged"
69-
}
70-
},
7167
"lint-staged": {
7268
"*.js": [
7369
"biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"

0 commit comments

Comments
 (0)