Skip to content

Commit ca9740c

Browse files
committed
Setup git pre-commit and pre-push
1 parent 7c0f4f6 commit ca9740c

2 files changed

Lines changed: 22 additions & 58 deletions

File tree

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@typescript-eslint/eslint-plugin": "^4.11.1",
1515
"@typescript-eslint/parser": "^4.11.1",
1616
"benchmark": "^2.1.4",
17-
"coveralls": "^3.0.0",
1817
"eslint": "^6.8.0",
1918
"eslint-config-prettier": "^7.1.0",
2019
"eslint-plugin-import": "^2.22.1",
@@ -24,9 +23,9 @@
2423
"jest": "^26.6.3",
2524
"json-stable-stringify": "latest",
2625
"pre-commit": "^1.2.2",
26+
"pre-push": "^0.1.1",
2727
"source-map-support": "^0.5.19",
2828
"ts-jest": "^26.4.4",
29-
"ts-node": "^9.1.1",
3029
"typescript": "^4.1.3"
3130
},
3231
"scripts": {
@@ -36,11 +35,17 @@
3635
"test": "jest --config jestconfig.json",
3736
"coverage": "jest --config jestconfig.json --coverage"
3837
},
38+
"pre-commit": [
39+
"lint"
40+
],
41+
"pre-push": [
42+
"test"
43+
],
3944
"repository": {
4045
"type": "git",
4146
"url": "git://github.com/sxwei123/quick-stable-stringify.git"
4247
},
43-
"homepage": "git://github.com/sxwei123/quick-stable-stringify",
48+
"homepage": "https://github.com/sxwei123/quick-stable-stringify",
4449
"keywords": [
4550
"json",
4651
"stringify",

yarn.lock

Lines changed: 14 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -764,11 +764,6 @@ anymatch@^3.0.3:
764764
normalize-path "^3.0.0"
765765
picomatch "^2.0.4"
766766

767-
arg@^4.1.0:
768-
version "4.1.3"
769-
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
770-
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
771-
772767
argparse@^1.0.7:
773768
version "1.0.10"
774769
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -1221,22 +1216,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
12211216
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
12221217
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
12231218

1224-
coveralls@^3.0.0:
1225-
version "3.1.0"
1226-
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b"
1227-
integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==
1228-
dependencies:
1229-
js-yaml "^3.13.1"
1230-
lcov-parse "^1.0.0"
1231-
log-driver "^1.2.7"
1232-
minimist "^1.2.5"
1233-
request "^2.88.2"
1234-
1235-
create-require@^1.1.0:
1236-
version "1.1.1"
1237-
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
1238-
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
1239-
12401219
cross-spawn@^5.0.1:
12411220
version "5.1.0"
12421221
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -1382,11 +1361,6 @@ diff-sequences@^26.6.2:
13821361
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1"
13831362
integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==
13841363

1385-
diff@^4.0.1:
1386-
version "4.0.2"
1387-
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
1388-
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
1389-
13901364
dir-glob@^3.0.1:
13911365
version "3.0.1"
13921366
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
@@ -2993,11 +2967,6 @@ kleur@^3.0.3:
29932967
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
29942968
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
29952969

2996-
lcov-parse@^1.0.0:
2997-
version "1.0.0"
2998-
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0"
2999-
integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A=
3000-
30012970
leven@^3.1.0:
30022971
version "3.1.0"
30032972
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
@@ -3056,11 +3025,6 @@ lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4:
30563025
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
30573026
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
30583027

3059-
log-driver@^1.2.7:
3060-
version "1.2.7"
3061-
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
3062-
integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==
3063-
30643028
lru-cache@^4.0.1:
30653029
version "4.1.5"
30663030
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
@@ -3083,7 +3047,7 @@ make-dir@^3.0.0:
30833047
dependencies:
30843048
semver "^6.0.0"
30853049

3086-
make-error@1.x, make-error@^1.1.1:
3050+
make-error@1.x:
30873051
version "1.3.6"
30883052
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
30893053
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
@@ -3571,6 +3535,13 @@ pre-commit@^1.2.2:
35713535
spawn-sync "^1.0.15"
35723536
which "1.2.x"
35733537

3538+
pre-push@^0.1.1:
3539+
version "0.1.1"
3540+
resolved "https://registry.yarnpkg.com/pre-push/-/pre-push-0.1.1.tgz#2a2a79827d243a76c91089897ac707f45e716aac"
3541+
integrity sha1-Kip5gn0kOnbJEImJescH9F5xaqw=
3542+
dependencies:
3543+
shelljs "0.3.x"
3544+
35743545
prelude-ls@~1.1.2:
35753546
version "1.1.2"
35763547
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -3955,6 +3926,11 @@ shebang-regex@^3.0.0:
39553926
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
39563927
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
39573928

3929+
shelljs@0.3.x:
3930+
version "0.3.0"
3931+
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1"
3932+
integrity sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=
3933+
39583934
shellwords@^0.1.1:
39593935
version "0.1.1"
39603936
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
@@ -4025,7 +4001,7 @@ source-map-resolve@^0.5.0:
40254001
source-map-url "^0.4.0"
40264002
urix "^0.1.0"
40274003

4028-
source-map-support@^0.5.17, source-map-support@^0.5.19, source-map-support@^0.5.6:
4004+
source-map-support@^0.5.19, source-map-support@^0.5.6:
40294005
version "0.5.19"
40304006
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
40314007
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
@@ -4381,18 +4357,6 @@ ts-jest@^26.4.4:
43814357
semver "7.x"
43824358
yargs-parser "20.x"
43834359

4384-
ts-node@^9.1.1:
4385-
version "9.1.1"
4386-
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
4387-
integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
4388-
dependencies:
4389-
arg "^4.1.0"
4390-
create-require "^1.1.0"
4391-
diff "^4.0.1"
4392-
make-error "^1.1.1"
4393-
source-map-support "^0.5.17"
4394-
yn "3.1.1"
4395-
43964360
tsconfig-paths@^3.9.0:
43974361
version "3.9.0"
43984362
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b"
@@ -4725,8 +4689,3 @@ yargs@^15.4.1:
47254689
which-module "^2.0.0"
47264690
y18n "^4.0.0"
47274691
yargs-parser "^18.1.2"
4728-
4729-
yn@3.1.1:
4730-
version "3.1.1"
4731-
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
4732-
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==

0 commit comments

Comments
 (0)