From e10c613f2d1ba578978524bbf24f13155d809692 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 15:24:23 -0800 Subject: [PATCH 01/13] es bundle, pnpm --- .github/eslint.json | 18 - .github/workflows/node.js.yml | 30 - .github/workflows/publish.yml | 26 + .github/workflows/test.yml | 22 + LICENSE | 2 +- README.md | 2 +- img/histogram.png | Bin 10094 -> 0 bytes package.json | 29 +- pnpm-lock.yaml | 2139 +++++++++++++++++++++++++++++++++ rollup.config.js | 97 +- yarn.lock | 1641 ------------------------- 11 files changed, 2264 insertions(+), 1742 deletions(-) delete mode 100644 .github/eslint.json delete mode 100644 .github/workflows/node.js.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/test.yml delete mode 100644 img/histogram.png create mode 100644 pnpm-lock.yaml delete mode 100644 yarn.lock diff --git a/.github/eslint.json b/.github/eslint.json deleted file mode 100644 index c280fdbd..00000000 --- a/.github/eslint.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "eslint-compact", - "pattern": [ - { - "regexp": "^(.+):\\sline\\s(\\d+),\\scol\\s(\\d+),\\s(Error|Warning|Info)\\s-\\s(.+)\\s\\((.+)\\)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5, - "code": 6 - } - ] - } - ] -} diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 7e5ee593..00000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,30 +0,0 @@ -# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: yarn --frozen-lockfile - - run: | - echo ::add-matcher::.github/eslint.json - yarn run eslint src test --format=compact - - run: yarn test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..839d5c5e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Publish + +on: + workflow_dispatch: {} + release: + types: [published] + +permissions: + id-token: write + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: pnpm/action-setup@v6 + with: + version: 10 + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: pnpm + - run: pnpm install + - run: pnpm run test + - run: npm publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..00a5a946 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: Test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: pnpm/action-setup@v6 + with: + version: 10 + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: pnpm + - run: pnpm install + - run: pnpm run test diff --git a/LICENSE b/LICENSE index 3594fffa..a8918c41 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2010-2023 Mike Bostock +Copyright 2010-2026 Mike Bostock Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice diff --git a/README.md b/README.md index 336aace8..0bf16932 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,6 @@ Array manipulation, ordering, searching, summarizing, etc. ## Resources - [Documentation](https://d3js.org/d3-array) -- [Examples](https://observablehq.com/collection/@d3/d3-array) +- [Examples](https://observablehq.com/@d3/-/collection/d3-array) - [Releases](https://github.com/d3/d3-array/releases) - [Getting help](https://d3js.org/community) diff --git a/img/histogram.png b/img/histogram.png deleted file mode 100644 index c28f48cbe72dd0776af7d60dac41e4904c82df93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10094 zcmeHtWmMFCyY3*Ogp^2wlz`*_1JaC=N=OSxjC2ezz|f5nA|*(tN=c{EAt@m#9fNca zJ;VTe@Ok$8_`L6XKAg4B*=y~y&aC+`^UFK0`?~)#p=wVR2=Qs~0RRBulgF|e004F~ z0DyIXdkr(<(>!bh0N{VHmXT3=A|u17<^;2_wlxO;9*4#y+*H$?py}*ySc{;*rI$uF zygHzHbHK^T6hNYg8}Qylfr8wCfRp(>Zn+lDv+QCV()JeS@w1oQoa?o^B;;`o%`Ejk zuvxGD3lJg|;fw4}-ud8S!ImLn_&j?8ZMBW29{Ef>6 zPKqBrx&REe9J~3{W51u+%^9>U^7FfZuy#HDW`+g8VWR8rGs|Z3#t)^SfV{;4yop#8 zdS*qV2@=IsGp~T4&2`Whqp*ilQ!N2r1zTPivZsGD(oHDQrygwk!P{( zHidiO>N9V)DVi{Eyp6VO=Hub~^1xfX96%>|y+W5O zu4q_xHa_L3n!?M}dpmeZhQt#UwXx1%(*5~_8@zl8l89k$c08XJ%EY*}yA{p0IU$H^ z1ez^|l!+X=-U%t~xcV<1dA|N61$4=4`s8~}rVTGC{R2Vjw?h+dho>64i`OjSEb+V! z7K)z`^K@?NMvS*e4^!{&-1aejzH9>HUY>uh_rzE#Oj0)V)R^7f{movz!=Sfse99*_ zu#i>Rr4~$G3M8&|U{B%HOd*oAMq8=N{qQsheXDqB4iM9N14B*H&)9GU0oVz9w0K~m+%t%uR;C_33$RAL6 zZKK)ZEiwLA`%;G3m-r5MegrJcUAMZK`_;n%&j9N*2K<1JA4Fbb?=mt~5=~wsmzGoG(83#$0n4Nfc&y?JUY`k( zfA6?Te}E(Z)l8S>S@36LvT+L6pz}FCchTMe&>Woz@ho0Kv-S>uHK7zSKQE4$N`cL|EJ|xe~S5x`KtHrR+WQLVt{&;aFu>l!T6N4mQ&<6So({#wlep<4l|PU2li9b}ig;h^&4{N0t!O(@Eb( z-gN-8?RwE!0)|&BKjFLW$2ZV=XhJj`E%@l=d%05f>$k@Pg#rx&ZKNrG ziW!IVsl?t}C!r5DZZn&=Fu^Meb&o!NeVi`KocC_?@z;C2)?|5sKcs7wX_$Q2l%fy2 zwik8F-`2k~P}*igus7wZ-JiTesd$Suto)sZYRy9r>63f%;7o};h82-qcf{)NNniVn%SE4+QJa_5Sf66 zK)e8{K!JI;S>Lx?!)k(dG_T?nr{u&R)ybSO7jSQIrZCnSetB{fycwJNF*VHKr9pr} z#k5@waL?I8_2kZpGpbAygR}k0mDsZhkBA^$g4}Kc?G_#Mz@J(@reXxDpHjiXsdXdqaS*C_ZKDr1+ z@RKIx%UUek7k14;B4&JMulXxMi`37kXN8z)YiP`Ag=iwEhQrSz;1N?1h(xR8w!}^T zHPDH@jd`-obGy?4etlTEID;hrg#Gm7xf$78P zH0WsPjJOB&VoI|-yFO*svJ96EIgW>J-&t{PvmV#`p0sALg#IDd8nmUcus5yUFEnwO zxIrtdDIB0*Fcn+ZaOR1!CyouNQV8hu&yBULw#-{01G)esbuz~StKv}4k@gJXQ5pSr zGwN=c-w0FhPu%&uYlxiMP>ump)ql*OKZ?iNz!@JGSWj*&FH() za?!2oZ0Z}C#d2J-@Jw+N2Yyn1A^vwg5(!(72NY296b3KLn!de}o{~Z}-RRo+Ud7$G z-Z=IJKF4TBLPtnaKriRAnFLFtgzw9xKCx!cc2{GhX%xE%+Z|R3RcB>xMenbUiL|@CW$?BVCtkH*e2HC8xN9pIPE4J2tFp1q!oIwY)3b>*pO!ra)fs;L*Od#Fek8W==4xr zZfX?=?BFJnfo8vb59h?KO3b!sJb1Qa=0WL<$=TN}1i?6t4uJ|m7(vtai>>O@%!w#g zaNnl#v}kFM=h)Ag@tOJ=w<8f`9#;%^HwVoOZE2MqgAe3uBk`Hec9Vv!o`Ivk`$P8^ z)oo2#3-6b|&fIK@XN#NVg>yl9bvO}5QZBE3Ry&LnT2;uq$%Dutkq%MQ1qa2p1w+N0 zQg0-aeGc?oWL*%dU%(?{_kY|O^)6T%AsP$%aX32lV@&wI(56iwZBWEQr%4pyU6jb| zpxFoiVS_7{rEM|RLjw#j#sA>tp!gT;Kr zy=v)dpZoD&WFJ*du9brXEM3!B)4z+0!+BSx&4ioI4n6u#2GiptiGi|))g!di;tqqz z`6VTz1m1(1qqMqB_mcziGp;lpyOJ-EipJ4V*a+gZV5Fo7dlcJl%&yq&)+C`TArG~f zSL;c~Ny=Se;Ec(1t*h7C)(7#QZrd{v4dUKWKFId-A7?NIGjO7B^&082`d8D?&UV$< zbglCol>UC{;Z721RP;se2UUj1a(T#k`pMZ?S-oYfWqZGN##j@dpQGnA)O%;CJi)Z& zxFiR%a>;a}a6&sHoO|JXQsKvJW3pK^x7Axmk6c2G`Ie#wK-7XKi>8yEYk4nK_cGR{ zrhK>0Zl5fj9ORc&m#`uZ8eM!)XBSp%b{4_?clcHc0r+?#{G|SFp8;wgNs)ZG0Cn40 zvVOc|)Gqw`1zG>uvZx-m+Qzkq$7}#JX_ONc9#3G`HxX!PivhsanCXq*eb8WwcOwP0 zV|=122!xEoYIeceQQ-rDe5@>%^@WBueE_wf<%Z+J(r@5cieB!+0$adkeiNW!2TN$X zW_T9ET+^(zbe(lol*LS8cD%-BFcWiLcRL3RnFRnO+{G{-?aZBx8Qtw{?crkXlFYwW zh+#fo4Fj1Oe=Tu_N;2!Js4>dGoXi=8cm;X+n5FO;85t#<%q+w-Waa>^YQ`zaW-bF#MP*nnzg&R zt*)%Kow+?6bBC1Z13rmg>;GluuN!~csrT1TA-=!u{B7pXof5z+1%6ZL4{QAz#h6P9 zUjq0K(@Wtu6bq0505pgvvX8XfC%0yZZAT9qR(F9K>#rVsW|Z98jaT=O$aP7kh$1i3 zm(C4v(z%@D&nz{2r((HtPrTfHWv5m?J{_)2y9s-r5OC*ape(Gt) zT>8*?N%HW#94fPCm8j*TKR6lzL}#(P&4y2}cNYM`rLe9X7W4fQKXk`tV}NEJ@cSE; z^$qW>NJzbn4MuLpkKNno`Ojr-uRejcHQ0zU*TH|V>~mI*cR z?-xLdfrMaOXDg0PZRuZ{1Qhf_akQ$Yy7h|8lY3o}-Puh|M7 zHa5nB>ZoJ4f^PV!-{sycL!-!0C-#0f0b9eaVx1mVDtna!Al%D*zbQ3;WyQDQFa&rM z-(F$qyGTh+u1tI`?l)#<09fh57i_K;W`&yIzT3X=9GS^=Lx_|jFH{tQXV=B|g{lk^ z=x^Ls3C3}lWxGX0lzgpuMbmt1ng8-G4KyFk2jTV~ z+qMfNj4s=h2<30^_2~uN5MihZv*$_H5fKg4%yp|MD6V66e6bQU0z|Jq6u8^87e7>x z!;Yw52&IgdC_`CozA3*=hE0Vke2ASIwXLuY!SxW9xO~{RHbbUj7kaaV>r&gu@1k;? z_GYcCooBW{V36CavlqHM4?8p$l|t2AZHYrOSD(G$VTB`RkRmJ^cwrhko4MxoAp{oQ z*PAH9aTpcewNz1|Lhz!#0u#e;=2?f?wx_F?6zrH{r+>KX^qF3|4=*le_*Pq^I!G>- z&a~S><*n&t9oPAaG3rpY_pEg_lH^ckGgPZTbI`-hJ>|`C(p;mo$U$&^i^52=CCuT! z+lL9(PgJ!*3*VMUkA1SuBeK`hgo)_fO(3ISZy$Ld6>U$jN4>9R!V@f9EB|j$Xk(_U zJAC1CqKqF1`x)M42y@%CQEe*EIy&^IfCE+2t;P{{TA2LyCth2(aYsn+huUp>-Kc(D zee>T!752a4&>tA~Uz#wWqLv3VcNP@RNGu~{OjY6-uJ4E%S4d zJlx$I?-#!vV9WBqq~Og8~k?asXSxk3?!-d*oLPgP|fDcK)?H`EDA2ZsO+_apko zwmr%&6T*tSXdkmlZ#H%>9IDp;cwvS~TE-S9%9-bP`jhWSBL}wok+qzTFZvr&YGv+w zA3!G%_Zw_H_r72wtC@@(|i#V)S(s$`cK-=&-HC4tmHevH8#m@b_pIhN?libhBCcpQ)1ny1Q zS1%nvlc>qqvk}P#QsPsUS2$vsEq)R)CUz8DY5}!`eEW3TnR2mIfI}<1)#!E@k6>q~ z=qDM#$nTHxtw|M0zNNW0q`G*&&O_0HO2qdhHbt?C4|M+QkuP`szJ1dZtc7T=_gGXe zGF1+#?peFv5z{U%rr$^M(vE!2(na3x6GJl8A)0Z%pg+S16B@t5=&1MTV%h7csy{_i zX!m(%u`>^Yp2pc}{X|UyyQ<(O@&V_=huGmSyC=V!UPuZO@k9%VJ++;Jn=Bgo?{;De z!JoD6Hx#7gQ2hz$s4D+B-C);BESo~zpC(orw>s-}O4@2(vA{}=e6Y1CVy1z?QO3PB z1GQ(jo9d2Z*r8Q0rL9>}6hx`wcGm?7@0!=fx0uf*Qm1JrNt+DtxF-SxiS_`pdm^|(Z zGu&@Ve;3zS&q`yoN%Wy^t?1<&u5#&B0aid?2D#PTe03x_IzMN9Wgo7oA7-Jdf@mL{ zplvZXUvpWhhvup%*T3WA0LTZCTfL~Ky+Vgb@P*;w_X=9rQ{?7ZzYc19(}pw64~4Dm zmV5NBGh^E9gc_sgz^J#v*3R`2NO)7HA7g%h z;tdQq_;E7Wh|ia(VZCs!`R_!Be=ei{3l{ZXLZJVD$NvEs|J{gl%yGuoo8SHk2cudi zj{rNOm>T+b{>ztsOv2Z&gLkOJbb9_cvGT*2&2~yQ^--hQ)l|7M@4S% z0@4<`@wDm3sDU1o?@9pDwDB*Uo*=;B{N2Cx6~AGvdpJE{LFRYf%Jol>?7!Os>Gy=iH!tmGev=no!BLf?;Zx;n@i0hJbB$2+f+rC_BHr7>g|^ z>7^5io9zF~7ZG@vy2xkteUfrCb@q7MjiQ&hPeG@q0`7*aYRDR#v%zk!FXq`$E4ESwt4n zw@rCv+EMIuqnoLem=ZMiQ5#k99XSPq78eSU&v|3m*dP4;pS!hx5c~f*6aK1T0F+FwPJA)A@9mZngO=Zd%t*$9E;5 z6bkA4GXsr!{_^_wo0xLz5ZMBGwv>A@m~jd@D^OZDQfZ3U*+XNW=nLmt0;>Hn%x7U} z0l}62!?oInQP~sud6U5p?g{CHf~|$`UR@(f;k(7PL=8jKtq~_tGu=w1^ZZ-JF}@Fg zlTRCY>%Bf#F;y8kAlXy0yhQia|0wt~^;Zpu)tkFG4z_ zG`Ik73XJ%FXTVgd-mggjQUTo+472p&zxs8)U`%QMs|)-sSmrdl40Z2j=*0TC`dO&| z{J7VWbOU?g9i|m(#?f-!P>J$egPq>)daGSuxc}YDcM!efW}gDKn;$f*Mt*66omS1b zoT(<>4hLc!ICm}CZ6+=h+Y708-Xhtw-P@fZ2J|kI0FP=_xpb`;sf0c;m(z^E?V!hG zx&zk8xvdiJ1hHRcec=m5gg(rk!0*1-1_60gUle=GLE%Nt7b2FIj-8lB&cG_c!a^Az zn+e43rG7trMfq0OJ4_gywPYO&1?6BbM3P$psvVpd&gCV_U~V&$^h|e(OKP?!r}lF# z?`0S?nCj#1$4?)DEexooL-@ZQn_xhnH+7o>N2jmpBy8<_42P!7>Y3j;lQJilVv|~` z5XY@l0TwDZjM18L4yL(a3A5h680nVmN{Wm4B&aD-zwA>!^SOnerfD5%0H(X1t$=Q9 zcl*>3EKDGsU0_gEaM`xPp}qwLd8`3x!T#GX#?i3)THRApA?y#_4#Itd2)n}R9cD2+i%h`xVw>WFq1mzcl;G+KQ~BrPix)G z(-hIT)U+YMa+OuoyD!h|xe{-ujE{lPEwSTyJ`ws16Q+W{asYbSdR}nJx8GNDxclL} z9$olkn5%$>ONQ#PM4e;j@Rr4OZwj=e8ecFb)}_ko!zxA#UZo$dUYj|X4?Hg zemX$)s$M|w{$QE6OXtAou$>>O1jLq%3otk+eAw!7zqYK*;;Y;KPzr&i0Ywaw2JerF z+(F@ks4ruFh<9FR*xFUOZZVe^b?0o@7;hZEH%$40;IE%JZ_Thv($i9NlCv6zx0(6( zH=ratq|7ZOfR%0@!IHRE$IA2=X6i=FM>KSD9#y8A4S!NU*O;=8vY$q0KG?^?csF%J zCaNq0Vk7~)9O~V%&-mHQz91jt(09tR2aZ&t5_E(=S46Qsk0Mzez0 z3jdJ|uMpXP#>rJwWk@nm2kx(MU@(zFAVMqGB zfL)mn0swS$t~6JOBe82|OoSQ6wNXqw=m`+K8>sp@IV0Kg8OE~cpY z^W(3kr>C3kWzIg%L4;14DWuAKGUn{gmJLo&*Ss>#vc8wb!NC76%lg)LJ_TGyD zKgUIKg*^@A`cKks*I0*B>1CeNy2f4;o7mNAFI<9-7U}YB2;u z+Phi`vQKxSbEBnF#h+8C8V%e|gU)o)(Gqg8aqHF?x8{qIaek3qoTGB2>6(GY_vzKz z%p{XnSQJ?~=A@36TZ}GtZNx-_HJ=M}r%6~&bjNY&aO;zvfLQP83-=~h*vholijr9f z$$HatMGE!A7d_Uiahgc&BBKz#$KsnKSeXA9BB#@r??6t-vk{-`ms|MUsLa{WGH|FS z*L-GP6#86h=M=|!@av#MX`}P@X{$_1w(<7YSrF{tK|=8QD;ZcJ509aj1K&0I)Q-8i zpIcDBomU|mAnR@V@Ym5%5yN$@Ax{iHK_ia@lUL$LiMNEt;zorS!j6-iJnuo3G<81J zYk=rvG-ls~*>7LH^#@v&`i6cMCxkra< z&095<7}7q!7h#{bRD8T`R4Os*;NUYJ9e$d0JEmyE_cV@!Y$)D-RaxGPrYrpiEY3xV zYiL-vv2GyA>G|*;6#k{;exw{)nZuy=%kgA8*JzQRZ)+yG5{sX0*2QH8d|q}zfQHMU z)?`GJYs~kUsDxnfW9IFFuD*Cn@M-7pMA<^a6zrp;lV7hOv+KRfc5BSP6Mjtfuq$66 zjeT0@O*-XI2|Qy&f9miQNe-sV_b20UJ+s#{pi&ak)POAki(nU;$hj9txN+Bf@Tiq4 z%P6($9bUxS)&rfuV2Q)t?hZ5asjpR8T$T_sq)rw*hF?s2ifg0lnMA~fAAhlTcj%0a zBjB_!JTD??6!P%6v%QH<1hHCv-7~M))1*8fe@TAGbX#eF0Tf}T`lj0S9v|v1ee6oC@`&yZ4C(RdI z>v1E>mi5*GijI%ow)gbely$|NZ7T&OsP`utz+EN}dMK^l} zeLps2hIneDU4w^<^~@S^_u+#Q)rQ0iz5$s_(j?-(2$6^nbrWNK5d$H(7z~5K4@EnT zU1X)^`R2<8>o7lHj~>^oVT$TauQU!B20=px#W978+QGU4sdIVj_3^~IQ-{T<2-BNm z#Hy`H0tY7xI|DzheA+O7AP_8RK=o=Ld{{PB&*&%~8IfUEJUo3BEhgnjJgQT2*O&V% zj@{rOItBNgq-2+Fp8`4$n6&wX4esQ`e6*5InnOAW#!2pgq<5^5u{xPL*`h~u2Is~_ zR_KQva>Ctn+MG=IhhMKFW1~9-yLr}2_AsEV+6-Cx-(?^Em&A9erz{HfpC4ZR^7usV LscfPG diff --git a/package.json b/package.json index d0c54eea..5127a193 100644 --- a/package.json +++ b/package.json @@ -26,34 +26,33 @@ "type": "module", "files": [ "dist/**/*.js", - "src/**/*.js" + "dist/**/*.mjs" ], - "module": "src/index.js", - "main": "src/index.js", + "module": "dist/d3-array.mjs", + "main": "dist/d3-array.mjs", "jsdelivr": "dist/d3-array.min.js", "unpkg": "dist/d3-array.min.js", "exports": { "umd": "./dist/d3-array.min.js", - "default": "./src/index.js" + "default": "./dist/d3-array.mjs" }, "sideEffects": false, "dependencies": { - "internmap": "1 - 2" + "internmap": "^2.0.3" }, "devDependencies": { - "@rollup/plugin-node-resolve": "15", - "d3-dsv": "3", - "d3-random": "2 - 3", - "eslint": "8", - "jsdom": "21", - "mocha": "10", - "rollup": "3", - "rollup-plugin-terser": "7" + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^1.0.2", + "d3-dsv": "^3.0.1", + "d3-random": "^3.0.1", + "eslint": "^8.57.1", + "jsdom": "^21.1.2", + "mocha": "^10.8.2", + "rollup": "^4.67.4" }, "scripts": { "test": "mocha 'test/**/*-test.js' && eslint src test", - "prepublishOnly": "rm -rf dist && rollup -c", - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd -" + "prepublishOnly": "rm -rf dist && rollup -c" }, "engines": { "node": ">=12" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..c3268aaa --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2139 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + internmap: + specifier: ^2.0.3 + version: 2.0.3 + devDependencies: + '@rollup/plugin-node-resolve': + specifier: ^16.0.3 + version: 16.0.3(rollup@4.67.4) + '@rollup/plugin-terser': + specifier: ^1.0.2 + version: 1.0.2(rollup@4.67.4) + d3-dsv: + specifier: ^3.0.1 + version: 3.0.1 + d3-random: + specifier: ^3.0.1 + version: 3.0.1 + eslint: + specifier: ^8.57.1 + version: 8.57.1 + jsdom: + specifier: ^21.1.2 + version: 21.1.2 + mocha: + specifier: ^10.8.2 + version: 10.8.2 + rollup: + specifier: ^4.67.4 + version: 4.67.4 + +packages: + + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@rollup/plugin-node-resolve@16.0.3': + resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-terser@1.0.2': + resolution: {integrity: sha512-+UihHnuLnQDQ/9wog7ym+7oawCXkjTIo0WwkK7s//0mkktTN0VhYk6fGVxH+NtGzW064w5RCGgreMDxRVhHCzw==} + engines: {node: '>=20.0.0'} + peerDependencies: + rollup: ^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/pluginutils@5.5.1': + resolution: {integrity: sha512-P9ZvnfouRu4MSC+ilERaw6FmZs8zqKhpHxEs4aGDGWQAMzQGXnhvCSvoNwokfNvdt7t3Y5Y4p6gStQgezeIqug==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/rollup-android-arm-eabi@4.67.4': + resolution: {integrity: sha512-/v/pUAPOcwp+r1Hjjdg0cBV1TE89CzGKrKh2FgkIQw2QBcIMmVPOCSfuOZStCn4Xh/98HXfo/ht6ztcssctPNg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.67.4': + resolution: {integrity: sha512-6tmmB/P52Vt167FXXEw5auiEUgTtZz7aqUgWHqYXToIUE0HFDY6fTdAyeekjjsNk6O/8dtpSKtClxSj1mMneKQ==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-android-x64@4.67.4': + resolution: {integrity: sha512-8Z9Q4RmotVmuL4llOvqX814JNiOK1oqoBv+glG5KbpRfUiypqzz2/fxIzK4Pq129l4dT5a8Gszmpc0/XPYoFuQ==} + cpu: [x64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.67.4': + resolution: {integrity: sha512-pnq6hssxTtwuRAl6Kdi/+IDY+b1IhkUetjhUkdLAAJCssjfqtL2Oqy/FXJVJFtAWOu1oRlArIvf0Yk1O92x2HQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.67.4': + resolution: {integrity: sha512-BeIrGZvHMVdJg/N+ohZfFywG/gF41684YhDj2wBvouj7m9ziP1tZDUNwzXRiDY+3WIKngaC4hiUBqVtBPGP5og==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.67.4': + resolution: {integrity: sha512-fRFX/oqNg/g780DKoS8RIfYcZD59Ru5O/bSeK1N7gQljBFrTxJY/q5EX4eMs5SrJf32VgVBVVYCdfPpzAwPPnQ==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.67.4': + resolution: {integrity: sha512-bSrBRopG1q+0RuOsW0NtYTtIODlvNA3T3ebx5WnQVdSxWIoXFmj+rZdHUHdSLgFdZ5M6VGmekYE7r4RMGQXjfg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.67.4': + resolution: {integrity: sha512-L8IvdrJVtl65g1ozwDSyjGPG+FmibhCdFUwmqTItJLw0S3+Oj4QzFs7rfgTUiK7rsPjkCLdG1/GApFxoynXFJQ==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm-musleabihf@4.67.4': + resolution: {integrity: sha512-h7PcoQOzC31jshNpQ48J0akB9tsghjkSjSl5AZ6XsVGTxVsln7t7C4SQyw62tNVSaz2SeHgk4VT2ELbL17BSHQ==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-arm64-gnu@4.67.4': + resolution: {integrity: sha512-KSPuOBNHoOl7AsVjeY1KZci8+0up0U4TFAHU5IzBYN8P+Z6cB9DZq28+JQycZW7f6WLLa/tSzhV7Rdy95bVi+g==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm64-musl@4.67.4': + resolution: {integrity: sha512-0E/mKmVk1PlQeQYygIwQm0jlwjANTzGSiNBMPrFx+rdFGFj/2Axh4p6XwcrystQIqXZVudTaGsdbDpzYgJ4wSA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-loong64-gnu@4.67.4': + resolution: {integrity: sha512-Fvw7dOSc2Sa9UOipRZVI0zOgdLCzsjVyD/6JuHXzUHTXFu7mMgmeX/0/bCVBIut1dz+nWz3pV4WpS/Qg0XVnxw==} + cpu: [loong64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-loong64-musl@4.67.4': + resolution: {integrity: sha512-jzxbVHaE7V3F+P0wEK7UydQtvv7Twfdtx58jI5/3VRx1jJxyrn+qFwfXmqjVFxPhBl+zjaRs+ZJMFJw7vdHaQA==} + cpu: [loong64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-ppc64-gnu@4.67.4': + resolution: {integrity: sha512-fhtrzp9p4GjEJVaigaap9g6X9nP6xgJtKiLLXSDgpE18HXufA5aqfltGn+KAqMtVZReJZfOrXm//y5YSA9BWbA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-ppc64-musl@4.67.4': + resolution: {integrity: sha512-uynaF7IUHwAckV0S+yC1f5esy9gB+aqCBsPH5BOck32TYdCuAn2lVG5tvUcFnEsrviGEmRZxE1NHSOieUPYJEg==} + cpu: [ppc64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-riscv64-gnu@4.67.4': + resolution: {integrity: sha512-uaqRFdfb8eIa2bVHN/FE3ndCvR0zV2xv0AwjCfxrqSu6l6fp/54VhjfhslKlf2RIik9L1jwlt4E56PeVX6tQtQ==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-musl@4.67.4': + resolution: {integrity: sha512-JZRow7kmxUDEASnxHuVG5itTm+nTXi9BQUABcVUnUEngC+OPwMrpx1uJ9hIA/v+IcAEBL52ktCSPXk5OJn9Jqg==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-s390x-gnu@4.67.4': + resolution: {integrity: sha512-rdrh4e+Lq9fCNKoDPaCqeHXbQCe7yl77Ukl45tlSClwYdZ1gpFGZz1XLJdYtY++FRlfL5aHvb6/0n3GDW/Nxsw==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.67.4': + resolution: {integrity: sha512-wL7MS4r0fYcxluF3ne2plofHZiB/LsqNCnyaUlyiKpAJLb6agPSFz7DEFCfkonWAZXMrLwCmC08b2ZEnEdJkog==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.67.4': + resolution: {integrity: sha512-4H0XHfd2VufGjX7NjUyeue78sD0bRIoKSGjGqO+F5nSvL6jN48NAU7esdmtFEYxZXwObLtt3MJ/kHS0jASMW3g==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-openbsd-x64@4.67.4': + resolution: {integrity: sha512-osRHQbE55pZpCLetpMsFmhkapyZnAUH73qRKMh+npi3boUom6u6hdaTTPSxlInXxwJHsn9r2uDhdz0V7Yoxx2A==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.67.4': + resolution: {integrity: sha512-95+exYEyOwrZePsE0czi4q7X5lxKPa21+lmyAZlwbYENITQ0Unk4HAQAFp/p+KhXBHBx9mUABXRYjOC5A1wY3Q==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.67.4': + resolution: {integrity: sha512-FOXOcKhNQpO4Po+Ynan6IbtM67SrXZbgpRJWVYwz53CT5veI7sVzDwVBmWS65N5Imv+wK3SVhIPAl+C5DXXNCg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.67.4': + resolution: {integrity: sha512-cklKh0gJOkAZQcWziQa3hrjxZKN+PCHZ7SPTyGJDAiBVr05ZXlEjGFCG7zFJMaVibxsmzAe1FimN4u/HBns9+Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.67.4': + resolution: {integrity: sha512-AegwxJPc9bvUp8fQtlsUHkFMOMkGylWU7glyL+YD4vwG+QaYoGXYLSsQoeTD7kvoLZrVlMWNVhTg1dedY5C1VQ==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.67.4': + resolution: {integrity: sha512-RJZnrwTWj7Iq2ooBwoGbDdC65tDwYawneGcAfFMJqVUrRZMcskka6nTkBpXR/47G7kzn3EW2qupExnaBy11vwg==} + cpu: [x64] + os: [win32] + + '@tootallnate/once@2.0.1': + resolution: {integrity: sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==} + engines: {node: '>= 10'} + + '@types/estree@1.0.10': + resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} + + '@types/resolve@1.20.2': + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + + '@ungap/structured-clone@1.4.0': + resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} + + abab@2.0.6: + resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} + deprecated: Use your platform's native atob() and btoa() methods instead + + acorn-globals@7.0.1: + resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.3.5: + resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} + engines: {node: '>=0.4.0'} + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + brace-expansion@1.1.21: + resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + commander@7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + cssstyle@3.0.0: + resolution: {integrity: sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==} + engines: {node: '>=14'} + + d3-dsv@3.0.1: + resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} + engines: {node: '>=12'} + hasBin: true + + d3-random@3.0.1: + resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + engines: {node: '>=12'} + + data-urls@4.0.0: + resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} + engines: {node: '>=14'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + diff@5.2.2: + resolution: {integrity: sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==} + engines: {node: '>=0.3.1'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + domexception@4.0.0: + resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} + engines: {node: '>=12'} + deprecated: Use your platform's native DOMException instead + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.20.3: + resolution: {integrity: sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + flatted@3.4.4: + resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + html-encoding-sniffer@3.0.0: + resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} + engines: {node: '>=12'} + + http-proxy-agent@5.0.0: + resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} + engines: {node: '>= 6'} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-core-module@2.17.0: + resolution: {integrity: sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + jsdom@21.1.2: + resolution: {integrity: sha512-sCpFmK2jv+1sjff4u7fzft+pUh2KSUbUrEHYHyfSIbGTIcmnjyp83qg6qLwdJ/I3LpTXx33ACxeRL7Lsyc6lGQ==} + engines: {node: '>=14'} + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + + minimatch@5.1.9: + resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} + engines: {node: '>=10'} + + mocha@10.8.2: + resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} + engines: {node: '>= 14.0.0'} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + nwsapi@2.2.28: + resolution: {integrity: sha512-IlVB7OS7qrOsVYlpnFIkETjMwT9jwvmocJmmM+GZU/PAB3uGi9Ezd7vcWhWBUnSc0ya4ppmQITOyP1ez9gg8cg==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + psl@1.15.0: + resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve@1.22.13: + resolution: {integrity: sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==} + engines: {node: '>= 0.4'} + hasBin: true + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rollup@4.67.4: + resolution: {integrity: sha512-Lsv3oKcz5jgOQJej/p7nfwbVEdAbDT+z6OPf/SCdI+nF+q2ENp0pTKT35ZwXAmH8g45mfrIiJeEyAqKYSYoL9Q==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + rrweb-cssom@0.6.0: + resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rw@1.3.3: + resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + serialize-javascript@7.1.4: + resolution: {integrity: sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==} + engines: {node: '>=20.0.0'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + smob@1.6.2: + resolution: {integrity: sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==} + engines: {node: '>=20.0.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + symbol-tree@3.2.4: + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + + terser@5.51.2: + resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} + engines: {node: '>=10'} + hasBin: true + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tough-cookie@4.1.4: + resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} + engines: {node: '>=6'} + + tr46@4.1.1: + resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} + engines: {node: '>=14'} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + + w3c-xmlserializer@4.0.0: + resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} + engines: {node: '>=14'} + + webidl-conversions@7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} + + whatwg-encoding@2.0.0: + resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} + engines: {node: '>=12'} + deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation + + whatwg-mimetype@3.0.0: + resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} + engines: {node: '>=12'} + + whatwg-url@12.0.1: + resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} + engines: {node: '>=14'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + workerpool@6.5.1: + resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + ws@8.22.1: + resolution: {integrity: sha512-oyL6OPYme/CmiFvNuGzeoxCJ4nOrZE2O1FwM9MWM1AsGri6nLXB2pg+lNA8aLeXMSav0J6eIVS1j6vUPzUtK9g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@16.2.2: + resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==} + engines: {node: '>=10'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@eslint-community/eslint-utils@4.10.1(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.2': {} + + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@8.1.1) + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/source-map@0.3.11': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.20.3 + + '@rollup/plugin-node-resolve@16.0.3(rollup@4.67.4)': + dependencies: + '@rollup/pluginutils': 5.5.1(rollup@4.67.4) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-module: 1.0.0 + resolve: 1.22.13 + optionalDependencies: + rollup: 4.67.4 + + '@rollup/plugin-terser@1.0.2(rollup@4.67.4)': + dependencies: + serialize-javascript: 7.1.4 + smob: 1.6.2 + terser: 5.51.2 + optionalDependencies: + rollup: 4.67.4 + + '@rollup/pluginutils@5.5.1(rollup@4.67.4)': + dependencies: + '@types/estree': 1.0.10 + estree-walker: 2.0.2 + picomatch: 4.0.7 + optionalDependencies: + rollup: 4.67.4 + + '@rollup/rollup-android-arm-eabi@4.67.4': + optional: true + + '@rollup/rollup-android-arm64@4.67.4': + optional: true + + '@rollup/rollup-android-x64@4.67.4': + optional: true + + '@rollup/rollup-darwin-arm64@4.67.4': + optional: true + + '@rollup/rollup-darwin-x64@4.67.4': + optional: true + + '@rollup/rollup-freebsd-arm64@4.67.4': + optional: true + + '@rollup/rollup-freebsd-x64@4.67.4': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.67.4': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.67.4': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.67.4': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.67.4': + optional: true + + '@rollup/rollup-linux-x64-musl@4.67.4': + optional: true + + '@rollup/rollup-openbsd-x64@4.67.4': + optional: true + + '@rollup/rollup-openharmony-arm64@4.67.4': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.67.4': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.67.4': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.67.4': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.67.4': + optional: true + + '@tootallnate/once@2.0.1': {} + + '@types/estree@1.0.10': {} + + '@types/resolve@1.20.2': {} + + '@ungap/structured-clone@1.4.0': {} + + abab@2.0.6: {} + + acorn-globals@7.0.1: + dependencies: + acorn: 8.19.0 + acorn-walk: 8.3.5 + + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn-walk@8.3.5: + dependencies: + acorn: 8.19.0 + + acorn@8.19.0: {} + + agent-base@6.0.2: + dependencies: + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-colors@4.1.3: {} + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + argparse@2.0.1: {} + + asynckit@0.4.0: {} + + balanced-match@1.0.2: {} + + binary-extensions@2.3.0: {} + + brace-expansion@1.1.21: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.1.7: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browser-stdout@1.3.1: {} + + buffer-from@1.1.2: {} + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + callsites@3.1.0: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@2.20.3: {} + + commander@7.2.0: {} + + concat-map@0.0.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + cssstyle@3.0.0: + dependencies: + rrweb-cssom: 0.6.0 + + d3-dsv@3.0.1: + dependencies: + commander: 7.2.0 + iconv-lite: 0.6.3 + rw: 1.3.3 + + d3-random@3.0.1: {} + + data-urls@4.0.0: + dependencies: + abab: 2.0.6 + whatwg-mimetype: 3.0.0 + whatwg-url: 12.0.1 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + decimal.js@10.6.0: {} + + deep-is@0.1.4: {} + + deepmerge@4.3.1: {} + + delayed-stream@1.0.0: {} + + diff@5.2.2: {} + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + + domexception@4.0.0: + dependencies: + webidl-conversions: 7.0.0 + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + emoji-regex@8.0.0: {} + + entities@6.0.1: {} + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + escodegen@2.1.0: + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.2 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.4.0 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + espree@9.6.1: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 3.4.3 + + esprima@4.0.1: {} + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@2.0.2: {} + + esutils@2.0.3: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastq@1.20.3: + dependencies: + reusify: 1.1.0 + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@3.2.0: + dependencies: + flatted: 3.4.4 + keyv: 4.5.4 + rimraf: 3.0.2 + + flat@5.0.2: {} + + flatted@3.4.4: {} + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-caller-file@2.0.5: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.5 + once: 1.4.0 + path-is-absolute: 1.0.1 + + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.9 + once: 1.4.0 + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + + gopd@1.2.0: {} + + graphemer@1.4.0: {} + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + he@1.2.0: {} + + html-encoding-sniffer@3.0.0: + dependencies: + whatwg-encoding: 2.0.0 + + http-proxy-agent@5.0.0: + dependencies: + '@tootallnate/once': 2.0.1 + agent-base: 6.0.2 + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ignore@5.3.2: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + internmap@2.0.3: {} + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-core-module@2.17.0: + dependencies: + hasown: 2.0.4 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-module@1.0.0: {} + + is-number@7.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-potential-custom-element-name@1.0.1: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + jsdom@21.1.2: + dependencies: + abab: 2.0.6 + acorn: 8.19.0 + acorn-globals: 7.0.1 + cssstyle: 3.0.0 + data-urls: 4.0.0 + decimal.js: 10.6.0 + domexception: 4.0.0 + escodegen: 2.1.0 + form-data: 4.0.6 + html-encoding-sniffer: 3.0.0 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.28 + parse5: 7.3.0 + rrweb-cssom: 0.6.0 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 4.1.4 + w3c-xmlserializer: 4.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 2.0.0 + whatwg-mimetype: 3.0.0 + whatwg-url: 12.0.1 + ws: 8.22.1 + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + math-intrinsics@1.1.0: {} + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.21 + + minimatch@5.1.9: + dependencies: + brace-expansion: 2.1.7 + + mocha@10.8.2: + dependencies: + ansi-colors: 4.1.3 + browser-stdout: 1.3.1 + chokidar: 3.6.0 + debug: 4.4.3(supports-color@8.1.1) + diff: 5.2.2 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 8.1.0 + he: 1.2.0 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 5.1.9 + ms: 2.1.3 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 6.5.1 + yargs: 16.2.2 + yargs-parser: 20.2.9 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + natural-compare@1.4.0: {} + + normalize-path@3.0.0: {} + + nwsapi@2.2.28: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse5@7.3.0: + dependencies: + entities: 6.0.1 + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-parse@1.0.7: {} + + picomatch@2.3.2: {} + + picomatch@4.0.7: {} + + prelude-ls@1.2.1: {} + + psl@1.15.0: + dependencies: + punycode: 2.3.1 + + punycode@2.3.1: {} + + querystringify@2.2.0: {} + + queue-microtask@1.2.3: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.2 + + require-directory@2.1.1: {} + + requires-port@1.0.0: {} + + resolve-from@4.0.0: {} + + resolve@1.22.13: + dependencies: + es-errors: 1.3.0 + is-core-module: 2.17.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + reusify@1.1.0: {} + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + rollup@4.67.4: + dependencies: + '@types/estree': 1.0.10 + optionalDependencies: + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 4.67.4 + '@rollup/rollup-android-arm64': 4.67.4 + '@rollup/rollup-android-x64': 4.67.4 + '@rollup/rollup-darwin-arm64': 4.67.4 + '@rollup/rollup-darwin-x64': 4.67.4 + '@rollup/rollup-freebsd-arm64': 4.67.4 + '@rollup/rollup-freebsd-x64': 4.67.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.67.4 + '@rollup/rollup-linux-arm-musleabihf': 4.67.4 + '@rollup/rollup-linux-arm64-gnu': 4.67.4 + '@rollup/rollup-linux-arm64-musl': 4.67.4 + '@rollup/rollup-linux-loong64-gnu': 4.67.4 + '@rollup/rollup-linux-loong64-musl': 4.67.4 + '@rollup/rollup-linux-ppc64-gnu': 4.67.4 + '@rollup/rollup-linux-ppc64-musl': 4.67.4 + '@rollup/rollup-linux-riscv64-gnu': 4.67.4 + '@rollup/rollup-linux-riscv64-musl': 4.67.4 + '@rollup/rollup-linux-s390x-gnu': 4.67.4 + '@rollup/rollup-linux-x64-gnu': 4.67.4 + '@rollup/rollup-linux-x64-musl': 4.67.4 + '@rollup/rollup-openbsd-x64': 4.67.4 + '@rollup/rollup-openharmony-arm64': 4.67.4 + '@rollup/rollup-win32-arm64-msvc': 4.67.4 + '@rollup/rollup-win32-ia32-msvc': 4.67.4 + '@rollup/rollup-win32-x64-gnu': 4.67.4 + '@rollup/rollup-win32-x64-msvc': 4.67.4 + fsevents: 2.3.3 + + rrweb-cssom@0.6.0: {} + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + rw@1.3.3: {} + + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + serialize-javascript@7.1.4: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + smob@1.6.2: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + symbol-tree@3.2.4: {} + + terser@5.51.2: + dependencies: + '@jridgewell/source-map': 0.3.11 + acorn: 8.19.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + text-table@0.2.0: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tough-cookie@4.1.4: + dependencies: + psl: 1.15.0 + punycode: 2.3.1 + universalify: 0.2.0 + url-parse: 1.5.10 + + tr46@4.1.1: + dependencies: + punycode: 2.3.1 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-fest@0.20.2: {} + + universalify@0.2.0: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + url-parse@1.5.10: + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + + w3c-xmlserializer@4.0.0: + dependencies: + xml-name-validator: 4.0.0 + + webidl-conversions@7.0.0: {} + + whatwg-encoding@2.0.0: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@3.0.0: {} + + whatwg-url@12.0.1: + dependencies: + tr46: 4.1.1 + webidl-conversions: 7.0.0 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-wrap@1.2.5: {} + + workerpool@6.5.1: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrappy@1.0.2: {} + + ws@8.22.1: {} + + xml-name-validator@4.0.0: {} + + xmlchars@2.2.0: {} + + y18n@5.0.8: {} + + yargs-parser@20.2.9: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@16.2.2: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + + yocto-queue@0.1.0: {} diff --git a/rollup.config.js b/rollup.config.js index e9448fbc..9b026007 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,7 +1,7 @@ -import {nodeResolve} from "@rollup/plugin-node-resolve"; -import {readFileSync} from "fs"; -import {terser} from "rollup-plugin-terser"; -import meta from "./package.json" assert {type: "json"}; +import {readFileSync} from "node:fs"; +import RollupNode from "@rollup/plugin-node-resolve"; +import RollupTerser from "@rollup/plugin-terser"; +import meta from "./package.json" with {type: "json"}; // Extract copyrights from the LICENSE. const copyright = readFileSync("./LICENSE", "utf-8") @@ -10,44 +10,69 @@ const copyright = readFileSync("./LICENSE", "utf-8") .map(line => line.replace(/^copyright\s+/i, "")) .join(", "); -const config = { - input: "src/index.js", - external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), +const banner = `// ${meta.homepage} v${meta.version} Copyright ${copyright}`; + +const terser = RollupTerser({ output: { - file: `dist/${meta.name}.js`, - name: "d3", - format: "umd", - indent: false, - extend: true, - banner: `// ${meta.homepage} v${meta.version} Copyright ${copyright}`, - globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) + preamble: banner }, - plugins: [ - nodeResolve() - ] -}; + mangle: { + reserved: [ + "InternMap", + "InternSet" + ] + } +}); + +function config(options) { + return { + ...options, + input: "src/index.js", + external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), + output: { + ...options.output, + name: "d3", + indent: false, + extend: true, + banner, + globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) + }, + plugins: [ + RollupNode(), + ...(options.plugins ?? []) + ] + }; +} export default [ - config, - { - ...config, + config({ output: { - ...config.output, - file: `dist/${meta.name}.min.js` + file: `dist/${meta.name}.mjs`, + format: "es" + } + }), + config({ + output: { + file: `dist/${meta.name}.min.mjs`, + format: "es" }, plugins: [ - ...config.plugins, - terser({ - output: { - preamble: config.output.banner - }, - mangle: { - reserved: [ - "InternMap", - "InternSet" - ] - } - }) + terser ] - } + }), + config({ + output: { + file: `dist/${meta.name}.js`, + format: "umd", + } + }), + config({ + output: { + file: `dist/${meta.name}.min.js`, + format: "umd" + }, + plugins: [ + terser + ] + }) ]; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 1ac67cdf..00000000 --- a/yarn.lock +++ /dev/null @@ -1,1641 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.10.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/helper-validator-identifier@^7.18.6": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@jridgewell/gen-mapping@^0.3.0": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@rollup/plugin-node-resolve@15": - version "15.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.1.tgz#72be449b8e06f6367168d5b3cd5e2802e0248971" - integrity sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg== - dependencies: - "@rollup/pluginutils" "^5.0.1" - "@types/resolve" "1.20.2" - deepmerge "^4.2.2" - is-builtin-module "^3.2.0" - is-module "^1.0.0" - resolve "^1.22.1" - -"@rollup/pluginutils@^5.0.1": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" - integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== - dependencies: - "@types/estree" "^1.0.0" - estree-walker "^2.0.2" - picomatch "^2.3.1" - -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - -"@types/estree@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/node@*": - version "18.11.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" - integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== - -"@types/resolve@1.20.2": - version "1.20.2" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" - integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== - -abab@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - -acorn-globals@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" - integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== - dependencies: - acorn "^8.1.0" - acorn-walk "^8.0.2" - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-walk@^8.0.2: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.1.0, acorn@^8.5.0, acorn@^8.8.0, acorn@^8.8.1: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ajv@^6.10.0, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -builtin-modules@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" - integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@7: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cssom@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" - integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - -d3-dsv@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" - integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== - dependencies: - commander "7" - iconv-lite "0.6" - rw "1" - -"d3-random@2 - 3": - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" - integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== - -data-urls@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" - integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== - dependencies: - abab "^2.0.6" - whatwg-mimetype "^3.0.0" - whatwg-url "^11.0.0" - -debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -decimal.js@^10.4.2: - version "10.4.3" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" - integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== - -deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -domexception@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" - integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== - dependencies: - webidl-conversions "^7.0.0" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -entities@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" - integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== - -eslint@8: - version "8.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.32.0.tgz#d9690056bb6f1a302bd991e7090f5b68fbaea861" - integrity sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ== - dependencies: - "@eslint/eslintrc" "^1.4.1" - "@humanwhocodes/config-array" "^0.11.8" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-sdsl "^4.1.4" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - -espree@^9.4.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - -esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -estree-walker@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@5.0.0, find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^13.19.0: - version "13.19.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8" - integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== - dependencies: - type-fest "^0.20.2" - -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -html-encoding-sniffer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" - integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== - dependencies: - whatwg-encoding "^2.0.0" - -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== - dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" - -https-proxy-agent@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -iconv-lite@0.6, iconv-lite@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -"internmap@1 - 2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" - integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-builtin-module@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" - integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== - dependencies: - builtin-modules "^3.3.0" - -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" - integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -jest-worker@^26.2.1: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - -js-sdsl@^4.1.4: - version "4.2.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.2.0.tgz#278e98b7bea589b8baaf048c20aeb19eb7ad09d0" - integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsdom@21: - version "21.0.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-21.0.0.tgz#33e22f2fc44286e50ac853c7b7656c8864a4ea45" - integrity sha512-AIw+3ZakSUtDYvhwPwWHiZsUi3zHugpMEKlNPaurviseYoBqo0zBd3zqoUi3LPCNtPFlEP8FiW9MqCZdjb2IYA== - dependencies: - abab "^2.0.6" - acorn "^8.8.1" - acorn-globals "^7.0.0" - cssom "^0.5.0" - cssstyle "^2.3.0" - data-urls "^3.0.2" - decimal.js "^10.4.2" - domexception "^4.0.0" - escodegen "^2.0.0" - form-data "^4.0.0" - html-encoding-sniffer "^3.0.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.1" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.2" - parse5 "^7.1.1" - saxes "^6.0.0" - symbol-tree "^3.2.4" - tough-cookie "^4.1.2" - w3c-xmlserializer "^4.0.0" - webidl-conversions "^7.0.0" - whatwg-encoding "^2.0.0" - whatwg-mimetype "^3.0.0" - whatwg-url "^11.0.0" - ws "^8.11.0" - xml-name-validator "^4.0.0" - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -mocha@10: - version "10.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" - integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -nwsapi@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0" - integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse5@^7.1.1: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== - -psl@^1.1.33: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.2.0.tgz#2092cc57cd2582c38e4e7e8bb869dc8d3148bc74" - integrity sha512-LN6QV1IJ9ZhxWTNdktaPClrNfp8xdSAYS0Zk2ddX7XsXZAxckMHPCBcHRo0cTcEIgYPRiGEkmji3Idkh2yFtYw== - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup-plugin-terser@7: - version "7.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" - integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== - dependencies: - "@babel/code-frame" "^7.10.4" - jest-worker "^26.2.1" - serialize-javascript "^4.0.0" - terser "^5.0.0" - -rollup@3: - version "3.10.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.10.0.tgz#6eb19196d8b3b375ca651cb78261faac48e24cd6" - integrity sha512-JmRYz44NjC1MjVF2VKxc0M1a97vn+cDxeqWmnwyAF4FvpjK8YFdHpaqvQB+3IxCvX05vJxKZkoMDU8TShhmJVA== - optionalDependencies: - fsevents "~2.3.2" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rw@1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" - integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -saxes@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" - integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== - dependencies: - xmlchars "^2.2.0" - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -terser@^5.0.0: - version "5.16.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.1.tgz#5af3bc3d0f24241c7fb2024199d5c461a1075880" - integrity sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tough-cookie@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" - integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - -tr46@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" - integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== - dependencies: - punycode "^2.1.1" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== - dependencies: - prelude-ls "~1.1.2" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -w3c-xmlserializer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" - integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== - dependencies: - xml-name-validator "^4.0.0" - -webidl-conversions@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" - integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== - -whatwg-encoding@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" - integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== - dependencies: - iconv-lite "0.6.3" - -whatwg-mimetype@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" - integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== - -whatwg-url@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" - integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== - dependencies: - tr46 "^3.0.0" - webidl-conversions "^7.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.3, word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -ws@^8.11.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.0.tgz#485074cc392689da78e1828a9ff23585e06cddd8" - integrity sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig== - -xml-name-validator@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" - integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 5d7e4e6c017d833c98abff54368da63ad0068779 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 15:46:22 -0800 Subject: [PATCH 02/13] restore internmap range Co-Authored-By: Claude Opus 5.5 --- package.json | 2 +- pnpm-lock.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5127a193..861b913f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "sideEffects": false, "dependencies": { - "internmap": "^2.0.3" + "internmap": "1 - 2" }, "devDependencies": { "@rollup/plugin-node-resolve": "^16.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3268aaa..46102de4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,7 +9,7 @@ importers: .: dependencies: internmap: - specifier: ^2.0.3 + specifier: 1 - 2 version: 2.0.3 devDependencies: '@rollup/plugin-node-resolve': From f479e6c4206a99d1559baabf60bdde90fc6cc018 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 16:54:37 -0800 Subject: [PATCH 03/13] vitest, eslint 9 Co-Authored-By: Claude Opus 5.5 --- .eslintrc.json | 14 - .github/workflows/publish.yml | 1 + .github/workflows/test.yml | 1 + eslint.config.js | 11 + package.json | 11 +- pnpm-lock.yaml | 1331 +++++++++++++---------- test/.eslintrc.json | 14 - test/ascending-test.js | 9 +- test/bin-test.js | 49 +- test/bisect-test.js | 39 +- test/bisector-test.js | 73 +- test/blur-test.js | 21 +- test/count-test.js | 9 +- test/cross-test.js | 23 +- test/cumsum-test.js | 25 +- test/descending-test.js | 9 +- test/deviation-test.js | 17 +- test/difference-test.js | 7 +- test/disjoint-test.js | 9 +- test/every-test.js | 17 +- test/extent-test.js | 25 +- test/fcumsum-test.js | 29 +- test/filter-test.js | 15 +- test/flatGroup-test.js | 3 +- test/flatRollup-test.js | 5 +- test/fsum-test.js | 31 +- test/greatest-test.js | 17 +- test/greatestIndex-test.js | 17 +- test/group-test.js | 7 +- test/groupSort-test.js | 5 +- test/groups-test.js | 5 +- test/index-test.js | 7 +- test/intersection-test.js | 11 +- test/least-test.js | 17 +- test/leastIndex-test.js | 17 +- test/map-test.js | 15 +- test/max-test.js | 25 +- test/maxIndex-test.js | 25 +- test/mean-test.js | 25 +- test/median-test.js | 31 +- test/merge-test.js | 11 +- test/min-test.js | 25 +- test/minIndex-test.js | 25 +- test/mode-test.js | 29 +- test/nice-test.js | 11 +- test/pairs-test.js | 9 +- test/permute-test.js | 19 +- test/quantile-test.js | 31 +- test/quickselect-test.js | 9 +- test/range-test.js | 31 +- test/rank-test.js | 19 +- test/reduce-test.js | 17 +- test/reverse-test.js | 11 +- test/rollup-test.js | 5 +- test/rollups-test.js | 5 +- test/scan-test.js | 11 +- test/shuffle-test.js | 9 +- test/some-test.js | 17 +- test/sort-test.js | 27 +- test/subset-test.js | 5 +- test/sum-test.js | 25 +- test/superset-test.js | 9 +- test/threshold/freedmanDiaconic-test.js | 9 +- test/threshold/scott-test.js | 9 +- test/threshold/sturges-test.js | 5 +- test/tickIncrement-test.js | 11 +- test/tickStep-test.js | 13 +- test/ticks-test.js | 23 +- test/transpose-test.js | 13 +- test/union-test.js | 11 +- test/variance-test.js | 21 +- test/zip-test.js | 11 +- vitest.config.js | 3 + 73 files changed, 1401 insertions(+), 1110 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 eslint.config.js delete mode 100644 test/.eslintrc.json create mode 100644 vitest.config.js diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 4b9180a7..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "eslint:recommended", - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 8 - }, - "env": { - "es6": true - }, - "rules": { - "no-cond-assign": 0, - "no-constant-condition": 0 - } -} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 839d5c5e..623fc14f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,4 +23,5 @@ jobs: cache: pnpm - run: pnpm install - run: pnpm run test + - run: pnpm run lint - run: npm publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00a5a946..63d0c516 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,3 +20,4 @@ jobs: cache: pnpm - run: pnpm install - run: pnpm run test + - run: pnpm run lint diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..0c767efb --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,11 @@ +import js from "@eslint/js"; +import globals from "globals"; +import {defineConfig} from "eslint/config"; + +export default defineConfig([ + {files: ["**/*.{js,ts,jsx,tsx}"], plugins: {js}, extends: ["js/recommended"]}, + {files: ["**/*.{js,ts,jsx,tsx}"], languageOptions: {globals: globals.browser}}, + {languageOptions: {ecmaVersion: 2019, sourceType: "module"}}, + {rules: {"no-cond-assign": 0, "no-constant-condition": 0}}, + {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}} +]); diff --git a/package.json b/package.json index 861b913f..fca86c1b 100644 --- a/package.json +++ b/package.json @@ -41,17 +41,20 @@ "internmap": "1 - 2" }, "devDependencies": { + "@eslint/js": "^9.39.5", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", "d3-dsv": "^3.0.1", "d3-random": "^3.0.1", - "eslint": "^8.57.1", + "eslint": "^9.39.5", + "globals": "^17.14.0", "jsdom": "^21.1.2", - "mocha": "^10.8.2", - "rollup": "^4.67.4" + "rollup": "^4.67.4", + "vitest": "^4.1.12" }, "scripts": { - "test": "mocha 'test/**/*-test.js' && eslint src test", + "test": "vitest", + "lint": "eslint src test", "prepublishOnly": "rm -rf dist && rollup -c" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46102de4..fcfb9641 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,6 +12,9 @@ importers: specifier: 1 - 2 version: 2.0.3 devDependencies: + '@eslint/js': + specifier: ^9.39.5 + version: 9.39.5 '@rollup/plugin-node-resolve': specifier: ^16.0.3 version: 16.0.3(rollup@4.67.4) @@ -25,17 +28,20 @@ importers: specifier: ^3.0.1 version: 3.0.1 eslint: - specifier: ^8.57.1 - version: 8.57.1 + specifier: ^9.39.5 + version: 9.39.5 + globals: + specifier: ^17.14.0 + version: 17.14.0 jsdom: specifier: ^21.1.2 version: 21.1.2 - mocha: - specifier: ^10.8.2 - version: 10.8.2 rollup: specifier: ^4.67.4 version: 4.67.4 + vitest: + specifier: ^4.1.12 + version: 4.1.12(jsdom@21.1.2)(vite@8.3.5(terser@5.51.2)) packages: @@ -49,26 +55,53 @@ packages: resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.5': + resolution: {integrity: sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -93,17 +126,107 @@ packages: os: [linux] libc: [glibc] - '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} + '@oxc-project/types@0.156.0': + resolution: {integrity: sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==} - '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} + '@rolldown/binding-android-arm-eabi@1.2.16': + resolution: {integrity: sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] - '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} + '@rolldown/binding-android-arm64@1.2.16': + resolution: {integrity: sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.16': + resolution: {integrity: sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.16': + resolution: {integrity: sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.16': + resolution: {integrity: sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': + resolution: {integrity: sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.16': + resolution: {integrity: sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.16': + resolution: {integrity: sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.16': + resolution: {integrity: sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.16': + resolution: {integrity: sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.16': + resolution: {integrity: sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.16': + resolution: {integrity: sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.16': + resolution: {integrity: sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.16': + resolution: {integrity: sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.16': + resolution: {integrity: sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} '@rollup/plugin-node-resolve@16.0.3': resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==} @@ -275,18 +398,56 @@ packages: cpu: [x64] os: [win32] + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@tootallnate/once@2.0.1': resolution: {integrity: sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==} engines: {node: '>= 10'} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.10': resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - '@ungap/structured-clone@1.4.0': - resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} + '@vitest/expect@4.1.12': + resolution: {integrity: sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==} + + '@vitest/mocker@4.1.12': + resolution: {integrity: sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.12': + resolution: {integrity: sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==} + + '@vitest/runner@4.1.12': + resolution: {integrity: sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==} + + '@vitest/snapshot@4.1.12': + resolution: {integrity: sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==} + + '@vitest/spy@4.1.12': + resolution: {integrity: sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==} + + '@vitest/utils@4.1.12': + resolution: {integrity: sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==} abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} @@ -316,48 +477,26 @@ packages: ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} - ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - brace-expansion@1.1.21: resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} - brace-expansion@2.1.7: - resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} - - braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -369,21 +508,14 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - - cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -405,6 +537,9 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -435,10 +570,6 @@ packages: supports-color: optional: true - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} @@ -453,13 +584,9 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - diff@5.2.2: - resolution: {integrity: sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==} - engines: {node: '>=0.3.1'} - - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} domexception@4.0.0: resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} @@ -470,9 +597,6 @@ packages: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - entities@6.0.1: resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} engines: {node: '>=0.12'} @@ -485,6 +609,9 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + es-object-atoms@1.1.2: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} @@ -493,10 +620,6 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -506,23 +629,32 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.5: + resolution: {integrity: sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -544,10 +676,17 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -557,28 +696,26 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fastq@1.20.3: - resolution: {integrity: sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==} - - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.4.4: resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} @@ -587,9 +724,6 @@ packages: resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} engines: {node: '>= 6'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -598,10 +732,6 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - get-intrinsic@1.3.0: resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} engines: {node: '>= 0.4'} @@ -610,34 +740,22 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - - glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} + globals@17.14.0: + resolution: {integrity: sha512-UtdkTVyAJePQv0J2M9Xe4L0ruNSDV314XiIJsADI2Zf40bcdAonE/D/OhAU8AT99oij9mhLByb+NvA3QWZYgCg==} + engines: {node: '>=18'} gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -654,10 +772,6 @@ packages: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - html-encoding-sniffer@3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -686,21 +800,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - internmap@2.0.3: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - is-core-module@2.17.0: resolution: {integrity: sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==} engines: {node: '>= 0.4'} @@ -709,10 +812,6 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -720,25 +819,9 @@ packages: is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -771,6 +854,80 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -778,9 +935,8 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} @@ -797,30 +953,23 @@ packages: minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} - minimatch@5.1.9: - resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} - engines: {node: '>=10'} - - mocha@10.8.2: - resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} - engines: {node: '>= 14.0.0'} - hasBin: true - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - nwsapi@2.2.28: resolution: {integrity: sha512-IlVB7OS7qrOsVYlpnFIkETjMwT9jwvmocJmmM+GZU/PAB3uGi9Ezd7vcWhWBUnSc0ya4ppmQITOyP1ez9gg8cg==} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + obug@2.2.1: + resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + engines: {node: '>=12.20.0'} optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} @@ -845,10 +994,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -856,14 +1001,20 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - picomatch@2.3.2: - resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} - engines: {node: '>=8.6'} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} picomatch@4.0.7: resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} + postcss@8.5.32: + resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==} + engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -878,20 +1029,6 @@ packages: querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -904,13 +1041,9 @@ packages: engines: {node: '>= 0.4'} hasBin: true - reusify@1.1.0: - resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported + rolldown@1.2.16: + resolution: {integrity: sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true rollup@4.67.4: @@ -921,15 +1054,9 @@ packages: rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - rw@1.3.3: resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -937,9 +1064,6 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - serialize-javascript@7.1.4: resolution: {integrity: sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==} engines: {node: '>=20.0.0'} @@ -952,10 +1076,17 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + smob@1.6.2: resolution: {integrity: sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==} engines: {node: '>=20.0.0'} + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} @@ -963,13 +1094,11 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} @@ -979,10 +1108,6 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -995,12 +1120,20 @@ packages: engines: {node: '>=10'} hasBin: true - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinyrainbow@3.2.0: + resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==} + engines: {node: '>=14.0.0'} tough-cookie@4.1.4: resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} @@ -1014,10 +1147,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -1028,6 +1157,90 @@ packages: url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + vite@8.3.5: + resolution: {integrity: sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@4.1.12: + resolution: {integrity: sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.12 + '@vitest/browser-preview': 4.1.12 + '@vitest/browser-webdriverio': ^4.1.11 + '@vitest/coverage-istanbul': 4.1.12 + '@vitest/coverage-v8': 4.1.12 + '@vitest/ui': 4.1.12 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + w3c-xmlserializer@4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} @@ -1054,20 +1267,15 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - workerpool@6.5.1: - resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.22.1: resolution: {integrity: sha512-oyL6OPYme/CmiFvNuGzeoxCJ4nOrZE2O1FwM9MWM1AsGri6nLXB2pg+lNA8aLeXMSav0J6eIVS1j6vUPzUtK9g==} engines: {node: '>=10.0.0'} @@ -1087,41 +1295,41 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@16.2.2: - resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==} - engines: {node: '>=10'} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} snapshots: - '@eslint-community/eslint-utils@4.10.1(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': dependencies: - eslint: 8.57.1 + eslint: 9.39.5 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} - '@eslint/eslintrc@2.1.4': + '@eslint/config-array@0.21.2': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3 + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7': dependencies: ajv: 6.15.0 - debug: 4.4.3(supports-color@8.1.1) - espree: 9.6.1 - globals: 13.24.0 + debug: 4.4.3 + espree: 10.4.0 + globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.1 js-yaml: 4.3.2 @@ -1130,19 +1338,30 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.1': {} + '@eslint/js@9.39.5': {} - '@humanwhocodes/config-array@0.13.0': + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.3(supports-color@8.1.1) - minimatch: 3.1.5 - transitivePeerDependencies: - - supports-color + '@eslint/core': 0.17.0 + levn: 0.4.1 + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.4.3': {} '@jridgewell/gen-mapping@0.3.13': dependencies: @@ -1166,17 +1385,54 @@ snapshots: '@napi-rs/lzma-linux-x64-gnu@1.5.1': optional: true - '@nodelib/fs.scandir@2.1.5': - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 + '@oxc-project/types@0.156.0': {} - '@nodelib/fs.stat@2.0.5': {} + '@rolldown/binding-android-arm-eabi@1.2.16': + optional: true - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.20.3 + '@rolldown/binding-android-arm64@1.2.16': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.16': + optional: true + + '@rolldown/binding-darwin-x64@1.2.16': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.16': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.16': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.16': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.16': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.16': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.16': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.16': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.16': + optional: true + + '@rolldown/pluginutils@1.0.1': {} '@rollup/plugin-node-resolve@16.0.3(rollup@4.67.4)': dependencies: @@ -1282,13 +1538,63 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.67.4': optional: true + '@standard-schema/spec@1.1.0': {} + '@tootallnate/once@2.0.1': {} + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.10': {} + '@types/json-schema@7.0.15': {} + '@types/resolve@1.20.2': {} - '@ungap/structured-clone@1.4.0': {} + '@vitest/expect@4.1.12': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 + chai: 6.3.0 + tinyrainbow: 3.2.0 + + '@vitest/mocker@4.1.12(vite@8.3.5(terser@5.51.2))': + dependencies: + '@vitest/spy': 4.1.12 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 8.3.5(terser@5.51.2) + + '@vitest/pretty-format@4.1.12': + dependencies: + tinyrainbow: 3.2.0 + + '@vitest/runner@4.1.12': + dependencies: + '@vitest/utils': 4.1.12 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.12': + dependencies: + '@vitest/pretty-format': 4.1.12 + '@vitest/utils': 4.1.12 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.12': {} + + '@vitest/utils@4.1.12': + dependencies: + '@vitest/pretty-format': 4.1.12 + convert-source-map: 2.0.0 + tinyrainbow: 3.2.0 abab@2.0.6: {} @@ -1309,7 +1615,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -1320,42 +1626,23 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-colors@4.1.3: {} - - ansi-regex@5.0.1: {} - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.2 - argparse@2.0.1: {} + assertion-error@2.0.1: {} + asynckit@0.4.0: {} balanced-match@1.0.2: {} - binary-extensions@2.3.0: {} - brace-expansion@1.1.21: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - brace-expansion@2.1.7: - dependencies: - balanced-match: 1.0.2 - - braces@3.0.3: - dependencies: - fill-range: 7.1.1 - - browser-stdout@1.3.1: {} - buffer-from@1.1.2: {} call-bind-apply-helpers@1.0.2: @@ -1365,31 +1652,13 @@ snapshots: callsites@3.1.0: {} - camelcase@6.3.0: {} + chai@6.3.0: {} chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - chokidar@3.6.0: - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - - cliui@7.0.4: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -1406,6 +1675,8 @@ snapshots: concat-map@0.0.1: {} + convert-source-map@2.0.0: {} + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -1430,13 +1701,9 @@ snapshots: whatwg-mimetype: 3.0.0 whatwg-url: 12.0.1 - debug@4.4.3(supports-color@8.1.1): + debug@4.4.3: dependencies: ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@4.0.0: {} decimal.js@10.6.0: {} @@ -1446,11 +1713,7 @@ snapshots: delayed-stream@1.0.0: {} - diff@5.2.2: {} - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 + detect-libc@2.1.2: {} domexception@4.0.0: dependencies: @@ -1462,14 +1725,14 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 - emoji-regex@8.0.0: {} - entities@6.0.1: {} es-define-property@1.0.1: {} es-errors@1.3.0: {} + es-module-lexer@2.3.2: {} + es-object-atoms@1.1.2: dependencies: es-errors: 1.3.0 @@ -1481,8 +1744,6 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.4 - escalade@3.2.0: {} - escape-string-regexp@4.0.0: {} escodegen@2.1.0: @@ -1493,61 +1754,59 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-scope@7.2.2: + eslint-scope@8.4.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint@8.57.1: + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.5: dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.5) '@eslint-community/regexpp': 4.12.2 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 + '@eslint/config-array': 0.21.2 + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7 + '@eslint/js': 9.39.5 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.4.0 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.10 ajv: 6.15.0 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@8.1.1) - doctrine: 3.0.0 + debug: 4.4.3 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 esquery: 1.7.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.3.2 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.5 natural-compare: 1.4.0 optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 transitivePeerDependencies: - supports-color - espree@9.6.1: + espree@10.4.0: dependencies: acorn: 8.19.0 acorn-jsx: 5.3.2(acorn@8.19.0) - eslint-visitor-keys: 3.4.3 + eslint-visitor-keys: 4.2.1 esprima@4.0.1: {} @@ -1563,38 +1822,37 @@ snapshots: estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.10 + esutils@2.0.3: {} + expect-type@1.4.0: {} + fast-deep-equal@3.1.3: {} fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} - fastq@1.20.3: - dependencies: - reusify: 1.1.0 - - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 - fill-range@7.1.1: + file-entry-cache@8.0.0: dependencies: - to-regex-range: 5.0.1 + flat-cache: 4.0.1 find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.4.4 keyv: 4.5.4 - rimraf: 3.0.2 - - flat@5.0.2: {} flatted@3.4.4: {} @@ -1606,15 +1864,11 @@ snapshots: hasown: 2.0.4 mime-types: 2.1.35 - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true function-bind@1.1.2: {} - get-caller-file@2.0.5: {} - get-intrinsic@1.3.0: dependencies: call-bind-apply-helpers: 1.0.2 @@ -1633,39 +1887,16 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.2 - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - glob-parent@6.0.2: dependencies: is-glob: 4.0.3 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.5 - once: 1.4.0 - path-is-absolute: 1.0.1 - - glob@8.1.0: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.9 - once: 1.4.0 + globals@14.0.0: {} - globals@13.24.0: - dependencies: - type-fest: 0.20.2 + globals@17.14.0: {} gopd@1.2.0: {} - graphemer@1.4.0: {} - has-flag@4.0.0: {} has-symbols@1.1.0: {} @@ -1678,8 +1909,6 @@ snapshots: dependencies: function-bind: 1.1.2 - he@1.2.0: {} - html-encoding-sniffer@3.0.0: dependencies: whatwg-encoding: 2.0.0 @@ -1688,14 +1917,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.1 agent-base: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -1712,43 +1941,22 @@ snapshots: imurmurhash@0.1.4: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - internmap@2.0.3: {} - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 - is-core-module@2.17.0: dependencies: hasown: 2.0.4 is-extglob@2.1.1: {} - is-fullwidth-code-point@3.0.0: {} - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 is-module@1.0.0: {} - is-number@7.0.0: {} - - is-path-inside@3.0.3: {} - - is-plain-obj@2.1.0: {} - is-potential-custom-element-name@1.0.1: {} - is-unicode-supported@0.1.0: {} - isexe@2.0.0: {} js-yaml@4.3.2: @@ -1803,16 +2011,64 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + locate-path@6.0.0: dependencies: p-locate: 5.0.0 lodash.merge@4.6.2: {} - log-symbols@4.1.0: + magic-string@0.30.21: dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 + '@jridgewell/sourcemap-codec': 1.6.0 math-intrinsics@1.1.0: {} @@ -1826,44 +2082,15 @@ snapshots: dependencies: brace-expansion: 1.1.21 - minimatch@5.1.9: - dependencies: - brace-expansion: 2.1.7 - - mocha@10.8.2: - dependencies: - ansi-colors: 4.1.3 - browser-stdout: 1.3.1 - chokidar: 3.6.0 - debug: 4.4.3(supports-color@8.1.1) - diff: 5.2.2 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 8.1.0 - he: 1.2.0 - js-yaml: 4.3.2 - log-symbols: 4.1.0 - minimatch: 5.1.9 - ms: 2.1.3 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.5.1 - yargs: 16.2.2 - yargs-parser: 20.2.9 - yargs-unparser: 2.0.0 - ms@2.1.3: {} - natural-compare@1.4.0: {} + nanoid@3.3.20: {} - normalize-path@3.0.0: {} + natural-compare@1.4.0: {} nwsapi@2.2.28: {} - once@1.4.0: - dependencies: - wrappy: 1.0.2 + obug@2.2.1: {} optionator@0.9.4: dependencies: @@ -1892,16 +2119,22 @@ snapshots: path-exists@4.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-parse@1.0.7: {} - picomatch@2.3.2: {} + pathe@2.0.3: {} + + picocolors@1.1.1: {} picomatch@4.0.7: {} + postcss@8.5.32: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + prelude-ls@1.2.1: {} psl@1.15.0: @@ -1912,18 +2145,6 @@ snapshots: querystringify@2.2.0: {} - queue-microtask@1.2.3: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - readdirp@3.6.0: - dependencies: - picomatch: 2.3.2 - - require-directory@2.1.1: {} - requires-port@1.0.0: {} resolve-from@4.0.0: {} @@ -1935,11 +2156,26 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - reusify@1.1.0: {} - - rimraf@3.0.2: + rolldown@1.2.16: dependencies: - glob: 7.2.3 + '@oxc-project/types': 0.156.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.2.16 + '@rolldown/binding-android-arm64': 1.2.16 + '@rolldown/binding-darwin-arm64': 1.2.16 + '@rolldown/binding-darwin-x64': 1.2.16 + '@rolldown/binding-freebsd-x64': 1.2.16 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.16 + '@rolldown/binding-linux-arm64-gnu': 1.2.16 + '@rolldown/binding-linux-arm64-musl': 1.2.16 + '@rolldown/binding-linux-ppc64-gnu': 1.2.16 + '@rolldown/binding-linux-s390x-gnu': 1.2.16 + '@rolldown/binding-linux-x64-gnu': 1.2.16 + '@rolldown/binding-linux-x64-musl': 1.2.16 + '@rolldown/binding-openharmony-arm64': 1.2.16 + '@rolldown/binding-win32-arm64-msvc': 1.2.16 + '@rolldown/binding-win32-x64-msvc': 1.2.16 rollup@4.67.4: dependencies: @@ -1976,24 +2212,14 @@ snapshots: rrweb-cssom@0.6.0: {} - run-parallel@1.2.0: - dependencies: - queue-microtask: 1.2.3 - rw@1.3.3: {} - safe-buffer@5.2.1: {} - safer-buffer@2.1.2: {} saxes@6.0.0: dependencies: xmlchars: 2.2.0 - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - serialize-javascript@7.1.4: {} shebang-command@2.0.0: @@ -2002,8 +2228,12 @@ snapshots: shebang-regex@3.0.0: {} + siginfo@2.0.0: {} + smob@1.6.2: {} + source-map-js@1.2.2: {} + source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 @@ -2011,15 +2241,9 @@ snapshots: source-map@0.6.1: {} - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 + stackback@0.0.2: {} - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 + std-env@4.3.0: {} strip-json-comments@3.1.1: {} @@ -2027,10 +2251,6 @@ snapshots: dependencies: has-flag: 4.0.0 - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - supports-preserve-symlinks-flag@1.0.0: {} symbol-tree@3.2.4: {} @@ -2042,11 +2262,16 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - text-table@0.2.0: {} + tinybench@2.9.0: {} + + tinyexec@1.3.1: {} - to-regex-range@5.0.1: + tinyglobby@0.2.17: dependencies: - is-number: 7.0.0 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + tinyrainbow@3.2.0: {} tough-cookie@4.1.4: dependencies: @@ -2063,8 +2288,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-fest@0.20.2: {} - universalify@0.2.0: {} uri-js@4.4.1: @@ -2076,6 +2299,44 @@ snapshots: querystringify: 2.2.0 requires-port: 1.0.0 + vite@8.3.5(terser@5.51.2): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.32 + rolldown: 1.2.16 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + terser: 5.51.2 + + vitest@4.1.12(jsdom@21.1.2)(vite@8.3.5(terser@5.51.2)): + dependencies: + '@vitest/expect': 4.1.12 + '@vitest/mocker': 4.1.12(vite@8.3.5(terser@5.51.2)) + '@vitest/pretty-format': 4.1.12 + '@vitest/runner': 4.1.12 + '@vitest/snapshot': 4.1.12 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.2.1 + pathe: 2.0.3 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 2.9.0 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + tinyrainbow: 3.2.0 + vite: 8.3.5(terser@5.51.2) + why-is-node-running: 2.3.0 + optionalDependencies: + jsdom: 21.1.2 + transitivePeerDependencies: + - msw + w3c-xmlserializer@4.0.0: dependencies: xml-name-validator: 4.0.0 @@ -2097,17 +2358,12 @@ snapshots: dependencies: isexe: 2.0.0 - word-wrap@1.2.5: {} - - workerpool@6.5.1: {} - - wrap-ansi@7.0.0: + why-is-node-running@2.3.0: dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 + siginfo: 2.0.0 + stackback: 0.0.2 - wrappy@1.0.2: {} + word-wrap@1.2.5: {} ws@8.22.1: {} @@ -2115,25 +2371,4 @@ snapshots: xmlchars@2.2.0: {} - y18n@5.0.8: {} - - yargs-parser@20.2.9: {} - - yargs-unparser@2.0.0: - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - - yargs@16.2.2: - dependencies: - cliui: 7.0.4 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - yocto-queue@0.1.0: {} diff --git a/test/.eslintrc.json b/test/.eslintrc.json deleted file mode 100644 index 2be71407..00000000 --- a/test/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "eslint:recommended", - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 8 - }, - "env": { - "es6": true, - "mocha": true - }, - "rules": { - "no-sparse-arrays": 0 - } -} diff --git a/test/ascending-test.js b/test/ascending-test.js index e9e05e36..71a9bba7 100644 --- a/test/ascending-test.js +++ b/test/ascending-test.js @@ -1,24 +1,25 @@ +import {test} from "vitest"; import assert from "assert"; import {ascending} from "../src/index.js"; -it("ascending(a, b) returns a negative number if a < b", () => { +test("ascending(a, b) returns a negative number if a < b", () => { assert(ascending(0, 1) < 0); assert(ascending("a", "b") < 0); }); -it("ascending(a, b) returns a positive number if a > b", () => { +test("ascending(a, b) returns a positive number if a > b", () => { assert(ascending(1, 0) > 0); assert(ascending("b", "a") > 0); }); -it("ascending(a, b) returns zero if a >= b and a <= b", () => { +test("ascending(a, b) returns zero if a >= b and a <= b", () => { assert.strictEqual(ascending(0, 0), 0); assert.strictEqual(ascending("a", "a"), 0); assert.strictEqual(ascending("0", 0), 0); assert.strictEqual(ascending(0, "0"), 0); }); -it("ascending(a, b) returns NaN if a and b are not comparable", () => { +test("ascending(a, b) returns NaN if a and b are not comparable", () => { assert(isNaN(ascending(0, undefined))); assert(isNaN(ascending(undefined, 0))); assert(isNaN(ascending(undefined, undefined))); diff --git a/test/bin-test.js b/test/bin-test.js index e6453b2d..d703cace 100644 --- a/test/bin-test.js +++ b/test/bin-test.js @@ -1,20 +1,21 @@ +import {test} from "vitest"; import assert from "assert"; import {csvParse} from "d3-dsv"; import {readFile} from "fs/promises"; import {bin, extent, histogram, thresholdSturges, ticks} from "../src/index.js"; -it("histogram is a deprecated alias for bin", () => { +test("histogram is a deprecated alias for bin", () => { assert.strictEqual(histogram, bin); }); -it("bin() returns a default bin generator", () => { +test("bin() returns a default bin generator", () => { const h = bin(); assert.strictEqual(h.value()(42), 42); assert.strictEqual(h.domain(), extent); assert.deepStrictEqual(h.thresholds(), thresholdSturges); }); -it("bin(data) computes bins of the specified array of data", () => { +test("bin(data) computes bins of the specified array of data", () => { const h = bin(); assert.deepStrictEqual(h([0, 0, 0, 10, 20, 20]), [ box([0, 0, 0], 0, 5), @@ -25,7 +26,7 @@ it("bin(data) computes bins of the specified array of data", () => { ]); }); -it("bin(iterable) is equivalent to bin(array)", () => { +test("bin(iterable) is equivalent to bin(array)", () => { const h = bin(); assert.deepStrictEqual(h(iterable([0, 0, 0, 10, 20, 20])), [ box([0, 0, 0], 0, 5), @@ -36,14 +37,14 @@ it("bin(iterable) is equivalent to bin(array)", () => { ]); }); -it("bin.value(number) sets the constant value", () => { +test("bin.value(number) sets the constant value", () => { const h = bin().value(12); // Pointless, but for consistency. assert.deepStrictEqual(h([0, 0, 0, 1, 2, 2]), [ box([0, 0, 0, 1, 2, 2], 12, 12), ]); }); -it("bin(data) does not bin null, undefined, or NaN", () => { +test("bin(data) does not bin null, undefined, or NaN", () => { const h = bin(); assert.deepStrictEqual(h([0, null, undefined, NaN, 10, 20, 20]), [ box([0], 0, 5), @@ -54,7 +55,7 @@ it("bin(data) does not bin null, undefined, or NaN", () => { ]); }); -it("bin.value(function) sets the value accessor", () => { +test("bin.value(function) sets the value accessor", () => { const h = bin().value((d) => d.value); const a = {value: 0}; const b = {value: 10}; @@ -68,7 +69,7 @@ it("bin.value(function) sets the value accessor", () => { ]); }); -it("bin.domain(array) sets the domain", () => { +test("bin.domain(array) sets the domain", () => { const h = bin().domain([0, 20]); assert.deepStrictEqual(h.domain()(), [0, 20]); assert.deepStrictEqual(h([1, 2, 2, 10, 18, 18]), [ @@ -79,7 +80,7 @@ it("bin.domain(array) sets the domain", () => { ]); }); -it("bin.domain(function) sets the domain accessor", () => { +test("bin.domain(function) sets the domain accessor", () => { let actual; const values = [1, 2, 2, 10, 18, 18]; const domain = (values) => { actual = values; return [0, 20]; }; @@ -94,7 +95,7 @@ it("bin.domain(function) sets the domain accessor", () => { assert.deepStrictEqual(actual, values); }); -it("bin.thresholds(number) sets the approximate number of bin thresholds", () => { +test("bin.thresholds(number) sets the approximate number of bin thresholds", () => { const h = bin().thresholds(3); assert.deepStrictEqual(h([0, 0, 0, 10, 30, 30]), [ box([0, 0, 0], 0, 10), @@ -104,7 +105,7 @@ it("bin.thresholds(number) sets the approximate number of bin thresholds", () => ]); }); -it("bin.thresholds(array) sets the bin thresholds", () => { +test("bin.thresholds(array) sets the bin thresholds", () => { const h = bin().thresholds([10, 20]); assert.deepStrictEqual(h([0, 0, 0, 10, 30, 30]), [ box([0, 0, 0], 0, 10), @@ -113,7 +114,7 @@ it("bin.thresholds(array) sets the bin thresholds", () => { ]); }); -it("bin.thresholds(array) ignores thresholds outside the domain", () => { +test("bin.thresholds(array) ignores thresholds outside the domain", () => { const h = bin().thresholds([0, 1, 2, 3, 4]); assert.deepStrictEqual(h([0, 1, 2, 3]), [ box([0], 0, 1), @@ -123,7 +124,7 @@ it("bin.thresholds(array) ignores thresholds outside the domain", () => { ]); }); -it("bin.thresholds(function) sets the bin thresholds accessor", () => { +test("bin.thresholds(function) sets the bin thresholds accessor", () => { let actual; const values = [0, 0, 0, 10, 30, 30]; const h = bin().thresholds((values, x0, x1) => { actual = [values, x0, x1]; return [10, 20]; }); @@ -144,7 +145,7 @@ it("bin.thresholds(function) sets the bin thresholds accessor", () => { ]); }); -it("bin(data) uses nice thresholds", () => { +test("bin(data) uses nice thresholds", () => { const h = bin().domain([0, 1]).thresholds(5); assert.deepStrictEqual(h([]).map(b => [b.x0, b.x1]), [ [0.0, 0.2], @@ -155,7 +156,7 @@ it("bin(data) uses nice thresholds", () => { ]); }); -it("bin()() returns bins whose rightmost bin is not too wide", () => { +test("bin()() returns bins whose rightmost bin is not too wide", () => { const h = bin(); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9, 10), @@ -166,7 +167,7 @@ it("bin()() returns bins whose rightmost bin is not too wide", () => { ]); }); -it("bin(data) handles fractional step correctly", () => { +test("bin(data) handles fractional step correctly", () => { const h = bin().thresholds(10); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9.5, 10), @@ -180,7 +181,7 @@ it("bin(data) handles fractional step correctly", () => { ]); }); -it("bin(data) handles fractional step correctly with a custom, non-aligned domain", () => { +test("bin(data) handles fractional step correctly with a custom, non-aligned domain", () => { const h = bin().thresholds(10).domain([9.7, 13.3]); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9.7, 10), @@ -194,7 +195,7 @@ it("bin(data) handles fractional step correctly with a custom, non-aligned domai ]); }); -it("bin(data) handles fractional step correctly with a custom, aligned domain", () => { +test("bin(data) handles fractional step correctly with a custom, aligned domain", () => { const h = bin().thresholds(10).domain([9.5, 13.5]); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9.5, 10), @@ -208,7 +209,7 @@ it("bin(data) handles fractional step correctly with a custom, aligned domain", ]); }); -it("bin(data) coerces values to numbers as expected", () => { +test("bin(data) coerces values to numbers as expected", () => { const h = bin().thresholds(10); assert.deepStrictEqual(h(["1", "2", "3", "4", "5"]), [ box(["1"], 1, 1.5), @@ -223,25 +224,25 @@ it("bin(data) coerces values to numbers as expected", () => { ]); }); -it("bin(athletes) produces the expected result", async () => { +test("bin(athletes) produces the expected result", async () => { const height = csvParse(await readFile("./test/data/athletes.csv", "utf8")).filter(d => d.height).map(d => +d.height); const bins = bin().thresholds(57)(height); assert.deepStrictEqual(bins.map(b => b.length), [1, 0, 0, 0, 0, 0, 2, 1, 2, 1, 1, 4, 11, 7, 13, 39, 78, 93, 119, 193, 354, 393, 573, 483, 651, 834, 808, 763, 627, 648, 833, 672, 578, 498, 395, 425, 278, 235, 182, 128, 91, 69, 43, 29, 21, 23, 3, 3, 1, 1, 1]); }); -it("bin(data) assigns floating point values to the correct bins", () => { +test("bin(data) assigns floating point values to the correct bins", () => { for (const n of [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000]) { assert.ok(bin().thresholds(n)(ticks(1, 2, n)).every(d => d.length === 1)); } }); -it("bin(data) assigns integer values to the correct bins", () => { +test("bin(data) assigns integer values to the correct bins", () => { assert.deepStrictEqual(bin().domain([4, 5])([5]), [box([5], 4, 5)]); const eights = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; assert.deepStrictEqual(bin().domain([3, 8])(eights), [box([], 3, 4), box([], 4, 5), box([], 5, 6), box([], 6, 7), box(eights, 7, 8)]); }); -it("bin(data) does not mutate user-supplied thresholds as an array", () => { +test("bin(data) does not mutate user-supplied thresholds as an array", () => { const thresholds = [3, 4, 5, 6]; const b = bin().domain([4, 5]).thresholds(thresholds); assert.deepStrictEqual(b([5]), [box([], 4, 5), box([5], 5, 5)]); @@ -249,7 +250,7 @@ it("bin(data) does not mutate user-supplied thresholds as an array", () => { assert.deepStrictEqual(b.thresholds()(), [3, 4, 5, 6]); }); -it("bin(data) does not mutate user-supplied thresholds as a function", () => { +test("bin(data) does not mutate user-supplied thresholds as a function", () => { const thresholds = [3, 4, 5, 6]; const b = bin().domain([4, 5]).thresholds(() => thresholds); assert.deepStrictEqual(b([5]), [box([], 4, 5), box([5], 5, 5)]); diff --git a/test/bisect-test.js b/test/bisect-test.js index cf45842b..e735ac5a 100644 --- a/test/bisect-test.js +++ b/test/bisect-test.js @@ -1,29 +1,30 @@ +import {test} from "vitest"; import assert from "assert"; import {bisect, bisectLeft, bisectRight} from "../src/index.js"; -it("bisect is an alias for bisectRight", () => { +test("bisect is an alias for bisectRight", () => { assert.strictEqual(bisect, bisectRight); }); -it("bisectLeft(array, value) returns the index of an exact match", () => { +test("bisectLeft(array, value) returns the index of an exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectLeft(numbers, 1), 0); assert.strictEqual(bisectLeft(numbers, 2), 1); assert.strictEqual(bisectLeft(numbers, 3), 2); }); -it("bisectLeft(array, value) returns the index of the first match", () => { +test("bisectLeft(array, value) returns the index of the first match", () => { const numbers = [1, 2, 2, 3]; assert.strictEqual(bisectLeft(numbers, 1), 0); assert.strictEqual(bisectLeft(numbers, 2), 1); assert.strictEqual(bisectLeft(numbers, 3), 3); }); -it("bisectLeft(empty, value) returns zero", () => { +test("bisectLeft(empty, value) returns zero", () => { assert.strictEqual(bisectLeft([], 1), 0); }); -it("bisectLeft(array, value) returns the insertion point of a non-exact match", () => { +test("bisectLeft(array, value) returns the insertion point of a non-exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectLeft(numbers, 0.5), 0); assert.strictEqual(bisectLeft(numbers, 1.5), 1); @@ -31,14 +32,14 @@ it("bisectLeft(array, value) returns the insertion point of a non-exact match", assert.strictEqual(bisectLeft(numbers, 3.5), 3); }); -it("bisectLeft(array, value) has undefined behavior if the search value is unorderable", () => { +test("bisectLeft(array, value) has undefined behavior if the search value is unorderable", () => { const numbers = [1, 2, 3]; bisectLeft(numbers, new Date(NaN)); // who knows what this will return! bisectLeft(numbers, undefined); bisectLeft(numbers, NaN); }); -it("bisectLeft(array, value, lo) observes the specified lower bound", () => { +test("bisectLeft(array, value, lo) observes the specified lower bound", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectLeft(numbers, 0, 2), 2); assert.strictEqual(bisectLeft(numbers, 1, 2), 2); @@ -49,7 +50,7 @@ it("bisectLeft(array, value, lo) observes the specified lower bound", () => { assert.strictEqual(bisectLeft(numbers, 6, 2), 5); }); -it("bisectLeft(array, value, lo, hi) observes the specified bounds", () => { +test("bisectLeft(array, value, lo, hi) observes the specified bounds", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectLeft(numbers, 0, 2, 3), 2); assert.strictEqual(bisectLeft(numbers, 1, 2, 3), 2); @@ -60,7 +61,7 @@ it("bisectLeft(array, value, lo, hi) observes the specified bounds", () => { assert.strictEqual(bisectLeft(numbers, 6, 2, 3), 3); }); -it("bisectLeft(array, value) handles large sparse d3", () => { +test("bisectLeft(array, value) handles large sparse d3", () => { const numbers = []; let i = 1 << 30; numbers[i++] = 1; @@ -77,25 +78,25 @@ it("bisectLeft(array, value) handles large sparse d3", () => { assert.strictEqual(bisectLeft(numbers, 6, i - 5, i), i - 0); }); -it("bisectRight(array, value) returns the index after an exact match", () => { +test("bisectRight(array, value) returns the index after an exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectRight(numbers, 1), 1); assert.strictEqual(bisectRight(numbers, 2), 2); assert.strictEqual(bisectRight(numbers, 3), 3); }); -it("bisectRight(array, value) returns the index after the last match", () => { +test("bisectRight(array, value) returns the index after the last match", () => { const numbers = [1, 2, 2, 3]; assert.strictEqual(bisectRight(numbers, 1), 1); assert.strictEqual(bisectRight(numbers, 2), 3); assert.strictEqual(bisectRight(numbers, 3), 4); }); -it("bisectRight(empty, value) returns zero", () => { +test("bisectRight(empty, value) returns zero", () => { assert.strictEqual(bisectRight([], 1), 0); }); -it("bisectRight(array, value) returns the insertion point of a non-exact match", () => { +test("bisectRight(array, value) returns the insertion point of a non-exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectRight(numbers, 0.5), 0); assert.strictEqual(bisectRight(numbers, 1.5), 1); @@ -103,7 +104,7 @@ it("bisectRight(array, value) returns the insertion point of a non-exact match", assert.strictEqual(bisectRight(numbers, 3.5), 3); }); -it("bisectRight(array, value, lo) observes the specified lower bound", () => { +test("bisectRight(array, value, lo) observes the specified lower bound", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectRight(numbers, 0, 2), 2); assert.strictEqual(bisectRight(numbers, 1, 2), 2); @@ -114,7 +115,7 @@ it("bisectRight(array, value, lo) observes the specified lower bound", () => { assert.strictEqual(bisectRight(numbers, 6, 2), 5); }); -it("bisectRight(array, value, lo, hi) observes the specified bounds", () => { +test("bisectRight(array, value, lo, hi) observes the specified bounds", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectRight(numbers, 0, 2, 3), 2); assert.strictEqual(bisectRight(numbers, 1, 2, 3), 2); @@ -125,7 +126,7 @@ it("bisectRight(array, value, lo, hi) observes the specified bounds", () => { assert.strictEqual(bisectRight(numbers, 6, 2, 3), 3); }); -it("bisectRight(array, value) handles large sparse d3", () => { +test("bisectRight(array, value) handles large sparse d3", () => { const numbers = []; let i = 1 << 30; numbers[i++] = 1; @@ -142,7 +143,7 @@ it("bisectRight(array, value) handles large sparse d3", () => { assert.strictEqual(bisectRight(numbers, 6, i - 5, i), i - 0); }); -it("bisectLeft(array, value, lo, hi) keeps non-comparable values to the right", () => { +test("bisectLeft(array, value, lo, hi) keeps non-comparable values to the right", () => { const values = [1, 2, null, undefined, NaN]; assert.strictEqual(bisectLeft(values, 1), 0); assert.strictEqual(bisectLeft(values, 2), 1); @@ -151,13 +152,13 @@ it("bisectLeft(array, value, lo, hi) keeps non-comparable values to the right", assert.strictEqual(bisectLeft(values, NaN), 5); }); -it("bisectLeft(array, value, lo, hi) keeps comparable values to the left", () => { +test("bisectLeft(array, value, lo, hi) keeps comparable values to the left", () => { const values = [null, undefined, NaN]; assert.strictEqual(bisectLeft(values, 1), 0); assert.strictEqual(bisectLeft(values, 2), 0); }); -it("bisectRight(array, value, lo, hi) keeps non-comparable values to the right", () => { +test("bisectRight(array, value, lo, hi) keeps non-comparable values to the right", () => { const values = [1, 2, null, undefined]; assert.strictEqual(bisectRight(values, 1), 1); assert.strictEqual(bisectRight(values, 2), 2); diff --git a/test/bisector-test.js b/test/bisector-test.js index a105a70a..7c723a14 100644 --- a/test/bisector-test.js +++ b/test/bisector-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {ascending, bisector} from "../src/index.js"; -it("bisector(comparator).left(array, value) returns the index of an exact match", () => { +test("bisector(comparator).left(array, value) returns the index of an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(1)), 0); @@ -9,7 +10,7 @@ it("bisector(comparator).left(array, value) returns the index of an exact match" assert.strictEqual(bisectLeft(boxes, box(3)), 2); }); -it("bisector(comparator).left(array, value) returns the index of the first match", () => { +test("bisector(comparator).left(array, value) returns the index of the first match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(1)), 0); @@ -17,11 +18,11 @@ it("bisector(comparator).left(array, value) returns the index of the first match assert.strictEqual(bisectLeft(boxes, box(3)), 3); }); -it("bisector(comparator).left(empty, value) returns zero", () => { +test("bisector(comparator).left(empty, value) returns zero", () => { assert.strictEqual(bisector(() => { throw new Error(); }).left([], 1), 0); }); -it("bisector(comparator).left(array, value) returns the insertion point of a non-exact match", () => { +test("bisector(comparator).left(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(0.5)), 0); @@ -30,7 +31,7 @@ it("bisector(comparator).left(array, value) returns the insertion point of a non assert.strictEqual(bisectLeft(boxes, box(3.5)), 3); }); -it("bisector(comparator).left(array, value) has undefined behavior if the search value is unorderable", () => { +test("bisector(comparator).left(array, value) has undefined behavior if the search value is unorderable", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; bisectLeft(boxes, box(new Date(NaN))); // who knows what this will return! @@ -38,7 +39,7 @@ it("bisector(comparator).left(array, value) has undefined behavior if the search bisectLeft(boxes, box(NaN)); }); -it("bisector(comparator).left(array, value, lo) observes the specified lower bound", () => { +test("bisector(comparator).left(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(0), 2), 2); @@ -50,7 +51,7 @@ it("bisector(comparator).left(array, value, lo) observes the specified lower bou assert.strictEqual(bisectLeft(boxes, box(6), 2), 5); }); -it("bisector(comparator).left(array, value, lo, hi) observes the specified bounds", () => { +test("bisector(comparator).left(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(0), 2, 3), 2); @@ -62,7 +63,7 @@ it("bisector(comparator).left(array, value, lo, hi) observes the specified bound assert.strictEqual(bisectLeft(boxes, box(6), 2, 3), 3); }); -it("bisector(comparator).left(array, value) handles large sparse d3", () => { +test("bisector(comparator).left(array, value) handles large sparse d3", () => { const boxes = []; const bisectLeft = bisector(ascendingBox).left; let i = 1 << 30; @@ -80,7 +81,7 @@ it("bisector(comparator).left(array, value) handles large sparse d3", () => { assert.strictEqual(bisectLeft(boxes, box(6), i - 5, i), i - 0); }); -it("bisector(comparator).right(array, value) returns the index after an exact match", () => { +test("bisector(comparator).right(array, value) returns the index after an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(1)), 1); @@ -88,7 +89,7 @@ it("bisector(comparator).right(array, value) returns the index after an exact ma assert.strictEqual(bisectRight(boxes, box(3)), 3); }); -it("bisector(comparator).right(array, value) returns the index after the last match", () => { +test("bisector(comparator).right(array, value) returns the index after the last match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(1)), 1); @@ -96,11 +97,11 @@ it("bisector(comparator).right(array, value) returns the index after the last ma assert.strictEqual(bisectRight(boxes, box(3)), 4); }); -it("bisector(comparator).right(empty, value) returns zero", () => { +test("bisector(comparator).right(empty, value) returns zero", () => { assert.strictEqual(bisector(() => { throw new Error(); }).right([], 1), 0); }); -it("bisector(comparator).right(array, value) returns the insertion point of a non-exact match", () => { +test("bisector(comparator).right(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(0.5)), 0); @@ -109,7 +110,7 @@ it("bisector(comparator).right(array, value) returns the insertion point of a no assert.strictEqual(bisectRight(boxes, box(3.5)), 3); }); -it("bisector(comparator).right(array, value, lo) observes the specified lower bound", () => { +test("bisector(comparator).right(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(0), 2), 2); @@ -121,7 +122,7 @@ it("bisector(comparator).right(array, value, lo) observes the specified lower bo assert.strictEqual(bisectRight(boxes, box(6), 2), 5); }); -it("bisector(comparator).right(array, value, lo, hi) observes the specified bounds", () => { +test("bisector(comparator).right(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(0), 2, 3), 2); @@ -133,7 +134,7 @@ it("bisector(comparator).right(array, value, lo, hi) observes the specified boun assert.strictEqual(bisectRight(boxes, box(6), 2, 3), 3); }); -it("bisector(comparator).right(array, value) handles large sparse d3", () => { +test("bisector(comparator).right(array, value) handles large sparse d3", () => { const boxes = []; const bisectRight = bisector(ascendingBox).right; let i = 1 << 30; @@ -151,7 +152,7 @@ it("bisector(comparator).right(array, value) handles large sparse d3", () => { assert.strictEqual(bisectRight(boxes, box(6), i - 5, i), i - 0); }); -it("bisector(comparator).left(array, value) supports an asymmetric (object, value) comparator", () => { +test("bisector(comparator).left(array, value) supports an asymmetric (object, value) comparator", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBoxValue).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -162,7 +163,7 @@ it("bisector(comparator).left(array, value) supports an asymmetric (object, valu // This is not possible because the bisector has no way of knowing whether the // given comparator is symmetric or asymmetric, and if the comparator is // asymmetric it cannot be used to test the search value for orderability. -it.skip("bisector(comparator).left(array, value) keeps non-comparable values to the right", () => { +test.skip("bisector(comparator).left(array, value) keeps non-comparable values to the right", () => { const boxes = [1, 2, null, undefined, NaN].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(1)), 0); @@ -172,7 +173,7 @@ it.skip("bisector(comparator).left(array, value) keeps non-comparable values to assert.strictEqual(bisectLeft(boxes, box(NaN)), 5); }); -it("bisector(accessor).left(array, value) keeps non-comparable values to the right", () => { +test("bisector(accessor).left(array, value) keeps non-comparable values to the right", () => { const boxes = [1, 2, null, undefined, NaN].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -182,7 +183,7 @@ it("bisector(accessor).left(array, value) keeps non-comparable values to the rig assert.strictEqual(bisectLeft(boxes, NaN), 5); }); -it("bisector(accessor).left(array, value) returns the index of an exact match", () => { +test("bisector(accessor).left(array, value) returns the index of an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -190,7 +191,7 @@ it("bisector(accessor).left(array, value) returns the index of an exact match", assert.strictEqual(bisectLeft(boxes, 3), 2); }); -it("bisector(accessor).left(array, value) returns the index of the first match", () => { +test("bisector(accessor).left(array, value) returns the index of the first match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -198,7 +199,7 @@ it("bisector(accessor).left(array, value) returns the index of the first match", assert.strictEqual(bisectLeft(boxes, 3), 3); }); -it("bisector(accessor).left(array, value) returns the insertion point of a non-exact match", () => { +test("bisector(accessor).left(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 0.5), 0); @@ -207,7 +208,7 @@ it("bisector(accessor).left(array, value) returns the insertion point of a non-e assert.strictEqual(bisectLeft(boxes, 3.5), 3); }); -it("bisector(accessor).left(array, value) has undefined behavior if the search value is unorderable", () => { +test("bisector(accessor).left(array, value) has undefined behavior if the search value is unorderable", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(unbox).left; bisectLeft(boxes, new Date(NaN)); // who knows what this will return! @@ -215,7 +216,7 @@ it("bisector(accessor).left(array, value) has undefined behavior if the search v bisectLeft(boxes, NaN); }); -it("bisector(accessor).left(array, value, lo) observes the specified lower bound", () => { +test("bisector(accessor).left(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 0, 2), 2); @@ -227,7 +228,7 @@ it("bisector(accessor).left(array, value, lo) observes the specified lower bound assert.strictEqual(bisectLeft(boxes, 6, 2), 5); }); -it("bisector(accessor).left(array, value, lo, hi) observes the specified bounds", () => { +test("bisector(accessor).left(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 0, 2, 3), 2); @@ -239,7 +240,7 @@ it("bisector(accessor).left(array, value, lo, hi) observes the specified bounds" assert.strictEqual(bisectLeft(boxes, 6, 2, 3), 3); }); -it("bisector(accessor).left(array, value) handles large sparse d3", () => { +test("bisector(accessor).left(array, value) handles large sparse d3", () => { const boxes = []; const bisectLeft = bisector(unbox).left; let i = 1 << 30; @@ -257,7 +258,7 @@ it("bisector(accessor).left(array, value) handles large sparse d3", () => { assert.strictEqual(bisectLeft(boxes, 6, i - 5, i), i - 0); }); -it("bisector(accessor).right(array, value) returns the index after an exact match", () => { +test("bisector(accessor).right(array, value) returns the index after an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 1), 1); @@ -265,7 +266,7 @@ it("bisector(accessor).right(array, value) returns the index after an exact matc assert.strictEqual(bisectRight(boxes, 3), 3); }); -it("bisector(accessor).right(array, value) returns the index after the last match", () => { +test("bisector(accessor).right(array, value) returns the index after the last match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 1), 1); @@ -273,7 +274,7 @@ it("bisector(accessor).right(array, value) returns the index after the last matc assert.strictEqual(bisectRight(boxes, 3), 4); }); -it("bisector(accessor).right(array, value) returns the insertion point of a non-exact match", () => { +test("bisector(accessor).right(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 0.5), 0); @@ -282,7 +283,7 @@ it("bisector(accessor).right(array, value) returns the insertion point of a non- assert.strictEqual(bisectRight(boxes, 3.5), 3); }); -it("bisector(accessor).right(array, value, lo) observes the specified lower bound", () => { +test("bisector(accessor).right(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 0, 2), 2); @@ -294,7 +295,7 @@ it("bisector(accessor).right(array, value, lo) observes the specified lower boun assert.strictEqual(bisectRight(boxes, 6, 2), 5); }); -it("bisector(accessor).right(array, value, lo, hi) observes the specified bounds", () => { +test("bisector(accessor).right(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 0, 2, 3), 2); @@ -306,7 +307,7 @@ it("bisector(accessor).right(array, value, lo, hi) observes the specified bounds assert.strictEqual(bisectRight(boxes, 6, 2, 3), 3); }); -it("bisector(accessor).right(array, value) handles large sparse d3", () => { +test("bisector(accessor).right(array, value) handles large sparse d3", () => { const boxes = []; const bisectRight = bisector(unbox).right; let i = 1 << 30; @@ -324,7 +325,7 @@ it("bisector(accessor).right(array, value) handles large sparse d3", () => { assert.strictEqual(bisectRight(boxes, 6, i - 5, i), i - 0); }); -it("bisector(accessor).center(array, value) returns the closest index", () => { +test("bisector(accessor).center(array, value) returns the closest index", () => { const data = [0, 1, 2, 3, 4]; const bisectCenter = bisector(d => +d).center; assert.strictEqual(bisectCenter(data, 2), 2); @@ -335,7 +336,7 @@ it("bisector(accessor).center(array, value) returns the closest index", () => { assert.strictEqual(bisectCenter(data, 4.5), 4); }); -it("bisector(comparator).center(array, value) returns the closest index", () => { +test("bisector(comparator).center(array, value) returns the closest index", () => { const data = [0, 1, 2, 3, 4]; const bisectCenter = bisector((d, x) => +d - x).center; assert.strictEqual(bisectCenter(data, 2), 2); @@ -344,11 +345,11 @@ it("bisector(comparator).center(array, value) returns the closest index", () => assert.strictEqual(bisectCenter(data, 3), 3); }); -it("bisector(comparator).center(empty, value) returns zero", () => { +test("bisector(comparator).center(empty, value) returns zero", () => { assert.strictEqual(bisector(() => { throw new Error(); }).center([], 1), 0); }); -it("bisector(ascending).center(array, value) returns the left value", () => { +test("bisector(ascending).center(array, value) returns the left value", () => { const data = [0, 1, 2, 3, 4]; const bisectCenter = bisector(ascending).center; assert.strictEqual(bisectCenter(data, 2.0), 2); @@ -357,7 +358,7 @@ it("bisector(ascending).center(array, value) returns the left value", () => { assert.strictEqual(bisectCenter(data, 3.0), 3); }); -it("bisector(ordinalAccessor).center(array, value) returns the left value", () => { +test("bisector(ordinalAccessor).center(array, value) returns the left value", () => { const data = ["aa", "bb", "cc", "dd", "ee"]; const bisectCenter = bisector(d => d).center; assert.strictEqual(bisectCenter(data, "cc"), 2); diff --git a/test/blur-test.js b/test/blur-test.js index 014757a4..f9086e45 100644 --- a/test/blur-test.js +++ b/test/blur-test.js @@ -1,34 +1,35 @@ +import {test} from "vitest"; import assert from "assert"; import {blur, blur2} from "../src/index.js"; -it("blur(values, r) returns values", () => { +test("blur(values, r) returns values", () => { const V = [0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0]; assert.strictEqual(blur(V, 1), V); assert.deepStrictEqual(V, [0, 0, 0, 1, 3, 6, 7, 6, 3, 1, 0, 0, 0, 0]); }); -it("blur(values, r) observes the expected integer radius r", () => { +test("blur(values, r) observes the expected integer radius r", () => { assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.0).map(round), [0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 27.00, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 1.0).map(round), [0.000, 0.000, 0.000, 1.000, 3.000, 6.000, 7.000, 6.000, 3.000, 1.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 2.0).map(round), [0.216, 0.648, 1.296, 2.160, 3.240, 3.888, 4.104, 3.888, 3.240, 2.160, 1.296, 0.648, 0.216, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 3.0).map(round), [1.023, 1.338, 1.732, 2.204, 2.598, 2.834, 2.913, 2.834, 2.598, 2.204, 1.653, 1.181, 0.787, 0.472]); }); -it("blur(values, r) observes the expected fractional radius r", () => { +test("blur(values, r) observes the expected fractional radius r", () => { assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.5).map(round), [0.000, 0.000, 0.000, 0.422, 2.531, 6.328, 8.438, 6.328, 2.531, 0.422, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 1.5).map(round), [0.053, 0.316, 0.949, 2.004, 3.322, 4.430, 4.852, 4.430, 3.322, 2.004, 0.949, 0.316, 0.053, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 2.5).map(round), [0.672, 1.078, 1.609, 2.234, 2.813, 3.188, 3.313, 3.188, 2.813, 2.234, 1.594, 1.031, 0.594, 0.281]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 3.5).map(round), [1.266, 1.503, 1.780, 2.057, 2.294, 2.452, 2.505, 2.452, 2.294, 2.030, 1.701, 1.371, 1.081, 0.844]); }); -it("blur(values, r) repeats starting values before the window", () => { +test("blur(values, r) repeats starting values before the window", () => { assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 0.0).map(round), [27.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 1.0).map(round), [13.000, 9.000, 4.000, 1.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 2.0).map(round), [11.016, 9.072, 6.696, 4.104, 2.160, 0.864, 0.216, 0.000]); assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 3.0).map(round), [10.233, 8.974, 7.478, 5.825, 4.093, 2.676, 1.574, 0.787]); }); -it("blur(values, r) approximately preserves total value", () => { +test("blur(values, r) approximately preserves total value", () => { assert.strictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.0).reduce((p, v) => p + v), 27); assert.strictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.5).reduce((p, v) => p + v), 27); assert.strictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 1.0).reduce((p, v) => p + v), 27); @@ -56,12 +57,12 @@ const unit = { ] }; -it("blur2(data, r) modifies in-place", () => { +test("blur2(data, r) modifies in-place", () => { const copy = copy2(unit); assert.strictEqual(blur2(copy, 1), copy); }); -it("data.height is redundant for blur2", () => { +test("data.height is redundant for blur2", () => { const copy = copy2(unit); delete copy.height; assert.deepStrictEqual(blur2(copy, 1).data.map(round), [ @@ -79,7 +80,7 @@ it("data.height is redundant for blur2", () => { ]); }); -it("blur2(data, r) observes the expected integer radius r", () => { +test("blur2(data, r) observes the expected integer radius r", () => { assert.deepStrictEqual(blur2(copy2(unit), 0), unit); assert.deepStrictEqual(blur2(copy2(unit), 1).data.map(round), [ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, @@ -109,7 +110,7 @@ it("blur2(data, r) observes the expected integer radius r", () => { ]); }); -it("blur2(data, rx, 0) does horizontal blurring", () => { +test("blur2(data, rx, 0) does horizontal blurring", () => { assert.deepStrictEqual(blur2(copy2(unit), 0, 0).data, [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -151,7 +152,7 @@ it("blur2(data, rx, 0) does horizontal blurring", () => { ]); }); -it("blur2(data, 0, ry) does vertical blurring", () => { +test("blur2(data, 0, ry) does vertical blurring", () => { assert.deepStrictEqual(blur2(copy2(unit), 0, 0).data, [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/test/count-test.js b/test/count-test.js index 8ed1b5bd..062a836a 100644 --- a/test/count-test.js +++ b/test/count-test.js @@ -1,21 +1,22 @@ +import {test} from "vitest"; import assert from "assert"; import {count} from "../src/index.js"; -it("count() accepts an iterable", () => { +test("count() accepts an iterable", () => { assert.deepStrictEqual(count([1, 2]), 2); assert.deepStrictEqual(count(new Set([1, 2])), 2); assert.deepStrictEqual(count(generate(1, 2)), 2); }); -it("count() ignores NaN, null", () => { +test("count() ignores NaN, null", () => { assert.deepStrictEqual(count([NaN, null, 0, 1]), 2); }); -it("count() coerces to a number", () => { +test("count() coerces to a number", () => { assert.deepStrictEqual(count(["1", " 2", "Fred"]), 2); }); -it("count() accepts an accessor", () => { +test("count() accepts an accessor", () => { assert.deepStrictEqual(count([{v:NaN}, {}, {v:0}, {v:1}], d => d.v), 2); assert.deepStrictEqual(count([{n: "Alice", age: NaN}, {n: "Bob", age: 18}, {n: "Other"}], d => d.age), 1); }); diff --git a/test/cross-test.js b/test/cross-test.js index abe79fbc..0657e0e9 100644 --- a/test/cross-test.js +++ b/test/cross-test.js @@ -1,38 +1,39 @@ +import {test} from "vitest"; import assert from "assert"; import {cross} from "../src/index.js"; -it("cross() returns an empty array", () => { +test("cross() returns an empty array", () => { assert.deepStrictEqual(cross(), []); }); -it("cross([]) returns an empty array", () => { +test("cross([]) returns an empty array", () => { assert.deepStrictEqual(cross([]), []); }); -it("cross([1, 2], []) returns an empty array", () => { +test("cross([1, 2], []) returns an empty array", () => { assert.deepStrictEqual(cross([1, 2], []), []); }); -it("cross({length: weird}) returns an empty array", () => { +test("cross({length: weird}) returns an empty array", () => { assert.deepStrictEqual(cross({length: NaN}), []); assert.deepStrictEqual(cross({length: 0.5}), []); assert.deepStrictEqual(cross({length: -1}), []); assert.deepStrictEqual(cross({length: undefined}), []); }); -it("cross(...strings) returns the expected result", () => { +test("cross(...strings) returns the expected result", () => { assert.deepStrictEqual(cross("foo", "bar", (a, b) => a + b), ["fb", "fa", "fr", "ob", "oa", "or", "ob", "oa", "or"]); }); -it("cross(a) returns the expected result", () => { +test("cross(a) returns the expected result", () => { assert.deepStrictEqual(cross([1, 2]), [[1], [2]]); }); -it("cross(a, b) returns Cartesian product a×b", () => { +test("cross(a, b) returns Cartesian product a×b", () => { assert.deepStrictEqual(cross([1, 2], ["x", "y"]), [[1, "x"], [1, "y"], [2, "x"], [2, "y"]]); }); -it("cross(a, b, c) returns Cartesian product a×b×c", () => { +test("cross(a, b, c) returns Cartesian product a×b×c", () => { assert.deepStrictEqual(cross([1, 2], [3, 4], [5, 6, 7]), [ [1, 3, 5], [1, 3, 6], @@ -49,15 +50,15 @@ it("cross(a, b, c) returns Cartesian product a×b×c", () => { ]); }); -it("cross(a, b, f) invokes the specified function for each pair", () => { +test("cross(a, b, f) invokes the specified function for each pair", () => { assert.deepStrictEqual(cross([1, 2], ["x", "y"], (a, b) => a + b), ["1x", "1y", "2x", "2y"]); }); -it("cross(a, b, c, f) invokes the specified function for each triple", () => { +test("cross(a, b, c, f) invokes the specified function for each triple", () => { assert.deepStrictEqual(cross([1, 2], [3, 4], [5, 6, 7], (a, b, c) => a + b + c), [9, 10, 11, 10, 11, 12, 10, 11, 12, 11, 12, 13]); }); -it("cross(a, b) returns Cartesian product a×b of generators", () => { +test("cross(a, b) returns Cartesian product a×b of generators", () => { assert.deepStrictEqual(cross(generate(1, 2), generate("x", "y")), [[1, "x"], [1, "y"], [2, "x"], [2, "y"]]); }); diff --git a/test/cumsum-test.js b/test/cumsum-test.js index 6286f805..dca0d8ca 100644 --- a/test/cumsum-test.js +++ b/test/cumsum-test.js @@ -1,14 +1,15 @@ +import {test} from "vitest"; import assert from "assert"; import {cumsum} from "../src/index.js"; -it("cumsum(array) returns the cumulative sum of the specified numbers", () => { +test("cumsum(array) returns the cumulative sum of the specified numbers", () => { assert.deepStrictEqual(Array.from(cumsum([1])), [1]); assert.deepStrictEqual(Array.from(cumsum([5, 1, 2, 3, 4])), [5, 6, 8, 11, 15]); assert.deepStrictEqual(Array.from(cumsum([20, 3])), [20, 23]); assert.deepStrictEqual(Array.from(cumsum([3, 20])), [3, 23]); }); -it("cumsum(array) observes values that can be coerced to numbers", () => { +test("cumsum(array) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", "3"])), [20, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", "20"])), [3, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", 20])), [3, 23]); @@ -17,18 +18,18 @@ it("cumsum(array) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", 3])), [20, 23]); }); -it("cumsum(array) ignores non-numeric values", () => { +test("cumsum(array) ignores non-numeric values", () => { assert.deepStrictEqual(Array.from(cumsum(["a", "b", "c"])), [0, 0, 0]); assert.deepStrictEqual(Array.from(cumsum(["a", 1, "2"])), [0, 1, 3]); }); -it("cumsum(array) ignores null, undefined and NaN", () => { +test("cumsum(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(Array.from(cumsum([NaN, 1, 2, 3, 4, 5])), [0, 1, 3, 6, 10, 15]); assert.deepStrictEqual(Array.from(cumsum([1, 2, 3, 4, 5, NaN])), [1, 3, 6, 10, 15, 15]); assert.deepStrictEqual(Array.from(cumsum([10, null, 3, undefined, 5, NaN])), [10, 10, 13, 13, 18, 18]); }); -it("cumsum(array) returns zeros if there are no numbers", () => { +test("cumsum(array) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([])), []); assert.deepStrictEqual(Array.from(cumsum([NaN])), [0]); assert.deepStrictEqual(Array.from(cumsum([undefined])), [0]); @@ -36,14 +37,14 @@ it("cumsum(array) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([undefined, NaN, {}])), [0, 0, 0]); }); -it("cumsum(array, f) returns the cumsum of the specified numbers", () => { +test("cumsum(array, f) returns the cumsum of the specified numbers", () => { assert.deepStrictEqual(Array.from(cumsum([1].map(box), unbox)), [1]); assert.deepStrictEqual(Array.from(cumsum([5, 1, 2, 3, 4].map(box), unbox)), [5, 6, 8, 11, 15]); assert.deepStrictEqual(Array.from(cumsum([20, 3].map(box), unbox)), [20, 23]); assert.deepStrictEqual(Array.from(cumsum([3, 20].map(box), unbox)), [3, 23]); }); -it("cumsum(array, f) observes values that can be coerced to numbers", () => { +test("cumsum(array, f) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", "3"].map(box), unbox)), [20, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", "20"].map(box), unbox)), [3, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", 20].map(box), unbox)), [3, 23]); @@ -52,18 +53,18 @@ it("cumsum(array, f) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", 3].map(box), unbox)), [20, 23]); }); -it("cumsum(array, f) ignores non-numeric values", () => { +test("cumsum(array, f) ignores non-numeric values", () => { assert.deepStrictEqual(Array.from(cumsum(["a", "b", "c"].map(box), unbox)), [0, 0, 0]); assert.deepStrictEqual(Array.from(cumsum(["a", 1, "2"].map(box), unbox)), [0, 1, 3]); }); -it("cumsum(array, f) ignores null, undefined and NaN", () => { +test("cumsum(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(Array.from(cumsum([NaN, 1, 2, 3, 4, 5].map(box), unbox)), [0, 1, 3, 6, 10, 15]); assert.deepStrictEqual(Array.from(cumsum([1, 2, 3, 4, 5, NaN].map(box), unbox)), [1, 3, 6, 10, 15, 15]); assert.deepStrictEqual(Array.from(cumsum([10, null, 3, undefined, 5, NaN].map(box), unbox)), [10, 10, 13, 13, 18, 18]); }); -it("cumsum(array, f) returns zeros if there are no numbers", () => { +test("cumsum(array, f) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([].map(box), unbox)), []); assert.deepStrictEqual(Array.from(cumsum([NaN].map(box), unbox)), [0]); assert.deepStrictEqual(Array.from(cumsum([undefined].map(box), unbox)), [0]); @@ -71,14 +72,14 @@ it("cumsum(array, f) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([undefined, NaN, {}].map(box), unbox)), [0, 0, 0]); }); -it("cumsum(array, f) passes the accessor d, i, and array", () => { +test("cumsum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; cumsum(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("cumsum(array, f) uses the undefined context", () => { +test("cumsum(array, f) uses the undefined context", () => { const results = []; cumsum([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/descending-test.js b/test/descending-test.js index f10903bc..64427e68 100644 --- a/test/descending-test.js +++ b/test/descending-test.js @@ -1,24 +1,25 @@ +import {test} from "vitest"; import assert from "assert"; import {descending} from "../src/index.js"; -it("descending(a, b) returns a positive number if a < b", () => { +test("descending(a, b) returns a positive number if a < b", () => { assert(descending(0, 1) > 0); assert(descending("a", "b") > 0); }); -it("descending(a, b) returns a negative number if a > b", () => { +test("descending(a, b) returns a negative number if a > b", () => { assert(descending(1, 0) < 0); assert(descending("b", "a") < 0); }); -it("descending(a, b) returns zero if a >= b and a <= b", () => { +test("descending(a, b) returns zero if a >= b and a <= b", () => { assert.strictEqual(descending(0, 0), 0); assert.strictEqual(descending("a", "a"), 0); assert.strictEqual(descending("0", 0), 0); assert.strictEqual(descending(0, "0"), 0); }); -it("descending(a, b) returns NaN if a and b are not comparable", () => { +test("descending(a, b) returns NaN if a and b are not comparable", () => { assert(isNaN(descending(0, undefined))); assert(isNaN(descending(undefined, 0))); assert(isNaN(descending(undefined, undefined))); diff --git a/test/deviation-test.js b/test/deviation-test.js index 3be39522..941595ab 100644 --- a/test/deviation-test.js +++ b/test/deviation-test.js @@ -1,25 +1,26 @@ +import {test} from "vitest"; import assert from "assert"; import {deviation} from "../src/index.js"; -it("deviation(array) returns the standard deviation of the specified numbers", () => { +test("deviation(array) returns the standard deviation of the specified numbers", () => { assert.strictEqual(deviation([1, 1, 1, 1, 1]), 0); assert.strictEqual(deviation([5, 1, 2, 3, 4]), Math.sqrt(2.5)); assert.strictEqual(deviation([20, 3]), Math.sqrt(144.5)); assert.strictEqual(deviation([3, 20]), Math.sqrt(144.5)); }); -it("deviation(array) ignores null, undefined and NaN", () => { +test("deviation(array) ignores null, undefined and NaN", () => { assert.strictEqual(deviation([NaN, 1, 2, 3, 4, 5]), Math.sqrt(2.5)); assert.strictEqual(deviation([1, 2, 3, 4, 5, NaN]), Math.sqrt(2.5)); assert.strictEqual(deviation([10, null, 3, undefined, 5, NaN]), Math.sqrt(13)); }); -it("deviation(array) can handle large numbers without overflowing", () => { +test("deviation(array) can handle large numbers without overflowing", () => { assert.strictEqual(deviation([Number.MAX_VALUE, Number.MAX_VALUE]), 0); assert.strictEqual(deviation([-Number.MAX_VALUE, -Number.MAX_VALUE]), 0); }); -it("deviation(array) returns undefined if the array has fewer than two numbers", () => { +test("deviation(array) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(deviation([1]), undefined); assert.strictEqual(deviation([]), undefined); assert.strictEqual(deviation([null]), undefined); @@ -28,24 +29,24 @@ it("deviation(array) returns undefined if the array has fewer than two numbers", assert.strictEqual(deviation([NaN, NaN]), undefined); }); -it("deviation(array, f) returns the deviation of the specified numbers", () => { +test("deviation(array, f) returns the deviation of the specified numbers", () => { assert.strictEqual(deviation([5, 1, 2, 3, 4].map(box), unbox), Math.sqrt(2.5)); assert.strictEqual(deviation([20, 3].map(box), unbox), Math.sqrt(144.5)); assert.strictEqual(deviation([3, 20].map(box), unbox), Math.sqrt(144.5)); }); -it("deviation(array, f) ignores null, undefined and NaN", () => { +test("deviation(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(deviation([NaN, 1, 2, 3, 4, 5].map(box), unbox), Math.sqrt(2.5)); assert.strictEqual(deviation([1, 2, 3, 4, 5, NaN].map(box), unbox), Math.sqrt(2.5)); assert.strictEqual(deviation([10, null, 3, undefined, 5, NaN].map(box), unbox), Math.sqrt(13)); }); -it("deviation(array, f) can handle large numbers without overflowing", () => { +test("deviation(array, f) can handle large numbers without overflowing", () => { assert.strictEqual(deviation([Number.MAX_VALUE, Number.MAX_VALUE].map(box), unbox), 0); assert.strictEqual(deviation([-Number.MAX_VALUE, -Number.MAX_VALUE].map(box), unbox), 0); }); -it("deviation(array, f) returns undefined if the array has fewer than two numbers", () => { +test("deviation(array, f) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(deviation([1].map(box), unbox), undefined); assert.strictEqual(deviation([].map(box), unbox), undefined); assert.strictEqual(deviation([null].map(box), unbox), undefined); diff --git a/test/difference-test.js b/test/difference-test.js index b74f21b0..89572b4c 100644 --- a/test/difference-test.js +++ b/test/difference-test.js @@ -1,17 +1,18 @@ +import {test} from "vitest"; import {difference} from "../src/index.js"; import {assertSetEqual} from "./asserts.js"; -it("difference(values, other) returns a set of values", () => { +test("difference(values, other) returns a set of values", () => { assertSetEqual(difference([1, 2, 3], [2, 1]), [3]); assertSetEqual(difference([1, 2], [2, 3, 1]), []); assertSetEqual(difference([2, 1, 3], [4, 3, 1]), [2]); }); -it("difference(...values) accepts iterables", () => { +test("difference(...values) accepts iterables", () => { assertSetEqual(difference(new Set([1, 2, 3]), new Set([1])), [2, 3]); }); -it("difference(values, other) performs interning", () => { +test("difference(values, other) performs interning", () => { assertSetEqual(difference([new Date("2021-01-01"), new Date("2021-01-02"), new Date("2021-01-03")], [new Date("2021-01-02"), new Date("2021-01-01")]), [new Date("2021-01-03")]); assertSetEqual(difference([new Date("2021-01-01"), new Date("2021-01-02")], [new Date("2021-01-02"), new Date("2021-01-03"), new Date("2021-01-01")]), []); assertSetEqual(difference([new Date("2021-01-02"), new Date("2021-01-01"), new Date("2021-01-03")], [new Date("2021-01-04"), new Date("2021-01-03"), new Date("2021-01-01")]), [new Date("2021-01-02")]); diff --git a/test/disjoint-test.js b/test/disjoint-test.js index cc01c359..bf8cec51 100644 --- a/test/disjoint-test.js +++ b/test/disjoint-test.js @@ -1,21 +1,22 @@ +import {test} from "vitest"; import assert from "assert"; import {disjoint} from "../src/index.js"; -it("disjoint(values, other) returns true if sets are disjoint", () => { +test("disjoint(values, other) returns true if sets are disjoint", () => { assert.strictEqual(disjoint([1], [2]), true); assert.strictEqual(disjoint([2, 3], [3, 4]), false); assert.strictEqual(disjoint([1], []), true); }); -it("disjoint(values, other) allows values to be infinite", () => { +test("disjoint(values, other) allows values to be infinite", () => { assert.strictEqual(disjoint(odds(), [0, 2, 4, 5]), false); }); -it("disjoint(values, other) allows other to be infinite", () => { +test("disjoint(values, other) allows other to be infinite", () => { assert.strictEqual(disjoint([2], repeat(1, 3, 2)), false); }); -it("disjoint(values, other) performs interning", () => { +test("disjoint(values, other) performs interning", () => { assert.strictEqual(disjoint([new Date("2021-01-01")], [new Date("2021-01-02")]), true); assert.strictEqual(disjoint([new Date("2021-01-02"), new Date("2021-01-03")], [new Date("2021-01-03"), new Date("2021-01-04")]), false); assert.strictEqual(disjoint([new Date("2021-01-01")], []), true); diff --git a/test/every-test.js b/test/every-test.js index da75f44b..8348240e 100644 --- a/test/every-test.js +++ b/test/every-test.js @@ -1,30 +1,31 @@ +import {test} from "vitest"; import assert from "assert"; import {every} from "../src/index.js"; -it("every(values, test) returns true if all tests pass", () => { +test("every(values, test) returns true if all tests pass", () => { assert.strictEqual(every([1, 2, 3, 2, 1], x => x & 1), false); assert.strictEqual(every([1, 2, 3, 2, 1], x => x >= 1), true); }); -it("every(values, test) returns true if values is empty", () => { +test("every(values, test) returns true if values is empty", () => { assert.strictEqual(every([], () => false), true); }); -it("every(values, test) accepts an iterable", () => { +test("every(values, test) accepts an iterable", () => { assert.strictEqual(every(new Set([1, 2, 3, 2, 1]), x => x >= 1), true); assert.strictEqual(every((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x >= 1), true); assert.strictEqual(every(Uint8Array.of(1, 2, 3, 2, 1), x => x >= 1), true); }); -it("every(values, test) enforces that test is a function", () => { +test("every(values, test) enforces that test is a function", () => { assert.throws(() => every([]), TypeError); }); -it("every(values, test) enforces that values is iterable", () => { +test("every(values, test) enforces that values is iterable", () => { assert.throws(() => every({}, () => true), TypeError); }); -it("every(values, test) passes test (value, index, values)", () => { +test("every(values, test) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); every(values, function() { return calls.push([this, ...arguments]); }); @@ -37,7 +38,7 @@ it("every(values, test) passes test (value, index, values)", () => { ]); }); -it("every(values, test) short-circuts when test returns falsey", () => { +test("every(values, test) short-circuts when test returns falsey", () => { let calls = 0; assert.strictEqual(every([1, 2, 3], x => (++calls, x < 2)), false); assert.strictEqual(calls, 2); @@ -45,7 +46,7 @@ it("every(values, test) short-circuts when test returns falsey", () => { assert.strictEqual(calls, 4); }); -it("every(values, test) does not skip sparse elements", () => { +test("every(values, test) does not skip sparse elements", () => { assert.deepStrictEqual(every([, 1, 2,, ], x => x === undefined || x >=1), true); assert.deepStrictEqual(every([, 1, 2,, ], x => x >=1), false); }); diff --git a/test/extent-test.js b/test/extent-test.js index 52f93570..0ff96916 100644 --- a/test/extent-test.js +++ b/test/extent-test.js @@ -1,20 +1,21 @@ +import {test} from "vitest"; import assert from "assert"; import {extent} from "../src/index.js"; -it("extent(array) returns the least and greatest numeric values for numbers", () => { +test("extent(array) returns the least and greatest numeric values for numbers", () => { assert.deepStrictEqual(extent([1]), [1, 1]); assert.deepStrictEqual(extent([5, 1, 2, 3, 4]), [1, 5]); assert.deepStrictEqual(extent([20, 3]), [3, 20]); assert.deepStrictEqual(extent([3, 20]), [3, 20]); }); -it("extent(array) returns the least and greatest lexicographic value for strings", () => { +test("extent(array) returns the least and greatest lexicographic value for strings", () => { assert.deepStrictEqual(extent(["c", "a", "b"]), ["a", "c"]); assert.deepStrictEqual(extent(["20", "3"]), ["20", "3"]); assert.deepStrictEqual(extent(["3", "20"]), ["20", "3"]); }); -it("extent(array) ignores null, undefined and NaN", () => { +test("extent(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(extent([NaN, 1, 2, 3, 4, 5]), [1, 5]); assert.deepStrictEqual(extent([o, 1, 2, 3, 4, 5]), [1, 5]); @@ -24,14 +25,14 @@ it("extent(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(extent([-1, null, -3, undefined, -5, NaN]), [-5, -1]); }); -it("extent(array) compares heterogenous types as numbers", () => { +test("extent(array) compares heterogenous types as numbers", () => { assert.deepStrictEqual(extent([20, "3"]), ["3", 20]); assert.deepStrictEqual(extent(["20", 3]), [3, "20"]); assert.deepStrictEqual(extent([3, "20"]), [3, "20"]); assert.deepStrictEqual(extent(["3", 20]), ["3", 20]); }); -it("extent(array) returns undefined if the array contains no numbers", () => { +test("extent(array) returns undefined if the array contains no numbers", () => { assert.deepStrictEqual(extent([]), [undefined, undefined]); assert.deepStrictEqual(extent([null]), [undefined, undefined]); assert.deepStrictEqual(extent([undefined]), [undefined, undefined]); @@ -39,20 +40,20 @@ it("extent(array) returns undefined if the array contains no numbers", () => { assert.deepStrictEqual(extent([NaN, NaN]), [undefined, undefined]); }); -it("extent(array, f) returns the least and greatest numeric value for numbers", () => { +test("extent(array, f) returns the least and greatest numeric value for numbers", () => { assert.deepStrictEqual(extent([1].map(box), unbox), [1, 1]); assert.deepStrictEqual(extent([5, 1, 2, 3, 4].map(box), unbox), [1, 5]); assert.deepStrictEqual(extent([20, 3].map(box), unbox), [3, 20]); assert.deepStrictEqual(extent([3, 20].map(box), unbox), [3, 20]); }); -it("extent(array, f) returns the least and greatest lexicographic value for strings", () => { +test("extent(array, f) returns the least and greatest lexicographic value for strings", () => { assert.deepStrictEqual(extent(["c", "a", "b"].map(box), unbox), ["a", "c"]); assert.deepStrictEqual(extent(["20", "3"].map(box), unbox), ["20", "3"]); assert.deepStrictEqual(extent(["3", "20"].map(box), unbox), ["20", "3"]); }); -it("extent(array, f) ignores null, undefined and NaN", () => { +test("extent(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(extent([NaN, 1, 2, 3, 4, 5].map(box), unbox), [1, 5]); assert.deepStrictEqual(extent([o, 1, 2, 3, 4, 5].map(box), unbox), [1, 5]); @@ -62,14 +63,14 @@ it("extent(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(extent([-1, null, -3, undefined, -5, NaN].map(box), unbox), [-5, -1]); }); -it("extent(array, f) compares heterogenous types as numbers", () => { +test("extent(array, f) compares heterogenous types as numbers", () => { assert.deepStrictEqual(extent([20, "3"].map(box), unbox), ["3", 20]); assert.deepStrictEqual(extent(["20", 3].map(box), unbox), [3, "20"]); assert.deepStrictEqual(extent([3, "20"].map(box), unbox), [3, "20"]); assert.deepStrictEqual(extent(["3", 20].map(box), unbox), ["3", 20]); }); -it("extent(array, f) returns undefined if the array contains no observed values", () => { +test("extent(array, f) returns undefined if the array contains no observed values", () => { assert.deepStrictEqual(extent([].map(box), unbox), [undefined, undefined]); assert.deepStrictEqual(extent([null].map(box), unbox), [undefined, undefined]); assert.deepStrictEqual(extent([undefined].map(box), unbox), [undefined, undefined]); @@ -77,14 +78,14 @@ it("extent(array, f) returns undefined if the array contains no observed values" assert.deepStrictEqual(extent([NaN, NaN].map(box), unbox), [undefined, undefined]); }); -it("extent(array, f) passes the accessor d, i, and array", () => { +test("extent(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; extent(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("extent(array, f) uses the undefined context", () => { +test("extent(array, f) uses the undefined context", () => { const results = []; extent([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/fcumsum-test.js b/test/fcumsum-test.js index 07fd4685..e5072e8b 100644 --- a/test/fcumsum-test.js +++ b/test/fcumsum-test.js @@ -1,27 +1,28 @@ +import {test} from "vitest"; import assert from "assert"; import {cumsum, fcumsum} from "../src/index.js"; -it("fcumsum(array) returns a Float64Array of the expected length", () => { +test("fcumsum(array) returns a Float64Array of the expected length", () => { const A = [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]; const R = cumsum(A); assert(R instanceof Float64Array); assert.strictEqual(R.length, A.length); }); -it("fcumsum(array) is an exact cumsum", () => { +test("fcumsum(array) is an exact cumsum", () => { assert.strictEqual(lastc([0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]), 1); assert.strictEqual(lastc([0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3]), 0); assert.strictEqual(lastc(["20", "3"].map(box), unbox), 23); }); -it("fcumsum(array) returns the fsum of the specified numbers", () => { +test("fcumsum(array) returns the fsum of the specified numbers", () => { assert.strictEqual(lastc([1]), 1); assert.strictEqual(lastc([5, 1, 2, 3, 4]), 15); assert.strictEqual(lastc([20, 3]), 23); assert.strictEqual(lastc([3, 20]), 23); }); -it("fcumsum(array) observes values that can be coerced to numbers", () => { +test("fcumsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", "3"]), 23); assert.strictEqual(lastc(["3", "20"]), 23); assert.strictEqual(lastc(["3", 20]), 23); @@ -30,18 +31,18 @@ it("fcumsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", 3]), 23); }); -it("fcumsum(array) ignores non-numeric values", () => { +test("fcumsum(array) ignores non-numeric values", () => { assert.strictEqual(lastc(["a", "b", "c"]), 0); assert.strictEqual(lastc(["a", 1, "2"]), 3); }); -it("fcumsum(array) ignores null, undefined and NaN", () => { +test("fcumsum(array) ignores null, undefined and NaN", () => { assert.strictEqual(lastc([NaN, 1, 2, 3, 4, 5]), 15); assert.strictEqual(lastc([1, 2, 3, 4, 5, NaN]), 15); assert.strictEqual(lastc([10, null, 3, undefined, 5, NaN]), 18); }); -it("fcumsum(array) returns an array of zeros if there are no numbers", () => { +test("fcumsum(array) returns an array of zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([])), []); assert.deepStrictEqual(Array.from(fcumsum([NaN])), [0]); assert.deepStrictEqual(Array.from(fcumsum([undefined])), [0]); @@ -49,14 +50,14 @@ it("fcumsum(array) returns an array of zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([undefined, NaN, {}])), [0, 0, 0]); }); -it("fcumsum(array, f) returns the fsum of the specified numbers", () => { +test("fcumsum(array, f) returns the fsum of the specified numbers", () => { assert.strictEqual(lastc([1].map(box), unbox), 1); assert.strictEqual(lastc([5, 1, 2, 3, 4].map(box), unbox), 15); assert.strictEqual(lastc([20, 3].map(box), unbox), 23); assert.strictEqual(lastc([3, 20].map(box), unbox), 23); }); -it("fcumsum(array, f) observes values that can be coerced to numbers", () => { +test("fcumsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", "3"].map(box), unbox), 23); assert.strictEqual(lastc(["3", "20"].map(box), unbox), 23); assert.strictEqual(lastc(["3", 20].map(box), unbox), 23); @@ -65,18 +66,18 @@ it("fcumsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", 3].map(box), unbox), 23); }); -it("fcumsum(array, f) ignores non-numeric values", () => { +test("fcumsum(array, f) ignores non-numeric values", () => { assert.strictEqual(lastc(["a", "b", "c"].map(box), unbox), 0); assert.strictEqual(lastc(["a", 1, "2"].map(box), unbox), 3); }); -it("fcumsum(array, f) ignores null, undefined and NaN", () => { +test("fcumsum(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(lastc([NaN, 1, 2, 3, 4, 5].map(box), unbox), 15); assert.strictEqual(lastc([1, 2, 3, 4, 5, NaN].map(box), unbox), 15); assert.strictEqual(lastc([10, null, 3, undefined, 5, NaN].map(box), unbox), 18); }); -it("fcumsum(array, f) returns zero if there are no numbers", () => { +test("fcumsum(array, f) returns zero if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([].map(box), unbox)), []); assert.deepStrictEqual(Array.from(fcumsum([NaN].map(box), unbox)), [0]); assert.deepStrictEqual(Array.from(fcumsum([undefined].map(box), unbox)), [0]); @@ -84,14 +85,14 @@ it("fcumsum(array, f) returns zero if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([undefined, NaN, {}].map(box), unbox)), [0, 0, 0]); }); -it("fcumsum(array, f) passes the accessor d, i, and array", () => { +test("fcumsum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; lastc(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("fcumsum(array, f) uses the undefined context", () => { +test("fcumsum(array, f) uses the undefined context", () => { const results = []; lastc([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/filter-test.js b/test/filter-test.js index 38418294..9f89aa30 100644 --- a/test/filter-test.js +++ b/test/filter-test.js @@ -1,28 +1,29 @@ +import {test} from "vitest"; import assert from "assert"; import * as d3 from "../src/index.js"; -it("filter(values, test) returns the values that pass the test", () => { +test("filter(values, test) returns the values that pass the test", () => { assert.deepStrictEqual(d3.filter([1, 2, 3, 2, 1], x => x & 1), [1, 3, 1]); }); -it("filter(values, test) accepts an iterable", () => { +test("filter(values, test) accepts an iterable", () => { assert.deepStrictEqual(d3.filter(new Set([1, 2, 3, 2, 1]), x => x & 1), [1, 3]); assert.deepStrictEqual(d3.filter((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x & 1), [1, 3, 1]); }); -it("filter(values, test) accepts a typed array", () => { +test("filter(values, test) accepts a typed array", () => { assert.deepStrictEqual(d3.filter(Uint8Array.of(1, 2, 3, 2, 1), x => x & 1), [1, 3, 1]); }); -it("filter(values, test) enforces that test is a function", () => { +test("filter(values, test) enforces that test is a function", () => { assert.throws(() => d3.filter([]), TypeError); }); -it("filter(values, test) enforces that values is iterable", () => { +test("filter(values, test) enforces that values is iterable", () => { assert.throws(() => d3.filter({}, () => true), TypeError); }); -it("filter(values, test) passes test (value, index, values)", () => { +test("filter(values, test) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); d3.filter(values, function() { calls.push([this, ...arguments]); }); @@ -35,6 +36,6 @@ it("filter(values, test) passes test (value, index, values)", () => { ]); }); -it("filter(values, test) does not skip sparse elements", () => { +test("filter(values, test) does not skip sparse elements", () => { assert.deepStrictEqual(d3.filter([, 1, 2,, ], () => true), [undefined, 1, 2, undefined]); }); diff --git a/test/flatGroup-test.js b/test/flatGroup-test.js index 959d3771..69885f0f 100644 --- a/test/flatGroup-test.js +++ b/test/flatGroup-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {flatGroup} from "../src/index.js"; @@ -8,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -it("flatGroup(data, accessor, accessor) returns the expected array", () => { +test("flatGroup(data, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( flatGroup(data, d => d.name, d => d.amount), [ diff --git a/test/flatRollup-test.js b/test/flatRollup-test.js index 04b05496..9471eb3d 100644 --- a/test/flatRollup-test.js +++ b/test/flatRollup-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {flatRollup} from "../src/index.js"; @@ -8,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -it("flatRollup(data, reduce, accessor) returns the expected array", () => { +test("flatRollup(data, reduce, accessor) returns the expected array", () => { assert.deepStrictEqual( flatRollup(data, v => v.length, d => d.name), [ @@ -19,7 +20,7 @@ it("flatRollup(data, reduce, accessor) returns the expected array", () => { ); }); -it("flatRollup(data, reduce, accessor, accessor) returns the expected array", () => { +test("flatRollup(data, reduce, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( flatRollup(data, v => v.length, d => d.name, d => d.amount), [ diff --git a/test/fsum-test.js b/test/fsum-test.js index 62a3b039..8f2fccbb 100644 --- a/test/fsum-test.js +++ b/test/fsum-test.js @@ -1,32 +1,33 @@ +import {test} from "vitest"; import assert from "assert"; import {Adder, fsum} from "../src/index.js"; -it("new Adder() returns an Adder", () => { +test("new Adder() returns an Adder", () => { assert.strictEqual(typeof new Adder().add, "function"); assert.strictEqual(typeof new Adder().valueOf, "function"); }); -it("+adder can be applied several times", () => { +test("+adder can be applied several times", () => { const adder = new Adder(); for (let i = 0; i < 10; ++i) adder.add(0.1); assert.strictEqual(+adder, 1); assert.strictEqual(+adder, 1); }); -it("fsum(array) is an exact sum", () => { +test("fsum(array) is an exact sum", () => { assert.strictEqual(fsum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1]), 1); assert.strictEqual(fsum([.3, .3, .3, .3, .3, .3, .3, .3, .3, .3, -.3, -.3, -.3, -.3, -.3, -.3, -.3, -.3, -.3, -.3]), 0); assert.strictEqual(fsum(["20", "3"].map(box), unbox), 23); }); -it("fsum(array) returns the fsum of the specified numbers", () => { +test("fsum(array) returns the fsum of the specified numbers", () => { assert.strictEqual(fsum([1]), 1); assert.strictEqual(fsum([5, 1, 2, 3, 4]), 15); assert.strictEqual(fsum([20, 3]), 23); assert.strictEqual(fsum([3, 20]), 23); }); -it("fsum(array) observes values that can be coerced to numbers", () => { +test("fsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", "3"]), 23); assert.strictEqual(fsum(["3", "20"]), 23); assert.strictEqual(fsum(["3", 20]), 23); @@ -35,18 +36,18 @@ it("fsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", 3]), 23); }); -it("fsum(array) ignores non-numeric values", () => { +test("fsum(array) ignores non-numeric values", () => { assert.strictEqual(fsum(["a", "b", "c"]), 0); assert.strictEqual(fsum(["a", 1, "2"]), 3); }); -it("fsum(array) ignores null, undefined and NaN", () => { +test("fsum(array) ignores null, undefined and NaN", () => { assert.strictEqual(fsum([NaN, 1, 2, 3, 4, 5]), 15); assert.strictEqual(fsum([1, 2, 3, 4, 5, NaN]), 15); assert.strictEqual(fsum([10, null, 3, undefined, 5, NaN]), 18); }); -it("fsum(array) returns zero if there are no numbers", () => { +test("fsum(array) returns zero if there are no numbers", () => { assert.strictEqual(fsum([]), 0); assert.strictEqual(fsum([NaN]), 0); assert.strictEqual(fsum([undefined]), 0); @@ -54,14 +55,14 @@ it("fsum(array) returns zero if there are no numbers", () => { assert.strictEqual(fsum([undefined, NaN, {}]), 0); }); -it("fsum(array, f) returns the fsum of the specified numbers", () => { +test("fsum(array, f) returns the fsum of the specified numbers", () => { assert.strictEqual(fsum([1].map(box), unbox), 1); assert.strictEqual(fsum([5, 1, 2, 3, 4].map(box), unbox), 15); assert.strictEqual(fsum([20, 3].map(box), unbox), 23); assert.strictEqual(fsum([3, 20].map(box), unbox), 23); }); -it("fsum(array, f) observes values that can be coerced to numbers", () => { +test("fsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", "3"].map(box), unbox), 23); assert.strictEqual(fsum(["3", "20"].map(box), unbox), 23); assert.strictEqual(fsum(["3", 20].map(box), unbox), 23); @@ -70,18 +71,18 @@ it("fsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", 3].map(box), unbox), 23); }); -it("fsum(array, f) ignores non-numeric values", () => { +test("fsum(array, f) ignores non-numeric values", () => { assert.strictEqual(fsum(["a", "b", "c"].map(box), unbox), 0); assert.strictEqual(fsum(["a", 1, "2"].map(box), unbox), 3); }); -it("fsum(array, f) ignores null, undefined and NaN", () => { +test("fsum(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(fsum([NaN, 1, 2, 3, 4, 5].map(box), unbox), 15); assert.strictEqual(fsum([1, 2, 3, 4, 5, NaN].map(box), unbox), 15); assert.strictEqual(fsum([10, null, 3, undefined, 5, NaN].map(box), unbox), 18); }); -it("fsum(array, f) returns zero if there are no numbers", () => { +test("fsum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(fsum([].map(box), unbox), 0); assert.strictEqual(fsum([NaN].map(box), unbox), 0); assert.strictEqual(fsum([undefined].map(box), unbox), 0); @@ -89,14 +90,14 @@ it("fsum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(fsum([undefined, NaN, {}].map(box), unbox), 0); }); -it("fsum(array, f) passes the accessor d, i, and array", () => { +test("fsum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; fsum(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("fsum(array, f) uses the undefined context", () => { +test("fsum(array, f) uses the undefined context", () => { const results = []; fsum([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/greatest-test.js b/test/greatest-test.js index dd77751c..970aa180 100644 --- a/test/greatest-test.js +++ b/test/greatest-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {descending, greatest} from "../src/index.js"; -it("greatest(array) compares using natural order", () => { +test("greatest(array) compares using natural order", () => { assert.strictEqual(greatest([0, 1]), 1); assert.strictEqual(greatest([1, 0]), 1); assert.strictEqual(greatest([0, "1"]), "1"); @@ -16,7 +17,7 @@ it("greatest(array) compares using natural order", () => { assert.strictEqual(greatest([NaN, 10, 2]), 10); }); -it("greatest(array, compare) compares using the specified compare function", () => { +test("greatest(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.deepStrictEqual(greatest([a, b], (a, b) => a.name.localeCompare(b.name)), {name: "b"}); assert.strictEqual(greatest([1, 0], descending), 0); @@ -26,31 +27,31 @@ it("greatest(array, compare) compares using the specified compare function", () assert.strictEqual(greatest([2, NaN, 10], descending), 2); }); -it("greatest(array, accessor) uses the specified accessor function", () => { +test("greatest(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(greatest([a, b], d => d.name), b); assert.deepStrictEqual(greatest([a, b], d => d.v), a); }); -it("greatest(array) returns undefined if the array is empty", () => { +test("greatest(array) returns undefined if the array is empty", () => { assert.strictEqual(greatest([]), undefined); }); -it("greatest(array) returns undefined if the array contains only incomparable values", () => { +test("greatest(array) returns undefined if the array contains only incomparable values", () => { assert.strictEqual(greatest([NaN, undefined]), undefined); assert.strictEqual(greatest([NaN, "foo"], (a, b) => a - b), undefined); }); -it("greatest(array) returns the first of equal values", () => { +test("greatest(array) returns the first of equal values", () => { assert.deepStrictEqual(greatest([2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), descendingValue), {value: 0, index: 4}); assert.deepStrictEqual(greatest([3, 2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), ascendingValue), {value: 3, index: 0}); }); -it("greatest(array) ignores null and undefined", () => { +test("greatest(array) ignores null and undefined", () => { assert.deepStrictEqual(greatest([null, -2, undefined]), -2); }); -it("greatest(array, accessor) ignores null and undefined", () => { +test("greatest(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(greatest([null, -2, undefined], d => d), -2); }); diff --git a/test/greatestIndex-test.js b/test/greatestIndex-test.js index 187c482b..4983cfd8 100644 --- a/test/greatestIndex-test.js +++ b/test/greatestIndex-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {ascending, descending, greatestIndex} from "../src/index.js"; -it("greatestIndex(array) compares using natural order", () => { +test("greatestIndex(array) compares using natural order", () => { assert.strictEqual(greatestIndex([0, 1]), 1); assert.strictEqual(greatestIndex([1, 0]), 0); assert.strictEqual(greatestIndex([0, "1"]), 1); @@ -16,7 +17,7 @@ it("greatestIndex(array) compares using natural order", () => { assert.strictEqual(greatestIndex([NaN, 10, 2]), 1); }); -it("greatestIndex(array, compare) compares using the specified compare function", () => { +test("greatestIndex(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.strictEqual(greatestIndex([a, b], (a, b) => a.name.localeCompare(b.name)), 1); assert.strictEqual(greatestIndex([1, 0], ascending), 0); @@ -26,30 +27,30 @@ it("greatestIndex(array, compare) compares using the specified compare function" assert.strictEqual(greatestIndex([2, NaN, 10], ascending), 2); }); -it("greatestIndex(array, accessor) uses the specified accessor function", () => { +test("greatestIndex(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(greatestIndex([a, b], d => d.name), 1); assert.deepStrictEqual(greatestIndex([a, b], d => d.v), 0); }); -it("greatestIndex(array) returns -1 if the array is empty", () => { +test("greatestIndex(array) returns -1 if the array is empty", () => { assert.strictEqual(greatestIndex([]), -1); }); -it("greatestIndex(array) returns -1 if the array contains only incomparable values", () => { +test("greatestIndex(array) returns -1 if the array contains only incomparable values", () => { assert.strictEqual(greatestIndex([NaN, undefined]), -1); assert.strictEqual(greatestIndex([NaN, "foo"], (a, b) => a - b), -1); }); -it("greatestIndex(array) returns the first of equal values", () => { +test("greatestIndex(array) returns the first of equal values", () => { assert.strictEqual(greatestIndex([-2, -2, -1, -1, 0, 0, 0, -3, 0]), 4); assert.strictEqual(greatestIndex([-3, -2, -2, -1, -1, 0, 0, 0, -3, 0], descending), 0); }); -it("greatestIndex(array) ignores null and undefined", () => { +test("greatestIndex(array) ignores null and undefined", () => { assert.deepStrictEqual(greatestIndex([null, -2, undefined]), 1); }); -it("greatestIndex(array, accessor) ignores null and undefined", () => { +test("greatestIndex(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(greatestIndex([null, -2, undefined], d => d), 1); }); diff --git a/test/group-test.js b/test/group-test.js index 24eaa7b3..9a7e8a39 100644 --- a/test/group-test.js +++ b/test/group-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {group} from "../src/index.js"; @@ -8,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -it("group(data, accessor) returns the expected map", () => { +test("group(data, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(group(data, d => d.name), 1), [ @@ -51,7 +52,7 @@ it("group(data, accessor) returns the expected map", () => { ); }); -it("group(data, accessor, accessor) returns the expected map", () => { +test("group(data, accessor, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(group(data, d => d.name, d => d.amount), 2), [ @@ -114,7 +115,7 @@ it("group(data, accessor, accessor) returns the expected map", () => { ); }); -it("group(data, accessor) interns keys", () => { +test("group(data, accessor) interns keys", () => { const a1 = new Date(Date.UTC(2001, 0, 1)); const a2 = new Date(Date.UTC(2001, 0, 1)); const b = new Date(Date.UTC(2002, 0, 1)); diff --git a/test/groupSort-test.js b/test/groupSort-test.js index 2d7d76b3..a2c49c57 100644 --- a/test/groupSort-test.js +++ b/test/groupSort-test.js @@ -1,10 +1,11 @@ +import {test} from "vitest"; import assert from "assert"; import {readFileSync} from "fs"; import {ascending, descending, groupSort, median} from "../src/index.js"; const barley = JSON.parse(readFileSync("./test/data/barley.json")); -it("groupSort(data, reduce, key) returns sorted keys when reduce is an accessor", () => { +test("groupSort(data, reduce, key) returns sorted keys when reduce is an accessor", () => { assert.deepStrictEqual( groupSort(barley, g => median(g, d => d.yield), d => d.variety), ["Svansota", "No. 462", "Manchuria", "No. 475", "Velvet", "Peatland", "Glabron", "No. 457", "Wisconsin No. 38", "Trebi"] @@ -31,7 +32,7 @@ it("groupSort(data, reduce, key) returns sorted keys when reduce is an accessor" ); }); -it("groupSort(data, reduce, key) returns sorted keys when reduce is a comparator", () => { +test("groupSort(data, reduce, key) returns sorted keys when reduce is a comparator", () => { assert.deepStrictEqual( groupSort(barley, (a, b) => ascending(median(a, d => d.yield), median(b, d => d.yield)), d => d.variety), ["Svansota", "No. 462", "Manchuria", "No. 475", "Velvet", "Peatland", "Glabron", "No. 457", "Wisconsin No. 38", "Trebi"] diff --git a/test/groups-test.js b/test/groups-test.js index 6ebb4bfa..1b580330 100644 --- a/test/groups-test.js +++ b/test/groups-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {groups} from "../src/index.js"; @@ -8,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -it("groups(data, accessor) returns the expected array", () => { +test("groups(data, accessor) returns the expected array", () => { assert.deepStrictEqual( groups(data, d => d.name), [ @@ -51,7 +52,7 @@ it("groups(data, accessor) returns the expected array", () => { ); }); -it("groups(data, accessor, accessor) returns the expected array", () => { +test("groups(data, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( groups(data, d => d.name, d => d.amount), [ diff --git a/test/index-test.js b/test/index-test.js index 0afe419d..0ad93787 100644 --- a/test/index-test.js +++ b/test/index-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {index, indexes} from "../src/index.js"; @@ -8,7 +9,7 @@ const data = [ {name: "stacy", amount: 34.05, date: "01/04/2016"} ]; -it("indexes(data, ...keys) returns the expected nested arrays", () => { +test("indexes(data, ...keys) returns the expected nested arrays", () => { assert.deepStrictEqual( indexes(data, d => d.amount), [ @@ -44,7 +45,7 @@ it("indexes(data, ...keys) returns the expected nested arrays", () => { ); }); -it("index(data, ...keys) returns the expected map", () => { +test("index(data, ...keys) returns the expected map", () => { assert.deepStrictEqual( entries(index(data, d => d.amount), 1), indexes(data, d => d.amount) @@ -55,7 +56,7 @@ it("index(data, ...keys) returns the expected map", () => { ); }); -it("index(data, ...keys) throws on a non-unique key", () => { +test("index(data, ...keys) throws on a non-unique key", () => { assert.throws(() => index(data, d => d.name)); assert.throws(() => index(data, d => d.date)); }); diff --git a/test/intersection-test.js b/test/intersection-test.js index eb0cfccf..c8a974ea 100644 --- a/test/intersection-test.js +++ b/test/intersection-test.js @@ -1,23 +1,24 @@ +import {test} from "vitest"; import {intersection} from "../src/index.js"; import {assertSetEqual} from "./asserts.js"; -it("intersection(values) returns a set of values", () => { +test("intersection(values) returns a set of values", () => { assertSetEqual(intersection([1, 2, 3, 2, 1]), [1, 2, 3]); }); -it("intersection(values, other) returns a set of values", () => { +test("intersection(values, other) returns a set of values", () => { assertSetEqual(intersection([1, 2], [2, 3, 1]), [1, 2]); assertSetEqual(intersection([2, 1, 3], [4, 3, 1]), [1, 3]); }); -it("intersection(...values) returns a set of values", () => { +test("intersection(...values) returns a set of values", () => { assertSetEqual(intersection([1, 2], [2, 1], [2, 3]), [2]); }); -it("intersection(...values) accepts iterables", () => { +test("intersection(...values) accepts iterables", () => { assertSetEqual(intersection(new Set([1, 2, 3])), [1, 2, 3]); }); -it("intersection(...values) performs interning", () => { +test("intersection(...values) performs interning", () => { assertSetEqual(intersection([new Date("2021-01-01"), new Date("2021-01-03")], [new Date("2021-01-01"), new Date("2021-01-02")]), [new Date("2021-01-01")]); }); diff --git a/test/least-test.js b/test/least-test.js index bfcd1f76..55759899 100644 --- a/test/least-test.js +++ b/test/least-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {descending, least} from "../src/index.js"; -it("least(array) compares using natural order", () => { +test("least(array) compares using natural order", () => { assert.strictEqual(least([0, 1]), 0); assert.strictEqual(least([1, 0]), 0); assert.strictEqual(least([0, "1"]), 0); @@ -16,7 +17,7 @@ it("least(array) compares using natural order", () => { assert.strictEqual(least([NaN, 10, 2]), 2); }); -it("least(array, compare) compares using the specified compare function", () => { +test("least(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.deepStrictEqual(least([a, b], (a, b) => a.name.localeCompare(b.name)), {name: "a"}); assert.strictEqual(least([1, 0], descending), 1); @@ -26,31 +27,31 @@ it("least(array, compare) compares using the specified compare function", () => assert.strictEqual(least([2, NaN, 10], descending), 10); }); -it("least(array, accessor) uses the specified accessor function", () => { +test("least(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(least([a, b], d => d.name), a); assert.deepStrictEqual(least([a, b], d => d.v), b); }); -it("least(array) returns undefined if the array is empty", () => { +test("least(array) returns undefined if the array is empty", () => { assert.strictEqual(least([]), undefined); }); -it("least(array) returns undefined if the array contains only incomparable values", () => { +test("least(array) returns undefined if the array contains only incomparable values", () => { assert.strictEqual(least([NaN, undefined]), undefined); assert.strictEqual(least([NaN, "foo"], (a, b) => a - b), undefined); }); -it("least(array) returns the first of equal values", () => { +test("least(array) returns the first of equal values", () => { assert.deepStrictEqual(least([2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), ascendingValue), {value: 0, index: 4}); assert.deepStrictEqual(least([3, 2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), descendingValue), {value: 3, index: 0}); }); -it("least(array) ignores null and undefined", () => { +test("least(array) ignores null and undefined", () => { assert.deepStrictEqual(least([null, 2, undefined]), 2); }); -it("least(array, accessor) ignores null and undefined", () => { +test("least(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(least([null, 2, undefined], d => d), 2); }); diff --git a/test/leastIndex-test.js b/test/leastIndex-test.js index c109b645..005c296d 100644 --- a/test/leastIndex-test.js +++ b/test/leastIndex-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {descending, leastIndex} from "../src/index.js"; -it("leastIndex(array) compares using natural order", () => { +test("leastIndex(array) compares using natural order", () => { assert.strictEqual(leastIndex([0, 1]), 0); assert.strictEqual(leastIndex([1, 0]), 1); assert.strictEqual(leastIndex([0, "1"]), 0); @@ -16,7 +17,7 @@ it("leastIndex(array) compares using natural order", () => { assert.strictEqual(leastIndex([NaN, 10, 2]), 2); }); -it("leastIndex(array, compare) compares using the specified compare function", () => { +test("leastIndex(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.strictEqual(leastIndex([a, b], (a, b) => a.name.localeCompare(b.name)), 0); assert.strictEqual(leastIndex([1, 0], descending), 0); @@ -26,30 +27,30 @@ it("leastIndex(array, compare) compares using the specified compare function", ( assert.strictEqual(leastIndex([2, NaN, 10], descending), 2); }); -it("leastIndex(array, accessor) uses the specified accessor function", () => { +test("leastIndex(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(leastIndex([a, b], d => d.name), 0); assert.deepStrictEqual(leastIndex([a, b], d => d.v), 1); }); -it("leastIndex(array) returns -1 if the array is empty", () => { +test("leastIndex(array) returns -1 if the array is empty", () => { assert.strictEqual(leastIndex([]), -1); }); -it("leastIndex(array) returns -1 if the array contains only incomparable values", () => { +test("leastIndex(array) returns -1 if the array contains only incomparable values", () => { assert.strictEqual(leastIndex([NaN, undefined]), -1); assert.strictEqual(leastIndex([NaN, "foo"], (a, b) => a - b), -1); }); -it("leastIndex(array) returns the first of equal values", () => { +test("leastIndex(array) returns the first of equal values", () => { assert.strictEqual(leastIndex([2, 2, 1, 1, 0, 0, 0, 3, 0]), 4); assert.strictEqual(leastIndex([3, 2, 2, 1, 1, 0, 0, 0, 3, 0], descending), 0); }); -it("leastIndex(array) ignores null and undefined", () => { +test("leastIndex(array) ignores null and undefined", () => { assert.deepStrictEqual(leastIndex([null, 2, undefined]), 1); }); -it("leastIndex(array, accessor) ignores null and undefined", () => { +test("leastIndex(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(leastIndex([null, 2, undefined], d => d), 1); }); diff --git a/test/map-test.js b/test/map-test.js index 353c0dca..58c6102d 100644 --- a/test/map-test.js +++ b/test/map-test.js @@ -1,28 +1,29 @@ +import {test} from "vitest"; import assert from "assert"; import {map} from "../src/index.js"; -it("map(values, mapper) returns the mapped values", () => { +test("map(values, mapper) returns the mapped values", () => { assert.deepStrictEqual(map([1, 2, 3, 2, 1], x => x * 2), [2, 4, 6, 4, 2]); }); -it("map(values, mapper) accepts an iterable", () => { +test("map(values, mapper) accepts an iterable", () => { assert.deepStrictEqual(map(new Set([1, 2, 3, 2, 1]), x => x * 2), [2, 4, 6]); assert.deepStrictEqual(map((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x * 2), [2, 4, 6, 4, 2]); }); -it("map(values, mapper) accepts a typed array", () => { +test("map(values, mapper) accepts a typed array", () => { assert.deepStrictEqual(map(Uint8Array.of(1, 2, 3, 2, 1), x => x * 2), [2, 4, 6, 4, 2]); }); -it("map(values, mapper) enforces that test is a function", () => { +test("map(values, mapper) enforces that test is a function", () => { assert.throws(() => map([]), TypeError); }); -it("map(values, mapper) enforces that values is iterable", () => { +test("map(values, mapper) enforces that values is iterable", () => { assert.throws(() => map({}, () => true), TypeError); }); -it("map(values, mapper) passes test (value, index, values)", () => { +test("map(values, mapper) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); map(values, function() { calls.push([this, ...arguments]); }); @@ -35,6 +36,6 @@ it("map(values, mapper) passes test (value, index, values)", () => { ]); }); -it("map(values, mapper) does not skip sparse elements", () => { +test("map(values, mapper) does not skip sparse elements", () => { assert.deepStrictEqual(map([, 1, 2,, ], x => x * 2), [NaN, 2, 4, NaN]); }); diff --git a/test/max-test.js b/test/max-test.js index 2b17d36f..3125d1b3 100644 --- a/test/max-test.js +++ b/test/max-test.js @@ -1,20 +1,21 @@ +import {test} from "vitest"; import assert from "assert"; import {max} from "../src/index.js"; -it("max(array) returns the greatest numeric value for numbers", () => { +test("max(array) returns the greatest numeric value for numbers", () => { assert.deepStrictEqual(max([1]), 1); assert.deepStrictEqual(max([5, 1, 2, 3, 4]), 5); assert.deepStrictEqual(max([20, 3]), 20); assert.deepStrictEqual(max([3, 20]), 20); }); -it("max(array) returns the greatest lexicographic value for strings", () => { +test("max(array) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(max(["c", "a", "b"]), "c"); assert.deepStrictEqual(max(["20", "3"]), "3"); assert.deepStrictEqual(max(["3", "20"]), "3"); }); -it("max(array) ignores null, undefined and NaN", () => { +test("max(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(max([NaN, 1, 2, 3, 4, 5]), 5); assert.deepStrictEqual(max([o, 1, 2, 3, 4, 5]), 5); @@ -24,14 +25,14 @@ it("max(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(max([-1, null, -3, undefined, -5, NaN]), -1); }); -it("max(array) compares heterogenous types as numbers", () => { +test("max(array) compares heterogenous types as numbers", () => { assert.strictEqual(max([20, "3"]), 20); assert.strictEqual(max(["20", 3]), "20"); assert.strictEqual(max([3, "20"]), "20"); assert.strictEqual(max(["3", 20]), 20); }); -it("max(array) returns undefined if the array contains no numbers", () => { +test("max(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(max([]), undefined); assert.strictEqual(max([null]), undefined); assert.strictEqual(max([undefined]), undefined); @@ -39,20 +40,20 @@ it("max(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(max([NaN, NaN]), undefined); }); -it("max(array, f) returns the greatest numeric value for numbers", () => { +test("max(array, f) returns the greatest numeric value for numbers", () => { assert.deepStrictEqual(max([1].map(box), unbox), 1); assert.deepStrictEqual(max([5, 1, 2, 3, 4].map(box), unbox), 5); assert.deepStrictEqual(max([20, 3].map(box), unbox), 20); assert.deepStrictEqual(max([3, 20].map(box), unbox), 20); }); -it("max(array, f) returns the greatest lexicographic value for strings", () => { +test("max(array, f) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(max(["c", "a", "b"].map(box), unbox), "c"); assert.deepStrictEqual(max(["20", "3"].map(box), unbox), "3"); assert.deepStrictEqual(max(["3", "20"].map(box), unbox), "3"); }); -it("max(array, f) ignores null, undefined and NaN", () => { +test("max(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(max([NaN, 1, 2, 3, 4, 5].map(box), unbox), 5); assert.deepStrictEqual(max([o, 1, 2, 3, 4, 5].map(box), unbox), 5); @@ -62,14 +63,14 @@ it("max(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(max([-1, null, -3, undefined, -5, NaN].map(box), unbox), -1); }); -it("max(array, f) compares heterogenous types as numbers", () => { +test("max(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(max([20, "3"].map(box), unbox), 20); assert.strictEqual(max(["20", 3].map(box), unbox), "20"); assert.strictEqual(max([3, "20"].map(box), unbox), "20"); assert.strictEqual(max(["3", 20].map(box), unbox), 20); }); -it("max(array, f) returns undefined if the array contains no observed values", () => { +test("max(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(max([].map(box), unbox), undefined); assert.strictEqual(max([null].map(box), unbox), undefined); assert.strictEqual(max([undefined].map(box), unbox), undefined); @@ -77,14 +78,14 @@ it("max(array, f) returns undefined if the array contains no observed values", ( assert.strictEqual(max([NaN, NaN].map(box), unbox), undefined); }); -it("max(array, f) passes the accessor d, i, and array", () => { +test("max(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; max(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("max(array, f) uses the undefined context", () => { +test("max(array, f) uses the undefined context", () => { const results = []; max([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/maxIndex-test.js b/test/maxIndex-test.js index 6ed831ad..02913c75 100644 --- a/test/maxIndex-test.js +++ b/test/maxIndex-test.js @@ -1,20 +1,21 @@ +import {test} from "vitest"; import assert from "assert"; import {maxIndex} from "../src/index.js"; -it("maxIndex(array) returns the index of the greatest numeric value for numbers", () => { +test("maxIndex(array) returns the index of the greatest numeric value for numbers", () => { assert.deepStrictEqual(maxIndex([1]), 0); assert.deepStrictEqual(maxIndex([5, 1, 2, 3, 4]), 0); assert.deepStrictEqual(maxIndex([20, 3]), 0); assert.deepStrictEqual(maxIndex([3, 20]), 1); }); -it("maxIndex(array) returns the greatest lexicographic value for strings", () => { +test("maxIndex(array) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(maxIndex(["c", "a", "b"]), 0); assert.deepStrictEqual(maxIndex(["20", "3"]), 1); assert.deepStrictEqual(maxIndex(["3", "20"]), 0); }); -it("maxIndex(array) ignores null, undefined and NaN", () => { +test("maxIndex(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(maxIndex([NaN, 1, 2, 3, 4, 5]), 5); assert.deepStrictEqual(maxIndex([o, 1, 2, 3, 4, 5]), 5); @@ -24,14 +25,14 @@ it("maxIndex(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(maxIndex([-1, null, -3, undefined, -5, NaN]), 0); }); -it("maxIndex(array) compares heterogenous types as numbers", () => { +test("maxIndex(array) compares heterogenous types as numbers", () => { assert.strictEqual(maxIndex([20, "3"]), 0); assert.strictEqual(maxIndex(["20", 3]), 0); assert.strictEqual(maxIndex([3, "20"]), 1); assert.strictEqual(maxIndex(["3", 20]), 1); }); -it("maxIndex(array) returns -1 if the array contains no numbers", () => { +test("maxIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(maxIndex([]), -1); assert.strictEqual(maxIndex([null]), -1); assert.strictEqual(maxIndex([undefined]), -1); @@ -39,20 +40,20 @@ it("maxIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(maxIndex([NaN, NaN]), -1); }); -it("maxIndex(array, f) returns the greatest numeric value for numbers", () => { +test("maxIndex(array, f) returns the greatest numeric value for numbers", () => { assert.deepStrictEqual(maxIndex([1].map(box), unbox), 0); assert.deepStrictEqual(maxIndex([5, 1, 2, 3, 4].map(box), unbox), 0); assert.deepStrictEqual(maxIndex([20, 3].map(box), unbox), 0); assert.deepStrictEqual(maxIndex([3, 20].map(box), unbox), 1); }); -it("maxIndex(array, f) returns the greatest lexicographic value for strings", () => { +test("maxIndex(array, f) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(maxIndex(["c", "a", "b"].map(box), unbox), 0); assert.deepStrictEqual(maxIndex(["20", "3"].map(box), unbox), 1); assert.deepStrictEqual(maxIndex(["3", "20"].map(box), unbox), 0); }); -it("maxIndex(array, f) ignores null, undefined and NaN", () => { +test("maxIndex(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(maxIndex([NaN, 1, 2, 3, 4, 5].map(box), unbox), 5); assert.deepStrictEqual(maxIndex([o, 1, 2, 3, 4, 5].map(box), unbox), 5); @@ -62,14 +63,14 @@ it("maxIndex(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(maxIndex([-1, null, -3, undefined, -5, NaN].map(box), unbox), 0); }); -it("maxIndex(array, f) compares heterogenous types as numbers", () => { +test("maxIndex(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(maxIndex([20, "3"].map(box), unbox), 0); assert.strictEqual(maxIndex(["20", 3].map(box), unbox), 0); assert.strictEqual(maxIndex([3, "20"].map(box), unbox), 1); assert.strictEqual(maxIndex(["3", 20].map(box), unbox), 1); }); -it("maxIndex(array, f) returns -1 if the array contains no observed values", () => { +test("maxIndex(array, f) returns -1 if the array contains no observed values", () => { assert.strictEqual(maxIndex([].map(box), unbox), -1); assert.strictEqual(maxIndex([null].map(box), unbox), -1); assert.strictEqual(maxIndex([undefined].map(box), unbox), -1); @@ -77,14 +78,14 @@ it("maxIndex(array, f) returns -1 if the array contains no observed values", () assert.strictEqual(maxIndex([NaN, NaN].map(box), unbox), -1); }); -it("maxIndex(array, f) passes the accessor d, i, and array", () => { +test("maxIndex(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; maxIndex(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("maxIndex(array, f) uses the undefined context", () => { +test("maxIndex(array, f) uses the undefined context", () => { const results = []; maxIndex([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/mean-test.js b/test/mean-test.js index d55c8f64..f1daa1ef 100644 --- a/test/mean-test.js +++ b/test/mean-test.js @@ -1,21 +1,22 @@ +import {test} from "vitest"; import assert from "assert"; import {mean} from "../src/index.js"; import {OneTimeNumber} from "./OneTimeNumber.js"; -it("mean(array) returns the mean value for numbers", () => { +test("mean(array) returns the mean value for numbers", () => { assert.strictEqual(mean([1]), 1); assert.strictEqual(mean([5, 1, 2, 3, 4]), 3); assert.strictEqual(mean([20, 3]), 11.5); assert.strictEqual(mean([3, 20]), 11.5); }); -it("mean(array) ignores null, undefined and NaN", () => { +test("mean(array) ignores null, undefined and NaN", () => { assert.strictEqual(mean([NaN, 1, 2, 3, 4, 5]), 3); assert.strictEqual(mean([1, 2, 3, 4, 5, NaN]), 3); assert.strictEqual(mean([10, null, 3, undefined, 5, NaN]), 6); }); -it("mean(array) returns undefined if the array contains no observed values", () => { +test("mean(array) returns undefined if the array contains no observed values", () => { assert.strictEqual(mean([]), undefined); assert.strictEqual(mean([null]), undefined); assert.strictEqual(mean([undefined]), undefined); @@ -23,33 +24,33 @@ it("mean(array) returns undefined if the array contains no observed values", () assert.strictEqual(mean([NaN, NaN]), undefined); }); -it("mean(array) coerces values to numbers", () => { +test("mean(array) coerces values to numbers", () => { assert.strictEqual(mean(["1"]), 1); assert.strictEqual(mean(["5", "1", "2", "3", "4"]), 3); assert.strictEqual(mean(["20", "3"]), 11.5); assert.strictEqual(mean(["3", "20"]), 11.5); }); -it("mean(array) coerces values exactly once", () => { +test("mean(array) coerces values exactly once", () => { const numbers = [1, new OneTimeNumber(3)]; assert.strictEqual(mean(numbers), 2); assert.strictEqual(mean(numbers), 1); }); -it("mean(array, f) returns the mean value for numbers", () => { +test("mean(array, f) returns the mean value for numbers", () => { assert.strictEqual(mean([1].map(box), unbox), 1); assert.strictEqual(mean([5, 1, 2, 3, 4].map(box), unbox), 3); assert.strictEqual(mean([20, 3].map(box), unbox), 11.5); assert.strictEqual(mean([3, 20].map(box), unbox), 11.5); }); -it("mean(array, f) ignores null, undefined and NaN", () => { +test("mean(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(mean([NaN, 1, 2, 3, 4, 5].map(box), unbox), 3); assert.strictEqual(mean([1, 2, 3, 4, 5, NaN].map(box), unbox), 3); assert.strictEqual(mean([10, null, 3, undefined, 5, NaN].map(box), unbox), 6); }); -it("mean(array, f) returns undefined if the array contains no observed values", () => { +test("mean(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(mean([].map(box), unbox), undefined); assert.strictEqual(mean([null].map(box), unbox), undefined); assert.strictEqual(mean([undefined].map(box), unbox), undefined); @@ -57,27 +58,27 @@ it("mean(array, f) returns undefined if the array contains no observed values", assert.strictEqual(mean([NaN, NaN].map(box), unbox), undefined); }); -it("mean(array, f) coerces values to numbers", () => { +test("mean(array, f) coerces values to numbers", () => { assert.strictEqual(mean(["1"].map(box), unbox), 1); assert.strictEqual(mean(["5", "1", "2", "3", "4"].map(box), unbox), 3); assert.strictEqual(mean(["20", "3"].map(box), unbox), 11.5); assert.strictEqual(mean(["3", "20"].map(box), unbox), 11.5); }); -it("mean(array, f) coerces values exactly once", () => { +test("mean(array, f) coerces values exactly once", () => { const numbers = [1, new OneTimeNumber(3)].map(box); assert.strictEqual(mean(numbers, unbox), 2); assert.strictEqual(mean(numbers, unbox), 1); }); -it("mean(array, f) passes the accessor d, i, and array", () => { +test("mean(array, f) passes the accessor d, i, and array", () => { const results = []; const strings = ["a", "b", "c"]; mean(strings, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, strings], ["b", 1, strings], ["c", 2, strings]]); }); -it("mean(array, f) uses the undefined context", () => { +test("mean(array, f) uses the undefined context", () => { const results = []; mean([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/median-test.js b/test/median-test.js index 78d93f3b..2e948603 100644 --- a/test/median-test.js +++ b/test/median-test.js @@ -1,8 +1,9 @@ +import {test} from "vitest"; import assert from "assert"; import {median, medianIndex} from "../src/index.js"; import {OneTimeNumber} from "./OneTimeNumber.js"; -it("median(array) returns the median value for numbers", () => { +test("median(array) returns the median value for numbers", () => { assert.strictEqual(median([1]), 1); assert.strictEqual(median([5, 1, 2, 3]), 2.5); assert.strictEqual(median([5, 1, 2, 3, 4]), 3); @@ -10,18 +11,18 @@ it("median(array) returns the median value for numbers", () => { assert.strictEqual(median([3, 20]), 11.5); }); -it("median(array) ignores null, undefined and NaN", () => { +test("median(array) ignores null, undefined and NaN", () => { assert.strictEqual(median([NaN, 1, 2, 3, 4, 5]), 3); assert.strictEqual(median([1, 2, 3, 4, 5, NaN]), 3); assert.strictEqual(median([10, null, 3, undefined, 5, NaN]), 5); }); -it("median(array) can handle large numbers without overflowing", () => { +test("median(array) can handle large numbers without overflowing", () => { assert.strictEqual(median([Number.MAX_VALUE, Number.MAX_VALUE]), Number.MAX_VALUE); assert.strictEqual(median([-Number.MAX_VALUE, -Number.MAX_VALUE]), -Number.MAX_VALUE); }); -it("median(array) returns undefined if the array contains no observed values", () => { +test("median(array) returns undefined if the array contains no observed values", () => { assert.strictEqual(median([]), undefined); assert.strictEqual(median([null]), undefined); assert.strictEqual(median([undefined]), undefined); @@ -29,7 +30,7 @@ it("median(array) returns undefined if the array contains no observed values", ( assert.strictEqual(median([NaN, NaN]), undefined); }); -it("median(array) coerces strings to numbers", () => { +test("median(array) coerces strings to numbers", () => { assert.strictEqual(median(["1"]), 1); assert.strictEqual(median(["5", "1", "2", "3", "4"]), 3); assert.strictEqual(median(["20", "3"]), 11.5); @@ -38,31 +39,31 @@ it("median(array) coerces strings to numbers", () => { assert.strictEqual(median(["20", "3", "2"]), 3); }); -it("median(array) coerces values exactly once", () => { +test("median(array) coerces values exactly once", () => { const array = [1, new OneTimeNumber(3)]; assert.strictEqual(median(array), 2); assert.strictEqual(median(array), 1); }); -it("median(array, f) returns the median value for numbers", () => { +test("median(array, f) returns the median value for numbers", () => { assert.strictEqual(median([1].map(box), unbox), 1); assert.strictEqual(median([5, 1, 2, 3, 4].map(box), unbox), 3); assert.strictEqual(median([20, 3].map(box), unbox), 11.5); assert.strictEqual(median([3, 20].map(box), unbox), 11.5); }); -it("median(array, f) ignores null, undefined and NaN", () => { +test("median(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(median([NaN, 1, 2, 3, 4, 5].map(box), unbox), 3); assert.strictEqual(median([1, 2, 3, 4, 5, NaN].map(box), unbox), 3); assert.strictEqual(median([10, null, 3, undefined, 5, NaN].map(box), unbox), 5); }); -it("median(array, f) can handle large numbers without overflowing", () => { +test("median(array, f) can handle large numbers without overflowing", () => { assert.strictEqual(median([Number.MAX_VALUE, Number.MAX_VALUE].map(box), unbox), Number.MAX_VALUE); assert.strictEqual(median([-Number.MAX_VALUE, -Number.MAX_VALUE].map(box), unbox), -Number.MAX_VALUE); }); -it("median(array, f) returns undefined if the array contains no observed values", () => { +test("median(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(median([].map(box), unbox), undefined); assert.strictEqual(median([null].map(box), unbox), undefined); assert.strictEqual(median([undefined].map(box), unbox), undefined); @@ -70,7 +71,7 @@ it("median(array, f) returns undefined if the array contains no observed values" assert.strictEqual(median([NaN, NaN].map(box), unbox), undefined); }); -it("median(array, f) coerces strings to numbers", () => { +test("median(array, f) coerces strings to numbers", () => { assert.strictEqual(median(["1"].map(box), unbox), 1); assert.strictEqual(median(["5", "1", "2", "3", "4"].map(box), unbox), 3); assert.strictEqual(median(["20", "3"].map(box), unbox), 11.5); @@ -79,26 +80,26 @@ it("median(array, f) coerces strings to numbers", () => { assert.strictEqual(median(["20", "3", "2"].map(box), unbox), 3); }); -it("median(array, f) coerces values exactly once", () => { +test("median(array, f) coerces values exactly once", () => { const array = [1, new OneTimeNumber(3)].map(box); assert.strictEqual(median(array, unbox), 2); assert.strictEqual(median(array, unbox), 1); }); -it("median(array, f) passes the accessor d, i, and array", () => { +test("median(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; median(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("median(array, f) uses the undefined context", () => { +test("median(array, f) uses the undefined context", () => { const results = []; median([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); }); -it("medianIndex(array) returns the index", () => { +test("medianIndex(array) returns the index", () => { assert.deepStrictEqual(medianIndex([1, 2]), 0); assert.deepStrictEqual(medianIndex([1, 2, 3]), 1); assert.deepStrictEqual(medianIndex([1, 3, 2]), 2); diff --git a/test/merge-test.js b/test/merge-test.js index 8a0a6dee..7a0210f0 100644 --- a/test/merge-test.js +++ b/test/merge-test.js @@ -1,12 +1,13 @@ +import {test} from "vitest"; import assert from "assert"; import {merge} from "../src/index.js"; -it("merge(arrays) merges an array of arrays", () => { +test("merge(arrays) merges an array of arrays", () => { const a = {}, b = {}, c = {}, d = {}, e = {}, f = {}; assert.deepStrictEqual(merge([[a], [b, c], [d, e, f]]), [a, b, c, d, e, f]); }); -it("merge(arrays) returns a new array when zero arrays are passed", () => { +test("merge(arrays) returns a new array when zero arrays are passed", () => { const input = []; const output = merge(input); assert.deepStrictEqual(output, []); @@ -15,7 +16,7 @@ it("merge(arrays) returns a new array when zero arrays are passed", () => { assert.deepStrictEqual(output, []); }); -it("merge(arrays) returns a new array when one array is passed", () => { +test("merge(arrays) returns a new array when one array is passed", () => { const input = [[1, 2, 3]]; const output = merge(input); assert.deepStrictEqual(output, [1, 2, 3]); @@ -25,7 +26,7 @@ it("merge(arrays) returns a new array when one array is passed", () => { assert.deepStrictEqual(output, [1, 2, 3]); }); -it("merge(arrays) returns a new array when two or more arrays are passed", () => { +test("merge(arrays) returns a new array when two or more arrays are passed", () => { const input = [[1, 2, 3], [4, 5], [6]]; const output = merge(input); assert.deepStrictEqual(output, [1, 2, 3, 4, 5, 6]); @@ -37,7 +38,7 @@ it("merge(arrays) returns a new array when two or more arrays are passed", () => assert.deepStrictEqual(output, [1, 2, 3, 4, 5, 6]); }); -it("merge(arrays) does not modify the input arrays", () => { +test("merge(arrays) does not modify the input arrays", () => { const input = [[1, 2, 3], [4, 5], [6]]; merge(input); assert.deepStrictEqual(input, [[1, 2, 3], [4, 5], [6]]); diff --git a/test/min-test.js b/test/min-test.js index 5ff8f595..ecf90b63 100644 --- a/test/min-test.js +++ b/test/min-test.js @@ -1,20 +1,21 @@ +import {test} from "vitest"; import assert from "assert"; import {min} from "../src/index.js"; -it("min(array) returns the least numeric value for numbers", () => { +test("min(array) returns the least numeric value for numbers", () => { assert.deepStrictEqual(min([1]), 1); assert.deepStrictEqual(min([5, 1, 2, 3, 4]), 1); assert.deepStrictEqual(min([20, 3]), 3); assert.deepStrictEqual(min([3, 20]), 3); }); -it("min(array) returns the least lexicographic value for strings", () => { +test("min(array) returns the least lexicographic value for strings", () => { assert.deepStrictEqual(min(["c", "a", "b"]), "a"); assert.deepStrictEqual(min(["20", "3"]), "20"); assert.deepStrictEqual(min(["3", "20"]), "20"); }); -it("min(array) ignores null, undefined and NaN", () => { +test("min(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(min([NaN, 1, 2, 3, 4, 5]), 1); assert.deepStrictEqual(min([o, 1, 2, 3, 4, 5]), 1); @@ -24,14 +25,14 @@ it("min(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(min([-1, null, -3, undefined, -5, NaN]), -5); }); -it("min(array) compares heterogenous types as numbers", () => { +test("min(array) compares heterogenous types as numbers", () => { assert.strictEqual(min([20, "3"]), "3"); assert.strictEqual(min(["20", 3]), 3); assert.strictEqual(min([3, "20"]), 3); assert.strictEqual(min(["3", 20]), "3"); }); -it("min(array) returns undefined if the array contains no numbers", () => { +test("min(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(min([]), undefined); assert.strictEqual(min([null]), undefined); assert.strictEqual(min([undefined]), undefined); @@ -39,20 +40,20 @@ it("min(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(min([NaN, NaN]), undefined); }); -it("min(array, f) returns the least numeric value for numbers", () => { +test("min(array, f) returns the least numeric value for numbers", () => { assert.deepStrictEqual(min([1].map(box), unbox), 1); assert.deepStrictEqual(min([5, 1, 2, 3, 4].map(box), unbox), 1); assert.deepStrictEqual(min([20, 3].map(box), unbox), 3); assert.deepStrictEqual(min([3, 20].map(box), unbox), 3); }); -it("min(array, f) returns the least lexicographic value for strings", () => { +test("min(array, f) returns the least lexicographic value for strings", () => { assert.deepStrictEqual(min(["c", "a", "b"].map(box), unbox), "a"); assert.deepStrictEqual(min(["20", "3"].map(box), unbox), "20"); assert.deepStrictEqual(min(["3", "20"].map(box), unbox), "20"); }); -it("min(array, f) ignores null, undefined and NaN", () => { +test("min(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(min([NaN, 1, 2, 3, 4, 5].map(box), unbox), 1); assert.deepStrictEqual(min([o, 1, 2, 3, 4, 5].map(box), unbox), 1); @@ -62,14 +63,14 @@ it("min(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(min([-1, null, -3, undefined, -5, NaN].map(box), unbox), -5); }); -it("min(array, f) compares heterogenous types as numbers", () => { +test("min(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(min([20, "3"].map(box), unbox), "3"); assert.strictEqual(min(["20", 3].map(box), unbox), 3); assert.strictEqual(min([3, "20"].map(box), unbox), 3); assert.strictEqual(min(["3", 20].map(box), unbox), "3"); }); -it("min(array, f) returns undefined if the array contains no observed values", () => { +test("min(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(min([].map(box), unbox), undefined); assert.strictEqual(min([null].map(box), unbox), undefined); assert.strictEqual(min([undefined].map(box), unbox), undefined); @@ -77,14 +78,14 @@ it("min(array, f) returns undefined if the array contains no observed values", ( assert.strictEqual(min([NaN, NaN].map(box), unbox), undefined); }); -it("min(array, f) passes the accessor d, i, and array", () => { +test("min(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; min(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("min(array, f) uses the undefined context", () => { +test("min(array, f) uses the undefined context", () => { const results = []; min([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/minIndex-test.js b/test/minIndex-test.js index a4a332dd..842842cf 100644 --- a/test/minIndex-test.js +++ b/test/minIndex-test.js @@ -1,20 +1,21 @@ +import {test} from "vitest"; import assert from "assert"; import {minIndex} from "../src/index.js"; -it("minIndex(array) returns the index of the least numeric value for numbers", () => { +test("minIndex(array) returns the index of the least numeric value for numbers", () => { assert.deepStrictEqual(minIndex([1]), 0); assert.deepStrictEqual(minIndex([5, 1, 2, 3, 4]), 1); assert.deepStrictEqual(minIndex([20, 3]), 1); assert.deepStrictEqual(minIndex([3, 20]), 0); }); -it("minIndex(array) returns the index of the least lexicographic value for strings", () => { +test("minIndex(array) returns the index of the least lexicographic value for strings", () => { assert.deepStrictEqual(minIndex(["c", "a", "b"]), 1); assert.deepStrictEqual(minIndex(["20", "3"]), 0); assert.deepStrictEqual(minIndex(["3", "20"]), 1); }); -it("minIndex(array) ignores null, undefined and NaN", () => { +test("minIndex(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(minIndex([NaN, 1, 2, 3, 4, 5]), 1); assert.deepStrictEqual(minIndex([o, 1, 2, 3, 4, 5]), 1); @@ -24,14 +25,14 @@ it("minIndex(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(minIndex([-1, null, -3, undefined, -5, NaN]), 4); }); -it("minIndex(array) compares heterogenous types as numbers", () => { +test("minIndex(array) compares heterogenous types as numbers", () => { assert.strictEqual(minIndex([20, "3"]), 1); assert.strictEqual(minIndex(["20", 3]), 1); assert.strictEqual(minIndex([3, "20"]), 0); assert.strictEqual(minIndex(["3", 20]), 0); }); -it("minIndex(array) returns -1 if the array contains no numbers", () => { +test("minIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(minIndex([]), -1); assert.strictEqual(minIndex([null]), -1); assert.strictEqual(minIndex([undefined]), -1); @@ -39,20 +40,20 @@ it("minIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(minIndex([NaN, NaN]), -1); }); -it("minIndex(array, f) returns the index of the least numeric value for numbers", () => { +test("minIndex(array, f) returns the index of the least numeric value for numbers", () => { assert.deepStrictEqual(minIndex([1].map(box), unbox), 0); assert.deepStrictEqual(minIndex([5, 1, 2, 3, 4].map(box), unbox), 1); assert.deepStrictEqual(minIndex([20, 3].map(box), unbox), 1); assert.deepStrictEqual(minIndex([3, 20].map(box), unbox), 0); }); -it("minIndex(array, f) returns the index of the least lexicographic value for strings", () => { +test("minIndex(array, f) returns the index of the least lexicographic value for strings", () => { assert.deepStrictEqual(minIndex(["c", "a", "b"].map(box), unbox), 1); assert.deepStrictEqual(minIndex(["20", "3"].map(box), unbox), 0); assert.deepStrictEqual(minIndex(["3", "20"].map(box), unbox), 1); }); -it("minIndex(array, f) ignores null, undefined and NaN", () => { +test("minIndex(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(minIndex([NaN, 1, 2, 3, 4, 5].map(box), unbox), 1); assert.deepStrictEqual(minIndex([o, 1, 2, 3, 4, 5].map(box), unbox), 1); @@ -62,14 +63,14 @@ it("minIndex(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(minIndex([-1, null, -3, undefined, -5, NaN].map(box), unbox), 4); }); -it("minIndex(array, f) compares heterogenous types as numbers", () => { +test("minIndex(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(minIndex([20, "3"].map(box), unbox), 1); assert.strictEqual(minIndex(["20", 3].map(box), unbox), 1); assert.strictEqual(minIndex([3, "20"].map(box), unbox), 0); assert.strictEqual(minIndex(["3", 20].map(box), unbox), 0); }); -it("minIndex(array, f) returns -1 if the array contains no observed values", () => { +test("minIndex(array, f) returns -1 if the array contains no observed values", () => { assert.strictEqual(minIndex([].map(box), unbox), -1); assert.strictEqual(minIndex([null].map(box), unbox), -1); assert.strictEqual(minIndex([undefined].map(box), unbox), -1); @@ -77,14 +78,14 @@ it("minIndex(array, f) returns -1 if the array contains no observed values", () assert.strictEqual(minIndex([NaN, NaN].map(box), unbox), -1); }); -it("minIndex(array, f) passes the accessor d, i, and array", () => { +test("minIndex(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; minIndex(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("minIndex(array, f) uses the undefined context", () => { +test("minIndex(array, f) uses the undefined context", () => { const results = []; minIndex([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/mode-test.js b/test/mode-test.js index 5c1e5c1e..37e9d747 100644 --- a/test/mode-test.js +++ b/test/mode-test.js @@ -1,27 +1,28 @@ +import {test} from "vitest"; import assert from "assert"; import {mode} from "../src/index.js"; -it("mode(array) returns the most frequent value for numbers", () => { +test("mode(array) returns the most frequent value for numbers", () => { assert.strictEqual(mode([1]), 1); assert.strictEqual(mode([5, 1, 1, 3, 4]), 1); }); -it("mode(array) returns the most frequent value for strings", () => { +test("mode(array) returns the most frequent value for strings", () => { assert.strictEqual(mode(["1"]), "1"); assert.strictEqual(mode(["5", "1", "1", "3", "4"]), "1"); }); -it("mode(array) returns the most frequent value for heterogenous types", () => { +test("mode(array) returns the most frequent value for heterogenous types", () => { assert.strictEqual(mode(["1"]), "1"); assert.strictEqual(mode(["5", "1", "1", 2, 2, "2", 1, 1, 1, "3", "4"]), 1); assert.strictEqual(mode(["5", 2, 2, "2", "2", 1, 1, 1, "3", "4"]), 1); }); -it("mode(array) returns the first of the most frequent values", () => { +test("mode(array) returns the first of the most frequent values", () => { assert.strictEqual(mode(["5", "1", "1", "2", "2", "3", "4"]), "1"); }); -it("mode(array) ignores null, undefined and NaN", () => { +test("mode(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.strictEqual(mode([NaN, 1, 1, 3, 4, 5]), 1); assert.strictEqual(mode([o, 1, null, null, 1, null]), 1); @@ -30,7 +31,7 @@ it("mode(array) ignores null, undefined and NaN", () => { assert.strictEqual(mode([1, undefined, undefined, 1, 5, undefined]), 1); }); -it("mode(array) returns undefined if the array contains no comparable values", () => { +test("mode(array) returns undefined if the array contains no comparable values", () => { assert.strictEqual(mode([]), undefined); assert.strictEqual(mode([null]), undefined); assert.strictEqual(mode([undefined]), undefined); @@ -38,26 +39,26 @@ it("mode(array) returns undefined if the array contains no comparable values", ( assert.strictEqual(mode([NaN, NaN]), undefined); }); -it("mode(array, f) returns the most frequent value for numbers", () => { +test("mode(array, f) returns the most frequent value for numbers", () => { assert.strictEqual(mode([1].map(box), unbox), 1); assert.strictEqual(mode([5, 1, 1, 3, 4].map(box), unbox), 1); }); -it("mode(array, f) returns the most frequent value for strings", () => { +test("mode(array, f) returns the most frequent value for strings", () => { assert.strictEqual(mode(["1"].map(box), unbox), "1"); assert.strictEqual(mode(["5", "1", "1", "3", "4"].map(box), unbox), "1"); }); -it("mode(array, f) returns the most frequent value for heterogenous types", () => { +test("mode(array, f) returns the most frequent value for heterogenous types", () => { assert.strictEqual(mode(["1"].map(box), unbox), "1"); assert.strictEqual(mode(["5", "1", "1", 2, 2, "2", 1, 1, 1, "3", "4"].map(box), unbox), 1); }); -it("mode(array, f) returns the first of the most frequent values", () => { +test("mode(array, f) returns the first of the most frequent values", () => { assert.strictEqual(mode(["5", "1", "1", "2", "2", "3", "4"].map(box), unbox), "1"); }); -it("mode(array, f) ignores null, undefined and NaN", () => { +test("mode(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.strictEqual(mode([NaN, 1, 1, 3, 4, 5].map(box), unbox), 1); assert.strictEqual(mode([o, 1, null, null, 1, null].map(box), unbox), 1); @@ -66,7 +67,7 @@ it("mode(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(mode([1, undefined, undefined, 1, 5, undefined].map(box), unbox), 1); }); -it("mode(array, f) returns undefined if the array contains no comparable values", () => { +test("mode(array, f) returns undefined if the array contains no comparable values", () => { assert.strictEqual(mode([].map(box), unbox), undefined); assert.strictEqual(mode([null].map(box), unbox), undefined); assert.strictEqual(mode([undefined].map(box), unbox), undefined); @@ -74,14 +75,14 @@ it("mode(array, f) returns undefined if the array contains no comparable values" assert.strictEqual(mode([NaN, NaN].map(box), unbox), undefined); }); -it("mode(array, f) passes the accessor d, i, and array", () => { +test("mode(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; mode(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("mode(array, f) uses the undefined context", () => { +test("mode(array, f) uses the undefined context", () => { const results = []; mode([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/nice-test.js b/test/nice-test.js index bbc4f708..d41ea6f4 100644 --- a/test/nice-test.js +++ b/test/nice-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {nice} from "../src/index.js"; -it("nice(start, stop, count) returns [start, stop] if any argument is NaN", () => { +test("nice(start, stop, count) returns [start, stop] if any argument is NaN", () => { assert.deepStrictEqual(nice(NaN, 1, 1), [NaN, 1]); assert.deepStrictEqual(nice(0, NaN, 1), [0, NaN]); assert.deepStrictEqual(nice(0, 1, NaN), [0, 1]); @@ -11,7 +12,7 @@ it("nice(start, stop, count) returns [start, stop] if any argument is NaN", () = assert.deepStrictEqual(nice(NaN, NaN, NaN), [NaN, NaN]); }); -it("nice(start, stop, count) returns [start, stop] if start === stop", () => { +test("nice(start, stop, count) returns [start, stop] if start === stop", () => { assert.deepStrictEqual(nice(1, 1, -1), [1, 1]); assert.deepStrictEqual(nice(1, 1, 0), [1, 1]); assert.deepStrictEqual(nice(1, 1, NaN), [1, 1]); @@ -19,16 +20,16 @@ it("nice(start, stop, count) returns [start, stop] if start === stop", () => { assert.deepStrictEqual(nice(1, 1, 10), [1, 1]); }); -it("nice(start, stop, count) returns [start, stop] if count is not positive", () => { +test("nice(start, stop, count) returns [start, stop] if count is not positive", () => { assert.deepStrictEqual(nice(0, 1, -1), [0, 1]); assert.deepStrictEqual(nice(0, 1, 0), [0, 1]); }); -it("nice(start, stop, count) returns [start, stop] if count is infinity", () => { +test("nice(start, stop, count) returns [start, stop] if count is infinity", () => { assert.deepStrictEqual(nice(0, 1, Infinity), [0, 1]); }); -it("nice(start, stop, count) returns the expected values", () => { +test("nice(start, stop, count) returns the expected values", () => { assert.deepStrictEqual(nice(0.132, 0.876, 1000), [0.132, 0.876]); assert.deepStrictEqual(nice(0.132, 0.876, 100), [0.13, 0.88]); assert.deepStrictEqual(nice(0.132, 0.876, 30), [0.12, 0.88]); diff --git a/test/pairs-test.js b/test/pairs-test.js index c99cd3f8..43e884e5 100644 --- a/test/pairs-test.js +++ b/test/pairs-test.js @@ -1,23 +1,24 @@ +import {test} from "vitest"; import assert from "assert"; import {pairs} from "../src/index.js"; -it("pairs(array) returns the empty array if input array has fewer than two elements", () => { +test("pairs(array) returns the empty array if input array has fewer than two elements", () => { assert.deepStrictEqual(pairs([]), []); assert.deepStrictEqual(pairs([1]), []); }); -it("pairs(array) returns pairs of adjacent elements in the given array", () => { +test("pairs(array) returns pairs of adjacent elements in the given array", () => { const a = {}, b = {}, c = {}, d = {}; assert.deepStrictEqual(pairs([1, 2]), [[1, 2]]); assert.deepStrictEqual(pairs([1, 2, 3]), [[1, 2], [2, 3]]); assert.deepStrictEqual(pairs([a, b, c, d]), [[a, b], [b, c], [c, d]]); }); -it("pairs(array, f) invokes the function f for each pair of adjacent elements", () => { +test("pairs(array, f) invokes the function f for each pair of adjacent elements", () => { assert.deepStrictEqual(pairs([1, 3, 7], (a, b) => b - a), [2, 4]); }); -it("pairs(array) includes null or undefined elements in pairs", () => { +test("pairs(array) includes null or undefined elements in pairs", () => { assert.deepStrictEqual(pairs([1, null, 2]), [[1, null], [null, 2]]); assert.deepStrictEqual(pairs([1, 2, undefined]), [[1, 2], [2, undefined]]); }); diff --git a/test/permute-test.js b/test/permute-test.js index a8297472..0bc24a2f 100644 --- a/test/permute-test.js +++ b/test/permute-test.js @@ -1,50 +1,51 @@ +import {test} from "vitest"; import assert from "assert"; import {permute} from "../src/index.js"; -it("permute(…) permutes according to the specified index", () => { +test("permute(…) permutes according to the specified index", () => { assert.deepStrictEqual(permute([3, 4, 5], [2, 1, 0]), [5, 4, 3]); assert.deepStrictEqual(permute([3, 4, 5], [2, 0, 1]), [5, 3, 4]); assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 2]), [3, 4, 5]); }); -it("permute(…) does not modify the input array", () => { +test("permute(…) does not modify the input array", () => { const input = [3, 4, 5]; permute(input, [2, 1, 0]); assert.deepStrictEqual(input, [3, 4, 5]); }); -it("permute(…) can duplicate input values", () => { +test("permute(…) can duplicate input values", () => { assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 0]), [3, 4, 3]); assert.deepStrictEqual(permute([3, 4, 5], [2, 2, 2]), [5, 5, 5]); assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 1]), [3, 4, 4]); }); -it("permute(…) can return more elements", () => { +test("permute(…) can return more elements", () => { assert.deepStrictEqual(permute([3, 4, 5], [0, 0, 1, 2]), [3, 3, 4, 5]); assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 1, 1]), [3, 4, 4, 4]); }); -it("permute(…) can return fewer elements", () => { +test("permute(…) can return fewer elements", () => { assert.deepStrictEqual(permute([3, 4, 5], [0]), [3]); assert.deepStrictEqual(permute([3, 4, 5], [1, 2]), [4, 5]); assert.deepStrictEqual(permute([3, 4, 5], []), []); }); -it("permute(…) can return undefined elements", () => { +test("permute(…) can return undefined elements", () => { assert.deepStrictEqual(permute([3, 4, 5], [10]), [undefined]); assert.deepStrictEqual(permute([3, 4, 5], [-1]), [undefined]); assert.deepStrictEqual(permute([3, 4, 5], [0, -1]), [3, undefined]); }); -it("permute(…) can take an object as the source", () => { +test("permute(…) can take an object as the source", () => { assert.deepStrictEqual(permute({foo: 1, bar: 2}, ["bar", "foo"]), [2, 1]); }); -it("permute(…) can take a typed array as the source", () => { +test("permute(…) can take a typed array as the source", () => { assert.deepStrictEqual(permute(Float32Array.of(1, 2), [0, 0, 1, 0]), [1, 1, 2, 1]); assert.strictEqual(Array.isArray(permute(Float32Array.of(1, 2), [0])), true); }); -it("permute(…) can take an iterable as the keys", () => { +test("permute(…) can take an iterable as the keys", () => { assert.deepStrictEqual(permute({foo: 1, bar: 2}, new Set(["bar", "foo"])), [2, 1]); }); diff --git a/test/quantile-test.js b/test/quantile-test.js index 4b0d0ecf..b035f08e 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {quantile, quantileIndex, quantileSorted} from "../src/index.js"; -it("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", () => { +test("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", () => { assert.strictEqual(quantileSorted([1, 2, 3, 4], 0), 1); assert.strictEqual(quantileSorted([1, 2, 3, 4], 1), 4); assert.strictEqual(quantileSorted([4, 3, 2, 1], 0), 4); @@ -12,11 +13,11 @@ it("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", ( assert.strictEqual(quantile([4, 3, 2, 1], 1), 4); }); -it("quantile() accepts an iterable", () => { +test("quantile() accepts an iterable", () => { assert.strictEqual(quantile(new Set([1, 2, 3, 4]), 1), 4); }); -it("quantile(array, p) uses the R-7 method", () => { +test("quantile(array, p) uses the R-7 method", () => { const even = [3, 6, 7, 8, 8, 10, 13, 15, 16, 20]; assert.strictEqual(quantile(even, 0), 3); assert.strictEqual(quantile(even, 0.25), 7.25); @@ -31,7 +32,7 @@ it("quantile(array, p) uses the R-7 method", () => { assert.strictEqual(quantile(odd, 1), 20); }); -it("quantile(array, p) coerces values to numbers", () => { +test("quantile(array, p) coerces values to numbers", () => { const strings = ["1", "2", "3", "4"]; assert.strictEqual(quantile(strings, 1 / 3), 2); assert.strictEqual(quantile(strings, 1 / 2), 2.5); @@ -42,13 +43,13 @@ it("quantile(array, p) coerces values to numbers", () => { assert.strictEqual(quantile(dates, 1), +new Date(Date.UTC(2012, 0, 1))); }); -it("quantile(array, p) returns an exact value for integer p-values", () => { +test("quantile(array, p) returns an exact value for integer p-values", () => { const data = [1, 2, 3, 4]; assert.strictEqual(quantile(data, 1 / 3), 2); assert.strictEqual(quantile(data, 2 / 3), 3); }); -it("quantile(array, p) returns the expected value for integer or fractional p", () => { +test("quantile(array, p) returns the expected value for integer or fractional p", () => { const data = [3, 1, 2, 4, 0]; assert.strictEqual(quantile(data, 0 / 4), 0); assert.strictEqual(quantile(data, 0.1 / 4), 0.1); @@ -61,24 +62,24 @@ it("quantile(array, p) returns the expected value for integer or fractional p", assert.strictEqual(quantile(data, 4 / 4), 4); }); -it("quantile(array, p) returns the first value for p = 0", () => { +test("quantile(array, p) returns the first value for p = 0", () => { const data = [1, 2, 3, 4]; assert.strictEqual(quantile(data, 0), 1); }); -it("quantile(array, p) returns the last value for p = 1", () => { +test("quantile(array, p) returns the last value for p = 1", () => { const data = [1, 2, 3, 4]; assert.strictEqual(quantile(data, 1), 4); }); -it("quantile(array, p) returns undefined if p is not a number", () => { +test("quantile(array, p) returns undefined if p is not a number", () => { assert.strictEqual(quantile([1, 2, 3]), undefined); assert.strictEqual(quantile([1, 2, 3], "no"), undefined); assert.strictEqual(quantile([1, 2, 3], NaN), undefined); assert.strictEqual(quantile([1, 2, 3], null), 1); // +null is 0 }); -it("quantile(array, p, f) observes the specified accessor", () => { +test("quantile(array, p, f) observes the specified accessor", () => { assert.strictEqual(quantile([1, 2, 3, 4].map(box), 0.5, unbox), 2.5); assert.strictEqual(quantile([1, 2, 3, 4].map(box), 0, unbox), 1); assert.strictEqual(quantile([1, 2, 3, 4].map(box), 1, unbox), 4); @@ -90,7 +91,7 @@ it("quantile(array, p, f) observes the specified accessor", () => { assert.strictEqual(quantile([], 1, unbox), undefined); }); -it("quantileIndex(array, p) returns the index", () => { +test("quantileIndex(array, p) returns the index", () => { assert.deepStrictEqual(quantileIndex([1, 2], 0.2), 0); assert.deepStrictEqual(quantileIndex([1, 2, 3], 0.2), 0); assert.deepStrictEqual(quantileIndex([1, 3, 2], 0.2), 0); @@ -99,7 +100,7 @@ it("quantileIndex(array, p) returns the index", () => { assert.deepStrictEqual(quantileIndex([], 0.2), -1); }); -it("quantileIndex(array, 0) returns the minimum index", () => { +test("quantileIndex(array, 0) returns the minimum index", () => { assert.deepStrictEqual(quantileIndex([1, 2], 0), 0); assert.deepStrictEqual(quantileIndex([1, 2, 3], 0), 0); assert.deepStrictEqual(quantileIndex([1, 3, 2], 0), 0); @@ -108,7 +109,7 @@ it("quantileIndex(array, 0) returns the minimum index", () => { assert.deepStrictEqual(quantileIndex([], 0), -1); }); -it("quantileIndex(array, 1) returns the maximum index", () => { +test("quantileIndex(array, 1) returns the maximum index", () => { assert.deepStrictEqual(quantileIndex([1, 2], 1), 1); assert.deepStrictEqual(quantileIndex([1, 2, 3], 1), 2); assert.deepStrictEqual(quantileIndex([1, 3, 2], 1), 1); @@ -117,12 +118,12 @@ it("quantileIndex(array, 1) returns the maximum index", () => { assert.deepStrictEqual(quantileIndex([], 1), -1); }); -it("quantileIndex(array, 0.5) handles undefined values", () => { +test("quantileIndex(array, 0.5) handles undefined values", () => { assert.deepStrictEqual(quantileIndex([1, 1, 1, null, 2, 3, 3, 3], 0.5), 4); assert.deepStrictEqual(quantileIndex([1, 1, 1, null, 2, 3, 3, 3], 0.5, (d) => d), 4); }); -it("quantileIndex(array, 0.5) returns the first of equivalent values", () => { +test("quantileIndex(array, 0.5) returns the first of equivalent values", () => { assert.deepStrictEqual(quantileIndex([1, 1, 1, 2, 2, 3, 3, 3], 0.5), 4); }); diff --git a/test/quickselect-test.js b/test/quickselect-test.js index d279fb34..f75a1cdc 100644 --- a/test/quickselect-test.js +++ b/test/quickselect-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {quickselect} from "../src/index.js"; -it("quickselect(array, k) does nothing if k is not a number", () => { +test("quickselect(array, k) does nothing if k is not a number", () => { const array = [3, 1, 2]; assert.strictEqual(quickselect(array), array); assert.deepStrictEqual(array, [3, 1, 2]); @@ -15,7 +16,7 @@ it("quickselect(array, k) does nothing if k is not a number", () => { assert.deepStrictEqual(array, [1, 2, 3]); }); -it("quickselect(array, k) does nothing if k is less than left", () => { +test("quickselect(array, k) does nothing if k is less than left", () => { const array = [3, 1, 2]; assert.strictEqual(quickselect(array, -1), array); assert.deepStrictEqual(array, [3, 1, 2]); @@ -23,7 +24,7 @@ it("quickselect(array, k) does nothing if k is less than left", () => { assert.deepStrictEqual(array, [3, 1, 2]); }); -it("quickselect(array, k) does nothing if k is greater than right", () => { +test("quickselect(array, k) does nothing if k is greater than right", () => { const array = [3, 1, 2]; assert.strictEqual(quickselect(array, 3), array); assert.deepStrictEqual(array, [3, 1, 2]); @@ -31,7 +32,7 @@ it("quickselect(array, k) does nothing if k is greater than right", () => { assert.deepStrictEqual(array, [3, 1, 2]); }); -it("quickselect(array, k) implicitly floors k, left, and right", () => { +test("quickselect(array, k) implicitly floors k, left, and right", () => { assert.deepStrictEqual(quickselect([3, 1, 2], 0.5), [1, 2, 3]); assert.deepStrictEqual(quickselect([3, 1, 2, 5, 4], 4.1), [3, 1, 2, 4, 5]); assert.deepStrictEqual(quickselect([3, 1, 2], 0, 0.5), [1, 2, 3]); diff --git a/test/range-test.js b/test/range-test.js index 306f5787..4a782b7c 100644 --- a/test/range-test.js +++ b/test/range-test.js @@ -1,32 +1,33 @@ +import {test} from "vitest"; import assert from "assert"; import {range} from "../src/index.js"; -it("range(stop) returns [0, 1, 2, … stop - 1]", () => { +test("range(stop) returns [0, 1, 2, … stop - 1]", () => { assert.deepStrictEqual(range(5), [0, 1, 2, 3, 4]); assert.deepStrictEqual(range(2.01), [0, 1, 2]); assert.deepStrictEqual(range(1), [0]); assert.deepStrictEqual(range(.5), [0]); }); -it("range(stop) returns an empty array if stop <= 0", () => { +test("range(stop) returns an empty array if stop <= 0", () => { assert.deepStrictEqual(range(0), []); assert.deepStrictEqual(range(-0.5), []); assert.deepStrictEqual(range(-1), []); }); -it("range(stop) returns an empty array if stop is NaN", () => { +test("range(stop) returns an empty array if stop is NaN", () => { assert.deepStrictEqual(range(NaN), []); assert.deepStrictEqual(range(), []); }); -it("range(start, stop) returns [start, start + 1, … stop - 1]", () => { +test("range(start, stop) returns [start, start + 1, … stop - 1]", () => { assert.deepStrictEqual(range(0, 5), [0, 1, 2, 3, 4]); assert.deepStrictEqual(range(2, 5), [2, 3, 4]); assert.deepStrictEqual(range(2.5, 5), [2.5, 3.5, 4.5]); assert.deepStrictEqual(range(-1, 3), [-1, 0, 1, 2]); }); -it("range(start, stop) returns an empty array if start or stop is NaN", () => { +test("range(start, stop) returns an empty array if start or stop is NaN", () => { assert.deepStrictEqual(range(0, NaN), []); assert.deepStrictEqual(range(1, NaN), []); assert.deepStrictEqual(range(-1, NaN), []); @@ -43,7 +44,7 @@ it("range(start, stop) returns an empty array if start or stop is NaN", () => { assert.deepStrictEqual(range(undefined, undefined), []); }); -it("range(start, stop) returns an empty array if start >= stop", () => { +test("range(start, stop) returns an empty array if start >= stop", () => { assert.deepStrictEqual(range(0, 0), []); assert.deepStrictEqual(range(5, 5), []); assert.deepStrictEqual(range(6, 5), []); @@ -51,21 +52,21 @@ it("range(start, stop) returns an empty array if start >= stop", () => { assert.deepStrictEqual(range(20, 10), []); }); -it("range(start, stop, step) returns [start, start + step, start + 2 * step, … stop - step]", () => { +test("range(start, stop, step) returns [start, start + step, start + 2 * step, … stop - step]", () => { assert.deepStrictEqual(range(0, 5, 1), [0, 1, 2, 3, 4]); assert.deepStrictEqual(range(0, 5, 2), [0, 2, 4]); assert.deepStrictEqual(range(2, 5, 2), [2, 4]); assert.deepStrictEqual(range(-1, 3, 2), [-1, 1]); }); -it("range(start, stop, step) allows a negative step", () => { +test("range(start, stop, step) allows a negative step", () => { assert.deepStrictEqual(range(5, 0, -1), [5, 4, 3, 2, 1]); assert.deepStrictEqual(range(5, 0, -2), [5, 3, 1]); assert.deepStrictEqual(range(5, 2, -2), [5, 3]); assert.deepStrictEqual(range(3, -1, -2), [3, 1]); }); -it("range(start, stop, step) returns an empty array if start >= stop and step > 0", () => { +test("range(start, stop, step) returns an empty array if start >= stop and step > 0", () => { assert.deepStrictEqual(range(5, 5, 2), []); assert.deepStrictEqual(range(6, 5, 2), []); assert.deepStrictEqual(range(10, 10, 1), []); @@ -77,7 +78,7 @@ it("range(start, stop, step) returns an empty array if start >= stop and step > assert.deepStrictEqual(range(20, 10, 0.5), []); }); -it("range(start, stop, step) returns an empty array if start >= stop and step < 0", () => { +test("range(start, stop, step) returns an empty array if start >= stop and step < 0", () => { assert.deepStrictEqual(range(5, 5, -2), []); assert.deepStrictEqual(range(5, 6, -2), []); assert.deepStrictEqual(range(10, 10, -1), []); @@ -89,7 +90,7 @@ it("range(start, stop, step) returns an empty array if start >= stop and step < assert.deepStrictEqual(range(10, 20, -0.5), []); }); -it("range(start, stop, step) returns an empty array if start, stop or step is NaN", () => { +test("range(start, stop, step) returns an empty array if start, stop or step is NaN", () => { assert.deepStrictEqual(range(NaN, 3, 2), []); assert.deepStrictEqual(range(3, NaN, 2), []); assert.deepStrictEqual(range(0, 5, NaN), []); @@ -102,23 +103,23 @@ it("range(start, stop, step) returns an empty array if start, stop or step is Na assert.deepStrictEqual(range(10, 0, undefined), []); }); -it("range(start, stop, step) returns an empty array if step is zero", () => { +test("range(start, stop, step) returns an empty array if step is zero", () => { assert.deepStrictEqual(range(0, 5, 0), []); }); -it("range(start, stop, step) returns exactly [start + step * i, …] for fractional steps", () => { +test("range(start, stop, step) returns exactly [start + step * i, …] for fractional steps", () => { assert.deepStrictEqual(range(0, 0.5, 0.1), [0 + 0.1 * 0, 0 + 0.1 * 1, 0 + 0.1 * 2, 0 + 0.1 * 3, 0 + 0.1 * 4]); assert.deepStrictEqual(range(0.5, 0, -0.1), [0.5 - 0.1 * 0, 0.5 - 0.1 * 1, 0.5 - 0.1 * 2, 0.5 - 0.1 * 3, 0.5 - 0.1 * 4]); assert.deepStrictEqual(range(-2, -1.2, 0.1), [-2 + 0.1 * 0, -2 + 0.1 * 1, -2 + 0.1 * 2, -2 + 0.1 * 3, -2 + 0.1 * 4, -2 + 0.1 * 5, -2 + 0.1 * 6, -2 + 0.1 * 7]); assert.deepStrictEqual(range(-1.2, -2, -0.1), [-1.2 - 0.1 * 0, -1.2 - 0.1 * 1, -1.2 - 0.1 * 2, -1.2 - 0.1 * 3, -1.2 - 0.1 * 4, -1.2 - 0.1 * 5, -1.2 - 0.1 * 6, -1.2 - 0.1 * 7]); }); -it("range(start, stop, step) returns exactly [start + step * i, …] for very small fractional steps", () => { +test("range(start, stop, step) returns exactly [start + step * i, …] for very small fractional steps", () => { assert.deepStrictEqual(range(2.1e-31, 5e-31, 1.1e-31), [2.1e-31 + 1.1e-31 * 0, 2.1e-31 + 1.1e-31 * 1, 2.1e-31 + 1.1e-31 * 2]); assert.deepStrictEqual(range(5e-31, 2.1e-31, -1.1e-31), [5e-31 - 1.1e-31 * 0, 5e-31 - 1.1e-31 * 1, 5e-31 - 1.1e-31 * 2]); }); -it("range(start, stop, step) returns exactly [start + step * i, …] for very large fractional steps", () => { +test("range(start, stop, step) returns exactly [start + step * i, …] for very large fractional steps", () => { assert.deepStrictEqual(range(1e300, 2e300, 0.3e300), [1e300 + 0.3e300 * 0, 1e300 + 0.3e300 * 1, 1e300 + 0.3e300 * 2, 1e300 + 0.3e300 * 3]); assert.deepStrictEqual(range(2e300, 1e300, -0.3e300), [2e300 - 0.3e300 * 0, 2e300 - 0.3e300 * 1, 2e300 - 0.3e300 * 2, 2e300 - 0.3e300 * 3]); }); diff --git a/test/rank-test.js b/test/rank-test.js index 9e2d4c46..0310c083 100644 --- a/test/rank-test.js +++ b/test/rank-test.js @@ -1,48 +1,49 @@ +import {test} from "vitest"; import assert from "assert"; import ascending from "../src/ascending.js"; import descending from "../src/descending.js"; import rank from "../src/rank.js"; -it("rank(numbers) returns the rank of numbers", () => { +test("rank(numbers) returns the rank of numbers", () => { assert.deepStrictEqual(rank([1000, 10, 0]), Float64Array.of(2, 1, 0)); assert.deepStrictEqual(rank([1.2, 1.1, 1.2, 1.0, 1.5, 1.2]), Float64Array.of(2, 1, 2, 0, 5, 2)); }); -it("rank(strings) returns the rank of letters", () => { +test("rank(strings) returns the rank of letters", () => { assert.deepStrictEqual(rank([..."EDGFCBA"]), Float64Array.of(4, 3, 6, 5, 2, 1, 0)); assert.deepStrictEqual(rank("EDGFCBA"), Float64Array.of(4, 3, 6, 5, 2, 1, 0)); }); -it("rank(dates) returns the rank of Dates", () => { +test("rank(dates) returns the rank of Dates", () => { assert.deepStrictEqual(rank([new Date("2000-01-01"), new Date("2000-01-01"), new Date("1999-01-01"), new Date("2001-01-01")]), Float64Array.of(1, 1, 0, 3)); }); -it("rank(iterator) accepts an iterator", () => { +test("rank(iterator) accepts an iterator", () => { assert.deepStrictEqual(rank(new Set(["B", "C", "A"])), Float64Array.of(1, 2, 0)); }); -it("rank(undefineds) ranks undefined as NaN", () => { +test("rank(undefineds) ranks undefined as NaN", () => { assert.deepStrictEqual(rank([1.2, 1.1, undefined, 1.0, undefined, 1.5]), Float64Array.of(2, 1, NaN, 0, NaN, 3)); assert.deepStrictEqual(rank([, null, , 1.2, 1.1, undefined, 1.0, NaN, 1.5]), Float64Array.of(NaN, NaN, NaN, 2, 1, NaN, 0, NaN, 3)); }); -it("rank(values, valueof) accepts an accessor", () => { +test("rank(values, valueof) accepts an accessor", () => { assert.deepStrictEqual(rank([{x: 3}, {x: 1}, {x: 2}, {x: 4}, {}], d => d.x), Float64Array.of(2, 0, 1, 3, NaN)); }); -it("rank(values, compare) accepts a comparator", () => { +test("rank(values, compare) accepts a comparator", () => { assert.deepStrictEqual(rank([{x: 3}, {x: 1}, {x: 2}, {x: 4}, {}], (a, b) => a.x - b.x), Float64Array.of(2, 0, 1, 3, NaN)); assert.deepStrictEqual(rank([{x: 3}, {x: 1}, {x: 2}, {x: 4}, {}], (a, b) => b.x - a.x), Float64Array.of(1, 3, 2, 0, NaN)); assert.deepStrictEqual(rank(["aa", "ba", "bc", "bb", "ca"], (a, b) => ascending(a[0], b[0]) || ascending(a[1], b[1])), Float64Array.of(0, 1, 3, 2, 4)); assert.deepStrictEqual(rank(["A", null, "B", "C", "D"], descending), Float64Array.of(3, NaN, 2, 1, 0)); }); -it("rank(values) computes the ties as expected", () => { +test("rank(values) computes the ties as expected", () => { assert.deepStrictEqual(rank(["a", "b", "b", "b", "c"]), Float64Array.of(0, 1, 1, 1, 4)); assert.deepStrictEqual(rank(["a", "b", "b", "b", "b", "c"]), Float64Array.of(0, 1, 1, 1, 1, 5)); }); -it("rank(values) handles NaNs as expected", () => { +test("rank(values) handles NaNs as expected", () => { assert.deepStrictEqual(rank(["a", "b", "b", "b", "c", null]), Float64Array.of(0, 1, 1, 1, 4, NaN)); assert.deepStrictEqual(rank(["a", "b", "b", "b", "b", "c", null]), Float64Array.of(0, 1, 1, 1, 1, 5, NaN)); }); diff --git a/test/reduce-test.js b/test/reduce-test.js index d521c56d..8daa65f1 100644 --- a/test/reduce-test.js +++ b/test/reduce-test.js @@ -1,35 +1,36 @@ +import {test} from "vitest"; import assert from "assert"; import {reduce} from "../src/index.js"; -it("reduce(values, reducer) returns the reduced value", () => { +test("reduce(values, reducer) returns the reduced value", () => { assert.strictEqual(reduce([1, 2, 3, 2, 1], (p, v) => p + v), 9); assert.strictEqual(reduce([1, 2], (p, v) => p + v), 3); assert.strictEqual(reduce([1], (p, v) => p + v), 1); assert.strictEqual(reduce([], (p, v) => p + v), undefined); }); -it("reduce(values, reducer, initial) returns the reduced value", () => { +test("reduce(values, reducer, initial) returns the reduced value", () => { assert.strictEqual(reduce([1, 2, 3, 2, 1], (p, v) => p + v, 0), 9); assert.strictEqual(reduce([1], (p, v) => p + v, 0), 1); assert.strictEqual(reduce([], (p, v) => p + v, 0), 0); assert.deepStrictEqual(reduce([1, 2, 3, 2, 1], (p, v) => p.concat(v), []), [1, 2, 3, 2, 1]); }); -it("reduce(values, reducer) accepts an iterable", () => { +test("reduce(values, reducer) accepts an iterable", () => { assert.strictEqual(reduce(new Set([1, 2, 3, 2, 1]), (p, v) => p + v), 6); assert.strictEqual(reduce((function*() { yield* [1, 2, 3, 2, 1]; })(), (p, v) => p + v), 9); assert.strictEqual(reduce(Uint8Array.of(1, 2, 3, 2, 1), (p, v) => p + v), 9); }); -it("reduce(values, reducer) enforces that test is a function", () => { +test("reduce(values, reducer) enforces that test is a function", () => { assert.throws(() => reduce([]), TypeError); }); -it("reduce(values, reducer) enforces that values is iterable", () => { +test("reduce(values, reducer) enforces that values is iterable", () => { assert.throws(() => reduce({}, () => true), TypeError); }); -it("reduce(values, reducer) passes reducer (reduced, value, index, values)", () => { +test("reduce(values, reducer) passes reducer (reduced, value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); reduce(values, function(p, v) { calls.push([this, ...arguments]); return p + v; }); @@ -41,7 +42,7 @@ it("reduce(values, reducer) passes reducer (reduced, value, index, values)", () ]); }); -it("reduce(values, reducer, initial) passes reducer (reduced, value, index, values)", () => { +test("reduce(values, reducer, initial) passes reducer (reduced, value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); reduce(values, function(p, v) { calls.push([this, ...arguments]); return p + v; }, 0); @@ -54,6 +55,6 @@ it("reduce(values, reducer, initial) passes reducer (reduced, value, index, valu ]); }); -it("reduce(values, reducer, initial) does not skip sparse elements", () => { +test("reduce(values, reducer, initial) does not skip sparse elements", () => { assert.strictEqual(reduce([, 1, 2,, ], (p, v) => p + (v === undefined ? -1 : v), 0), 1); }); diff --git a/test/reverse-test.js b/test/reverse-test.js index 7c766846..947dee39 100644 --- a/test/reverse-test.js +++ b/test/reverse-test.js @@ -1,26 +1,27 @@ +import {test} from "vitest"; import assert from "assert"; import {reverse} from "../src/index.js"; -it("reverse(values) returns a reversed copy", () => { +test("reverse(values) returns a reversed copy", () => { const input = [1, 3, 2, 5, 4]; assert.deepStrictEqual(reverse(input), [4, 5, 2, 3, 1]); assert.deepStrictEqual(input, [1, 3, 2, 5, 4]); // does not mutate }); -it("reverse(values) returns an array", () => { +test("reverse(values) returns an array", () => { assert.strictEqual(Array.isArray(reverse(Uint8Array.of(1, 2))), true); }); -it("reverse(values) accepts an iterable", () => { +test("reverse(values) accepts an iterable", () => { assert.deepStrictEqual(reverse(new Set([1, 2, 3, 2, 1])), [3, 2, 1]); assert.deepStrictEqual(reverse((function*() { yield* [1, 3, 2, 5, 4]; })()), [4, 5, 2, 3, 1]); assert.deepStrictEqual(reverse(Uint8Array.of(1, 3, 2, 5, 4)), [4, 5, 2, 3, 1]); }); -it("reverse(values) enforces that values is iterable", () => { +test("reverse(values) enforces that values is iterable", () => { assert.throws(() => reverse({}), TypeError); }); -it("reverse(values) does not skip sparse elements", () => { +test("reverse(values) does not skip sparse elements", () => { assert.deepStrictEqual(reverse([, 1, 2,, ]), [undefined, 2, 1, undefined]); }); diff --git a/test/rollup-test.js b/test/rollup-test.js index d8d0d685..9976a452 100644 --- a/test/rollup-test.js +++ b/test/rollup-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {rollup, sum} from "../src/index.js"; @@ -8,7 +9,7 @@ const data = [ {name: "stacy", amount: "3405", date: "01/04/2016"} ]; -it("rollup(data, reduce, accessor) returns the expected map", () => { +test("rollup(data, reduce, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(rollup(data, v => v.length, d => d.name), 1), [ @@ -27,7 +28,7 @@ it("rollup(data, reduce, accessor) returns the expected map", () => { ); }); -it("rollup(data, reduce, accessor, accessor) returns the expected map", () => { +test("rollup(data, reduce, accessor, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(rollup(data, v => v.length, d => d.name, d => d.amount), 2), [ diff --git a/test/rollups-test.js b/test/rollups-test.js index 868da6f9..a4540999 100644 --- a/test/rollups-test.js +++ b/test/rollups-test.js @@ -1,3 +1,4 @@ +import {test} from "vitest"; import assert from "assert"; import {rollups, sum} from "../src/index.js"; @@ -8,7 +9,7 @@ const data = [ {name: "stacy", amount: "3405", date: "01/04/2016"} ]; -it("rollups(data, reduce, accessor) returns the expected array", () => { +test("rollups(data, reduce, accessor) returns the expected array", () => { assert.deepStrictEqual( rollups(data, v => v.length, d => d.name), [ @@ -27,7 +28,7 @@ it("rollups(data, reduce, accessor) returns the expected array", () => { ); }); -it("rollups(data, reduce, accessor, accessor) returns the expected array", () => { +test("rollups(data, reduce, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( rollups(data, v => v.length, d => d.name, d => d.amount), [ diff --git a/test/scan-test.js b/test/scan-test.js index 29734784..bbe11a15 100644 --- a/test/scan-test.js +++ b/test/scan-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {descending, scan} from "../src/index.js"; -it("scan(array) compares using natural order", () => { +test("scan(array) compares using natural order", () => { assert.strictEqual(scan([0, 1]), 0); assert.strictEqual(scan([1, 0]), 1); assert.strictEqual(scan([0, "1"]), 0); @@ -16,7 +17,7 @@ it("scan(array) compares using natural order", () => { assert.strictEqual(scan([NaN, 10, 2]), 2); }); -it("scan(array, compare) compares using the specified compare function", () => { +test("scan(array, compare) compares using the specified compare function", () => { var a = {name: "a"}, b = {name: "b"}; assert.strictEqual(scan([a, b], (a, b) => a.name.localeCompare(b.name)), 0); assert.strictEqual(scan([1, 0], descending), 0); @@ -26,16 +27,16 @@ it("scan(array, compare) compares using the specified compare function", () => { assert.strictEqual(scan([2, NaN, 10], descending), 2); }); -it("scan(array) returns undefined if the array is empty", () => { +test("scan(array) returns undefined if the array is empty", () => { assert.strictEqual(scan([]), undefined); }); -it("scan(array) returns undefined if the array contains only incomparable values", () => { +test("scan(array) returns undefined if the array contains only incomparable values", () => { assert.strictEqual(scan([NaN, undefined]), undefined); assert.strictEqual(scan([NaN, "foo"], (a, b) => a - b), undefined); }); -it("scan(array) returns the first of equal values", () => { +test("scan(array) returns the first of equal values", () => { assert.strictEqual(scan([2, 2, 1, 1, 0, 0, 0, 3, 0]), 4); assert.strictEqual(scan([3, 2, 2, 1, 1, 0, 0, 0, 3, 0], descending), 0); }); diff --git a/test/shuffle-test.js b/test/shuffle-test.js index 40f40523..39f41c41 100644 --- a/test/shuffle-test.js +++ b/test/shuffle-test.js @@ -1,29 +1,30 @@ +import {test} from "vitest"; import assert from "assert"; import {randomLcg} from "d3-random"; import {pairs, shuffler} from "../src/index.js"; -it("shuffle(array) shuffles the array in-place", () => { +test("shuffle(array) shuffles the array in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers), numbers); assert(pairs(numbers).some(([a, b]) => a > b)); // shuffled }); -it("shuffler(random)(array) shuffles the array in-place", () => { +test("shuffler(random)(array) shuffles the array in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers), numbers); assert.deepStrictEqual(numbers, [7, 4, 5, 3, 9, 0, 6, 1, 2, 8]); }); -it("shuffler(random)(array, start) shuffles the subset array[start:] in-place", () => { +test("shuffler(random)(array, start) shuffles the subset array[start:] in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers, 4), numbers); assert.deepStrictEqual(numbers, [0, 1, 2, 3, 8, 7, 6, 4, 5, 9]); }); -it("shuffler(random)(array, start, end) shuffles the subset array[start:end] in-place", () => { +test("shuffler(random)(array, start, end) shuffles the subset array[start:end] in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers, 3, 8), numbers); diff --git a/test/some-test.js b/test/some-test.js index fcb164d5..0b5b1ad9 100644 --- a/test/some-test.js +++ b/test/some-test.js @@ -1,30 +1,31 @@ +import {test} from "vitest"; import assert from "assert"; import {some} from "../src/index.js"; -it("some(values, test) returns true if any test passes", () => { +test("some(values, test) returns true if any test passes", () => { assert.strictEqual(some([1, 2, 3, 2, 1], x => x & 1), true); assert.strictEqual(some([1, 2, 3, 2, 1], x => x > 3), false); }); -it("some(values, test) returns false if values is empty", () => { +test("some(values, test) returns false if values is empty", () => { assert.strictEqual(some([], () => true), false); }); -it("some(values, test) accepts an iterable", () => { +test("some(values, test) accepts an iterable", () => { assert.strictEqual(some(new Set([1, 2, 3, 2, 1]), x => x >= 3), true); assert.strictEqual(some((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x >= 3), true); assert.strictEqual(some(Uint8Array.of(1, 2, 3, 2, 1), x => x >= 3), true); }); -it("some(values, test) enforces that test is a function", () => { +test("some(values, test) enforces that test is a function", () => { assert.throws(() => some([]), TypeError); }); -it("some(values, test) enforces that values is iterable", () => { +test("some(values, test) enforces that values is iterable", () => { assert.throws(() => some({}, () => true), TypeError); }); -it("some(values, test) passes test (value, index, values)", () => { +test("some(values, test) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); some(values, function() { calls.push([this, ...arguments]); }); @@ -37,7 +38,7 @@ it("some(values, test) passes test (value, index, values)", () => { ]); }); -it("some(values, test) short-circuts when test returns truthy", () => { +test("some(values, test) short-circuts when test returns truthy", () => { let calls = 0; assert.strictEqual(some([1, 2, 3], x => (++calls, x >= 2)), true); assert.strictEqual(calls, 2); @@ -45,6 +46,6 @@ it("some(values, test) short-circuts when test returns truthy", () => { assert.strictEqual(calls, 4); }); -it("some(values, test) does not skip sparse elements", () => { +test("some(values, test) does not skip sparse elements", () => { assert.deepStrictEqual(some([, 1, 2,, ], x => x === undefined), true); }); diff --git a/test/sort-test.js b/test/sort-test.js index 331dc1e0..4bedde80 100644 --- a/test/sort-test.js +++ b/test/sort-test.js @@ -1,13 +1,14 @@ +import {test} from "vitest"; import assert from "assert"; import {ascending, descending, sort} from "../src/index.js"; -it("sort(values) returns a sorted copy", () => { +test("sort(values) returns a sorted copy", () => { const input = [1, 3, 2, 5, 4]; assert.deepStrictEqual(sort(input), [1, 2, 3, 4, 5]); assert.deepStrictEqual(input, [1, 3, 2, 5, 4]); // does not mutate }); -it("sort(values) defaults to ascending, not lexicographic", () => { +test("sort(values) defaults to ascending, not lexicographic", () => { const input = [1, "10", 2]; assert.deepStrictEqual(sort(input), [1, 2, "10"]); }); @@ -15,13 +16,13 @@ it("sort(values) defaults to ascending, not lexicographic", () => { // Per ECMAScript specification §23.1.3.27.1, undefined values are not passed to // the comparator; they are always put at the end of the sorted array. // https://262.ecma-international.org/12.0/#sec-sortcompare -it("sort(values) puts non-orderable values last, followed by undefined", () => { +test("sort(values) puts non-orderable values last, followed by undefined", () => { const date = new Date(NaN); const input = [undefined, 1, null, 0, NaN, "10", date, 2]; assert.deepStrictEqual(sort(input), [0, 1, 2, "10", null, NaN, date, undefined]); }); -it("sort(values, comparator) puts non-orderable values last, followed by undefined", () => { +test("sort(values, comparator) puts non-orderable values last, followed by undefined", () => { const date = new Date(NaN); const input = [undefined, 1, null, 0, NaN, "10", date, 2]; assert.deepStrictEqual(sort(input, ascending), [0, 1, 2, "10", null, NaN, date, undefined]); @@ -29,46 +30,46 @@ it("sort(values, comparator) puts non-orderable values last, followed by undefin }); // However we don't implement this spec when using an accessor -it("sort(values, accessor) puts non-orderable values last", () => { +test("sort(values, accessor) puts non-orderable values last", () => { const date = new Date(NaN); const input = [undefined, 1, null, 0, NaN, "10", date, 2]; assert.deepStrictEqual(sort(input, d => d), [0, 1, 2, "10", undefined, null, NaN, date]); assert.deepStrictEqual(sort(input, d => d && -d), ["10", 2, 1, 0, undefined, null, NaN, date]); }); -it("sort(values, accessor) uses the specified accessor in natural order", () => { +test("sort(values, accessor) uses the specified accessor in natural order", () => { assert.deepStrictEqual(sort([1, 3, 2, 5, 4], d => d), [1, 2, 3, 4, 5]); assert.deepStrictEqual(sort([1, 3, 2, 5, 4], d => -d), [5, 4, 3, 2, 1]); }); -it("sort(values, ...accessors) accepts multiple accessors", () => { +test("sort(values, ...accessors) accepts multiple accessors", () => { assert.deepStrictEqual(sort([[1, 0], [2, 1], [2, 0], [1, 1], [3, 0]], ([x]) => x, ([, y]) => y), [[1, 0], [1, 1], [2, 0], [2, 1], [3, 0]]); assert.deepStrictEqual(sort([{x: 1, y: 0}, {x: 2, y: 1}, {x: 2, y: 0}, {x: 1, y: 1}, {x: 3, y: 0}], ({x}) => x, ({y}) => y), [{x: 1, y: 0}, {x: 1, y: 1}, {x: 2, y: 0}, {x: 2, y: 1}, {x: 3, y: 0}]); }); -it("sort(values, comparator) uses the specified comparator", () => { +test("sort(values, comparator) uses the specified comparator", () => { assert.deepStrictEqual(sort([1, 3, 2, 5, 4], descending), [5, 4, 3, 2, 1]); }); -it("sort(values) returns an array", () => { +test("sort(values) returns an array", () => { assert.strictEqual(Array.isArray(sort(Uint8Array.of(1, 2))), true); }); -it("sort(values) accepts an iterable", () => { +test("sort(values) accepts an iterable", () => { assert.deepStrictEqual(sort(new Set([1, 3, 2, 1, 2])), [1, 2, 3]); assert.deepStrictEqual(sort((function*() { yield* [1, 3, 2, 5, 4]; })()), [1, 2, 3, 4, 5]); assert.deepStrictEqual(sort(Uint8Array.of(1, 3, 2, 5, 4)), [1, 2, 3, 4, 5]); }); -it("sort(values) enforces that values is iterable", () => { +test("sort(values) enforces that values is iterable", () => { assert.throws(() => sort({}), {name: "TypeError", message: /is not iterable/}); }); -it("sort(values, comparator) enforces that comparator is a function", () => { +test("sort(values, comparator) enforces that comparator is a function", () => { assert.throws(() => sort([], {}), {name: "TypeError", message: /is not a function/}); assert.throws(() => sort([], null), {name: "TypeError", message: /is not a function/}); }); -it("sort(values) does not skip sparse elements", () => { +test("sort(values) does not skip sparse elements", () => { assert.deepStrictEqual(sort([, 1, 2,, ]), [1, 2, undefined, undefined]); }); diff --git a/test/subset-test.js b/test/subset-test.js index 53ecfbdb..4d7054db 100644 --- a/test/subset-test.js +++ b/test/subset-test.js @@ -1,13 +1,14 @@ +import {test} from "vitest"; import assert from "assert"; import {subset} from "../src/index.js"; -it("subset(values, other) returns true if values is a subset of others", () => { +test("subset(values, other) returns true if values is a subset of others", () => { assert.strictEqual(subset([2], [1, 2]), true); assert.strictEqual(subset([3, 4], [2, 3]), false); assert.strictEqual(subset([], [1]), true); }); -it("subset(values, other) performs interning", () => { +test("subset(values, other) performs interning", () => { assert.strictEqual(subset([new Date("2021-01-02")], [new Date("2021-01-01"), new Date("2021-01-02")]), true); assert.strictEqual(subset([new Date("2021-01-03"), new Date("2021-01-04")], [new Date("2021-01-02"), new Date("2021-01-03")]), false); assert.strictEqual(subset([], [new Date("2021-01-01")]), true); diff --git a/test/sum-test.js b/test/sum-test.js index 93d7485d..08316219 100644 --- a/test/sum-test.js +++ b/test/sum-test.js @@ -1,14 +1,15 @@ +import {test} from "vitest"; import assert from "assert"; import {sum} from "../src/index.js"; -it("sum(array) returns the sum of the specified numbers", () => { +test("sum(array) returns the sum of the specified numbers", () => { assert.strictEqual(sum([1]), 1); assert.strictEqual(sum([5, 1, 2, 3, 4]), 15); assert.strictEqual(sum([20, 3]), 23); assert.strictEqual(sum([3, 20]), 23); }); -it("sum(array) observes values that can be coerced to numbers", () => { +test("sum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", "3"]), 23); assert.strictEqual(sum(["3", "20"]), 23); assert.strictEqual(sum(["3", 20]), 23); @@ -17,18 +18,18 @@ it("sum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", 3]), 23); }); -it("sum(array) ignores non-numeric values", () => { +test("sum(array) ignores non-numeric values", () => { assert.strictEqual(sum(["a", "b", "c"]), 0); assert.strictEqual(sum(["a", 1, "2"]), 3); }); -it("sum(array) ignores null, undefined and NaN", () => { +test("sum(array) ignores null, undefined and NaN", () => { assert.strictEqual(sum([NaN, 1, 2, 3, 4, 5]), 15); assert.strictEqual(sum([1, 2, 3, 4, 5, NaN]), 15); assert.strictEqual(sum([10, null, 3, undefined, 5, NaN]), 18); }); -it("sum(array) returns zero if there are no numbers", () => { +test("sum(array) returns zero if there are no numbers", () => { assert.strictEqual(sum([]), 0); assert.strictEqual(sum([NaN]), 0); assert.strictEqual(sum([undefined]), 0); @@ -36,14 +37,14 @@ it("sum(array) returns zero if there are no numbers", () => { assert.strictEqual(sum([undefined, NaN, {}]), 0); }); -it("sum(array, f) returns the sum of the specified numbers", () => { +test("sum(array, f) returns the sum of the specified numbers", () => { assert.strictEqual(sum([1].map(box), unbox), 1); assert.strictEqual(sum([5, 1, 2, 3, 4].map(box), unbox), 15); assert.strictEqual(sum([20, 3].map(box), unbox), 23); assert.strictEqual(sum([3, 20].map(box), unbox), 23); }); -it("sum(array, f) observes values that can be coerced to numbers", () => { +test("sum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", "3"].map(box), unbox), 23); assert.strictEqual(sum(["3", "20"].map(box), unbox), 23); assert.strictEqual(sum(["3", 20].map(box), unbox), 23); @@ -52,18 +53,18 @@ it("sum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", 3].map(box), unbox), 23); }); -it("sum(array, f) ignores non-numeric values", () => { +test("sum(array, f) ignores non-numeric values", () => { assert.strictEqual(sum(["a", "b", "c"].map(box), unbox), 0); assert.strictEqual(sum(["a", 1, "2"].map(box), unbox), 3); }); -it("sum(array, f) ignores null, undefined and NaN", () => { +test("sum(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(sum([NaN, 1, 2, 3, 4, 5].map(box), unbox), 15); assert.strictEqual(sum([1, 2, 3, 4, 5, NaN].map(box), unbox), 15); assert.strictEqual(sum([10, null, 3, undefined, 5, NaN].map(box), unbox), 18); }); -it("sum(array, f) returns zero if there are no numbers", () => { +test("sum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(sum([].map(box), unbox), 0); assert.strictEqual(sum([NaN].map(box), unbox), 0); assert.strictEqual(sum([undefined].map(box), unbox), 0); @@ -71,14 +72,14 @@ it("sum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(sum([undefined, NaN, {}].map(box), unbox), 0); }); -it("sum(array, f) passes the accessor d, i, and array", () => { +test("sum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; sum(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("sum(array, f) uses the undefined context", () => { +test("sum(array, f) uses the undefined context", () => { const results = []; sum([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/superset-test.js b/test/superset-test.js index e1b1a6c0..aae1f235 100644 --- a/test/superset-test.js +++ b/test/superset-test.js @@ -1,21 +1,22 @@ +import {test} from "vitest"; import assert from "assert"; import {superset} from "../src/index.js"; -it("superset(values, other) returns true if values is a superset of others", () => { +test("superset(values, other) returns true if values is a superset of others", () => { assert.strictEqual(superset([1, 2], [2]), true); assert.strictEqual(superset([2, 3], [3, 4]), false); assert.strictEqual(superset([1], []), true); }); -it("superset(values, other) allows values to be infinite", () => { +test("superset(values, other) allows values to be infinite", () => { assert.strictEqual(superset(odds(), [1, 3, 5]), true); }); -it("superset(values, other) allows other to be infinite", () => { +test("superset(values, other) allows other to be infinite", () => { assert.strictEqual(superset([1, 3, 5], repeat(1, 3, 2)), false); }); -it("superset(values, other) performs interning", () => { +test("superset(values, other) performs interning", () => { assert.strictEqual(superset([new Date("2021-01-01"), new Date("2021-01-02")], [new Date("2021-01-02")]), true); assert.strictEqual(superset([new Date("2021-01-02"), new Date("2021-01-03")], [new Date("2021-01-03"), new Date("2021-01-04")]), false); assert.strictEqual(superset([new Date("2021-01-01")], []), true); diff --git a/test/threshold/freedmanDiaconic-test.js b/test/threshold/freedmanDiaconic-test.js index 6bc6d800..949c5bd7 100644 --- a/test/threshold/freedmanDiaconic-test.js +++ b/test/threshold/freedmanDiaconic-test.js @@ -1,18 +1,19 @@ +import {test} from "vitest"; import assert from "assert"; import {thresholdFreedmanDiaconis} from "../../src/index.js"; -it("thresholdFreedmanDiaconis(values, min, max) returns the expected result", () => { +test("thresholdFreedmanDiaconis(values, min, max) returns the expected result", () => { assert.strictEqual(thresholdFreedmanDiaconis([4, 3, 2, 1, NaN], 1, 4), 2); }); -it("thresholdFreedmanDiaconis(values, min, max) handles values with zero deviation", () => { +test("thresholdFreedmanDiaconis(values, min, max) handles values with zero deviation", () => { assert.strictEqual(thresholdFreedmanDiaconis([1, 1, 1, 1], 1, 4), 1); }); -it("thresholdFreedmanDiaconis(values, min, max) handles single-value arrays", () => { +test("thresholdFreedmanDiaconis(values, min, max) handles single-value arrays", () => { assert.strictEqual(thresholdFreedmanDiaconis([1], 1, 4), 1); }); -it("thresholdFreedmanDiaconis(values, min, max) handles empty arrays", () => { +test("thresholdFreedmanDiaconis(values, min, max) handles empty arrays", () => { assert.strictEqual(thresholdFreedmanDiaconis([], 1, 4), 1); }); diff --git a/test/threshold/scott-test.js b/test/threshold/scott-test.js index d51faae6..6e112569 100644 --- a/test/threshold/scott-test.js +++ b/test/threshold/scott-test.js @@ -1,18 +1,19 @@ +import {test} from "vitest"; import assert from "assert"; import {thresholdScott} from "../../src/index.js"; -it("thresholdScott(values, min, max) returns the expected result", () => { +test("thresholdScott(values, min, max) returns the expected result", () => { assert.strictEqual(thresholdScott([4, 3, 2, 1, NaN], 1, 4), 2); }); -it("thresholdScott(values, min, max) handles values with zero deviation", () => { +test("thresholdScott(values, min, max) handles values with zero deviation", () => { assert.strictEqual(thresholdScott([1, 1, 1, 1], 1, 4), 1); }); -it("thresholdScott(values, min, max) handles single-value arrays", () => { +test("thresholdScott(values, min, max) handles single-value arrays", () => { assert.strictEqual(thresholdScott([1], 1, 4), 1); }); -it("thresholdScott(values, min, max) handles empty arrays", () => { +test("thresholdScott(values, min, max) handles empty arrays", () => { assert.strictEqual(thresholdScott([], 1, 4), 1); }); diff --git a/test/threshold/sturges-test.js b/test/threshold/sturges-test.js index fd15837b..62c44e45 100644 --- a/test/threshold/sturges-test.js +++ b/test/threshold/sturges-test.js @@ -1,11 +1,12 @@ +import {test} from "vitest"; import assert from "assert"; import {thresholdSturges} from "../../src/index.js"; -it("thresholdSturges(values, min, max) returns the expected result", () => { +test("thresholdSturges(values, min, max) returns the expected result", () => { assert.strictEqual(thresholdSturges([4, 3, 2, 1, NaN], 1, 4), 3); assert.strictEqual(thresholdSturges([1], 1, 4), 1); }); -it("thresholdSturges(values, min, max) handles empty arrays", () => { +test("thresholdSturges(values, min, max) handles empty arrays", () => { assert.strictEqual(thresholdSturges([], 1, 4), 1); }); diff --git a/test/tickIncrement-test.js b/test/tickIncrement-test.js index 68c64ded..b8b69ec0 100644 --- a/test/tickIncrement-test.js +++ b/test/tickIncrement-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {tickIncrement} from "../src/index.js"; -it("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () => { +test("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickIncrement(NaN, 1, 1))); assert(isNaN(tickIncrement(0, NaN, 1))); assert(isNaN(tickIncrement(0, 1, NaN))); @@ -11,7 +12,7 @@ it("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () => assert(isNaN(tickIncrement(NaN, NaN, NaN))); }); -it("tickIncrement(start, stop, count) returns NaN or -Infinity if start === stop", () => { +test("tickIncrement(start, stop, count) returns NaN or -Infinity if start === stop", () => { assert(isNaN(tickIncrement(1, 1, -1))); assert(isNaN(tickIncrement(1, 1, 0))); assert(isNaN(tickIncrement(1, 1, NaN))); @@ -19,16 +20,16 @@ it("tickIncrement(start, stop, count) returns NaN or -Infinity if start === stop assert.strictEqual(tickIncrement(1, 1, 10), -Infinity); }); -it("tickIncrement(start, stop, count) returns 0 or Infinity if count is not positive", () => { +test("tickIncrement(start, stop, count) returns 0 or Infinity if count is not positive", () => { assert.strictEqual(tickIncrement(0, 1, -1), Infinity); assert.strictEqual(tickIncrement(0, 1, 0), Infinity); }); -it("tickIncrement(start, stop, count) returns -Infinity if count is infinity", () => { +test("tickIncrement(start, stop, count) returns -Infinity if count is infinity", () => { assert.strictEqual(tickIncrement(0, 1, Infinity), -Infinity); }); -it("tickIncrement(start, stop, count) returns approximately count + 1 tickIncrement when start < stop", () => { +test("tickIncrement(start, stop, count) returns approximately count + 1 tickIncrement when start < stop", () => { assert.strictEqual(tickIncrement( 0, 1, 10), -10); assert.strictEqual(tickIncrement( 0, 1, 9), -10); assert.strictEqual(tickIncrement( 0, 1, 8), -10); diff --git a/test/tickStep-test.js b/test/tickStep-test.js index 79b7ca72..e4456058 100644 --- a/test/tickStep-test.js +++ b/test/tickStep-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {tickStep} from "../src/index.js"; -it("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { +test("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickStep(NaN, 1, 1))); assert(isNaN(tickStep(0, NaN, 1))); assert(isNaN(tickStep(0, 1, NaN))); @@ -11,7 +12,7 @@ it("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickStep(NaN, NaN, NaN))); }); -it("tickStep(start, stop, count) returns NaN or 0 if start === stop", () => { +test("tickStep(start, stop, count) returns NaN or 0 if start === stop", () => { assert(isNaN(tickStep(1, 1, -1))); assert(isNaN(tickStep(1, 1, 0))); assert(isNaN(tickStep(1, 1, NaN))); @@ -19,16 +20,16 @@ it("tickStep(start, stop, count) returns NaN or 0 if start === stop", () => { assert.strictEqual(tickStep(1, 1, 10), 0); }); -it("tickStep(start, stop, count) returns 0 or Infinity if count is not positive", () => { +test("tickStep(start, stop, count) returns 0 or Infinity if count is not positive", () => { assert.strictEqual(tickStep(0, 1, -1), Infinity); assert.strictEqual(tickStep(0, 1, 0), Infinity); }); -it("tickStep(start, stop, count) returns 0 if count is infinity", () => { +test("tickStep(start, stop, count) returns 0 if count is infinity", () => { assert.strictEqual(tickStep(0, 1, Infinity), 0); }); -it("tickStep(start, stop, count) returns approximately count + 1 tickStep when start < stop", () => { +test("tickStep(start, stop, count) returns approximately count + 1 tickStep when start < stop", () => { assert.strictEqual(tickStep( 0, 1, 10), 0.1); assert.strictEqual(tickStep( 0, 1, 9), 0.1); assert.strictEqual(tickStep( 0, 1, 8), 0.1); @@ -61,7 +62,7 @@ it("tickStep(start, stop, count) returns approximately count + 1 tickStep when s assert.strictEqual(tickStep(-10, 10, 1), 20); }); -it("tickStep(start, stop, count) returns -tickStep(stop, start, count)", () => { +test("tickStep(start, stop, count) returns -tickStep(stop, start, count)", () => { assert.strictEqual(tickStep( 0, 1, 10), -tickStep( 1, 0, 10)); assert.strictEqual(tickStep( 0, 1, 9), -tickStep( 1, 0, 9)); assert.strictEqual(tickStep( 0, 1, 8), -tickStep( 1, 0, 8)); diff --git a/test/ticks-test.js b/test/ticks-test.js index 4793e65a..3117aaec 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,7 +1,8 @@ +import {test} from "vitest"; import assert from "assert"; import {ticks} from "../src/index.js"; -it("ticks(start, stop, count) returns the empty array if any argument is NaN", () => { +test("ticks(start, stop, count) returns the empty array if any argument is NaN", () => { assert.deepStrictEqual(ticks(NaN, 1, 1), []); assert.deepStrictEqual(ticks(0, NaN, 1), []); assert.deepStrictEqual(ticks(0, 1, NaN), []); @@ -11,36 +12,36 @@ it("ticks(start, stop, count) returns the empty array if any argument is NaN", ( assert.deepStrictEqual(ticks(NaN, NaN, NaN), []); }); -it("ticks(start, stop, count) returns the empty array if start === stop and count is non-positive", () => { +test("ticks(start, stop, count) returns the empty array if start === stop and count is non-positive", () => { assert.deepStrictEqual(ticks(1, 1, -1), []); assert.deepStrictEqual(ticks(1, 1, 0), []); assert.deepStrictEqual(ticks(1, 1, NaN), []); }); -it("ticks(start, stop, count) returns the empty array if start === stop and count is positive", () => { +test("ticks(start, stop, count) returns the empty array if start === stop and count is positive", () => { assert.deepStrictEqual(ticks(1, 1, 1), [1]); assert.deepStrictEqual(ticks(1, 1, 10), [1]); }); -it("ticks(start, stop, count) returns the empty array if count is not positive", () => { +test("ticks(start, stop, count) returns the empty array if count is not positive", () => { assert.deepStrictEqual(ticks(0, 1, 0), []); assert.deepStrictEqual(ticks(0, 1, -1), []); assert.deepStrictEqual(ticks(0, 1, NaN), []); }); -it("ticks(start, stop, count) returns the empty array if count is infinity", () => { +test("ticks(start, stop, count) returns the empty array if count is infinity", () => { assert.deepStrictEqual(ticks(0, 1, Infinity), []); }); -it("ticks(start, stop, count) does not include negative zero", () => { +test("ticks(start, stop, count) does not include negative zero", () => { assert.strictEqual(1 / ticks(-1, 0, 5).pop(), Infinity); }); -it("ticks(start, stop, count) remains within the domain", () => { +test("ticks(start, stop, count) remains within the domain", () => { assert.deepStrictEqual(ticks(0, 2.2, 3), [0, 1, 2]); }); -it("ticks(start, stop, count) returns approximately count + 1 ticks when start < stop", () => { +test("ticks(start, stop, count) returns approximately count + 1 ticks when start < stop", () => { assert.deepStrictEqual(ticks( 0, 1, 10), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(ticks( 0, 1, 9), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(ticks( 0, 1, 8), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -73,7 +74,7 @@ it("ticks(start, stop, count) returns approximately count + 1 ticks when start < assert.deepStrictEqual(ticks(-10, 10, 1), [ 0, ]); }); -it("ticks(start, stop, count) returns the reverse of ticks(stop, start, count)", () => { +test("ticks(start, stop, count) returns the reverse of ticks(stop, start, count)", () => { assert.deepStrictEqual(ticks( 1, 0, 10), ticks( 0, 1, 10).reverse()); assert.deepStrictEqual(ticks( 1, 0, 9), ticks( 0, 1, 9).reverse()); assert.deepStrictEqual(ticks( 1, 0, 8), ticks( 0, 1, 8).reverse()); @@ -106,11 +107,11 @@ it("ticks(start, stop, count) returns the reverse of ticks(stop, start, count)", assert.deepStrictEqual(ticks(10, -10, 1), ticks(-10, 10, 1).reverse()); }); -it("ticks(start, stop, count) handles precision problems", () => { +test("ticks(start, stop, count) handles precision problems", () => { assert.deepStrictEqual(ticks(0.98, 1.14, 10), [0.98, 1, 1.02, 1.04, 1.06, 1.08, 1.1, 1.12, 1.14]); }); -it("ticks(start, stop, count) tries to return at least one tick if count >= 0.5", () => { +test("ticks(start, stop, count) tries to return at least one tick if count >= 0.5", () => { assert.deepStrictEqual(ticks(1, 364, 0.1), []); assert.deepStrictEqual(ticks(1, 364, 0.499), []); assert.deepStrictEqual(ticks(1, 364, 0.5), [200]); diff --git a/test/transpose-test.js b/test/transpose-test.js index 341eb551..437be4d9 100644 --- a/test/transpose-test.js +++ b/test/transpose-test.js @@ -1,29 +1,30 @@ +import {test} from "vitest"; import assert from "assert"; import {transpose} from "../src/index.js"; -it("transpose([]) and transpose([[]]) return an empty array", () => { +test("transpose([]) and transpose([[]]) return an empty array", () => { assert.deepStrictEqual(transpose([]), []); assert.deepStrictEqual(transpose([[]]), []); }); -it("transpose([[a, b, …]]) returns [[a], [b], …]", () => { +test("transpose([[a, b, …]]) returns [[a], [b], …]", () => { assert.deepStrictEqual(transpose([[1, 2, 3, 4, 5]]), [[1], [2], [3], [4], [5]]); }); -it("transpose([[a1, b1, …], [a2, b2, …]]) returns [[a1, a2], [b1, b2], …]", () => { +test("transpose([[a1, b1, …], [a2, b2, …]]) returns [[a1, a2], [b1, b2], …]", () => { assert.deepStrictEqual(transpose([[1, 2], [3, 4]]), [[1, 3], [2, 4]]); assert.deepStrictEqual(transpose([[1, 2, 3, 4, 5], [2, 4, 6, 8, 10]]), [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10]]); }); -it("transpose([[a1, b1, …], [a2, b2, …], [a3, b3, …]]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { +test("transpose([[a1, b1, …], [a2, b2, …], [a3, b3, …]]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { assert.deepStrictEqual(transpose([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), [[1, 4, 7], [2, 5, 8], [3, 6, 9]]); }); -it("transpose(…) ignores extra elements given an irregular matrix", () => { +test("transpose(…) ignores extra elements given an irregular matrix", () => { assert.deepStrictEqual(transpose([[1, 2], [3, 4], [5, 6, 7]]), [[1, 3, 5], [2, 4, 6]]); }); -it("transpose(…) returns a copy", () => { +test("transpose(…) returns a copy", () => { const matrix = [[1, 2], [3, 4]]; const t = transpose(matrix); matrix[0][0] = matrix[0][1] = matrix[1][0] = matrix[1][1] = 0; diff --git a/test/union-test.js b/test/union-test.js index 39796ce5..a06165af 100644 --- a/test/union-test.js +++ b/test/union-test.js @@ -1,24 +1,25 @@ +import {test} from "vitest"; import {union} from "../src/index.js"; import {assertSetEqual} from "./asserts.js"; -it("union(values) returns a set of values", () => { +test("union(values) returns a set of values", () => { assertSetEqual(union([1, 2, 3, 2, 1]), [1, 2, 3]); }); -it("union(values, other) returns a set of values", () => { +test("union(values, other) returns a set of values", () => { assertSetEqual(union([1, 2], [2, 3, 1]), [1, 2, 3]); }); -it("union(...values) returns a set of values", () => { +test("union(...values) returns a set of values", () => { assertSetEqual(union([1], [2], [2, 3], [1]), [1, 2, 3]); }); -it("union(...values) accepts iterables", () => { +test("union(...values) accepts iterables", () => { assertSetEqual(union(new Set([1, 2, 3])), [1, 2, 3]); assertSetEqual(union(Uint8Array.of(1, 2, 3)), [1, 2, 3]); }); -it("union(...values) performs interning", () => { +test("union(...values) performs interning", () => { assertSetEqual(union([new Date("2021-01-01"), new Date("2021-01-01"), new Date("2021-01-02")]), [new Date("2021-01-01"), new Date("2021-01-02")]); assertSetEqual(union([new Date("2021-01-01"), new Date("2021-01-03")], [new Date("2021-01-01"), new Date("2021-01-02")]), [new Date("2021-01-01"), new Date("2021-01-02"), new Date("2021-01-03")]); }); diff --git a/test/variance-test.js b/test/variance-test.js index 97fa5959..f529cfd4 100644 --- a/test/variance-test.js +++ b/test/variance-test.js @@ -1,24 +1,25 @@ +import {test} from "vitest"; import assert from "assert"; import {variance} from "../src/index.js"; -it("variance(array) returns the variance of the specified numbers", () => { +test("variance(array) returns the variance of the specified numbers", () => { assert.strictEqual(variance([5, 1, 2, 3, 4]), 2.5); assert.strictEqual(variance([20, 3]), 144.5); assert.strictEqual(variance([3, 20]), 144.5); }); -it("variance(array) ignores null, undefined and NaN", () => { +test("variance(array) ignores null, undefined and NaN", () => { assert.strictEqual(variance([NaN, 1, 2, 3, 4, 5]), 2.5); assert.strictEqual(variance([1, 2, 3, 4, 5, NaN]), 2.5); assert.strictEqual(variance([10, null, 3, undefined, 5, NaN]), 13); }); -it("variance(array) can handle large numbers without overflowing", () => { +test("variance(array) can handle large numbers without overflowing", () => { assert.strictEqual(variance([Number.MAX_VALUE, Number.MAX_VALUE]), 0); assert.strictEqual(variance([-Number.MAX_VALUE, -Number.MAX_VALUE]), 0); }); -it("variance(array) returns undefined if the array has fewer than two numbers", () => { +test("variance(array) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(variance([1]), undefined); assert.strictEqual(variance([]), undefined); assert.strictEqual(variance([null]), undefined); @@ -27,24 +28,24 @@ it("variance(array) returns undefined if the array has fewer than two numbers", assert.strictEqual(variance([NaN, NaN]), undefined); }); -it("variance(array, f) returns the variance of the specified numbers", () => { +test("variance(array, f) returns the variance of the specified numbers", () => { assert.strictEqual(variance([5, 1, 2, 3, 4].map(box), unbox), 2.5); assert.strictEqual(variance([20, 3].map(box), unbox), 144.5); assert.strictEqual(variance([3, 20].map(box), unbox), 144.5); }); -it("variance(array, f) ignores null, undefined and NaN", () => { +test("variance(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(variance([NaN, 1, 2, 3, 4, 5].map(box), unbox), 2.5); assert.strictEqual(variance([1, 2, 3, 4, 5, NaN].map(box), unbox), 2.5); assert.strictEqual(variance([10, null, 3, undefined, 5, NaN].map(box), unbox), 13); }); -it("variance(array, f) can handle large numbers without overflowing", () => { +test("variance(array, f) can handle large numbers without overflowing", () => { assert.strictEqual(variance([Number.MAX_VALUE, Number.MAX_VALUE].map(box), unbox), 0); assert.strictEqual(variance([-Number.MAX_VALUE, -Number.MAX_VALUE].map(box), unbox), 0); }); -it("variance(array, f) returns undefined if the array has fewer than two numbers", () => { +test("variance(array, f) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(variance([1].map(box), unbox), undefined); assert.strictEqual(variance([].map(box), unbox), undefined); assert.strictEqual(variance([null].map(box), unbox), undefined); @@ -53,14 +54,14 @@ it("variance(array, f) returns undefined if the array has fewer than two numbers assert.strictEqual(variance([NaN, NaN].map(box), unbox), undefined); }); -it("variance(array, f) passes the accessor d, i, and array", () => { +test("variance(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; variance(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -it("variance(array, f) uses the undefined context", () => { +test("variance(array, f) uses the undefined context", () => { const results = []; variance([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/zip-test.js b/test/zip-test.js index 91c66ad3..1ac93136 100644 --- a/test/zip-test.js +++ b/test/zip-test.js @@ -1,24 +1,25 @@ +import {test} from "vitest"; import assert from "assert"; import {zip} from "../src/index.js"; -it("zip() and zip([]) return an empty array", () => { +test("zip() and zip([]) return an empty array", () => { assert.deepStrictEqual(zip(), []); assert.deepStrictEqual(zip([]), []); }); -it("zip([a, b, …]) returns [[a], [b], …]", () => { +test("zip([a, b, …]) returns [[a], [b], …]", () => { assert.deepStrictEqual(zip([1, 2, 3, 4, 5]), [[1], [2], [3], [4], [5]]); }); -it("zip([a1, b1, …], [a2, b2, …]) returns [[a1, a2], [b1, b2], …]", () => { +test("zip([a1, b1, …], [a2, b2, …]) returns [[a1, a2], [b1, b2], …]", () => { assert.deepStrictEqual(zip([1, 2], [3, 4]), [[1, 3], [2, 4]]); assert.deepStrictEqual(zip([1, 2, 3, 4, 5], [2, 4, 6, 8, 10]), [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10]]); }); -it("zip([a1, b1, …], [a2, b2, …], [a3, b3, …]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { +test("zip([a1, b1, …], [a2, b2, …], [a3, b3, …]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { assert.deepStrictEqual(zip([1, 2, 3], [4, 5, 6], [7, 8, 9]), [[1, 4, 7], [2, 5, 8], [3, 6, 9]]); }); -it("zip(…) ignores extra elements given an irregular matrix", () => { +test("zip(…) ignores extra elements given an irregular matrix", () => { assert.deepStrictEqual(zip([1, 2], [3, 4], [5, 6, 7]), [[1, 3, 5], [2, 4, 6]]); }); diff --git a/vitest.config.js b/vitest.config.js new file mode 100644 index 00000000..b7280506 --- /dev/null +++ b/vitest.config.js @@ -0,0 +1,3 @@ +import {defineConfig} from "vitest/config"; + +export default defineConfig({test: {include: ["test/**/*-test.js"]}}); From 3f997c581376c9bb9c6070e0bb3ce8454486b550 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:11:48 -0800 Subject: [PATCH 04/13] eslint 10, vitest 5 Co-Authored-By: Claude Opus 5.5 --- package.json | 6 +- pnpm-lock.yaml | 571 +++++++++++++++++++------------------------------ 2 files changed, 222 insertions(+), 355 deletions(-) diff --git a/package.json b/package.json index fca86c1b..cfb6cd56 100644 --- a/package.json +++ b/package.json @@ -41,16 +41,16 @@ "internmap": "1 - 2" }, "devDependencies": { - "@eslint/js": "^9.39.5", + "@eslint/js": "^10.0.1", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", "d3-dsv": "^3.0.1", "d3-random": "^3.0.1", - "eslint": "^9.39.5", + "eslint": "^10.14.0", "globals": "^17.14.0", "jsdom": "^21.1.2", "rollup": "^4.67.4", - "vitest": "^4.1.12" + "vitest": "^5.1.0" }, "scripts": { "test": "vitest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fcfb9641..48910e6d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ importers: version: 2.0.3 devDependencies: '@eslint/js': - specifier: ^9.39.5 - version: 9.39.5 + specifier: ^10.0.1 + version: 10.0.1(eslint@10.14.0) '@rollup/plugin-node-resolve': specifier: ^16.0.3 version: 16.0.3(rollup@4.67.4) @@ -28,8 +28,8 @@ importers: specifier: ^3.0.1 version: 3.0.1 eslint: - specifier: ^9.39.5 - version: 9.39.5 + specifier: ^10.14.0 + version: 10.14.0 globals: specifier: ^17.14.0 version: 17.14.0 @@ -40,11 +40,17 @@ importers: specifier: ^4.67.4 version: 4.67.4 vitest: - specifier: ^4.1.12 - version: 4.1.12(jsdom@21.1.2)(vite@8.3.5(terser@5.51.2)) + specifier: ^5.1.0 + version: 5.1.0(jsdom@21.1.2)(vite@8.3.5(terser@5.51.2)) packages: + '@cacheable/memory@2.2.0': + resolution: {integrity: sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==} + + '@cacheable/utils@2.5.0': + resolution: {integrity: sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==} + '@eslint-community/eslint-utils@4.10.1': resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -55,33 +61,34 @@ packages: resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.21.2': - resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/config-helpers@0.4.2': - resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-array@0.23.5': + resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/core@0.17.0': - resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-helpers@0.7.0': + resolution: {integrity: sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/eslintrc@3.3.7': - resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/js@9.39.5': - resolution: {integrity: sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@10.0.1': + resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true - '@eslint/object-schema@2.1.7': - resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/plugin-kit@0.4.1': - resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.7.3': + resolution: {integrity: sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@humanfs/core@0.19.2': resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} @@ -119,6 +126,15 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@keyv/bigmap@1.3.1': + resolution: {integrity: sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==} + engines: {node: '>= 18'} + peerDependencies: + keyv: ^5.6.0 + + '@keyv/serialize@1.1.1': + resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==} + '@napi-rs/lzma-linux-x64-gnu@1.5.1': resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} engines: {node: ^22.20 || ^24.12 || >=25} @@ -398,9 +414,6 @@ packages: cpu: [x64] os: [win32] - '@standard-schema/spec@1.1.0': - resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} - '@tootallnate/once@2.0.1': resolution: {integrity: sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==} engines: {node: '>= 10'} @@ -411,6 +424,9 @@ packages: '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/esrecurse@4.3.1': + resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} + '@types/estree@1.0.10': resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} @@ -420,13 +436,10 @@ packages: '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - '@vitest/expect@4.1.12': - resolution: {integrity: sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==} - - '@vitest/mocker@4.1.12': - resolution: {integrity: sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==} + '@vitest/mocker@5.1.0': + resolution: {integrity: sha512-5umB9/jlWcqVS6fsrFmv5Gdnpu6wAUio/lEOwAmvB7v+lFo/IW2B9FhAD0p19GCULTgMzLCdUmuCDCnAzWgppQ==} peerDependencies: - msw: ^2.4.9 + msw: ^2.4.9 || ^3.0.0 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: msw: @@ -434,20 +447,8 @@ packages: vite: optional: true - '@vitest/pretty-format@4.1.12': - resolution: {integrity: sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==} - - '@vitest/runner@4.1.12': - resolution: {integrity: sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==} - - '@vitest/snapshot@4.1.12': - resolution: {integrity: sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==} - - '@vitest/spy@4.1.12': - resolution: {integrity: sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==} - - '@vitest/utils@4.1.12': - resolution: {integrity: sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==} + '@vitest/spy@5.1.0': + resolution: {integrity: sha512-2DPO5OMHWKrBngC+fCmTQqemNF0gidRhp3lxbBmRhW+M1XJrfgPpqNqWVevXtn2f2ufD5ZaR1B6B641aAlcX5A==} abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} @@ -477,13 +478,6 @@ packages: ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -491,38 +485,28 @@ packages: asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} - brace-expansion@1.1.21: - resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + cacheable@2.5.0: + resolution: {integrity: sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==} + call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - chai@6.3.0: resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} engines: {node: '>=18'} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -534,12 +518,6 @@ packages: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -629,22 +607,21 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@9.1.2: + resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@9.39.5: - resolution: {integrity: sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + eslint@10.14.0: + resolution: {integrity: sha512-T0pNsxkb9IKmtQjhpK3d7nWOpFv+YHuMbTJnSVMoQblF0onvXfErrtp4V1jHtsQPan7dKaGVD0q1WCXnzMF31A==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: jiti: '*' @@ -652,9 +629,9 @@ packages: jiti: optional: true - espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@11.2.0: + resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -705,17 +682,15 @@ packages: picomatch: optional: true - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + file-entry-cache@11.1.5: + resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==} find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + flat-cache@6.1.23: + resolution: {integrity: sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==} flatted@3.4.4: resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} @@ -744,10 +719,6 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globals@17.14.0: resolution: {integrity: sha512-UtdkTVyAJePQv0J2M9Xe4L0ruNSDV314XiIJsADI2Zf40bcdAonE/D/OhAU8AT99oij9mhLByb+NvA3QWZYgCg==} engines: {node: '>=18'} @@ -756,10 +727,6 @@ packages: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - has-symbols@1.1.0: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} @@ -768,10 +735,20 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} + hashery@1.5.1: + resolution: {integrity: sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==} + engines: {node: '>=20'} + hasown@2.0.4: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} + hookified@1.15.1: + resolution: {integrity: sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==} + + hookified@2.2.0: + resolution: {integrity: sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==} + html-encoding-sniffer@3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -792,10 +769,6 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -825,10 +798,6 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} - hasBin: true - jsdom@21.1.2: resolution: {integrity: sha512-sCpFmK2jv+1sjff4u7fzft+pUh2KSUbUrEHYHyfSIbGTIcmnjyp83qg6qLwdJ/I3LpTXx33ACxeRL7Lsyc6lGQ==} engines: {node: '>=14'} @@ -838,17 +807,14 @@ packages: canvas: optional: true - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + keyv@5.6.0: + resolution: {integrity: sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==} levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} @@ -932,11 +898,8 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - - magic-string@0.30.21: - resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} @@ -950,8 +913,9 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} - minimatch@3.1.5: - resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -967,8 +931,8 @@ packages: nwsapi@2.2.28: resolution: {integrity: sha512-IlVB7OS7qrOsVYlpnFIkETjMwT9jwvmocJmmM+GZU/PAB3uGi9Ezd7vcWhWBUnSc0ya4ppmQITOyP1ez9gg8cg==} - obug@2.2.1: - resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} engines: {node: '>=12.20.0'} optionator@0.9.4: @@ -983,10 +947,6 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - parse5@7.3.0: resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} @@ -1001,9 +961,6 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - pathe@2.0.3: - resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1026,16 +983,16 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + qified@0.10.1: + resolution: {integrity: sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==} + engines: {node: '>=20'} + querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - resolve@1.22.13: resolution: {integrity: sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==} engines: {node: '>= 0.4'} @@ -1076,9 +1033,6 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - siginfo@2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - smob@1.6.2: resolution: {integrity: sha512-RQsvleCbF8cVHEv+xuDGaA4pOizFqJ0GgjtMSRo6oP8pnN7WsigHgVGey6aILRBKv4W2YOMHLqbKdnB6hpB9fw==} engines: {node: '>=20.0.0'} @@ -1094,20 +1048,9 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - stackback@0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - std-env@4.3.0: resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -1120,8 +1063,9 @@ packages: engines: {node: '>=10'} hasBin: true - tinybench@2.9.0: - resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinybench@6.2.3: + resolution: {integrity: sha512-Al01C2JIBnO2CXCAPbpAl6sUiOZHeThGtHYNTa51JRw9PyWOCdr+9Ong05R4qg/Sk3+H645E8ov1h2c58ityNw==} + engines: {node: '>=20.0.0'} tinyexec@1.3.1: resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} @@ -1131,10 +1075,6 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} - tinyrainbow@3.2.0: - resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==} - engines: {node: '>=14.0.0'} - tough-cookie@4.1.4: resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} engines: {node: '>=6'} @@ -1200,23 +1140,23 @@ packages: yaml: optional: true - vitest@4.1.12: - resolution: {integrity: sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==} - engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + vitest@5.1.0: + resolution: {integrity: sha512-MzmNFnrwa8v8lF1bLxw3UJ4EREwVOVb75VqJZmUDRjJ6EluK/x9th7qTbaeDk41WxE1GxWqmTXcdsfobfH5sOA==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 - '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.12 - '@vitest/browser-preview': 4.1.12 - '@vitest/browser-webdriverio': ^4.1.11 - '@vitest/coverage-istanbul': 4.1.12 - '@vitest/coverage-v8': 4.1.12 - '@vitest/ui': 4.1.12 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.1.0 + '@vitest/browser-preview': 5.1.0 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.1.0 + '@vitest/coverage-v8': 5.1.0 + '@vitest/ui': 5.1.0 happy-dom: '*' jsdom: '*' - vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + vite: ^6.4.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: '@edge-runtime/vm': optional: true @@ -1267,9 +1207,9 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.3.0: - resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} - engines: {node: '>=8'} + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} hasBin: true word-wrap@1.2.5: @@ -1301,50 +1241,50 @@ packages: snapshots: - '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': + '@cacheable/memory@2.2.0': + dependencies: + '@cacheable/utils': 2.5.0 + '@keyv/bigmap': 1.3.1(keyv@5.6.0) + hookified: 1.15.1 + keyv: 5.6.0 + + '@cacheable/utils@2.5.0': dependencies: - eslint: 9.39.5 + hashery: 1.5.1 + keyv: 5.6.0 + + '@eslint-community/eslint-utils@4.10.1(eslint@10.14.0)': + dependencies: + eslint: 10.14.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.2': {} - '@eslint/config-array@0.21.2': + '@eslint/config-array@0.23.5': dependencies: - '@eslint/object-schema': 2.1.7 + '@eslint/object-schema': 3.0.5 debug: 4.4.3 - minimatch: 3.1.5 + minimatch: 10.2.6 transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.4.2': + '@eslint/config-helpers@0.7.0': dependencies: - '@eslint/core': 0.17.0 + '@eslint/core': 1.2.1 - '@eslint/core@0.17.0': + '@eslint/core@1.2.1': dependencies: '@types/json-schema': 7.0.15 - '@eslint/eslintrc@3.3.7': - dependencies: - ajv: 6.15.0 - debug: 4.4.3 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.3.2 - minimatch: 3.1.5 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@9.39.5': {} + '@eslint/js@10.0.1(eslint@10.14.0)': + optionalDependencies: + eslint: 10.14.0 - '@eslint/object-schema@2.1.7': {} + '@eslint/object-schema@3.0.5': {} - '@eslint/plugin-kit@0.4.1': + '@eslint/plugin-kit@0.7.3': dependencies: - '@eslint/core': 0.17.0 + '@eslint/core': 1.2.1 levn: 0.4.1 '@humanfs/core@0.19.2': @@ -1382,6 +1322,14 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.6.0 + '@keyv/bigmap@1.3.1(keyv@5.6.0)': + dependencies: + hashery: 1.5.1 + hookified: 1.15.1 + keyv: 5.6.0 + + '@keyv/serialize@1.1.1': {} + '@napi-rs/lzma-linux-x64-gnu@1.5.1': optional: true @@ -1538,8 +1486,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.67.4': optional: true - '@standard-schema/spec@1.1.0': {} - '@tootallnate/once@2.0.1': {} '@types/chai@5.2.3': @@ -1549,52 +1495,24 @@ snapshots: '@types/deep-eql@4.0.2': {} + '@types/esrecurse@4.3.1': {} + '@types/estree@1.0.10': {} '@types/json-schema@7.0.15': {} '@types/resolve@1.20.2': {} - '@vitest/expect@4.1.12': - dependencies: - '@standard-schema/spec': 1.1.0 - '@types/chai': 5.2.3 - '@vitest/spy': 4.1.12 - '@vitest/utils': 4.1.12 - chai: 6.3.0 - tinyrainbow: 3.2.0 - - '@vitest/mocker@4.1.12(vite@8.3.5(terser@5.51.2))': + '@vitest/mocker@5.1.0(vite@8.3.5(terser@5.51.2))': dependencies: - '@vitest/spy': 4.1.12 + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.1.0 estree-walker: 3.0.3 - magic-string: 0.30.21 + magic-string: 1.4.5 optionalDependencies: vite: 8.3.5(terser@5.51.2) - '@vitest/pretty-format@4.1.12': - dependencies: - tinyrainbow: 3.2.0 - - '@vitest/runner@4.1.12': - dependencies: - '@vitest/utils': 4.1.12 - pathe: 2.0.3 - - '@vitest/snapshot@4.1.12': - dependencies: - '@vitest/pretty-format': 4.1.12 - '@vitest/utils': 4.1.12 - magic-string: 0.30.21 - pathe: 2.0.3 - - '@vitest/spy@4.1.12': {} - - '@vitest/utils@4.1.12': - dependencies: - '@vitest/pretty-format': 4.1.12 - convert-source-map: 2.0.0 - tinyrainbow: 3.2.0 + '@vitest/spy@5.1.0': {} abab@2.0.6: {} @@ -1626,45 +1544,33 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - argparse@2.0.1: {} - assertion-error@2.0.1: {} asynckit@0.4.0: {} - balanced-match@1.0.2: {} + balanced-match@4.0.4: {} - brace-expansion@1.1.21: + brace-expansion@5.0.12: dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 + balanced-match: 4.0.4 buffer-from@1.1.2: {} + cacheable@2.5.0: + dependencies: + '@cacheable/memory': 2.2.0 + '@cacheable/utils': 2.5.0 + hookified: 1.15.1 + keyv: 5.6.0 + qified: 0.10.1 + call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 function-bind: 1.1.2 - callsites@3.1.0: {} - chai@6.3.0: {} - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 @@ -1673,10 +1579,6 @@ snapshots: commander@7.2.0: {} - concat-map@0.0.1: {} - - convert-source-map@2.0.0: {} - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -1754,59 +1656,57 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-scope@8.4.0: + eslint-scope@9.1.2: dependencies: + '@types/esrecurse': 4.3.1 + '@types/estree': 1.0.10 esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.2.1: {} + eslint-visitor-keys@5.0.1: {} - eslint@9.39.5: + eslint@10.14.0: dependencies: - '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.5) + '@eslint-community/eslint-utils': 4.10.1(eslint@10.14.0) '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.2 - '@eslint/config-helpers': 0.4.2 - '@eslint/core': 0.17.0 - '@eslint/eslintrc': 3.3.7 - '@eslint/js': 9.39.5 - '@eslint/plugin-kit': 0.4.1 + '@eslint/config-array': 0.23.5 + '@eslint/config-helpers': 0.7.0 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.3 '@humanfs/node': 0.16.8 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 '@types/estree': 1.0.10 ajv: 6.15.0 - chalk: 4.1.2 cross-spawn: 7.0.6 debug: 4.4.3 escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 esquery: 1.7.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 + file-entry-cache: 11.1.5 find-up: 5.0.0 glob-parent: 6.0.2 ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.5 + minimatch: 10.2.6 natural-compare: 1.4.0 optionator: 0.9.4 transitivePeerDependencies: - supports-color - espree@10.4.0: + espree@11.2.0: dependencies: acorn: 8.19.0 acorn-jsx: 5.3.2(acorn@8.19.0) - eslint-visitor-keys: 4.2.1 + eslint-visitor-keys: 5.0.1 esprima@4.0.1: {} @@ -1840,19 +1740,20 @@ snapshots: optionalDependencies: picomatch: 4.0.7 - file-entry-cache@8.0.0: + file-entry-cache@11.1.5: dependencies: - flat-cache: 4.0.1 + flat-cache: 6.1.23 find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@4.0.1: + flat-cache@6.1.23: dependencies: + cacheable: 2.5.0 flatted: 3.4.4 - keyv: 4.5.4 + hookified: 1.15.1 flatted@3.4.4: {} @@ -1891,24 +1792,28 @@ snapshots: dependencies: is-glob: 4.0.3 - globals@14.0.0: {} - globals@17.14.0: {} gopd@1.2.0: {} - has-flag@4.0.0: {} - has-symbols@1.1.0: {} has-tostringtag@1.0.2: dependencies: has-symbols: 1.1.0 + hashery@1.5.1: + dependencies: + hookified: 1.15.1 + hasown@2.0.4: dependencies: function-bind: 1.1.2 + hookified@1.15.1: {} + + hookified@2.2.0: {} + html-encoding-sniffer@3.0.0: dependencies: whatwg-encoding: 2.0.0 @@ -1934,11 +1839,6 @@ snapshots: ignore@5.3.2: {} - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - imurmurhash@0.1.4: {} internmap@2.0.3: {} @@ -1959,10 +1859,6 @@ snapshots: isexe@2.0.0: {} - js-yaml@4.3.2: - dependencies: - argparse: 2.0.1 - jsdom@21.1.2: dependencies: abab: 2.0.6 @@ -1996,15 +1892,13 @@ snapshots: - supports-color - utf-8-validate - json-buffer@3.0.1: {} - json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} - keyv@4.5.4: + keyv@5.6.0: dependencies: - json-buffer: 3.0.1 + '@keyv/serialize': 1.1.1 levn@0.4.1: dependencies: @@ -2064,9 +1958,7 @@ snapshots: dependencies: p-locate: 5.0.0 - lodash.merge@4.6.2: {} - - magic-string@0.30.21: + magic-string@1.4.5: dependencies: '@jridgewell/sourcemap-codec': 1.6.0 @@ -2078,9 +1970,9 @@ snapshots: dependencies: mime-db: 1.52.0 - minimatch@3.1.5: + minimatch@10.2.6: dependencies: - brace-expansion: 1.1.21 + brace-expansion: 5.0.12 ms@2.1.3: {} @@ -2090,7 +1982,7 @@ snapshots: nwsapi@2.2.28: {} - obug@2.2.1: {} + obug@3.0.0: {} optionator@0.9.4: dependencies: @@ -2109,10 +2001,6 @@ snapshots: dependencies: p-limit: 3.1.0 - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - parse5@7.3.0: dependencies: entities: 6.0.1 @@ -2123,8 +2011,6 @@ snapshots: path-parse@1.0.7: {} - pathe@2.0.3: {} - picocolors@1.1.1: {} picomatch@4.0.7: {} @@ -2143,12 +2029,14 @@ snapshots: punycode@2.3.1: {} + qified@0.10.1: + dependencies: + hookified: 2.2.0 + querystringify@2.2.0: {} requires-port@1.0.0: {} - resolve-from@4.0.0: {} - resolve@1.22.13: dependencies: es-errors: 1.3.0 @@ -2228,8 +2116,6 @@ snapshots: shebang-regex@3.0.0: {} - siginfo@2.0.0: {} - smob@1.6.2: {} source-map-js@1.2.2: {} @@ -2241,16 +2127,8 @@ snapshots: source-map@0.6.1: {} - stackback@0.0.2: {} - std-env@4.3.0: {} - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - supports-preserve-symlinks-flag@1.0.0: {} symbol-tree@3.2.4: {} @@ -2262,7 +2140,7 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - tinybench@2.9.0: {} + tinybench@6.2.3: {} tinyexec@1.3.1: {} @@ -2271,8 +2149,6 @@ snapshots: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 - tinyrainbow@3.2.0: {} - tough-cookie@4.1.4: dependencies: psl: 1.15.0 @@ -2310,28 +2186,22 @@ snapshots: fsevents: 2.3.3 terser: 5.51.2 - vitest@4.1.12(jsdom@21.1.2)(vite@8.3.5(terser@5.51.2)): + vitest@5.1.0(jsdom@21.1.2)(vite@8.3.5(terser@5.51.2)): dependencies: - '@vitest/expect': 4.1.12 - '@vitest/mocker': 4.1.12(vite@8.3.5(terser@5.51.2)) - '@vitest/pretty-format': 4.1.12 - '@vitest/runner': 4.1.12 - '@vitest/snapshot': 4.1.12 - '@vitest/spy': 4.1.12 - '@vitest/utils': 4.1.12 + '@types/chai': 5.2.3 + '@vitest/mocker': 5.1.0(vite@8.3.5(terser@5.51.2)) + chai: 6.3.0 es-module-lexer: 2.3.2 expect-type: 1.4.0 - magic-string: 0.30.21 - obug: 2.2.1 - pathe: 2.0.3 + magic-string: 1.4.5 + obug: 3.0.0 picomatch: 4.0.7 std-env: 4.3.0 - tinybench: 2.9.0 + tinybench: 6.2.3 tinyexec: 1.3.1 tinyglobby: 0.2.17 - tinyrainbow: 3.2.0 vite: 8.3.5(terser@5.51.2) - why-is-node-running: 2.3.0 + why-is-node-running: 3.2.1 optionalDependencies: jsdom: 21.1.2 transitivePeerDependencies: @@ -2358,10 +2228,7 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.3.0: - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 + why-is-node-running@3.2.1: {} word-wrap@1.2.5: {} From 4d2a7ab9e5cedc1bca54aef5583f051eca631ebc Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:18:47 -0800 Subject: [PATCH 05/13] import it from vitest Co-Authored-By: Claude Opus 5.5 --- test/ascending-test.js | 10 ++-- test/bin-test.js | 50 ++++++++--------- test/bisect-test.js | 40 ++++++------- test/bisector-test.js | 74 ++++++++++++------------- test/blur-test.js | 22 ++++---- test/count-test.js | 10 ++-- test/cross-test.js | 24 ++++---- test/cumsum-test.js | 26 ++++----- test/descending-test.js | 10 ++-- test/deviation-test.js | 18 +++--- test/difference-test.js | 8 +-- test/disjoint-test.js | 10 ++-- test/every-test.js | 18 +++--- test/extent-test.js | 26 ++++----- test/fcumsum-test.js | 30 +++++----- test/filter-test.js | 16 +++--- test/flatGroup-test.js | 4 +- test/flatRollup-test.js | 6 +- test/fsum-test.js | 32 +++++------ test/greatest-test.js | 18 +++--- test/greatestIndex-test.js | 18 +++--- test/group-test.js | 8 +-- test/groupSort-test.js | 6 +- test/groups-test.js | 6 +- test/index-test.js | 8 +-- test/intersection-test.js | 12 ++-- test/least-test.js | 18 +++--- test/leastIndex-test.js | 18 +++--- test/map-test.js | 16 +++--- test/max-test.js | 26 ++++----- test/maxIndex-test.js | 26 ++++----- test/mean-test.js | 26 ++++----- test/median-test.js | 32 +++++------ test/merge-test.js | 12 ++-- test/min-test.js | 26 ++++----- test/minIndex-test.js | 26 ++++----- test/mode-test.js | 30 +++++----- test/nice-test.js | 12 ++-- test/pairs-test.js | 10 ++-- test/permute-test.js | 20 +++---- test/quantile-test.js | 32 +++++------ test/quickselect-test.js | 10 ++-- test/range-test.js | 32 +++++------ test/rank-test.js | 20 +++---- test/reduce-test.js | 18 +++--- test/reverse-test.js | 12 ++-- test/rollup-test.js | 6 +- test/rollups-test.js | 6 +- test/scan-test.js | 12 ++-- test/shuffle-test.js | 10 ++-- test/some-test.js | 18 +++--- test/sort-test.js | 28 +++++----- test/subset-test.js | 6 +- test/sum-test.js | 26 ++++----- test/superset-test.js | 10 ++-- test/threshold/freedmanDiaconic-test.js | 10 ++-- test/threshold/scott-test.js | 10 ++-- test/threshold/sturges-test.js | 6 +- test/tickIncrement-test.js | 12 ++-- test/tickStep-test.js | 14 ++--- test/ticks-test.js | 24 ++++---- test/transpose-test.js | 14 ++--- test/union-test.js | 12 ++-- test/variance-test.js | 22 ++++---- test/zip-test.js | 12 ++-- 65 files changed, 595 insertions(+), 595 deletions(-) diff --git a/test/ascending-test.js b/test/ascending-test.js index 71a9bba7..54cfe8cd 100644 --- a/test/ascending-test.js +++ b/test/ascending-test.js @@ -1,25 +1,25 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {ascending} from "../src/index.js"; -test("ascending(a, b) returns a negative number if a < b", () => { +it("ascending(a, b) returns a negative number if a < b", () => { assert(ascending(0, 1) < 0); assert(ascending("a", "b") < 0); }); -test("ascending(a, b) returns a positive number if a > b", () => { +it("ascending(a, b) returns a positive number if a > b", () => { assert(ascending(1, 0) > 0); assert(ascending("b", "a") > 0); }); -test("ascending(a, b) returns zero if a >= b and a <= b", () => { +it("ascending(a, b) returns zero if a >= b and a <= b", () => { assert.strictEqual(ascending(0, 0), 0); assert.strictEqual(ascending("a", "a"), 0); assert.strictEqual(ascending("0", 0), 0); assert.strictEqual(ascending(0, "0"), 0); }); -test("ascending(a, b) returns NaN if a and b are not comparable", () => { +it("ascending(a, b) returns NaN if a and b are not comparable", () => { assert(isNaN(ascending(0, undefined))); assert(isNaN(ascending(undefined, 0))); assert(isNaN(ascending(undefined, undefined))); diff --git a/test/bin-test.js b/test/bin-test.js index d703cace..311704b8 100644 --- a/test/bin-test.js +++ b/test/bin-test.js @@ -1,21 +1,21 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {csvParse} from "d3-dsv"; import {readFile} from "fs/promises"; import {bin, extent, histogram, thresholdSturges, ticks} from "../src/index.js"; -test("histogram is a deprecated alias for bin", () => { +it("histogram is a deprecated alias for bin", () => { assert.strictEqual(histogram, bin); }); -test("bin() returns a default bin generator", () => { +it("bin() returns a default bin generator", () => { const h = bin(); assert.strictEqual(h.value()(42), 42); assert.strictEqual(h.domain(), extent); assert.deepStrictEqual(h.thresholds(), thresholdSturges); }); -test("bin(data) computes bins of the specified array of data", () => { +it("bin(data) computes bins of the specified array of data", () => { const h = bin(); assert.deepStrictEqual(h([0, 0, 0, 10, 20, 20]), [ box([0, 0, 0], 0, 5), @@ -26,7 +26,7 @@ test("bin(data) computes bins of the specified array of data", () => { ]); }); -test("bin(iterable) is equivalent to bin(array)", () => { +it("bin(iterable) is equivalent to bin(array)", () => { const h = bin(); assert.deepStrictEqual(h(iterable([0, 0, 0, 10, 20, 20])), [ box([0, 0, 0], 0, 5), @@ -37,14 +37,14 @@ test("bin(iterable) is equivalent to bin(array)", () => { ]); }); -test("bin.value(number) sets the constant value", () => { +it("bin.value(number) sets the constant value", () => { const h = bin().value(12); // Pointless, but for consistency. assert.deepStrictEqual(h([0, 0, 0, 1, 2, 2]), [ box([0, 0, 0, 1, 2, 2], 12, 12), ]); }); -test("bin(data) does not bin null, undefined, or NaN", () => { +it("bin(data) does not bin null, undefined, or NaN", () => { const h = bin(); assert.deepStrictEqual(h([0, null, undefined, NaN, 10, 20, 20]), [ box([0], 0, 5), @@ -55,7 +55,7 @@ test("bin(data) does not bin null, undefined, or NaN", () => { ]); }); -test("bin.value(function) sets the value accessor", () => { +it("bin.value(function) sets the value accessor", () => { const h = bin().value((d) => d.value); const a = {value: 0}; const b = {value: 10}; @@ -69,7 +69,7 @@ test("bin.value(function) sets the value accessor", () => { ]); }); -test("bin.domain(array) sets the domain", () => { +it("bin.domain(array) sets the domain", () => { const h = bin().domain([0, 20]); assert.deepStrictEqual(h.domain()(), [0, 20]); assert.deepStrictEqual(h([1, 2, 2, 10, 18, 18]), [ @@ -80,7 +80,7 @@ test("bin.domain(array) sets the domain", () => { ]); }); -test("bin.domain(function) sets the domain accessor", () => { +it("bin.domain(function) sets the domain accessor", () => { let actual; const values = [1, 2, 2, 10, 18, 18]; const domain = (values) => { actual = values; return [0, 20]; }; @@ -95,7 +95,7 @@ test("bin.domain(function) sets the domain accessor", () => { assert.deepStrictEqual(actual, values); }); -test("bin.thresholds(number) sets the approximate number of bin thresholds", () => { +it("bin.thresholds(number) sets the approximate number of bin thresholds", () => { const h = bin().thresholds(3); assert.deepStrictEqual(h([0, 0, 0, 10, 30, 30]), [ box([0, 0, 0], 0, 10), @@ -105,7 +105,7 @@ test("bin.thresholds(number) sets the approximate number of bin thresholds", () ]); }); -test("bin.thresholds(array) sets the bin thresholds", () => { +it("bin.thresholds(array) sets the bin thresholds", () => { const h = bin().thresholds([10, 20]); assert.deepStrictEqual(h([0, 0, 0, 10, 30, 30]), [ box([0, 0, 0], 0, 10), @@ -114,7 +114,7 @@ test("bin.thresholds(array) sets the bin thresholds", () => { ]); }); -test("bin.thresholds(array) ignores thresholds outside the domain", () => { +it("bin.thresholds(array) ignores thresholds outside the domain", () => { const h = bin().thresholds([0, 1, 2, 3, 4]); assert.deepStrictEqual(h([0, 1, 2, 3]), [ box([0], 0, 1), @@ -124,7 +124,7 @@ test("bin.thresholds(array) ignores thresholds outside the domain", () => { ]); }); -test("bin.thresholds(function) sets the bin thresholds accessor", () => { +it("bin.thresholds(function) sets the bin thresholds accessor", () => { let actual; const values = [0, 0, 0, 10, 30, 30]; const h = bin().thresholds((values, x0, x1) => { actual = [values, x0, x1]; return [10, 20]; }); @@ -145,7 +145,7 @@ test("bin.thresholds(function) sets the bin thresholds accessor", () => { ]); }); -test("bin(data) uses nice thresholds", () => { +it("bin(data) uses nice thresholds", () => { const h = bin().domain([0, 1]).thresholds(5); assert.deepStrictEqual(h([]).map(b => [b.x0, b.x1]), [ [0.0, 0.2], @@ -156,7 +156,7 @@ test("bin(data) uses nice thresholds", () => { ]); }); -test("bin()() returns bins whose rightmost bin is not too wide", () => { +it("bin()() returns bins whose rightmost bin is not too wide", () => { const h = bin(); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9, 10), @@ -167,7 +167,7 @@ test("bin()() returns bins whose rightmost bin is not too wide", () => { ]); }); -test("bin(data) handles fractional step correctly", () => { +it("bin(data) handles fractional step correctly", () => { const h = bin().thresholds(10); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9.5, 10), @@ -181,7 +181,7 @@ test("bin(data) handles fractional step correctly", () => { ]); }); -test("bin(data) handles fractional step correctly with a custom, non-aligned domain", () => { +it("bin(data) handles fractional step correctly with a custom, non-aligned domain", () => { const h = bin().thresholds(10).domain([9.7, 13.3]); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9.7, 10), @@ -195,7 +195,7 @@ test("bin(data) handles fractional step correctly with a custom, non-aligned dom ]); }); -test("bin(data) handles fractional step correctly with a custom, aligned domain", () => { +it("bin(data) handles fractional step correctly with a custom, aligned domain", () => { const h = bin().thresholds(10).domain([9.5, 13.5]); assert.deepStrictEqual(h([9.8, 10, 11, 12, 13, 13.2]), [ box([9.8], 9.5, 10), @@ -209,7 +209,7 @@ test("bin(data) handles fractional step correctly with a custom, aligned domain" ]); }); -test("bin(data) coerces values to numbers as expected", () => { +it("bin(data) coerces values to numbers as expected", () => { const h = bin().thresholds(10); assert.deepStrictEqual(h(["1", "2", "3", "4", "5"]), [ box(["1"], 1, 1.5), @@ -224,25 +224,25 @@ test("bin(data) coerces values to numbers as expected", () => { ]); }); -test("bin(athletes) produces the expected result", async () => { +it("bin(athletes) produces the expected result", async () => { const height = csvParse(await readFile("./test/data/athletes.csv", "utf8")).filter(d => d.height).map(d => +d.height); const bins = bin().thresholds(57)(height); assert.deepStrictEqual(bins.map(b => b.length), [1, 0, 0, 0, 0, 0, 2, 1, 2, 1, 1, 4, 11, 7, 13, 39, 78, 93, 119, 193, 354, 393, 573, 483, 651, 834, 808, 763, 627, 648, 833, 672, 578, 498, 395, 425, 278, 235, 182, 128, 91, 69, 43, 29, 21, 23, 3, 3, 1, 1, 1]); }); -test("bin(data) assigns floating point values to the correct bins", () => { +it("bin(data) assigns floating point values to the correct bins", () => { for (const n of [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000]) { assert.ok(bin().thresholds(n)(ticks(1, 2, n)).every(d => d.length === 1)); } }); -test("bin(data) assigns integer values to the correct bins", () => { +it("bin(data) assigns integer values to the correct bins", () => { assert.deepStrictEqual(bin().domain([4, 5])([5]), [box([5], 4, 5)]); const eights = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; assert.deepStrictEqual(bin().domain([3, 8])(eights), [box([], 3, 4), box([], 4, 5), box([], 5, 6), box([], 6, 7), box(eights, 7, 8)]); }); -test("bin(data) does not mutate user-supplied thresholds as an array", () => { +it("bin(data) does not mutate user-supplied thresholds as an array", () => { const thresholds = [3, 4, 5, 6]; const b = bin().domain([4, 5]).thresholds(thresholds); assert.deepStrictEqual(b([5]), [box([], 4, 5), box([5], 5, 5)]); @@ -250,7 +250,7 @@ test("bin(data) does not mutate user-supplied thresholds as an array", () => { assert.deepStrictEqual(b.thresholds()(), [3, 4, 5, 6]); }); -test("bin(data) does not mutate user-supplied thresholds as a function", () => { +it("bin(data) does not mutate user-supplied thresholds as a function", () => { const thresholds = [3, 4, 5, 6]; const b = bin().domain([4, 5]).thresholds(() => thresholds); assert.deepStrictEqual(b([5]), [box([], 4, 5), box([5], 5, 5)]); diff --git a/test/bisect-test.js b/test/bisect-test.js index e735ac5a..6123e9db 100644 --- a/test/bisect-test.js +++ b/test/bisect-test.js @@ -1,30 +1,30 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {bisect, bisectLeft, bisectRight} from "../src/index.js"; -test("bisect is an alias for bisectRight", () => { +it("bisect is an alias for bisectRight", () => { assert.strictEqual(bisect, bisectRight); }); -test("bisectLeft(array, value) returns the index of an exact match", () => { +it("bisectLeft(array, value) returns the index of an exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectLeft(numbers, 1), 0); assert.strictEqual(bisectLeft(numbers, 2), 1); assert.strictEqual(bisectLeft(numbers, 3), 2); }); -test("bisectLeft(array, value) returns the index of the first match", () => { +it("bisectLeft(array, value) returns the index of the first match", () => { const numbers = [1, 2, 2, 3]; assert.strictEqual(bisectLeft(numbers, 1), 0); assert.strictEqual(bisectLeft(numbers, 2), 1); assert.strictEqual(bisectLeft(numbers, 3), 3); }); -test("bisectLeft(empty, value) returns zero", () => { +it("bisectLeft(empty, value) returns zero", () => { assert.strictEqual(bisectLeft([], 1), 0); }); -test("bisectLeft(array, value) returns the insertion point of a non-exact match", () => { +it("bisectLeft(array, value) returns the insertion point of a non-exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectLeft(numbers, 0.5), 0); assert.strictEqual(bisectLeft(numbers, 1.5), 1); @@ -32,14 +32,14 @@ test("bisectLeft(array, value) returns the insertion point of a non-exact match" assert.strictEqual(bisectLeft(numbers, 3.5), 3); }); -test("bisectLeft(array, value) has undefined behavior if the search value is unorderable", () => { +it("bisectLeft(array, value) has undefined behavior if the search value is unorderable", () => { const numbers = [1, 2, 3]; bisectLeft(numbers, new Date(NaN)); // who knows what this will return! bisectLeft(numbers, undefined); bisectLeft(numbers, NaN); }); -test("bisectLeft(array, value, lo) observes the specified lower bound", () => { +it("bisectLeft(array, value, lo) observes the specified lower bound", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectLeft(numbers, 0, 2), 2); assert.strictEqual(bisectLeft(numbers, 1, 2), 2); @@ -50,7 +50,7 @@ test("bisectLeft(array, value, lo) observes the specified lower bound", () => { assert.strictEqual(bisectLeft(numbers, 6, 2), 5); }); -test("bisectLeft(array, value, lo, hi) observes the specified bounds", () => { +it("bisectLeft(array, value, lo, hi) observes the specified bounds", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectLeft(numbers, 0, 2, 3), 2); assert.strictEqual(bisectLeft(numbers, 1, 2, 3), 2); @@ -61,7 +61,7 @@ test("bisectLeft(array, value, lo, hi) observes the specified bounds", () => { assert.strictEqual(bisectLeft(numbers, 6, 2, 3), 3); }); -test("bisectLeft(array, value) handles large sparse d3", () => { +it("bisectLeft(array, value) handles large sparse d3", () => { const numbers = []; let i = 1 << 30; numbers[i++] = 1; @@ -78,25 +78,25 @@ test("bisectLeft(array, value) handles large sparse d3", () => { assert.strictEqual(bisectLeft(numbers, 6, i - 5, i), i - 0); }); -test("bisectRight(array, value) returns the index after an exact match", () => { +it("bisectRight(array, value) returns the index after an exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectRight(numbers, 1), 1); assert.strictEqual(bisectRight(numbers, 2), 2); assert.strictEqual(bisectRight(numbers, 3), 3); }); -test("bisectRight(array, value) returns the index after the last match", () => { +it("bisectRight(array, value) returns the index after the last match", () => { const numbers = [1, 2, 2, 3]; assert.strictEqual(bisectRight(numbers, 1), 1); assert.strictEqual(bisectRight(numbers, 2), 3); assert.strictEqual(bisectRight(numbers, 3), 4); }); -test("bisectRight(empty, value) returns zero", () => { +it("bisectRight(empty, value) returns zero", () => { assert.strictEqual(bisectRight([], 1), 0); }); -test("bisectRight(array, value) returns the insertion point of a non-exact match", () => { +it("bisectRight(array, value) returns the insertion point of a non-exact match", () => { const numbers = [1, 2, 3]; assert.strictEqual(bisectRight(numbers, 0.5), 0); assert.strictEqual(bisectRight(numbers, 1.5), 1); @@ -104,7 +104,7 @@ test("bisectRight(array, value) returns the insertion point of a non-exact match assert.strictEqual(bisectRight(numbers, 3.5), 3); }); -test("bisectRight(array, value, lo) observes the specified lower bound", () => { +it("bisectRight(array, value, lo) observes the specified lower bound", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectRight(numbers, 0, 2), 2); assert.strictEqual(bisectRight(numbers, 1, 2), 2); @@ -115,7 +115,7 @@ test("bisectRight(array, value, lo) observes the specified lower bound", () => { assert.strictEqual(bisectRight(numbers, 6, 2), 5); }); -test("bisectRight(array, value, lo, hi) observes the specified bounds", () => { +it("bisectRight(array, value, lo, hi) observes the specified bounds", () => { const numbers = [1, 2, 3, 4, 5]; assert.strictEqual(bisectRight(numbers, 0, 2, 3), 2); assert.strictEqual(bisectRight(numbers, 1, 2, 3), 2); @@ -126,7 +126,7 @@ test("bisectRight(array, value, lo, hi) observes the specified bounds", () => { assert.strictEqual(bisectRight(numbers, 6, 2, 3), 3); }); -test("bisectRight(array, value) handles large sparse d3", () => { +it("bisectRight(array, value) handles large sparse d3", () => { const numbers = []; let i = 1 << 30; numbers[i++] = 1; @@ -143,7 +143,7 @@ test("bisectRight(array, value) handles large sparse d3", () => { assert.strictEqual(bisectRight(numbers, 6, i - 5, i), i - 0); }); -test("bisectLeft(array, value, lo, hi) keeps non-comparable values to the right", () => { +it("bisectLeft(array, value, lo, hi) keeps non-comparable values to the right", () => { const values = [1, 2, null, undefined, NaN]; assert.strictEqual(bisectLeft(values, 1), 0); assert.strictEqual(bisectLeft(values, 2), 1); @@ -152,13 +152,13 @@ test("bisectLeft(array, value, lo, hi) keeps non-comparable values to the right" assert.strictEqual(bisectLeft(values, NaN), 5); }); -test("bisectLeft(array, value, lo, hi) keeps comparable values to the left", () => { +it("bisectLeft(array, value, lo, hi) keeps comparable values to the left", () => { const values = [null, undefined, NaN]; assert.strictEqual(bisectLeft(values, 1), 0); assert.strictEqual(bisectLeft(values, 2), 0); }); -test("bisectRight(array, value, lo, hi) keeps non-comparable values to the right", () => { +it("bisectRight(array, value, lo, hi) keeps non-comparable values to the right", () => { const values = [1, 2, null, undefined]; assert.strictEqual(bisectRight(values, 1), 1); assert.strictEqual(bisectRight(values, 2), 2); diff --git a/test/bisector-test.js b/test/bisector-test.js index 7c723a14..8df16640 100644 --- a/test/bisector-test.js +++ b/test/bisector-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {ascending, bisector} from "../src/index.js"; -test("bisector(comparator).left(array, value) returns the index of an exact match", () => { +it("bisector(comparator).left(array, value) returns the index of an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(1)), 0); @@ -10,7 +10,7 @@ test("bisector(comparator).left(array, value) returns the index of an exact matc assert.strictEqual(bisectLeft(boxes, box(3)), 2); }); -test("bisector(comparator).left(array, value) returns the index of the first match", () => { +it("bisector(comparator).left(array, value) returns the index of the first match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(1)), 0); @@ -18,11 +18,11 @@ test("bisector(comparator).left(array, value) returns the index of the first mat assert.strictEqual(bisectLeft(boxes, box(3)), 3); }); -test("bisector(comparator).left(empty, value) returns zero", () => { +it("bisector(comparator).left(empty, value) returns zero", () => { assert.strictEqual(bisector(() => { throw new Error(); }).left([], 1), 0); }); -test("bisector(comparator).left(array, value) returns the insertion point of a non-exact match", () => { +it("bisector(comparator).left(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(0.5)), 0); @@ -31,7 +31,7 @@ test("bisector(comparator).left(array, value) returns the insertion point of a n assert.strictEqual(bisectLeft(boxes, box(3.5)), 3); }); -test("bisector(comparator).left(array, value) has undefined behavior if the search value is unorderable", () => { +it("bisector(comparator).left(array, value) has undefined behavior if the search value is unorderable", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBox).left; bisectLeft(boxes, box(new Date(NaN))); // who knows what this will return! @@ -39,7 +39,7 @@ test("bisector(comparator).left(array, value) has undefined behavior if the sear bisectLeft(boxes, box(NaN)); }); -test("bisector(comparator).left(array, value, lo) observes the specified lower bound", () => { +it("bisector(comparator).left(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(0), 2), 2); @@ -51,7 +51,7 @@ test("bisector(comparator).left(array, value, lo) observes the specified lower b assert.strictEqual(bisectLeft(boxes, box(6), 2), 5); }); -test("bisector(comparator).left(array, value, lo, hi) observes the specified bounds", () => { +it("bisector(comparator).left(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(0), 2, 3), 2); @@ -63,7 +63,7 @@ test("bisector(comparator).left(array, value, lo, hi) observes the specified bou assert.strictEqual(bisectLeft(boxes, box(6), 2, 3), 3); }); -test("bisector(comparator).left(array, value) handles large sparse d3", () => { +it("bisector(comparator).left(array, value) handles large sparse d3", () => { const boxes = []; const bisectLeft = bisector(ascendingBox).left; let i = 1 << 30; @@ -81,7 +81,7 @@ test("bisector(comparator).left(array, value) handles large sparse d3", () => { assert.strictEqual(bisectLeft(boxes, box(6), i - 5, i), i - 0); }); -test("bisector(comparator).right(array, value) returns the index after an exact match", () => { +it("bisector(comparator).right(array, value) returns the index after an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(1)), 1); @@ -89,7 +89,7 @@ test("bisector(comparator).right(array, value) returns the index after an exact assert.strictEqual(bisectRight(boxes, box(3)), 3); }); -test("bisector(comparator).right(array, value) returns the index after the last match", () => { +it("bisector(comparator).right(array, value) returns the index after the last match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(1)), 1); @@ -97,11 +97,11 @@ test("bisector(comparator).right(array, value) returns the index after the last assert.strictEqual(bisectRight(boxes, box(3)), 4); }); -test("bisector(comparator).right(empty, value) returns zero", () => { +it("bisector(comparator).right(empty, value) returns zero", () => { assert.strictEqual(bisector(() => { throw new Error(); }).right([], 1), 0); }); -test("bisector(comparator).right(array, value) returns the insertion point of a non-exact match", () => { +it("bisector(comparator).right(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(0.5)), 0); @@ -110,7 +110,7 @@ test("bisector(comparator).right(array, value) returns the insertion point of a assert.strictEqual(bisectRight(boxes, box(3.5)), 3); }); -test("bisector(comparator).right(array, value, lo) observes the specified lower bound", () => { +it("bisector(comparator).right(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(0), 2), 2); @@ -122,7 +122,7 @@ test("bisector(comparator).right(array, value, lo) observes the specified lower assert.strictEqual(bisectRight(boxes, box(6), 2), 5); }); -test("bisector(comparator).right(array, value, lo, hi) observes the specified bounds", () => { +it("bisector(comparator).right(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(ascendingBox).right; assert.strictEqual(bisectRight(boxes, box(0), 2, 3), 2); @@ -134,7 +134,7 @@ test("bisector(comparator).right(array, value, lo, hi) observes the specified bo assert.strictEqual(bisectRight(boxes, box(6), 2, 3), 3); }); -test("bisector(comparator).right(array, value) handles large sparse d3", () => { +it("bisector(comparator).right(array, value) handles large sparse d3", () => { const boxes = []; const bisectRight = bisector(ascendingBox).right; let i = 1 << 30; @@ -152,7 +152,7 @@ test("bisector(comparator).right(array, value) handles large sparse d3", () => { assert.strictEqual(bisectRight(boxes, box(6), i - 5, i), i - 0); }); -test("bisector(comparator).left(array, value) supports an asymmetric (object, value) comparator", () => { +it("bisector(comparator).left(array, value) supports an asymmetric (object, value) comparator", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(ascendingBoxValue).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -163,7 +163,7 @@ test("bisector(comparator).left(array, value) supports an asymmetric (object, va // This is not possible because the bisector has no way of knowing whether the // given comparator is symmetric or asymmetric, and if the comparator is // asymmetric it cannot be used to test the search value for orderability. -test.skip("bisector(comparator).left(array, value) keeps non-comparable values to the right", () => { +it.skip("bisector(comparator).left(array, value) keeps non-comparable values to the right", () => { const boxes = [1, 2, null, undefined, NaN].map(box); const bisectLeft = bisector(ascendingBox).left; assert.strictEqual(bisectLeft(boxes, box(1)), 0); @@ -173,7 +173,7 @@ test.skip("bisector(comparator).left(array, value) keeps non-comparable values t assert.strictEqual(bisectLeft(boxes, box(NaN)), 5); }); -test("bisector(accessor).left(array, value) keeps non-comparable values to the right", () => { +it("bisector(accessor).left(array, value) keeps non-comparable values to the right", () => { const boxes = [1, 2, null, undefined, NaN].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -183,7 +183,7 @@ test("bisector(accessor).left(array, value) keeps non-comparable values to the r assert.strictEqual(bisectLeft(boxes, NaN), 5); }); -test("bisector(accessor).left(array, value) returns the index of an exact match", () => { +it("bisector(accessor).left(array, value) returns the index of an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -191,7 +191,7 @@ test("bisector(accessor).left(array, value) returns the index of an exact match" assert.strictEqual(bisectLeft(boxes, 3), 2); }); -test("bisector(accessor).left(array, value) returns the index of the first match", () => { +it("bisector(accessor).left(array, value) returns the index of the first match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 1), 0); @@ -199,7 +199,7 @@ test("bisector(accessor).left(array, value) returns the index of the first match assert.strictEqual(bisectLeft(boxes, 3), 3); }); -test("bisector(accessor).left(array, value) returns the insertion point of a non-exact match", () => { +it("bisector(accessor).left(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 0.5), 0); @@ -208,7 +208,7 @@ test("bisector(accessor).left(array, value) returns the insertion point of a non assert.strictEqual(bisectLeft(boxes, 3.5), 3); }); -test("bisector(accessor).left(array, value) has undefined behavior if the search value is unorderable", () => { +it("bisector(accessor).left(array, value) has undefined behavior if the search value is unorderable", () => { const boxes = [1, 2, 3].map(box); const bisectLeft = bisector(unbox).left; bisectLeft(boxes, new Date(NaN)); // who knows what this will return! @@ -216,7 +216,7 @@ test("bisector(accessor).left(array, value) has undefined behavior if the search bisectLeft(boxes, NaN); }); -test("bisector(accessor).left(array, value, lo) observes the specified lower bound", () => { +it("bisector(accessor).left(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 0, 2), 2); @@ -228,7 +228,7 @@ test("bisector(accessor).left(array, value, lo) observes the specified lower bou assert.strictEqual(bisectLeft(boxes, 6, 2), 5); }); -test("bisector(accessor).left(array, value, lo, hi) observes the specified bounds", () => { +it("bisector(accessor).left(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectLeft = bisector(unbox).left; assert.strictEqual(bisectLeft(boxes, 0, 2, 3), 2); @@ -240,7 +240,7 @@ test("bisector(accessor).left(array, value, lo, hi) observes the specified bound assert.strictEqual(bisectLeft(boxes, 6, 2, 3), 3); }); -test("bisector(accessor).left(array, value) handles large sparse d3", () => { +it("bisector(accessor).left(array, value) handles large sparse d3", () => { const boxes = []; const bisectLeft = bisector(unbox).left; let i = 1 << 30; @@ -258,7 +258,7 @@ test("bisector(accessor).left(array, value) handles large sparse d3", () => { assert.strictEqual(bisectLeft(boxes, 6, i - 5, i), i - 0); }); -test("bisector(accessor).right(array, value) returns the index after an exact match", () => { +it("bisector(accessor).right(array, value) returns the index after an exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 1), 1); @@ -266,7 +266,7 @@ test("bisector(accessor).right(array, value) returns the index after an exact ma assert.strictEqual(bisectRight(boxes, 3), 3); }); -test("bisector(accessor).right(array, value) returns the index after the last match", () => { +it("bisector(accessor).right(array, value) returns the index after the last match", () => { const boxes = [1, 2, 2, 3].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 1), 1); @@ -274,7 +274,7 @@ test("bisector(accessor).right(array, value) returns the index after the last ma assert.strictEqual(bisectRight(boxes, 3), 4); }); -test("bisector(accessor).right(array, value) returns the insertion point of a non-exact match", () => { +it("bisector(accessor).right(array, value) returns the insertion point of a non-exact match", () => { const boxes = [1, 2, 3].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 0.5), 0); @@ -283,7 +283,7 @@ test("bisector(accessor).right(array, value) returns the insertion point of a no assert.strictEqual(bisectRight(boxes, 3.5), 3); }); -test("bisector(accessor).right(array, value, lo) observes the specified lower bound", () => { +it("bisector(accessor).right(array, value, lo) observes the specified lower bound", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 0, 2), 2); @@ -295,7 +295,7 @@ test("bisector(accessor).right(array, value, lo) observes the specified lower bo assert.strictEqual(bisectRight(boxes, 6, 2), 5); }); -test("bisector(accessor).right(array, value, lo, hi) observes the specified bounds", () => { +it("bisector(accessor).right(array, value, lo, hi) observes the specified bounds", () => { const boxes = [1, 2, 3, 4, 5].map(box); const bisectRight = bisector(unbox).right; assert.strictEqual(bisectRight(boxes, 0, 2, 3), 2); @@ -307,7 +307,7 @@ test("bisector(accessor).right(array, value, lo, hi) observes the specified boun assert.strictEqual(bisectRight(boxes, 6, 2, 3), 3); }); -test("bisector(accessor).right(array, value) handles large sparse d3", () => { +it("bisector(accessor).right(array, value) handles large sparse d3", () => { const boxes = []; const bisectRight = bisector(unbox).right; let i = 1 << 30; @@ -325,7 +325,7 @@ test("bisector(accessor).right(array, value) handles large sparse d3", () => { assert.strictEqual(bisectRight(boxes, 6, i - 5, i), i - 0); }); -test("bisector(accessor).center(array, value) returns the closest index", () => { +it("bisector(accessor).center(array, value) returns the closest index", () => { const data = [0, 1, 2, 3, 4]; const bisectCenter = bisector(d => +d).center; assert.strictEqual(bisectCenter(data, 2), 2); @@ -336,7 +336,7 @@ test("bisector(accessor).center(array, value) returns the closest index", () => assert.strictEqual(bisectCenter(data, 4.5), 4); }); -test("bisector(comparator).center(array, value) returns the closest index", () => { +it("bisector(comparator).center(array, value) returns the closest index", () => { const data = [0, 1, 2, 3, 4]; const bisectCenter = bisector((d, x) => +d - x).center; assert.strictEqual(bisectCenter(data, 2), 2); @@ -345,11 +345,11 @@ test("bisector(comparator).center(array, value) returns the closest index", () = assert.strictEqual(bisectCenter(data, 3), 3); }); -test("bisector(comparator).center(empty, value) returns zero", () => { +it("bisector(comparator).center(empty, value) returns zero", () => { assert.strictEqual(bisector(() => { throw new Error(); }).center([], 1), 0); }); -test("bisector(ascending).center(array, value) returns the left value", () => { +it("bisector(ascending).center(array, value) returns the left value", () => { const data = [0, 1, 2, 3, 4]; const bisectCenter = bisector(ascending).center; assert.strictEqual(bisectCenter(data, 2.0), 2); @@ -358,7 +358,7 @@ test("bisector(ascending).center(array, value) returns the left value", () => { assert.strictEqual(bisectCenter(data, 3.0), 3); }); -test("bisector(ordinalAccessor).center(array, value) returns the left value", () => { +it("bisector(ordinalAccessor).center(array, value) returns the left value", () => { const data = ["aa", "bb", "cc", "dd", "ee"]; const bisectCenter = bisector(d => d).center; assert.strictEqual(bisectCenter(data, "cc"), 2); diff --git a/test/blur-test.js b/test/blur-test.js index f9086e45..1427b77c 100644 --- a/test/blur-test.js +++ b/test/blur-test.js @@ -1,35 +1,35 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {blur, blur2} from "../src/index.js"; -test("blur(values, r) returns values", () => { +it("blur(values, r) returns values", () => { const V = [0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0]; assert.strictEqual(blur(V, 1), V); assert.deepStrictEqual(V, [0, 0, 0, 1, 3, 6, 7, 6, 3, 1, 0, 0, 0, 0]); }); -test("blur(values, r) observes the expected integer radius r", () => { +it("blur(values, r) observes the expected integer radius r", () => { assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.0).map(round), [0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 27.00, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 1.0).map(round), [0.000, 0.000, 0.000, 1.000, 3.000, 6.000, 7.000, 6.000, 3.000, 1.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 2.0).map(round), [0.216, 0.648, 1.296, 2.160, 3.240, 3.888, 4.104, 3.888, 3.240, 2.160, 1.296, 0.648, 0.216, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 3.0).map(round), [1.023, 1.338, 1.732, 2.204, 2.598, 2.834, 2.913, 2.834, 2.598, 2.204, 1.653, 1.181, 0.787, 0.472]); }); -test("blur(values, r) observes the expected fractional radius r", () => { +it("blur(values, r) observes the expected fractional radius r", () => { assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.5).map(round), [0.000, 0.000, 0.000, 0.422, 2.531, 6.328, 8.438, 6.328, 2.531, 0.422, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 1.5).map(round), [0.053, 0.316, 0.949, 2.004, 3.322, 4.430, 4.852, 4.430, 3.322, 2.004, 0.949, 0.316, 0.053, 0.000]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 2.5).map(round), [0.672, 1.078, 1.609, 2.234, 2.813, 3.188, 3.313, 3.188, 2.813, 2.234, 1.594, 1.031, 0.594, 0.281]); assert.deepStrictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 3.5).map(round), [1.266, 1.503, 1.780, 2.057, 2.294, 2.452, 2.505, 2.452, 2.294, 2.030, 1.701, 1.371, 1.081, 0.844]); }); -test("blur(values, r) repeats starting values before the window", () => { +it("blur(values, r) repeats starting values before the window", () => { assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 0.0).map(round), [27.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 1.0).map(round), [13.000, 9.000, 4.000, 1.000, 0.000, 0.000, 0.000, 0.000]); assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 2.0).map(round), [11.016, 9.072, 6.696, 4.104, 2.160, 0.864, 0.216, 0.000]); assert.deepStrictEqual(blur([27, 0, 0, 0, 0, 0, 0, 0], 3.0).map(round), [10.233, 8.974, 7.478, 5.825, 4.093, 2.676, 1.574, 0.787]); }); -test("blur(values, r) approximately preserves total value", () => { +it("blur(values, r) approximately preserves total value", () => { assert.strictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.0).reduce((p, v) => p + v), 27); assert.strictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 0.5).reduce((p, v) => p + v), 27); assert.strictEqual(blur([0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0], 1.0).reduce((p, v) => p + v), 27); @@ -57,12 +57,12 @@ const unit = { ] }; -test("blur2(data, r) modifies in-place", () => { +it("blur2(data, r) modifies in-place", () => { const copy = copy2(unit); assert.strictEqual(blur2(copy, 1), copy); }); -test("data.height is redundant for blur2", () => { +it("data.height is redundant for blur2", () => { const copy = copy2(unit); delete copy.height; assert.deepStrictEqual(blur2(copy, 1).data.map(round), [ @@ -80,7 +80,7 @@ test("data.height is redundant for blur2", () => { ]); }); -test("blur2(data, r) observes the expected integer radius r", () => { +it("blur2(data, r) observes the expected integer radius r", () => { assert.deepStrictEqual(blur2(copy2(unit), 0), unit); assert.deepStrictEqual(blur2(copy2(unit), 1).data.map(round), [ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, @@ -110,7 +110,7 @@ test("blur2(data, r) observes the expected integer radius r", () => { ]); }); -test("blur2(data, rx, 0) does horizontal blurring", () => { +it("blur2(data, rx, 0) does horizontal blurring", () => { assert.deepStrictEqual(blur2(copy2(unit), 0, 0).data, [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -152,7 +152,7 @@ test("blur2(data, rx, 0) does horizontal blurring", () => { ]); }); -test("blur2(data, 0, ry) does vertical blurring", () => { +it("blur2(data, 0, ry) does vertical blurring", () => { assert.deepStrictEqual(blur2(copy2(unit), 0, 0).data, [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/test/count-test.js b/test/count-test.js index 062a836a..24822703 100644 --- a/test/count-test.js +++ b/test/count-test.js @@ -1,22 +1,22 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {count} from "../src/index.js"; -test("count() accepts an iterable", () => { +it("count() accepts an iterable", () => { assert.deepStrictEqual(count([1, 2]), 2); assert.deepStrictEqual(count(new Set([1, 2])), 2); assert.deepStrictEqual(count(generate(1, 2)), 2); }); -test("count() ignores NaN, null", () => { +it("count() ignores NaN, null", () => { assert.deepStrictEqual(count([NaN, null, 0, 1]), 2); }); -test("count() coerces to a number", () => { +it("count() coerces to a number", () => { assert.deepStrictEqual(count(["1", " 2", "Fred"]), 2); }); -test("count() accepts an accessor", () => { +it("count() accepts an accessor", () => { assert.deepStrictEqual(count([{v:NaN}, {}, {v:0}, {v:1}], d => d.v), 2); assert.deepStrictEqual(count([{n: "Alice", age: NaN}, {n: "Bob", age: 18}, {n: "Other"}], d => d.age), 1); }); diff --git a/test/cross-test.js b/test/cross-test.js index 0657e0e9..83fdf235 100644 --- a/test/cross-test.js +++ b/test/cross-test.js @@ -1,39 +1,39 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {cross} from "../src/index.js"; -test("cross() returns an empty array", () => { +it("cross() returns an empty array", () => { assert.deepStrictEqual(cross(), []); }); -test("cross([]) returns an empty array", () => { +it("cross([]) returns an empty array", () => { assert.deepStrictEqual(cross([]), []); }); -test("cross([1, 2], []) returns an empty array", () => { +it("cross([1, 2], []) returns an empty array", () => { assert.deepStrictEqual(cross([1, 2], []), []); }); -test("cross({length: weird}) returns an empty array", () => { +it("cross({length: weird}) returns an empty array", () => { assert.deepStrictEqual(cross({length: NaN}), []); assert.deepStrictEqual(cross({length: 0.5}), []); assert.deepStrictEqual(cross({length: -1}), []); assert.deepStrictEqual(cross({length: undefined}), []); }); -test("cross(...strings) returns the expected result", () => { +it("cross(...strings) returns the expected result", () => { assert.deepStrictEqual(cross("foo", "bar", (a, b) => a + b), ["fb", "fa", "fr", "ob", "oa", "or", "ob", "oa", "or"]); }); -test("cross(a) returns the expected result", () => { +it("cross(a) returns the expected result", () => { assert.deepStrictEqual(cross([1, 2]), [[1], [2]]); }); -test("cross(a, b) returns Cartesian product a×b", () => { +it("cross(a, b) returns Cartesian product a×b", () => { assert.deepStrictEqual(cross([1, 2], ["x", "y"]), [[1, "x"], [1, "y"], [2, "x"], [2, "y"]]); }); -test("cross(a, b, c) returns Cartesian product a×b×c", () => { +it("cross(a, b, c) returns Cartesian product a×b×c", () => { assert.deepStrictEqual(cross([1, 2], [3, 4], [5, 6, 7]), [ [1, 3, 5], [1, 3, 6], @@ -50,15 +50,15 @@ test("cross(a, b, c) returns Cartesian product a×b×c", () => { ]); }); -test("cross(a, b, f) invokes the specified function for each pair", () => { +it("cross(a, b, f) invokes the specified function for each pair", () => { assert.deepStrictEqual(cross([1, 2], ["x", "y"], (a, b) => a + b), ["1x", "1y", "2x", "2y"]); }); -test("cross(a, b, c, f) invokes the specified function for each triple", () => { +it("cross(a, b, c, f) invokes the specified function for each triple", () => { assert.deepStrictEqual(cross([1, 2], [3, 4], [5, 6, 7], (a, b, c) => a + b + c), [9, 10, 11, 10, 11, 12, 10, 11, 12, 11, 12, 13]); }); -test("cross(a, b) returns Cartesian product a×b of generators", () => { +it("cross(a, b) returns Cartesian product a×b of generators", () => { assert.deepStrictEqual(cross(generate(1, 2), generate("x", "y")), [[1, "x"], [1, "y"], [2, "x"], [2, "y"]]); }); diff --git a/test/cumsum-test.js b/test/cumsum-test.js index dca0d8ca..69417b68 100644 --- a/test/cumsum-test.js +++ b/test/cumsum-test.js @@ -1,15 +1,15 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {cumsum} from "../src/index.js"; -test("cumsum(array) returns the cumulative sum of the specified numbers", () => { +it("cumsum(array) returns the cumulative sum of the specified numbers", () => { assert.deepStrictEqual(Array.from(cumsum([1])), [1]); assert.deepStrictEqual(Array.from(cumsum([5, 1, 2, 3, 4])), [5, 6, 8, 11, 15]); assert.deepStrictEqual(Array.from(cumsum([20, 3])), [20, 23]); assert.deepStrictEqual(Array.from(cumsum([3, 20])), [3, 23]); }); -test("cumsum(array) observes values that can be coerced to numbers", () => { +it("cumsum(array) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", "3"])), [20, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", "20"])), [3, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", 20])), [3, 23]); @@ -18,18 +18,18 @@ test("cumsum(array) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", 3])), [20, 23]); }); -test("cumsum(array) ignores non-numeric values", () => { +it("cumsum(array) ignores non-numeric values", () => { assert.deepStrictEqual(Array.from(cumsum(["a", "b", "c"])), [0, 0, 0]); assert.deepStrictEqual(Array.from(cumsum(["a", 1, "2"])), [0, 1, 3]); }); -test("cumsum(array) ignores null, undefined and NaN", () => { +it("cumsum(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(Array.from(cumsum([NaN, 1, 2, 3, 4, 5])), [0, 1, 3, 6, 10, 15]); assert.deepStrictEqual(Array.from(cumsum([1, 2, 3, 4, 5, NaN])), [1, 3, 6, 10, 15, 15]); assert.deepStrictEqual(Array.from(cumsum([10, null, 3, undefined, 5, NaN])), [10, 10, 13, 13, 18, 18]); }); -test("cumsum(array) returns zeros if there are no numbers", () => { +it("cumsum(array) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([])), []); assert.deepStrictEqual(Array.from(cumsum([NaN])), [0]); assert.deepStrictEqual(Array.from(cumsum([undefined])), [0]); @@ -37,14 +37,14 @@ test("cumsum(array) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([undefined, NaN, {}])), [0, 0, 0]); }); -test("cumsum(array, f) returns the cumsum of the specified numbers", () => { +it("cumsum(array, f) returns the cumsum of the specified numbers", () => { assert.deepStrictEqual(Array.from(cumsum([1].map(box), unbox)), [1]); assert.deepStrictEqual(Array.from(cumsum([5, 1, 2, 3, 4].map(box), unbox)), [5, 6, 8, 11, 15]); assert.deepStrictEqual(Array.from(cumsum([20, 3].map(box), unbox)), [20, 23]); assert.deepStrictEqual(Array.from(cumsum([3, 20].map(box), unbox)), [3, 23]); }); -test("cumsum(array, f) observes values that can be coerced to numbers", () => { +it("cumsum(array, f) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", "3"].map(box), unbox)), [20, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", "20"].map(box), unbox)), [3, 23]); assert.deepStrictEqual(Array.from(cumsum(["3", 20].map(box), unbox)), [3, 23]); @@ -53,18 +53,18 @@ test("cumsum(array, f) observes values that can be coerced to numbers", () => { assert.deepStrictEqual(Array.from(cumsum(["20", 3].map(box), unbox)), [20, 23]); }); -test("cumsum(array, f) ignores non-numeric values", () => { +it("cumsum(array, f) ignores non-numeric values", () => { assert.deepStrictEqual(Array.from(cumsum(["a", "b", "c"].map(box), unbox)), [0, 0, 0]); assert.deepStrictEqual(Array.from(cumsum(["a", 1, "2"].map(box), unbox)), [0, 1, 3]); }); -test("cumsum(array, f) ignores null, undefined and NaN", () => { +it("cumsum(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(Array.from(cumsum([NaN, 1, 2, 3, 4, 5].map(box), unbox)), [0, 1, 3, 6, 10, 15]); assert.deepStrictEqual(Array.from(cumsum([1, 2, 3, 4, 5, NaN].map(box), unbox)), [1, 3, 6, 10, 15, 15]); assert.deepStrictEqual(Array.from(cumsum([10, null, 3, undefined, 5, NaN].map(box), unbox)), [10, 10, 13, 13, 18, 18]); }); -test("cumsum(array, f) returns zeros if there are no numbers", () => { +it("cumsum(array, f) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([].map(box), unbox)), []); assert.deepStrictEqual(Array.from(cumsum([NaN].map(box), unbox)), [0]); assert.deepStrictEqual(Array.from(cumsum([undefined].map(box), unbox)), [0]); @@ -72,14 +72,14 @@ test("cumsum(array, f) returns zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(cumsum([undefined, NaN, {}].map(box), unbox)), [0, 0, 0]); }); -test("cumsum(array, f) passes the accessor d, i, and array", () => { +it("cumsum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; cumsum(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("cumsum(array, f) uses the undefined context", () => { +it("cumsum(array, f) uses the undefined context", () => { const results = []; cumsum([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/descending-test.js b/test/descending-test.js index 64427e68..513ed06a 100644 --- a/test/descending-test.js +++ b/test/descending-test.js @@ -1,25 +1,25 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {descending} from "../src/index.js"; -test("descending(a, b) returns a positive number if a < b", () => { +it("descending(a, b) returns a positive number if a < b", () => { assert(descending(0, 1) > 0); assert(descending("a", "b") > 0); }); -test("descending(a, b) returns a negative number if a > b", () => { +it("descending(a, b) returns a negative number if a > b", () => { assert(descending(1, 0) < 0); assert(descending("b", "a") < 0); }); -test("descending(a, b) returns zero if a >= b and a <= b", () => { +it("descending(a, b) returns zero if a >= b and a <= b", () => { assert.strictEqual(descending(0, 0), 0); assert.strictEqual(descending("a", "a"), 0); assert.strictEqual(descending("0", 0), 0); assert.strictEqual(descending(0, "0"), 0); }); -test("descending(a, b) returns NaN if a and b are not comparable", () => { +it("descending(a, b) returns NaN if a and b are not comparable", () => { assert(isNaN(descending(0, undefined))); assert(isNaN(descending(undefined, 0))); assert(isNaN(descending(undefined, undefined))); diff --git a/test/deviation-test.js b/test/deviation-test.js index 941595ab..6e9adf1e 100644 --- a/test/deviation-test.js +++ b/test/deviation-test.js @@ -1,26 +1,26 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {deviation} from "../src/index.js"; -test("deviation(array) returns the standard deviation of the specified numbers", () => { +it("deviation(array) returns the standard deviation of the specified numbers", () => { assert.strictEqual(deviation([1, 1, 1, 1, 1]), 0); assert.strictEqual(deviation([5, 1, 2, 3, 4]), Math.sqrt(2.5)); assert.strictEqual(deviation([20, 3]), Math.sqrt(144.5)); assert.strictEqual(deviation([3, 20]), Math.sqrt(144.5)); }); -test("deviation(array) ignores null, undefined and NaN", () => { +it("deviation(array) ignores null, undefined and NaN", () => { assert.strictEqual(deviation([NaN, 1, 2, 3, 4, 5]), Math.sqrt(2.5)); assert.strictEqual(deviation([1, 2, 3, 4, 5, NaN]), Math.sqrt(2.5)); assert.strictEqual(deviation([10, null, 3, undefined, 5, NaN]), Math.sqrt(13)); }); -test("deviation(array) can handle large numbers without overflowing", () => { +it("deviation(array) can handle large numbers without overflowing", () => { assert.strictEqual(deviation([Number.MAX_VALUE, Number.MAX_VALUE]), 0); assert.strictEqual(deviation([-Number.MAX_VALUE, -Number.MAX_VALUE]), 0); }); -test("deviation(array) returns undefined if the array has fewer than two numbers", () => { +it("deviation(array) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(deviation([1]), undefined); assert.strictEqual(deviation([]), undefined); assert.strictEqual(deviation([null]), undefined); @@ -29,24 +29,24 @@ test("deviation(array) returns undefined if the array has fewer than two numbers assert.strictEqual(deviation([NaN, NaN]), undefined); }); -test("deviation(array, f) returns the deviation of the specified numbers", () => { +it("deviation(array, f) returns the deviation of the specified numbers", () => { assert.strictEqual(deviation([5, 1, 2, 3, 4].map(box), unbox), Math.sqrt(2.5)); assert.strictEqual(deviation([20, 3].map(box), unbox), Math.sqrt(144.5)); assert.strictEqual(deviation([3, 20].map(box), unbox), Math.sqrt(144.5)); }); -test("deviation(array, f) ignores null, undefined and NaN", () => { +it("deviation(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(deviation([NaN, 1, 2, 3, 4, 5].map(box), unbox), Math.sqrt(2.5)); assert.strictEqual(deviation([1, 2, 3, 4, 5, NaN].map(box), unbox), Math.sqrt(2.5)); assert.strictEqual(deviation([10, null, 3, undefined, 5, NaN].map(box), unbox), Math.sqrt(13)); }); -test("deviation(array, f) can handle large numbers without overflowing", () => { +it("deviation(array, f) can handle large numbers without overflowing", () => { assert.strictEqual(deviation([Number.MAX_VALUE, Number.MAX_VALUE].map(box), unbox), 0); assert.strictEqual(deviation([-Number.MAX_VALUE, -Number.MAX_VALUE].map(box), unbox), 0); }); -test("deviation(array, f) returns undefined if the array has fewer than two numbers", () => { +it("deviation(array, f) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(deviation([1].map(box), unbox), undefined); assert.strictEqual(deviation([].map(box), unbox), undefined); assert.strictEqual(deviation([null].map(box), unbox), undefined); diff --git a/test/difference-test.js b/test/difference-test.js index 89572b4c..e15b3f66 100644 --- a/test/difference-test.js +++ b/test/difference-test.js @@ -1,18 +1,18 @@ -import {test} from "vitest"; +import {it} from "vitest"; import {difference} from "../src/index.js"; import {assertSetEqual} from "./asserts.js"; -test("difference(values, other) returns a set of values", () => { +it("difference(values, other) returns a set of values", () => { assertSetEqual(difference([1, 2, 3], [2, 1]), [3]); assertSetEqual(difference([1, 2], [2, 3, 1]), []); assertSetEqual(difference([2, 1, 3], [4, 3, 1]), [2]); }); -test("difference(...values) accepts iterables", () => { +it("difference(...values) accepts iterables", () => { assertSetEqual(difference(new Set([1, 2, 3]), new Set([1])), [2, 3]); }); -test("difference(values, other) performs interning", () => { +it("difference(values, other) performs interning", () => { assertSetEqual(difference([new Date("2021-01-01"), new Date("2021-01-02"), new Date("2021-01-03")], [new Date("2021-01-02"), new Date("2021-01-01")]), [new Date("2021-01-03")]); assertSetEqual(difference([new Date("2021-01-01"), new Date("2021-01-02")], [new Date("2021-01-02"), new Date("2021-01-03"), new Date("2021-01-01")]), []); assertSetEqual(difference([new Date("2021-01-02"), new Date("2021-01-01"), new Date("2021-01-03")], [new Date("2021-01-04"), new Date("2021-01-03"), new Date("2021-01-01")]), [new Date("2021-01-02")]); diff --git a/test/disjoint-test.js b/test/disjoint-test.js index bf8cec51..7b2dc74b 100644 --- a/test/disjoint-test.js +++ b/test/disjoint-test.js @@ -1,22 +1,22 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {disjoint} from "../src/index.js"; -test("disjoint(values, other) returns true if sets are disjoint", () => { +it("disjoint(values, other) returns true if sets are disjoint", () => { assert.strictEqual(disjoint([1], [2]), true); assert.strictEqual(disjoint([2, 3], [3, 4]), false); assert.strictEqual(disjoint([1], []), true); }); -test("disjoint(values, other) allows values to be infinite", () => { +it("disjoint(values, other) allows values to be infinite", () => { assert.strictEqual(disjoint(odds(), [0, 2, 4, 5]), false); }); -test("disjoint(values, other) allows other to be infinite", () => { +it("disjoint(values, other) allows other to be infinite", () => { assert.strictEqual(disjoint([2], repeat(1, 3, 2)), false); }); -test("disjoint(values, other) performs interning", () => { +it("disjoint(values, other) performs interning", () => { assert.strictEqual(disjoint([new Date("2021-01-01")], [new Date("2021-01-02")]), true); assert.strictEqual(disjoint([new Date("2021-01-02"), new Date("2021-01-03")], [new Date("2021-01-03"), new Date("2021-01-04")]), false); assert.strictEqual(disjoint([new Date("2021-01-01")], []), true); diff --git a/test/every-test.js b/test/every-test.js index 8348240e..1737181d 100644 --- a/test/every-test.js +++ b/test/every-test.js @@ -1,31 +1,31 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {every} from "../src/index.js"; -test("every(values, test) returns true if all tests pass", () => { +it("every(values, test) returns true if all tests pass", () => { assert.strictEqual(every([1, 2, 3, 2, 1], x => x & 1), false); assert.strictEqual(every([1, 2, 3, 2, 1], x => x >= 1), true); }); -test("every(values, test) returns true if values is empty", () => { +it("every(values, test) returns true if values is empty", () => { assert.strictEqual(every([], () => false), true); }); -test("every(values, test) accepts an iterable", () => { +it("every(values, test) accepts an iterable", () => { assert.strictEqual(every(new Set([1, 2, 3, 2, 1]), x => x >= 1), true); assert.strictEqual(every((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x >= 1), true); assert.strictEqual(every(Uint8Array.of(1, 2, 3, 2, 1), x => x >= 1), true); }); -test("every(values, test) enforces that test is a function", () => { +it("every(values, test) enforces that test is a function", () => { assert.throws(() => every([]), TypeError); }); -test("every(values, test) enforces that values is iterable", () => { +it("every(values, test) enforces that values is iterable", () => { assert.throws(() => every({}, () => true), TypeError); }); -test("every(values, test) passes test (value, index, values)", () => { +it("every(values, test) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); every(values, function() { return calls.push([this, ...arguments]); }); @@ -38,7 +38,7 @@ test("every(values, test) passes test (value, index, values)", () => { ]); }); -test("every(values, test) short-circuts when test returns falsey", () => { +it("every(values, test) short-circuts when test returns falsey", () => { let calls = 0; assert.strictEqual(every([1, 2, 3], x => (++calls, x < 2)), false); assert.strictEqual(calls, 2); @@ -46,7 +46,7 @@ test("every(values, test) short-circuts when test returns falsey", () => { assert.strictEqual(calls, 4); }); -test("every(values, test) does not skip sparse elements", () => { +it("every(values, test) does not skip sparse elements", () => { assert.deepStrictEqual(every([, 1, 2,, ], x => x === undefined || x >=1), true); assert.deepStrictEqual(every([, 1, 2,, ], x => x >=1), false); }); diff --git a/test/extent-test.js b/test/extent-test.js index 0ff96916..43149997 100644 --- a/test/extent-test.js +++ b/test/extent-test.js @@ -1,21 +1,21 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {extent} from "../src/index.js"; -test("extent(array) returns the least and greatest numeric values for numbers", () => { +it("extent(array) returns the least and greatest numeric values for numbers", () => { assert.deepStrictEqual(extent([1]), [1, 1]); assert.deepStrictEqual(extent([5, 1, 2, 3, 4]), [1, 5]); assert.deepStrictEqual(extent([20, 3]), [3, 20]); assert.deepStrictEqual(extent([3, 20]), [3, 20]); }); -test("extent(array) returns the least and greatest lexicographic value for strings", () => { +it("extent(array) returns the least and greatest lexicographic value for strings", () => { assert.deepStrictEqual(extent(["c", "a", "b"]), ["a", "c"]); assert.deepStrictEqual(extent(["20", "3"]), ["20", "3"]); assert.deepStrictEqual(extent(["3", "20"]), ["20", "3"]); }); -test("extent(array) ignores null, undefined and NaN", () => { +it("extent(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(extent([NaN, 1, 2, 3, 4, 5]), [1, 5]); assert.deepStrictEqual(extent([o, 1, 2, 3, 4, 5]), [1, 5]); @@ -25,14 +25,14 @@ test("extent(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(extent([-1, null, -3, undefined, -5, NaN]), [-5, -1]); }); -test("extent(array) compares heterogenous types as numbers", () => { +it("extent(array) compares heterogenous types as numbers", () => { assert.deepStrictEqual(extent([20, "3"]), ["3", 20]); assert.deepStrictEqual(extent(["20", 3]), [3, "20"]); assert.deepStrictEqual(extent([3, "20"]), [3, "20"]); assert.deepStrictEqual(extent(["3", 20]), ["3", 20]); }); -test("extent(array) returns undefined if the array contains no numbers", () => { +it("extent(array) returns undefined if the array contains no numbers", () => { assert.deepStrictEqual(extent([]), [undefined, undefined]); assert.deepStrictEqual(extent([null]), [undefined, undefined]); assert.deepStrictEqual(extent([undefined]), [undefined, undefined]); @@ -40,20 +40,20 @@ test("extent(array) returns undefined if the array contains no numbers", () => { assert.deepStrictEqual(extent([NaN, NaN]), [undefined, undefined]); }); -test("extent(array, f) returns the least and greatest numeric value for numbers", () => { +it("extent(array, f) returns the least and greatest numeric value for numbers", () => { assert.deepStrictEqual(extent([1].map(box), unbox), [1, 1]); assert.deepStrictEqual(extent([5, 1, 2, 3, 4].map(box), unbox), [1, 5]); assert.deepStrictEqual(extent([20, 3].map(box), unbox), [3, 20]); assert.deepStrictEqual(extent([3, 20].map(box), unbox), [3, 20]); }); -test("extent(array, f) returns the least and greatest lexicographic value for strings", () => { +it("extent(array, f) returns the least and greatest lexicographic value for strings", () => { assert.deepStrictEqual(extent(["c", "a", "b"].map(box), unbox), ["a", "c"]); assert.deepStrictEqual(extent(["20", "3"].map(box), unbox), ["20", "3"]); assert.deepStrictEqual(extent(["3", "20"].map(box), unbox), ["20", "3"]); }); -test("extent(array, f) ignores null, undefined and NaN", () => { +it("extent(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(extent([NaN, 1, 2, 3, 4, 5].map(box), unbox), [1, 5]); assert.deepStrictEqual(extent([o, 1, 2, 3, 4, 5].map(box), unbox), [1, 5]); @@ -63,14 +63,14 @@ test("extent(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(extent([-1, null, -3, undefined, -5, NaN].map(box), unbox), [-5, -1]); }); -test("extent(array, f) compares heterogenous types as numbers", () => { +it("extent(array, f) compares heterogenous types as numbers", () => { assert.deepStrictEqual(extent([20, "3"].map(box), unbox), ["3", 20]); assert.deepStrictEqual(extent(["20", 3].map(box), unbox), [3, "20"]); assert.deepStrictEqual(extent([3, "20"].map(box), unbox), [3, "20"]); assert.deepStrictEqual(extent(["3", 20].map(box), unbox), ["3", 20]); }); -test("extent(array, f) returns undefined if the array contains no observed values", () => { +it("extent(array, f) returns undefined if the array contains no observed values", () => { assert.deepStrictEqual(extent([].map(box), unbox), [undefined, undefined]); assert.deepStrictEqual(extent([null].map(box), unbox), [undefined, undefined]); assert.deepStrictEqual(extent([undefined].map(box), unbox), [undefined, undefined]); @@ -78,14 +78,14 @@ test("extent(array, f) returns undefined if the array contains no observed value assert.deepStrictEqual(extent([NaN, NaN].map(box), unbox), [undefined, undefined]); }); -test("extent(array, f) passes the accessor d, i, and array", () => { +it("extent(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; extent(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("extent(array, f) uses the undefined context", () => { +it("extent(array, f) uses the undefined context", () => { const results = []; extent([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/fcumsum-test.js b/test/fcumsum-test.js index e5072e8b..dde008ea 100644 --- a/test/fcumsum-test.js +++ b/test/fcumsum-test.js @@ -1,28 +1,28 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {cumsum, fcumsum} from "../src/index.js"; -test("fcumsum(array) returns a Float64Array of the expected length", () => { +it("fcumsum(array) returns a Float64Array of the expected length", () => { const A = [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]; const R = cumsum(A); assert(R instanceof Float64Array); assert.strictEqual(R.length, A.length); }); -test("fcumsum(array) is an exact cumsum", () => { +it("fcumsum(array) is an exact cumsum", () => { assert.strictEqual(lastc([0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]), 1); assert.strictEqual(lastc([0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3, -0.3]), 0); assert.strictEqual(lastc(["20", "3"].map(box), unbox), 23); }); -test("fcumsum(array) returns the fsum of the specified numbers", () => { +it("fcumsum(array) returns the fsum of the specified numbers", () => { assert.strictEqual(lastc([1]), 1); assert.strictEqual(lastc([5, 1, 2, 3, 4]), 15); assert.strictEqual(lastc([20, 3]), 23); assert.strictEqual(lastc([3, 20]), 23); }); -test("fcumsum(array) observes values that can be coerced to numbers", () => { +it("fcumsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", "3"]), 23); assert.strictEqual(lastc(["3", "20"]), 23); assert.strictEqual(lastc(["3", 20]), 23); @@ -31,18 +31,18 @@ test("fcumsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", 3]), 23); }); -test("fcumsum(array) ignores non-numeric values", () => { +it("fcumsum(array) ignores non-numeric values", () => { assert.strictEqual(lastc(["a", "b", "c"]), 0); assert.strictEqual(lastc(["a", 1, "2"]), 3); }); -test("fcumsum(array) ignores null, undefined and NaN", () => { +it("fcumsum(array) ignores null, undefined and NaN", () => { assert.strictEqual(lastc([NaN, 1, 2, 3, 4, 5]), 15); assert.strictEqual(lastc([1, 2, 3, 4, 5, NaN]), 15); assert.strictEqual(lastc([10, null, 3, undefined, 5, NaN]), 18); }); -test("fcumsum(array) returns an array of zeros if there are no numbers", () => { +it("fcumsum(array) returns an array of zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([])), []); assert.deepStrictEqual(Array.from(fcumsum([NaN])), [0]); assert.deepStrictEqual(Array.from(fcumsum([undefined])), [0]); @@ -50,14 +50,14 @@ test("fcumsum(array) returns an array of zeros if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([undefined, NaN, {}])), [0, 0, 0]); }); -test("fcumsum(array, f) returns the fsum of the specified numbers", () => { +it("fcumsum(array, f) returns the fsum of the specified numbers", () => { assert.strictEqual(lastc([1].map(box), unbox), 1); assert.strictEqual(lastc([5, 1, 2, 3, 4].map(box), unbox), 15); assert.strictEqual(lastc([20, 3].map(box), unbox), 23); assert.strictEqual(lastc([3, 20].map(box), unbox), 23); }); -test("fcumsum(array, f) observes values that can be coerced to numbers", () => { +it("fcumsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", "3"].map(box), unbox), 23); assert.strictEqual(lastc(["3", "20"].map(box), unbox), 23); assert.strictEqual(lastc(["3", 20].map(box), unbox), 23); @@ -66,18 +66,18 @@ test("fcumsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(lastc(["20", 3].map(box), unbox), 23); }); -test("fcumsum(array, f) ignores non-numeric values", () => { +it("fcumsum(array, f) ignores non-numeric values", () => { assert.strictEqual(lastc(["a", "b", "c"].map(box), unbox), 0); assert.strictEqual(lastc(["a", 1, "2"].map(box), unbox), 3); }); -test("fcumsum(array, f) ignores null, undefined and NaN", () => { +it("fcumsum(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(lastc([NaN, 1, 2, 3, 4, 5].map(box), unbox), 15); assert.strictEqual(lastc([1, 2, 3, 4, 5, NaN].map(box), unbox), 15); assert.strictEqual(lastc([10, null, 3, undefined, 5, NaN].map(box), unbox), 18); }); -test("fcumsum(array, f) returns zero if there are no numbers", () => { +it("fcumsum(array, f) returns zero if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([].map(box), unbox)), []); assert.deepStrictEqual(Array.from(fcumsum([NaN].map(box), unbox)), [0]); assert.deepStrictEqual(Array.from(fcumsum([undefined].map(box), unbox)), [0]); @@ -85,14 +85,14 @@ test("fcumsum(array, f) returns zero if there are no numbers", () => { assert.deepStrictEqual(Array.from(fcumsum([undefined, NaN, {}].map(box), unbox)), [0, 0, 0]); }); -test("fcumsum(array, f) passes the accessor d, i, and array", () => { +it("fcumsum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; lastc(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("fcumsum(array, f) uses the undefined context", () => { +it("fcumsum(array, f) uses the undefined context", () => { const results = []; lastc([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/filter-test.js b/test/filter-test.js index 9f89aa30..f2d6cc76 100644 --- a/test/filter-test.js +++ b/test/filter-test.js @@ -1,29 +1,29 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import * as d3 from "../src/index.js"; -test("filter(values, test) returns the values that pass the test", () => { +it("filter(values, test) returns the values that pass the test", () => { assert.deepStrictEqual(d3.filter([1, 2, 3, 2, 1], x => x & 1), [1, 3, 1]); }); -test("filter(values, test) accepts an iterable", () => { +it("filter(values, test) accepts an iterable", () => { assert.deepStrictEqual(d3.filter(new Set([1, 2, 3, 2, 1]), x => x & 1), [1, 3]); assert.deepStrictEqual(d3.filter((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x & 1), [1, 3, 1]); }); -test("filter(values, test) accepts a typed array", () => { +it("filter(values, test) accepts a typed array", () => { assert.deepStrictEqual(d3.filter(Uint8Array.of(1, 2, 3, 2, 1), x => x & 1), [1, 3, 1]); }); -test("filter(values, test) enforces that test is a function", () => { +it("filter(values, test) enforces that test is a function", () => { assert.throws(() => d3.filter([]), TypeError); }); -test("filter(values, test) enforces that values is iterable", () => { +it("filter(values, test) enforces that values is iterable", () => { assert.throws(() => d3.filter({}, () => true), TypeError); }); -test("filter(values, test) passes test (value, index, values)", () => { +it("filter(values, test) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); d3.filter(values, function() { calls.push([this, ...arguments]); }); @@ -36,6 +36,6 @@ test("filter(values, test) passes test (value, index, values)", () => { ]); }); -test("filter(values, test) does not skip sparse elements", () => { +it("filter(values, test) does not skip sparse elements", () => { assert.deepStrictEqual(d3.filter([, 1, 2,, ], () => true), [undefined, 1, 2, undefined]); }); diff --git a/test/flatGroup-test.js b/test/flatGroup-test.js index 69885f0f..73727bf1 100644 --- a/test/flatGroup-test.js +++ b/test/flatGroup-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {flatGroup} from "../src/index.js"; @@ -9,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -test("flatGroup(data, accessor, accessor) returns the expected array", () => { +it("flatGroup(data, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( flatGroup(data, d => d.name, d => d.amount), [ diff --git a/test/flatRollup-test.js b/test/flatRollup-test.js index 9471eb3d..c1849aa8 100644 --- a/test/flatRollup-test.js +++ b/test/flatRollup-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {flatRollup} from "../src/index.js"; @@ -9,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -test("flatRollup(data, reduce, accessor) returns the expected array", () => { +it("flatRollup(data, reduce, accessor) returns the expected array", () => { assert.deepStrictEqual( flatRollup(data, v => v.length, d => d.name), [ @@ -20,7 +20,7 @@ test("flatRollup(data, reduce, accessor) returns the expected array", () => { ); }); -test("flatRollup(data, reduce, accessor, accessor) returns the expected array", () => { +it("flatRollup(data, reduce, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( flatRollup(data, v => v.length, d => d.name, d => d.amount), [ diff --git a/test/fsum-test.js b/test/fsum-test.js index 8f2fccbb..e7fb3b10 100644 --- a/test/fsum-test.js +++ b/test/fsum-test.js @@ -1,33 +1,33 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {Adder, fsum} from "../src/index.js"; -test("new Adder() returns an Adder", () => { +it("new Adder() returns an Adder", () => { assert.strictEqual(typeof new Adder().add, "function"); assert.strictEqual(typeof new Adder().valueOf, "function"); }); -test("+adder can be applied several times", () => { +it("+adder can be applied several times", () => { const adder = new Adder(); for (let i = 0; i < 10; ++i) adder.add(0.1); assert.strictEqual(+adder, 1); assert.strictEqual(+adder, 1); }); -test("fsum(array) is an exact sum", () => { +it("fsum(array) is an exact sum", () => { assert.strictEqual(fsum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1]), 1); assert.strictEqual(fsum([.3, .3, .3, .3, .3, .3, .3, .3, .3, .3, -.3, -.3, -.3, -.3, -.3, -.3, -.3, -.3, -.3, -.3]), 0); assert.strictEqual(fsum(["20", "3"].map(box), unbox), 23); }); -test("fsum(array) returns the fsum of the specified numbers", () => { +it("fsum(array) returns the fsum of the specified numbers", () => { assert.strictEqual(fsum([1]), 1); assert.strictEqual(fsum([5, 1, 2, 3, 4]), 15); assert.strictEqual(fsum([20, 3]), 23); assert.strictEqual(fsum([3, 20]), 23); }); -test("fsum(array) observes values that can be coerced to numbers", () => { +it("fsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", "3"]), 23); assert.strictEqual(fsum(["3", "20"]), 23); assert.strictEqual(fsum(["3", 20]), 23); @@ -36,18 +36,18 @@ test("fsum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", 3]), 23); }); -test("fsum(array) ignores non-numeric values", () => { +it("fsum(array) ignores non-numeric values", () => { assert.strictEqual(fsum(["a", "b", "c"]), 0); assert.strictEqual(fsum(["a", 1, "2"]), 3); }); -test("fsum(array) ignores null, undefined and NaN", () => { +it("fsum(array) ignores null, undefined and NaN", () => { assert.strictEqual(fsum([NaN, 1, 2, 3, 4, 5]), 15); assert.strictEqual(fsum([1, 2, 3, 4, 5, NaN]), 15); assert.strictEqual(fsum([10, null, 3, undefined, 5, NaN]), 18); }); -test("fsum(array) returns zero if there are no numbers", () => { +it("fsum(array) returns zero if there are no numbers", () => { assert.strictEqual(fsum([]), 0); assert.strictEqual(fsum([NaN]), 0); assert.strictEqual(fsum([undefined]), 0); @@ -55,14 +55,14 @@ test("fsum(array) returns zero if there are no numbers", () => { assert.strictEqual(fsum([undefined, NaN, {}]), 0); }); -test("fsum(array, f) returns the fsum of the specified numbers", () => { +it("fsum(array, f) returns the fsum of the specified numbers", () => { assert.strictEqual(fsum([1].map(box), unbox), 1); assert.strictEqual(fsum([5, 1, 2, 3, 4].map(box), unbox), 15); assert.strictEqual(fsum([20, 3].map(box), unbox), 23); assert.strictEqual(fsum([3, 20].map(box), unbox), 23); }); -test("fsum(array, f) observes values that can be coerced to numbers", () => { +it("fsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", "3"].map(box), unbox), 23); assert.strictEqual(fsum(["3", "20"].map(box), unbox), 23); assert.strictEqual(fsum(["3", 20].map(box), unbox), 23); @@ -71,18 +71,18 @@ test("fsum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(fsum(["20", 3].map(box), unbox), 23); }); -test("fsum(array, f) ignores non-numeric values", () => { +it("fsum(array, f) ignores non-numeric values", () => { assert.strictEqual(fsum(["a", "b", "c"].map(box), unbox), 0); assert.strictEqual(fsum(["a", 1, "2"].map(box), unbox), 3); }); -test("fsum(array, f) ignores null, undefined and NaN", () => { +it("fsum(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(fsum([NaN, 1, 2, 3, 4, 5].map(box), unbox), 15); assert.strictEqual(fsum([1, 2, 3, 4, 5, NaN].map(box), unbox), 15); assert.strictEqual(fsum([10, null, 3, undefined, 5, NaN].map(box), unbox), 18); }); -test("fsum(array, f) returns zero if there are no numbers", () => { +it("fsum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(fsum([].map(box), unbox), 0); assert.strictEqual(fsum([NaN].map(box), unbox), 0); assert.strictEqual(fsum([undefined].map(box), unbox), 0); @@ -90,14 +90,14 @@ test("fsum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(fsum([undefined, NaN, {}].map(box), unbox), 0); }); -test("fsum(array, f) passes the accessor d, i, and array", () => { +it("fsum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; fsum(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("fsum(array, f) uses the undefined context", () => { +it("fsum(array, f) uses the undefined context", () => { const results = []; fsum([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/greatest-test.js b/test/greatest-test.js index 970aa180..2a34c365 100644 --- a/test/greatest-test.js +++ b/test/greatest-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {descending, greatest} from "../src/index.js"; -test("greatest(array) compares using natural order", () => { +it("greatest(array) compares using natural order", () => { assert.strictEqual(greatest([0, 1]), 1); assert.strictEqual(greatest([1, 0]), 1); assert.strictEqual(greatest([0, "1"]), "1"); @@ -17,7 +17,7 @@ test("greatest(array) compares using natural order", () => { assert.strictEqual(greatest([NaN, 10, 2]), 10); }); -test("greatest(array, compare) compares using the specified compare function", () => { +it("greatest(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.deepStrictEqual(greatest([a, b], (a, b) => a.name.localeCompare(b.name)), {name: "b"}); assert.strictEqual(greatest([1, 0], descending), 0); @@ -27,31 +27,31 @@ test("greatest(array, compare) compares using the specified compare function", ( assert.strictEqual(greatest([2, NaN, 10], descending), 2); }); -test("greatest(array, accessor) uses the specified accessor function", () => { +it("greatest(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(greatest([a, b], d => d.name), b); assert.deepStrictEqual(greatest([a, b], d => d.v), a); }); -test("greatest(array) returns undefined if the array is empty", () => { +it("greatest(array) returns undefined if the array is empty", () => { assert.strictEqual(greatest([]), undefined); }); -test("greatest(array) returns undefined if the array contains only incomparable values", () => { +it("greatest(array) returns undefined if the array contains only incomparable values", () => { assert.strictEqual(greatest([NaN, undefined]), undefined); assert.strictEqual(greatest([NaN, "foo"], (a, b) => a - b), undefined); }); -test("greatest(array) returns the first of equal values", () => { +it("greatest(array) returns the first of equal values", () => { assert.deepStrictEqual(greatest([2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), descendingValue), {value: 0, index: 4}); assert.deepStrictEqual(greatest([3, 2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), ascendingValue), {value: 3, index: 0}); }); -test("greatest(array) ignores null and undefined", () => { +it("greatest(array) ignores null and undefined", () => { assert.deepStrictEqual(greatest([null, -2, undefined]), -2); }); -test("greatest(array, accessor) ignores null and undefined", () => { +it("greatest(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(greatest([null, -2, undefined], d => d), -2); }); diff --git a/test/greatestIndex-test.js b/test/greatestIndex-test.js index 4983cfd8..5520d508 100644 --- a/test/greatestIndex-test.js +++ b/test/greatestIndex-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {ascending, descending, greatestIndex} from "../src/index.js"; -test("greatestIndex(array) compares using natural order", () => { +it("greatestIndex(array) compares using natural order", () => { assert.strictEqual(greatestIndex([0, 1]), 1); assert.strictEqual(greatestIndex([1, 0]), 0); assert.strictEqual(greatestIndex([0, "1"]), 1); @@ -17,7 +17,7 @@ test("greatestIndex(array) compares using natural order", () => { assert.strictEqual(greatestIndex([NaN, 10, 2]), 1); }); -test("greatestIndex(array, compare) compares using the specified compare function", () => { +it("greatestIndex(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.strictEqual(greatestIndex([a, b], (a, b) => a.name.localeCompare(b.name)), 1); assert.strictEqual(greatestIndex([1, 0], ascending), 0); @@ -27,30 +27,30 @@ test("greatestIndex(array, compare) compares using the specified compare functio assert.strictEqual(greatestIndex([2, NaN, 10], ascending), 2); }); -test("greatestIndex(array, accessor) uses the specified accessor function", () => { +it("greatestIndex(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(greatestIndex([a, b], d => d.name), 1); assert.deepStrictEqual(greatestIndex([a, b], d => d.v), 0); }); -test("greatestIndex(array) returns -1 if the array is empty", () => { +it("greatestIndex(array) returns -1 if the array is empty", () => { assert.strictEqual(greatestIndex([]), -1); }); -test("greatestIndex(array) returns -1 if the array contains only incomparable values", () => { +it("greatestIndex(array) returns -1 if the array contains only incomparable values", () => { assert.strictEqual(greatestIndex([NaN, undefined]), -1); assert.strictEqual(greatestIndex([NaN, "foo"], (a, b) => a - b), -1); }); -test("greatestIndex(array) returns the first of equal values", () => { +it("greatestIndex(array) returns the first of equal values", () => { assert.strictEqual(greatestIndex([-2, -2, -1, -1, 0, 0, 0, -3, 0]), 4); assert.strictEqual(greatestIndex([-3, -2, -2, -1, -1, 0, 0, 0, -3, 0], descending), 0); }); -test("greatestIndex(array) ignores null and undefined", () => { +it("greatestIndex(array) ignores null and undefined", () => { assert.deepStrictEqual(greatestIndex([null, -2, undefined]), 1); }); -test("greatestIndex(array, accessor) ignores null and undefined", () => { +it("greatestIndex(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(greatestIndex([null, -2, undefined], d => d), 1); }); diff --git a/test/group-test.js b/test/group-test.js index 9a7e8a39..5ac5eb77 100644 --- a/test/group-test.js +++ b/test/group-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {group} from "../src/index.js"; @@ -9,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -test("group(data, accessor) returns the expected map", () => { +it("group(data, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(group(data, d => d.name), 1), [ @@ -52,7 +52,7 @@ test("group(data, accessor) returns the expected map", () => { ); }); -test("group(data, accessor, accessor) returns the expected map", () => { +it("group(data, accessor, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(group(data, d => d.name, d => d.amount), 2), [ @@ -115,7 +115,7 @@ test("group(data, accessor, accessor) returns the expected map", () => { ); }); -test("group(data, accessor) interns keys", () => { +it("group(data, accessor) interns keys", () => { const a1 = new Date(Date.UTC(2001, 0, 1)); const a2 = new Date(Date.UTC(2001, 0, 1)); const b = new Date(Date.UTC(2002, 0, 1)); diff --git a/test/groupSort-test.js b/test/groupSort-test.js index a2c49c57..73646a50 100644 --- a/test/groupSort-test.js +++ b/test/groupSort-test.js @@ -1,11 +1,11 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {readFileSync} from "fs"; import {ascending, descending, groupSort, median} from "../src/index.js"; const barley = JSON.parse(readFileSync("./test/data/barley.json")); -test("groupSort(data, reduce, key) returns sorted keys when reduce is an accessor", () => { +it("groupSort(data, reduce, key) returns sorted keys when reduce is an accessor", () => { assert.deepStrictEqual( groupSort(barley, g => median(g, d => d.yield), d => d.variety), ["Svansota", "No. 462", "Manchuria", "No. 475", "Velvet", "Peatland", "Glabron", "No. 457", "Wisconsin No. 38", "Trebi"] @@ -32,7 +32,7 @@ test("groupSort(data, reduce, key) returns sorted keys when reduce is an accesso ); }); -test("groupSort(data, reduce, key) returns sorted keys when reduce is a comparator", () => { +it("groupSort(data, reduce, key) returns sorted keys when reduce is a comparator", () => { assert.deepStrictEqual( groupSort(barley, (a, b) => ascending(median(a, d => d.yield), median(b, d => d.yield)), d => d.variety), ["Svansota", "No. 462", "Manchuria", "No. 475", "Velvet", "Peatland", "Glabron", "No. 457", "Wisconsin No. 38", "Trebi"] diff --git a/test/groups-test.js b/test/groups-test.js index 1b580330..e68e1e62 100644 --- a/test/groups-test.js +++ b/test/groups-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {groups} from "../src/index.js"; @@ -9,7 +9,7 @@ const data = [ {name: "stacy", amount: "34.05", date: "01/04/2016"} ]; -test("groups(data, accessor) returns the expected array", () => { +it("groups(data, accessor) returns the expected array", () => { assert.deepStrictEqual( groups(data, d => d.name), [ @@ -52,7 +52,7 @@ test("groups(data, accessor) returns the expected array", () => { ); }); -test("groups(data, accessor, accessor) returns the expected array", () => { +it("groups(data, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( groups(data, d => d.name, d => d.amount), [ diff --git a/test/index-test.js b/test/index-test.js index 0ad93787..ee05ac4c 100644 --- a/test/index-test.js +++ b/test/index-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {index, indexes} from "../src/index.js"; @@ -9,7 +9,7 @@ const data = [ {name: "stacy", amount: 34.05, date: "01/04/2016"} ]; -test("indexes(data, ...keys) returns the expected nested arrays", () => { +it("indexes(data, ...keys) returns the expected nested arrays", () => { assert.deepStrictEqual( indexes(data, d => d.amount), [ @@ -45,7 +45,7 @@ test("indexes(data, ...keys) returns the expected nested arrays", () => { ); }); -test("index(data, ...keys) returns the expected map", () => { +it("index(data, ...keys) returns the expected map", () => { assert.deepStrictEqual( entries(index(data, d => d.amount), 1), indexes(data, d => d.amount) @@ -56,7 +56,7 @@ test("index(data, ...keys) returns the expected map", () => { ); }); -test("index(data, ...keys) throws on a non-unique key", () => { +it("index(data, ...keys) throws on a non-unique key", () => { assert.throws(() => index(data, d => d.name)); assert.throws(() => index(data, d => d.date)); }); diff --git a/test/intersection-test.js b/test/intersection-test.js index c8a974ea..19a5cc3e 100644 --- a/test/intersection-test.js +++ b/test/intersection-test.js @@ -1,24 +1,24 @@ -import {test} from "vitest"; +import {it} from "vitest"; import {intersection} from "../src/index.js"; import {assertSetEqual} from "./asserts.js"; -test("intersection(values) returns a set of values", () => { +it("intersection(values) returns a set of values", () => { assertSetEqual(intersection([1, 2, 3, 2, 1]), [1, 2, 3]); }); -test("intersection(values, other) returns a set of values", () => { +it("intersection(values, other) returns a set of values", () => { assertSetEqual(intersection([1, 2], [2, 3, 1]), [1, 2]); assertSetEqual(intersection([2, 1, 3], [4, 3, 1]), [1, 3]); }); -test("intersection(...values) returns a set of values", () => { +it("intersection(...values) returns a set of values", () => { assertSetEqual(intersection([1, 2], [2, 1], [2, 3]), [2]); }); -test("intersection(...values) accepts iterables", () => { +it("intersection(...values) accepts iterables", () => { assertSetEqual(intersection(new Set([1, 2, 3])), [1, 2, 3]); }); -test("intersection(...values) performs interning", () => { +it("intersection(...values) performs interning", () => { assertSetEqual(intersection([new Date("2021-01-01"), new Date("2021-01-03")], [new Date("2021-01-01"), new Date("2021-01-02")]), [new Date("2021-01-01")]); }); diff --git a/test/least-test.js b/test/least-test.js index 55759899..66849e00 100644 --- a/test/least-test.js +++ b/test/least-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {descending, least} from "../src/index.js"; -test("least(array) compares using natural order", () => { +it("least(array) compares using natural order", () => { assert.strictEqual(least([0, 1]), 0); assert.strictEqual(least([1, 0]), 0); assert.strictEqual(least([0, "1"]), 0); @@ -17,7 +17,7 @@ test("least(array) compares using natural order", () => { assert.strictEqual(least([NaN, 10, 2]), 2); }); -test("least(array, compare) compares using the specified compare function", () => { +it("least(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.deepStrictEqual(least([a, b], (a, b) => a.name.localeCompare(b.name)), {name: "a"}); assert.strictEqual(least([1, 0], descending), 1); @@ -27,31 +27,31 @@ test("least(array, compare) compares using the specified compare function", () = assert.strictEqual(least([2, NaN, 10], descending), 10); }); -test("least(array, accessor) uses the specified accessor function", () => { +it("least(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(least([a, b], d => d.name), a); assert.deepStrictEqual(least([a, b], d => d.v), b); }); -test("least(array) returns undefined if the array is empty", () => { +it("least(array) returns undefined if the array is empty", () => { assert.strictEqual(least([]), undefined); }); -test("least(array) returns undefined if the array contains only incomparable values", () => { +it("least(array) returns undefined if the array contains only incomparable values", () => { assert.strictEqual(least([NaN, undefined]), undefined); assert.strictEqual(least([NaN, "foo"], (a, b) => a - b), undefined); }); -test("least(array) returns the first of equal values", () => { +it("least(array) returns the first of equal values", () => { assert.deepStrictEqual(least([2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), ascendingValue), {value: 0, index: 4}); assert.deepStrictEqual(least([3, 2, 2, 1, 1, 0, 0, 0, 3, 0].map(box), descendingValue), {value: 3, index: 0}); }); -test("least(array) ignores null and undefined", () => { +it("least(array) ignores null and undefined", () => { assert.deepStrictEqual(least([null, 2, undefined]), 2); }); -test("least(array, accessor) ignores null and undefined", () => { +it("least(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(least([null, 2, undefined], d => d), 2); }); diff --git a/test/leastIndex-test.js b/test/leastIndex-test.js index 005c296d..4b09d844 100644 --- a/test/leastIndex-test.js +++ b/test/leastIndex-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {descending, leastIndex} from "../src/index.js"; -test("leastIndex(array) compares using natural order", () => { +it("leastIndex(array) compares using natural order", () => { assert.strictEqual(leastIndex([0, 1]), 0); assert.strictEqual(leastIndex([1, 0]), 1); assert.strictEqual(leastIndex([0, "1"]), 0); @@ -17,7 +17,7 @@ test("leastIndex(array) compares using natural order", () => { assert.strictEqual(leastIndex([NaN, 10, 2]), 2); }); -test("leastIndex(array, compare) compares using the specified compare function", () => { +it("leastIndex(array, compare) compares using the specified compare function", () => { const a = {name: "a"}, b = {name: "b"}; assert.strictEqual(leastIndex([a, b], (a, b) => a.name.localeCompare(b.name)), 0); assert.strictEqual(leastIndex([1, 0], descending), 0); @@ -27,30 +27,30 @@ test("leastIndex(array, compare) compares using the specified compare function", assert.strictEqual(leastIndex([2, NaN, 10], descending), 2); }); -test("leastIndex(array, accessor) uses the specified accessor function", () => { +it("leastIndex(array, accessor) uses the specified accessor function", () => { const a = {name: "a", v: 42}, b = {name: "b", v: 0.42}; assert.deepStrictEqual(leastIndex([a, b], d => d.name), 0); assert.deepStrictEqual(leastIndex([a, b], d => d.v), 1); }); -test("leastIndex(array) returns -1 if the array is empty", () => { +it("leastIndex(array) returns -1 if the array is empty", () => { assert.strictEqual(leastIndex([]), -1); }); -test("leastIndex(array) returns -1 if the array contains only incomparable values", () => { +it("leastIndex(array) returns -1 if the array contains only incomparable values", () => { assert.strictEqual(leastIndex([NaN, undefined]), -1); assert.strictEqual(leastIndex([NaN, "foo"], (a, b) => a - b), -1); }); -test("leastIndex(array) returns the first of equal values", () => { +it("leastIndex(array) returns the first of equal values", () => { assert.strictEqual(leastIndex([2, 2, 1, 1, 0, 0, 0, 3, 0]), 4); assert.strictEqual(leastIndex([3, 2, 2, 1, 1, 0, 0, 0, 3, 0], descending), 0); }); -test("leastIndex(array) ignores null and undefined", () => { +it("leastIndex(array) ignores null and undefined", () => { assert.deepStrictEqual(leastIndex([null, 2, undefined]), 1); }); -test("leastIndex(array, accessor) ignores null and undefined", () => { +it("leastIndex(array, accessor) ignores null and undefined", () => { assert.deepStrictEqual(leastIndex([null, 2, undefined], d => d), 1); }); diff --git a/test/map-test.js b/test/map-test.js index 58c6102d..89620a63 100644 --- a/test/map-test.js +++ b/test/map-test.js @@ -1,29 +1,29 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {map} from "../src/index.js"; -test("map(values, mapper) returns the mapped values", () => { +it("map(values, mapper) returns the mapped values", () => { assert.deepStrictEqual(map([1, 2, 3, 2, 1], x => x * 2), [2, 4, 6, 4, 2]); }); -test("map(values, mapper) accepts an iterable", () => { +it("map(values, mapper) accepts an iterable", () => { assert.deepStrictEqual(map(new Set([1, 2, 3, 2, 1]), x => x * 2), [2, 4, 6]); assert.deepStrictEqual(map((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x * 2), [2, 4, 6, 4, 2]); }); -test("map(values, mapper) accepts a typed array", () => { +it("map(values, mapper) accepts a typed array", () => { assert.deepStrictEqual(map(Uint8Array.of(1, 2, 3, 2, 1), x => x * 2), [2, 4, 6, 4, 2]); }); -test("map(values, mapper) enforces that test is a function", () => { +it("map(values, mapper) enforces that test is a function", () => { assert.throws(() => map([]), TypeError); }); -test("map(values, mapper) enforces that values is iterable", () => { +it("map(values, mapper) enforces that values is iterable", () => { assert.throws(() => map({}, () => true), TypeError); }); -test("map(values, mapper) passes test (value, index, values)", () => { +it("map(values, mapper) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); map(values, function() { calls.push([this, ...arguments]); }); @@ -36,6 +36,6 @@ test("map(values, mapper) passes test (value, index, values)", () => { ]); }); -test("map(values, mapper) does not skip sparse elements", () => { +it("map(values, mapper) does not skip sparse elements", () => { assert.deepStrictEqual(map([, 1, 2,, ], x => x * 2), [NaN, 2, 4, NaN]); }); diff --git a/test/max-test.js b/test/max-test.js index 3125d1b3..6f4daaa5 100644 --- a/test/max-test.js +++ b/test/max-test.js @@ -1,21 +1,21 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {max} from "../src/index.js"; -test("max(array) returns the greatest numeric value for numbers", () => { +it("max(array) returns the greatest numeric value for numbers", () => { assert.deepStrictEqual(max([1]), 1); assert.deepStrictEqual(max([5, 1, 2, 3, 4]), 5); assert.deepStrictEqual(max([20, 3]), 20); assert.deepStrictEqual(max([3, 20]), 20); }); -test("max(array) returns the greatest lexicographic value for strings", () => { +it("max(array) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(max(["c", "a", "b"]), "c"); assert.deepStrictEqual(max(["20", "3"]), "3"); assert.deepStrictEqual(max(["3", "20"]), "3"); }); -test("max(array) ignores null, undefined and NaN", () => { +it("max(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(max([NaN, 1, 2, 3, 4, 5]), 5); assert.deepStrictEqual(max([o, 1, 2, 3, 4, 5]), 5); @@ -25,14 +25,14 @@ test("max(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(max([-1, null, -3, undefined, -5, NaN]), -1); }); -test("max(array) compares heterogenous types as numbers", () => { +it("max(array) compares heterogenous types as numbers", () => { assert.strictEqual(max([20, "3"]), 20); assert.strictEqual(max(["20", 3]), "20"); assert.strictEqual(max([3, "20"]), "20"); assert.strictEqual(max(["3", 20]), 20); }); -test("max(array) returns undefined if the array contains no numbers", () => { +it("max(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(max([]), undefined); assert.strictEqual(max([null]), undefined); assert.strictEqual(max([undefined]), undefined); @@ -40,20 +40,20 @@ test("max(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(max([NaN, NaN]), undefined); }); -test("max(array, f) returns the greatest numeric value for numbers", () => { +it("max(array, f) returns the greatest numeric value for numbers", () => { assert.deepStrictEqual(max([1].map(box), unbox), 1); assert.deepStrictEqual(max([5, 1, 2, 3, 4].map(box), unbox), 5); assert.deepStrictEqual(max([20, 3].map(box), unbox), 20); assert.deepStrictEqual(max([3, 20].map(box), unbox), 20); }); -test("max(array, f) returns the greatest lexicographic value for strings", () => { +it("max(array, f) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(max(["c", "a", "b"].map(box), unbox), "c"); assert.deepStrictEqual(max(["20", "3"].map(box), unbox), "3"); assert.deepStrictEqual(max(["3", "20"].map(box), unbox), "3"); }); -test("max(array, f) ignores null, undefined and NaN", () => { +it("max(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(max([NaN, 1, 2, 3, 4, 5].map(box), unbox), 5); assert.deepStrictEqual(max([o, 1, 2, 3, 4, 5].map(box), unbox), 5); @@ -63,14 +63,14 @@ test("max(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(max([-1, null, -3, undefined, -5, NaN].map(box), unbox), -1); }); -test("max(array, f) compares heterogenous types as numbers", () => { +it("max(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(max([20, "3"].map(box), unbox), 20); assert.strictEqual(max(["20", 3].map(box), unbox), "20"); assert.strictEqual(max([3, "20"].map(box), unbox), "20"); assert.strictEqual(max(["3", 20].map(box), unbox), 20); }); -test("max(array, f) returns undefined if the array contains no observed values", () => { +it("max(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(max([].map(box), unbox), undefined); assert.strictEqual(max([null].map(box), unbox), undefined); assert.strictEqual(max([undefined].map(box), unbox), undefined); @@ -78,14 +78,14 @@ test("max(array, f) returns undefined if the array contains no observed values", assert.strictEqual(max([NaN, NaN].map(box), unbox), undefined); }); -test("max(array, f) passes the accessor d, i, and array", () => { +it("max(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; max(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("max(array, f) uses the undefined context", () => { +it("max(array, f) uses the undefined context", () => { const results = []; max([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/maxIndex-test.js b/test/maxIndex-test.js index 02913c75..3b87392d 100644 --- a/test/maxIndex-test.js +++ b/test/maxIndex-test.js @@ -1,21 +1,21 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {maxIndex} from "../src/index.js"; -test("maxIndex(array) returns the index of the greatest numeric value for numbers", () => { +it("maxIndex(array) returns the index of the greatest numeric value for numbers", () => { assert.deepStrictEqual(maxIndex([1]), 0); assert.deepStrictEqual(maxIndex([5, 1, 2, 3, 4]), 0); assert.deepStrictEqual(maxIndex([20, 3]), 0); assert.deepStrictEqual(maxIndex([3, 20]), 1); }); -test("maxIndex(array) returns the greatest lexicographic value for strings", () => { +it("maxIndex(array) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(maxIndex(["c", "a", "b"]), 0); assert.deepStrictEqual(maxIndex(["20", "3"]), 1); assert.deepStrictEqual(maxIndex(["3", "20"]), 0); }); -test("maxIndex(array) ignores null, undefined and NaN", () => { +it("maxIndex(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(maxIndex([NaN, 1, 2, 3, 4, 5]), 5); assert.deepStrictEqual(maxIndex([o, 1, 2, 3, 4, 5]), 5); @@ -25,14 +25,14 @@ test("maxIndex(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(maxIndex([-1, null, -3, undefined, -5, NaN]), 0); }); -test("maxIndex(array) compares heterogenous types as numbers", () => { +it("maxIndex(array) compares heterogenous types as numbers", () => { assert.strictEqual(maxIndex([20, "3"]), 0); assert.strictEqual(maxIndex(["20", 3]), 0); assert.strictEqual(maxIndex([3, "20"]), 1); assert.strictEqual(maxIndex(["3", 20]), 1); }); -test("maxIndex(array) returns -1 if the array contains no numbers", () => { +it("maxIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(maxIndex([]), -1); assert.strictEqual(maxIndex([null]), -1); assert.strictEqual(maxIndex([undefined]), -1); @@ -40,20 +40,20 @@ test("maxIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(maxIndex([NaN, NaN]), -1); }); -test("maxIndex(array, f) returns the greatest numeric value for numbers", () => { +it("maxIndex(array, f) returns the greatest numeric value for numbers", () => { assert.deepStrictEqual(maxIndex([1].map(box), unbox), 0); assert.deepStrictEqual(maxIndex([5, 1, 2, 3, 4].map(box), unbox), 0); assert.deepStrictEqual(maxIndex([20, 3].map(box), unbox), 0); assert.deepStrictEqual(maxIndex([3, 20].map(box), unbox), 1); }); -test("maxIndex(array, f) returns the greatest lexicographic value for strings", () => { +it("maxIndex(array, f) returns the greatest lexicographic value for strings", () => { assert.deepStrictEqual(maxIndex(["c", "a", "b"].map(box), unbox), 0); assert.deepStrictEqual(maxIndex(["20", "3"].map(box), unbox), 1); assert.deepStrictEqual(maxIndex(["3", "20"].map(box), unbox), 0); }); -test("maxIndex(array, f) ignores null, undefined and NaN", () => { +it("maxIndex(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(maxIndex([NaN, 1, 2, 3, 4, 5].map(box), unbox), 5); assert.deepStrictEqual(maxIndex([o, 1, 2, 3, 4, 5].map(box), unbox), 5); @@ -63,14 +63,14 @@ test("maxIndex(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(maxIndex([-1, null, -3, undefined, -5, NaN].map(box), unbox), 0); }); -test("maxIndex(array, f) compares heterogenous types as numbers", () => { +it("maxIndex(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(maxIndex([20, "3"].map(box), unbox), 0); assert.strictEqual(maxIndex(["20", 3].map(box), unbox), 0); assert.strictEqual(maxIndex([3, "20"].map(box), unbox), 1); assert.strictEqual(maxIndex(["3", 20].map(box), unbox), 1); }); -test("maxIndex(array, f) returns -1 if the array contains no observed values", () => { +it("maxIndex(array, f) returns -1 if the array contains no observed values", () => { assert.strictEqual(maxIndex([].map(box), unbox), -1); assert.strictEqual(maxIndex([null].map(box), unbox), -1); assert.strictEqual(maxIndex([undefined].map(box), unbox), -1); @@ -78,14 +78,14 @@ test("maxIndex(array, f) returns -1 if the array contains no observed values", ( assert.strictEqual(maxIndex([NaN, NaN].map(box), unbox), -1); }); -test("maxIndex(array, f) passes the accessor d, i, and array", () => { +it("maxIndex(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; maxIndex(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("maxIndex(array, f) uses the undefined context", () => { +it("maxIndex(array, f) uses the undefined context", () => { const results = []; maxIndex([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/mean-test.js b/test/mean-test.js index f1daa1ef..e98f14ec 100644 --- a/test/mean-test.js +++ b/test/mean-test.js @@ -1,22 +1,22 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {mean} from "../src/index.js"; import {OneTimeNumber} from "./OneTimeNumber.js"; -test("mean(array) returns the mean value for numbers", () => { +it("mean(array) returns the mean value for numbers", () => { assert.strictEqual(mean([1]), 1); assert.strictEqual(mean([5, 1, 2, 3, 4]), 3); assert.strictEqual(mean([20, 3]), 11.5); assert.strictEqual(mean([3, 20]), 11.5); }); -test("mean(array) ignores null, undefined and NaN", () => { +it("mean(array) ignores null, undefined and NaN", () => { assert.strictEqual(mean([NaN, 1, 2, 3, 4, 5]), 3); assert.strictEqual(mean([1, 2, 3, 4, 5, NaN]), 3); assert.strictEqual(mean([10, null, 3, undefined, 5, NaN]), 6); }); -test("mean(array) returns undefined if the array contains no observed values", () => { +it("mean(array) returns undefined if the array contains no observed values", () => { assert.strictEqual(mean([]), undefined); assert.strictEqual(mean([null]), undefined); assert.strictEqual(mean([undefined]), undefined); @@ -24,33 +24,33 @@ test("mean(array) returns undefined if the array contains no observed values", ( assert.strictEqual(mean([NaN, NaN]), undefined); }); -test("mean(array) coerces values to numbers", () => { +it("mean(array) coerces values to numbers", () => { assert.strictEqual(mean(["1"]), 1); assert.strictEqual(mean(["5", "1", "2", "3", "4"]), 3); assert.strictEqual(mean(["20", "3"]), 11.5); assert.strictEqual(mean(["3", "20"]), 11.5); }); -test("mean(array) coerces values exactly once", () => { +it("mean(array) coerces values exactly once", () => { const numbers = [1, new OneTimeNumber(3)]; assert.strictEqual(mean(numbers), 2); assert.strictEqual(mean(numbers), 1); }); -test("mean(array, f) returns the mean value for numbers", () => { +it("mean(array, f) returns the mean value for numbers", () => { assert.strictEqual(mean([1].map(box), unbox), 1); assert.strictEqual(mean([5, 1, 2, 3, 4].map(box), unbox), 3); assert.strictEqual(mean([20, 3].map(box), unbox), 11.5); assert.strictEqual(mean([3, 20].map(box), unbox), 11.5); }); -test("mean(array, f) ignores null, undefined and NaN", () => { +it("mean(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(mean([NaN, 1, 2, 3, 4, 5].map(box), unbox), 3); assert.strictEqual(mean([1, 2, 3, 4, 5, NaN].map(box), unbox), 3); assert.strictEqual(mean([10, null, 3, undefined, 5, NaN].map(box), unbox), 6); }); -test("mean(array, f) returns undefined if the array contains no observed values", () => { +it("mean(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(mean([].map(box), unbox), undefined); assert.strictEqual(mean([null].map(box), unbox), undefined); assert.strictEqual(mean([undefined].map(box), unbox), undefined); @@ -58,27 +58,27 @@ test("mean(array, f) returns undefined if the array contains no observed values" assert.strictEqual(mean([NaN, NaN].map(box), unbox), undefined); }); -test("mean(array, f) coerces values to numbers", () => { +it("mean(array, f) coerces values to numbers", () => { assert.strictEqual(mean(["1"].map(box), unbox), 1); assert.strictEqual(mean(["5", "1", "2", "3", "4"].map(box), unbox), 3); assert.strictEqual(mean(["20", "3"].map(box), unbox), 11.5); assert.strictEqual(mean(["3", "20"].map(box), unbox), 11.5); }); -test("mean(array, f) coerces values exactly once", () => { +it("mean(array, f) coerces values exactly once", () => { const numbers = [1, new OneTimeNumber(3)].map(box); assert.strictEqual(mean(numbers, unbox), 2); assert.strictEqual(mean(numbers, unbox), 1); }); -test("mean(array, f) passes the accessor d, i, and array", () => { +it("mean(array, f) passes the accessor d, i, and array", () => { const results = []; const strings = ["a", "b", "c"]; mean(strings, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, strings], ["b", 1, strings], ["c", 2, strings]]); }); -test("mean(array, f) uses the undefined context", () => { +it("mean(array, f) uses the undefined context", () => { const results = []; mean([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/median-test.js b/test/median-test.js index 2e948603..a2b475c3 100644 --- a/test/median-test.js +++ b/test/median-test.js @@ -1,9 +1,9 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {median, medianIndex} from "../src/index.js"; import {OneTimeNumber} from "./OneTimeNumber.js"; -test("median(array) returns the median value for numbers", () => { +it("median(array) returns the median value for numbers", () => { assert.strictEqual(median([1]), 1); assert.strictEqual(median([5, 1, 2, 3]), 2.5); assert.strictEqual(median([5, 1, 2, 3, 4]), 3); @@ -11,18 +11,18 @@ test("median(array) returns the median value for numbers", () => { assert.strictEqual(median([3, 20]), 11.5); }); -test("median(array) ignores null, undefined and NaN", () => { +it("median(array) ignores null, undefined and NaN", () => { assert.strictEqual(median([NaN, 1, 2, 3, 4, 5]), 3); assert.strictEqual(median([1, 2, 3, 4, 5, NaN]), 3); assert.strictEqual(median([10, null, 3, undefined, 5, NaN]), 5); }); -test("median(array) can handle large numbers without overflowing", () => { +it("median(array) can handle large numbers without overflowing", () => { assert.strictEqual(median([Number.MAX_VALUE, Number.MAX_VALUE]), Number.MAX_VALUE); assert.strictEqual(median([-Number.MAX_VALUE, -Number.MAX_VALUE]), -Number.MAX_VALUE); }); -test("median(array) returns undefined if the array contains no observed values", () => { +it("median(array) returns undefined if the array contains no observed values", () => { assert.strictEqual(median([]), undefined); assert.strictEqual(median([null]), undefined); assert.strictEqual(median([undefined]), undefined); @@ -30,7 +30,7 @@ test("median(array) returns undefined if the array contains no observed values", assert.strictEqual(median([NaN, NaN]), undefined); }); -test("median(array) coerces strings to numbers", () => { +it("median(array) coerces strings to numbers", () => { assert.strictEqual(median(["1"]), 1); assert.strictEqual(median(["5", "1", "2", "3", "4"]), 3); assert.strictEqual(median(["20", "3"]), 11.5); @@ -39,31 +39,31 @@ test("median(array) coerces strings to numbers", () => { assert.strictEqual(median(["20", "3", "2"]), 3); }); -test("median(array) coerces values exactly once", () => { +it("median(array) coerces values exactly once", () => { const array = [1, new OneTimeNumber(3)]; assert.strictEqual(median(array), 2); assert.strictEqual(median(array), 1); }); -test("median(array, f) returns the median value for numbers", () => { +it("median(array, f) returns the median value for numbers", () => { assert.strictEqual(median([1].map(box), unbox), 1); assert.strictEqual(median([5, 1, 2, 3, 4].map(box), unbox), 3); assert.strictEqual(median([20, 3].map(box), unbox), 11.5); assert.strictEqual(median([3, 20].map(box), unbox), 11.5); }); -test("median(array, f) ignores null, undefined and NaN", () => { +it("median(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(median([NaN, 1, 2, 3, 4, 5].map(box), unbox), 3); assert.strictEqual(median([1, 2, 3, 4, 5, NaN].map(box), unbox), 3); assert.strictEqual(median([10, null, 3, undefined, 5, NaN].map(box), unbox), 5); }); -test("median(array, f) can handle large numbers without overflowing", () => { +it("median(array, f) can handle large numbers without overflowing", () => { assert.strictEqual(median([Number.MAX_VALUE, Number.MAX_VALUE].map(box), unbox), Number.MAX_VALUE); assert.strictEqual(median([-Number.MAX_VALUE, -Number.MAX_VALUE].map(box), unbox), -Number.MAX_VALUE); }); -test("median(array, f) returns undefined if the array contains no observed values", () => { +it("median(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(median([].map(box), unbox), undefined); assert.strictEqual(median([null].map(box), unbox), undefined); assert.strictEqual(median([undefined].map(box), unbox), undefined); @@ -71,7 +71,7 @@ test("median(array, f) returns undefined if the array contains no observed value assert.strictEqual(median([NaN, NaN].map(box), unbox), undefined); }); -test("median(array, f) coerces strings to numbers", () => { +it("median(array, f) coerces strings to numbers", () => { assert.strictEqual(median(["1"].map(box), unbox), 1); assert.strictEqual(median(["5", "1", "2", "3", "4"].map(box), unbox), 3); assert.strictEqual(median(["20", "3"].map(box), unbox), 11.5); @@ -80,26 +80,26 @@ test("median(array, f) coerces strings to numbers", () => { assert.strictEqual(median(["20", "3", "2"].map(box), unbox), 3); }); -test("median(array, f) coerces values exactly once", () => { +it("median(array, f) coerces values exactly once", () => { const array = [1, new OneTimeNumber(3)].map(box); assert.strictEqual(median(array, unbox), 2); assert.strictEqual(median(array, unbox), 1); }); -test("median(array, f) passes the accessor d, i, and array", () => { +it("median(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; median(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("median(array, f) uses the undefined context", () => { +it("median(array, f) uses the undefined context", () => { const results = []; median([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); }); -test("medianIndex(array) returns the index", () => { +it("medianIndex(array) returns the index", () => { assert.deepStrictEqual(medianIndex([1, 2]), 0); assert.deepStrictEqual(medianIndex([1, 2, 3]), 1); assert.deepStrictEqual(medianIndex([1, 3, 2]), 2); diff --git a/test/merge-test.js b/test/merge-test.js index 7a0210f0..4c3ec85d 100644 --- a/test/merge-test.js +++ b/test/merge-test.js @@ -1,13 +1,13 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {merge} from "../src/index.js"; -test("merge(arrays) merges an array of arrays", () => { +it("merge(arrays) merges an array of arrays", () => { const a = {}, b = {}, c = {}, d = {}, e = {}, f = {}; assert.deepStrictEqual(merge([[a], [b, c], [d, e, f]]), [a, b, c, d, e, f]); }); -test("merge(arrays) returns a new array when zero arrays are passed", () => { +it("merge(arrays) returns a new array when zero arrays are passed", () => { const input = []; const output = merge(input); assert.deepStrictEqual(output, []); @@ -16,7 +16,7 @@ test("merge(arrays) returns a new array when zero arrays are passed", () => { assert.deepStrictEqual(output, []); }); -test("merge(arrays) returns a new array when one array is passed", () => { +it("merge(arrays) returns a new array when one array is passed", () => { const input = [[1, 2, 3]]; const output = merge(input); assert.deepStrictEqual(output, [1, 2, 3]); @@ -26,7 +26,7 @@ test("merge(arrays) returns a new array when one array is passed", () => { assert.deepStrictEqual(output, [1, 2, 3]); }); -test("merge(arrays) returns a new array when two or more arrays are passed", () => { +it("merge(arrays) returns a new array when two or more arrays are passed", () => { const input = [[1, 2, 3], [4, 5], [6]]; const output = merge(input); assert.deepStrictEqual(output, [1, 2, 3, 4, 5, 6]); @@ -38,7 +38,7 @@ test("merge(arrays) returns a new array when two or more arrays are passed", () assert.deepStrictEqual(output, [1, 2, 3, 4, 5, 6]); }); -test("merge(arrays) does not modify the input arrays", () => { +it("merge(arrays) does not modify the input arrays", () => { const input = [[1, 2, 3], [4, 5], [6]]; merge(input); assert.deepStrictEqual(input, [[1, 2, 3], [4, 5], [6]]); diff --git a/test/min-test.js b/test/min-test.js index ecf90b63..322211e0 100644 --- a/test/min-test.js +++ b/test/min-test.js @@ -1,21 +1,21 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {min} from "../src/index.js"; -test("min(array) returns the least numeric value for numbers", () => { +it("min(array) returns the least numeric value for numbers", () => { assert.deepStrictEqual(min([1]), 1); assert.deepStrictEqual(min([5, 1, 2, 3, 4]), 1); assert.deepStrictEqual(min([20, 3]), 3); assert.deepStrictEqual(min([3, 20]), 3); }); -test("min(array) returns the least lexicographic value for strings", () => { +it("min(array) returns the least lexicographic value for strings", () => { assert.deepStrictEqual(min(["c", "a", "b"]), "a"); assert.deepStrictEqual(min(["20", "3"]), "20"); assert.deepStrictEqual(min(["3", "20"]), "20"); }); -test("min(array) ignores null, undefined and NaN", () => { +it("min(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(min([NaN, 1, 2, 3, 4, 5]), 1); assert.deepStrictEqual(min([o, 1, 2, 3, 4, 5]), 1); @@ -25,14 +25,14 @@ test("min(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(min([-1, null, -3, undefined, -5, NaN]), -5); }); -test("min(array) compares heterogenous types as numbers", () => { +it("min(array) compares heterogenous types as numbers", () => { assert.strictEqual(min([20, "3"]), "3"); assert.strictEqual(min(["20", 3]), 3); assert.strictEqual(min([3, "20"]), 3); assert.strictEqual(min(["3", 20]), "3"); }); -test("min(array) returns undefined if the array contains no numbers", () => { +it("min(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(min([]), undefined); assert.strictEqual(min([null]), undefined); assert.strictEqual(min([undefined]), undefined); @@ -40,20 +40,20 @@ test("min(array) returns undefined if the array contains no numbers", () => { assert.strictEqual(min([NaN, NaN]), undefined); }); -test("min(array, f) returns the least numeric value for numbers", () => { +it("min(array, f) returns the least numeric value for numbers", () => { assert.deepStrictEqual(min([1].map(box), unbox), 1); assert.deepStrictEqual(min([5, 1, 2, 3, 4].map(box), unbox), 1); assert.deepStrictEqual(min([20, 3].map(box), unbox), 3); assert.deepStrictEqual(min([3, 20].map(box), unbox), 3); }); -test("min(array, f) returns the least lexicographic value for strings", () => { +it("min(array, f) returns the least lexicographic value for strings", () => { assert.deepStrictEqual(min(["c", "a", "b"].map(box), unbox), "a"); assert.deepStrictEqual(min(["20", "3"].map(box), unbox), "20"); assert.deepStrictEqual(min(["3", "20"].map(box), unbox), "20"); }); -test("min(array, f) ignores null, undefined and NaN", () => { +it("min(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(min([NaN, 1, 2, 3, 4, 5].map(box), unbox), 1); assert.deepStrictEqual(min([o, 1, 2, 3, 4, 5].map(box), unbox), 1); @@ -63,14 +63,14 @@ test("min(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(min([-1, null, -3, undefined, -5, NaN].map(box), unbox), -5); }); -test("min(array, f) compares heterogenous types as numbers", () => { +it("min(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(min([20, "3"].map(box), unbox), "3"); assert.strictEqual(min(["20", 3].map(box), unbox), 3); assert.strictEqual(min([3, "20"].map(box), unbox), 3); assert.strictEqual(min(["3", 20].map(box), unbox), "3"); }); -test("min(array, f) returns undefined if the array contains no observed values", () => { +it("min(array, f) returns undefined if the array contains no observed values", () => { assert.strictEqual(min([].map(box), unbox), undefined); assert.strictEqual(min([null].map(box), unbox), undefined); assert.strictEqual(min([undefined].map(box), unbox), undefined); @@ -78,14 +78,14 @@ test("min(array, f) returns undefined if the array contains no observed values", assert.strictEqual(min([NaN, NaN].map(box), unbox), undefined); }); -test("min(array, f) passes the accessor d, i, and array", () => { +it("min(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; min(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("min(array, f) uses the undefined context", () => { +it("min(array, f) uses the undefined context", () => { const results = []; min([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/minIndex-test.js b/test/minIndex-test.js index 842842cf..94caac0f 100644 --- a/test/minIndex-test.js +++ b/test/minIndex-test.js @@ -1,21 +1,21 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {minIndex} from "../src/index.js"; -test("minIndex(array) returns the index of the least numeric value for numbers", () => { +it("minIndex(array) returns the index of the least numeric value for numbers", () => { assert.deepStrictEqual(minIndex([1]), 0); assert.deepStrictEqual(minIndex([5, 1, 2, 3, 4]), 1); assert.deepStrictEqual(minIndex([20, 3]), 1); assert.deepStrictEqual(minIndex([3, 20]), 0); }); -test("minIndex(array) returns the index of the least lexicographic value for strings", () => { +it("minIndex(array) returns the index of the least lexicographic value for strings", () => { assert.deepStrictEqual(minIndex(["c", "a", "b"]), 1); assert.deepStrictEqual(minIndex(["20", "3"]), 0); assert.deepStrictEqual(minIndex(["3", "20"]), 1); }); -test("minIndex(array) ignores null, undefined and NaN", () => { +it("minIndex(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(minIndex([NaN, 1, 2, 3, 4, 5]), 1); assert.deepStrictEqual(minIndex([o, 1, 2, 3, 4, 5]), 1); @@ -25,14 +25,14 @@ test("minIndex(array) ignores null, undefined and NaN", () => { assert.deepStrictEqual(minIndex([-1, null, -3, undefined, -5, NaN]), 4); }); -test("minIndex(array) compares heterogenous types as numbers", () => { +it("minIndex(array) compares heterogenous types as numbers", () => { assert.strictEqual(minIndex([20, "3"]), 1); assert.strictEqual(minIndex(["20", 3]), 1); assert.strictEqual(minIndex([3, "20"]), 0); assert.strictEqual(minIndex(["3", 20]), 0); }); -test("minIndex(array) returns -1 if the array contains no numbers", () => { +it("minIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(minIndex([]), -1); assert.strictEqual(minIndex([null]), -1); assert.strictEqual(minIndex([undefined]), -1); @@ -40,20 +40,20 @@ test("minIndex(array) returns -1 if the array contains no numbers", () => { assert.strictEqual(minIndex([NaN, NaN]), -1); }); -test("minIndex(array, f) returns the index of the least numeric value for numbers", () => { +it("minIndex(array, f) returns the index of the least numeric value for numbers", () => { assert.deepStrictEqual(minIndex([1].map(box), unbox), 0); assert.deepStrictEqual(minIndex([5, 1, 2, 3, 4].map(box), unbox), 1); assert.deepStrictEqual(minIndex([20, 3].map(box), unbox), 1); assert.deepStrictEqual(minIndex([3, 20].map(box), unbox), 0); }); -test("minIndex(array, f) returns the index of the least lexicographic value for strings", () => { +it("minIndex(array, f) returns the index of the least lexicographic value for strings", () => { assert.deepStrictEqual(minIndex(["c", "a", "b"].map(box), unbox), 1); assert.deepStrictEqual(minIndex(["20", "3"].map(box), unbox), 0); assert.deepStrictEqual(minIndex(["3", "20"].map(box), unbox), 1); }); -test("minIndex(array, f) ignores null, undefined and NaN", () => { +it("minIndex(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.deepStrictEqual(minIndex([NaN, 1, 2, 3, 4, 5].map(box), unbox), 1); assert.deepStrictEqual(minIndex([o, 1, 2, 3, 4, 5].map(box), unbox), 1); @@ -63,14 +63,14 @@ test("minIndex(array, f) ignores null, undefined and NaN", () => { assert.deepStrictEqual(minIndex([-1, null, -3, undefined, -5, NaN].map(box), unbox), 4); }); -test("minIndex(array, f) compares heterogenous types as numbers", () => { +it("minIndex(array, f) compares heterogenous types as numbers", () => { assert.strictEqual(minIndex([20, "3"].map(box), unbox), 1); assert.strictEqual(minIndex(["20", 3].map(box), unbox), 1); assert.strictEqual(minIndex([3, "20"].map(box), unbox), 0); assert.strictEqual(minIndex(["3", 20].map(box), unbox), 0); }); -test("minIndex(array, f) returns -1 if the array contains no observed values", () => { +it("minIndex(array, f) returns -1 if the array contains no observed values", () => { assert.strictEqual(minIndex([].map(box), unbox), -1); assert.strictEqual(minIndex([null].map(box), unbox), -1); assert.strictEqual(minIndex([undefined].map(box), unbox), -1); @@ -78,14 +78,14 @@ test("minIndex(array, f) returns -1 if the array contains no observed values", ( assert.strictEqual(minIndex([NaN, NaN].map(box), unbox), -1); }); -test("minIndex(array, f) passes the accessor d, i, and array", () => { +it("minIndex(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; minIndex(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("minIndex(array, f) uses the undefined context", () => { +it("minIndex(array, f) uses the undefined context", () => { const results = []; minIndex([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/mode-test.js b/test/mode-test.js index 37e9d747..d8f4b641 100644 --- a/test/mode-test.js +++ b/test/mode-test.js @@ -1,28 +1,28 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {mode} from "../src/index.js"; -test("mode(array) returns the most frequent value for numbers", () => { +it("mode(array) returns the most frequent value for numbers", () => { assert.strictEqual(mode([1]), 1); assert.strictEqual(mode([5, 1, 1, 3, 4]), 1); }); -test("mode(array) returns the most frequent value for strings", () => { +it("mode(array) returns the most frequent value for strings", () => { assert.strictEqual(mode(["1"]), "1"); assert.strictEqual(mode(["5", "1", "1", "3", "4"]), "1"); }); -test("mode(array) returns the most frequent value for heterogenous types", () => { +it("mode(array) returns the most frequent value for heterogenous types", () => { assert.strictEqual(mode(["1"]), "1"); assert.strictEqual(mode(["5", "1", "1", 2, 2, "2", 1, 1, 1, "3", "4"]), 1); assert.strictEqual(mode(["5", 2, 2, "2", "2", 1, 1, 1, "3", "4"]), 1); }); -test("mode(array) returns the first of the most frequent values", () => { +it("mode(array) returns the first of the most frequent values", () => { assert.strictEqual(mode(["5", "1", "1", "2", "2", "3", "4"]), "1"); }); -test("mode(array) ignores null, undefined and NaN", () => { +it("mode(array) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.strictEqual(mode([NaN, 1, 1, 3, 4, 5]), 1); assert.strictEqual(mode([o, 1, null, null, 1, null]), 1); @@ -31,7 +31,7 @@ test("mode(array) ignores null, undefined and NaN", () => { assert.strictEqual(mode([1, undefined, undefined, 1, 5, undefined]), 1); }); -test("mode(array) returns undefined if the array contains no comparable values", () => { +it("mode(array) returns undefined if the array contains no comparable values", () => { assert.strictEqual(mode([]), undefined); assert.strictEqual(mode([null]), undefined); assert.strictEqual(mode([undefined]), undefined); @@ -39,26 +39,26 @@ test("mode(array) returns undefined if the array contains no comparable values", assert.strictEqual(mode([NaN, NaN]), undefined); }); -test("mode(array, f) returns the most frequent value for numbers", () => { +it("mode(array, f) returns the most frequent value for numbers", () => { assert.strictEqual(mode([1].map(box), unbox), 1); assert.strictEqual(mode([5, 1, 1, 3, 4].map(box), unbox), 1); }); -test("mode(array, f) returns the most frequent value for strings", () => { +it("mode(array, f) returns the most frequent value for strings", () => { assert.strictEqual(mode(["1"].map(box), unbox), "1"); assert.strictEqual(mode(["5", "1", "1", "3", "4"].map(box), unbox), "1"); }); -test("mode(array, f) returns the most frequent value for heterogenous types", () => { +it("mode(array, f) returns the most frequent value for heterogenous types", () => { assert.strictEqual(mode(["1"].map(box), unbox), "1"); assert.strictEqual(mode(["5", "1", "1", 2, 2, "2", 1, 1, 1, "3", "4"].map(box), unbox), 1); }); -test("mode(array, f) returns the first of the most frequent values", () => { +it("mode(array, f) returns the first of the most frequent values", () => { assert.strictEqual(mode(["5", "1", "1", "2", "2", "3", "4"].map(box), unbox), "1"); }); -test("mode(array, f) ignores null, undefined and NaN", () => { +it("mode(array, f) ignores null, undefined and NaN", () => { const o = {valueOf: () => NaN}; assert.strictEqual(mode([NaN, 1, 1, 3, 4, 5].map(box), unbox), 1); assert.strictEqual(mode([o, 1, null, null, 1, null].map(box), unbox), 1); @@ -67,7 +67,7 @@ test("mode(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(mode([1, undefined, undefined, 1, 5, undefined].map(box), unbox), 1); }); -test("mode(array, f) returns undefined if the array contains no comparable values", () => { +it("mode(array, f) returns undefined if the array contains no comparable values", () => { assert.strictEqual(mode([].map(box), unbox), undefined); assert.strictEqual(mode([null].map(box), unbox), undefined); assert.strictEqual(mode([undefined].map(box), unbox), undefined); @@ -75,14 +75,14 @@ test("mode(array, f) returns undefined if the array contains no comparable value assert.strictEqual(mode([NaN, NaN].map(box), unbox), undefined); }); -test("mode(array, f) passes the accessor d, i, and array", () => { +it("mode(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; mode(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("mode(array, f) uses the undefined context", () => { +it("mode(array, f) uses the undefined context", () => { const results = []; mode([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/nice-test.js b/test/nice-test.js index d41ea6f4..ae037f94 100644 --- a/test/nice-test.js +++ b/test/nice-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {nice} from "../src/index.js"; -test("nice(start, stop, count) returns [start, stop] if any argument is NaN", () => { +it("nice(start, stop, count) returns [start, stop] if any argument is NaN", () => { assert.deepStrictEqual(nice(NaN, 1, 1), [NaN, 1]); assert.deepStrictEqual(nice(0, NaN, 1), [0, NaN]); assert.deepStrictEqual(nice(0, 1, NaN), [0, 1]); @@ -12,7 +12,7 @@ test("nice(start, stop, count) returns [start, stop] if any argument is NaN", () assert.deepStrictEqual(nice(NaN, NaN, NaN), [NaN, NaN]); }); -test("nice(start, stop, count) returns [start, stop] if start === stop", () => { +it("nice(start, stop, count) returns [start, stop] if start === stop", () => { assert.deepStrictEqual(nice(1, 1, -1), [1, 1]); assert.deepStrictEqual(nice(1, 1, 0), [1, 1]); assert.deepStrictEqual(nice(1, 1, NaN), [1, 1]); @@ -20,16 +20,16 @@ test("nice(start, stop, count) returns [start, stop] if start === stop", () => { assert.deepStrictEqual(nice(1, 1, 10), [1, 1]); }); -test("nice(start, stop, count) returns [start, stop] if count is not positive", () => { +it("nice(start, stop, count) returns [start, stop] if count is not positive", () => { assert.deepStrictEqual(nice(0, 1, -1), [0, 1]); assert.deepStrictEqual(nice(0, 1, 0), [0, 1]); }); -test("nice(start, stop, count) returns [start, stop] if count is infinity", () => { +it("nice(start, stop, count) returns [start, stop] if count is infinity", () => { assert.deepStrictEqual(nice(0, 1, Infinity), [0, 1]); }); -test("nice(start, stop, count) returns the expected values", () => { +it("nice(start, stop, count) returns the expected values", () => { assert.deepStrictEqual(nice(0.132, 0.876, 1000), [0.132, 0.876]); assert.deepStrictEqual(nice(0.132, 0.876, 100), [0.13, 0.88]); assert.deepStrictEqual(nice(0.132, 0.876, 30), [0.12, 0.88]); diff --git a/test/pairs-test.js b/test/pairs-test.js index 43e884e5..60906e38 100644 --- a/test/pairs-test.js +++ b/test/pairs-test.js @@ -1,24 +1,24 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {pairs} from "../src/index.js"; -test("pairs(array) returns the empty array if input array has fewer than two elements", () => { +it("pairs(array) returns the empty array if input array has fewer than two elements", () => { assert.deepStrictEqual(pairs([]), []); assert.deepStrictEqual(pairs([1]), []); }); -test("pairs(array) returns pairs of adjacent elements in the given array", () => { +it("pairs(array) returns pairs of adjacent elements in the given array", () => { const a = {}, b = {}, c = {}, d = {}; assert.deepStrictEqual(pairs([1, 2]), [[1, 2]]); assert.deepStrictEqual(pairs([1, 2, 3]), [[1, 2], [2, 3]]); assert.deepStrictEqual(pairs([a, b, c, d]), [[a, b], [b, c], [c, d]]); }); -test("pairs(array, f) invokes the function f for each pair of adjacent elements", () => { +it("pairs(array, f) invokes the function f for each pair of adjacent elements", () => { assert.deepStrictEqual(pairs([1, 3, 7], (a, b) => b - a), [2, 4]); }); -test("pairs(array) includes null or undefined elements in pairs", () => { +it("pairs(array) includes null or undefined elements in pairs", () => { assert.deepStrictEqual(pairs([1, null, 2]), [[1, null], [null, 2]]); assert.deepStrictEqual(pairs([1, 2, undefined]), [[1, 2], [2, undefined]]); }); diff --git a/test/permute-test.js b/test/permute-test.js index 0bc24a2f..ae217e3e 100644 --- a/test/permute-test.js +++ b/test/permute-test.js @@ -1,51 +1,51 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {permute} from "../src/index.js"; -test("permute(…) permutes according to the specified index", () => { +it("permute(…) permutes according to the specified index", () => { assert.deepStrictEqual(permute([3, 4, 5], [2, 1, 0]), [5, 4, 3]); assert.deepStrictEqual(permute([3, 4, 5], [2, 0, 1]), [5, 3, 4]); assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 2]), [3, 4, 5]); }); -test("permute(…) does not modify the input array", () => { +it("permute(…) does not modify the input array", () => { const input = [3, 4, 5]; permute(input, [2, 1, 0]); assert.deepStrictEqual(input, [3, 4, 5]); }); -test("permute(…) can duplicate input values", () => { +it("permute(…) can duplicate input values", () => { assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 0]), [3, 4, 3]); assert.deepStrictEqual(permute([3, 4, 5], [2, 2, 2]), [5, 5, 5]); assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 1]), [3, 4, 4]); }); -test("permute(…) can return more elements", () => { +it("permute(…) can return more elements", () => { assert.deepStrictEqual(permute([3, 4, 5], [0, 0, 1, 2]), [3, 3, 4, 5]); assert.deepStrictEqual(permute([3, 4, 5], [0, 1, 1, 1]), [3, 4, 4, 4]); }); -test("permute(…) can return fewer elements", () => { +it("permute(…) can return fewer elements", () => { assert.deepStrictEqual(permute([3, 4, 5], [0]), [3]); assert.deepStrictEqual(permute([3, 4, 5], [1, 2]), [4, 5]); assert.deepStrictEqual(permute([3, 4, 5], []), []); }); -test("permute(…) can return undefined elements", () => { +it("permute(…) can return undefined elements", () => { assert.deepStrictEqual(permute([3, 4, 5], [10]), [undefined]); assert.deepStrictEqual(permute([3, 4, 5], [-1]), [undefined]); assert.deepStrictEqual(permute([3, 4, 5], [0, -1]), [3, undefined]); }); -test("permute(…) can take an object as the source", () => { +it("permute(…) can take an object as the source", () => { assert.deepStrictEqual(permute({foo: 1, bar: 2}, ["bar", "foo"]), [2, 1]); }); -test("permute(…) can take a typed array as the source", () => { +it("permute(…) can take a typed array as the source", () => { assert.deepStrictEqual(permute(Float32Array.of(1, 2), [0, 0, 1, 0]), [1, 1, 2, 1]); assert.strictEqual(Array.isArray(permute(Float32Array.of(1, 2), [0])), true); }); -test("permute(…) can take an iterable as the keys", () => { +it("permute(…) can take an iterable as the keys", () => { assert.deepStrictEqual(permute({foo: 1, bar: 2}, new Set(["bar", "foo"])), [2, 1]); }); diff --git a/test/quantile-test.js b/test/quantile-test.js index b035f08e..4ec60650 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {quantile, quantileIndex, quantileSorted} from "../src/index.js"; -test("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", () => { +it("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", () => { assert.strictEqual(quantileSorted([1, 2, 3, 4], 0), 1); assert.strictEqual(quantileSorted([1, 2, 3, 4], 1), 4); assert.strictEqual(quantileSorted([4, 3, 2, 1], 0), 4); @@ -13,11 +13,11 @@ test("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", assert.strictEqual(quantile([4, 3, 2, 1], 1), 4); }); -test("quantile() accepts an iterable", () => { +it("quantile() accepts an iterable", () => { assert.strictEqual(quantile(new Set([1, 2, 3, 4]), 1), 4); }); -test("quantile(array, p) uses the R-7 method", () => { +it("quantile(array, p) uses the R-7 method", () => { const even = [3, 6, 7, 8, 8, 10, 13, 15, 16, 20]; assert.strictEqual(quantile(even, 0), 3); assert.strictEqual(quantile(even, 0.25), 7.25); @@ -32,7 +32,7 @@ test("quantile(array, p) uses the R-7 method", () => { assert.strictEqual(quantile(odd, 1), 20); }); -test("quantile(array, p) coerces values to numbers", () => { +it("quantile(array, p) coerces values to numbers", () => { const strings = ["1", "2", "3", "4"]; assert.strictEqual(quantile(strings, 1 / 3), 2); assert.strictEqual(quantile(strings, 1 / 2), 2.5); @@ -43,13 +43,13 @@ test("quantile(array, p) coerces values to numbers", () => { assert.strictEqual(quantile(dates, 1), +new Date(Date.UTC(2012, 0, 1))); }); -test("quantile(array, p) returns an exact value for integer p-values", () => { +it("quantile(array, p) returns an exact value for integer p-values", () => { const data = [1, 2, 3, 4]; assert.strictEqual(quantile(data, 1 / 3), 2); assert.strictEqual(quantile(data, 2 / 3), 3); }); -test("quantile(array, p) returns the expected value for integer or fractional p", () => { +it("quantile(array, p) returns the expected value for integer or fractional p", () => { const data = [3, 1, 2, 4, 0]; assert.strictEqual(quantile(data, 0 / 4), 0); assert.strictEqual(quantile(data, 0.1 / 4), 0.1); @@ -62,24 +62,24 @@ test("quantile(array, p) returns the expected value for integer or fractional p" assert.strictEqual(quantile(data, 4 / 4), 4); }); -test("quantile(array, p) returns the first value for p = 0", () => { +it("quantile(array, p) returns the first value for p = 0", () => { const data = [1, 2, 3, 4]; assert.strictEqual(quantile(data, 0), 1); }); -test("quantile(array, p) returns the last value for p = 1", () => { +it("quantile(array, p) returns the last value for p = 1", () => { const data = [1, 2, 3, 4]; assert.strictEqual(quantile(data, 1), 4); }); -test("quantile(array, p) returns undefined if p is not a number", () => { +it("quantile(array, p) returns undefined if p is not a number", () => { assert.strictEqual(quantile([1, 2, 3]), undefined); assert.strictEqual(quantile([1, 2, 3], "no"), undefined); assert.strictEqual(quantile([1, 2, 3], NaN), undefined); assert.strictEqual(quantile([1, 2, 3], null), 1); // +null is 0 }); -test("quantile(array, p, f) observes the specified accessor", () => { +it("quantile(array, p, f) observes the specified accessor", () => { assert.strictEqual(quantile([1, 2, 3, 4].map(box), 0.5, unbox), 2.5); assert.strictEqual(quantile([1, 2, 3, 4].map(box), 0, unbox), 1); assert.strictEqual(quantile([1, 2, 3, 4].map(box), 1, unbox), 4); @@ -91,7 +91,7 @@ test("quantile(array, p, f) observes the specified accessor", () => { assert.strictEqual(quantile([], 1, unbox), undefined); }); -test("quantileIndex(array, p) returns the index", () => { +it("quantileIndex(array, p) returns the index", () => { assert.deepStrictEqual(quantileIndex([1, 2], 0.2), 0); assert.deepStrictEqual(quantileIndex([1, 2, 3], 0.2), 0); assert.deepStrictEqual(quantileIndex([1, 3, 2], 0.2), 0); @@ -100,7 +100,7 @@ test("quantileIndex(array, p) returns the index", () => { assert.deepStrictEqual(quantileIndex([], 0.2), -1); }); -test("quantileIndex(array, 0) returns the minimum index", () => { +it("quantileIndex(array, 0) returns the minimum index", () => { assert.deepStrictEqual(quantileIndex([1, 2], 0), 0); assert.deepStrictEqual(quantileIndex([1, 2, 3], 0), 0); assert.deepStrictEqual(quantileIndex([1, 3, 2], 0), 0); @@ -109,7 +109,7 @@ test("quantileIndex(array, 0) returns the minimum index", () => { assert.deepStrictEqual(quantileIndex([], 0), -1); }); -test("quantileIndex(array, 1) returns the maximum index", () => { +it("quantileIndex(array, 1) returns the maximum index", () => { assert.deepStrictEqual(quantileIndex([1, 2], 1), 1); assert.deepStrictEqual(quantileIndex([1, 2, 3], 1), 2); assert.deepStrictEqual(quantileIndex([1, 3, 2], 1), 1); @@ -118,12 +118,12 @@ test("quantileIndex(array, 1) returns the maximum index", () => { assert.deepStrictEqual(quantileIndex([], 1), -1); }); -test("quantileIndex(array, 0.5) handles undefined values", () => { +it("quantileIndex(array, 0.5) handles undefined values", () => { assert.deepStrictEqual(quantileIndex([1, 1, 1, null, 2, 3, 3, 3], 0.5), 4); assert.deepStrictEqual(quantileIndex([1, 1, 1, null, 2, 3, 3, 3], 0.5, (d) => d), 4); }); -test("quantileIndex(array, 0.5) returns the first of equivalent values", () => { +it("quantileIndex(array, 0.5) returns the first of equivalent values", () => { assert.deepStrictEqual(quantileIndex([1, 1, 1, 2, 2, 3, 3, 3], 0.5), 4); }); diff --git a/test/quickselect-test.js b/test/quickselect-test.js index f75a1cdc..bdbdbd5c 100644 --- a/test/quickselect-test.js +++ b/test/quickselect-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {quickselect} from "../src/index.js"; -test("quickselect(array, k) does nothing if k is not a number", () => { +it("quickselect(array, k) does nothing if k is not a number", () => { const array = [3, 1, 2]; assert.strictEqual(quickselect(array), array); assert.deepStrictEqual(array, [3, 1, 2]); @@ -16,7 +16,7 @@ test("quickselect(array, k) does nothing if k is not a number", () => { assert.deepStrictEqual(array, [1, 2, 3]); }); -test("quickselect(array, k) does nothing if k is less than left", () => { +it("quickselect(array, k) does nothing if k is less than left", () => { const array = [3, 1, 2]; assert.strictEqual(quickselect(array, -1), array); assert.deepStrictEqual(array, [3, 1, 2]); @@ -24,7 +24,7 @@ test("quickselect(array, k) does nothing if k is less than left", () => { assert.deepStrictEqual(array, [3, 1, 2]); }); -test("quickselect(array, k) does nothing if k is greater than right", () => { +it("quickselect(array, k) does nothing if k is greater than right", () => { const array = [3, 1, 2]; assert.strictEqual(quickselect(array, 3), array); assert.deepStrictEqual(array, [3, 1, 2]); @@ -32,7 +32,7 @@ test("quickselect(array, k) does nothing if k is greater than right", () => { assert.deepStrictEqual(array, [3, 1, 2]); }); -test("quickselect(array, k) implicitly floors k, left, and right", () => { +it("quickselect(array, k) implicitly floors k, left, and right", () => { assert.deepStrictEqual(quickselect([3, 1, 2], 0.5), [1, 2, 3]); assert.deepStrictEqual(quickselect([3, 1, 2, 5, 4], 4.1), [3, 1, 2, 4, 5]); assert.deepStrictEqual(quickselect([3, 1, 2], 0, 0.5), [1, 2, 3]); diff --git a/test/range-test.js b/test/range-test.js index 4a782b7c..36466f3a 100644 --- a/test/range-test.js +++ b/test/range-test.js @@ -1,33 +1,33 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {range} from "../src/index.js"; -test("range(stop) returns [0, 1, 2, … stop - 1]", () => { +it("range(stop) returns [0, 1, 2, … stop - 1]", () => { assert.deepStrictEqual(range(5), [0, 1, 2, 3, 4]); assert.deepStrictEqual(range(2.01), [0, 1, 2]); assert.deepStrictEqual(range(1), [0]); assert.deepStrictEqual(range(.5), [0]); }); -test("range(stop) returns an empty array if stop <= 0", () => { +it("range(stop) returns an empty array if stop <= 0", () => { assert.deepStrictEqual(range(0), []); assert.deepStrictEqual(range(-0.5), []); assert.deepStrictEqual(range(-1), []); }); -test("range(stop) returns an empty array if stop is NaN", () => { +it("range(stop) returns an empty array if stop is NaN", () => { assert.deepStrictEqual(range(NaN), []); assert.deepStrictEqual(range(), []); }); -test("range(start, stop) returns [start, start + 1, … stop - 1]", () => { +it("range(start, stop) returns [start, start + 1, … stop - 1]", () => { assert.deepStrictEqual(range(0, 5), [0, 1, 2, 3, 4]); assert.deepStrictEqual(range(2, 5), [2, 3, 4]); assert.deepStrictEqual(range(2.5, 5), [2.5, 3.5, 4.5]); assert.deepStrictEqual(range(-1, 3), [-1, 0, 1, 2]); }); -test("range(start, stop) returns an empty array if start or stop is NaN", () => { +it("range(start, stop) returns an empty array if start or stop is NaN", () => { assert.deepStrictEqual(range(0, NaN), []); assert.deepStrictEqual(range(1, NaN), []); assert.deepStrictEqual(range(-1, NaN), []); @@ -44,7 +44,7 @@ test("range(start, stop) returns an empty array if start or stop is NaN", () => assert.deepStrictEqual(range(undefined, undefined), []); }); -test("range(start, stop) returns an empty array if start >= stop", () => { +it("range(start, stop) returns an empty array if start >= stop", () => { assert.deepStrictEqual(range(0, 0), []); assert.deepStrictEqual(range(5, 5), []); assert.deepStrictEqual(range(6, 5), []); @@ -52,21 +52,21 @@ test("range(start, stop) returns an empty array if start >= stop", () => { assert.deepStrictEqual(range(20, 10), []); }); -test("range(start, stop, step) returns [start, start + step, start + 2 * step, … stop - step]", () => { +it("range(start, stop, step) returns [start, start + step, start + 2 * step, … stop - step]", () => { assert.deepStrictEqual(range(0, 5, 1), [0, 1, 2, 3, 4]); assert.deepStrictEqual(range(0, 5, 2), [0, 2, 4]); assert.deepStrictEqual(range(2, 5, 2), [2, 4]); assert.deepStrictEqual(range(-1, 3, 2), [-1, 1]); }); -test("range(start, stop, step) allows a negative step", () => { +it("range(start, stop, step) allows a negative step", () => { assert.deepStrictEqual(range(5, 0, -1), [5, 4, 3, 2, 1]); assert.deepStrictEqual(range(5, 0, -2), [5, 3, 1]); assert.deepStrictEqual(range(5, 2, -2), [5, 3]); assert.deepStrictEqual(range(3, -1, -2), [3, 1]); }); -test("range(start, stop, step) returns an empty array if start >= stop and step > 0", () => { +it("range(start, stop, step) returns an empty array if start >= stop and step > 0", () => { assert.deepStrictEqual(range(5, 5, 2), []); assert.deepStrictEqual(range(6, 5, 2), []); assert.deepStrictEqual(range(10, 10, 1), []); @@ -78,7 +78,7 @@ test("range(start, stop, step) returns an empty array if start >= stop and step assert.deepStrictEqual(range(20, 10, 0.5), []); }); -test("range(start, stop, step) returns an empty array if start >= stop and step < 0", () => { +it("range(start, stop, step) returns an empty array if start >= stop and step < 0", () => { assert.deepStrictEqual(range(5, 5, -2), []); assert.deepStrictEqual(range(5, 6, -2), []); assert.deepStrictEqual(range(10, 10, -1), []); @@ -90,7 +90,7 @@ test("range(start, stop, step) returns an empty array if start >= stop and step assert.deepStrictEqual(range(10, 20, -0.5), []); }); -test("range(start, stop, step) returns an empty array if start, stop or step is NaN", () => { +it("range(start, stop, step) returns an empty array if start, stop or step is NaN", () => { assert.deepStrictEqual(range(NaN, 3, 2), []); assert.deepStrictEqual(range(3, NaN, 2), []); assert.deepStrictEqual(range(0, 5, NaN), []); @@ -103,23 +103,23 @@ test("range(start, stop, step) returns an empty array if start, stop or step is assert.deepStrictEqual(range(10, 0, undefined), []); }); -test("range(start, stop, step) returns an empty array if step is zero", () => { +it("range(start, stop, step) returns an empty array if step is zero", () => { assert.deepStrictEqual(range(0, 5, 0), []); }); -test("range(start, stop, step) returns exactly [start + step * i, …] for fractional steps", () => { +it("range(start, stop, step) returns exactly [start + step * i, …] for fractional steps", () => { assert.deepStrictEqual(range(0, 0.5, 0.1), [0 + 0.1 * 0, 0 + 0.1 * 1, 0 + 0.1 * 2, 0 + 0.1 * 3, 0 + 0.1 * 4]); assert.deepStrictEqual(range(0.5, 0, -0.1), [0.5 - 0.1 * 0, 0.5 - 0.1 * 1, 0.5 - 0.1 * 2, 0.5 - 0.1 * 3, 0.5 - 0.1 * 4]); assert.deepStrictEqual(range(-2, -1.2, 0.1), [-2 + 0.1 * 0, -2 + 0.1 * 1, -2 + 0.1 * 2, -2 + 0.1 * 3, -2 + 0.1 * 4, -2 + 0.1 * 5, -2 + 0.1 * 6, -2 + 0.1 * 7]); assert.deepStrictEqual(range(-1.2, -2, -0.1), [-1.2 - 0.1 * 0, -1.2 - 0.1 * 1, -1.2 - 0.1 * 2, -1.2 - 0.1 * 3, -1.2 - 0.1 * 4, -1.2 - 0.1 * 5, -1.2 - 0.1 * 6, -1.2 - 0.1 * 7]); }); -test("range(start, stop, step) returns exactly [start + step * i, …] for very small fractional steps", () => { +it("range(start, stop, step) returns exactly [start + step * i, …] for very small fractional steps", () => { assert.deepStrictEqual(range(2.1e-31, 5e-31, 1.1e-31), [2.1e-31 + 1.1e-31 * 0, 2.1e-31 + 1.1e-31 * 1, 2.1e-31 + 1.1e-31 * 2]); assert.deepStrictEqual(range(5e-31, 2.1e-31, -1.1e-31), [5e-31 - 1.1e-31 * 0, 5e-31 - 1.1e-31 * 1, 5e-31 - 1.1e-31 * 2]); }); -test("range(start, stop, step) returns exactly [start + step * i, …] for very large fractional steps", () => { +it("range(start, stop, step) returns exactly [start + step * i, …] for very large fractional steps", () => { assert.deepStrictEqual(range(1e300, 2e300, 0.3e300), [1e300 + 0.3e300 * 0, 1e300 + 0.3e300 * 1, 1e300 + 0.3e300 * 2, 1e300 + 0.3e300 * 3]); assert.deepStrictEqual(range(2e300, 1e300, -0.3e300), [2e300 - 0.3e300 * 0, 2e300 - 0.3e300 * 1, 2e300 - 0.3e300 * 2, 2e300 - 0.3e300 * 3]); }); diff --git a/test/rank-test.js b/test/rank-test.js index 0310c083..3849a35e 100644 --- a/test/rank-test.js +++ b/test/rank-test.js @@ -1,49 +1,49 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import ascending from "../src/ascending.js"; import descending from "../src/descending.js"; import rank from "../src/rank.js"; -test("rank(numbers) returns the rank of numbers", () => { +it("rank(numbers) returns the rank of numbers", () => { assert.deepStrictEqual(rank([1000, 10, 0]), Float64Array.of(2, 1, 0)); assert.deepStrictEqual(rank([1.2, 1.1, 1.2, 1.0, 1.5, 1.2]), Float64Array.of(2, 1, 2, 0, 5, 2)); }); -test("rank(strings) returns the rank of letters", () => { +it("rank(strings) returns the rank of letters", () => { assert.deepStrictEqual(rank([..."EDGFCBA"]), Float64Array.of(4, 3, 6, 5, 2, 1, 0)); assert.deepStrictEqual(rank("EDGFCBA"), Float64Array.of(4, 3, 6, 5, 2, 1, 0)); }); -test("rank(dates) returns the rank of Dates", () => { +it("rank(dates) returns the rank of Dates", () => { assert.deepStrictEqual(rank([new Date("2000-01-01"), new Date("2000-01-01"), new Date("1999-01-01"), new Date("2001-01-01")]), Float64Array.of(1, 1, 0, 3)); }); -test("rank(iterator) accepts an iterator", () => { +it("rank(iterator) accepts an iterator", () => { assert.deepStrictEqual(rank(new Set(["B", "C", "A"])), Float64Array.of(1, 2, 0)); }); -test("rank(undefineds) ranks undefined as NaN", () => { +it("rank(undefineds) ranks undefined as NaN", () => { assert.deepStrictEqual(rank([1.2, 1.1, undefined, 1.0, undefined, 1.5]), Float64Array.of(2, 1, NaN, 0, NaN, 3)); assert.deepStrictEqual(rank([, null, , 1.2, 1.1, undefined, 1.0, NaN, 1.5]), Float64Array.of(NaN, NaN, NaN, 2, 1, NaN, 0, NaN, 3)); }); -test("rank(values, valueof) accepts an accessor", () => { +it("rank(values, valueof) accepts an accessor", () => { assert.deepStrictEqual(rank([{x: 3}, {x: 1}, {x: 2}, {x: 4}, {}], d => d.x), Float64Array.of(2, 0, 1, 3, NaN)); }); -test("rank(values, compare) accepts a comparator", () => { +it("rank(values, compare) accepts a comparator", () => { assert.deepStrictEqual(rank([{x: 3}, {x: 1}, {x: 2}, {x: 4}, {}], (a, b) => a.x - b.x), Float64Array.of(2, 0, 1, 3, NaN)); assert.deepStrictEqual(rank([{x: 3}, {x: 1}, {x: 2}, {x: 4}, {}], (a, b) => b.x - a.x), Float64Array.of(1, 3, 2, 0, NaN)); assert.deepStrictEqual(rank(["aa", "ba", "bc", "bb", "ca"], (a, b) => ascending(a[0], b[0]) || ascending(a[1], b[1])), Float64Array.of(0, 1, 3, 2, 4)); assert.deepStrictEqual(rank(["A", null, "B", "C", "D"], descending), Float64Array.of(3, NaN, 2, 1, 0)); }); -test("rank(values) computes the ties as expected", () => { +it("rank(values) computes the ties as expected", () => { assert.deepStrictEqual(rank(["a", "b", "b", "b", "c"]), Float64Array.of(0, 1, 1, 1, 4)); assert.deepStrictEqual(rank(["a", "b", "b", "b", "b", "c"]), Float64Array.of(0, 1, 1, 1, 1, 5)); }); -test("rank(values) handles NaNs as expected", () => { +it("rank(values) handles NaNs as expected", () => { assert.deepStrictEqual(rank(["a", "b", "b", "b", "c", null]), Float64Array.of(0, 1, 1, 1, 4, NaN)); assert.deepStrictEqual(rank(["a", "b", "b", "b", "b", "c", null]), Float64Array.of(0, 1, 1, 1, 1, 5, NaN)); }); diff --git a/test/reduce-test.js b/test/reduce-test.js index 8daa65f1..5b9c20ac 100644 --- a/test/reduce-test.js +++ b/test/reduce-test.js @@ -1,36 +1,36 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {reduce} from "../src/index.js"; -test("reduce(values, reducer) returns the reduced value", () => { +it("reduce(values, reducer) returns the reduced value", () => { assert.strictEqual(reduce([1, 2, 3, 2, 1], (p, v) => p + v), 9); assert.strictEqual(reduce([1, 2], (p, v) => p + v), 3); assert.strictEqual(reduce([1], (p, v) => p + v), 1); assert.strictEqual(reduce([], (p, v) => p + v), undefined); }); -test("reduce(values, reducer, initial) returns the reduced value", () => { +it("reduce(values, reducer, initial) returns the reduced value", () => { assert.strictEqual(reduce([1, 2, 3, 2, 1], (p, v) => p + v, 0), 9); assert.strictEqual(reduce([1], (p, v) => p + v, 0), 1); assert.strictEqual(reduce([], (p, v) => p + v, 0), 0); assert.deepStrictEqual(reduce([1, 2, 3, 2, 1], (p, v) => p.concat(v), []), [1, 2, 3, 2, 1]); }); -test("reduce(values, reducer) accepts an iterable", () => { +it("reduce(values, reducer) accepts an iterable", () => { assert.strictEqual(reduce(new Set([1, 2, 3, 2, 1]), (p, v) => p + v), 6); assert.strictEqual(reduce((function*() { yield* [1, 2, 3, 2, 1]; })(), (p, v) => p + v), 9); assert.strictEqual(reduce(Uint8Array.of(1, 2, 3, 2, 1), (p, v) => p + v), 9); }); -test("reduce(values, reducer) enforces that test is a function", () => { +it("reduce(values, reducer) enforces that test is a function", () => { assert.throws(() => reduce([]), TypeError); }); -test("reduce(values, reducer) enforces that values is iterable", () => { +it("reduce(values, reducer) enforces that values is iterable", () => { assert.throws(() => reduce({}, () => true), TypeError); }); -test("reduce(values, reducer) passes reducer (reduced, value, index, values)", () => { +it("reduce(values, reducer) passes reducer (reduced, value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); reduce(values, function(p, v) { calls.push([this, ...arguments]); return p + v; }); @@ -42,7 +42,7 @@ test("reduce(values, reducer) passes reducer (reduced, value, index, values)", ( ]); }); -test("reduce(values, reducer, initial) passes reducer (reduced, value, index, values)", () => { +it("reduce(values, reducer, initial) passes reducer (reduced, value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); reduce(values, function(p, v) { calls.push([this, ...arguments]); return p + v; }, 0); @@ -55,6 +55,6 @@ test("reduce(values, reducer, initial) passes reducer (reduced, value, index, va ]); }); -test("reduce(values, reducer, initial) does not skip sparse elements", () => { +it("reduce(values, reducer, initial) does not skip sparse elements", () => { assert.strictEqual(reduce([, 1, 2,, ], (p, v) => p + (v === undefined ? -1 : v), 0), 1); }); diff --git a/test/reverse-test.js b/test/reverse-test.js index 947dee39..3e000c39 100644 --- a/test/reverse-test.js +++ b/test/reverse-test.js @@ -1,27 +1,27 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {reverse} from "../src/index.js"; -test("reverse(values) returns a reversed copy", () => { +it("reverse(values) returns a reversed copy", () => { const input = [1, 3, 2, 5, 4]; assert.deepStrictEqual(reverse(input), [4, 5, 2, 3, 1]); assert.deepStrictEqual(input, [1, 3, 2, 5, 4]); // does not mutate }); -test("reverse(values) returns an array", () => { +it("reverse(values) returns an array", () => { assert.strictEqual(Array.isArray(reverse(Uint8Array.of(1, 2))), true); }); -test("reverse(values) accepts an iterable", () => { +it("reverse(values) accepts an iterable", () => { assert.deepStrictEqual(reverse(new Set([1, 2, 3, 2, 1])), [3, 2, 1]); assert.deepStrictEqual(reverse((function*() { yield* [1, 3, 2, 5, 4]; })()), [4, 5, 2, 3, 1]); assert.deepStrictEqual(reverse(Uint8Array.of(1, 3, 2, 5, 4)), [4, 5, 2, 3, 1]); }); -test("reverse(values) enforces that values is iterable", () => { +it("reverse(values) enforces that values is iterable", () => { assert.throws(() => reverse({}), TypeError); }); -test("reverse(values) does not skip sparse elements", () => { +it("reverse(values) does not skip sparse elements", () => { assert.deepStrictEqual(reverse([, 1, 2,, ]), [undefined, 2, 1, undefined]); }); diff --git a/test/rollup-test.js b/test/rollup-test.js index 9976a452..06c0088d 100644 --- a/test/rollup-test.js +++ b/test/rollup-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {rollup, sum} from "../src/index.js"; @@ -9,7 +9,7 @@ const data = [ {name: "stacy", amount: "3405", date: "01/04/2016"} ]; -test("rollup(data, reduce, accessor) returns the expected map", () => { +it("rollup(data, reduce, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(rollup(data, v => v.length, d => d.name), 1), [ @@ -28,7 +28,7 @@ test("rollup(data, reduce, accessor) returns the expected map", () => { ); }); -test("rollup(data, reduce, accessor, accessor) returns the expected map", () => { +it("rollup(data, reduce, accessor, accessor) returns the expected map", () => { assert.deepStrictEqual( entries(rollup(data, v => v.length, d => d.name, d => d.amount), 2), [ diff --git a/test/rollups-test.js b/test/rollups-test.js index a4540999..edd496e6 100644 --- a/test/rollups-test.js +++ b/test/rollups-test.js @@ -1,4 +1,4 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {rollups, sum} from "../src/index.js"; @@ -9,7 +9,7 @@ const data = [ {name: "stacy", amount: "3405", date: "01/04/2016"} ]; -test("rollups(data, reduce, accessor) returns the expected array", () => { +it("rollups(data, reduce, accessor) returns the expected array", () => { assert.deepStrictEqual( rollups(data, v => v.length, d => d.name), [ @@ -28,7 +28,7 @@ test("rollups(data, reduce, accessor) returns the expected array", () => { ); }); -test("rollups(data, reduce, accessor, accessor) returns the expected array", () => { +it("rollups(data, reduce, accessor, accessor) returns the expected array", () => { assert.deepStrictEqual( rollups(data, v => v.length, d => d.name, d => d.amount), [ diff --git a/test/scan-test.js b/test/scan-test.js index bbe11a15..8807bab6 100644 --- a/test/scan-test.js +++ b/test/scan-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {descending, scan} from "../src/index.js"; -test("scan(array) compares using natural order", () => { +it("scan(array) compares using natural order", () => { assert.strictEqual(scan([0, 1]), 0); assert.strictEqual(scan([1, 0]), 1); assert.strictEqual(scan([0, "1"]), 0); @@ -17,7 +17,7 @@ test("scan(array) compares using natural order", () => { assert.strictEqual(scan([NaN, 10, 2]), 2); }); -test("scan(array, compare) compares using the specified compare function", () => { +it("scan(array, compare) compares using the specified compare function", () => { var a = {name: "a"}, b = {name: "b"}; assert.strictEqual(scan([a, b], (a, b) => a.name.localeCompare(b.name)), 0); assert.strictEqual(scan([1, 0], descending), 0); @@ -27,16 +27,16 @@ test("scan(array, compare) compares using the specified compare function", () => assert.strictEqual(scan([2, NaN, 10], descending), 2); }); -test("scan(array) returns undefined if the array is empty", () => { +it("scan(array) returns undefined if the array is empty", () => { assert.strictEqual(scan([]), undefined); }); -test("scan(array) returns undefined if the array contains only incomparable values", () => { +it("scan(array) returns undefined if the array contains only incomparable values", () => { assert.strictEqual(scan([NaN, undefined]), undefined); assert.strictEqual(scan([NaN, "foo"], (a, b) => a - b), undefined); }); -test("scan(array) returns the first of equal values", () => { +it("scan(array) returns the first of equal values", () => { assert.strictEqual(scan([2, 2, 1, 1, 0, 0, 0, 3, 0]), 4); assert.strictEqual(scan([3, 2, 2, 1, 1, 0, 0, 0, 3, 0], descending), 0); }); diff --git a/test/shuffle-test.js b/test/shuffle-test.js index 39f41c41..a1083568 100644 --- a/test/shuffle-test.js +++ b/test/shuffle-test.js @@ -1,30 +1,30 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {randomLcg} from "d3-random"; import {pairs, shuffler} from "../src/index.js"; -test("shuffle(array) shuffles the array in-place", () => { +it("shuffle(array) shuffles the array in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers), numbers); assert(pairs(numbers).some(([a, b]) => a > b)); // shuffled }); -test("shuffler(random)(array) shuffles the array in-place", () => { +it("shuffler(random)(array) shuffles the array in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers), numbers); assert.deepStrictEqual(numbers, [7, 4, 5, 3, 9, 0, 6, 1, 2, 8]); }); -test("shuffler(random)(array, start) shuffles the subset array[start:] in-place", () => { +it("shuffler(random)(array, start) shuffles the subset array[start:] in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers, 4), numbers); assert.deepStrictEqual(numbers, [0, 1, 2, 3, 8, 7, 6, 4, 5, 9]); }); -test("shuffler(random)(array, start, end) shuffles the subset array[start:end] in-place", () => { +it("shuffler(random)(array, start, end) shuffles the subset array[start:end] in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; const shuffle = shuffler(randomLcg(0.9051667019185816)); assert.strictEqual(shuffle(numbers, 3, 8), numbers); diff --git a/test/some-test.js b/test/some-test.js index 0b5b1ad9..b110f3cc 100644 --- a/test/some-test.js +++ b/test/some-test.js @@ -1,31 +1,31 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {some} from "../src/index.js"; -test("some(values, test) returns true if any test passes", () => { +it("some(values, test) returns true if any test passes", () => { assert.strictEqual(some([1, 2, 3, 2, 1], x => x & 1), true); assert.strictEqual(some([1, 2, 3, 2, 1], x => x > 3), false); }); -test("some(values, test) returns false if values is empty", () => { +it("some(values, test) returns false if values is empty", () => { assert.strictEqual(some([], () => true), false); }); -test("some(values, test) accepts an iterable", () => { +it("some(values, test) accepts an iterable", () => { assert.strictEqual(some(new Set([1, 2, 3, 2, 1]), x => x >= 3), true); assert.strictEqual(some((function*() { yield* [1, 2, 3, 2, 1]; })(), x => x >= 3), true); assert.strictEqual(some(Uint8Array.of(1, 2, 3, 2, 1), x => x >= 3), true); }); -test("some(values, test) enforces that test is a function", () => { +it("some(values, test) enforces that test is a function", () => { assert.throws(() => some([]), TypeError); }); -test("some(values, test) enforces that values is iterable", () => { +it("some(values, test) enforces that values is iterable", () => { assert.throws(() => some({}, () => true), TypeError); }); -test("some(values, test) passes test (value, index, values)", () => { +it("some(values, test) passes test (value, index, values)", () => { const calls = []; const values = new Set([5, 4, 3, 2, 1]); some(values, function() { calls.push([this, ...arguments]); }); @@ -38,7 +38,7 @@ test("some(values, test) passes test (value, index, values)", () => { ]); }); -test("some(values, test) short-circuts when test returns truthy", () => { +it("some(values, test) short-circuts when test returns truthy", () => { let calls = 0; assert.strictEqual(some([1, 2, 3], x => (++calls, x >= 2)), true); assert.strictEqual(calls, 2); @@ -46,6 +46,6 @@ test("some(values, test) short-circuts when test returns truthy", () => { assert.strictEqual(calls, 4); }); -test("some(values, test) does not skip sparse elements", () => { +it("some(values, test) does not skip sparse elements", () => { assert.deepStrictEqual(some([, 1, 2,, ], x => x === undefined), true); }); diff --git a/test/sort-test.js b/test/sort-test.js index 4bedde80..cbbfec27 100644 --- a/test/sort-test.js +++ b/test/sort-test.js @@ -1,14 +1,14 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {ascending, descending, sort} from "../src/index.js"; -test("sort(values) returns a sorted copy", () => { +it("sort(values) returns a sorted copy", () => { const input = [1, 3, 2, 5, 4]; assert.deepStrictEqual(sort(input), [1, 2, 3, 4, 5]); assert.deepStrictEqual(input, [1, 3, 2, 5, 4]); // does not mutate }); -test("sort(values) defaults to ascending, not lexicographic", () => { +it("sort(values) defaults to ascending, not lexicographic", () => { const input = [1, "10", 2]; assert.deepStrictEqual(sort(input), [1, 2, "10"]); }); @@ -16,13 +16,13 @@ test("sort(values) defaults to ascending, not lexicographic", () => { // Per ECMAScript specification §23.1.3.27.1, undefined values are not passed to // the comparator; they are always put at the end of the sorted array. // https://262.ecma-international.org/12.0/#sec-sortcompare -test("sort(values) puts non-orderable values last, followed by undefined", () => { +it("sort(values) puts non-orderable values last, followed by undefined", () => { const date = new Date(NaN); const input = [undefined, 1, null, 0, NaN, "10", date, 2]; assert.deepStrictEqual(sort(input), [0, 1, 2, "10", null, NaN, date, undefined]); }); -test("sort(values, comparator) puts non-orderable values last, followed by undefined", () => { +it("sort(values, comparator) puts non-orderable values last, followed by undefined", () => { const date = new Date(NaN); const input = [undefined, 1, null, 0, NaN, "10", date, 2]; assert.deepStrictEqual(sort(input, ascending), [0, 1, 2, "10", null, NaN, date, undefined]); @@ -30,46 +30,46 @@ test("sort(values, comparator) puts non-orderable values last, followed by undef }); // However we don't implement this spec when using an accessor -test("sort(values, accessor) puts non-orderable values last", () => { +it("sort(values, accessor) puts non-orderable values last", () => { const date = new Date(NaN); const input = [undefined, 1, null, 0, NaN, "10", date, 2]; assert.deepStrictEqual(sort(input, d => d), [0, 1, 2, "10", undefined, null, NaN, date]); assert.deepStrictEqual(sort(input, d => d && -d), ["10", 2, 1, 0, undefined, null, NaN, date]); }); -test("sort(values, accessor) uses the specified accessor in natural order", () => { +it("sort(values, accessor) uses the specified accessor in natural order", () => { assert.deepStrictEqual(sort([1, 3, 2, 5, 4], d => d), [1, 2, 3, 4, 5]); assert.deepStrictEqual(sort([1, 3, 2, 5, 4], d => -d), [5, 4, 3, 2, 1]); }); -test("sort(values, ...accessors) accepts multiple accessors", () => { +it("sort(values, ...accessors) accepts multiple accessors", () => { assert.deepStrictEqual(sort([[1, 0], [2, 1], [2, 0], [1, 1], [3, 0]], ([x]) => x, ([, y]) => y), [[1, 0], [1, 1], [2, 0], [2, 1], [3, 0]]); assert.deepStrictEqual(sort([{x: 1, y: 0}, {x: 2, y: 1}, {x: 2, y: 0}, {x: 1, y: 1}, {x: 3, y: 0}], ({x}) => x, ({y}) => y), [{x: 1, y: 0}, {x: 1, y: 1}, {x: 2, y: 0}, {x: 2, y: 1}, {x: 3, y: 0}]); }); -test("sort(values, comparator) uses the specified comparator", () => { +it("sort(values, comparator) uses the specified comparator", () => { assert.deepStrictEqual(sort([1, 3, 2, 5, 4], descending), [5, 4, 3, 2, 1]); }); -test("sort(values) returns an array", () => { +it("sort(values) returns an array", () => { assert.strictEqual(Array.isArray(sort(Uint8Array.of(1, 2))), true); }); -test("sort(values) accepts an iterable", () => { +it("sort(values) accepts an iterable", () => { assert.deepStrictEqual(sort(new Set([1, 3, 2, 1, 2])), [1, 2, 3]); assert.deepStrictEqual(sort((function*() { yield* [1, 3, 2, 5, 4]; })()), [1, 2, 3, 4, 5]); assert.deepStrictEqual(sort(Uint8Array.of(1, 3, 2, 5, 4)), [1, 2, 3, 4, 5]); }); -test("sort(values) enforces that values is iterable", () => { +it("sort(values) enforces that values is iterable", () => { assert.throws(() => sort({}), {name: "TypeError", message: /is not iterable/}); }); -test("sort(values, comparator) enforces that comparator is a function", () => { +it("sort(values, comparator) enforces that comparator is a function", () => { assert.throws(() => sort([], {}), {name: "TypeError", message: /is not a function/}); assert.throws(() => sort([], null), {name: "TypeError", message: /is not a function/}); }); -test("sort(values) does not skip sparse elements", () => { +it("sort(values) does not skip sparse elements", () => { assert.deepStrictEqual(sort([, 1, 2,, ]), [1, 2, undefined, undefined]); }); diff --git a/test/subset-test.js b/test/subset-test.js index 4d7054db..b6a559da 100644 --- a/test/subset-test.js +++ b/test/subset-test.js @@ -1,14 +1,14 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {subset} from "../src/index.js"; -test("subset(values, other) returns true if values is a subset of others", () => { +it("subset(values, other) returns true if values is a subset of others", () => { assert.strictEqual(subset([2], [1, 2]), true); assert.strictEqual(subset([3, 4], [2, 3]), false); assert.strictEqual(subset([], [1]), true); }); -test("subset(values, other) performs interning", () => { +it("subset(values, other) performs interning", () => { assert.strictEqual(subset([new Date("2021-01-02")], [new Date("2021-01-01"), new Date("2021-01-02")]), true); assert.strictEqual(subset([new Date("2021-01-03"), new Date("2021-01-04")], [new Date("2021-01-02"), new Date("2021-01-03")]), false); assert.strictEqual(subset([], [new Date("2021-01-01")]), true); diff --git a/test/sum-test.js b/test/sum-test.js index 08316219..492f9745 100644 --- a/test/sum-test.js +++ b/test/sum-test.js @@ -1,15 +1,15 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {sum} from "../src/index.js"; -test("sum(array) returns the sum of the specified numbers", () => { +it("sum(array) returns the sum of the specified numbers", () => { assert.strictEqual(sum([1]), 1); assert.strictEqual(sum([5, 1, 2, 3, 4]), 15); assert.strictEqual(sum([20, 3]), 23); assert.strictEqual(sum([3, 20]), 23); }); -test("sum(array) observes values that can be coerced to numbers", () => { +it("sum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", "3"]), 23); assert.strictEqual(sum(["3", "20"]), 23); assert.strictEqual(sum(["3", 20]), 23); @@ -18,18 +18,18 @@ test("sum(array) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", 3]), 23); }); -test("sum(array) ignores non-numeric values", () => { +it("sum(array) ignores non-numeric values", () => { assert.strictEqual(sum(["a", "b", "c"]), 0); assert.strictEqual(sum(["a", 1, "2"]), 3); }); -test("sum(array) ignores null, undefined and NaN", () => { +it("sum(array) ignores null, undefined and NaN", () => { assert.strictEqual(sum([NaN, 1, 2, 3, 4, 5]), 15); assert.strictEqual(sum([1, 2, 3, 4, 5, NaN]), 15); assert.strictEqual(sum([10, null, 3, undefined, 5, NaN]), 18); }); -test("sum(array) returns zero if there are no numbers", () => { +it("sum(array) returns zero if there are no numbers", () => { assert.strictEqual(sum([]), 0); assert.strictEqual(sum([NaN]), 0); assert.strictEqual(sum([undefined]), 0); @@ -37,14 +37,14 @@ test("sum(array) returns zero if there are no numbers", () => { assert.strictEqual(sum([undefined, NaN, {}]), 0); }); -test("sum(array, f) returns the sum of the specified numbers", () => { +it("sum(array, f) returns the sum of the specified numbers", () => { assert.strictEqual(sum([1].map(box), unbox), 1); assert.strictEqual(sum([5, 1, 2, 3, 4].map(box), unbox), 15); assert.strictEqual(sum([20, 3].map(box), unbox), 23); assert.strictEqual(sum([3, 20].map(box), unbox), 23); }); -test("sum(array, f) observes values that can be coerced to numbers", () => { +it("sum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", "3"].map(box), unbox), 23); assert.strictEqual(sum(["3", "20"].map(box), unbox), 23); assert.strictEqual(sum(["3", 20].map(box), unbox), 23); @@ -53,18 +53,18 @@ test("sum(array, f) observes values that can be coerced to numbers", () => { assert.strictEqual(sum(["20", 3].map(box), unbox), 23); }); -test("sum(array, f) ignores non-numeric values", () => { +it("sum(array, f) ignores non-numeric values", () => { assert.strictEqual(sum(["a", "b", "c"].map(box), unbox), 0); assert.strictEqual(sum(["a", 1, "2"].map(box), unbox), 3); }); -test("sum(array, f) ignores null, undefined and NaN", () => { +it("sum(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(sum([NaN, 1, 2, 3, 4, 5].map(box), unbox), 15); assert.strictEqual(sum([1, 2, 3, 4, 5, NaN].map(box), unbox), 15); assert.strictEqual(sum([10, null, 3, undefined, 5, NaN].map(box), unbox), 18); }); -test("sum(array, f) returns zero if there are no numbers", () => { +it("sum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(sum([].map(box), unbox), 0); assert.strictEqual(sum([NaN].map(box), unbox), 0); assert.strictEqual(sum([undefined].map(box), unbox), 0); @@ -72,14 +72,14 @@ test("sum(array, f) returns zero if there are no numbers", () => { assert.strictEqual(sum([undefined, NaN, {}].map(box), unbox), 0); }); -test("sum(array, f) passes the accessor d, i, and array", () => { +it("sum(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; sum(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("sum(array, f) uses the undefined context", () => { +it("sum(array, f) uses the undefined context", () => { const results = []; sum([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/superset-test.js b/test/superset-test.js index aae1f235..c630be9d 100644 --- a/test/superset-test.js +++ b/test/superset-test.js @@ -1,22 +1,22 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {superset} from "../src/index.js"; -test("superset(values, other) returns true if values is a superset of others", () => { +it("superset(values, other) returns true if values is a superset of others", () => { assert.strictEqual(superset([1, 2], [2]), true); assert.strictEqual(superset([2, 3], [3, 4]), false); assert.strictEqual(superset([1], []), true); }); -test("superset(values, other) allows values to be infinite", () => { +it("superset(values, other) allows values to be infinite", () => { assert.strictEqual(superset(odds(), [1, 3, 5]), true); }); -test("superset(values, other) allows other to be infinite", () => { +it("superset(values, other) allows other to be infinite", () => { assert.strictEqual(superset([1, 3, 5], repeat(1, 3, 2)), false); }); -test("superset(values, other) performs interning", () => { +it("superset(values, other) performs interning", () => { assert.strictEqual(superset([new Date("2021-01-01"), new Date("2021-01-02")], [new Date("2021-01-02")]), true); assert.strictEqual(superset([new Date("2021-01-02"), new Date("2021-01-03")], [new Date("2021-01-03"), new Date("2021-01-04")]), false); assert.strictEqual(superset([new Date("2021-01-01")], []), true); diff --git a/test/threshold/freedmanDiaconic-test.js b/test/threshold/freedmanDiaconic-test.js index 949c5bd7..225f2d23 100644 --- a/test/threshold/freedmanDiaconic-test.js +++ b/test/threshold/freedmanDiaconic-test.js @@ -1,19 +1,19 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {thresholdFreedmanDiaconis} from "../../src/index.js"; -test("thresholdFreedmanDiaconis(values, min, max) returns the expected result", () => { +it("thresholdFreedmanDiaconis(values, min, max) returns the expected result", () => { assert.strictEqual(thresholdFreedmanDiaconis([4, 3, 2, 1, NaN], 1, 4), 2); }); -test("thresholdFreedmanDiaconis(values, min, max) handles values with zero deviation", () => { +it("thresholdFreedmanDiaconis(values, min, max) handles values with zero deviation", () => { assert.strictEqual(thresholdFreedmanDiaconis([1, 1, 1, 1], 1, 4), 1); }); -test("thresholdFreedmanDiaconis(values, min, max) handles single-value arrays", () => { +it("thresholdFreedmanDiaconis(values, min, max) handles single-value arrays", () => { assert.strictEqual(thresholdFreedmanDiaconis([1], 1, 4), 1); }); -test("thresholdFreedmanDiaconis(values, min, max) handles empty arrays", () => { +it("thresholdFreedmanDiaconis(values, min, max) handles empty arrays", () => { assert.strictEqual(thresholdFreedmanDiaconis([], 1, 4), 1); }); diff --git a/test/threshold/scott-test.js b/test/threshold/scott-test.js index 6e112569..1fcb2b38 100644 --- a/test/threshold/scott-test.js +++ b/test/threshold/scott-test.js @@ -1,19 +1,19 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {thresholdScott} from "../../src/index.js"; -test("thresholdScott(values, min, max) returns the expected result", () => { +it("thresholdScott(values, min, max) returns the expected result", () => { assert.strictEqual(thresholdScott([4, 3, 2, 1, NaN], 1, 4), 2); }); -test("thresholdScott(values, min, max) handles values with zero deviation", () => { +it("thresholdScott(values, min, max) handles values with zero deviation", () => { assert.strictEqual(thresholdScott([1, 1, 1, 1], 1, 4), 1); }); -test("thresholdScott(values, min, max) handles single-value arrays", () => { +it("thresholdScott(values, min, max) handles single-value arrays", () => { assert.strictEqual(thresholdScott([1], 1, 4), 1); }); -test("thresholdScott(values, min, max) handles empty arrays", () => { +it("thresholdScott(values, min, max) handles empty arrays", () => { assert.strictEqual(thresholdScott([], 1, 4), 1); }); diff --git a/test/threshold/sturges-test.js b/test/threshold/sturges-test.js index 62c44e45..6492800b 100644 --- a/test/threshold/sturges-test.js +++ b/test/threshold/sturges-test.js @@ -1,12 +1,12 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {thresholdSturges} from "../../src/index.js"; -test("thresholdSturges(values, min, max) returns the expected result", () => { +it("thresholdSturges(values, min, max) returns the expected result", () => { assert.strictEqual(thresholdSturges([4, 3, 2, 1, NaN], 1, 4), 3); assert.strictEqual(thresholdSturges([1], 1, 4), 1); }); -test("thresholdSturges(values, min, max) handles empty arrays", () => { +it("thresholdSturges(values, min, max) handles empty arrays", () => { assert.strictEqual(thresholdSturges([], 1, 4), 1); }); diff --git a/test/tickIncrement-test.js b/test/tickIncrement-test.js index b8b69ec0..63704eae 100644 --- a/test/tickIncrement-test.js +++ b/test/tickIncrement-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {tickIncrement} from "../src/index.js"; -test("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () => { +it("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickIncrement(NaN, 1, 1))); assert(isNaN(tickIncrement(0, NaN, 1))); assert(isNaN(tickIncrement(0, 1, NaN))); @@ -12,7 +12,7 @@ test("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () assert(isNaN(tickIncrement(NaN, NaN, NaN))); }); -test("tickIncrement(start, stop, count) returns NaN or -Infinity if start === stop", () => { +it("tickIncrement(start, stop, count) returns NaN or -Infinity if start === stop", () => { assert(isNaN(tickIncrement(1, 1, -1))); assert(isNaN(tickIncrement(1, 1, 0))); assert(isNaN(tickIncrement(1, 1, NaN))); @@ -20,16 +20,16 @@ test("tickIncrement(start, stop, count) returns NaN or -Infinity if start === st assert.strictEqual(tickIncrement(1, 1, 10), -Infinity); }); -test("tickIncrement(start, stop, count) returns 0 or Infinity if count is not positive", () => { +it("tickIncrement(start, stop, count) returns 0 or Infinity if count is not positive", () => { assert.strictEqual(tickIncrement(0, 1, -1), Infinity); assert.strictEqual(tickIncrement(0, 1, 0), Infinity); }); -test("tickIncrement(start, stop, count) returns -Infinity if count is infinity", () => { +it("tickIncrement(start, stop, count) returns -Infinity if count is infinity", () => { assert.strictEqual(tickIncrement(0, 1, Infinity), -Infinity); }); -test("tickIncrement(start, stop, count) returns approximately count + 1 tickIncrement when start < stop", () => { +it("tickIncrement(start, stop, count) returns approximately count + 1 tickIncrement when start < stop", () => { assert.strictEqual(tickIncrement( 0, 1, 10), -10); assert.strictEqual(tickIncrement( 0, 1, 9), -10); assert.strictEqual(tickIncrement( 0, 1, 8), -10); diff --git a/test/tickStep-test.js b/test/tickStep-test.js index e4456058..5c51e079 100644 --- a/test/tickStep-test.js +++ b/test/tickStep-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {tickStep} from "../src/index.js"; -test("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { +it("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickStep(NaN, 1, 1))); assert(isNaN(tickStep(0, NaN, 1))); assert(isNaN(tickStep(0, 1, NaN))); @@ -12,7 +12,7 @@ test("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickStep(NaN, NaN, NaN))); }); -test("tickStep(start, stop, count) returns NaN or 0 if start === stop", () => { +it("tickStep(start, stop, count) returns NaN or 0 if start === stop", () => { assert(isNaN(tickStep(1, 1, -1))); assert(isNaN(tickStep(1, 1, 0))); assert(isNaN(tickStep(1, 1, NaN))); @@ -20,16 +20,16 @@ test("tickStep(start, stop, count) returns NaN or 0 if start === stop", () => { assert.strictEqual(tickStep(1, 1, 10), 0); }); -test("tickStep(start, stop, count) returns 0 or Infinity if count is not positive", () => { +it("tickStep(start, stop, count) returns 0 or Infinity if count is not positive", () => { assert.strictEqual(tickStep(0, 1, -1), Infinity); assert.strictEqual(tickStep(0, 1, 0), Infinity); }); -test("tickStep(start, stop, count) returns 0 if count is infinity", () => { +it("tickStep(start, stop, count) returns 0 if count is infinity", () => { assert.strictEqual(tickStep(0, 1, Infinity), 0); }); -test("tickStep(start, stop, count) returns approximately count + 1 tickStep when start < stop", () => { +it("tickStep(start, stop, count) returns approximately count + 1 tickStep when start < stop", () => { assert.strictEqual(tickStep( 0, 1, 10), 0.1); assert.strictEqual(tickStep( 0, 1, 9), 0.1); assert.strictEqual(tickStep( 0, 1, 8), 0.1); @@ -62,7 +62,7 @@ test("tickStep(start, stop, count) returns approximately count + 1 tickStep when assert.strictEqual(tickStep(-10, 10, 1), 20); }); -test("tickStep(start, stop, count) returns -tickStep(stop, start, count)", () => { +it("tickStep(start, stop, count) returns -tickStep(stop, start, count)", () => { assert.strictEqual(tickStep( 0, 1, 10), -tickStep( 1, 0, 10)); assert.strictEqual(tickStep( 0, 1, 9), -tickStep( 1, 0, 9)); assert.strictEqual(tickStep( 0, 1, 8), -tickStep( 1, 0, 8)); diff --git a/test/ticks-test.js b/test/ticks-test.js index 3117aaec..c70d5ec2 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,8 +1,8 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {ticks} from "../src/index.js"; -test("ticks(start, stop, count) returns the empty array if any argument is NaN", () => { +it("ticks(start, stop, count) returns the empty array if any argument is NaN", () => { assert.deepStrictEqual(ticks(NaN, 1, 1), []); assert.deepStrictEqual(ticks(0, NaN, 1), []); assert.deepStrictEqual(ticks(0, 1, NaN), []); @@ -12,36 +12,36 @@ test("ticks(start, stop, count) returns the empty array if any argument is NaN", assert.deepStrictEqual(ticks(NaN, NaN, NaN), []); }); -test("ticks(start, stop, count) returns the empty array if start === stop and count is non-positive", () => { +it("ticks(start, stop, count) returns the empty array if start === stop and count is non-positive", () => { assert.deepStrictEqual(ticks(1, 1, -1), []); assert.deepStrictEqual(ticks(1, 1, 0), []); assert.deepStrictEqual(ticks(1, 1, NaN), []); }); -test("ticks(start, stop, count) returns the empty array if start === stop and count is positive", () => { +it("ticks(start, stop, count) returns the empty array if start === stop and count is positive", () => { assert.deepStrictEqual(ticks(1, 1, 1), [1]); assert.deepStrictEqual(ticks(1, 1, 10), [1]); }); -test("ticks(start, stop, count) returns the empty array if count is not positive", () => { +it("ticks(start, stop, count) returns the empty array if count is not positive", () => { assert.deepStrictEqual(ticks(0, 1, 0), []); assert.deepStrictEqual(ticks(0, 1, -1), []); assert.deepStrictEqual(ticks(0, 1, NaN), []); }); -test("ticks(start, stop, count) returns the empty array if count is infinity", () => { +it("ticks(start, stop, count) returns the empty array if count is infinity", () => { assert.deepStrictEqual(ticks(0, 1, Infinity), []); }); -test("ticks(start, stop, count) does not include negative zero", () => { +it("ticks(start, stop, count) does not include negative zero", () => { assert.strictEqual(1 / ticks(-1, 0, 5).pop(), Infinity); }); -test("ticks(start, stop, count) remains within the domain", () => { +it("ticks(start, stop, count) remains within the domain", () => { assert.deepStrictEqual(ticks(0, 2.2, 3), [0, 1, 2]); }); -test("ticks(start, stop, count) returns approximately count + 1 ticks when start < stop", () => { +it("ticks(start, stop, count) returns approximately count + 1 ticks when start < stop", () => { assert.deepStrictEqual(ticks( 0, 1, 10), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(ticks( 0, 1, 9), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); assert.deepStrictEqual(ticks( 0, 1, 8), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]); @@ -74,7 +74,7 @@ test("ticks(start, stop, count) returns approximately count + 1 ticks when start assert.deepStrictEqual(ticks(-10, 10, 1), [ 0, ]); }); -test("ticks(start, stop, count) returns the reverse of ticks(stop, start, count)", () => { +it("ticks(start, stop, count) returns the reverse of ticks(stop, start, count)", () => { assert.deepStrictEqual(ticks( 1, 0, 10), ticks( 0, 1, 10).reverse()); assert.deepStrictEqual(ticks( 1, 0, 9), ticks( 0, 1, 9).reverse()); assert.deepStrictEqual(ticks( 1, 0, 8), ticks( 0, 1, 8).reverse()); @@ -107,11 +107,11 @@ test("ticks(start, stop, count) returns the reverse of ticks(stop, start, count) assert.deepStrictEqual(ticks(10, -10, 1), ticks(-10, 10, 1).reverse()); }); -test("ticks(start, stop, count) handles precision problems", () => { +it("ticks(start, stop, count) handles precision problems", () => { assert.deepStrictEqual(ticks(0.98, 1.14, 10), [0.98, 1, 1.02, 1.04, 1.06, 1.08, 1.1, 1.12, 1.14]); }); -test("ticks(start, stop, count) tries to return at least one tick if count >= 0.5", () => { +it("ticks(start, stop, count) tries to return at least one tick if count >= 0.5", () => { assert.deepStrictEqual(ticks(1, 364, 0.1), []); assert.deepStrictEqual(ticks(1, 364, 0.499), []); assert.deepStrictEqual(ticks(1, 364, 0.5), [200]); diff --git a/test/transpose-test.js b/test/transpose-test.js index 437be4d9..23edca0f 100644 --- a/test/transpose-test.js +++ b/test/transpose-test.js @@ -1,30 +1,30 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {transpose} from "../src/index.js"; -test("transpose([]) and transpose([[]]) return an empty array", () => { +it("transpose([]) and transpose([[]]) return an empty array", () => { assert.deepStrictEqual(transpose([]), []); assert.deepStrictEqual(transpose([[]]), []); }); -test("transpose([[a, b, …]]) returns [[a], [b], …]", () => { +it("transpose([[a, b, …]]) returns [[a], [b], …]", () => { assert.deepStrictEqual(transpose([[1, 2, 3, 4, 5]]), [[1], [2], [3], [4], [5]]); }); -test("transpose([[a1, b1, …], [a2, b2, …]]) returns [[a1, a2], [b1, b2], …]", () => { +it("transpose([[a1, b1, …], [a2, b2, …]]) returns [[a1, a2], [b1, b2], …]", () => { assert.deepStrictEqual(transpose([[1, 2], [3, 4]]), [[1, 3], [2, 4]]); assert.deepStrictEqual(transpose([[1, 2, 3, 4, 5], [2, 4, 6, 8, 10]]), [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10]]); }); -test("transpose([[a1, b1, …], [a2, b2, …], [a3, b3, …]]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { +it("transpose([[a1, b1, …], [a2, b2, …], [a3, b3, …]]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { assert.deepStrictEqual(transpose([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), [[1, 4, 7], [2, 5, 8], [3, 6, 9]]); }); -test("transpose(…) ignores extra elements given an irregular matrix", () => { +it("transpose(…) ignores extra elements given an irregular matrix", () => { assert.deepStrictEqual(transpose([[1, 2], [3, 4], [5, 6, 7]]), [[1, 3, 5], [2, 4, 6]]); }); -test("transpose(…) returns a copy", () => { +it("transpose(…) returns a copy", () => { const matrix = [[1, 2], [3, 4]]; const t = transpose(matrix); matrix[0][0] = matrix[0][1] = matrix[1][0] = matrix[1][1] = 0; diff --git a/test/union-test.js b/test/union-test.js index a06165af..dfbdc282 100644 --- a/test/union-test.js +++ b/test/union-test.js @@ -1,25 +1,25 @@ -import {test} from "vitest"; +import {it} from "vitest"; import {union} from "../src/index.js"; import {assertSetEqual} from "./asserts.js"; -test("union(values) returns a set of values", () => { +it("union(values) returns a set of values", () => { assertSetEqual(union([1, 2, 3, 2, 1]), [1, 2, 3]); }); -test("union(values, other) returns a set of values", () => { +it("union(values, other) returns a set of values", () => { assertSetEqual(union([1, 2], [2, 3, 1]), [1, 2, 3]); }); -test("union(...values) returns a set of values", () => { +it("union(...values) returns a set of values", () => { assertSetEqual(union([1], [2], [2, 3], [1]), [1, 2, 3]); }); -test("union(...values) accepts iterables", () => { +it("union(...values) accepts iterables", () => { assertSetEqual(union(new Set([1, 2, 3])), [1, 2, 3]); assertSetEqual(union(Uint8Array.of(1, 2, 3)), [1, 2, 3]); }); -test("union(...values) performs interning", () => { +it("union(...values) performs interning", () => { assertSetEqual(union([new Date("2021-01-01"), new Date("2021-01-01"), new Date("2021-01-02")]), [new Date("2021-01-01"), new Date("2021-01-02")]); assertSetEqual(union([new Date("2021-01-01"), new Date("2021-01-03")], [new Date("2021-01-01"), new Date("2021-01-02")]), [new Date("2021-01-01"), new Date("2021-01-02"), new Date("2021-01-03")]); }); diff --git a/test/variance-test.js b/test/variance-test.js index f529cfd4..d57c6d0f 100644 --- a/test/variance-test.js +++ b/test/variance-test.js @@ -1,25 +1,25 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {variance} from "../src/index.js"; -test("variance(array) returns the variance of the specified numbers", () => { +it("variance(array) returns the variance of the specified numbers", () => { assert.strictEqual(variance([5, 1, 2, 3, 4]), 2.5); assert.strictEqual(variance([20, 3]), 144.5); assert.strictEqual(variance([3, 20]), 144.5); }); -test("variance(array) ignores null, undefined and NaN", () => { +it("variance(array) ignores null, undefined and NaN", () => { assert.strictEqual(variance([NaN, 1, 2, 3, 4, 5]), 2.5); assert.strictEqual(variance([1, 2, 3, 4, 5, NaN]), 2.5); assert.strictEqual(variance([10, null, 3, undefined, 5, NaN]), 13); }); -test("variance(array) can handle large numbers without overflowing", () => { +it("variance(array) can handle large numbers without overflowing", () => { assert.strictEqual(variance([Number.MAX_VALUE, Number.MAX_VALUE]), 0); assert.strictEqual(variance([-Number.MAX_VALUE, -Number.MAX_VALUE]), 0); }); -test("variance(array) returns undefined if the array has fewer than two numbers", () => { +it("variance(array) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(variance([1]), undefined); assert.strictEqual(variance([]), undefined); assert.strictEqual(variance([null]), undefined); @@ -28,24 +28,24 @@ test("variance(array) returns undefined if the array has fewer than two numbers" assert.strictEqual(variance([NaN, NaN]), undefined); }); -test("variance(array, f) returns the variance of the specified numbers", () => { +it("variance(array, f) returns the variance of the specified numbers", () => { assert.strictEqual(variance([5, 1, 2, 3, 4].map(box), unbox), 2.5); assert.strictEqual(variance([20, 3].map(box), unbox), 144.5); assert.strictEqual(variance([3, 20].map(box), unbox), 144.5); }); -test("variance(array, f) ignores null, undefined and NaN", () => { +it("variance(array, f) ignores null, undefined and NaN", () => { assert.strictEqual(variance([NaN, 1, 2, 3, 4, 5].map(box), unbox), 2.5); assert.strictEqual(variance([1, 2, 3, 4, 5, NaN].map(box), unbox), 2.5); assert.strictEqual(variance([10, null, 3, undefined, 5, NaN].map(box), unbox), 13); }); -test("variance(array, f) can handle large numbers without overflowing", () => { +it("variance(array, f) can handle large numbers without overflowing", () => { assert.strictEqual(variance([Number.MAX_VALUE, Number.MAX_VALUE].map(box), unbox), 0); assert.strictEqual(variance([-Number.MAX_VALUE, -Number.MAX_VALUE].map(box), unbox), 0); }); -test("variance(array, f) returns undefined if the array has fewer than two numbers", () => { +it("variance(array, f) returns undefined if the array has fewer than two numbers", () => { assert.strictEqual(variance([1].map(box), unbox), undefined); assert.strictEqual(variance([].map(box), unbox), undefined); assert.strictEqual(variance([null].map(box), unbox), undefined); @@ -54,14 +54,14 @@ test("variance(array, f) returns undefined if the array has fewer than two numbe assert.strictEqual(variance([NaN, NaN].map(box), unbox), undefined); }); -test("variance(array, f) passes the accessor d, i, and array", () => { +it("variance(array, f) passes the accessor d, i, and array", () => { const results = []; const array = ["a", "b", "c"]; variance(array, (d, i, array) => results.push([d, i, array])); assert.deepStrictEqual(results, [["a", 0, array], ["b", 1, array], ["c", 2, array]]); }); -test("variance(array, f) uses the undefined context", () => { +it("variance(array, f) uses the undefined context", () => { const results = []; variance([1, 2], function() { results.push(this); }); assert.deepStrictEqual(results, [undefined, undefined]); diff --git a/test/zip-test.js b/test/zip-test.js index 1ac93136..2f890520 100644 --- a/test/zip-test.js +++ b/test/zip-test.js @@ -1,25 +1,25 @@ -import {test} from "vitest"; +import {it} from "vitest"; import assert from "assert"; import {zip} from "../src/index.js"; -test("zip() and zip([]) return an empty array", () => { +it("zip() and zip([]) return an empty array", () => { assert.deepStrictEqual(zip(), []); assert.deepStrictEqual(zip([]), []); }); -test("zip([a, b, …]) returns [[a], [b], …]", () => { +it("zip([a, b, …]) returns [[a], [b], …]", () => { assert.deepStrictEqual(zip([1, 2, 3, 4, 5]), [[1], [2], [3], [4], [5]]); }); -test("zip([a1, b1, …], [a2, b2, …]) returns [[a1, a2], [b1, b2], …]", () => { +it("zip([a1, b1, …], [a2, b2, …]) returns [[a1, a2], [b1, b2], …]", () => { assert.deepStrictEqual(zip([1, 2], [3, 4]), [[1, 3], [2, 4]]); assert.deepStrictEqual(zip([1, 2, 3, 4, 5], [2, 4, 6, 8, 10]), [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10]]); }); -test("zip([a1, b1, …], [a2, b2, …], [a3, b3, …]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { +it("zip([a1, b1, …], [a2, b2, …], [a3, b3, …]) returns [[a1, a2, a3], [b1, b2, b3], …]", () => { assert.deepStrictEqual(zip([1, 2, 3], [4, 5, 6], [7, 8, 9]), [[1, 4, 7], [2, 5, 8], [3, 6, 9]]); }); -test("zip(…) ignores extra elements given an irregular matrix", () => { +it("zip(…) ignores extra elements given an irregular matrix", () => { assert.deepStrictEqual(zip([1, 2], [3, 4], [5, 6, 7]), [[1, 3, 5], [2, 4, 6]]); }); From ef52564acc676fcf3c2b29b791d1dce2569e3299 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:21:53 -0800 Subject: [PATCH 06/13] node:assert --- test/ascending-test.js | 2 +- test/asserts.js | 2 +- test/bin-test.js | 2 +- test/bisect-test.js | 2 +- test/bisector-test.js | 2 +- test/blur-test.js | 2 +- test/count-test.js | 2 +- test/cross-test.js | 2 +- test/cumsum-test.js | 2 +- test/descending-test.js | 2 +- test/deviation-test.js | 2 +- test/disjoint-test.js | 2 +- test/every-test.js | 2 +- test/extent-test.js | 2 +- test/fcumsum-test.js | 2 +- test/filter-test.js | 2 +- test/flatGroup-test.js | 2 +- test/flatRollup-test.js | 2 +- test/fsum-test.js | 2 +- test/greatest-test.js | 2 +- test/greatestIndex-test.js | 2 +- test/group-test.js | 2 +- test/groupSort-test.js | 2 +- test/groups-test.js | 2 +- test/index-test.js | 2 +- test/least-test.js | 2 +- test/leastIndex-test.js | 2 +- test/map-test.js | 2 +- test/max-test.js | 2 +- test/maxIndex-test.js | 2 +- test/mean-test.js | 2 +- test/median-test.js | 2 +- test/merge-test.js | 2 +- test/min-test.js | 2 +- test/minIndex-test.js | 2 +- test/mode-test.js | 2 +- test/nice-test.js | 2 +- test/pairs-test.js | 2 +- test/permute-test.js | 2 +- test/quantile-test.js | 2 +- test/quickselect-test.js | 2 +- test/range-test.js | 2 +- test/rank-test.js | 2 +- test/reduce-test.js | 2 +- test/reverse-test.js | 2 +- test/rollup-test.js | 2 +- test/rollups-test.js | 2 +- test/scan-test.js | 2 +- test/shuffle-test.js | 2 +- test/some-test.js | 2 +- test/sort-test.js | 2 +- test/subset-test.js | 2 +- test/sum-test.js | 2 +- test/superset-test.js | 2 +- test/threshold/freedmanDiaconic-test.js | 2 +- test/threshold/scott-test.js | 2 +- test/threshold/sturges-test.js | 2 +- test/tickIncrement-test.js | 2 +- test/tickStep-test.js | 2 +- test/ticks-test.js | 2 +- test/transpose-test.js | 2 +- test/variance-test.js | 2 +- test/zip-test.js | 2 +- 63 files changed, 63 insertions(+), 63 deletions(-) diff --git a/test/ascending-test.js b/test/ascending-test.js index 54cfe8cd..b3237d8e 100644 --- a/test/ascending-test.js +++ b/test/ascending-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {ascending} from "../src/index.js"; it("ascending(a, b) returns a negative number if a < b", () => { diff --git a/test/asserts.js b/test/asserts.js index 4a3c4f8f..50897f20 100644 --- a/test/asserts.js +++ b/test/asserts.js @@ -1,4 +1,4 @@ -import assert from "assert"; +import assert from "node:assert"; import {InternSet} from "internmap"; export function assertSetEqual(actual, expected) { diff --git a/test/bin-test.js b/test/bin-test.js index 311704b8..fdb00685 100644 --- a/test/bin-test.js +++ b/test/bin-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {csvParse} from "d3-dsv"; import {readFile} from "fs/promises"; import {bin, extent, histogram, thresholdSturges, ticks} from "../src/index.js"; diff --git a/test/bisect-test.js b/test/bisect-test.js index 6123e9db..f57c4862 100644 --- a/test/bisect-test.js +++ b/test/bisect-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {bisect, bisectLeft, bisectRight} from "../src/index.js"; it("bisect is an alias for bisectRight", () => { diff --git a/test/bisector-test.js b/test/bisector-test.js index 8df16640..cbd6f273 100644 --- a/test/bisector-test.js +++ b/test/bisector-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {ascending, bisector} from "../src/index.js"; it("bisector(comparator).left(array, value) returns the index of an exact match", () => { diff --git a/test/blur-test.js b/test/blur-test.js index 1427b77c..458267dc 100644 --- a/test/blur-test.js +++ b/test/blur-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {blur, blur2} from "../src/index.js"; it("blur(values, r) returns values", () => { diff --git a/test/count-test.js b/test/count-test.js index 24822703..c8273cef 100644 --- a/test/count-test.js +++ b/test/count-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {count} from "../src/index.js"; it("count() accepts an iterable", () => { diff --git a/test/cross-test.js b/test/cross-test.js index 83fdf235..16b7769c 100644 --- a/test/cross-test.js +++ b/test/cross-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {cross} from "../src/index.js"; it("cross() returns an empty array", () => { diff --git a/test/cumsum-test.js b/test/cumsum-test.js index 69417b68..a4a63d82 100644 --- a/test/cumsum-test.js +++ b/test/cumsum-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {cumsum} from "../src/index.js"; it("cumsum(array) returns the cumulative sum of the specified numbers", () => { diff --git a/test/descending-test.js b/test/descending-test.js index 513ed06a..2c14f1aa 100644 --- a/test/descending-test.js +++ b/test/descending-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {descending} from "../src/index.js"; it("descending(a, b) returns a positive number if a < b", () => { diff --git a/test/deviation-test.js b/test/deviation-test.js index 6e9adf1e..8f1bcc12 100644 --- a/test/deviation-test.js +++ b/test/deviation-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {deviation} from "../src/index.js"; it("deviation(array) returns the standard deviation of the specified numbers", () => { diff --git a/test/disjoint-test.js b/test/disjoint-test.js index 7b2dc74b..ccff3f7a 100644 --- a/test/disjoint-test.js +++ b/test/disjoint-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {disjoint} from "../src/index.js"; it("disjoint(values, other) returns true if sets are disjoint", () => { diff --git a/test/every-test.js b/test/every-test.js index 1737181d..eb9a9d98 100644 --- a/test/every-test.js +++ b/test/every-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {every} from "../src/index.js"; it("every(values, test) returns true if all tests pass", () => { diff --git a/test/extent-test.js b/test/extent-test.js index 43149997..74846925 100644 --- a/test/extent-test.js +++ b/test/extent-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {extent} from "../src/index.js"; it("extent(array) returns the least and greatest numeric values for numbers", () => { diff --git a/test/fcumsum-test.js b/test/fcumsum-test.js index dde008ea..c7bb9b5b 100644 --- a/test/fcumsum-test.js +++ b/test/fcumsum-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {cumsum, fcumsum} from "../src/index.js"; it("fcumsum(array) returns a Float64Array of the expected length", () => { diff --git a/test/filter-test.js b/test/filter-test.js index f2d6cc76..8cc1b091 100644 --- a/test/filter-test.js +++ b/test/filter-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import * as d3 from "../src/index.js"; it("filter(values, test) returns the values that pass the test", () => { diff --git a/test/flatGroup-test.js b/test/flatGroup-test.js index 73727bf1..e2b4d866 100644 --- a/test/flatGroup-test.js +++ b/test/flatGroup-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {flatGroup} from "../src/index.js"; const data = [ diff --git a/test/flatRollup-test.js b/test/flatRollup-test.js index c1849aa8..97d6e40c 100644 --- a/test/flatRollup-test.js +++ b/test/flatRollup-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {flatRollup} from "../src/index.js"; const data = [ diff --git a/test/fsum-test.js b/test/fsum-test.js index e7fb3b10..670d3db1 100644 --- a/test/fsum-test.js +++ b/test/fsum-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {Adder, fsum} from "../src/index.js"; it("new Adder() returns an Adder", () => { diff --git a/test/greatest-test.js b/test/greatest-test.js index 2a34c365..26426085 100644 --- a/test/greatest-test.js +++ b/test/greatest-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {descending, greatest} from "../src/index.js"; it("greatest(array) compares using natural order", () => { diff --git a/test/greatestIndex-test.js b/test/greatestIndex-test.js index 5520d508..920bc110 100644 --- a/test/greatestIndex-test.js +++ b/test/greatestIndex-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {ascending, descending, greatestIndex} from "../src/index.js"; it("greatestIndex(array) compares using natural order", () => { diff --git a/test/group-test.js b/test/group-test.js index 5ac5eb77..9f9c356b 100644 --- a/test/group-test.js +++ b/test/group-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {group} from "../src/index.js"; const data = [ diff --git a/test/groupSort-test.js b/test/groupSort-test.js index 73646a50..537b1f06 100644 --- a/test/groupSort-test.js +++ b/test/groupSort-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {readFileSync} from "fs"; import {ascending, descending, groupSort, median} from "../src/index.js"; diff --git a/test/groups-test.js b/test/groups-test.js index e68e1e62..c35db73f 100644 --- a/test/groups-test.js +++ b/test/groups-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {groups} from "../src/index.js"; const data = [ diff --git a/test/index-test.js b/test/index-test.js index ee05ac4c..4ba94db2 100644 --- a/test/index-test.js +++ b/test/index-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {index, indexes} from "../src/index.js"; const data = [ diff --git a/test/least-test.js b/test/least-test.js index 66849e00..02c3c78e 100644 --- a/test/least-test.js +++ b/test/least-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {descending, least} from "../src/index.js"; it("least(array) compares using natural order", () => { diff --git a/test/leastIndex-test.js b/test/leastIndex-test.js index 4b09d844..25c5e40e 100644 --- a/test/leastIndex-test.js +++ b/test/leastIndex-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {descending, leastIndex} from "../src/index.js"; it("leastIndex(array) compares using natural order", () => { diff --git a/test/map-test.js b/test/map-test.js index 89620a63..daffe53a 100644 --- a/test/map-test.js +++ b/test/map-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {map} from "../src/index.js"; it("map(values, mapper) returns the mapped values", () => { diff --git a/test/max-test.js b/test/max-test.js index 6f4daaa5..6aafc1de 100644 --- a/test/max-test.js +++ b/test/max-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {max} from "../src/index.js"; it("max(array) returns the greatest numeric value for numbers", () => { diff --git a/test/maxIndex-test.js b/test/maxIndex-test.js index 3b87392d..f3fcff6e 100644 --- a/test/maxIndex-test.js +++ b/test/maxIndex-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {maxIndex} from "../src/index.js"; it("maxIndex(array) returns the index of the greatest numeric value for numbers", () => { diff --git a/test/mean-test.js b/test/mean-test.js index e98f14ec..19fa0dc9 100644 --- a/test/mean-test.js +++ b/test/mean-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {mean} from "../src/index.js"; import {OneTimeNumber} from "./OneTimeNumber.js"; diff --git a/test/median-test.js b/test/median-test.js index a2b475c3..9a95b590 100644 --- a/test/median-test.js +++ b/test/median-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {median, medianIndex} from "../src/index.js"; import {OneTimeNumber} from "./OneTimeNumber.js"; diff --git a/test/merge-test.js b/test/merge-test.js index 4c3ec85d..c11f7c12 100644 --- a/test/merge-test.js +++ b/test/merge-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {merge} from "../src/index.js"; it("merge(arrays) merges an array of arrays", () => { diff --git a/test/min-test.js b/test/min-test.js index 322211e0..ea0e7e1c 100644 --- a/test/min-test.js +++ b/test/min-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {min} from "../src/index.js"; it("min(array) returns the least numeric value for numbers", () => { diff --git a/test/minIndex-test.js b/test/minIndex-test.js index 94caac0f..4473cd6c 100644 --- a/test/minIndex-test.js +++ b/test/minIndex-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {minIndex} from "../src/index.js"; it("minIndex(array) returns the index of the least numeric value for numbers", () => { diff --git a/test/mode-test.js b/test/mode-test.js index d8f4b641..b742c889 100644 --- a/test/mode-test.js +++ b/test/mode-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {mode} from "../src/index.js"; it("mode(array) returns the most frequent value for numbers", () => { diff --git a/test/nice-test.js b/test/nice-test.js index ae037f94..c2fd8432 100644 --- a/test/nice-test.js +++ b/test/nice-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {nice} from "../src/index.js"; it("nice(start, stop, count) returns [start, stop] if any argument is NaN", () => { diff --git a/test/pairs-test.js b/test/pairs-test.js index 60906e38..e29283c1 100644 --- a/test/pairs-test.js +++ b/test/pairs-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {pairs} from "../src/index.js"; it("pairs(array) returns the empty array if input array has fewer than two elements", () => { diff --git a/test/permute-test.js b/test/permute-test.js index ae217e3e..f1784e39 100644 --- a/test/permute-test.js +++ b/test/permute-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {permute} from "../src/index.js"; it("permute(…) permutes according to the specified index", () => { diff --git a/test/quantile-test.js b/test/quantile-test.js index 4ec60650..db26d110 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {quantile, quantileIndex, quantileSorted} from "../src/index.js"; it("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", () => { diff --git a/test/quickselect-test.js b/test/quickselect-test.js index bdbdbd5c..e034410f 100644 --- a/test/quickselect-test.js +++ b/test/quickselect-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {quickselect} from "../src/index.js"; it("quickselect(array, k) does nothing if k is not a number", () => { diff --git a/test/range-test.js b/test/range-test.js index 36466f3a..998afa02 100644 --- a/test/range-test.js +++ b/test/range-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {range} from "../src/index.js"; it("range(stop) returns [0, 1, 2, … stop - 1]", () => { diff --git a/test/rank-test.js b/test/rank-test.js index 3849a35e..a3ddecf5 100644 --- a/test/rank-test.js +++ b/test/rank-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import ascending from "../src/ascending.js"; import descending from "../src/descending.js"; import rank from "../src/rank.js"; diff --git a/test/reduce-test.js b/test/reduce-test.js index 5b9c20ac..423d238d 100644 --- a/test/reduce-test.js +++ b/test/reduce-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {reduce} from "../src/index.js"; it("reduce(values, reducer) returns the reduced value", () => { diff --git a/test/reverse-test.js b/test/reverse-test.js index 3e000c39..6ffc11db 100644 --- a/test/reverse-test.js +++ b/test/reverse-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {reverse} from "../src/index.js"; it("reverse(values) returns a reversed copy", () => { diff --git a/test/rollup-test.js b/test/rollup-test.js index 06c0088d..f94f249d 100644 --- a/test/rollup-test.js +++ b/test/rollup-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {rollup, sum} from "../src/index.js"; const data = [ diff --git a/test/rollups-test.js b/test/rollups-test.js index edd496e6..00d325de 100644 --- a/test/rollups-test.js +++ b/test/rollups-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {rollups, sum} from "../src/index.js"; const data = [ diff --git a/test/scan-test.js b/test/scan-test.js index 8807bab6..c8e33950 100644 --- a/test/scan-test.js +++ b/test/scan-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {descending, scan} from "../src/index.js"; it("scan(array) compares using natural order", () => { diff --git a/test/shuffle-test.js b/test/shuffle-test.js index a1083568..3f74a526 100644 --- a/test/shuffle-test.js +++ b/test/shuffle-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {randomLcg} from "d3-random"; import {pairs, shuffler} from "../src/index.js"; diff --git a/test/some-test.js b/test/some-test.js index b110f3cc..5c936121 100644 --- a/test/some-test.js +++ b/test/some-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {some} from "../src/index.js"; it("some(values, test) returns true if any test passes", () => { diff --git a/test/sort-test.js b/test/sort-test.js index cbbfec27..2437b76d 100644 --- a/test/sort-test.js +++ b/test/sort-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {ascending, descending, sort} from "../src/index.js"; it("sort(values) returns a sorted copy", () => { diff --git a/test/subset-test.js b/test/subset-test.js index b6a559da..3e0d2b20 100644 --- a/test/subset-test.js +++ b/test/subset-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {subset} from "../src/index.js"; it("subset(values, other) returns true if values is a subset of others", () => { diff --git a/test/sum-test.js b/test/sum-test.js index 492f9745..a52342a0 100644 --- a/test/sum-test.js +++ b/test/sum-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {sum} from "../src/index.js"; it("sum(array) returns the sum of the specified numbers", () => { diff --git a/test/superset-test.js b/test/superset-test.js index c630be9d..75453c2e 100644 --- a/test/superset-test.js +++ b/test/superset-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {superset} from "../src/index.js"; it("superset(values, other) returns true if values is a superset of others", () => { diff --git a/test/threshold/freedmanDiaconic-test.js b/test/threshold/freedmanDiaconic-test.js index 225f2d23..1e5c5025 100644 --- a/test/threshold/freedmanDiaconic-test.js +++ b/test/threshold/freedmanDiaconic-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {thresholdFreedmanDiaconis} from "../../src/index.js"; it("thresholdFreedmanDiaconis(values, min, max) returns the expected result", () => { diff --git a/test/threshold/scott-test.js b/test/threshold/scott-test.js index 1fcb2b38..b91c15d1 100644 --- a/test/threshold/scott-test.js +++ b/test/threshold/scott-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {thresholdScott} from "../../src/index.js"; it("thresholdScott(values, min, max) returns the expected result", () => { diff --git a/test/threshold/sturges-test.js b/test/threshold/sturges-test.js index 6492800b..61cd0917 100644 --- a/test/threshold/sturges-test.js +++ b/test/threshold/sturges-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {thresholdSturges} from "../../src/index.js"; it("thresholdSturges(values, min, max) returns the expected result", () => { diff --git a/test/tickIncrement-test.js b/test/tickIncrement-test.js index 63704eae..cb2ee6d2 100644 --- a/test/tickIncrement-test.js +++ b/test/tickIncrement-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {tickIncrement} from "../src/index.js"; it("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () => { diff --git a/test/tickStep-test.js b/test/tickStep-test.js index 5c51e079..2a0408dd 100644 --- a/test/tickStep-test.js +++ b/test/tickStep-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {tickStep} from "../src/index.js"; it("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { diff --git a/test/ticks-test.js b/test/ticks-test.js index c70d5ec2..16deb02a 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {ticks} from "../src/index.js"; it("ticks(start, stop, count) returns the empty array if any argument is NaN", () => { diff --git a/test/transpose-test.js b/test/transpose-test.js index 23edca0f..33e6d641 100644 --- a/test/transpose-test.js +++ b/test/transpose-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {transpose} from "../src/index.js"; it("transpose([]) and transpose([[]]) return an empty array", () => { diff --git a/test/variance-test.js b/test/variance-test.js index d57c6d0f..f627eef3 100644 --- a/test/variance-test.js +++ b/test/variance-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {variance} from "../src/index.js"; it("variance(array) returns the variance of the specified numbers", () => { diff --git a/test/zip-test.js b/test/zip-test.js index 2f890520..583cff37 100644 --- a/test/zip-test.js +++ b/test/zip-test.js @@ -1,5 +1,5 @@ +import assert from "node:assert"; import {it} from "vitest"; -import assert from "assert"; import {zip} from "../src/index.js"; it("zip() and zip([]) return an empty array", () => { From c23a70ee3a22ed31b98266845c98558270c542ba Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:22:31 -0800 Subject: [PATCH 07/13] node:fs --- test/bin-test.js | 2 +- test/groupSort-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/bin-test.js b/test/bin-test.js index fdb00685..e279ef86 100644 --- a/test/bin-test.js +++ b/test/bin-test.js @@ -1,7 +1,7 @@ import assert from "node:assert"; +import {readFile} from "node:fs/promises"; import {it} from "vitest"; import {csvParse} from "d3-dsv"; -import {readFile} from "fs/promises"; import {bin, extent, histogram, thresholdSturges, ticks} from "../src/index.js"; it("histogram is a deprecated alias for bin", () => { diff --git a/test/groupSort-test.js b/test/groupSort-test.js index 537b1f06..58103912 100644 --- a/test/groupSort-test.js +++ b/test/groupSort-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; +import {readFileSync} from "node:fs"; import {it} from "vitest"; -import {readFileSync} from "fs"; import {ascending, descending, groupSort, median} from "../src/index.js"; const barley = JSON.parse(readFileSync("./test/data/barley.json")); From cc6f43a47e8f87e7fdcf651a6757f99e8017ddbe Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:44:50 -0800 Subject: [PATCH 08/13] more lint --- eslint.config.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 0c767efb..fd5115ad 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,9 +3,11 @@ import globals from "globals"; import {defineConfig} from "eslint/config"; export default defineConfig([ - {files: ["**/*.{js,ts,jsx,tsx}"], plugins: {js}, extends: ["js/recommended"]}, - {files: ["**/*.{js,ts,jsx,tsx}"], languageOptions: {globals: globals.browser}}, + {ignores: ["dist/"]}, + {files: ["**/*.{js,ts}"], plugins: {js}, extends: ["js/recommended"]}, + {files: ["**/*.{js,ts}"], languageOptions: {globals: globals.node}}, {languageOptions: {ecmaVersion: 2019, sourceType: "module"}}, {rules: {"no-cond-assign": 0, "no-constant-condition": 0}}, - {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}} + {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}}, + {files: ["rollup.config.js"], languageOptions: {ecmaVersion: 2026}} ]); diff --git a/package.json b/package.json index cfb6cd56..6e0c791b 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "scripts": { "test": "vitest", - "lint": "eslint src test", + "lint": "eslint", "prepublishOnly": "rm -rf dist && rollup -c" }, "engines": { From 9af8e6bd89f8ef9464c1711db215454fd491e06b Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 18:59:17 -0800 Subject: [PATCH 09/13] eslint config Co-Authored-By: Claude Opus 5.5 --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 9b026007..38295d01 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -63,7 +63,7 @@ export default [ config({ output: { file: `dist/${meta.name}.js`, - format: "umd", + format: "umd" } }), config({ From 28f747707b8675da91eff31baf902975d84b2bfa Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 19:04:35 -0800 Subject: [PATCH 10/13] browser globals for src Co-Authored-By: Claude Opus 5.5 --- eslint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index fd5115ad..c9b41ff7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,7 +5,7 @@ import {defineConfig} from "eslint/config"; export default defineConfig([ {ignores: ["dist/"]}, {files: ["**/*.{js,ts}"], plugins: {js}, extends: ["js/recommended"]}, - {files: ["**/*.{js,ts}"], languageOptions: {globals: globals.node}}, + {files: ["src/**/*.{js,ts}"], languageOptions: {globals: globals.browser}}, {languageOptions: {ecmaVersion: 2019, sourceType: "module"}}, {rules: {"no-cond-assign": 0, "no-constant-condition": 0}}, {files: ["test/**/*.js"], rules: {"no-sparse-arrays": 0}}, From 56d5d334b14d0f5d470216600aa473cf1b8756c6 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 21:05:16 -0800 Subject: [PATCH 11/13] d3-array alias --- test/ascending-test.js | 2 +- test/bin-test.js | 2 +- test/bisect-test.js | 2 +- test/bisector-test.js | 2 +- test/blur-test.js | 2 +- test/count-test.js | 2 +- test/cross-test.js | 2 +- test/cumsum-test.js | 2 +- test/descending-test.js | 2 +- test/deviation-test.js | 2 +- test/difference-test.js | 2 +- test/disjoint-test.js | 2 +- test/every-test.js | 2 +- test/extent-test.js | 2 +- test/fcumsum-test.js | 2 +- test/filter-test.js | 2 +- test/flatGroup-test.js | 2 +- test/flatRollup-test.js | 2 +- test/fsum-test.js | 2 +- test/greatest-test.js | 2 +- test/greatestIndex-test.js | 2 +- test/group-test.js | 2 +- test/groupSort-test.js | 2 +- test/groups-test.js | 2 +- test/index-test.js | 2 +- test/intersection-test.js | 2 +- test/least-test.js | 2 +- test/leastIndex-test.js | 2 +- test/map-test.js | 2 +- test/max-test.js | 2 +- test/maxIndex-test.js | 2 +- test/mean-test.js | 2 +- test/median-test.js | 2 +- test/merge-test.js | 2 +- test/min-test.js | 2 +- test/minIndex-test.js | 2 +- test/mode-test.js | 2 +- test/nice-test.js | 2 +- test/pairs-test.js | 2 +- test/permute-test.js | 2 +- test/quantile-test.js | 2 +- test/quickselect-test.js | 2 +- test/range-test.js | 2 +- test/reduce-test.js | 2 +- test/reverse-test.js | 2 +- test/rollup-test.js | 2 +- test/rollups-test.js | 2 +- test/scan-test.js | 2 +- test/shuffle-test.js | 2 +- test/some-test.js | 2 +- test/sort-test.js | 2 +- test/subset-test.js | 2 +- test/sum-test.js | 2 +- test/superset-test.js | 2 +- test/tickIncrement-test.js | 2 +- test/tickStep-test.js | 2 +- test/ticks-test.js | 2 +- test/transpose-test.js | 2 +- test/union-test.js | 2 +- test/variance-test.js | 2 +- test/zip-test.js | 2 +- vitest.config.js | 5 ++++- 62 files changed, 65 insertions(+), 62 deletions(-) diff --git a/test/ascending-test.js b/test/ascending-test.js index b3237d8e..6fa5b1c9 100644 --- a/test/ascending-test.js +++ b/test/ascending-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {ascending} from "../src/index.js"; +import {ascending} from "d3-array"; it("ascending(a, b) returns a negative number if a < b", () => { assert(ascending(0, 1) < 0); diff --git a/test/bin-test.js b/test/bin-test.js index e279ef86..d0151611 100644 --- a/test/bin-test.js +++ b/test/bin-test.js @@ -2,7 +2,7 @@ import assert from "node:assert"; import {readFile} from "node:fs/promises"; import {it} from "vitest"; import {csvParse} from "d3-dsv"; -import {bin, extent, histogram, thresholdSturges, ticks} from "../src/index.js"; +import {bin, extent, histogram, thresholdSturges, ticks} from "d3-array"; it("histogram is a deprecated alias for bin", () => { assert.strictEqual(histogram, bin); diff --git a/test/bisect-test.js b/test/bisect-test.js index f57c4862..e75d2dc1 100644 --- a/test/bisect-test.js +++ b/test/bisect-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {bisect, bisectLeft, bisectRight} from "../src/index.js"; +import {bisect, bisectLeft, bisectRight} from "d3-array"; it("bisect is an alias for bisectRight", () => { assert.strictEqual(bisect, bisectRight); diff --git a/test/bisector-test.js b/test/bisector-test.js index cbd6f273..8d4cc9e9 100644 --- a/test/bisector-test.js +++ b/test/bisector-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {ascending, bisector} from "../src/index.js"; +import {ascending, bisector} from "d3-array"; it("bisector(comparator).left(array, value) returns the index of an exact match", () => { const boxes = [1, 2, 3].map(box); diff --git a/test/blur-test.js b/test/blur-test.js index 458267dc..9f33a219 100644 --- a/test/blur-test.js +++ b/test/blur-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {blur, blur2} from "../src/index.js"; +import {blur, blur2} from "d3-array"; it("blur(values, r) returns values", () => { const V = [0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0]; diff --git a/test/count-test.js b/test/count-test.js index c8273cef..fc133813 100644 --- a/test/count-test.js +++ b/test/count-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {count} from "../src/index.js"; +import {count} from "d3-array"; it("count() accepts an iterable", () => { assert.deepStrictEqual(count([1, 2]), 2); diff --git a/test/cross-test.js b/test/cross-test.js index 16b7769c..1dc9503c 100644 --- a/test/cross-test.js +++ b/test/cross-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {cross} from "../src/index.js"; +import {cross} from "d3-array"; it("cross() returns an empty array", () => { assert.deepStrictEqual(cross(), []); diff --git a/test/cumsum-test.js b/test/cumsum-test.js index a4a63d82..b2b7ae97 100644 --- a/test/cumsum-test.js +++ b/test/cumsum-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {cumsum} from "../src/index.js"; +import {cumsum} from "d3-array"; it("cumsum(array) returns the cumulative sum of the specified numbers", () => { assert.deepStrictEqual(Array.from(cumsum([1])), [1]); diff --git a/test/descending-test.js b/test/descending-test.js index 2c14f1aa..8ba50cfd 100644 --- a/test/descending-test.js +++ b/test/descending-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {descending} from "../src/index.js"; +import {descending} from "d3-array"; it("descending(a, b) returns a positive number if a < b", () => { assert(descending(0, 1) > 0); diff --git a/test/deviation-test.js b/test/deviation-test.js index 8f1bcc12..404d99fa 100644 --- a/test/deviation-test.js +++ b/test/deviation-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {deviation} from "../src/index.js"; +import {deviation} from "d3-array"; it("deviation(array) returns the standard deviation of the specified numbers", () => { assert.strictEqual(deviation([1, 1, 1, 1, 1]), 0); diff --git a/test/difference-test.js b/test/difference-test.js index e15b3f66..238a2236 100644 --- a/test/difference-test.js +++ b/test/difference-test.js @@ -1,5 +1,5 @@ import {it} from "vitest"; -import {difference} from "../src/index.js"; +import {difference} from "d3-array"; import {assertSetEqual} from "./asserts.js"; it("difference(values, other) returns a set of values", () => { diff --git a/test/disjoint-test.js b/test/disjoint-test.js index ccff3f7a..30e691a7 100644 --- a/test/disjoint-test.js +++ b/test/disjoint-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {disjoint} from "../src/index.js"; +import {disjoint} from "d3-array"; it("disjoint(values, other) returns true if sets are disjoint", () => { assert.strictEqual(disjoint([1], [2]), true); diff --git a/test/every-test.js b/test/every-test.js index eb9a9d98..b8187da3 100644 --- a/test/every-test.js +++ b/test/every-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {every} from "../src/index.js"; +import {every} from "d3-array"; it("every(values, test) returns true if all tests pass", () => { assert.strictEqual(every([1, 2, 3, 2, 1], x => x & 1), false); diff --git a/test/extent-test.js b/test/extent-test.js index 74846925..717f8d12 100644 --- a/test/extent-test.js +++ b/test/extent-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {extent} from "../src/index.js"; +import {extent} from "d3-array"; it("extent(array) returns the least and greatest numeric values for numbers", () => { assert.deepStrictEqual(extent([1]), [1, 1]); diff --git a/test/fcumsum-test.js b/test/fcumsum-test.js index c7bb9b5b..21cd3fd6 100644 --- a/test/fcumsum-test.js +++ b/test/fcumsum-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {cumsum, fcumsum} from "../src/index.js"; +import {cumsum, fcumsum} from "d3-array"; it("fcumsum(array) returns a Float64Array of the expected length", () => { const A = [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]; diff --git a/test/filter-test.js b/test/filter-test.js index 8cc1b091..be14dff9 100644 --- a/test/filter-test.js +++ b/test/filter-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import * as d3 from "../src/index.js"; +import * as d3 from "d3-array"; it("filter(values, test) returns the values that pass the test", () => { assert.deepStrictEqual(d3.filter([1, 2, 3, 2, 1], x => x & 1), [1, 3, 1]); diff --git a/test/flatGroup-test.js b/test/flatGroup-test.js index e2b4d866..5d55082b 100644 --- a/test/flatGroup-test.js +++ b/test/flatGroup-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {flatGroup} from "../src/index.js"; +import {flatGroup} from "d3-array"; const data = [ {name: "jim", amount: "34.0", date: "11/12/2015"}, diff --git a/test/flatRollup-test.js b/test/flatRollup-test.js index 97d6e40c..f1adfaac 100644 --- a/test/flatRollup-test.js +++ b/test/flatRollup-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {flatRollup} from "../src/index.js"; +import {flatRollup} from "d3-array"; const data = [ {name: "jim", amount: "34.0", date: "11/12/2015"}, diff --git a/test/fsum-test.js b/test/fsum-test.js index 670d3db1..ed9d5750 100644 --- a/test/fsum-test.js +++ b/test/fsum-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {Adder, fsum} from "../src/index.js"; +import {Adder, fsum} from "d3-array"; it("new Adder() returns an Adder", () => { assert.strictEqual(typeof new Adder().add, "function"); diff --git a/test/greatest-test.js b/test/greatest-test.js index 26426085..676a3f51 100644 --- a/test/greatest-test.js +++ b/test/greatest-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {descending, greatest} from "../src/index.js"; +import {descending, greatest} from "d3-array"; it("greatest(array) compares using natural order", () => { assert.strictEqual(greatest([0, 1]), 1); diff --git a/test/greatestIndex-test.js b/test/greatestIndex-test.js index 920bc110..4b6dea25 100644 --- a/test/greatestIndex-test.js +++ b/test/greatestIndex-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {ascending, descending, greatestIndex} from "../src/index.js"; +import {ascending, descending, greatestIndex} from "d3-array"; it("greatestIndex(array) compares using natural order", () => { assert.strictEqual(greatestIndex([0, 1]), 1); diff --git a/test/group-test.js b/test/group-test.js index 9f9c356b..c5be4aaa 100644 --- a/test/group-test.js +++ b/test/group-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {group} from "../src/index.js"; +import {group} from "d3-array"; const data = [ {name: "jim", amount: "34.0", date: "11/12/2015"}, diff --git a/test/groupSort-test.js b/test/groupSort-test.js index 58103912..0fac8670 100644 --- a/test/groupSort-test.js +++ b/test/groupSort-test.js @@ -1,7 +1,7 @@ import assert from "node:assert"; import {readFileSync} from "node:fs"; import {it} from "vitest"; -import {ascending, descending, groupSort, median} from "../src/index.js"; +import {ascending, descending, groupSort, median} from "d3-array"; const barley = JSON.parse(readFileSync("./test/data/barley.json")); diff --git a/test/groups-test.js b/test/groups-test.js index c35db73f..84c7e5dc 100644 --- a/test/groups-test.js +++ b/test/groups-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {groups} from "../src/index.js"; +import {groups} from "d3-array"; const data = [ {name: "jim", amount: "34.0", date: "11/12/2015"}, diff --git a/test/index-test.js b/test/index-test.js index 4ba94db2..4527175d 100644 --- a/test/index-test.js +++ b/test/index-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {index, indexes} from "../src/index.js"; +import {index, indexes} from "d3-array"; const data = [ {name: "jim", amount: 34.0, date: "11/12/2015"}, diff --git a/test/intersection-test.js b/test/intersection-test.js index 19a5cc3e..047e73a0 100644 --- a/test/intersection-test.js +++ b/test/intersection-test.js @@ -1,5 +1,5 @@ import {it} from "vitest"; -import {intersection} from "../src/index.js"; +import {intersection} from "d3-array"; import {assertSetEqual} from "./asserts.js"; it("intersection(values) returns a set of values", () => { diff --git a/test/least-test.js b/test/least-test.js index 02c3c78e..15a7819b 100644 --- a/test/least-test.js +++ b/test/least-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {descending, least} from "../src/index.js"; +import {descending, least} from "d3-array"; it("least(array) compares using natural order", () => { assert.strictEqual(least([0, 1]), 0); diff --git a/test/leastIndex-test.js b/test/leastIndex-test.js index 25c5e40e..c8ee82da 100644 --- a/test/leastIndex-test.js +++ b/test/leastIndex-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {descending, leastIndex} from "../src/index.js"; +import {descending, leastIndex} from "d3-array"; it("leastIndex(array) compares using natural order", () => { assert.strictEqual(leastIndex([0, 1]), 0); diff --git a/test/map-test.js b/test/map-test.js index daffe53a..8988b20a 100644 --- a/test/map-test.js +++ b/test/map-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {map} from "../src/index.js"; +import {map} from "d3-array"; it("map(values, mapper) returns the mapped values", () => { assert.deepStrictEqual(map([1, 2, 3, 2, 1], x => x * 2), [2, 4, 6, 4, 2]); diff --git a/test/max-test.js b/test/max-test.js index 6aafc1de..ddf37fd6 100644 --- a/test/max-test.js +++ b/test/max-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {max} from "../src/index.js"; +import {max} from "d3-array"; it("max(array) returns the greatest numeric value for numbers", () => { assert.deepStrictEqual(max([1]), 1); diff --git a/test/maxIndex-test.js b/test/maxIndex-test.js index f3fcff6e..90db23a9 100644 --- a/test/maxIndex-test.js +++ b/test/maxIndex-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {maxIndex} from "../src/index.js"; +import {maxIndex} from "d3-array"; it("maxIndex(array) returns the index of the greatest numeric value for numbers", () => { assert.deepStrictEqual(maxIndex([1]), 0); diff --git a/test/mean-test.js b/test/mean-test.js index 19fa0dc9..6267e5a5 100644 --- a/test/mean-test.js +++ b/test/mean-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {mean} from "../src/index.js"; +import {mean} from "d3-array"; import {OneTimeNumber} from "./OneTimeNumber.js"; it("mean(array) returns the mean value for numbers", () => { diff --git a/test/median-test.js b/test/median-test.js index 9a95b590..ae3a92b0 100644 --- a/test/median-test.js +++ b/test/median-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {median, medianIndex} from "../src/index.js"; +import {median, medianIndex} from "d3-array"; import {OneTimeNumber} from "./OneTimeNumber.js"; it("median(array) returns the median value for numbers", () => { diff --git a/test/merge-test.js b/test/merge-test.js index c11f7c12..6390c846 100644 --- a/test/merge-test.js +++ b/test/merge-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {merge} from "../src/index.js"; +import {merge} from "d3-array"; it("merge(arrays) merges an array of arrays", () => { const a = {}, b = {}, c = {}, d = {}, e = {}, f = {}; diff --git a/test/min-test.js b/test/min-test.js index ea0e7e1c..8751fc75 100644 --- a/test/min-test.js +++ b/test/min-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {min} from "../src/index.js"; +import {min} from "d3-array"; it("min(array) returns the least numeric value for numbers", () => { assert.deepStrictEqual(min([1]), 1); diff --git a/test/minIndex-test.js b/test/minIndex-test.js index 4473cd6c..93e860c5 100644 --- a/test/minIndex-test.js +++ b/test/minIndex-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {minIndex} from "../src/index.js"; +import {minIndex} from "d3-array"; it("minIndex(array) returns the index of the least numeric value for numbers", () => { assert.deepStrictEqual(minIndex([1]), 0); diff --git a/test/mode-test.js b/test/mode-test.js index b742c889..14ea56f9 100644 --- a/test/mode-test.js +++ b/test/mode-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {mode} from "../src/index.js"; +import {mode} from "d3-array"; it("mode(array) returns the most frequent value for numbers", () => { assert.strictEqual(mode([1]), 1); diff --git a/test/nice-test.js b/test/nice-test.js index c2fd8432..69d52d1a 100644 --- a/test/nice-test.js +++ b/test/nice-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {nice} from "../src/index.js"; +import {nice} from "d3-array"; it("nice(start, stop, count) returns [start, stop] if any argument is NaN", () => { assert.deepStrictEqual(nice(NaN, 1, 1), [NaN, 1]); diff --git a/test/pairs-test.js b/test/pairs-test.js index e29283c1..2363cd62 100644 --- a/test/pairs-test.js +++ b/test/pairs-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {pairs} from "../src/index.js"; +import {pairs} from "d3-array"; it("pairs(array) returns the empty array if input array has fewer than two elements", () => { assert.deepStrictEqual(pairs([]), []); diff --git a/test/permute-test.js b/test/permute-test.js index f1784e39..5dbf915b 100644 --- a/test/permute-test.js +++ b/test/permute-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {permute} from "../src/index.js"; +import {permute} from "d3-array"; it("permute(…) permutes according to the specified index", () => { assert.deepStrictEqual(permute([3, 4, 5], [2, 1, 0]), [5, 4, 3]); diff --git a/test/quantile-test.js b/test/quantile-test.js index db26d110..c0923b73 100644 --- a/test/quantile-test.js +++ b/test/quantile-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {quantile, quantileIndex, quantileSorted} from "../src/index.js"; +import {quantile, quantileIndex, quantileSorted} from "d3-array"; it("quantileSorted(array, p) requires sorted numeric input, quantile doesn't", () => { assert.strictEqual(quantileSorted([1, 2, 3, 4], 0), 1); diff --git a/test/quickselect-test.js b/test/quickselect-test.js index e034410f..22e1a03a 100644 --- a/test/quickselect-test.js +++ b/test/quickselect-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {quickselect} from "../src/index.js"; +import {quickselect} from "d3-array"; it("quickselect(array, k) does nothing if k is not a number", () => { const array = [3, 1, 2]; diff --git a/test/range-test.js b/test/range-test.js index 998afa02..c9aba49b 100644 --- a/test/range-test.js +++ b/test/range-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {range} from "../src/index.js"; +import {range} from "d3-array"; it("range(stop) returns [0, 1, 2, … stop - 1]", () => { assert.deepStrictEqual(range(5), [0, 1, 2, 3, 4]); diff --git a/test/reduce-test.js b/test/reduce-test.js index 423d238d..49f534f7 100644 --- a/test/reduce-test.js +++ b/test/reduce-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {reduce} from "../src/index.js"; +import {reduce} from "d3-array"; it("reduce(values, reducer) returns the reduced value", () => { assert.strictEqual(reduce([1, 2, 3, 2, 1], (p, v) => p + v), 9); diff --git a/test/reverse-test.js b/test/reverse-test.js index 6ffc11db..9d797784 100644 --- a/test/reverse-test.js +++ b/test/reverse-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {reverse} from "../src/index.js"; +import {reverse} from "d3-array"; it("reverse(values) returns a reversed copy", () => { const input = [1, 3, 2, 5, 4]; diff --git a/test/rollup-test.js b/test/rollup-test.js index f94f249d..dc9ccec5 100644 --- a/test/rollup-test.js +++ b/test/rollup-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {rollup, sum} from "../src/index.js"; +import {rollup, sum} from "d3-array"; const data = [ {name: "jim", amount: "3400", date: "11/12/2015"}, diff --git a/test/rollups-test.js b/test/rollups-test.js index 00d325de..b4e9b625 100644 --- a/test/rollups-test.js +++ b/test/rollups-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {rollups, sum} from "../src/index.js"; +import {rollups, sum} from "d3-array"; const data = [ {name: "jim", amount: "3400", date: "11/12/2015"}, diff --git a/test/scan-test.js b/test/scan-test.js index c8e33950..52d14a72 100644 --- a/test/scan-test.js +++ b/test/scan-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {descending, scan} from "../src/index.js"; +import {descending, scan} from "d3-array"; it("scan(array) compares using natural order", () => { assert.strictEqual(scan([0, 1]), 0); diff --git a/test/shuffle-test.js b/test/shuffle-test.js index 3f74a526..f262d31f 100644 --- a/test/shuffle-test.js +++ b/test/shuffle-test.js @@ -1,7 +1,7 @@ import assert from "node:assert"; import {it} from "vitest"; import {randomLcg} from "d3-random"; -import {pairs, shuffler} from "../src/index.js"; +import {pairs, shuffler} from "d3-array"; it("shuffle(array) shuffles the array in-place", () => { const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; diff --git a/test/some-test.js b/test/some-test.js index 5c936121..2e9de8a5 100644 --- a/test/some-test.js +++ b/test/some-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {some} from "../src/index.js"; +import {some} from "d3-array"; it("some(values, test) returns true if any test passes", () => { assert.strictEqual(some([1, 2, 3, 2, 1], x => x & 1), true); diff --git a/test/sort-test.js b/test/sort-test.js index 2437b76d..d8fbcb12 100644 --- a/test/sort-test.js +++ b/test/sort-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {ascending, descending, sort} from "../src/index.js"; +import {ascending, descending, sort} from "d3-array"; it("sort(values) returns a sorted copy", () => { const input = [1, 3, 2, 5, 4]; diff --git a/test/subset-test.js b/test/subset-test.js index 3e0d2b20..00dd3fdd 100644 --- a/test/subset-test.js +++ b/test/subset-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {subset} from "../src/index.js"; +import {subset} from "d3-array"; it("subset(values, other) returns true if values is a subset of others", () => { assert.strictEqual(subset([2], [1, 2]), true); diff --git a/test/sum-test.js b/test/sum-test.js index a52342a0..35a0f108 100644 --- a/test/sum-test.js +++ b/test/sum-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {sum} from "../src/index.js"; +import {sum} from "d3-array"; it("sum(array) returns the sum of the specified numbers", () => { assert.strictEqual(sum([1]), 1); diff --git a/test/superset-test.js b/test/superset-test.js index 75453c2e..3b6221b5 100644 --- a/test/superset-test.js +++ b/test/superset-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {superset} from "../src/index.js"; +import {superset} from "d3-array"; it("superset(values, other) returns true if values is a superset of others", () => { assert.strictEqual(superset([1, 2], [2]), true); diff --git a/test/tickIncrement-test.js b/test/tickIncrement-test.js index cb2ee6d2..6ac5915f 100644 --- a/test/tickIncrement-test.js +++ b/test/tickIncrement-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {tickIncrement} from "../src/index.js"; +import {tickIncrement} from "d3-array"; it("tickIncrement(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickIncrement(NaN, 1, 1))); diff --git a/test/tickStep-test.js b/test/tickStep-test.js index 2a0408dd..16aeeed2 100644 --- a/test/tickStep-test.js +++ b/test/tickStep-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {tickStep} from "../src/index.js"; +import {tickStep} from "d3-array"; it("tickStep(start, stop, count) returns NaN if any argument is NaN", () => { assert(isNaN(tickStep(NaN, 1, 1))); diff --git a/test/ticks-test.js b/test/ticks-test.js index 16deb02a..424ab5bf 100644 --- a/test/ticks-test.js +++ b/test/ticks-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {ticks} from "../src/index.js"; +import {ticks} from "d3-array"; it("ticks(start, stop, count) returns the empty array if any argument is NaN", () => { assert.deepStrictEqual(ticks(NaN, 1, 1), []); diff --git a/test/transpose-test.js b/test/transpose-test.js index 33e6d641..506585a5 100644 --- a/test/transpose-test.js +++ b/test/transpose-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {transpose} from "../src/index.js"; +import {transpose} from "d3-array"; it("transpose([]) and transpose([[]]) return an empty array", () => { assert.deepStrictEqual(transpose([]), []); diff --git a/test/union-test.js b/test/union-test.js index dfbdc282..74e9e972 100644 --- a/test/union-test.js +++ b/test/union-test.js @@ -1,5 +1,5 @@ import {it} from "vitest"; -import {union} from "../src/index.js"; +import {union} from "d3-array"; import {assertSetEqual} from "./asserts.js"; it("union(values) returns a set of values", () => { diff --git a/test/variance-test.js b/test/variance-test.js index f627eef3..25d50114 100644 --- a/test/variance-test.js +++ b/test/variance-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {variance} from "../src/index.js"; +import {variance} from "d3-array"; it("variance(array) returns the variance of the specified numbers", () => { assert.strictEqual(variance([5, 1, 2, 3, 4]), 2.5); diff --git a/test/zip-test.js b/test/zip-test.js index 583cff37..e0acd38e 100644 --- a/test/zip-test.js +++ b/test/zip-test.js @@ -1,6 +1,6 @@ import assert from "node:assert"; import {it} from "vitest"; -import {zip} from "../src/index.js"; +import {zip} from "d3-array"; it("zip() and zip([]) return an empty array", () => { assert.deepStrictEqual(zip(), []); diff --git a/vitest.config.js b/vitest.config.js index b7280506..cead794e 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -1,3 +1,6 @@ import {defineConfig} from "vitest/config"; -export default defineConfig({test: {include: ["test/**/*-test.js"]}}); +export default defineConfig({ + resolve: {alias: {"d3-array": "src/index.js"}}, + test: {include: ["test/**/*-test.js"]} +}); From a3926bdb49d3ff2793291ba5802102734bcc4ee6 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 21:05:23 -0800 Subject: [PATCH 12/13] 3.2.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e0c791b..6bd6ebaf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "d3-array", - "version": "3.2.4", + "version": "3.2.5", "description": "Array manipulation, ordering, searching, summarizing, etc.", "homepage": "https://d3js.org/d3-array/", "repository": { From cb9728727bbc39b01057808d73d3b79753adcf21 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 2 Nov 2026 21:06:00 -0800 Subject: [PATCH 13/13] update dependencies --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6bd6ebaf..1e227cf1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-terser": "^1.0.2", "d3-dsv": "^3.0.1", - "d3-random": "^3.0.1", + "d3-random": "^3.0.2", "eslint": "^10.14.0", "globals": "^17.14.0", "jsdom": "^21.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48910e6d..a42d70ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: specifier: ^3.0.1 version: 3.0.1 d3-random: - specifier: ^3.0.1 - version: 3.0.1 + specifier: ^3.0.2 + version: 3.0.2 eslint: specifier: ^10.14.0 version: 10.14.0 @@ -531,8 +531,8 @@ packages: engines: {node: '>=12'} hasBin: true - d3-random@3.0.1: - resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + d3-random@3.0.2: + resolution: {integrity: sha512-PxJi9LNV+7mulaYO77nd+oGurXGL1fhedXjHnB3pWLUcqDnQtF4VASoqnQGHgoXLByVdv5QJ/2kfwkGn5HTS8g==} engines: {node: '>=12'} data-urls@4.0.0: @@ -1595,7 +1595,7 @@ snapshots: iconv-lite: 0.6.3 rw: 1.3.3 - d3-random@3.0.1: {} + d3-random@3.0.2: {} data-urls@4.0.0: dependencies: