chore: update dependencies

also experiment with some new eslint rules
This commit is contained in:
Simon Chan 2024-06-26 17:08:47 +08:00
parent 349c7c84d3
commit b86a23a345
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
26 changed files with 332 additions and 339 deletions

View file

@ -42,7 +42,7 @@
"source-map-support": "^0.5.21"
},
"devDependencies": {
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@yume-chan/eslint-config": "workspace:^1.0.0",
"@yume-chan/tsconfig": "workspace:^1.0.0",
"jest": "^30.0.0-alpha.4",

View file

@ -32,8 +32,8 @@ importers:
version: 0.5.21
devDependencies:
'@types/node':
specifier: ^20.14.8
version: 20.14.8
specifier: ^20.14.9
version: 20.14.9
'@yume-chan/eslint-config':
specifier: workspace:^1.0.0
version: link:../../toolchain/eslint-config
@ -42,7 +42,7 @@ importers:
version: link:../../toolchain/tsconfig
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -72,8 +72,8 @@ importers:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5
'@types/node':
specifier: ^20.14.8
version: 20.14.8
specifier: ^20.14.9
version: 20.14.9
'@yume-chan/eslint-config':
specifier: workspace:^1.0.0
version: link:../../toolchain/eslint-config
@ -85,7 +85,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -178,7 +178,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -202,8 +202,8 @@ importers:
version: link:../struct
devDependencies:
'@types/node':
specifier: ^20.14.8
version: 20.14.8
specifier: ^20.14.9
version: 20.14.9
'@yume-chan/eslint-config':
specifier: workspace:^1.0.0
version: link:../../toolchain/eslint-config
@ -212,7 +212,7 @@ importers:
version: link:../../toolchain/tsconfig
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -246,7 +246,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -293,7 +293,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -311,8 +311,8 @@ importers:
version: 4.0.3
devDependencies:
'@types/node':
specifier: ^20.14.8
version: 20.14.8
specifier: ^20.14.9
version: 20.14.9
../../libraries/no-data-view:
devDependencies:
@ -320,8 +320,8 @@ importers:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5
'@types/node':
specifier: ^20.14.8
version: 20.14.8
specifier: ^20.14.9
version: 20.14.9
'@yume-chan/eslint-config':
specifier: workspace:^1.0.0
version: link:../../toolchain/eslint-config
@ -333,7 +333,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -353,8 +353,8 @@ importers:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5
'@types/audioworklet':
specifier: ^0.0.55
version: 0.0.55
specifier: ^0.0.56
version: 0.0.56
'@yume-chan/eslint-config':
specifier: workspace:^1.0.0
version: link:../../toolchain/eslint-config
@ -366,7 +366,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -406,7 +406,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -455,7 +455,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -498,7 +498,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -532,7 +532,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -563,7 +563,7 @@ importers:
version: 7.0.3
jest:
specifier: ^30.0.0-alpha.4
version: 30.0.0-alpha.5(@types/node@20.14.8)
version: 30.0.0-alpha.5(@types/node@20.14.9)
prettier:
specifier: ^3.3.2
version: 3.3.2
@ -580,20 +580,20 @@ importers:
specifier: ^9.5.0
version: 9.5.0
'@types/node':
specifier: ^20.14.8
version: 20.14.8
specifier: ^20.14.9
version: 20.14.9
eslint:
specifier: ^9.5.0
version: 9.5.0
eslint-plugin-import-x:
specifier: ^0.5.1
version: 0.5.1(eslint@9.5.0)(typescript@5.5.2)
specifier: ^0.5.2
version: 0.5.2(eslint@9.5.0)(typescript@5.5.2)
typescript:
specifier: ^5.5.2
version: 5.5.2
typescript-eslint:
specifier: ^7.13.1
version: 7.13.1(eslint@9.5.0)(typescript@5.5.2)
specifier: ^7.14.1
version: 7.14.1(eslint@9.5.0)(typescript@5.5.2)
devDependencies:
prettier:
specifier: ^3.3.2
@ -947,8 +947,8 @@ packages:
'@sinclair/typebox@0.27.8':
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
'@sinclair/typebox@0.32.33':
resolution: {integrity: sha512-jM50BfkKA0fwfj0uRRO6asfNfbU0oZipJIb/bL2+BUH/THjuEf2BMiqBOvKfBji5Z9t59NboZQGNfKZbdV50Iw==}
'@sinclair/typebox@0.32.34':
resolution: {integrity: sha512-a3Z3ytYl6R/+7ldxx04PO1semkwWlX/8pTqxsPw4quIcIXDFPZhOc1Wx8azWmkU26ccK3mHwcWenn0avNgAKQg==}
'@sindresorhus/is@5.6.0':
resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==}
@ -967,8 +967,8 @@ packages:
'@tokenizer/token@0.3.0':
resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==}
'@types/audioworklet@0.0.55':
resolution: {integrity: sha512-tL7tMCKPjsAVt2ywgoRhkBIOKHKSf0e9K3+3PTRp1tpUiHyrqA0EOdVeVg4j4bul6zHed3T4hRt0K1E7X5hXQQ==}
'@types/audioworklet@0.0.56':
resolution: {integrity: sha512-6jZ1MOh1Wo52zDg5LFJwWQFnewYnusxqXbQZZ3jaBUlWZ3I01t8jZX1roMGnY1Kv4j2Tts6idsEL50fAmTBKng==}
'@types/babel__core@7.20.5':
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
@ -994,8 +994,8 @@ packages:
'@types/istanbul-reports@3.0.4':
resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==}
'@types/node@20.14.8':
resolution: {integrity: sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==}
'@types/node@20.14.9':
resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==}
'@types/stack-utils@2.0.3':
resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==}
@ -1009,8 +1009,8 @@ packages:
'@types/yargs@17.0.32':
resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==}
'@typescript-eslint/eslint-plugin@7.13.1':
resolution: {integrity: sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==}
'@typescript-eslint/eslint-plugin@7.14.1':
resolution: {integrity: sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
'@typescript-eslint/parser': ^7.0.0
@ -1020,8 +1020,8 @@ packages:
typescript:
optional: true
'@typescript-eslint/parser@7.13.1':
resolution: {integrity: sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==}
'@typescript-eslint/parser@7.14.1':
resolution: {integrity: sha512-8lKUOebNLcR0D7RvlcloOacTOWzOqemWEWkKSVpMZVF/XVcwjPR+3MD08QzbW9TCGJ+DwIc6zUSGZ9vd8cO1IA==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
eslint: ^8.56.0
@ -1030,12 +1030,12 @@ packages:
typescript:
optional: true
'@typescript-eslint/scope-manager@7.13.1':
resolution: {integrity: sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==}
'@typescript-eslint/scope-manager@7.14.1':
resolution: {integrity: sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/type-utils@7.13.1':
resolution: {integrity: sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==}
'@typescript-eslint/type-utils@7.14.1':
resolution: {integrity: sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
eslint: ^8.56.0
@ -1044,12 +1044,12 @@ packages:
typescript:
optional: true
'@typescript-eslint/types@7.13.1':
resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==}
'@typescript-eslint/types@7.14.1':
resolution: {integrity: sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/typescript-estree@7.13.1':
resolution: {integrity: sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==}
'@typescript-eslint/typescript-estree@7.14.1':
resolution: {integrity: sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
typescript: '*'
@ -1057,14 +1057,14 @@ packages:
typescript:
optional: true
'@typescript-eslint/utils@7.13.1':
resolution: {integrity: sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==}
'@typescript-eslint/utils@7.14.1':
resolution: {integrity: sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
eslint: ^8.56.0
'@typescript-eslint/visitor-keys@7.13.1':
resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==}
'@typescript-eslint/visitor-keys@7.14.1':
resolution: {integrity: sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==}
engines: {node: ^18.18.0 || >=20.0.0}
'@xhmikosr/archive-type@6.0.1':
@ -1241,8 +1241,8 @@ packages:
resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}
engines: {node: '>=10'}
caniuse-lite@1.0.30001636:
resolution: {integrity: sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==}
caniuse-lite@1.0.30001637:
resolution: {integrity: sha512-1x0qRI1mD1o9e+7mBI7XtzFAP4XszbHaVWsMiGbSPLYekKTJF7K+FNk6AsXH4sUpc+qrsI3pVgf1Jdl/uGkuSQ==}
chalk@2.4.2:
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
@ -1375,8 +1375,8 @@ packages:
eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
electron-to-chromium@1.4.805:
resolution: {integrity: sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==}
electron-to-chromium@1.4.812:
resolution: {integrity: sha512-7L8fC2Ey/b6SePDFKR2zHAy4mbdp1/38Yk5TsARO66W3hC5KEaeKMMHoxwtuH+jcu2AYLSn9QX04i95t6Fl1Hg==}
emittery@0.13.1:
resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==}
@ -1414,8 +1414,8 @@ packages:
eslint-import-resolver-node@0.3.9:
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
eslint-plugin-import-x@0.5.1:
resolution: {integrity: sha512-2JK8bbFOLes+gG6tgdnM8safCxMAj4u2wjX8X1BRFPfnY7Ct2hFYESoIcVwABX/DDcdpQFLGtKmzbNEWJZD9iQ==}
eslint-plugin-import-x@0.5.2:
resolution: {integrity: sha512-6f1YMmg3PdLwfiJDYnCRPfh67zJKbwbOKL99l6xGZDmIFkMht/4xyudafGEcDOmDlgp36e41W4RXDfOn7+pGRg==}
engines: {node: '>=16'}
peerDependencies:
eslint: ^8.56.0 || ^9.0.0-0
@ -1600,8 +1600,8 @@ packages:
resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
engines: {node: '>=10.13.0'}
glob@10.4.1:
resolution: {integrity: sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==}
glob@10.4.2:
resolution: {integrity: sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==}
engines: {node: '>=16 || 14 >=14.18'}
hasBin: true
@ -1690,8 +1690,9 @@ packages:
is-arrayish@0.2.1:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
is-core-module@2.13.1:
resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==}
is-core-module@2.14.0:
resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==}
engines: {node: '>= 0.4'}
is-extglob@2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
@ -2017,8 +2018,8 @@ packages:
minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
minimatch@9.0.4:
resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==}
minimatch@9.0.5:
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
engines: {node: '>=16 || 14 >=14.17'}
minipass@7.1.2:
@ -2103,6 +2104,9 @@ packages:
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
engines: {node: '>=6'}
package-json-from-dist@1.0.0:
resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==}
parent-module@1.0.1:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
@ -2457,8 +2461,8 @@ packages:
resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}
engines: {node: '>=10'}
typescript-eslint@7.13.1:
resolution: {integrity: sha512-pvLEuRs8iS9s3Cnp/Wt//hpK8nKc8hVa3cLljHqzaJJQYP8oys8GUyIFqtlev+2lT/fqMPcyQko+HJ6iYK3nFA==}
typescript-eslint@7.14.1:
resolution: {integrity: sha512-Eo1X+Y0JgGPspcANKjeR6nIqXl4VL5ldXLc15k4m9upq+eY5fhU2IueiEZL6jmHrKH8aCfbIvM/v3IrX5Hg99w==}
engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies:
eslint: ^8.56.0
@ -2490,8 +2494,8 @@ packages:
util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
v8-to-istanbul@9.2.0:
resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==}
v8-to-istanbul@9.3.0:
resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==}
engines: {node: '>=10.12.0'}
walker@1.0.8:
@ -2824,7 +2828,7 @@ snapshots:
'@jest/console@30.0.0-alpha.5':
dependencies:
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
chalk: 4.1.2
jest-message-util: 30.0.0-alpha.5
jest-util: 30.0.0-alpha.5
@ -2838,14 +2842,14 @@ snapshots:
'@jest/test-result': 30.0.0-alpha.5
'@jest/transform': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
ansi-escapes: 4.3.2
chalk: 4.1.2
ci-info: 4.0.0
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 30.0.0-alpha.5
jest-config: 30.0.0-alpha.5(@types/node@20.14.8)
jest-config: 30.0.0-alpha.5(@types/node@20.14.9)
jest-haste-map: 30.0.0-alpha.5
jest-message-util: 30.0.0-alpha.5
jest-regex-util: 30.0.0-alpha.5
@ -2870,7 +2874,7 @@ snapshots:
dependencies:
'@jest/fake-timers': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
jest-mock: 30.0.0-alpha.5
'@jest/expect-utils@30.0.0-alpha.5':
@ -2888,7 +2892,7 @@ snapshots:
dependencies:
'@jest/types': 30.0.0-alpha.5
'@sinonjs/fake-timers': 11.2.2
'@types/node': 20.14.8
'@types/node': 20.14.9
jest-message-util: 30.0.0-alpha.5
jest-mock: 30.0.0-alpha.5
jest-util: 30.0.0-alpha.5
@ -2904,7 +2908,7 @@ snapshots:
'@jest/pattern@30.0.0-alpha.5':
dependencies:
'@types/node': 20.14.8
'@types/node': 20.14.9
jest-regex-util: 30.0.0-alpha.5
'@jest/reporters@30.0.0-alpha.5':
@ -2915,11 +2919,11 @@ snapshots:
'@jest/transform': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@jridgewell/trace-mapping': 0.3.25
'@types/node': 20.14.8
'@types/node': 20.14.9
chalk: 4.1.2
collect-v8-coverage: 1.0.2
exit: 0.1.2
glob: 10.4.1
glob: 10.4.2
graceful-fs: 4.2.11
istanbul-lib-coverage: 3.2.2
istanbul-lib-instrument: 6.0.2
@ -2932,7 +2936,7 @@ snapshots:
slash: 3.0.0
string-length: 4.0.2
strip-ansi: 6.0.1
v8-to-istanbul: 9.2.0
v8-to-istanbul: 9.3.0
transitivePeerDependencies:
- supports-color
@ -2942,7 +2946,7 @@ snapshots:
'@jest/schemas@30.0.0-alpha.5':
dependencies:
'@sinclair/typebox': 0.32.33
'@sinclair/typebox': 0.32.34
'@jest/snapshot-utils@30.0.0-alpha.5':
dependencies:
@ -2996,7 +3000,7 @@ snapshots:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@types/node': 20.14.8
'@types/node': 20.14.9
'@types/yargs': 17.0.32
chalk: 4.1.2
@ -3006,7 +3010,7 @@ snapshots:
'@jest/schemas': 30.0.0-alpha.5
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@types/node': 20.14.8
'@types/node': 20.14.9
'@types/yargs': 17.0.32
chalk: 4.1.2
@ -3046,7 +3050,7 @@ snapshots:
'@sinclair/typebox@0.27.8': {}
'@sinclair/typebox@0.32.33': {}
'@sinclair/typebox@0.32.34': {}
'@sindresorhus/is@5.6.0': {}
@ -3064,7 +3068,7 @@ snapshots:
'@tokenizer/token@0.3.0': {}
'@types/audioworklet@0.0.55': {}
'@types/audioworklet@0.0.56': {}
'@types/babel__core@7.20.5':
dependencies:
@ -3099,7 +3103,7 @@ snapshots:
dependencies:
'@types/istanbul-lib-report': 3.0.3
'@types/node@20.14.8':
'@types/node@20.14.9':
dependencies:
undici-types: 5.26.5
@ -3113,14 +3117,14 @@ snapshots:
dependencies:
'@types/yargs-parser': 21.0.3
'@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2)':
'@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2)':
dependencies:
'@eslint-community/regexpp': 4.10.1
'@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/scope-manager': 7.13.1
'@typescript-eslint/type-utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/visitor-keys': 7.13.1
'@typescript-eslint/parser': 7.14.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/scope-manager': 7.14.1
'@typescript-eslint/type-utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/visitor-keys': 7.14.1
eslint: 9.5.0
graphemer: 1.4.0
ignore: 5.3.1
@ -3131,12 +3135,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.5.2)':
'@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2)':
dependencies:
'@typescript-eslint/scope-manager': 7.13.1
'@typescript-eslint/types': 7.13.1
'@typescript-eslint/typescript-estree': 7.13.1(typescript@5.5.2)
'@typescript-eslint/visitor-keys': 7.13.1
'@typescript-eslint/scope-manager': 7.14.1
'@typescript-eslint/types': 7.14.1
'@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2)
'@typescript-eslint/visitor-keys': 7.14.1
debug: 4.3.5
eslint: 9.5.0
optionalDependencies:
@ -3144,15 +3148,15 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/scope-manager@7.13.1':
'@typescript-eslint/scope-manager@7.14.1':
dependencies:
'@typescript-eslint/types': 7.13.1
'@typescript-eslint/visitor-keys': 7.13.1
'@typescript-eslint/types': 7.14.1
'@typescript-eslint/visitor-keys': 7.14.1
'@typescript-eslint/type-utils@7.13.1(eslint@9.5.0)(typescript@5.5.2)':
'@typescript-eslint/type-utils@7.14.1(eslint@9.5.0)(typescript@5.5.2)':
dependencies:
'@typescript-eslint/typescript-estree': 7.13.1(typescript@5.5.2)
'@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2)
'@typescript-eslint/utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2)
debug: 4.3.5
eslint: 9.5.0
ts-api-utils: 1.3.0(typescript@5.5.2)
@ -3161,16 +3165,16 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/types@7.13.1': {}
'@typescript-eslint/types@7.14.1': {}
'@typescript-eslint/typescript-estree@7.13.1(typescript@5.5.2)':
'@typescript-eslint/typescript-estree@7.14.1(typescript@5.5.2)':
dependencies:
'@typescript-eslint/types': 7.13.1
'@typescript-eslint/visitor-keys': 7.13.1
'@typescript-eslint/types': 7.14.1
'@typescript-eslint/visitor-keys': 7.14.1
debug: 4.3.5
globby: 11.1.0
is-glob: 4.0.3
minimatch: 9.0.4
minimatch: 9.0.5
semver: 7.6.2
ts-api-utils: 1.3.0(typescript@5.5.2)
optionalDependencies:
@ -3178,20 +3182,20 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@7.13.1(eslint@9.5.0)(typescript@5.5.2)':
'@typescript-eslint/utils@7.14.1(eslint@9.5.0)(typescript@5.5.2)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0)
'@typescript-eslint/scope-manager': 7.13.1
'@typescript-eslint/types': 7.13.1
'@typescript-eslint/typescript-estree': 7.13.1(typescript@5.5.2)
'@typescript-eslint/scope-manager': 7.14.1
'@typescript-eslint/types': 7.14.1
'@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2)
eslint: 9.5.0
transitivePeerDependencies:
- supports-color
- typescript
'@typescript-eslint/visitor-keys@7.13.1':
'@typescript-eslint/visitor-keys@7.14.1':
dependencies:
'@typescript-eslint/types': 7.13.1
'@typescript-eslint/types': 7.14.1
eslint-visitor-keys: 3.4.3
'@xhmikosr/archive-type@6.0.1':
@ -3373,8 +3377,8 @@ snapshots:
browserslist@4.23.1:
dependencies:
caniuse-lite: 1.0.30001636
electron-to-chromium: 1.4.805
caniuse-lite: 1.0.30001637
electron-to-chromium: 1.4.812
node-releases: 2.0.14
update-browserslist-db: 1.0.16(browserslist@4.23.1)
@ -3413,7 +3417,7 @@ snapshots:
camelcase@6.3.0: {}
caniuse-lite@1.0.30001636: {}
caniuse-lite@1.0.30001637: {}
chalk@2.4.2:
dependencies:
@ -3514,7 +3518,7 @@ snapshots:
eastasianwidth@0.2.0: {}
electron-to-chromium@1.4.805: {}
electron-to-chromium@1.4.812: {}
emittery@0.13.1: {}
@ -3539,19 +3543,19 @@ snapshots:
eslint-import-resolver-node@0.3.9:
dependencies:
debug: 3.2.7
is-core-module: 2.13.1
is-core-module: 2.14.0
resolve: 1.22.8
eslint-plugin-import-x@0.5.1(eslint@9.5.0)(typescript@5.5.2):
eslint-plugin-import-x@0.5.2(eslint@9.5.0)(typescript@5.5.2):
dependencies:
'@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2)
debug: 4.3.5
doctrine: 3.0.0
eslint: 9.5.0
eslint-import-resolver-node: 0.3.9
get-tsconfig: 4.7.5
is-glob: 4.0.3
minimatch: 9.0.4
minimatch: 9.0.5
semver: 7.6.2
tslib: 2.6.3
transitivePeerDependencies:
@ -3773,12 +3777,13 @@ snapshots:
dependencies:
is-glob: 4.0.3
glob@10.4.1:
glob@10.4.2:
dependencies:
foreground-child: 3.2.1
jackspeak: 3.4.0
minimatch: 9.0.4
minimatch: 9.0.5
minipass: 7.1.2
package-json-from-dist: 1.0.0
path-scurry: 1.11.1
glob@7.2.3:
@ -3869,7 +3874,7 @@ snapshots:
is-arrayish@0.2.1: {}
is-core-module@2.13.1:
is-core-module@2.14.0:
dependencies:
hasown: 2.0.2
@ -3956,7 +3961,7 @@ snapshots:
'@jest/expect': 30.0.0-alpha.5
'@jest/test-result': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
chalk: 4.1.2
co: 4.6.0
dedent: 1.5.3
@ -3976,7 +3981,7 @@ snapshots:
- babel-plugin-macros
- supports-color
jest-cli@30.0.0-alpha.5(@types/node@20.14.8):
jest-cli@30.0.0-alpha.5(@types/node@20.14.9):
dependencies:
'@jest/core': 30.0.0-alpha.5
'@jest/test-result': 30.0.0-alpha.5
@ -3984,7 +3989,7 @@ snapshots:
chalk: 4.1.2
exit: 0.1.2
import-local: 3.1.0
jest-config: 30.0.0-alpha.5(@types/node@20.14.8)
jest-config: 30.0.0-alpha.5(@types/node@20.14.9)
jest-util: 30.0.0-alpha.5
jest-validate: 30.0.0-alpha.5
yargs: 17.7.2
@ -3994,7 +3999,7 @@ snapshots:
- supports-color
- ts-node
jest-config@30.0.0-alpha.5(@types/node@20.14.8):
jest-config@30.0.0-alpha.5(@types/node@20.14.9):
dependencies:
'@babel/core': 7.24.7
'@jest/pattern': 30.0.0-alpha.5
@ -4004,7 +4009,7 @@ snapshots:
chalk: 4.1.2
ci-info: 4.0.0
deepmerge: 4.3.1
glob: 10.4.1
glob: 10.4.2
graceful-fs: 4.2.11
jest-circus: 30.0.0-alpha.5
jest-environment-node: 30.0.0-alpha.5
@ -4020,7 +4025,7 @@ snapshots:
slash: 3.0.0
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 20.14.8
'@types/node': 20.14.9
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@ -4049,7 +4054,7 @@ snapshots:
'@jest/environment': 30.0.0-alpha.5
'@jest/fake-timers': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
jest-mock: 30.0.0-alpha.5
jest-util: 30.0.0-alpha.5
@ -4058,7 +4063,7 @@ snapshots:
jest-haste-map@30.0.0-alpha.5:
dependencies:
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.11
@ -4097,7 +4102,7 @@ snapshots:
jest-mock@30.0.0-alpha.5:
dependencies:
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
jest-util: 30.0.0-alpha.5
jest-pnp-resolver@1.2.3(jest-resolve@30.0.0-alpha.5):
@ -4132,7 +4137,7 @@ snapshots:
'@jest/test-result': 30.0.0-alpha.5
'@jest/transform': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
chalk: 4.1.2
emittery: 0.13.1
graceful-fs: 4.2.11
@ -4160,11 +4165,11 @@ snapshots:
'@jest/test-result': 30.0.0-alpha.5
'@jest/transform': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
chalk: 4.1.2
cjs-module-lexer: 1.3.1
collect-v8-coverage: 1.0.2
glob: 10.4.1
glob: 10.4.2
graceful-fs: 4.2.11
jest-haste-map: 30.0.0-alpha.5
jest-message-util: 30.0.0-alpha.5
@ -4207,7 +4212,7 @@ snapshots:
jest-util@29.7.0:
dependencies:
'@jest/types': 29.6.3
'@types/node': 20.14.8
'@types/node': 20.14.9
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@ -4216,7 +4221,7 @@ snapshots:
jest-util@30.0.0-alpha.5:
dependencies:
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
chalk: 4.1.2
ci-info: 4.0.0
graceful-fs: 4.2.11
@ -4235,7 +4240,7 @@ snapshots:
dependencies:
'@jest/test-result': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
'@types/node': 20.14.8
'@types/node': 20.14.9
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.13.1
@ -4244,17 +4249,17 @@ snapshots:
jest-worker@30.0.0-alpha.5:
dependencies:
'@types/node': 20.14.8
'@types/node': 20.14.9
jest-util: 30.0.0-alpha.5
merge-stream: 2.0.0
supports-color: 8.1.1
jest@30.0.0-alpha.5(@types/node@20.14.8):
jest@30.0.0-alpha.5(@types/node@20.14.9):
dependencies:
'@jest/core': 30.0.0-alpha.5
'@jest/types': 30.0.0-alpha.5
import-local: 3.1.0
jest-cli: 30.0.0-alpha.5(@types/node@20.14.8)
jest-cli: 30.0.0-alpha.5(@types/node@20.14.9)
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
@ -4354,7 +4359,7 @@ snapshots:
dependencies:
brace-expansion: 1.1.11
minimatch@9.0.4:
minimatch@9.0.5:
dependencies:
brace-expansion: 2.0.1
@ -4429,6 +4434,8 @@ snapshots:
p-try@2.2.0: {}
package-json-from-dist@1.0.0: {}
parent-module@1.0.1:
dependencies:
callsites: 3.1.0
@ -4521,7 +4528,7 @@ snapshots:
resolve@1.22.8:
dependencies:
is-core-module: 2.13.1
is-core-module: 2.14.0
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
@ -4706,7 +4713,7 @@ snapshots:
dependencies:
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
jest: 30.0.0-alpha.5(@types/node@20.14.8)
jest: 30.0.0-alpha.5(@types/node@20.14.9)
jest-util: 29.7.0
json5: 2.2.3
lodash.memoize: 4.1.2
@ -4728,11 +4735,11 @@ snapshots:
type-fest@0.21.3: {}
typescript-eslint@7.13.1(eslint@9.5.0)(typescript@5.5.2):
typescript-eslint@7.14.1(eslint@9.5.0)(typescript@5.5.2):
dependencies:
'@typescript-eslint/eslint-plugin': 7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.5.0)(typescript@5.5.2))(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/parser': 7.14.1(eslint@9.5.0)(typescript@5.5.2)
'@typescript-eslint/utils': 7.14.1(eslint@9.5.0)(typescript@5.5.2)
eslint: 9.5.0
optionalDependencies:
typescript: 5.5.2
@ -4760,7 +4767,7 @@ snapshots:
util-deprecate@1.0.2: {}
v8-to-istanbul@9.2.0:
v8-to-istanbul@9.3.0:
dependencies:
'@jridgewell/trace-mapping': 0.3.25
'@types/istanbul-lib-coverage': 2.0.6

View file

@ -1,5 +1,5 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "86b99f0ac4b5e7a91aa4f39f597dd7ba15844812",
"pnpmShrinkwrapHash": "4268d369f3d5b02e089540e98cb1fa9074cba8c9",
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
}

View file

@ -37,7 +37,7 @@
"@yume-chan/struct": "workspace:^0.0.24"
},
"devDependencies": {
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@yume-chan/eslint-config": "workspace:^1.0.0",
"@yume-chan/tsconfig": "workspace:^1.0.0",
"jest": "^30.0.0-alpha.4",

View file

@ -40,7 +40,7 @@
},
"devDependencies": {
"@jest/globals": "^30.0.0-alpha.4",
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@yume-chan/eslint-config": "workspace:^1.0.0",
"@yume-chan/tsconfig": "workspace:^1.0.0",
"cross-env": "^7.0.3",

View file

@ -20,14 +20,14 @@ export interface AdbTcpIpListenAddresses {
persistPort: number | undefined;
}
export class AdbTcpIpCommand extends AdbCommandBase {
#parsePort(value: string): number | undefined {
function parsePort(value: string): number | undefined {
if (!value || value === "0") {
return undefined;
}
return Number.parseInt(value, 10);
}
export class AdbTcpIpCommand extends AdbCommandBase {
async getListenAddresses(): Promise<AdbTcpIpListenAddresses> {
const serviceListenAddresses = await this.adb.getProp(
"service.adb.listen_addrs",
@ -40,8 +40,8 @@ export class AdbTcpIpCommand extends AdbCommandBase {
serviceListenAddresses != ""
? serviceListenAddresses.split(",")
: [],
servicePort: this.#parsePort(servicePort),
persistPort: this.#parsePort(persistPort),
servicePort: parsePort(servicePort),
persistPort: parsePort(persistPort),
};
}

View file

@ -38,7 +38,8 @@ export function getBigUint(
* @param littleEndian If `false` or `undefined`, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
// eslint-disable-next-line max-params
// eslint-disable-next-line @typescript-eslint/max-params
export function setBigUint(
array: Uint8Array,
byteOffset: number,

View file

@ -136,6 +136,78 @@ class AdbServerStream {
export class AdbServerClient {
static readonly VERSION = 41;
static parseDeviceList(value: string): AdbServerClient.Device[] {
const devices: AdbServerClient.Device[] = [];
for (const line of value.split("\n")) {
if (!line) {
continue;
}
const parts = line.split(" ").filter(Boolean);
const serial = parts[0]!;
const status = parts[1]!;
if (status !== "device" && status !== "unauthorized") {
continue;
}
let product: string | undefined;
let model: string | undefined;
let device: string | undefined;
let transportId: bigint | undefined;
for (let i = 2; i < parts.length; i += 1) {
const [key, value] = parts[i]!.split(":");
switch (key) {
case "product":
product = value;
break;
case "model":
model = value;
break;
case "device":
device = value;
break;
case "transport_id":
transportId = BigInt(value!);
break;
}
}
if (!transportId) {
throw new Error(`No transport id for device ${serial}`);
}
devices.push({
serial,
authenticating: status === "unauthorized",
product,
model,
device,
transportId,
});
}
return devices;
}
static formatDeviceService(
device: AdbServerClient.DeviceSelector,
command: string,
) {
if (!device) {
return `host:${command}`;
}
if ("transportId" in device) {
return `host-transport-id:${device.transportId}:${command}`;
}
if ("serial" in device) {
return `host-serial:${device.serial}:${command}`;
}
if ("usb" in device) {
return `host-usb:${command}`;
}
if ("tcp" in device) {
return `host-local:${command}`;
}
throw new TypeError("Invalid device selector");
}
readonly connector: AdbServerClient.ServerConnector;
readonly wireless = new AdbServerClient.WirelessCommands(this);
@ -214,56 +286,6 @@ export class AdbServerClient {
}
}
parseDeviceList(value: string): AdbServerClient.Device[] {
const devices: AdbServerClient.Device[] = [];
for (const line of value.split("\n")) {
if (!line) {
continue;
}
const parts = line.split(" ").filter(Boolean);
const serial = parts[0]!;
const status = parts[1]!;
if (status !== "device" && status !== "unauthorized") {
continue;
}
let product: string | undefined;
let model: string | undefined;
let device: string | undefined;
let transportId: bigint | undefined;
for (let i = 2; i < parts.length; i += 1) {
const [key, value] = parts[i]!.split(":");
switch (key) {
case "product":
product = value;
break;
case "model":
model = value;
break;
case "device":
device = value;
break;
case "transport_id":
transportId = BigInt(value!);
break;
}
}
if (!transportId) {
throw new Error(`No transport id for device ${serial}`);
}
devices.push({
serial,
authenticating: status === "unauthorized",
product,
model,
device,
transportId,
});
}
return devices;
}
/**
* `adb devices -l`
*/
@ -271,7 +293,7 @@ export class AdbServerClient {
const connection = await this.createConnection("host:devices-l");
try {
const response = await connection.readString();
return this.parseDeviceList(response);
return AdbServerClient.parseDeviceList(response);
} finally {
await connection.dispose();
}
@ -294,7 +316,7 @@ export class AdbServerClient {
async () => await connection.readString(),
signal,
);
const devices = this.parseDeviceList(response);
const devices = AdbServerClient.parseDeviceList(response);
yield devices;
}
} catch (e) {
@ -306,28 +328,6 @@ export class AdbServerClient {
}
}
formatDeviceService(
device: AdbServerClient.DeviceSelector,
command: string,
) {
if (!device) {
return `host:${command}`;
}
if ("transportId" in device) {
return `host-transport-id:${device.transportId}:${command}`;
}
if ("serial" in device) {
return `host-serial:${device.serial}:${command}`;
}
if ("usb" in device) {
return `host-usb:${command}`;
}
if ("tcp" in device) {
return `host-local:${command}`;
}
throw new TypeError("Invalid device selector");
}
/**
* `adb -s <device> reconnect` or `adb reconnect offline`
*/
@ -335,7 +335,7 @@ export class AdbServerClient {
const connection = await this.createConnection(
device === "offline"
? "host:reconnect-offline"
: this.formatDeviceService(device, "reconnect"),
: AdbServerClient.formatDeviceService(device, "reconnect"),
);
try {
await connection.readString();
@ -485,7 +485,7 @@ export class AdbServerClient {
// `waitFor` can't use `connectDevice`, because the device
// might not be available yet.
const service = this.formatDeviceService(
const service = AdbServerClient.formatDeviceService(
device,
`wait-for-${type}-${state}`,
);

View file

@ -1,14 +1,12 @@
import { describe, expect, it } from "@jest/globals";
import { IntentBuilder } from "./intent.js";
describe("Intent", () => {
describe("IntentBuilder", () => {
it("should set intent action", () => {
expect(
new IntentBuilder()
.setAction("test_action")
.build(),
new IntentBuilder().setAction("test_action").build(),
).toEqual(["-a", "test_action"]);
});
@ -22,34 +20,27 @@ describe("Intent", () => {
});
it("should set intent package", () => {
expect(
new IntentBuilder()
.setPackage("package_1")
.build(),
).toEqual(["-p", "package_1"]);
expect(new IntentBuilder().setPackage("package_1").build()).toEqual(
["-p", "package_1"],
);
});
it("should set intent component", () => {
expect(
new IntentBuilder()
.setComponent("component_1")
.build(),
new IntentBuilder().setComponent("component_1").build(),
).toEqual(["-n", "component_1"]);
});
it("should set intent data", () => {
expect(
new IntentBuilder()
.setData("data_1")
.build(),
).toEqual(["-d", "data_1"]);
expect(new IntentBuilder().setData("data_1").build()).toEqual([
"-d",
"data_1",
]);
});
it("should pass intent extras", () => {
expect(
new IntentBuilder()
.addStringExtra("key1", "value1")
.build(),
new IntentBuilder().addStringExtra("key1", "value1").build(),
).toEqual(["--es", "key1", "value1"]);
});
});

View file

@ -5,7 +5,7 @@ export class IntentBuilder {
#component: string | undefined;
#data: string | undefined;
#type: string | undefined;
#stringExtras: Map<string, string> = new Map<string, string>();
#stringExtras = new Map<string, string>();
setAction(action: string): this {
this.#action = action;
@ -64,9 +64,9 @@ export class IntentBuilder {
result.push("-t", this.#type);
}
this.#stringExtras.forEach((value, key) => {
for (const [key, value] of this.#stringExtras) {
result.push("--es", key, value);
});
}
return result;
}

View file

@ -255,15 +255,7 @@ const PACKAGE_MANAGER_RESOLVE_ACTIVITY_OPTIONS_MAP: Partial<
user: "--user",
};
export class PackageManager extends AdbCommandBase {
#cmd: Cmd;
constructor(adb: Adb) {
super(adb);
this.#cmd = new Cmd(adb);
}
#buildInstallArguments(
function buildInstallArguments(
command: string,
options: Partial<PackageManagerInstallOptions> | undefined,
): string[] {
@ -279,7 +271,7 @@ export class PackageManager extends AdbCommandBase {
* | replace existing app | requires `-r` | default behavior [1] |
* | skip existing app | default behavior [2] | requires `-R` |
*
* [1]: `-r` recognized but ignored)
* [1]: `-r` recognized but ignored
* [2]: `-R` not recognized but ignored
*
* So add `-r` when `skipExisting` is `false` for compatibility.
@ -289,6 +281,14 @@ export class PackageManager extends AdbCommandBase {
return args;
}
export class PackageManager extends AdbCommandBase {
#cmd: Cmd;
constructor(adb: Adb) {
super(adb);
this.#cmd = new Cmd(adb);
}
/**
* Install the apk file.
*
@ -298,7 +298,7 @@ export class PackageManager extends AdbCommandBase {
apks: string[],
options?: Partial<PackageManagerInstallOptions>,
): Promise<string> {
const args = this.#buildInstallArguments("install", options);
const args = buildInstallArguments("install", options);
// WIP: old version of pm doesn't support multiple apks
args.push(...apks);
return await this.adb.subprocess.spawnAndWaitLegacy(args);
@ -331,7 +331,7 @@ export class PackageManager extends AdbCommandBase {
// read files in `/data/local/tmp` (and many other places) due to SELinux policies,
// so installing files must still use `pm`.
// (the starting executable file decides which SELinux policies to apply)
const args = this.#buildInstallArguments("install", options);
const args = buildInstallArguments("install", options);
args.push(filePath);
try {
@ -362,7 +362,7 @@ export class PackageManager extends AdbCommandBase {
return;
}
const args = this.#buildInstallArguments("install", options);
const args = buildInstallArguments("install", options);
// Remove `pm` from args, `Cmd#spawn` will prepend `cmd <command>` so the final args
// will be `cmd package install <args>`
args.shift();
@ -536,7 +536,7 @@ export class PackageManager extends AdbCommandBase {
async sessionCreate(
options?: Partial<PackageManagerInstallOptions>,
): Promise<number> {
const args = this.#buildInstallArguments("install-create", options);
const args = buildInstallArguments("install-create", options);
const process = await this.#cmdOrSubprocess(args);
const output = await process.stdout

View file

@ -30,6 +30,6 @@
"gh-release-fetch": "^4.0.3"
},
"devDependencies": {
"@types/node": "^20.14.8"
"@types/node": "^20.14.9"
}
}

View file

@ -31,7 +31,7 @@
},
"devDependencies": {
"@jest/globals": "^30.0.0-alpha.4",
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@yume-chan/eslint-config": "workspace:^1.0.0",
"@yume-chan/tsconfig": "workspace:^1.0.0",
"cross-env": "^7.0.3",

View file

@ -31,7 +31,7 @@
},
"devDependencies": {
"@jest/globals": "^30.0.0-alpha.4",
"@types/audioworklet": "^0.0.55",
"@types/audioworklet": "^0.0.56",
"@yume-chan/eslint-config": "workspace:^1.0.0",
"@yume-chan/tsconfig": "workspace:^1.0.0",
"cross-env": "^7.0.3",

View file

@ -15,10 +15,10 @@ describe("StructFieldDefinition", () => {
constructor(options: number) {
super(options);
}
getSize(): number {
override getSize(): number {
throw new Error("Method not implemented.");
}
create(
override create(
options: Readonly<StructOptions>,
struct: StructValue,
value: unknown,
@ -38,7 +38,7 @@ describe("StructFieldDefinition", () => {
stream: AsyncExactReadable,
struct: StructValue,
): Promise<StructFieldValue<this>>;
deserialize(
override deserialize(
options: Readonly<StructOptions>,
stream: ExactReadable | AsyncExactReadable,
struct: StructValue,

View file

@ -13,7 +13,7 @@ describe("StructFieldValue", () => {
describe(".constructor", () => {
it("should save parameters", () => {
class MockStructFieldValue extends StructFieldValue<never> {
serialize(
override serialize(
dataView: DataView,
array: Uint8Array,
offset: number,
@ -46,10 +46,10 @@ describe("StructFieldValue", () => {
describe("#getSize", () => {
it("should return same value as definition's", () => {
class MockFieldDefinition extends StructFieldDefinition {
getSize(): number {
override getSize(): number {
return 42;
}
create(
override create(
options: Readonly<StructOptions>,
struct: StructValue,
value: unknown,
@ -83,7 +83,7 @@ describe("StructFieldValue", () => {
}
class MockStructFieldValue extends StructFieldValue<any> {
serialize(
override serialize(
dataView: DataView,
array: Uint8Array,
offset: number,
@ -109,7 +109,7 @@ describe("StructFieldValue", () => {
describe("#set", () => {
it("should update its internal value", () => {
class MockStructFieldValue extends StructFieldValue<any> {
serialize(
override serialize(
dataView: DataView,
array: Uint8Array,
offset: number,

View file

@ -48,7 +48,7 @@ describe("Struct", () => {
return this.options;
});
create(
override create(
options: Readonly<StructOptions>,
struct: StructValue,
value: unknown,

View file

@ -113,10 +113,7 @@ class RejectedSyncPromise<T> implements SyncPromise<T> {
}
then<TResult1 = T, TResult2 = never>(
onfulfilled?:
| ((value: T) => TResult1 | PromiseLike<TResult1>)
| null
| undefined,
_?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined,
onrejected?:
| ((reason: unknown) => TResult2 | PromiseLike<TResult2>)
| null

View file

@ -109,11 +109,7 @@ export class BigIntFieldDefinition<
export class BigIntFieldValue<
TDefinition extends BigIntFieldDefinition<BigIntFieldVariant, unknown>,
> extends StructFieldValue<TDefinition> {
override serialize(
dataView: DataView,
array: Uint8Array,
offset: number,
): void {
override serialize(_: DataView, array: Uint8Array, offset: number): void {
this.definition.variant.serialize(
array,
offset,

View file

@ -59,15 +59,15 @@ export class Uint8ArrayBufferFieldConverter<
super();
}
toBuffer(value: Uint8Array): Uint8Array {
override toBuffer(value: Uint8Array): Uint8Array {
return value;
}
toValue(buffer: Uint8Array): Uint8Array {
override toValue(buffer: Uint8Array): Uint8Array {
return buffer;
}
getSize(value: Uint8Array): number {
override getSize(value: Uint8Array): number {
return value.length;
}
}
@ -78,15 +78,15 @@ export class StringBufferFieldConverter<
> extends BufferFieldConverter<string, TTypeScriptType> {
static readonly Instance = new StringBufferFieldConverter();
toBuffer(value: string): Uint8Array {
override toBuffer(value: string): Uint8Array {
return encodeUtf8(value);
}
toValue(array: Uint8Array): string {
override toValue(array: Uint8Array): string {
return decodeUtf8(array);
}
getSize(): number | undefined {
override getSize(): number | undefined {
// See the note in `BufferFieldConverter.getSize`
return undefined;
}
@ -169,7 +169,7 @@ export class BufferLikeFieldValue<
> extends StructFieldValue<TDefinition> {
protected array: Uint8Array | undefined;
// eslint-disable-next-line max-params
// eslint-disable-next-line @typescript-eslint/max-params
constructor(
definition: TDefinition,
options: Readonly<StructOptions>,
@ -188,11 +188,7 @@ export class BufferLikeFieldValue<
this.array = undefined;
}
override serialize(
dataView: DataView,
array: Uint8Array,
offset: number,
): void {
override serialize(_: DataView, array: Uint8Array, offset: number): void {
this.array ??= this.definition.converter.toBuffer(this.value);
array.set(this.array, offset);
}

View file

@ -40,7 +40,7 @@ class MockLengthFieldValue extends StructFieldValue<any> {
});
serialize = jest.fn(
(dataView: DataView, array: Uint8Array, offset: number): void => {
(dataView: DataView, _: Uint8Array, offset: number): void => {
void dataView;
void offset;
},
@ -64,7 +64,7 @@ describe("Types", () => {
override getSize = jest.fn(() => this.size);
serialize(
override serialize(
dataView: DataView,
array: Uint8Array,
offset: number,

View file

@ -45,7 +45,7 @@ export class VariableLengthBufferLikeFieldDefinition<
TOptions["lengthField"],
TTypeScriptType
> {
getSize(): number {
override getSize(): number {
return 0;
}
@ -81,7 +81,7 @@ export class VariableLengthBufferLikeStructFieldValue<
protected lengthFieldValue: VariableLengthBufferLikeFieldLengthValue;
// eslint-disable-next-line max-params
// eslint-disable-next-line @typescript-eslint/max-params
constructor(
definition: TDefinition,
options: Readonly<StructOptions>,

View file

@ -155,7 +155,7 @@ export class NumberFieldDefinition<
export class NumberFieldValue<
TDefinition extends NumberFieldDefinition<NumberFieldVariant, unknown>,
> extends StructFieldValue<TDefinition> {
serialize(dataView: DataView, array: Uint8Array, offset: number): void {
serialize(dataView: DataView, _: Uint8Array, offset: number): void {
this.definition.variant.serialize(
dataView,
offset,

View file

@ -25,12 +25,6 @@ export default tslint.config(
maxBOF: 0,
},
],
"max-params": [
"error",
{
max: 4,
},
],
},
},
...tslint.configs.recommendedTypeChecked,
@ -56,6 +50,17 @@ export default tslint.config(
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
// causes too much false positive (with interface), only check periodically
// "@typescript-eslint/class-methods-use-this": [
// "error",
// { ignoreOverrideMethods: true },
// ],
"@typescript-eslint/max-params": [
"error",
{
max: 4,
},
],
},
},
{

View file

@ -8,11 +8,11 @@
},
"dependencies": {
"@eslint/js": "^9.5.0",
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"eslint": "^9.5.0",
"eslint-plugin-import-x": "^0.5.1",
"eslint-plugin-import-x": "^0.5.2",
"typescript": "^5.5.2",
"typescript-eslint": "^7.13.1"
"typescript-eslint": "^7.14.1"
},
"devDependencies": {
"prettier": "^3.3.2"

View file

@ -22,7 +22,7 @@
"strict": true, // /* Enable all strict type-checking options. */
/* Additional Checks */
"noUnusedLocals": true, // /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
"noUnusedParameters": true, // /* Report errors on unused parameters. */
"noImplicitOverride": true,
"noImplicitReturns": true, // /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, // /* Report errors for fallthrough cases in switch statement. */