From 356daf6de41a8a8410083931b3d7dd580d3e16d6 Mon Sep 17 00:00:00 2001 From: Gyen Abubakar Sadick Date: Sun, 16 Jul 2023 07:37:08 +0000 Subject: [PATCH] don't install husky in CI context --- package-lock.json | 43 +++++++++++++++++++++++++++++++++++++++++++ package.json | 13 +++++++------ 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index e020d7e..712f054 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "eslint": "^8.26.0", "eslint-config-prettier": "^8.5.0", "husky": "^8.0.0", + "is-ci": "^3.0.1", "prettier": "^2.7.1", "ts-standard": "^12.0.1", "typescript": "^4.8.2", @@ -950,6 +951,21 @@ "node": ">=6.0" } }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, "node_modules/classnames": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", @@ -2365,6 +2381,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, "node_modules/is-core-module": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", @@ -4985,6 +5013,12 @@ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" }, + "ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true + }, "classnames": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", @@ -5983,6 +6017,15 @@ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, + "is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "requires": { + "ci-info": "^3.2.0" + } + }, "is-core-module": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", diff --git a/package.json b/package.json index 8de64b5..80678fa 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,14 @@ "scripts": { "eslint": "npm exec eslint -- --fix src/js/", "prettier": "npm exec prettier -- --write src/js/", - "prepare": "husky install" + "prepare": "is-ci || husky install" }, "dependencies": { + "classnames": "^2.3.2", + "es-cookie": "^1.4.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "ts-loader": "^9.3.1", - "classnames": "^2.3.2", - "es-cookie": "^1.4.0" + "ts-loader": "^9.3.1" }, "devDependencies": { "@types/css-font-loading-module": "^0.0.7", @@ -21,11 +21,12 @@ "@types/react-dom": "^18.0.6", "eslint": "^8.26.0", "eslint-config-prettier": "^8.5.0", + "husky": "^8.0.0", + "is-ci": "^3.0.1", "prettier": "^2.7.1", "ts-standard": "^12.0.1", "typescript": "^4.8.2", "webpack": "^5.74.0", - "webpack-cli": "^4.10.0", - "husky": "^8.0.0" + "webpack-cli": "^4.10.0" } }