Skip to content

Commit fbbd235

Browse files
committed
chore: upgrade husky
1 parent 8d8c946 commit fbbd235

File tree

5 files changed

+14
-49
lines changed

5 files changed

+14
-49
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+
npx --no-install 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+
npx --no-install lint-staged

package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,14 @@
1414
"lint": "varlet-cli lint",
1515
"bootstrap": "yarn && node scripts/bootstrap.mjs",
1616
"commit": "git-cz",
17+
"prepare": "husky install",
1718
"publish": "node scripts/publish.mjs && lerna publish"
1819
},
1920
"config": {
2021
"commitizen": {
2122
"path": "./node_modules/cz-lerna-changelog"
2223
}
2324
},
24-
"husky": {
25-
"hooks": {
26-
"pre-commit": "lint-staged",
27-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
28-
}
29-
},
3025
"lint-staged": {
3126
"*.{ts,tsx,js,vue,less}": "prettier --write",
3227
"*.{ts,tsx,js,vue}": "eslint --fix",
@@ -67,7 +62,6 @@
6762
"commitizen": "^4.2.2",
6863
"cz-lerna-changelog": "^2.0.3",
6964
"execa": "^5.0.0",
70-
"husky": "^4.3.0",
7165
"lerna": "^3.22.1",
7266
"lint-staged": "^10.5.0",
7367
"ora": "^5.4.0",

packages/varlet-cli/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"fs-extra": "^9.0.1",
6262
"hash-sum": "^2.0.0",
6363
"html-webpack-plugin": "^5.1.0",
64+
"husky": "^7.0.1",
6465
"jest": "^26.6.3",
6566
"less": "^3.12.2",
6667
"less-loader": "^7.0.2",

yarn.lock

+4-42
Original file line numberDiff line numberDiff line change
@@ -4918,11 +4918,6 @@ compare-func@^2.0.0:
49184918
array-ify "^1.0.0"
49194919
dot-prop "^5.1.0"
49204920

4921-
compare-versions@^3.6.0:
4922-
version "3.6.0"
4923-
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
4924-
integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
4925-
49264921
component-emitter@^1.2.1:
49274922
version "1.3.0"
49284923
resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
@@ -6731,13 +6726,6 @@ find-up@^5.0.0:
67316726
locate-path "^6.0.0"
67326727
path-exists "^4.0.0"
67336728

6734-
find-versions@^3.2.0:
6735-
version "3.2.0"
6736-
resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e"
6737-
integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==
6738-
dependencies:
6739-
semver-regex "^2.0.0"
6740-
67416729
findup-sync@^3.0.0:
67426730
version "3.0.0"
67436731
resolved "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1"
@@ -7634,21 +7622,10 @@ humanize-ms@^1.2.1:
76347622
dependencies:
76357623
ms "^2.0.0"
76367624

7637-
husky@^4.3.0:
7638-
version "4.3.0"
7639-
resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.0.tgz#0b2ec1d66424e9219d359e26a51c58ec5278f0de"
7640-
integrity sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==
7641-
dependencies:
7642-
chalk "^4.0.0"
7643-
ci-info "^2.0.0"
7644-
compare-versions "^3.6.0"
7645-
cosmiconfig "^7.0.0"
7646-
find-versions "^3.2.0"
7647-
opencollective-postinstall "^2.0.2"
7648-
pkg-dir "^4.2.0"
7649-
please-upgrade-node "^3.2.0"
7650-
slash "^3.0.0"
7651-
which-pm-runs "^1.0.0"
7625+
husky@^7.0.1:
7626+
version "7.0.1"
7627+
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.1.tgz#579f4180b5da4520263e8713cc832942b48e1f1c"
7628+
integrity sha512-gceRaITVZ+cJH9sNHqx5tFwbzlLCVxtVZcusME8JYQ8Edy5mpGDOqD8QBCdMhpyo9a+JXddnujQ4rpY2Ff9SJA==
76527629

76537630
[email protected], iconv-lite@^0.4.17, iconv-lite@^0.4.24:
76547631
version "0.4.24"
@@ -10319,11 +10296,6 @@ onetime@^5.1.0, onetime@^5.1.2:
1031910296
dependencies:
1032010297
mimic-fn "^2.1.0"
1032110298

10322-
opencollective-postinstall@^2.0.2:
10323-
version "2.0.3"
10324-
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
10325-
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
10326-
1032710299
opn@^5.5.0:
1032810300
version "5.5.0"
1032910301
resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"
@@ -11918,11 +11890,6 @@ semver-compare@^1.0.0:
1191811890
resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
1191911891
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
1192011892

11921-
semver-regex@^2.0.0:
11922-
version "2.0.0"
11923-
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338"
11924-
integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==
11925-
1192611893
"semver@2 || 3 || 4 || 5", "[email protected] || 3.x || 4 || 5", semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1:
1192711894
version "5.7.1"
1192811895
resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
@@ -14046,11 +14013,6 @@ which-module@^2.0.0:
1404614013
resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
1404714014
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
1404814015

14049-
which-pm-runs@^1.0.0:
14050-
version "1.0.0"
14051-
resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
14052-
integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
14053-
1405414016
which@^1.2.14, which@^1.2.9, which@^1.3.1:
1405514017
version "1.3.1"
1405614018
resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"

0 commit comments

Comments
 (0)