diff --git a/eslint.config.mjs b/eslint.config.mjs index db1f803..167bd94 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,10 +1,13 @@ +// @ts-check + import gitIgnore from 'eslint-config-flat-gitignore'; -import tsParser from '@typescript-eslint/parser'; -import tsPlugin from '@typescript-eslint/eslint-plugin'; +import js from '@eslint/js'; +import ts from 'typescript-eslint'; -export default [ - 'eslint:all', - // 'plugin:@typescript-eslint/recommended', +export default ts.config( + // @ts-expect-error bad type inference for exported members of @eslint/js + js.configs.all, + ...ts.configs.recommendedTypeChecked, gitIgnore(), { rules: { @@ -53,24 +56,43 @@ export default [ }, { files: [ - '**/*.ts', - '**/*.cts', '**/*.mts', - '**/*.mjs', ], languageOptions: { - ecmaVersion: 2022, - parser: tsParser, - }, - plugins: { - '@typescript-eslint': tsPlugin, + parserOptions: { + project: './tsconfig.eslint.json', + tsconfigRootDir: import.meta.dirname, + }, }, rules: { 'no-undef': 'off', 'no-unused-vars': 'off', 'no-use-before-define': 'off', - '@typescript-eslint/no-unused-vars': 'error', '@typescript-eslint/no-use-before-define': ['error', 'nofunc'], }, }, -]; + // disable type-checked rules for non-TS files + { + files: [ + '**/*.cjs', + '**/*.mjs', + ], + languageOptions: { + globals: { + process: 'readonly', + console: 'readonly', + }, + }, + extends: [ts.configs.disableTypeChecked], + }, + // workaround for a too broad sourceType setting in base config: + // https://github.com/typescript-eslint/typescript-eslint/blob/v7.6.0/packages/typescript-eslint/src/configs/base.ts#L10 + { + files: [ + '**/*.cjs', + ], + languageOptions: { + sourceType: 'commonjs', + }, + }, +); diff --git a/package.json b/package.json index e806af3..e30e1c2 100644 --- a/package.json +++ b/package.json @@ -6,28 +6,28 @@ "jewelcase": "./dist/cli.mjs" }, "devDependencies": { + "@eslint/js": "^8.57.0", "@jest/globals": "^29.3.1", "@tsconfig/esm": "^1.0.2", - "@tsconfig/node18": "^2.0.0", + "@tsconfig/node20": "^20.1.4", "@tsconfig/strictest": "^2.0.0", "@types/ini": "^1.3.31", - "@types/node": "18.13.0", + "@types/node": "20.12.7", "@types/tar": "^6.1.4", "@types/yargs": "^17.0.16", - "@typescript-eslint/eslint-plugin": "^5.45.1", - "@typescript-eslint/parser": "^5.45.1", "editorconfig-checker": "^4.0.2", - "eslint": "^8.29.0", + "eslint": "^8.57.0", "eslint-config-flat-gitignore": "^0.1.3", "husky": "^8.0.0", "jest": "^29.3.1", "lint-staged": "^13.0.4", "ts-jest": "^29.1.0", "ts-node": "^10.9.1", - "typescript": "^5.0.4" + "typescript": "^5.0.4", + "typescript-eslint": "^7.7.0" }, "engines": { - "node": ">=18.13.0" + "node": ">=20.12.0" }, "packageManager": "pnpm@8.3.1", "private": true, @@ -44,7 +44,7 @@ "tests:start": "pnpm --filter ./tests start" }, "volta": { - "node": "18.13.0", + "node": "20.12.0", "pnpm": "8.3.1" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5029eac..30a1651 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,15 +17,18 @@ importers: specifier: ^17.6.2 version: 17.6.2 devDependencies: + '@eslint/js': + specifier: ^8.57.0 + version: 8.57.0 '@jest/globals': specifier: ^29.3.1 version: 29.3.1 '@tsconfig/esm': specifier: ^1.0.2 version: 1.0.2 - '@tsconfig/node18': - specifier: ^2.0.0 - version: 2.0.0 + '@tsconfig/node20': + specifier: ^20.1.4 + version: 20.1.4 '@tsconfig/strictest': specifier: ^2.0.0 version: 2.0.0 @@ -33,26 +36,20 @@ importers: specifier: ^1.3.31 version: 1.3.31 '@types/node': - specifier: 18.13.0 - version: 18.13.0 + specifier: 20.12.7 + version: 20.12.7 '@types/tar': specifier: ^6.1.4 version: 6.1.4 '@types/yargs': specifier: ^17.0.16 version: 17.0.20 - '@typescript-eslint/eslint-plugin': - specifier: ^5.45.1 - version: 5.45.1(@typescript-eslint/parser@5.45.1)(eslint@8.29.0)(typescript@5.0.4) - '@typescript-eslint/parser': - specifier: ^5.45.1 - version: 5.45.1(eslint@8.29.0)(typescript@5.0.4) editorconfig-checker: specifier: ^4.0.2 version: 4.0.2 eslint: - specifier: ^8.29.0 - version: 8.29.0 + specifier: ^8.57.0 + version: 8.57.0 eslint-config-flat-gitignore: specifier: ^0.1.3 version: 0.1.3 @@ -61,7 +58,7 @@ importers: version: 8.0.2 jest: specifier: ^29.3.1 - version: 29.3.1(@types/node@18.13.0)(ts-node@10.9.1) + version: 29.3.1(@types/node@20.12.7)(ts-node@10.9.1) lint-staged: specifier: ^13.0.4 version: 13.0.4 @@ -70,10 +67,13 @@ importers: version: 29.1.0(@babel/core@7.20.5)(jest@29.3.1)(typescript@5.0.4) ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@18.13.0)(typescript@5.0.4) + version: 10.9.1(@types/node@20.12.7)(typescript@5.0.4) typescript: specifier: ^5.0.4 version: 5.0.4 + typescript-eslint: + specifier: ^7.7.0 + version: 7.7.0(eslint@8.57.0)(typescript@5.0.4) tests: dependencies: @@ -83,6 +83,11 @@ importers: packages: + /@aashutoshrathi/word-wrap@1.2.6: + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + dev: true + /@ampproject/remapping@2.2.0: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} engines: {node: '>=6.0.0'} @@ -1378,14 +1383,29 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@eslint/eslintrc@1.3.3: - resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==} + /@eslint-community/eslint-utils@4.4.0(eslint@8.57.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-visitor-keys: 3.4.3 + dev: true + + /@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: true + + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.4.1 - globals: 13.18.0 + espree: 9.6.1 + globals: 13.24.0 ignore: 5.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -1395,11 +1415,16 @@ packages: - supports-color dev: true - /@humanwhocodes/config-array@0.11.7: - resolution: {integrity: sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==} + /@eslint/js@8.57.0: + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 1.2.1 + '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -1411,8 +1436,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@humanwhocodes/object-schema@2.0.3: + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} dev: true /@istanbuljs/load-nyc-config@1.1.0: @@ -1436,7 +1461,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 chalk: 4.1.2 jest-message-util: 29.3.1 jest-util: 29.3.1 @@ -1457,14 +1482,14 @@ packages: '@jest/test-result': 29.3.1 '@jest/transform': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.7.0 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 29.2.0 - jest-config: 29.3.1(@types/node@18.13.0)(ts-node@10.9.1) + jest-config: 29.3.1(@types/node@20.12.7)(ts-node@10.9.1) jest-haste-map: 29.3.1 jest-message-util: 29.3.1 jest-regex-util: 29.2.0 @@ -1491,7 +1516,7 @@ packages: dependencies: '@jest/fake-timers': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 jest-mock: 29.3.1 dev: true @@ -1518,7 +1543,7 @@ packages: dependencies: '@jest/types': 29.3.1 '@sinonjs/fake-timers': 9.1.2 - '@types/node': 18.13.0 + '@types/node': 20.12.7 jest-message-util: 29.3.1 jest-mock: 29.3.1 jest-util: 29.3.1 @@ -1551,7 +1576,7 @@ packages: '@jest/transform': 29.3.1 '@jest/types': 29.3.1 '@jridgewell/trace-mapping': 0.3.17 - '@types/node': 18.13.0 + '@types/node': 20.12.7 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -1639,7 +1664,7 @@ packages: '@jest/schemas': 29.0.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 '@types/yargs': 17.0.20 chalk: 4.1.2 dev: true @@ -1746,8 +1771,8 @@ packages: resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} dev: true - /@tsconfig/node18@2.0.0: - resolution: {integrity: sha512-uI/B0ShkiEwTk036pncXucVlj4y11EW6mycQvCEzC1PkR2TBvdQZ5Wf96dp+XXWAc70FEDfvwTqanoaDpP6rPw==} + /@tsconfig/node20@20.1.4: + resolution: {integrity: sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==} dev: true /@tsconfig/strictest@2.0.0: @@ -1786,7 +1811,7 @@ packages: /@types/graceful-fs@4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 18.13.0 + '@types/node': 20.12.7 dev: true /@types/ini@1.3.31: @@ -1809,20 +1834,22 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true - /@types/json-schema@7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true - /@types/node@18.13.0: - resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==} + /@types/node@20.12.7: + resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} + dependencies: + undici-types: 5.26.5 dev: true /@types/prettier@2.7.1: resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==} dev: true - /@types/semver@7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} + /@types/semver@7.5.8: + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} dev: true /@types/stack-utils@2.0.1: @@ -1832,7 +1859,7 @@ packages: /@types/tar@6.1.4: resolution: {integrity: sha512-Cp4oxpfIzWt7mr2pbhHT2OTXGMAL0szYCzuf8lRWyIMCgsx6/Hfc3ubztuhvzXHXgraTQxyOCmmg7TDGIMIJJQ==} dependencies: - '@types/node': 18.13.0 + '@types/node': 20.12.7 minipass: 4.2.8 dev: true @@ -1846,141 +1873,148 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin@5.45.1(@typescript-eslint/parser@5.45.1)(eslint@8.29.0)(typescript@5.0.4): - resolution: {integrity: sha512-cOizjPlKEh0bXdFrBLTrI/J6B/QMlhwE9auOov53tgB+qMukH6/h8YAK/qw+QJGct/PTbdh2lytGyipxCcEtAw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/eslint-plugin@7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.0.4): + resolution: {integrity: sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.45.1(eslint@8.29.0)(typescript@5.0.4) - '@typescript-eslint/scope-manager': 5.45.1 - '@typescript-eslint/type-utils': 5.45.1(eslint@8.29.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.45.1(eslint@8.29.0)(typescript@5.0.4) + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.0.4) + '@typescript-eslint/scope-manager': 7.7.0 + '@typescript-eslint/type-utils': 7.7.0(eslint@8.57.0)(typescript@5.0.4) + '@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.0.4) + '@typescript-eslint/visitor-keys': 7.7.0 debug: 4.3.4 - eslint: 8.29.0 - ignore: 5.2.1 - natural-compare-lite: 1.4.0 - regexpp: 3.2.0 - semver: 7.3.8 - tsutils: 3.21.0(typescript@5.0.4) + eslint: 8.57.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.0.4) typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.45.1(eslint@8.29.0)(typescript@5.0.4): - resolution: {integrity: sha512-JQ3Ep8bEOXu16q0ztsatp/iQfDCtvap7sp/DKo7DWltUquj5AfCOpX2zSzJ8YkAVnrQNqQ5R62PBz2UtrfmCkA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/parser@7.7.0(eslint@8.57.0)(typescript@5.0.4): + resolution: {integrity: sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.45.1 - '@typescript-eslint/types': 5.45.1 - '@typescript-eslint/typescript-estree': 5.45.1(typescript@5.0.4) + '@typescript-eslint/scope-manager': 7.7.0 + '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.0.4) + '@typescript-eslint/visitor-keys': 7.7.0 debug: 4.3.4 - eslint: 8.29.0 + eslint: 8.57.0 typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@5.45.1: - resolution: {integrity: sha512-D6fCileR6Iai7E35Eb4Kp+k0iW7F1wxXYrOhX/3dywsOJpJAQ20Fwgcf+P/TDtvQ7zcsWsrJaglaQWDhOMsspQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/scope-manager@7.7.0: + resolution: {integrity: sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==} + engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 5.45.1 - '@typescript-eslint/visitor-keys': 5.45.1 + '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/visitor-keys': 7.7.0 dev: true - /@typescript-eslint/type-utils@5.45.1(eslint@8.29.0)(typescript@5.0.4): - resolution: {integrity: sha512-aosxFa+0CoYgYEl3aptLe1svP910DJq68nwEJzyQcrtRhC4BN0tJAvZGAe+D0tzjJmFXe+h4leSsiZhwBa2vrA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/type-utils@7.7.0(eslint@8.57.0)(typescript@5.0.4): + resolution: {integrity: sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: '*' + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.45.1(typescript@5.0.4) - '@typescript-eslint/utils': 5.45.1(eslint@8.29.0)(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.0.4) + '@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.0.4) debug: 4.3.4 - eslint: 8.29.0 - tsutils: 3.21.0(typescript@5.0.4) + eslint: 8.57.0 + ts-api-utils: 1.3.0(typescript@5.0.4) typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@5.45.1: - resolution: {integrity: sha512-HEW3U0E5dLjUT+nk7b4lLbOherS1U4ap+b9pfu2oGsW3oPu7genRaY9dDv3nMczC1rbnRY2W/D7SN05wYoGImg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/types@7.7.0: + resolution: {integrity: sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==} + engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@5.45.1(typescript@5.0.4): - resolution: {integrity: sha512-76NZpmpCzWVrrb0XmYEpbwOz/FENBi+5W7ipVXAsG3OoFrQKJMiaqsBMbvGRyLtPotGqUfcY7Ur8j0dksDJDng==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/typescript-estree@7.7.0(typescript@5.0.4): + resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.45.1 - '@typescript-eslint/visitor-keys': 5.45.1 + '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/visitor-keys': 7.7.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 - tsutils: 3.21.0(typescript@5.0.4) + minimatch: 9.0.4 + semver: 7.6.0 + ts-api-utils: 1.3.0(typescript@5.0.4) typescript: 5.0.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.45.1(eslint@8.29.0)(typescript@5.0.4): - resolution: {integrity: sha512-rlbC5VZz68+yjAzQBc4I7KDYVzWG2X/OrqoZrMahYq3u8FFtmQYc+9rovo/7wlJH5kugJ+jQXV5pJMnofGmPRw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/utils@7.7.0(eslint@8.57.0)(typescript@5.0.4): + resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.45.1 - '@typescript-eslint/types': 5.45.1 - '@typescript-eslint/typescript-estree': 5.45.1(typescript@5.0.4) - eslint: 8.29.0 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0(eslint@8.29.0) - semver: 7.3.8 + eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 7.7.0 + '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.0.4) + eslint: 8.57.0 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@5.45.1: - resolution: {integrity: sha512-cy9ln+6rmthYWjH9fmx+5FU/JDpjQb586++x2FZlveq7GdGuLLW9a2Jcst2TGekH82bXpfmRNSwP9tyEs6RjvQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/visitor-keys@7.7.0: + resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==} + engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 5.45.1 - eslint-visitor-keys: 3.3.0 + '@typescript-eslint/types': 7.7.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /acorn-jsx@5.3.2(acorn@8.8.1): + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.8.1 + acorn: 8.11.3 dev: true /acorn-walk@8.2.0: @@ -1988,6 +2022,12 @@ packages: engines: {node: '>=0.4.0'} dev: true + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /acorn@8.8.1: resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} engines: {node: '>=0.4.0'} @@ -2176,6 +2216,12 @@ packages: balanced-match: 1.0.2 concat-map: 0.0.1 + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -2488,97 +2534,73 @@ packages: parse-gitignore: 2.0.0 dev: true - /eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: true - - /eslint-scope@7.1.1: - resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 dev: true - /eslint-utils@3.0.0(eslint@8.29.0): - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.29.0 - eslint-visitor-keys: 2.1.0 - dev: true - - /eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - - /eslint-visitor-keys@3.3.0: - resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} + /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: true - /eslint@8.29.0: - resolution: {integrity: sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==} + /eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.3.3 - '@humanwhocodes/config-array': 0.11.7 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/regexpp': 4.10.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.0 + '@humanwhocodes/config-array': 0.11.14 '@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.1.1 - eslint-utils: 3.0.0(eslint@8.29.0) - eslint-visitor-keys: 3.3.0 - espree: 9.4.1 - esquery: 1.4.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.18.0 - grapheme-splitter: 1.0.4 + globals: 13.24.0 + graphemer: 1.4.0 ignore: 5.2.1 - import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.2.0 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.1 - regexpp: 3.2.0 + optionator: 0.9.3 strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color dev: true - /espree@9.4.1: - resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==} + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.8.1 - acorn-jsx: 5.3.2(acorn@8.8.1) - eslint-visitor-keys: 3.3.0 + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 3.4.3 dev: true /esprima@4.0.1: @@ -2587,8 +2609,8 @@ packages: hasBin: true dev: true - /esquery@1.4.0: - resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} + /esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 @@ -2601,11 +2623,6 @@ packages: estraverse: 5.3.0 dev: true - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true - /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -2666,8 +2683,8 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2826,8 +2843,8 @@ packages: engines: {node: '>=4'} dev: true - /globals@13.18.0: - resolution: {integrity: sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==} + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -2839,8 +2856,8 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.1 + fast-glob: 3.3.2 + ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -2849,8 +2866,8 @@ packages: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true /has-flag@3.0.0: @@ -2905,6 +2922,11 @@ packages: engines: {node: '>= 4'} dev: true + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + dev: true + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -3070,7 +3092,7 @@ packages: '@jest/expect': 29.3.1 '@jest/test-result': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -3089,7 +3111,7 @@ packages: - supports-color dev: true - /jest-cli@29.3.1(@types/node@18.13.0)(ts-node@10.9.1): + /jest-cli@29.3.1(@types/node@20.12.7)(ts-node@10.9.1): resolution: {integrity: sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -3106,7 +3128,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 29.3.1(@types/node@18.13.0)(ts-node@10.9.1) + jest-config: 29.3.1(@types/node@20.12.7)(ts-node@10.9.1) jest-util: 29.3.1 jest-validate: 29.3.1 prompts: 2.4.2 @@ -3117,7 +3139,7 @@ packages: - ts-node dev: true - /jest-config@29.3.1(@types/node@18.13.0)(ts-node@10.9.1): + /jest-config@29.3.1(@types/node@20.12.7)(ts-node@10.9.1): resolution: {integrity: sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -3132,7 +3154,7 @@ packages: '@babel/core': 7.20.5 '@jest/test-sequencer': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 babel-jest: 29.3.1(@babel/core@7.20.5) chalk: 4.1.2 ci-info: 3.7.0 @@ -3152,7 +3174,7 @@ packages: pretty-format: 29.3.1 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1(@types/node@18.13.0)(typescript@5.0.4) + ts-node: 10.9.1(@types/node@20.12.7)(typescript@5.0.4) transitivePeerDependencies: - supports-color dev: true @@ -3192,7 +3214,7 @@ packages: '@jest/environment': 29.3.1 '@jest/fake-timers': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 jest-mock: 29.3.1 jest-util: 29.3.1 dev: true @@ -3208,7 +3230,7 @@ packages: dependencies: '@jest/types': 29.3.1 '@types/graceful-fs': 4.1.5 - '@types/node': 18.13.0 + '@types/node': 20.12.7 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.10 @@ -3259,7 +3281,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 jest-util: 29.3.1 dev: true @@ -3314,7 +3336,7 @@ packages: '@jest/test-result': 29.3.1 '@jest/transform': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.10 @@ -3345,7 +3367,7 @@ packages: '@jest/test-result': 29.3.1 '@jest/transform': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 chalk: 4.1.2 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 @@ -3391,7 +3413,7 @@ packages: jest-util: 29.3.1 natural-compare: 1.4.0 pretty-format: 29.3.1 - semver: 7.3.8 + semver: 7.6.0 transitivePeerDependencies: - supports-color dev: true @@ -3401,7 +3423,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 chalk: 4.1.2 ci-info: 3.7.0 graceful-fs: 4.2.10 @@ -3426,7 +3448,7 @@ packages: dependencies: '@jest/test-result': 29.3.1 '@jest/types': 29.3.1 - '@types/node': 18.13.0 + '@types/node': 20.12.7 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -3438,13 +3460,13 @@ packages: resolution: {integrity: sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 18.13.0 + '@types/node': 20.12.7 jest-util: 29.3.1 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.3.1(@types/node@18.13.0)(ts-node@10.9.1): + /jest@29.3.1(@types/node@20.12.7)(ts-node@10.9.1): resolution: {integrity: sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -3457,17 +3479,13 @@ packages: '@jest/core': 29.3.1(ts-node@10.9.1) '@jest/types': 29.3.1 import-local: 3.1.0 - jest-cli: 29.3.1(@types/node@18.13.0)(ts-node@10.9.1) + jest-cli: 29.3.1(@types/node@20.12.7)(ts-node@10.9.1) transitivePeerDependencies: - '@types/node' - supports-color - ts-node dev: true - /js-sdsl@4.2.0: - resolution: {integrity: sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==} - dev: true - /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true @@ -3682,6 +3700,13 @@ packages: brace-expansion: 1.1.11 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: true + /minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} engines: {node: '>=8'} @@ -3708,10 +3733,6 @@ packages: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: true - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -3779,16 +3800,16 @@ packages: mimic-fn: 4.0.0 dev: true - /optionator@0.9.1: - resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} + /optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 - word-wrap: 1.2.3 dev: true /p-limit@2.3.0: @@ -3963,11 +3984,6 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true - /regexpp@3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - dev: true - /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -4064,6 +4080,14 @@ packages: lru-cache: 6.0.0 dev: true + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -4279,6 +4303,15 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true + /ts-api-utils@1.3.0(typescript@5.0.4): + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.0.4 + dev: true + /ts-jest@29.1.0(@babel/core@7.20.5)(jest@29.3.1)(typescript@5.0.4): resolution: {integrity: sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4303,7 +4336,7 @@ packages: '@babel/core': 7.20.5 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.3.1(@types/node@18.13.0)(ts-node@10.9.1) + jest: 29.3.1(@types/node@20.12.7)(ts-node@10.9.1) jest-util: 29.3.1 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -4313,7 +4346,7 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-node@10.9.1(@types/node@18.13.0)(typescript@5.0.4): + /ts-node@10.9.1(@types/node@20.12.7)(typescript@5.0.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -4332,7 +4365,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.13.0 + '@types/node': 20.12.7 acorn: 8.8.1 acorn-walk: 8.2.0 arg: 4.1.3 @@ -4346,20 +4379,11 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: false /tslib@2.5.0: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} - /tsutils@3.21.0(typescript@5.0.4): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.0.4 - dev: true - /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -4382,12 +4406,35 @@ packages: engines: {node: '>=10'} dev: true + /typescript-eslint@7.7.0(eslint@8.57.0)(typescript@5.0.4): + resolution: {integrity: sha512-wZZ+7mTQJCn4mGAvzdERtL4vwKGM/mF9cMSMeKUllz3Hgbd1Mdd5L60Q+nJmCio9RB4OyMMr0EX4Ry2Q7jiAyw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.0.4) + '@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.0.4) + '@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.0.4) + eslint: 8.57.0 + typescript: 5.0.4 + transitivePeerDependencies: + - supports-color + dev: true + /typescript@5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} hasBin: true dev: true + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true + /unicorn-magic@0.1.0: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} @@ -4453,11 +4500,6 @@ packages: isexe: 2.0.0 dev: true - /word-wrap@1.2.3: - resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} - engines: {node: '>=0.10.0'} - dev: true - /wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} diff --git a/src/config.mts b/src/config.mts index 788996f..485dd8e 100644 --- a/src/config.mts +++ b/src/config.mts @@ -1,3 +1,4 @@ +import assert from 'node:assert'; import path from 'path'; import { pathToFileURL } from 'url'; @@ -17,7 +18,9 @@ export class ConfigProvider { async init(): Promise { const resolvedPath = path.resolve(this.path); - this.configInstance = (await import(pathToFileURL(resolvedPath).toString())).default as Config; + const configModule = await import(pathToFileURL(resolvedPath).toString()) as unknown; + assert(typeof configModule === 'object' && configModule !== null && 'default' in configModule); + this.configInstance = configModule.default as Config; } get config(): Config { diff --git a/src/deb/cas.mts b/src/deb/cas.mts index 539e938..ae9dad1 100644 --- a/src/deb/cas.mts +++ b/src/deb/cas.mts @@ -31,7 +31,10 @@ export async function storeStream(root: string, stream: NodeJS.ReadableStream): // compute a digest const sha256Hash = createHash('sha256'); await pipeline(Readable.from(contentBuffer), sha256Hash); - const sha256 = sha256Hash.read(); + const sha256 = sha256Hash.read() as unknown; + if (!(sha256 instanceof Buffer)) { + throw new Error('Invalid read result'); + } // store in a file const sha256Dir = path.join(root, 'SHA256'); diff --git a/src/deb/deb-builder.mts b/src/deb/deb-builder.mts index 41fc420..5806d0a 100644 --- a/src/deb/deb-builder.mts +++ b/src/deb/deb-builder.mts @@ -1,6 +1,7 @@ import * as path from 'node:path'; import { appendFile, writeFile } from 'node:fs/promises'; import { readdirSync, readFileSync, renameSync, unlinkSync } from 'node:fs'; +import assert from 'node:assert'; import { randomBytes } from 'node:crypto'; import { Readable } from 'node:stream'; @@ -141,13 +142,16 @@ export class DebBuilder implements Deployer { await Promise.all(promises); } + // eslint-disable-next-line max-statements private async handleDeb(distribution: string, component: string, deb: Artifact): Promise { const controlTarSizeRange = { start: 120, end: 129 }; - const controlTarSizeString = - (await this.artifactProvider.getArtifactContent(deb, controlTarSizeRange)) - .read() - .toString() - .trim(); + const controlTarSizeData = (await this.artifactProvider.getArtifactContent(deb, controlTarSizeRange)).read() as unknown; + if (!(controlTarSizeData instanceof Buffer)) { + throw new Error('Invalid read result'); + } + const controlTarSizeString = controlTarSizeData + .toString() + .trim(); const controlTarSize = parseInt(controlTarSizeString, 10); const controlTarRange = { start: 132, end: 131 + controlTarSize }; const controlTar = await this.artifactProvider.getArtifactContent(deb, controlTarRange); @@ -155,75 +159,71 @@ export class DebBuilder implements Deployer { const whereExtract = path.join(this.tempPath, `control-${deb.md5}`); createDir(whereExtract); - let createFilePromise: Promise | undefined = undefined; - - await new Promise(resolve => { + await new Promise((resolve, reject) => { controlTar .pipe(tar.extract({ cwd: whereExtract, strip: 1 }, ['./control'])) // eslint-disable-next-line max-statements - .on('finish', () => { - const controlMetaContent = readFileSync(path.join(whereExtract, 'control'), 'utf-8').replaceAll(':', '='); - const controlMeta = ini.parse(controlMetaContent); - const name = controlMeta['Package']; - const version = controlMeta['Version']; - const arch = controlMeta['Architecture']; - - const archesSet = this.archesByDistComp.get(`${distribution}/${component}`); - - if (archesSet) { - archesSet.add(arch); - } else { - this.archesByDistComp.set(`${distribution}/${component}`, new Set([arch])); - } - - const fileName = binaryPackageFileName(name, version, arch); - - const targetMetaPath = path.join(this.distsPath, - distribution, - component, - `binary-${arch}`, - `${fileName}.meta`, - ); - createDir(path.dirname(targetMetaPath)); - renameSync(path.join(whereExtract, 'control'), targetMetaPath); - - removeDir(whereExtract); - - const debPath = path.join(this.poolPath, - component, - `${name[0]}`, - name, - distribution, - fileName, - ); - const relativeDebPath = path.relative(this.rootPath, debPath).replace(/\\/gu, '/'); - const debSize = controlTar.headers['content-range']?.split('/')[1]; - const sha1 = controlTar.headers['x-checksum-sha1']; - const sha256 = controlTar.headers['x-checksum-sha256']; - const md5 = controlTar.headers['x-checksum-md5']; - - if (typeof sha1 !== 'string' || typeof sha256 !== 'string' || typeof md5 !== 'string' || typeof debSize !== 'string') { - throw new Error('No checksum was found in headers'); - } - - const dataToAppend = `Filename: ${relativeDebPath}\nSize: ${debSize}\nSHA1: ${sha1}\nSHA256: ${sha256}\nMD5Sum: ${md5}\n`; + .on('finish', () => resolve()) + .on('error', err => reject(err)) + }); - appendFile(targetMetaPath, dataToAppend).then(() => resolve()); + const controlMetaContent = readFileSync(path.join(whereExtract, 'control'), 'utf-8').replaceAll(':', '='); + const controlMeta = ini.parse(controlMetaContent); + const name = controlMeta['Package'] as unknown; + assert(typeof name === 'string'); + const version = controlMeta['Version'] as unknown; + assert(typeof version === 'string'); + const arch = controlMeta['Architecture'] as unknown; + assert(typeof arch === 'string'); + + const archesSet = this.archesByDistComp.get(`${distribution}/${component}`); + + if (archesSet) { + archesSet.add(arch); + } else { + this.archesByDistComp.set(`${distribution}/${component}`, new Set([arch])); + } - const createFileOperation = this.packageCreator(deb.md5, debPath); + const fileName = binaryPackageFileName(name, version, arch); + + const targetMetaPath = path.join(this.distsPath, + distribution, + component, + `binary-${arch}`, + `${fileName}.meta`, + ); + createDir(path.dirname(targetMetaPath)); + renameSync(path.join(whereExtract, 'control'), targetMetaPath); + + removeDir(whereExtract); + + const debPath = path.join(this.poolPath, + component, + `${name[0]}`, + name, + distribution, + fileName, + ); + const relativeDebPath = path.relative(this.rootPath, debPath).replace(/\\/gu, '/'); + const debSize = controlTar.headers['content-range']?.split('/')[1]; + const sha1 = controlTar.headers['x-checksum-sha1']; + const sha256 = controlTar.headers['x-checksum-sha256']; + const md5 = controlTar.headers['x-checksum-md5']; + + if (typeof sha1 !== 'string' || typeof sha256 !== 'string' || typeof md5 !== 'string' || typeof debSize !== 'string') { + throw new Error('No checksum was found in headers'); + } - if (createFileOperation instanceof Promise) { - createFilePromise = createFileOperation; - } - }); - }); + const dataToAppend = `Filename: ${relativeDebPath}\nSize: ${debSize}\nSHA1: ${sha1}\nSHA256: ${sha256}\nMD5Sum: ${md5}\n`; + await appendFile(targetMetaPath, dataToAppend); - if (createFilePromise) { - await createFilePromise; + const createFileOperation = this.packageCreator(deb.md5, debPath); + if (createFileOperation instanceof Promise) { + await createFileOperation; } } - private async makeRelease(): Promise<{}> { + private async makeRelease(): Promise { const binaryPackageIndices: BinaryPackageIndexDescription[] = []; const componentPromises: Promise[] = []; @@ -239,7 +239,7 @@ export class DebBuilder implements Deployer { let packagesContent = ''; for (const metaFile of metaFiles) { - packagesContent += readFileSync(metaFile); + packagesContent += readFileSync(metaFile).toString('utf8'); packagesContent += '\n'; unlinkSync(metaFile); } diff --git a/src/jfrog/artifact-provider.mts b/src/jfrog/artifact-provider.mts index 91b4ff9..76db561 100644 --- a/src/jfrog/artifact-provider.mts +++ b/src/jfrog/artifact-provider.mts @@ -53,14 +53,9 @@ export default class JfrogArtifactProvider implements ArtifactProvider { return this.artifactoryClient.getItemUrl(await this.getArtifactoryItemMeta(artifact)); } - public getArtifactContent(artifact: Artifact, range?: ByteRange): Promise { - return new Promise((resolve, reject) => { - this.getArtifactoryItemMeta(artifact).then(meta => { - this.artifactoryClient.getContentStream(meta, range) - .then(value => resolve(value)) - .catch(err => reject(err)); - }); - }); + public async getArtifactContent(artifact: Artifact, range?: ByteRange): Promise { + const meta = await this.getArtifactoryItemMeta(artifact); + return this.artifactoryClient.getContentStream(meta, range); } private async getArtifactoryItemMeta(artifact: Artifact): Promise { diff --git a/tsconfig-base.json b/tsconfig-base.json index 9cf605b..e48662b 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -1,6 +1,6 @@ { "extends": [ - "@tsconfig/node18/tsconfig.json", + "@tsconfig/node20/tsconfig.json", "@tsconfig/strictest/tsconfig.json", "@tsconfig/esm/tsconfig.json" ] diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 0000000..52158e8 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig-base.json", + "include": ["**/*.mts"] +}