From f8068743b5cf3b54984887757318fb9a196bd6a2 Mon Sep 17 00:00:00 2001 From: Gui Seek Date: Sat, 20 Jan 2024 09:53:33 -0300 Subject: [PATCH] chore(source): husky install if no ci --- package-lock.json | 23 +++++++++++++++++++++++ package.json | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index cfe86d1..48ee6a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,7 @@ "@swc/core": "~1.3.85", "@tailwindcss/typography": "^0.5.10", "@types/express": "4.17.14", + "@types/is-ci": "^3.0.4", "@types/jest": "^29.4.0", "@types/node": "18.16.9", "@types/semantic-release": "^20.0.6", @@ -86,6 +87,7 @@ "eslint-config-prettier": "^9.0.0", "git-cz": "^4.9.0", "husky": "^8.0.0", + "is-ci": "^3.0.1", "jest": "^29.4.1", "jest-environment-jsdom": "^29.4.1", "jest-preset-angular": "~13.1.4", @@ -8946,6 +8948,15 @@ "@types/node": "*" } }, + "node_modules/@types/is-ci": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.4.tgz", + "integrity": "sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==", + "dev": true, + "dependencies": { + "ci-info": "^3.1.0" + } + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -18545,6 +18556,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", diff --git a/package.json b/package.json index 5f34674..596f6d1 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "release": "ts-node --project scripts/tsconfig.scripts.json scripts/release.ts", "format": "nx format:check", "docs": "ts-node -P tools/tsconfig.json tools/dgeni-cli.ts tools/transforms/nxgs-package/index", - "prepare": "husky install", + "prepare": "is-ci || husky install", "commit": "czg", "check-commit": "node ./scripts/commit-lint.js", "check-format": "nx format:check --all" @@ -46,6 +46,7 @@ "@swc/core": "~1.3.85", "@tailwindcss/typography": "^0.5.10", "@types/express": "4.17.14", + "@types/is-ci": "^3.0.4", "@types/jest": "^29.4.0", "@types/node": "18.16.9", "@types/semantic-release": "^20.0.6", @@ -64,6 +65,7 @@ "eslint-config-prettier": "^9.0.0", "git-cz": "^4.9.0", "husky": "^8.0.0", + "is-ci": "^3.0.1", "jest": "^29.4.1", "jest-environment-jsdom": "^29.4.1", "jest-preset-angular": "~13.1.4",