Skip to content

Commit 5f1fe6d

Browse files
committed
Set size limit
1 parent 0983ec5 commit 5f1fe6d

File tree

4 files changed

+97
-9
lines changed

4 files changed

+97
-9
lines changed

.size-limit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [{ limit: "3.72kB", path: "dist/" }];

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
"*.{html,json,md,yaml,yml}": ["prettier --write"],
55
"*.{js,ts}": [
66
() => "yarn run typecheck",
7-
"jest --bail --findRelatedTests",
7+
"jest --bail --findRelatedTests --passWithNoTests",
88
/**
99
* @param {string[]} files
1010
*/

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"prepublish": "yarn run clean && yarn run build",
3737
"postpublish": "pinst --enable",
3838
"release": "np",
39+
"size": "size-limit",
3940
"test": "jest --coverage",
4041
"typecheck": "tsc --project tsconfig.json"
4142
},
@@ -46,6 +47,7 @@
4647
"@paleite/jest-config": "^1.0.2",
4748
"@paleite/prettier-config": "^1.0.2",
4849
"@paleite/tsconfig-node16": "^1.0.2",
50+
"@size-limit/file": "^7.0.8",
4951
"@types/eslint": "^8.4.2",
5052
"@types/jest": "^28.1.1",
5153
"@types/node": "^16.11.26",
@@ -63,6 +65,7 @@
6365
"np": "^7.6.1",
6466
"pinst": "^3.0.0",
6567
"prettier": "^2.6.2",
68+
"size-limit": "^7.0.8",
6669
"ts-jest": "^28.0.4",
6770
"typescript": "^4.7.3"
6871
},

yarn.lock

Lines changed: 92 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,13 @@
653653
dependencies:
654654
"@sinonjs/commons" "^1.7.0"
655655

656+
"@size-limit/file@^7.0.8":
657+
version "7.0.8"
658+
resolved "https://registry.yarnpkg.com/@size-limit/file/-/file-7.0.8.tgz#05c43fa01bf164c2fba24e13f1695bf7e861e277"
659+
integrity sha512-1KeFQuMXIXAH/iELqIX7x+YNYDFvzIvmxcp9PrdwEoSNL0dXdaDIo9WE/yz8xvOmUcKaLfqbWkL75DM0k91WHQ==
660+
dependencies:
661+
semver "7.3.5"
662+
656663
"@szmarczak/http-timer@^1.1.2":
657664
version "1.1.2"
658665
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
@@ -1029,7 +1036,7 @@ any-observable@^0.5.1:
10291036
resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.5.1.tgz#ab7d49ff64ebe6dd3ae26760a3f5a881e8db791e"
10301037
integrity sha512-8zv01bgDOp9PTmRTNCAHTw64TFP2rvlX4LvtNJLachaXY+AjmIvLT47fABNPCiIe89hKiSCo2n5zmPqI9CElPA==
10311038

1032-
anymatch@^3.0.3:
1039+
anymatch@^3.0.3, anymatch@~3.1.2:
10331040
version "3.1.2"
10341041
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
10351042
integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
@@ -1155,6 +1162,11 @@ balanced-match@^1.0.0:
11551162
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
11561163
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
11571164

1165+
binary-extensions@^2.0.0:
1166+
version "2.2.0"
1167+
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
1168+
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
1169+
11581170
boxen@^5.0.0:
11591171
version "5.1.2"
11601172
resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50"
@@ -1177,7 +1189,7 @@ brace-expansion@^1.1.7:
11771189
balanced-match "^1.0.0"
11781190
concat-map "0.0.1"
11791191

1180-
braces@^3.0.2:
1192+
braces@^3.0.2, braces@~3.0.2:
11811193
version "3.0.2"
11821194
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
11831195
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
@@ -1219,6 +1231,11 @@ builtins@^1.0.3:
12191231
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
12201232
integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==
12211233

1234+
bytes-iec@^3.1.1:
1235+
version "3.1.1"
1236+
resolved "https://registry.yarnpkg.com/bytes-iec/-/bytes-iec-3.1.1.tgz#94cd36bf95c2c22a82002c247df8772d1d591083"
1237+
integrity sha512-fey6+4jDK7TFtFg/klGSvNKJctyU7n2aQdnM+CO0ruLPbqqMOM8Tio0Pc+deqUeVKX1tL5DQep1zQ7+37aTAsA==
1238+
12221239
cacheable-lookup@^2.0.0:
12231240
version "2.0.1"
12241241
resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-2.0.1.tgz#87be64a18b925234875e10a9bb1ebca4adce6b38"
@@ -1328,6 +1345,21 @@ chardet@^0.7.0:
13281345
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
13291346
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
13301347

1348+
chokidar@^3.5.3:
1349+
version "3.5.3"
1350+
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
1351+
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
1352+
dependencies:
1353+
anymatch "~3.1.2"
1354+
braces "~3.0.2"
1355+
glob-parent "~5.1.2"
1356+
is-binary-path "~2.1.0"
1357+
is-glob "~4.0.1"
1358+
normalize-path "~3.0.0"
1359+
readdirp "~3.6.0"
1360+
optionalDependencies:
1361+
fsevents "~2.3.2"
1362+
13311363
ci-info@^2.0.0:
13321364
version "2.0.0"
13331365
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
@@ -1338,6 +1370,11 @@ ci-info@^3.2.0:
13381370
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32"
13391371
integrity sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==
13401372

1373+
ci-job-number@^1.2.2:
1374+
version "1.2.2"
1375+
resolved "https://registry.yarnpkg.com/ci-job-number/-/ci-job-number-1.2.2.tgz#f4e5918fcaeeda95b604f214be7d7d4a961fe0c0"
1376+
integrity sha512-CLOGsVDrVamzv8sXJGaILUVI6dsuAkouJP/n6t+OxLPeeA4DDby7zn9SB6EUpa1H7oIKoE+rMmkW80zYsFfUjA==
1377+
13411378
cjs-module-lexer@^1.0.0:
13421379
version "1.2.2"
13431380
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"
@@ -2141,7 +2178,7 @@ fs.realpath@^1.0.0:
21412178
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
21422179
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
21432180

2144-
fsevents@^2.3.2:
2181+
fsevents@^2.3.2, fsevents@~2.3.2:
21452182
version "2.3.2"
21462183
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
21472184
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
@@ -2227,7 +2264,7 @@ github-url-from-git@^1.5.0:
22272264
resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0"
22282265
integrity sha512-WWOec4aRI7YAykQ9+BHmzjyNlkfJFG8QLXnDTsLz/kZefq7qkzdfo4p6fkYYMIq1aj+gZcQs/1HQhQh3DPPxlQ==
22292266

2230-
glob-parent@^5.1.2:
2267+
glob-parent@^5.1.2, glob-parent@~5.1.2:
22312268
version "5.1.2"
22322269
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
22332270
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -2587,6 +2624,13 @@ is-bigint@^1.0.1:
25872624
dependencies:
25882625
has-bigints "^1.0.1"
25892626

2627+
is-binary-path@~2.1.0:
2628+
version "2.1.0"
2629+
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
2630+
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
2631+
dependencies:
2632+
binary-extensions "^2.0.0"
2633+
25902634
is-boolean-object@^1.1.0:
25912635
version "1.1.2"
25922636
resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719"
@@ -2658,7 +2702,7 @@ is-generator-fn@^2.0.0:
26582702
resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"
26592703
integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==
26602704

2661-
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
2705+
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
26622706
version "4.0.3"
26632707
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
26642708
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
@@ -3366,7 +3410,7 @@ levn@^0.4.1:
33663410
prelude-ls "^1.2.1"
33673411
type-check "~0.4.0"
33683412

3369-
3413+
[email protected], lilconfig@^2.0.4:
33703414
version "2.0.5"
33713415
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25"
33723416
integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==
@@ -3688,6 +3732,11 @@ minimist@^1.2.0, minimist@^1.2.6:
36883732
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
36893733
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
36903734

3735+
mkdirp@^1.0.4:
3736+
version "1.0.4"
3737+
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
3738+
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
3739+
36913740
36923741
version "2.0.0"
36933742
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
@@ -3713,6 +3762,13 @@ [email protected]:
37133762
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
37143763
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
37153764

3765+
nanospinner@^1.0.0:
3766+
version "1.1.0"
3767+
resolved "https://registry.yarnpkg.com/nanospinner/-/nanospinner-1.1.0.tgz#d17ff621cb1784b0a206b400da88a0ef6db39b97"
3768+
integrity sha512-yFvNYMig4AthKYfHFl1sLj7B2nkHL4lzdig4osvl9/LdGbXwrdFRoqBS98gsEsOakr0yH+r5NZ/1Y9gdVB8trA==
3769+
dependencies:
3770+
picocolors "^1.0.0"
3771+
37163772
natural-compare@^1.4.0:
37173773
version "1.4.0"
37183774
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -3755,7 +3811,7 @@ normalize-package-data@^3.0.0:
37553811
semver "^7.3.4"
37563812
validate-npm-package-license "^3.0.1"
37573813

3758-
normalize-path@^3.0.0:
3814+
normalize-path@^3.0.0, normalize-path@~3.0.0:
37593815
version "3.0.0"
37603816
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
37613817
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
@@ -4152,7 +4208,7 @@ picocolors@^1.0.0:
41524208
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
41534209
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
41544210

4155-
picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1:
4211+
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
41564212
version "2.3.1"
41574213
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
41584214
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
@@ -4297,6 +4353,13 @@ read-pkg@^5.2.0:
42974353
parse-json "^5.0.0"
42984354
type-fest "^0.6.0"
42994355

4356+
readdirp@~3.6.0:
4357+
version "3.6.0"
4358+
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
4359+
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
4360+
dependencies:
4361+
picomatch "^2.2.1"
4362+
43004363
redent@^3.0.0:
43014364
version "3.0.0"
43024365
resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f"
@@ -4469,6 +4532,13 @@ semver-diff@^3.1.1:
44694532
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
44704533
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
44714534

4535+
4536+
version "7.3.5"
4537+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
4538+
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
4539+
dependencies:
4540+
lru-cache "^6.0.0"
4541+
44724542
[email protected], semver@^7.3.4, semver@^7.3.5, semver@^7.3.7:
44734543
version "7.3.7"
44744544
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
@@ -4512,6 +4582,20 @@ sisteransi@^1.0.5:
45124582
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
45134583
integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==
45144584

4585+
size-limit@^7.0.8:
4586+
version "7.0.8"
4587+
resolved "https://registry.yarnpkg.com/size-limit/-/size-limit-7.0.8.tgz#bf0c656da9e6bc3b8eb5b8a5a634df4634309811"
4588+
integrity sha512-3h76c9E0e/nNhYLSR7IBI/bSoXICeo7EYkYjlyVqNIsu7KvN/PQmMbIXeyd2QKIF8iZKhaiZQoXLkGWbyPDtvQ==
4589+
dependencies:
4590+
bytes-iec "^3.1.1"
4591+
chokidar "^3.5.3"
4592+
ci-job-number "^1.2.2"
4593+
globby "^11.1.0"
4594+
lilconfig "^2.0.4"
4595+
mkdirp "^1.0.4"
4596+
nanospinner "^1.0.0"
4597+
picocolors "^1.0.0"
4598+
45154599
slash@^3.0.0:
45164600
version "3.0.0"
45174601
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"

0 commit comments

Comments
 (0)