Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 23bbc0d

Browse files
committedAug 23, 2019
add pre-commit circleci test
1 parent 8e9a91d commit 23bbc0d

File tree

3 files changed

+84
-6
lines changed

3 files changed

+84
-6
lines changed
 

‎.huskyrc.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const tasks = arr => arr.join(' && ')
2+
3+
module.exports = {
4+
'hooks': {
5+
'pre-commit': tasks([
6+
'exec < /dev/tty',
7+
`if ! eMSG=$(circleci config validate -c .circleci/config.yml); then
8+
echo "CircleCI Configuration Failed Validation."
9+
echo $eMSG
10+
exit 1
11+
fi`
12+
])
13+
}
14+
}

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@segment/loosely-validate-event": "^2.0.0",
4343
"axios": "^0.19.0",
4444
"axios-retry": "^3.0.2",
45+
"husky": "^3.0.4",
4546
"lodash.isstring": "^4.0.1",
4647
"md5": "^2.2.1",
4748
"ms": "^2.0.0",

‎yarn.lock

+69-6
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,11 @@ ci-info@^1.5.0:
16731673
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
16741674
integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==
16751675

1676+
ci-info@^2.0.0:
1677+
version "2.0.0"
1678+
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
1679+
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
1680+
16761681
ci-job-number@^0.3.0:
16771682
version "0.3.0"
16781683
resolved "https://registry.yarnpkg.com/ci-job-number/-/ci-job-number-0.3.0.tgz#34bdd114b0dece1960287bd40a57051041a2a800"
@@ -3570,6 +3575,11 @@ get-stdin@^6.0.0:
35703575
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
35713576
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
35723577

3578+
get-stdin@^7.0.0:
3579+
version "7.0.0"
3580+
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6"
3581+
integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==
3582+
35733583
get-stream@^3.0.0:
35743584
version "3.0.0"
35753585
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
@@ -3951,6 +3961,23 @@ hullabaloo-config-manager@^1.1.0:
39513961
resolve-from "^3.0.0"
39523962
safe-buffer "^5.0.1"
39533963

3964+
husky@^3.0.4:
3965+
version "3.0.4"
3966+
resolved "https://registry.yarnpkg.com/husky/-/husky-3.0.4.tgz#10a48ac11ab50859b0939750fa0b4e07ad0bf669"
3967+
integrity sha512-7Rnt8aJfy+MlV28snmYK7O7vWwtOfeVxV6KhLpUFXlmx5ukQ1nQmNUB7QsAwSgdySB5X+bm7q7JIRgazqBUzKA==
3968+
dependencies:
3969+
chalk "^2.4.2"
3970+
cosmiconfig "^5.2.1"
3971+
execa "^1.0.0"
3972+
get-stdin "^7.0.0"
3973+
is-ci "^2.0.0"
3974+
opencollective-postinstall "^2.0.2"
3975+
pkg-dir "^4.2.0"
3976+
please-upgrade-node "^3.2.0"
3977+
read-pkg "^5.1.1"
3978+
run-node "^1.0.0"
3979+
slash "^3.0.0"
3980+
39543981
iconv-lite@0.4.23:
39553982
version "0.4.23"
39563983
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
@@ -4221,6 +4248,13 @@ is-ci@^1.0.7:
42214248
dependencies:
42224249
ci-info "^1.5.0"
42234250

4251+
is-ci@^2.0.0:
4252+
version "2.0.0"
4253+
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
4254+
integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
4255+
dependencies:
4256+
ci-info "^2.0.0"
4257+
42244258
is-color-stop@^1.0.0:
42254259
version "1.1.0"
42264260
resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345"
@@ -4923,12 +4957,7 @@ lodash.uniq@^4.5.0:
49234957
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
49244958
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
49254959

4926-
lodash@4.17.11, lodash@^4.11.1:
4927-
version "4.17.11"
4928-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
4929-
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
4930-
4931-
lodash@^4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0:
4960+
lodash@4.17.11, lodash@^4, lodash@^4.11.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0:
49324961
version "4.17.11"
49334962
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
49344963
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
@@ -5723,6 +5752,11 @@ onetime@^2.0.0:
57235752
dependencies:
57245753
mimic-fn "^1.0.0"
57255754

5755+
opencollective-postinstall@^2.0.2:
5756+
version "2.0.2"
5757+
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89"
5758+
integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==
5759+
57265760
opener@^1.5.1:
57275761
version "1.5.1"
57285762
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
@@ -6197,6 +6231,20 @@ pkg-dir@^3.0.0:
61976231
dependencies:
61986232
find-up "^3.0.0"
61996233

6234+
pkg-dir@^4.2.0:
6235+
version "4.2.0"
6236+
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
6237+
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
6238+
dependencies:
6239+
find-up "^4.0.0"
6240+
6241+
please-upgrade-node@^3.2.0:
6242+
version "3.2.0"
6243+
resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
6244+
integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
6245+
dependencies:
6246+
semver-compare "^1.0.0"
6247+
62006248
plur@^2.0.0:
62016249
version "2.1.2"
62026250
resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a"
@@ -7110,6 +7158,11 @@ run-async@^2.2.0:
71107158
dependencies:
71117159
is-promise "^2.1.0"
71127160

7161+
run-node@^1.0.0:
7162+
version "1.0.0"
7163+
resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e"
7164+
integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==
7165+
71137166
run-parallel@^1.1.2:
71147167
version "1.1.9"
71157168
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
@@ -7179,6 +7232,11 @@ secure-keys@^1.0.0:
71797232
version "1.0.0"
71807233
resolved "https://registry.yarnpkg.com/secure-keys/-/secure-keys-1.0.0.tgz#f0c82d98a3b139a8776a8808050b824431087fca"
71817234

7235+
semver-compare@^1.0.0:
7236+
version "1.0.0"
7237+
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
7238+
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
7239+
71827240
semver-diff@^2.0.0:
71837241
version "2.1.0"
71847242
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
@@ -7371,6 +7429,11 @@ slash@^2.0.0:
73717429
resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
73727430
integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==
73737431

7432+
slash@^3.0.0:
7433+
version "3.0.0"
7434+
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
7435+
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
7436+
73747437
slice-ansi@1.0.0, slice-ansi@^1.0.0:
73757438
version "1.0.0"
73767439
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d"

0 commit comments

Comments
 (0)
This repository has been archived.