From 8b438a422990f7e4318c0a6e3fd6555c6b0ec58e Mon Sep 17 00:00:00 2001 From: Antonette Caldwell <134739862+nebula-aac@users.noreply.github.com> Date: Wed, 7 Feb 2024 22:52:20 +0000 Subject: [PATCH] fix: reinstall husky and remove postinstall fix #493 Signed-off-by: Antonette Caldwell <134739862+nebula-aac@users.noreply.github.com> --- .husky/commit-msg | 5 +---- .husky/pre-commit | 1 + package-lock.json | 7 ++++--- package.json | 12 ++---------- 4 files changed, 8 insertions(+), 17 deletions(-) create mode 100755 .husky/pre-commit diff --git a/.husky/commit-msg b/.husky/commit-msg index 86890fd27..0a4b97de5 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npx commitlint --edit ${1} +npx --no -- commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..d0a778429 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index afe1d8be5..83a19f07b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "@layer5/sistent", "version": "0.14.8", - "hasInstallScript": true, "devDependencies": { "@commitlint/cli": "^17.7.2", "@commitlint/config-conventional": "^17.7.0", @@ -4383,8 +4382,9 @@ }, "node_modules/cz-conventional-changelog": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", + "integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^2.4.1", "commitizen": "^4.0.3", @@ -6224,8 +6224,9 @@ }, "node_modules/husky": { "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true, - "license": "MIT", "bin": { "husky": "lib/bin.js" }, diff --git a/package.json b/package.json index 0dca46d2e..1791df747 100644 --- a/package.json +++ b/package.json @@ -14,27 +14,19 @@ ], "scripts": { "build": "NODE_ENV=production tsup", - "commit": "cz", - "commit:sign": "cz -s", "commitlint": "commitlint --edit", "coverage": "jest --coverage", "dev": "NODE_ENV=development tsup", "format:check": "prettier --check \"**/*.{ts,tsx,md}\" --config ./.prettierrc", "format:write": "prettier --write \"**/*.{ts,tsx,md}\" --config ./.prettierrc", - "postinstall": "husky install", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix", + "prepare": "husky install", "test": "jest", "versionup:major": "npm version major", "versionup:minor": "npm version minor", "versionup:patch": "npm version patch" }, - "husky": { - "hooks": { - "pre-commit": "lint-staged", - "prepare-commit-msg": "exec < /dev/tty && yarn cz --hook || true" - } - }, "lint-staged": { "*.{ts,tsx,md}": [ "prettier --write", @@ -43,7 +35,7 @@ }, "config": { "commitizen": { - "path": "cz-conventional-changelog" + "path": "./node_modules/cz-conventional-changelog" } }, "devDependencies": {