diff --git a/package.json b/package.json index faebc59..5127f45 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "registry:github": "cat package.json | json -e 'this.name = \"@CatChen/\" + this.name; this.publishConfig = {}; this.publishConfig.registry = \"https://npm.pkg.github.com/\"' > package.github.json && mv -f package.github.json package.json", "registry:npm": "cat package.json | json -e 'this.name = this.name.replace(new RegExp(\"^@CatChen/\"), \"\"); this.publishConfig = undefined' > package.npm.json && mv -f package.npm.json package.json", "prepublish": "npm run build", - "postinstall": "husky install", + "postinstall": "fn() { if [ $CI != 'true' ]; then husky install; fi; }; fn", "prepublishOnly": "pinst --disable", "postpublish": "pinst --enable" }, @@ -67,12 +67,14 @@ "flow-bin": "^0.185.0", "flow-copy-source": "^2.0.8", "flow-remove-types": "^2.111.3", - "husky": "7", "jest": "^28.1.0", "json": "^11.0.0", "pinst": "^3.0.0", "prettier": "^2.0.1", "pretty-quick": "^3.0.0", "typescript": "^4.0.2" + }, + "optionalDependencies": { + "husky": "8" } } diff --git a/yarn.lock b/yarn.lock index cce6bcb..e0f5a88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2343,10 +2343,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@7: - version "7.0.4" - resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535" - integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== +husky@8: + version "8.0.1" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9" + integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw== ignore-walk@3.0.4: version "3.0.4"