Skip to content

Commit ddb353e

Browse files
committed
chore: upgrade husky to v7
1 parent 89a5b36 commit ddb353e

7 files changed

+44
-14
lines changed

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit $1

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged
Binary file not shown.
Binary file not shown.

package.json

+5-12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"private": true,
77
"packageManager": "[email protected]",
88
"scripts": {
9+
"postinstall": "husky install",
10+
"prepack": "pinst --disable",
11+
"postpack": "pinst --enable",
912
"build": "vue-cli-service build --target lib --name carbon-vue-3 ./src/index.js --no-clean",
1013
"lint": "vue-cli-service lint",
1114
"build-storybook": "build-storybook",
@@ -60,6 +63,7 @@
6063
"eslint-plugin-vue": "^8.7.1",
6164
"husky": "^7.0.4",
6265
"lint-staged": "^12.4.1",
66+
"pinst": "^3.0.0",
6367
"postcss": "^8.4.13",
6468
"postcss-loader": "^6.2.1",
6569
"prettier": "^2.6.2",
@@ -164,10 +168,6 @@
164168
"/node_modules/(?!@carbon)"
165169
]
166170
},
167-
"resolutions": {
168-
"vue": "^3.0.0",
169-
"vue-loader": "^16.1.2"
170-
},
171171
"files": [
172172
"/dist",
173173
"/src"
@@ -177,16 +177,9 @@
177177
"@commitlint/config-conventional"
178178
]
179179
},
180-
"husky": {
181-
"hooks": {
182-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
183-
"pre-commit": "lint-staged"
184-
}
185-
},
186180
"lint-staged": {
187181
"*.{scss,css,js,md,vue}": [
188-
"yarn format:staged",
189-
"git add"
182+
"yarn format:staged"
190183
]
191184
},
192185
"repository": {

prepare.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Install husky githooks
2+
// https://github.com/typicode/husky
3+
const isCi = process.env.CI !== undefined;
4+
if (!isCi) {
5+
require('husky').install();
6+
}

yarn.lock

+25-2
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,7 @@ __metadata:
17071707
eslint-plugin-vue: ^8.7.1
17081708
husky: ^7.0.4
17091709
lint-staged: ^12.4.1
1710+
pinst: ^3.0.0
17101711
postcss: ^8.4.13
17111712
postcss-loader: ^6.2.1
17121713
prettier: ^2.6.2
@@ -15661,6 +15662,15 @@ __metadata:
1566115662
languageName: node
1566215663
linkType: hard
1566315664

15665+
"pinst@npm:^3.0.0":
15666+
version: 3.0.0
15667+
resolution: "pinst@npm:3.0.0"
15668+
bin:
15669+
pinst: bin.js
15670+
checksum: 4ae48a6a60f79c37071233af51b4d91bfc85cfa3c12b66ccda60cdb642b4d14a4ab0cb3587afc55b1f6192cea1772a5e4822026a0d0d3528296edef00cc2d61f
15671+
languageName: node
15672+
linkType: hard
15673+
1566415674
"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5":
1566515675
version: 4.0.5
1566615676
resolution: "pirates@npm:4.0.5"
@@ -20386,7 +20396,7 @@ __metadata:
2038620396
languageName: node
2038720397
linkType: hard
2038820398

20389-
"vue-loader@npm:^16.1.2":
20399+
"vue-loader@npm:^16.0.0":
2039020400
version: 16.8.3
2039120401
resolution: "vue-loader@npm:16.8.3"
2039220402
dependencies:
@@ -20399,6 +20409,19 @@ __metadata:
2039920409
languageName: node
2040020410
linkType: hard
2040120411

20412+
"vue-loader@npm:^17.0.0":
20413+
version: 17.0.0
20414+
resolution: "vue-loader@npm:17.0.0"
20415+
dependencies:
20416+
chalk: ^4.1.0
20417+
hash-sum: ^2.0.0
20418+
loader-utils: ^2.0.0
20419+
peerDependencies:
20420+
webpack: ^4.1.0 || ^5.0.0-0
20421+
checksum: a6eb675f07357a7d7181b78549e342c444b4e28896f84444506f940c14bdd7833276f50d645efcdc742ba987218745f965361921f99012fecf184e0aae67a4a0
20422+
languageName: node
20423+
linkType: hard
20424+
2040220425
"vue-style-loader@npm:^4.1.0, vue-style-loader@npm:^4.1.3":
2040320426
version: 4.1.3
2040420427
resolution: "vue-style-loader@npm:4.1.3"
@@ -20416,7 +20439,7 @@ __metadata:
2041620439
languageName: node
2041720440
linkType: hard
2041820441

20419-
"vue@npm:^3.0.0":
20442+
"vue@npm:^3.2.33":
2042020443
version: 3.2.33
2042120444
resolution: "vue@npm:3.2.33"
2042220445
dependencies:

0 commit comments

Comments
 (0)