From fafb548fbeed5969204c7ca593ab2729771e2c3b Mon Sep 17 00:00:00 2001 From: Aleksey Konstantinov Date: Fri, 15 Mar 2024 21:09:05 +0300 Subject: [PATCH] Added husky package --- .husky/pre-commit | 4 ++++ package-lock.json | 26 ++++++++++++++++++++++++-- package.json | 6 ++++-- 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..449fcde --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm test diff --git a/package-lock.json b/package-lock.json index cd1bad7..cb58bbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ulms/api-clients", - "version": "7.2.0", + "version": "7.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ulms/api-clients", - "version": "7.2.0", + "version": "7.2.1", "license": "MIT", "dependencies": { "axios": "1.6.2", @@ -35,6 +35,7 @@ "eslint-plugin-promise": "6.0.0", "eslint-plugin-sonarjs": "0.11.0", "eslint-plugin-unicorn": "39.0.0", + "husky": "7.0.4", "jest": "26.6.3", "prettier": "2.5.1" } @@ -6038,6 +6039,21 @@ "node": ">=8.12.0" } }, + "node_modules/husky": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", + "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -16339,6 +16355,12 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, + "husky": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", + "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/package.json b/package.json index a807052..4aba8e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ulms/api-clients", - "version": "7.2.0", + "version": "7.2.1", "description": "JavaScript API clients for ULMS platform", "keywords": [], "homepage": "https://github.com/foxford/ulms-api-clients-js#readme", @@ -26,9 +26,10 @@ "build": "npm run build:lib && npm run build:es", "build:es": "cross-env BABEL_ENV=es babel src --config-file ./.babelrc.json -d es --copy-files", "build:lib": "cross-env BABEL_ENV=lib babel src --config-file ./.babelrc.json -d lib --copy-files", - "prelint": "prettier --check .", "lint": "eslint ./src --cache", "prebuild": "rm -rf lib es", + "prelint": "prettier --check .", + "prepare": "husky install", "prepublishOnly": "npm test && npm run build", "test": "jest --coverage" }, @@ -59,6 +60,7 @@ "eslint-plugin-promise": "6.0.0", "eslint-plugin-sonarjs": "0.11.0", "eslint-plugin-unicorn": "39.0.0", + "husky": "7.0.4", "jest": "26.6.3", "prettier": "2.5.1" }