diff --git a/.vscode/settings.json b/.vscode/settings.json index fac86cac..825f9309 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -98,8 +98,14 @@ "typescript.preferences.quoteStyle": "single", "typescript.format.semicolons": "insert", "editor.formatOnSave": true, + "eslint.nodePath": "./toolchain/eslint-config/node_modules/eslint", + "eslint.options": { + "overrideConfigFile": "./node_modules/@yume-chan/eslint-config/eslint.config.js" + }, "eslint.workingDirectories": [ - "libraries/*", + { + "pattern": "libraries/*", + } ], "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" diff --git a/apps/cli/package.json b/apps/cli/package.json index 68df7858..5ba27a78 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -28,7 +28,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", - "lint": "eslint src/**/*.ts --fix" + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4" }, "bin": { "tango-cli": "esm/index.js" @@ -43,12 +43,11 @@ "tslib": "^2.6.2" }, "devDependencies": { - "@types/node": "^20.12.4", + "@types/node": "^20.12.7", "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a459efb1..59b6ff9b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -33,26 +33,23 @@ importers: version: 2.6.2 devDependencies: '@types/node': - specifier: ^20.12.4 - version: 20.12.4 + specifier: ^20.12.7 + version: 20.12.7 '@yume-chan/eslint-config': specifier: workspace:^1.0.0 version: link:../../toolchain/eslint-config '@yume-chan/tsconfig': specifier: workspace:^1.0.0 version: link:../../toolchain/tsconfig - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/adb: dependencies: @@ -79,8 +76,8 @@ importers: specifier: ^30.0.0-alpha.3 version: 30.0.0-alpha.3 '@types/node': - specifier: ^20.12.4 - version: 20.12.4 + specifier: ^20.12.7 + version: 20.12.7 '@yume-chan/eslint-config': specifier: workspace:^1.0.0 version: link:../../toolchain/eslint-config @@ -90,21 +87,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/adb-credential-web: dependencies: @@ -121,15 +115,12 @@ importers: '@yume-chan/tsconfig': specifier: workspace:^1.0.0 version: link:../../toolchain/tsconfig - eslint: - specifier: ^8.57.0 - version: 8.57.0 prettier: specifier: ^3.2.5 version: 3.2.5 typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/adb-daemon-webusb: dependencies: @@ -155,15 +146,12 @@ importers: '@yume-chan/tsconfig': specifier: workspace:^1.0.0 version: link:../../toolchain/tsconfig - eslint: - specifier: ^8.57.0 - version: 8.57.0 prettier: specifier: ^3.2.5 version: 3.2.5 typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/adb-scrcpy: dependencies: @@ -201,21 +189,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/adb-server-node-tcp: dependencies: @@ -233,26 +218,23 @@ importers: version: 2.6.2 devDependencies: '@types/node': - specifier: ^20.12.4 - version: 20.12.4 + specifier: ^20.12.7 + version: 20.12.7 '@yume-chan/eslint-config': specifier: workspace:^1.0.0 version: link:../../toolchain/eslint-config '@yume-chan/tsconfig': specifier: workspace:^1.0.0 version: link:../../toolchain/tsconfig - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/android-bin: dependencies: @@ -281,21 +263,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/aoa: dependencies: @@ -312,12 +291,9 @@ importers: '@yume-chan/tsconfig': specifier: workspace:^1.0.0 version: link:../../toolchain/tsconfig - eslint: - specifier: ^8.57.0 - version: 8.57.0 typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/dataview-bigint-polyfill: dependencies: @@ -331,18 +307,15 @@ importers: '@yume-chan/tsconfig': specifier: workspace:^1.0.0 version: link:../../toolchain/tsconfig - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/event: dependencies: @@ -365,21 +338,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/fetch-scrcpy-server: dependencies: @@ -388,8 +358,8 @@ importers: version: 4.0.3 devDependencies: '@types/node': - specifier: ^20.12.4 - version: 20.12.4 + specifier: ^20.12.7 + version: 20.12.7 ../../libraries/pcm-player: dependencies: @@ -412,21 +382,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/scrcpy: dependencies: @@ -452,21 +419,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/scrcpy-decoder-tinyh264: dependencies: @@ -507,21 +471,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/scrcpy-decoder-webcodecs: dependencies: @@ -553,21 +514,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/stream-extra: dependencies: @@ -593,21 +551,18 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../libraries/struct: dependencies: @@ -630,42 +585,39 @@ importers: cross-env: specifier: ^7.0.3 version: 7.0.3 - eslint: - specifier: ^8.57.0 - version: 8.57.0 jest: specifier: ^30.0.0-alpha.3 - version: 30.0.0-alpha.3(@types/node@20.12.4) + version: 30.0.0-alpha.3(@types/node@20.12.7) prettier: specifier: ^3.2.5 version: 3.2.5 ts-jest: specifier: ^29.1.2 - version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4) + version: 29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 ../../toolchain/eslint-config: dependencies: - '@rushstack/eslint-patch': - specifier: ^1.10.1 - version: 1.10.1 - '@typescript-eslint/eslint-plugin': - specifier: ^7.5.0 - version: 7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4) - '@typescript-eslint/parser': - specifier: ^7.5.0 - version: 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@eslint/js': + specifier: ^9.0.0 + version: 9.0.0 + '@types/node': + specifier: ^20.12.7 + version: 20.12.7 eslint: - specifier: ^8.57.0 - version: 8.57.0 + specifier: ^9.0.0 + version: 9.0.0 eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(eslint@8.57.0) + version: 2.29.1(eslint@9.0.0) typescript: - specifier: ^5.4.4 - version: 5.4.4 + specifier: ^5.4.5 + version: 5.4.5 + typescript-eslint: + specifier: ^7.6.0 + version: 7.6.0(eslint@9.0.0)(typescript@5.4.5) devDependencies: prettier: specifier: ^3.2.5 @@ -682,6 +634,7 @@ packages: /@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} + dev: false /@ampproject/remapping@2.3.0: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} @@ -1018,27 +971,29 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): + /@eslint-community/eslint-utils@4.4.0(eslint@9.0.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.57.0 + eslint: 9.0.0 eslint-visitor-keys: 3.4.3 + dev: false /@eslint-community/regexpp@4.10.0: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: false - /@eslint/eslintrc@2.1.4: - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@eslint/eslintrc@3.0.2: + resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.6.1 - globals: 13.24.0 + espree: 10.0.1 + globals: 14.0.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -1046,27 +1001,32 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color + dev: false - /@eslint/js@8.57.0: - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@eslint/js@9.0.0: + resolution: {integrity: sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dev: false - /@humanwhocodes/config-array@0.11.14: - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + /@humanwhocodes/config-array@0.12.3: + resolution: {integrity: sha512-jsNnTBlMWuTpDkeE3on7+dWJi0D6fdDfeANj/w7MpS8ztROCoLvIO2nG0CcFj+E4k8j4QrSTh4Oryi3i2G669g==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.2 + '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color + dev: false /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} + dev: false - /@humanwhocodes/object-schema@2.0.2: - resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + /@humanwhocodes/object-schema@2.0.3: + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + dev: false /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -1101,7 +1061,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 chalk: 4.1.2 jest-message-util: 30.0.0-alpha.3 jest-util: 30.0.0-alpha.3 @@ -1122,14 +1082,14 @@ packages: '@jest/test-result': 30.0.0-alpha.3 '@jest/transform': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 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.3 - jest-config: 30.0.0-alpha.3(@types/node@20.12.4) + jest-config: 30.0.0-alpha.3(@types/node@20.12.7) jest-haste-map: 30.0.0-alpha.3 jest-message-util: 30.0.0-alpha.3 jest-regex-util: 30.0.0-alpha.3 @@ -1157,7 +1117,7 @@ packages: dependencies: '@jest/fake-timers': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 jest-mock: 30.0.0-alpha.3 dev: true @@ -1184,7 +1144,7 @@ packages: dependencies: '@jest/types': 30.0.0-alpha.3 '@sinonjs/fake-timers': 11.2.2 - '@types/node': 20.12.4 + '@types/node': 20.12.7 jest-message-util: 30.0.0-alpha.3 jest-mock: 30.0.0-alpha.3 jest-util: 30.0.0-alpha.3 @@ -1217,7 +1177,7 @@ packages: '@jest/transform': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.12.4 + '@types/node': 20.12.7 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -1312,7 +1272,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.12.4 + '@types/node': 20.12.7 '@types/yargs': 17.0.32 chalk: 4.1.2 dev: true @@ -1324,7 +1284,7 @@ packages: '@jest/schemas': 30.0.0-alpha.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.12.4 + '@types/node': 20.12.7 '@types/yargs': 17.0.32 chalk: 4.1.2 dev: true @@ -1365,10 +1325,12 @@ packages: dependencies: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.2.0 + dev: false /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} + dev: false /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} @@ -1376,6 +1338,7 @@ packages: dependencies: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + dev: false /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} @@ -1389,10 +1352,6 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rushstack/eslint-patch@1.10.1: - resolution: {integrity: sha512-S3Kq8e7LqxkA9s7HKLqXGTGck1uwis5vAXan3FnU5yw1Ec5hsSGnq4s/UCaSqABPOnOTg7zASLyst7+ohgWexg==} - dev: false - /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true @@ -1490,11 +1449,10 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: false - /@types/node@20.12.4: - resolution: {integrity: sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==} + /@types/node@20.12.7: + resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} dependencies: undici-types: 5.26.5 - dev: true /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -1518,8 +1476,8 @@ packages: '@types/yargs-parser': 21.0.3 dev: true - /@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4): - resolution: {integrity: sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==} + /@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.5): + resolution: {integrity: sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1530,25 +1488,25 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.4) - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/parser': 7.6.0(eslint@9.0.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.6.0 + '@typescript-eslint/type-utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.6.0 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.4) - typescript: 5.4.4 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.4): - resolution: {integrity: sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==} + /@typescript-eslint/parser@7.6.0(eslint@9.0.0)(typescript@5.4.5): + resolution: {integrity: sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1557,27 +1515,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/scope-manager': 7.6.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.6.0 debug: 4.3.4 - eslint: 8.57.0 - typescript: 5.4.4 + eslint: 9.0.0 + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/scope-manager@7.5.0: - resolution: {integrity: sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==} + /@typescript-eslint/scope-manager@7.6.0: + resolution: {integrity: sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/visitor-keys': 7.6.0 dev: false - /@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.4): - resolution: {integrity: sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==} + /@typescript-eslint/type-utils@7.6.0(eslint@9.0.0)(typescript@5.4.5): + resolution: {integrity: sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1586,23 +1544,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) debug: 4.3.4 - eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.4) - typescript: 5.4.4 + eslint: 9.0.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/types@7.5.0: - resolution: {integrity: sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==} + /@typescript-eslint/types@7.6.0: + resolution: {integrity: sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==} engines: {node: ^18.18.0 || >=20.0.0} dev: false - /@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.4): - resolution: {integrity: sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==} + /@typescript-eslint/typescript-estree@7.6.0(typescript@5.4.5): + resolution: {integrity: sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1610,49 +1568,46 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/visitor-keys': 7.6.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.3 + minimatch: 9.0.4 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.4) - typescript: 5.4.4 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.4): - resolution: {integrity: sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==} + /@typescript-eslint/utils@7.6.0(eslint@9.0.0)(typescript@5.4.5): + resolution: {integrity: sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) - eslint: 8.57.0 + '@typescript-eslint/scope-manager': 7.6.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.5) + eslint: 9.0.0 semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript dev: false - /@typescript-eslint/visitor-keys@7.5.0: - resolution: {integrity: sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==} + /@typescript-eslint/visitor-keys@7.6.0: + resolution: {integrity: sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/types': 7.6.0 eslint-visitor-keys: 3.4.3 dev: false - /@ungap/structured-clone@1.2.0: - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - /@xhmikosr/archive-type@6.0.1: resolution: {integrity: sha512-PB3NeJL8xARZt52yDBupK0dNPn8uIVQDe15qNehUpoeeLWCZyAOam4vGXnoZGz2N9D1VXtjievJuCsXam2TmbQ==} engines: {node: ^14.14.0 || >=16.0.0} @@ -1739,11 +1694,13 @@ packages: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.11.3 + dev: false /acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true + dev: false /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -1752,6 +1709,7 @@ packages: fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.4.1 + dev: false /ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} @@ -1808,6 +1766,7 @@ packages: /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: false /array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} @@ -2238,6 +2197,7 @@ packages: /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: false /deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} @@ -2291,12 +2251,6 @@ packages: esutils: 2.0.3 dev: false - /doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dependencies: - esutils: 2.0.3 - /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true @@ -2429,6 +2383,7 @@ packages: /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + dev: false /escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} @@ -2443,7 +2398,7 @@ packages: resolve: 1.22.8 dev: false - /eslint-module-utils@2.8.1(eslint@8.57.0): + /eslint-module-utils@2.8.1(eslint@9.0.0): resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} peerDependencies: @@ -2453,10 +2408,10 @@ packages: optional: true dependencies: debug: 3.2.7 - eslint: 8.57.0 + eslint: 9.0.0 dev: false - /eslint-plugin-import@2.29.1(eslint@8.57.0): + /eslint-plugin-import@2.29.1(eslint@9.0.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -2468,9 +2423,9 @@ packages: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.0 + eslint: 9.0.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(eslint@8.57.0) + eslint-module-utils: 2.8.1(eslint@9.0.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -2482,52 +2437,55 @@ packages: tsconfig-paths: 3.15.0 dev: false - /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.0.1: + resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 + dev: false /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} + dev: false - /eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dev: false + + /eslint@9.0.0: + resolution: {integrity: sha512-IMryZ5SudxzQvuod6rUdIUz29qFItWx281VhtFVc2Psy/ZhlCeD/5DT6lBIJ4H3G+iamGJoTln1v+QSuPw0p7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/eslintrc': 3.0.2 + '@eslint/js': 9.0.0 + '@humanwhocodes/config-array': 0.12.3 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.4 - 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 + eslint-scope: 8.0.1 + eslint-visitor-keys: 4.0.0 + espree: 10.0.1 esquery: 1.5.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.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -2538,14 +2496,16 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - supports-color + dev: false - /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.0.1: + resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: acorn: 8.11.3 acorn-jsx: 5.3.2(acorn@8.11.3) - eslint-visitor-keys: 3.4.3 + eslint-visitor-keys: 4.0.0 + dev: false /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -2558,20 +2518,24 @@ packages: engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 + dev: false /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} dependencies: estraverse: 5.3.0 + dev: false /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + dev: false /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + dev: false /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} @@ -2621,6 +2585,7 @@ packages: /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: false /fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} @@ -2642,11 +2607,13 @@ packages: /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: false /fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} dependencies: reusify: 1.0.4 + dev: false /fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} @@ -2668,11 +2635,12 @@ packages: web-streams-polyfill: 3.3.3 dev: false - /file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + /file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 + dev: false /file-type@18.7.0: resolution: {integrity: sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==} @@ -2717,17 +2685,19 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 + dev: false - /flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + /flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 + dev: false /flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + dev: false /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -2757,6 +2727,7 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} @@ -2843,6 +2814,7 @@ packages: engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 + dev: false /glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} @@ -2865,17 +2837,17 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 + dev: true /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} dev: true - /globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 + /globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + dev: false /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} @@ -2924,6 +2896,7 @@ packages: /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: false /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -2995,6 +2968,7 @@ packages: /ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + dev: false /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} @@ -3002,6 +2976,7 @@ packages: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 + dev: false /import-local@3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} @@ -3021,6 +2996,7 @@ packages: dependencies: once: 1.4.0 wrappy: 1.0.2 + dev: true /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -3086,6 +3062,7 @@ packages: /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + dev: false /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} @@ -3102,6 +3079,7 @@ packages: engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 + dev: false /is-negative-zero@2.0.3: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} @@ -3122,6 +3100,7 @@ packages: /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + dev: false /is-plain-obj@1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} @@ -3277,7 +3256,7 @@ packages: '@jest/expect': 30.0.0-alpha.3 '@jest/test-result': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -3298,7 +3277,7 @@ packages: - supports-color dev: true - /jest-cli@30.0.0-alpha.3(@types/node@20.12.4): + /jest-cli@30.0.0-alpha.3(@types/node@20.12.7): resolution: {integrity: sha512-z1aQDxDe0VeDSEUeMr9MrfI5cc2SSCiKtG0Rt3XDfTgWrzyoakVds/9QMkkpNKHryCBzZZKOMe5W2uy7qM4WOA==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} hasBin: true @@ -3314,7 +3293,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 import-local: 3.1.0 - jest-config: 30.0.0-alpha.3(@types/node@20.12.4) + jest-config: 30.0.0-alpha.3(@types/node@20.12.7) jest-util: 30.0.0-alpha.3 jest-validate: 30.0.0-alpha.3 yargs: 17.7.2 @@ -3325,7 +3304,7 @@ packages: - ts-node dev: true - /jest-config@30.0.0-alpha.3(@types/node@20.12.4): + /jest-config@30.0.0-alpha.3(@types/node@20.12.7): resolution: {integrity: sha512-3eqS6gcsaPtcpU/VVlkLx1se1JiH18uh1Xg+oOf6FhlLDvAT5h6+dvWa2IpyucCN46dHHEw3E85qfjogq4XLtw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: @@ -3340,7 +3319,7 @@ packages: '@babel/core': 7.24.0 '@jest/test-sequencer': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 babel-jest: 30.0.0-alpha.3(@babel/core@7.24.0) chalk: 4.1.2 ci-info: 4.0.0 @@ -3400,7 +3379,7 @@ packages: '@jest/environment': 30.0.0-alpha.3 '@jest/fake-timers': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 jest-mock: 30.0.0-alpha.3 jest-util: 30.0.0-alpha.3 dev: true @@ -3415,7 +3394,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -3466,7 +3445,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 jest-util: 30.0.0-alpha.3 dev: true @@ -3521,7 +3500,7 @@ packages: '@jest/test-result': 30.0.0-alpha.3 '@jest/transform': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -3552,7 +3531,7 @@ packages: '@jest/test-result': 30.0.0-alpha.3 '@jest/transform': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -3605,7 +3584,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -3617,7 +3596,7 @@ packages: engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 chalk: 4.1.2 ci-info: 4.0.0 graceful-fs: 4.2.11 @@ -3642,7 +3621,7 @@ packages: dependencies: '@jest/test-result': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 - '@types/node': 20.12.4 + '@types/node': 20.12.7 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -3654,13 +3633,13 @@ packages: resolution: {integrity: sha512-8lS9LxbEjOyBRz0Pdi6m3HYJ3feIi1tv0u7oqxjXvB1lMksq+IcSxaPTCcvJbIqt3WAFFYQnDs5I3NkJiEG5Ow==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} dependencies: - '@types/node': 20.12.4 + '@types/node': 20.12.7 jest-util: 30.0.0-alpha.3 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@30.0.0-alpha.3(@types/node@20.12.4): + /jest@30.0.0-alpha.3(@types/node@20.12.7): resolution: {integrity: sha512-oJndFRnG1Xsc1ybac44hGGj7+O4nT9losg8+8YDjNwDAXbYwvzyRgmCiPo6L/BROiAD8Z9qGgFRsFuGdpmQuFw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} hasBin: true @@ -3673,7 +3652,7 @@ packages: '@jest/core': 30.0.0-alpha.3 '@jest/types': 30.0.0-alpha.3 import-local: 3.1.0 - jest-cli: 30.0.0-alpha.3(@types/node@20.12.4) + jest-cli: 30.0.0-alpha.3(@types/node@20.12.7) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -3698,6 +3677,7 @@ packages: hasBin: true dependencies: argparse: 2.0.1 + dev: false /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} @@ -3707,6 +3687,7 @@ packages: /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: false /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -3714,9 +3695,11 @@ packages: /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: false /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: false /json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} @@ -3735,6 +3718,7 @@ packages: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: json-buffer: 3.0.1 + dev: false /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} @@ -3752,6 +3736,7 @@ packages: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 + dev: false /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -3769,6 +3754,7 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 + dev: false /lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} @@ -3776,6 +3762,7 @@ packages: /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: false /lowercase-keys@3.0.0: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} @@ -3868,6 +3855,14 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 + dev: true + + /minimatch@9.0.4: + resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: false /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -3978,6 +3973,7 @@ packages: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 + dev: true /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} @@ -3996,6 +3992,7 @@ packages: levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 + dev: false /p-cancelable@3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} @@ -4034,6 +4031,7 @@ packages: engines: {node: '>=10'} dependencies: p-limit: 3.1.0 + dev: false /p-timeout@5.1.0: resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} @@ -4050,6 +4048,7 @@ packages: engines: {node: '>=6'} dependencies: callsites: 3.1.0 + dev: false /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} @@ -4068,6 +4067,7 @@ packages: /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} + dev: true /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} @@ -4131,6 +4131,7 @@ packages: /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + dev: false /prettier@3.2.5: resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} @@ -4150,6 +4151,7 @@ packages: /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + dev: false /pure-rand@6.0.4: resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==} @@ -4157,6 +4159,7 @@ packages: /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: false /queue-tick@1.0.1: resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} @@ -4216,6 +4219,7 @@ packages: /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} + dev: false /resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} @@ -4245,17 +4249,13 @@ packages: /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 + dev: false /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 + dev: false /safe-array-concat@1.1.2: resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} @@ -4565,6 +4565,7 @@ packages: /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: false /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -4604,16 +4605,16 @@ packages: escape-string-regexp: 5.0.0 dev: false - /ts-api-utils@1.3.0(typescript@5.4.4): + /ts-api-utils@1.3.0(typescript@5.4.5): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.4.4 + typescript: 5.4.5 dev: false - /ts-jest@29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.4): + /ts-jest@29.1.2(jest@30.0.0-alpha.3)(typescript@5.4.5): resolution: {integrity: sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==} engines: {node: ^16.10.0 || ^18.0.0 || >=20.0.0} hasBin: true @@ -4636,13 +4637,13 @@ packages: dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 30.0.0-alpha.3(@types/node@20.12.4) + jest: 30.0.0-alpha.3(@types/node@20.12.7) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.6.0 - typescript: 5.4.4 + typescript: 5.4.5 yargs-parser: 21.1.1 dev: true @@ -4663,16 +4664,13 @@ packages: engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 + dev: false /type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} dev: true - /type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -4722,8 +4720,27 @@ packages: possible-typed-array-names: 1.0.0 dev: false - /typescript@5.4.4: - resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==} + /typescript-eslint@7.6.0(eslint@9.0.0)(typescript@5.4.5): + resolution: {integrity: sha512-LY6vH6F1l5jpGqRtU+uK4+mOecIb4Cd4kaz1hAiJrgnNiHUA8wiw8BkJyYS+MRLM69F1QuSKwtGlQqnGl1Rc6w==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.6.0(eslint@9.0.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.5) + eslint: 9.0.0 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + dev: false + + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true @@ -4745,7 +4762,6 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - dev: true /update-browserslist-db@1.0.13(browserslist@4.23.0): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} @@ -4762,6 +4778,7 @@ packages: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.1 + dev: false /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -4835,6 +4852,7 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true /write-file-atomic@5.0.1: resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 12d48269..8020e38d 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "d651370cac08d2a63fc6e97af1897d0f51abd08a", + "pnpmShrinkwrapHash": "5dfb0a8a0ad6b0505870eeb38140a9ba82571aee", "preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f" } diff --git a/common/scripts/install-run-rush-pnpm.js b/common/scripts/install-run-rush-pnpm.js index 72a7bfdf..2356649f 100644 --- a/common/scripts/install-run-rush-pnpm.js +++ b/common/scripts/install-run-rush-pnpm.js @@ -10,6 +10,9 @@ // node common/scripts/install-run-rush-pnpm.js pnpm-command // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index fe5101a2..9676fc71 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -8,6 +8,9 @@ // node common/scripts/install-run-rush.js install // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; @@ -137,8 +140,8 @@ function _getRushVersion(logger) { return rushJsonMatches[1]; } catch (e) { - throw new Error(`Unable to determine the required version of Rush from rush.json (${rushJsonFolder}). ` + - "The 'rushVersion' field is either not assigned in rush.json or was specified " + + throw new Error(`Unable to determine the required version of Rush from ${RUSH_JSON_FILENAME} (${rushJsonFolder}). ` + + `The 'rushVersion' field is either not assigned in ${RUSH_JSON_FILENAME} or was specified ` + 'using an unexpected syntax.'); } } @@ -197,7 +200,7 @@ function _run() { } runWithErrorAndStatusCode(logger, () => { const version = _getRushVersion(logger); - logger.info(`The rush.json configuration requests Rush version ${version}`); + logger.info(`The ${RUSH_JSON_FILENAME} configuration requests Rush version ${version}`); const lockFilePath = process.env[INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE]; if (lockFilePath) { logger.info(`Found ${INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE}="${lockFilePath}", installing with lockfile.`); diff --git a/common/scripts/install-run-rushx.js b/common/scripts/install-run-rushx.js index 0a0235f2..6581521f 100644 --- a/common/scripts/install-run-rushx.js +++ b/common/scripts/install-run-rushx.js @@ -10,6 +10,9 @@ // node common/scripts/install-run-rushx.js custom-command // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index bf89cd23..9f54b3ee 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -8,6 +8,9 @@ // node common/scripts/install-run.js qrcode@1.2.2 qrcode https://rushjs.io // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ +// +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for details. /******/ (() => { // webpackBootstrap /******/ "use strict"; @@ -42,12 +45,22 @@ __webpack_require__.r(__webpack_exports__); */ // create a global _combinedNpmrc for cache purpose const _combinedNpmrcMap = new Map(); -function _trimNpmrcFile(sourceNpmrcPath) { +function _trimNpmrcFile(options) { + const { sourceNpmrcPath, linesToPrepend, linesToAppend } = options; const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath); if (combinedNpmrcFromCache !== undefined) { return combinedNpmrcFromCache; } - let npmrcFileLines = fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n'); + let npmrcFileLines = []; + if (linesToPrepend) { + npmrcFileLines.push(...linesToPrepend); + } + if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + npmrcFileLines.push(...fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n')); + } + if (linesToAppend) { + npmrcFileLines.push(...linesToAppend); + } npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); const resultLines = []; // This finds environment variable tokens that look like "${VAR_NAME}" @@ -92,47 +105,40 @@ function _trimNpmrcFile(sourceNpmrcPath) { _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); return combinedNpmrc; } -/** - * As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims - * unusable lines from the .npmrc file. - * - * Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in - * the .npmrc file to provide different authentication tokens for different registry. - * However, if the environment variable is undefined, it expands to an empty string, which - * produces a valid-looking mapping with an invalid URL that causes an error. Instead, - * we'd prefer to skip that line and continue looking in other places such as the user's - * home directory. - * - * @returns - * The text of the the .npmrc with lines containing undefined variables commented out. - */ -function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { +function _copyAndTrimNpmrcFile(options) { + const { logger, sourceNpmrcPath, targetNpmrcPath, linesToPrepend, linesToAppend } = options; logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose logger.info(` --> "${targetNpmrcPath}"`); - const combinedNpmrc = _trimNpmrcFile(sourceNpmrcPath); + const combinedNpmrc = _trimNpmrcFile({ + sourceNpmrcPath, + linesToPrepend, + linesToAppend + }); fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc); return combinedNpmrc; } -/** - * syncNpmrc() copies the .npmrc file to the target folder, and also trims unusable lines from the .npmrc file. - * If the source .npmrc file not exist, then syncNpmrc() will delete an .npmrc that is found in the target folder. - * - * IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._syncNpmrc() - * - * @returns - * The text of the the synced .npmrc, if one exists. If one does not exist, then undefined is returned. - */ -function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = { - // eslint-disable-next-line no-console - info: console.log, - // eslint-disable-next-line no-console - error: console.error -}) { +function syncNpmrc(options) { + const { sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = { + // eslint-disable-next-line no-console + info: console.log, + // eslint-disable-next-line no-console + error: console.error + }, createIfMissing = false, linesToAppend, linesToPrepend } = options; const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc'); try { - if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { - return _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath); + if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath) || createIfMissing) { + // Ensure the target folder exists + if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcFolder)) { + fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(targetNpmrcFolder, { recursive: true }); + } + return _copyAndTrimNpmrcFile({ + sourceNpmrcPath, + targetNpmrcPath, + logger, + linesToAppend, + linesToPrepend + }); } else if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcPath)) { // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target @@ -150,7 +156,7 @@ function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { return false; } - const trimmedNpmrcFile = _trimNpmrcFile(sourceNpmrcPath); + const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath }); const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm'); return trimmedNpmrcFile.match(variableKeyRegExp) !== null; } @@ -431,7 +437,11 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { try { const rushTempFolder = _getRushTempFolder(rushCommonFolder); const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); - (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, rushTempFolder, undefined, logger); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ + sourceNpmrcFolder, + targetNpmrcFolder: rushTempFolder, + logger + }); const npmPath = getNpmPath(); // This returns something that looks like: // ``` @@ -498,7 +508,7 @@ function findRushJsonFolder() { } } while (basePath !== (tempPath = path__WEBPACK_IMPORTED_MODULE_3__.dirname(basePath))); // Exit the loop when we hit the disk root if (!_rushJsonFolder) { - throw new Error('Unable to find rush.json.'); + throw new Error(`Unable to find ${RUSH_JSON_FILENAME}.`); } } return _rushJsonFolder; @@ -629,7 +639,11 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack // The package isn't already installed _cleanInstallFolder(rushTempFolder, packageInstallFolder, lockFilePath); const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); - (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, packageInstallFolder, undefined, logger); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ + sourceNpmrcFolder, + targetNpmrcFolder: packageInstallFolder, + logger + }); _createPackageJson(packageInstallFolder, packageName, packageVersion); const command = lockFilePath ? 'ci' : 'install'; _installPackage(logger, packageInstallFolder, packageName, packageVersion, command); diff --git a/libraries/adb-credential-web/.eslintrc.cjs b/libraries/adb-credential-web/.eslintrc.cjs deleted file mode 100644 index 40d283a4..00000000 --- a/libraries/adb-credential-web/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.build.json" - ], - }, -} diff --git a/libraries/adb-credential-web/package.json b/libraries/adb-credential-web/package.json index afeb0346..6d13ed0f 100644 --- a/libraries/adb-credential-web/package.json +++ b/libraries/adb-credential-web/package.json @@ -26,7 +26,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -36,8 +36,7 @@ "devDependencies": { "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", - "eslint": "^8.57.0", "prettier": "^3.2.5", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/adb-daemon-webusb/.eslintrc.cjs b/libraries/adb-daemon-webusb/.eslintrc.cjs deleted file mode 100644 index 40d283a4..00000000 --- a/libraries/adb-daemon-webusb/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.build.json" - ], - }, -} diff --git a/libraries/adb-daemon-webusb/package.json b/libraries/adb-daemon-webusb/package.json index 5292b38b..6b0bed00 100644 --- a/libraries/adb-daemon-webusb/package.json +++ b/libraries/adb-daemon-webusb/package.json @@ -27,7 +27,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -40,8 +40,7 @@ "devDependencies": { "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", - "eslint": "^8.57.0", "prettier": "^3.2.5", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/adb-scrcpy/.eslintrc.cjs b/libraries/adb-scrcpy/.eslintrc.cjs deleted file mode 100644 index e225d0db..00000000 --- a/libraries/adb-scrcpy/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.test.json" - ], - }, -} diff --git a/libraries/adb-scrcpy/package.json b/libraries/adb-scrcpy/package.json index 118dc1a9..dece14bd 100644 --- a/libraries/adb-scrcpy/package.json +++ b/libraries/adb-scrcpy/package.json @@ -28,8 +28,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", - "//test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -46,10 +45,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/adb-server-node-tcp/.eslintrc.cjs b/libraries/adb-server-node-tcp/.eslintrc.cjs deleted file mode 100644 index 40d283a4..00000000 --- a/libraries/adb-server-node-tcp/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.build.json" - ], - }, -} diff --git a/libraries/adb-server-node-tcp/package.json b/libraries/adb-server-node-tcp/package.json index f8a54f74..60fb19f7 100644 --- a/libraries/adb-server-node-tcp/package.json +++ b/libraries/adb-server-node-tcp/package.json @@ -29,7 +29,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", - "lint": "eslint src/**/*.ts --fix" + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4" }, "dependencies": { "@yume-chan/adb": "workspace:^0.0.23", @@ -38,12 +38,11 @@ "tslib": "^2.6.2" }, "devDependencies": { - "@types/node": "^20.12.4", + "@types/node": "^20.12.7", "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/adb/.eslintrc.cjs b/libraries/adb/.eslintrc.cjs deleted file mode 100644 index 3a906170..00000000 --- a/libraries/adb/.eslintrc.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ["@yume-chan"], - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.test.json"], - }, -}; diff --git a/libraries/adb/package.json b/libraries/adb/package.json index c01c3ba4..1429faa9 100644 --- a/libraries/adb/package.json +++ b/libraries/adb/package.json @@ -28,7 +28,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" TS_JEST_DISABLE_VER_CHECKER=true jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -41,14 +41,13 @@ }, "devDependencies": { "@jest/globals": "^30.0.0-alpha.3", - "@types/node": "^20.12.4", + "@types/node": "^20.12.7", "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/android-bin/.eslintrc.cjs b/libraries/android-bin/.eslintrc.cjs deleted file mode 100644 index 3a906170..00000000 --- a/libraries/android-bin/.eslintrc.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ["@yume-chan"], - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.test.json"], - }, -}; diff --git a/libraries/android-bin/package.json b/libraries/android-bin/package.json index 8404350c..e5a765f5 100644 --- a/libraries/android-bin/package.json +++ b/libraries/android-bin/package.json @@ -28,7 +28,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" TS_JEST_DISABLE_VER_CHECKER=true jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -42,10 +42,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/aoa/.eslintrc.cjs b/libraries/aoa/.eslintrc.cjs deleted file mode 100644 index e225d0db..00000000 --- a/libraries/aoa/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.test.json" - ], - }, -} diff --git a/libraries/aoa/package.json b/libraries/aoa/package.json index 64b7807a..8e1b3dd6 100644 --- a/libraries/aoa/package.json +++ b/libraries/aoa/package.json @@ -27,7 +27,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", - "lint": "eslint src/**/*.ts --fix", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -37,7 +37,6 @@ "devDependencies": { "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", - "eslint": "^8.57.0", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/aoa/src/audio.ts b/libraries/aoa/src/audio.ts index 78605c96..7fc467c7 100644 --- a/libraries/aoa/src/audio.ts +++ b/libraries/aoa/src/audio.ts @@ -34,7 +34,7 @@ export async function aoaSetAudioMode(device: USBDevice, mode: AoaAudioMode) { value: mode, index: 0, }, - new ArrayBuffer(0) + new ArrayBuffer(0), ); } @@ -78,7 +78,7 @@ export function aoaGetAudioStream(device: USBDevice) { configuration.configurationValue ) { await device.selectConfiguration( - configuration.configurationValue + configuration.configurationValue, ); } @@ -92,14 +92,14 @@ export function aoaGetAudioStream(device: USBDevice) { ) { await device.selectAlternateInterface( interface_.interfaceNumber, - alternate.alternateSetting + alternate.alternateSetting, ); } const endpoint = alternate.endpoints.find( (endpoint) => endpoint.type === "isochronous" && - endpoint.direction === "in" + endpoint.direction === "in", ); if (!endpoint) { throw new Error("No matched endpoint found"); @@ -116,7 +116,7 @@ export function aoaGetAudioStream(device: USBDevice) { const array = new Uint8Array( data.buffer, data.byteOffset, - data.byteLength + data.byteLength, ); controller.enqueue(array); } diff --git a/libraries/aoa/src/hid.ts b/libraries/aoa/src/hid.ts index fd7484e4..ea2b6129 100644 --- a/libraries/aoa/src/hid.ts +++ b/libraries/aoa/src/hid.ts @@ -3,7 +3,7 @@ import { AoaRequestType } from "./type.js"; export async function aoaHidRegister( device: USBDevice, accessoryId: number, - reportDescriptorSize: number + reportDescriptorSize: number, ) { await device.controlTransferOut( { @@ -13,14 +13,14 @@ export async function aoaHidRegister( value: accessoryId, index: reportDescriptorSize, }, - new ArrayBuffer(0) + new ArrayBuffer(0), ); } export async function aoaHidSetReportDescriptor( device: USBDevice, accessoryId: number, - reportDescriptor: Uint8Array + reportDescriptor: Uint8Array, ) { await device.controlTransferOut( { @@ -30,7 +30,7 @@ export async function aoaHidSetReportDescriptor( value: accessoryId, index: 0, }, - reportDescriptor + reportDescriptor, ); } @@ -43,14 +43,14 @@ export async function aoaHidUnregister(device: USBDevice, accessoryId: number) { value: accessoryId, index: 0, }, - new ArrayBuffer(0) + new ArrayBuffer(0), ); } export async function aoaHidSendInputReport( device: USBDevice, accessoryId: number, - event: Uint8Array + event: Uint8Array, ) { await device.controlTransferOut( { @@ -60,7 +60,7 @@ export async function aoaHidSendInputReport( value: accessoryId, index: 0, }, - event + event, ); } @@ -80,7 +80,7 @@ export class AoaHidDevice { static async register( device: USBDevice, accessoryId: number, - reportDescriptor: Uint8Array + reportDescriptor: Uint8Array, ) { await aoaHidRegister(device, accessoryId, reportDescriptor.length); await aoaHidSetReportDescriptor(device, accessoryId, reportDescriptor); diff --git a/libraries/aoa/src/initialize.ts b/libraries/aoa/src/initialize.ts index ff7f06d5..7837ae2d 100644 --- a/libraries/aoa/src/initialize.ts +++ b/libraries/aoa/src/initialize.ts @@ -9,7 +9,7 @@ export async function aoaGetProtocol(device: USBDevice) { value: 0, index: 0, }, - 2 + 2, ); const version = result.data!.getUint16(0, true); return version; @@ -28,6 +28,6 @@ export async function aoaStartAccessory(device: USBDevice) { value: 0, index: 0, }, - new ArrayBuffer(0) + new ArrayBuffer(0), ); } diff --git a/libraries/aoa/src/mouse.ts b/libraries/aoa/src/mouse.ts index b5285dab..710f4a4b 100644 --- a/libraries/aoa/src/mouse.ts +++ b/libraries/aoa/src/mouse.ts @@ -39,7 +39,7 @@ export class HidMouse { 0x81, 0x06, // Input (Data, Variable, Relative) 0xc0, // End Collection 0xc0, // End Collection - ] + ], ); static serializeInputReport( @@ -47,7 +47,7 @@ export class HidMouse { movementY: number, buttons: number, scrollX: number, - scrollY: number + scrollY: number, ): Uint8Array { return new Uint8Array([ buttons, diff --git a/libraries/aoa/src/touchscreen.ts b/libraries/aoa/src/touchscreen.ts index 4750dfe8..521c64a0 100644 --- a/libraries/aoa/src/touchscreen.ts +++ b/libraries/aoa/src/touchscreen.ts @@ -32,7 +32,7 @@ const FINGER_DESCRIPTOR = new Uint8Array( 0x95, 0x02, // Report Count (2) 0x81, 0x02, // Input (Data, Variable, Absolute) 0xc0, // End Collection - ] + ], ); const DESCRIPTOR_HEAD = new Uint8Array( @@ -51,7 +51,7 @@ const DESCRIPTOR_HEAD = new Uint8Array( 0x75, 0x08, // Report Size (8) 0x95, 0x01, // Report Count (1) 0x81, 0x02, // Input (Data, Variable, Absolute) - ] + ], ); const DESCRIPTOR_TAIL = new Uint8Array([ @@ -61,7 +61,7 @@ const DESCRIPTOR_TAIL = new Uint8Array([ const DESCRIPTOR = new Uint8Array( DESCRIPTOR_HEAD.length + FINGER_DESCRIPTOR.length * 10 + - DESCRIPTOR_TAIL.length + DESCRIPTOR_TAIL.length, ); let offset = 0; DESCRIPTOR.set(DESCRIPTOR_HEAD, offset); diff --git a/libraries/dataview-bigint-polyfill/.eslintrc.cjs b/libraries/dataview-bigint-polyfill/.eslintrc.cjs deleted file mode 100644 index 40d283a4..00000000 --- a/libraries/dataview-bigint-polyfill/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.build.json" - ], - }, -} diff --git a/libraries/dataview-bigint-polyfill/package.json b/libraries/dataview-bigint-polyfill/package.json index b0c2f4bc..4b6fc0ce 100644 --- a/libraries/dataview-bigint-polyfill/package.json +++ b/libraries/dataview-bigint-polyfill/package.json @@ -32,7 +32,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "//test": "jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -41,9 +41,8 @@ "devDependencies": { "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/event/.eslintrc.cjs b/libraries/event/.eslintrc.cjs deleted file mode 100644 index e225d0db..00000000 --- a/libraries/event/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.test.json" - ], - }, -} diff --git a/libraries/event/package.json b/libraries/event/package.json index 156bbd79..45f4231e 100644 --- a/libraries/event/package.json +++ b/libraries/event/package.json @@ -29,7 +29,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" TS_JEST_DISABLE_VER_CHECKER=true jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -41,10 +41,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/fetch-scrcpy-server/package.json b/libraries/fetch-scrcpy-server/package.json index f89106b3..3c49039e 100644 --- a/libraries/fetch-scrcpy-server/package.json +++ b/libraries/fetch-scrcpy-server/package.json @@ -30,6 +30,6 @@ "gh-release-fetch": "^4.0.3" }, "devDependencies": { - "@types/node": "^20.12.4" + "@types/node": "^20.12.7" } } diff --git a/libraries/pcm-player/.eslintrc.cjs b/libraries/pcm-player/.eslintrc.cjs deleted file mode 100644 index abeccee2..00000000 --- a/libraries/pcm-player/.eslintrc.cjs +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - extends: ["@yume-chan"], - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.test.json", "./tsconfig.worker.json"], - }, - rules: {}, -}; diff --git a/libraries/pcm-player/package.json b/libraries/pcm-player/package.json index ed5eebca..8477fbd4 100644 --- a/libraries/pcm-player/package.json +++ b/libraries/pcm-player/package.json @@ -26,8 +26,7 @@ "scripts": { "build": "tsc -b tsconfig.dom.json && tsc -b tsconfig.worker.json", "build:watch": "tsc -b tsconfig.dom.json && tsc -b tsconfig.worker.json", - "//test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -39,10 +38,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/pcm-player/tsconfig.test.json b/libraries/pcm-player/tsconfig.test.json index b298b72c..e2810b9f 100644 --- a/libraries/pcm-player/tsconfig.test.json +++ b/libraries/pcm-player/tsconfig.test.json @@ -1,7 +1,19 @@ { "extends": "./tsconfig.dom.json", "compilerOptions": { - "types": [], + "lib": [ + "ESNext", + "DOM", + "DOM.Iterable" + ], + "types": [ + "audioworklet" + ], + "rootDir": "./" }, + "include": [ + "src", + "worker" + ], "exclude": [] } diff --git a/libraries/pcm-player/worker/worker.ts b/libraries/pcm-player/worker/worker.ts index 0bcc5453..40facef6 100644 --- a/libraries/pcm-player/worker/worker.ts +++ b/libraries/pcm-player/worker/worker.ts @@ -152,7 +152,7 @@ abstract class SourceProcessor if (source) { // Output full this.#chunks[0] = source; - this.#chunkSampleCounts[0]! -= consumedSampleCount; + this.#chunkSampleCounts[0] -= consumedSampleCount; return; } diff --git a/libraries/scrcpy-decoder-tinyh264/.eslintrc.cjs b/libraries/scrcpy-decoder-tinyh264/.eslintrc.cjs deleted file mode 100644 index e225d0db..00000000 --- a/libraries/scrcpy-decoder-tinyh264/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.test.json" - ], - }, -} diff --git a/libraries/scrcpy-decoder-tinyh264/package.json b/libraries/scrcpy-decoder-tinyh264/package.json index 9791ff0e..0e432d23 100644 --- a/libraries/scrcpy-decoder-tinyh264/package.json +++ b/libraries/scrcpy-decoder-tinyh264/package.json @@ -30,7 +30,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "//test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -48,10 +48,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/scrcpy-decoder-webcodecs/.eslintrc.cjs b/libraries/scrcpy-decoder-webcodecs/.eslintrc.cjs deleted file mode 100644 index e225d0db..00000000 --- a/libraries/scrcpy-decoder-webcodecs/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.test.json" - ], - }, -} diff --git a/libraries/scrcpy-decoder-webcodecs/package.json b/libraries/scrcpy-decoder-webcodecs/package.json index 1b4f219f..5f7fe85b 100644 --- a/libraries/scrcpy-decoder-webcodecs/package.json +++ b/libraries/scrcpy-decoder-webcodecs/package.json @@ -29,8 +29,7 @@ "scripts": { "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", - "//test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -45,10 +44,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/scrcpy/.eslintrc.cjs b/libraries/scrcpy/.eslintrc.cjs deleted file mode 100644 index e225d0db..00000000 --- a/libraries/scrcpy/.eslintrc.cjs +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.test.json" - ], - }, -} diff --git a/libraries/scrcpy/package.json b/libraries/scrcpy/package.json index 308b9638..b9fac034 100644 --- a/libraries/scrcpy/package.json +++ b/libraries/scrcpy/package.json @@ -29,7 +29,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" TS_JEST_DISABLE_VER_CHECKER=true jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -42,10 +42,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/stream-extra/.eslintrc.cjs b/libraries/stream-extra/.eslintrc.cjs deleted file mode 100644 index 9b1ad208..00000000 --- a/libraries/stream-extra/.eslintrc.cjs +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - "extends": [ - "@yume-chan" - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - "./tsconfig.test.json" - ], - }, - rules: { - "@typescript-eslint/no-explicit-any": "off", - // "@typescript-eslint/no-unsafe-argument": "off", - // "@typescript-eslint/no-unsafe-assignment": "off", - // "@typescript-eslint/no-unsafe-call": "off", - // "@typescript-eslint/no-unsafe-member-access": "off", - // "@typescript-eslint/no-unsafe-return": "off", - }, -} diff --git a/libraries/stream-extra/package.json b/libraries/stream-extra/package.json index 9f0a805e..a79531ba 100644 --- a/libraries/stream-extra/package.json +++ b/libraries/stream-extra/package.json @@ -28,7 +28,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" TS_JEST_DISABLE_VER_CHECKER=true jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -41,10 +41,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/struct/.eslintrc.cjs b/libraries/struct/.eslintrc.cjs deleted file mode 100644 index cdd01f72..00000000 --- a/libraries/struct/.eslintrc.cjs +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - extends: ["@yume-chan"], - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.test.json"], - }, - rules: { - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-return": "off", - }, -}; diff --git a/libraries/struct/package.json b/libraries/struct/package.json index 09233394..446415fb 100644 --- a/libraries/struct/package.json +++ b/libraries/struct/package.json @@ -30,7 +30,7 @@ "build": "tsc -b tsconfig.build.json", "build:watch": "tsc -b tsconfig.build.json", "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" TS_JEST_DISABLE_VER_CHECKER=true jest --coverage", - "lint": "eslint src/**/*.ts --fix && prettier src/**/*.ts --write --tab-width 4", + "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4", "prepublishOnly": "npm run build" }, "dependencies": { @@ -42,10 +42,9 @@ "@yume-chan/eslint-config": "workspace:^1.0.0", "@yume-chan/tsconfig": "workspace:^1.0.0", "cross-env": "^7.0.3", - "eslint": "^8.57.0", "jest": "^30.0.0-alpha.3", "prettier": "^3.2.5", "ts-jest": "^29.1.2", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/libraries/struct/src/basic/field-value.spec.ts b/libraries/struct/src/basic/field-value.spec.ts index 3e27056c..d1ae396b 100644 --- a/libraries/struct/src/basic/field-value.spec.ts +++ b/libraries/struct/src/basic/field-value.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { describe, expect, it } from "@jest/globals"; import type { ValueOrPromise } from "../utils.js"; @@ -11,7 +12,7 @@ import type { StructValue } from "./struct-value.js"; describe("StructFieldValue", () => { describe(".constructor", () => { it("should save parameters", () => { - class MockStructFieldValue extends StructFieldValue { + class MockStructFieldValue extends StructFieldValue { serialize(dataView: DataView, offset: number): void { void dataView; void offset; @@ -19,16 +20,16 @@ describe("StructFieldValue", () => { } } - const definition = {} as any; - const options = {} as any; - const struct = {} as any; - const value = {} as any; + const definition = {}; + const options = {}; + const struct = {}; + const value = {}; const fieldValue = new MockStructFieldValue( - definition, - options, - struct, - value, + definition as never, + options as never, + struct as never, + value as never, ); expect(fieldValue).toHaveProperty("definition", definition); expect(fieldValue).toHaveProperty("options", options); @@ -76,7 +77,7 @@ describe("StructFieldValue", () => { } } - class MockStructFieldValue extends StructFieldValue { + class MockStructFieldValue extends StructFieldValue { serialize(dataView: DataView, offset: number): void { void dataView; void offset; @@ -87,9 +88,9 @@ describe("StructFieldValue", () => { const fieldDefinition = new MockFieldDefinition(); const fieldValue = new MockStructFieldValue( fieldDefinition, - undefined as any, - undefined as any, - undefined as any, + undefined as never, + undefined as never, + undefined as never, ); expect(fieldValue.getSize()).toBe(42); }); @@ -97,7 +98,7 @@ describe("StructFieldValue", () => { describe("#set", () => { it("should update its internal value", () => { - class MockStructFieldValue extends StructFieldValue { + class MockStructFieldValue extends StructFieldValue { serialize(dataView: DataView, offset: number): void { void dataView; void offset; @@ -106,10 +107,10 @@ describe("StructFieldValue", () => { } const fieldValue = new MockStructFieldValue( - undefined as any, - undefined as any, - undefined as any, - undefined as any, + undefined as never, + undefined as never, + undefined as never, + undefined as never, ); fieldValue.set(1); expect(fieldValue.get()).toBe(1); diff --git a/libraries/struct/src/basic/field-value.ts b/libraries/struct/src/basic/field-value.ts index d6c24ea4..417bd37a 100644 --- a/libraries/struct/src/basic/field-value.ts +++ b/libraries/struct/src/basic/field-value.ts @@ -9,11 +9,7 @@ import type { StructValue } from "./struct-value.js"; * helpful for the serialization process. */ export abstract class StructFieldValue< - TDefinition extends StructFieldDefinition< - any, - any, - any - > = StructFieldDefinition, + TDefinition extends StructFieldDefinition, > { /** Gets the definition associated with this runtime value */ readonly definition: TDefinition; @@ -58,7 +54,7 @@ export abstract class StructFieldValue< * When implemented in derived classes, reads current field's value. */ get(): TDefinition["TValue"] { - return this.value; + return this.value as never; } /** diff --git a/libraries/struct/src/basic/struct-value.spec.ts b/libraries/struct/src/basic/struct-value.spec.ts index e102eec5..256f5cf4 100644 --- a/libraries/struct/src/basic/struct-value.spec.ts +++ b/libraries/struct/src/basic/struct-value.spec.ts @@ -1,5 +1,7 @@ import { describe, expect, it, jest } from "@jest/globals"; +import type { StructFieldDefinition } from "./definition.js"; +import type { StructFieldValue } from "./field-value.js"; import { StructValue } from "./struct-value.js"; describe("StructValue", () => { @@ -26,7 +28,9 @@ describe("StructValue", () => { get() { return 42; }, - } as any; + } as StructFieldValue< + StructFieldDefinition + >; object.set(foo, fooValue); const bar = "bar"; @@ -34,7 +38,9 @@ describe("StructValue", () => { get() { return "foo"; }, - } as any; + } as StructFieldValue< + StructFieldDefinition + >; object.set(bar, barValue); expect(object.fieldValues[foo]).toBe(fooValue); @@ -49,15 +55,25 @@ describe("StructValue", () => { const fooSetter = jest.fn((value: number) => { void value; }); - const fooValue = { get: fooGetter, set: fooSetter } as any; + const fooValue = { + get: fooGetter, + set: fooSetter, + } as unknown as StructFieldValue< + StructFieldDefinition + >; object.set(foo, fooValue); const bar = "bar"; const barGetter = jest.fn(() => true); - const barSetter = jest.fn((value: number) => { + const barSetter = jest.fn((value: boolean) => { void value; }); - const barValue = { get: barGetter, set: barSetter } as any; + const barValue = { + get: barGetter, + set: barSetter, + } as unknown as StructFieldValue< + StructFieldDefinition + >; object.set(bar, barValue); expect(object.value).toHaveProperty(foo, 42); @@ -79,7 +95,9 @@ describe("StructValue", () => { get() { return "foo"; }, - } as any; + } as StructFieldValue< + StructFieldDefinition + >; object.set(foo, fooValue); expect(object.get(foo)).toBe(fooValue); diff --git a/libraries/struct/src/basic/struct-value.ts b/libraries/struct/src/basic/struct-value.ts index bd9ec5b0..7b26b617 100644 --- a/libraries/struct/src/basic/struct-value.ts +++ b/libraries/struct/src/basic/struct-value.ts @@ -1,14 +1,25 @@ +import type { StructFieldDefinition } from "./definition.js"; import type { StructFieldValue } from "./field-value.js"; export const STRUCT_VALUE_SYMBOL = Symbol("struct-value"); +export function isStructValueInit( + value: unknown, +): value is { [STRUCT_VALUE_SYMBOL]: StructValue } { + return ( + typeof value === "object" && + value !== null && + STRUCT_VALUE_SYMBOL in value + ); +} + /** * A struct value is a map between keys in a struct and their field values. */ export class StructValue { /** @internal */ readonly fieldValues: Record< PropertyKey, - StructFieldValue + StructFieldValue> > = {}; /** @@ -35,7 +46,12 @@ export class StructValue { * @param name The field name * @param fieldValue The associated `StructFieldValue` */ - set(name: PropertyKey, fieldValue: StructFieldValue): void { + set( + name: PropertyKey, + fieldValue: StructFieldValue< + StructFieldDefinition + >, + ): void { this.fieldValues[name] = fieldValue; // PERF: `Object.defineProperty` is slow @@ -61,7 +77,9 @@ export class StructValue { * * @param name The field name */ - get(name: PropertyKey): StructFieldValue { + get( + name: PropertyKey, + ): StructFieldValue> { return this.fieldValues[name]!; } } diff --git a/libraries/struct/src/struct.ts b/libraries/struct/src/struct.ts index c29d0797..c0ac5152 100644 --- a/libraries/struct/src/struct.ts +++ b/libraries/struct/src/struct.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import type { AsyncExactReadable, ExactReadable, @@ -10,6 +11,7 @@ import { STRUCT_VALUE_SYMBOL, StructDefaultOptions, StructValue, + isStructValueInit, } from "./basic/index.js"; import { SyncPromise } from "./sync-promise.js"; import type { @@ -50,7 +52,7 @@ type AddFieldDescriptor< TExtra extends object, TPostDeserialized, TFieldName extends PropertyKey, - TDefinition extends StructFieldDefinition, + TDefinition extends StructFieldDefinition, > = Identity< Struct< // Merge two types @@ -83,7 +85,7 @@ interface ArrayBufferLikeFieldCreator< */ < TName extends PropertyKey, - TType extends BufferFieldSubType, + TType extends BufferFieldSubType, TTypeScriptType = TType["TTypeScriptType"], >( name: TName, @@ -107,7 +109,7 @@ interface ArrayBufferLikeFieldCreator< */ < TName extends PropertyKey, - TType extends BufferFieldSubType, + TType extends BufferFieldSubType, TOptions extends VariableLengthBufferLikeFieldOptions, TTypeScriptType = TType["TTypeScriptType"], >( @@ -133,7 +135,7 @@ interface BoundArrayBufferLikeFieldDefinitionCreator< TOmitInitKey extends PropertyKey, TExtra extends object, TPostDeserialized, - TType extends BufferFieldSubType, + TType extends BufferFieldSubType, > { ( name: TName, @@ -154,10 +156,9 @@ interface BoundArrayBufferLikeFieldDefinitionCreator< < TName extends PropertyKey, - TLengthField extends LengthField, TOptions extends VariableLengthBufferLikeFieldOptions< TFields, - TLengthField + LengthField >, TTypeScriptType = TType["TTypeScriptType"], >( @@ -212,6 +213,20 @@ export class StructEmptyError extends StructDeserializeError { } } +interface StructDefinition< + TFields extends object, + TOmitInitKey extends PropertyKey, + TExtra extends object, +> { + readonly TFields: TFields; + + readonly TOmitInitKey: TOmitInitKey; + + readonly TExtra: TExtra; + + readonly TInit: Evaluate>; +} + export class Struct< TFields extends object = Record, TOmitInitKey extends PropertyKey = never, @@ -248,18 +263,18 @@ export class Struct< #fields: [ name: PropertyKey, - definition: StructFieldDefinition, + definition: StructFieldDefinition, ][] = []; get fields(): readonly [ name: PropertyKey, - definition: StructFieldDefinition, + definition: StructFieldDefinition, ][] { return this.#fields; } #extra: Record = {}; - #postDeserialized?: StructPostDeserialized | undefined; + #postDeserialized?: StructPostDeserialized | undefined; constructor(options?: Partial>) { this.options = { ...StructDefaultOptions, ...options }; @@ -270,7 +285,11 @@ export class Struct< */ field< TName extends PropertyKey, - TDefinition extends StructFieldDefinition, + TDefinition extends StructFieldDefinition< + unknown, + unknown, + PropertyKey + >, >( name: TName, definition: TDefinition, @@ -298,13 +317,15 @@ export class Struct< this.#size += size; // Force cast `this` to another type - return this as any; + return this as never; } /** * Merges (flats) another `Struct`'s fields and extra fields into this one. + * + * `other`'s `postDeserialize` will be ignored. */ - concat>( + concat>( other: TOther, ): Struct< TFields & TOther["TFields"], @@ -312,6 +333,10 @@ export class Struct< TExtra & TOther["TExtra"], TPostDeserialized > { + if (!(other instanceof Struct)) { + throw new Error("The other value must be a `Struct` instance"); + } + for (const field of other.#fields) { this.#fields.push(field); } @@ -320,7 +345,7 @@ export class Struct< this.#extra, Object.getOwnPropertyDescriptors(other.#extra), ); - return this as any; + return this as never; } #number< @@ -440,17 +465,17 @@ export class Struct< options: | FixedLengthBufferLikeFieldOptions | VariableLengthBufferLikeFieldOptions, - ): any => { + ): never => { if ("length" in options) { return this.field( name, new FixedLengthBufferLikeFieldDefinition(type, options), - ); + ) as never; } else { return this.field( name, new VariableLengthBufferLikeFieldDefinition(type, options), - ); + ) as never; } }; @@ -460,13 +485,17 @@ export class Struct< TExtra, TPostDeserialized, Uint8ArrayBufferFieldSubType - > = (name: PropertyKey, options: any, typeScriptType: any): any => { + > = ( + name: PropertyKey, + options: unknown, + typeScriptType: unknown, + ): never => { return this.#arrayBufferLike( name, Uint8ArrayBufferFieldSubType.Instance, - options, + options as never, typeScriptType, - ); + ) as never; }; string: BoundArrayBufferLikeFieldDefinitionCreator< @@ -475,13 +504,17 @@ export class Struct< TExtra, TPostDeserialized, StringBufferFieldSubType - > = (name: PropertyKey, options: any, typeScriptType: any): any => { + > = ( + name: PropertyKey, + options: unknown, + typeScriptType: unknown, + ): never => { return this.#arrayBufferLike( name, StringBufferFieldSubType.Instance, - options, + options as never, typeScriptType, - ); + ) as never; }; /** @@ -507,7 +540,7 @@ export class Struct< this.#extra, Object.getOwnPropertyDescriptors(value), ); - return this as any; + return this as never; } /** @@ -537,9 +570,9 @@ export class Struct< postDeserialize( callback?: StructPostDeserialized, ): Struct; - postDeserialize(callback?: StructPostDeserialized) { + postDeserialize(callback?: StructPostDeserialized) { this.#postDeserialized = callback; - return this as any; + return this as never; } /** @@ -590,15 +623,18 @@ export class Struct< // Run `postDeserialized` if (this.#postDeserialized) { - const override = this.#postDeserialized.call(value, value); + const override = this.#postDeserialized.call( + value as TFields, + value as TFields, + ); // If it returns a new value, use that as result // Otherwise it only inspects/mutates the object in place. if (override !== undefined) { - return override; + return override as never; } } - return value; + return value as never; }) .valueOrPromise(); } @@ -613,8 +649,8 @@ export class Struct< output?: Uint8Array, ): Uint8Array | number { let structValue: StructValue; - if (STRUCT_VALUE_SYMBOL in init) { - structValue = (init as any)[STRUCT_VALUE_SYMBOL]; + if (isStructValueInit(init)) { + structValue = init[STRUCT_VALUE_SYMBOL]; for (const [key, value] of Object.entries(init)) { const fieldValue = structValue.get(key); if (fieldValue) { @@ -627,14 +663,17 @@ export class Struct< const fieldValue = definition.create( this.options, structValue, - (init as any)[name], + (init as Record)[name], ); structValue.set(name, fieldValue); } } let structSize = 0; - const fieldsInfo: { fieldValue: StructFieldValue; size: number }[] = []; + const fieldsInfo: { + fieldValue: StructFieldValue; + size: number; + }[] = []; for (const [name] of this.#fields) { const fieldValue = structValue.get(name); diff --git a/libraries/struct/src/sync-promise.ts b/libraries/struct/src/sync-promise.ts index 377f8c24..2fe47c67 100644 --- a/libraries/struct/src/sync-promise.ts +++ b/libraries/struct/src/sync-promise.ts @@ -5,7 +5,7 @@ export interface SyncPromise { | null | undefined, onrejected?: - | ((reason: any) => TResult2 | PromiseLike) + | ((reason: unknown) => TResult2 | PromiseLike) | null | undefined, ): SyncPromise; @@ -14,7 +14,7 @@ export interface SyncPromise { } interface SyncPromiseStatic { - reject(reason?: any): SyncPromise; + reject(reason?: unknown): SyncPromise; resolve(): SyncPromise; resolve(value: T | PromiseLike): SyncPromise; @@ -23,7 +23,7 @@ interface SyncPromiseStatic { } export const SyncPromise: SyncPromiseStatic = { - reject(reason?: any): SyncPromise { + reject(reason?: unknown): SyncPromise { return new RejectedSyncPromise(reason); }, resolve(value?: T | PromiseLike): SyncPromise { @@ -67,7 +67,7 @@ class PendingSyncPromise implements SyncPromise { | null | undefined, onrejected?: - | ((reason: any) => TResult2 | PromiseLike) + | ((reason: unknown) => TResult2 | PromiseLike) | null | undefined, ) { @@ -95,7 +95,7 @@ class ResolvedSyncPromise implements SyncPromise { | undefined, ) { if (!onfulfilled) { - return this as any; + return this as never; } return SyncPromise.try(() => onfulfilled(this.#value)); } @@ -106,9 +106,9 @@ class ResolvedSyncPromise implements SyncPromise { } class RejectedSyncPromise implements SyncPromise { - #reason: any; + #reason: unknown; - constructor(reason: any) { + constructor(reason: unknown) { this.#reason = reason; } @@ -118,12 +118,12 @@ class RejectedSyncPromise implements SyncPromise { | null | undefined, onrejected?: - | ((reason: any) => TResult2 | PromiseLike) + | ((reason: unknown) => TResult2 | PromiseLike) | null | undefined, ) { if (!onrejected) { - return this as any; + return this as never; } return SyncPromise.try(() => onrejected(this.#reason)); } diff --git a/libraries/struct/src/types/bigint.ts b/libraries/struct/src/types/bigint.ts index 777e2d26..dff626c5 100644 --- a/libraries/struct/src/types/bigint.ts +++ b/libraries/struct/src/types/bigint.ts @@ -101,20 +101,20 @@ export class BigIntFieldDefinition< array.byteLength, ); const value = this.type.getter(view, 0, options.littleEndian); - return this.create(options, struct, value as any); + return this.create(options, struct, value as never); }) .valueOrPromise(); } } export class BigIntFieldValue< - TDefinition extends BigIntFieldDefinition, + TDefinition extends BigIntFieldDefinition, > extends StructFieldValue { serialize(dataView: DataView, offset: number): void { this.definition.type.setter( dataView, offset, - this.value, + this.value as never, this.options.littleEndian, ); } diff --git a/libraries/struct/src/types/buffer/base.ts b/libraries/struct/src/types/buffer/base.ts index d4e62664..7dab8647 100644 --- a/libraries/struct/src/types/buffer/base.ts +++ b/libraries/struct/src/types/buffer/base.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import type { AsyncExactReadable, ExactReadable, @@ -102,6 +103,7 @@ export abstract class BufferLikeFieldDefinition< TTypeScriptType = TType["TTypeScriptType"], > extends StructFieldDefinition { readonly type: TType; + readonly TTypeScriptType!: TTypeScriptType; constructor(type: TType, options: TOptions) { super(options); @@ -119,7 +121,7 @@ export abstract class BufferLikeFieldDefinition< create( options: Readonly, struct: StructValue, - value: TType["TTypeScriptType"], + value: TTypeScriptType, array?: Uint8Array, ): BufferLikeFieldValue { return new BufferLikeFieldValue(this, options, struct, value, array); @@ -149,7 +151,7 @@ export abstract class BufferLikeFieldDefinition< } }) .then((array) => { - const value = this.type.toValue(array); + const value = this.type.toValue(array) as TTypeScriptType; return this.create(options, struct, value, array); }) .valueOrPromise(); @@ -158,7 +160,8 @@ export abstract class BufferLikeFieldDefinition< export class BufferLikeFieldValue< TDefinition extends BufferLikeFieldDefinition< - BufferFieldSubType, + BufferFieldSubType, + any, any, any >, @@ -169,7 +172,7 @@ export class BufferLikeFieldValue< definition: TDefinition, options: Readonly, struct: StructValue, - value: TDefinition["TValue"], + value: TDefinition["TTypeScriptType"], array?: Uint8Array, ) { super(definition, options, struct, value); diff --git a/libraries/struct/src/types/buffer/variable-length.spec.ts b/libraries/struct/src/types/buffer/variable-length.spec.ts index 2f7b38be..9131e67d 100644 --- a/libraries/struct/src/types/buffer/variable-length.spec.ts +++ b/libraries/struct/src/types/buffer/variable-length.spec.ts @@ -1,3 +1,7 @@ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +/* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { describe, expect, it, jest } from "@jest/globals"; import { @@ -15,9 +19,10 @@ import { VariableLengthBufferLikeFieldDefinition, VariableLengthBufferLikeFieldLengthValue, VariableLengthBufferLikeStructFieldValue, + type VariableLengthBufferLikeFieldOptions, } from "./variable-length.js"; -class MockLengthFieldValue extends StructFieldValue { +class MockLengthFieldValue extends StructFieldValue { constructor() { super({} as any, {} as any, {} as any, {}); } @@ -42,7 +47,13 @@ class MockLengthFieldValue extends StructFieldValue { describe("Types", () => { describe("VariableLengthBufferLikeFieldLengthValue", () => { - class MockBufferLikeFieldValue extends StructFieldValue { + class MockBufferLikeFieldValue extends StructFieldValue< + VariableLengthBufferLikeFieldDefinition< + any, + VariableLengthBufferLikeFieldOptions, + any + > + > { constructor() { super({ options: {} } as any, {} as any, {} as any, {}); } @@ -153,7 +164,7 @@ describe("Types", () => { mockArrayBufferFieldValue.size = 0; expect(lengthFieldValue.get()).toBe(0); - (lengthFieldValue as StructFieldValue).set(100); + (lengthFieldValue as StructFieldValue).set(100); expect(lengthFieldValue.get()).toBe(0); }); }); diff --git a/libraries/struct/src/types/buffer/variable-length.ts b/libraries/struct/src/types/buffer/variable-length.ts index 6cd0deb7..9d646a69 100644 --- a/libraries/struct/src/types/buffer/variable-length.ts +++ b/libraries/struct/src/types/buffer/variable-length.ts @@ -1,3 +1,6 @@ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import type { StructFieldDefinition, StructOptions, @@ -12,7 +15,7 @@ import { BufferLikeFieldDefinition, BufferLikeFieldValue } from "./base.js"; export type LengthField = KeysOfType; export interface VariableLengthBufferLikeFieldOptions< - TFields = object, + TFields extends object = object, TLengthField extends LengthField = any, > { /** @@ -92,7 +95,7 @@ export class VariableLengthBufferLikeStructFieldValue< } // Patch the associated length field. - const lengthField = this.definition.options.lengthField; + const lengthField = this.definition.options.lengthField as PropertyKey; const originalValue = struct.get(lengthField); this.lengthFieldValue = new VariableLengthBufferLikeFieldLengthValue( @@ -123,16 +126,26 @@ export class VariableLengthBufferLikeStructFieldValue< // Not using `VariableLengthBufferLikeStructFieldValue` directly makes writing tests much easier... type VariableLengthBufferLikeFieldValueLike = StructFieldValue< - StructFieldDefinition + StructFieldDefinition< + VariableLengthBufferLikeFieldOptions, + any, + any + > >; -export class VariableLengthBufferLikeFieldLengthValue extends StructFieldValue { - protected originalField: StructFieldValue; +export class VariableLengthBufferLikeFieldLengthValue extends StructFieldValue< + StructFieldDefinition +> { + protected originalField: StructFieldValue< + StructFieldDefinition + >; protected bufferField: VariableLengthBufferLikeFieldValueLike; constructor( - originalField: StructFieldValue, + originalField: StructFieldValue< + StructFieldDefinition + >, arrayBufferField: VariableLengthBufferLikeFieldValueLike, ) { super( diff --git a/libraries/struct/src/types/number.spec.ts b/libraries/struct/src/types/number.spec.ts index 55d9c68e..591ec165 100644 --- a/libraries/struct/src/types/number.spec.ts +++ b/libraries/struct/src/types/number.spec.ts @@ -19,7 +19,7 @@ function testEndian( `set${type.signed ? "I" : "Ui"}nt${ type.size * 8 }` as keyof DataView - ] as any + ] as (offset: number, value: number, littleEndian: boolean) => void )(0, min, littleEndian); const output = type.deserialize(new Uint8Array(buffer), littleEndian); expect(output).toBe(min); @@ -34,7 +34,7 @@ function testEndian( `set${type.signed ? "I" : "Ui"}nt${ type.size * 8 }` as keyof DataView - ] as any + ] as (offset: number, value: number, littleEndian: boolean) => void )(0, input, littleEndian); const output = type.deserialize(new Uint8Array(buffer), littleEndian); expect(output).toBe(input); @@ -48,7 +48,7 @@ function testEndian( `set${type.signed ? "I" : "Ui"}nt${ type.size * 8 }` as keyof DataView - ] as any + ] as (offset: number, value: number, littleEndian: boolean) => void )(0, max, littleEndian); const output = type.deserialize(new Uint8Array(buffer), littleEndian); expect(output).toBe(max); diff --git a/libraries/struct/src/types/number.ts b/libraries/struct/src/types/number.ts index b28522eb..10575911 100644 --- a/libraries/struct/src/types/number.ts +++ b/libraries/struct/src/types/number.ts @@ -153,20 +153,20 @@ export class NumberFieldDefinition< array, options.littleEndian, ); - return this.create(options, struct, value as any); + return this.create(options, struct, value as never); }) .valueOrPromise(); } } export class NumberFieldValue< - TDefinition extends NumberFieldDefinition, + TDefinition extends NumberFieldDefinition, > extends StructFieldValue { serialize(dataView: DataView, offset: number): void { this.definition.type.serialize( dataView, offset, - this.value, + this.value as never, this.options.littleEndian, ); } diff --git a/rush.json b/rush.json index f463f088..d77c21be 100644 --- a/rush.json +++ b/rush.json @@ -15,7 +15,7 @@ * path segment in the "$schema" field for all your Rush config files. This will ensure * correct error-underlining and tab-completion for editors such as VS Code. */ - "rushVersion": "5.112.2", + "rushVersion": "5.120.0", /** * The next field selects which package manager should be installed and determines its version. * Rush installs its own local copy of the package manager to ensure that your build process @@ -24,7 +24,7 @@ * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation * for details about these alternatives. */ - "pnpmVersion": "8.15.3", + "pnpmVersion": "8.15.6", // "npmVersion": "6.14.15", // "yarnVersion": "1.9.4", /** @@ -38,7 +38,7 @@ * LTS schedule: https://nodejs.org/en/about/releases/ * LTS versions: https://nodejs.org/en/download/releases/ */ - "nodeSupportedVersionRange": ">=16.13.0 <17.0.0 || >= 18.0.0 <19.0.0", + "nodeSupportedVersionRange": ">= 18.18.0 <19.0.0 || >=20.0.0 <21.0.0", /** * Odd-numbered major versions of Node.js are experimental. Even-numbered releases * spend six months in a stabilization period before the first Long Term Support (LTS) version. diff --git a/toolchain/eslint-config/eslint.config.js b/toolchain/eslint-config/eslint.config.js new file mode 100644 index 00000000..566aa164 --- /dev/null +++ b/toolchain/eslint-config/eslint.config.js @@ -0,0 +1,81 @@ +/// + +import eslint from "@eslint/js"; +import { existsSync } from "fs"; +import { resolve } from "path"; +import tslint from "typescript-eslint"; + +const cwd = process.cwd(); +const project = []; +if (existsSync(resolve(cwd, "tsconfig.test.json"))) { + project.push("./tsconfig.test.json"); +} else { + project.push("./tsconfig.build.json"); +} + +export default tslint.config( + eslint.configs.recommended, + ...tslint.configs.recommendedTypeChecked, + { + ignores: ["**/*.js", "**/*.d.ts"], + }, + { + languageOptions: { + parserOptions: { + tsconfigRootDir: cwd, + project: project, + }, + }, + rules: { + "no-constant-condition": ["error", { checkLoops: false }], + "no-plusplus": "error", + "no-multiple-empty-lines": [ + "error", + { + max: 1, + maxEOF: 1, + maxBOF: 0, + }, + ], + + // "import/consistent-type-specifier-style": [ + // "error", + // "prefer-top-level", + // ], + // "import/no-cycle": "error", + // "import/no-duplicates": ["error", { "prefer-inline": false }], + // "import/order": [ + // "error", + // { + // groups: [ + // "builtin", + // "external", + // "internal", + // "parent", + // "sibling", + // "index", + // ], + // "newlines-between": "always", + // alphabetize: { + // order: "asc", + // }, + // }, + // ], + + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-unsafe-enum-comparison": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/array-type": "error", + "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/consistent-type-imports": [ + "error", + { + prefer: "type-imports", + disallowTypeAnnotations: true, + fixStyle: "inline-type-imports", + }, + ], + }, + }, +); diff --git a/toolchain/eslint-config/index.js b/toolchain/eslint-config/index.js deleted file mode 100644 index 9e35e424..00000000 --- a/toolchain/eslint-config/index.js +++ /dev/null @@ -1,58 +0,0 @@ -require("@rushstack/eslint-patch/modern-module-resolution"); - -module.exports = { - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - ], - plugins: ["@typescript-eslint", "import"], - rules: { - "no-constant-condition": ["error", { checkLoops: false }], - "no-plusplus": "error", - "no-multiple-empty-lines": [ - "error", - { - max: 1, - maxEOF: 1, - maxBOF: 0, - }, - ], - - "import/consistent-type-specifier-style": ["error", "prefer-top-level"], - "import/no-cycle": "error", - "import/no-duplicates": ["error", { "prefer-inline": false }], - "import/order": [ - "error", - { - groups: [ - "builtin", - "external", - "internal", - "parent", - "sibling", - "index", - ], - "newlines-between": "always", - alphabetize: { - order: "asc", - }, - }, - ], - - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-unsafe-enum-comparison": "off", - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/consistent-type-definitions": "error", - "@typescript-eslint/no-this-alias": "error", - "@typescript-eslint/consistent-type-imports": [ - "error", - { - prefer: "type-imports", - disallowTypeAnnotations: true, - fixStyle: "inline-type-imports", - }, - ], - }, -}; diff --git a/toolchain/eslint-config/package.json b/toolchain/eslint-config/package.json index c981378b..c97fdf83 100644 --- a/toolchain/eslint-config/package.json +++ b/toolchain/eslint-config/package.json @@ -1,13 +1,18 @@ { "name": "@yume-chan/eslint-config", "version": "1.0.0", + "type": "module", + "main": "eslint.config.js", + "bin": { + "run-eslint": "run-eslint.js" + }, "dependencies": { - "@rushstack/eslint-patch": "^1.10.1", - "@typescript-eslint/eslint-plugin": "^7.5.0", - "@typescript-eslint/parser": "^7.5.0", - "eslint": "^8.57.0", + "@eslint/js": "^9.0.0", + "@types/node": "^20.12.7", + "eslint": "^9.0.0", "eslint-plugin-import": "^2.29.1", - "typescript": "^5.4.4" + "typescript": "^5.4.5", + "typescript-eslint": "^7.6.0" }, "devDependencies": { "prettier": "^3.2.5" diff --git a/toolchain/eslint-config/run-eslint.js b/toolchain/eslint-config/run-eslint.js new file mode 100644 index 00000000..5e4ca17d --- /dev/null +++ b/toolchain/eslint-config/run-eslint.js @@ -0,0 +1,27 @@ +#!/usr/bin/env node + +import { spawn } from "node:child_process"; +import { once } from "node:events"; +import { resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const __dirname = resolve(fileURLToPath(import.meta.url), ".."); + +let eslint = resolve(__dirname, "node_modules", ".bin", "eslint"); +if (process.platform === "win32") { + eslint += ".cmd"; +} + +const child = spawn( + eslint, + ["--config", resolve(__dirname, "eslint.config.js"), "--fix", "."], + { + stdio: "inherit", + }, +); + +await once(child, "exit"); + +if (child.exitCode) { + process.exit(child.exitCode); +}