From 745e05d122466109cc805c5f10a17ed3ac776f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20K=C3=B6nig?= <33655937+jkoenig134@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:54:01 +0200 Subject: [PATCH] Upgrade the `form-data` lib (#293) * chore: bump root-level libs * fix: update form-data lib * refactor: adapt to lint rules --- package-lock.json | 391 +++++++++++++++--- package.json | 6 +- .../validateAttributeMatchesWithQuery.ts | 2 +- packages/transport/package.json | 2 +- packages/transport/src/core/CoreCrypto.ts | 10 + packages/transport/src/core/Reference.ts | 4 +- .../transport/src/core/TransportCoreErrors.ts | 17 +- .../transport/src/core/backbone/RESTClient.ts | 10 +- .../IdentityDeletionProcessController.ts | 4 +- .../sync/DatawalletModificationsProcessor.ts | 4 +- .../src/modules/tokens/TokenController.ts | 2 +- .../test/core/backbone/Paginator.test.ts | 2 +- .../transport/test/modules/PublicAPI.test.ts | 1 - .../RelationshipsController.test.ts | 2 +- .../test/testHelpers/FakeSyncClient.ts | 2 +- packages/transport/test/utils/Random.test.ts | 2 - .../transport/test/utils/Reflection.test.ts | 2 - 17 files changed, 358 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2ef9bf8bf..d7fa99403 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,10 +15,10 @@ "packages/app-runtime" ], "devDependencies": { - "@js-soft/eslint-config-ts": "^1.6.10", + "@js-soft/eslint-config-ts": "^1.6.12", "@js-soft/license-check": "^1.0.9", "@types/jest": "^29.5.13", - "@types/node": "^22.7.4", + "@types/node": "^22.7.5", "enhanced-publish": "^1.1.3", "eslint": "^8.57.1", "jest": "^29.7.0", @@ -29,7 +29,7 @@ "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", - "typescript": "^5.6.2" + "typescript": "^5.6.3" } }, "node_modules/@ampproject/remapping": { @@ -1270,18 +1270,18 @@ "integrity": "sha512-VfuAWmGF3fJ/hrbvk+2CYh3p6kdqlcdUtHrOM6LK9q7lnZrVHmlnaE242fhGoUiAiKF0w5PWhUtd5/lggEb0EA==" }, "node_modules/@js-soft/eslint-config-ts": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/@js-soft/eslint-config-ts/-/eslint-config-ts-1.6.10.tgz", - "integrity": "sha512-GkalyUbjUK9NMIX6J1+IIyFvKaITTLc2qNYleR27SVNetGtqWAYLG10JJC+m783p9y97IufbxxwcE7kdZhVIWw==", + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/@js-soft/eslint-config-ts/-/eslint-config-ts-1.6.12.tgz", + "integrity": "sha512-pNbRjeiWxgmND4yfKjEbei52oi6PM3x6F9amzi9+gjZfg6+fVhafvvkzKEG9ed13wsHbT1yxt1Nag7YmrOCpzQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "^7.14.1", - "@typescript-eslint/parser": "^7.14.1", + "@typescript-eslint/eslint-plugin": "^8.8.1", + "@typescript-eslint/parser": "^8.8.1", "eslint-plugin-chai-expect": "^3.1.0", - "eslint-plugin-chai-friendly": "^1.0.0", - "eslint-plugin-jest": "^28.6.0", - "eslint-plugin-mocha": "^10.4.3" + "eslint-plugin-chai-friendly": "^1.0.1", + "eslint-plugin-jest": "^28.8.3", + "eslint-plugin-mocha": "^10.5.0" }, "peerDependencies": { "eslint": ">=8" @@ -2144,10 +2144,11 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", - "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", "dev": true, + "license": "MIT", "dependencies": { "undici-types": "~6.19.2" } @@ -2206,32 +2207,32 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.1.tgz", + "integrity": "sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/type-utils": "8.8.1", + "@typescript-eslint/utils": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -2239,28 +2240,103 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.1.tgz", + "integrity": "sha512-hQUVn2Lij2NAxVFEdvIGxT9gP1tq2yM83m+by3whWFsWC+1y8pxxxHUFE1UqDu2VsGi2i6RLcv4QvouM84U+ow==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz", + "integrity": "sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependenciesMeta": { "typescript": { @@ -2268,18 +2344,68 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.1.tgz", + "integrity": "sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/scope-manager/node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/scope-manager/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -2287,26 +2413,66 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.1.tgz", + "integrity": "sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/typescript-estree": "8.8.1", + "@typescript-eslint/utils": "8.8.1", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz", + "integrity": "sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependenciesMeta": { "typescript": { @@ -2314,6 +2480,24 @@ } } }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/types": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", @@ -2358,26 +2542,87 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.1.tgz", + "integrity": "sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz", + "integrity": "sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/visitor-keys": { @@ -3748,10 +3993,11 @@ } }, "node_modules/eslint-plugin-chai-friendly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.0.0.tgz", - "integrity": "sha512-M7pDQ/H5IiMz1LsfNi7Js4LvKx7cx0VMJHT/u1d35GOXxkQdJ2vAeaLC5q6GW126KVOnUMJ8WvBMWWLxtfdcog==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.0.1.tgz", + "integrity": "sha512-dxD/uz1YKJ8U4yah1i+V/p/u+kHRy3YxTPe2nJGqb5lCR+ucan/KIexfZ5+q4X+tkllyMe86EBbAkdlwxNy3oQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" }, @@ -3760,9 +4006,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "28.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.0.tgz", - "integrity": "sha512-Tubj1hooFxCl52G4qQu0edzV/+EZzPUeN8p2NnW5uu4fbDs+Yo7+qDVDc4/oG3FbCqEBmu/OC3LSsyiU22oghw==", + "version": "28.8.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.3.tgz", + "integrity": "sha512-HIQ3t9hASLKm2IhIOqnu+ifw7uLZkIlR7RYNv7fMcEi/p0CIiJmfriStQS2LDkgtY4nyLbIZAD+JL347Yc2ETQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3786,7 +4032,9 @@ } }, "node_modules/eslint-plugin-mocha": { - "version": "10.4.3", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.5.0.tgz", + "integrity": "sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw==", "dev": true, "license": "MIT", "dependencies": { @@ -3818,6 +4066,8 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "license": "MIT", "dependencies": { @@ -3835,6 +4085,8 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4240,7 +4492,9 @@ } }, "node_modules/form-data": { - "version": "4.0.0", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", @@ -7583,6 +7837,8 @@ }, "node_modules/rambda": { "version": "7.5.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", + "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", "dev": true, "license": "MIT" }, @@ -8889,10 +9145,11 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -9413,7 +9670,7 @@ "@nmshd/crypto": "2.0.7", "axios": "^1.7.7", "fast-json-patch": "^3.1.1", - "form-data": "^4.0.0", + "form-data": "^4.0.1", "https-proxy-agent": "^7.0.5", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.21", diff --git a/package.json b/package.json index 9c465c951..8893d3a8d 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,10 @@ "test:teardown": "docker compose -f .dev/compose.yml down -fsv" }, "devDependencies": { - "@js-soft/eslint-config-ts": "^1.6.10", + "@js-soft/eslint-config-ts": "^1.6.12", "@js-soft/license-check": "^1.0.9", "@types/jest": "^29.5.13", - "@types/node": "^22.7.4", + "@types/node": "^22.7.5", "enhanced-publish": "^1.1.3", "eslint": "^8.57.1", "jest": "^29.7.0", @@ -41,6 +41,6 @@ "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", - "typescript": "^5.6.2" + "typescript": "^5.6.3" } } diff --git a/packages/consumption/src/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.ts b/packages/consumption/src/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.ts index 4b4b5cc37..b754fd19a 100644 --- a/packages/consumption/src/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.ts +++ b/packages/consumption/src/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.ts @@ -90,7 +90,7 @@ function validateAttributeMatchesWithIdentityAttributeQuery( return ValidationResult.success(); } -function validateAttributeMatchesWithIQLQuery(query: IQLQuery, attribute: IdentityAttribute | RelationshipAttribute, recipient: CoreAddress): ValidationResult { +function validateAttributeMatchesWithIQLQuery(_: IQLQuery, attribute: IdentityAttribute | RelationshipAttribute, recipient: CoreAddress): ValidationResult { if (!(attribute instanceof IdentityAttribute)) { return ValidationResult.error( ConsumptionCoreErrors.requests.attributeQueryMismatch( diff --git a/packages/transport/package.json b/packages/transport/package.json index f7a840c05..a4f512fe5 100644 --- a/packages/transport/package.json +++ b/packages/transport/package.json @@ -74,7 +74,7 @@ "@nmshd/crypto": "2.0.7", "axios": "^1.7.7", "fast-json-patch": "^3.1.1", - "form-data": "^4.0.0", + "form-data": "^4.0.1", "https-proxy-agent": "^7.0.5", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.21", diff --git a/packages/transport/src/core/CoreCrypto.ts b/packages/transport/src/core/CoreCrypto.ts index 8bf547a14..01e964a9b 100644 --- a/packages/transport/src/core/CoreCrypto.ts +++ b/packages/transport/src/core/CoreCrypto.ts @@ -35,6 +35,7 @@ export abstract class CoreCrypto { */ public static async generateSignatureKeypair(version: TransportVersion = TransportVersion.Latest): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoSignatures.generateKeypair(CryptoSignatureAlgorithm.ECDSA_ED25519); default: @@ -53,6 +54,7 @@ export abstract class CoreCrypto { */ public static async generateExchangeKeypair(version: TransportVersion = TransportVersion.Latest): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoExchange.generateKeypair(CryptoExchangeAlgorithm.ECDH_X25519); default: @@ -70,6 +72,7 @@ export abstract class CoreCrypto { */ public static async generateSecretKey(version: TransportVersion = TransportVersion.Latest): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoEncryption.generateKey(CryptoEncryptionAlgorithm.XCHACHA20_POLY1305); default: @@ -101,6 +104,7 @@ export abstract class CoreCrypto { const masterBuffer = CoreBuffer.fromString(master, Encoding.Utf8); const saltBuffer = CoreBuffer.fromString(salt, Encoding.Utf8); switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoDerivation.deriveKeyFromMaster(masterBuffer, 150000, keyAlgorithm, saltBuffer); default: @@ -132,6 +136,7 @@ export abstract class CoreCrypto { version: TransportVersion = TransportVersion.Latest ): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: const base: CryptoExchangeSecrets = await CryptoExchange.deriveTemplator(client, serverPublicKey, keyAlgorithm); return base; @@ -147,6 +152,7 @@ export abstract class CoreCrypto { version: TransportVersion = TransportVersion.Latest ): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: const base = await CryptoExchange.deriveRequestor(server, clientPublicKey, keyAlgorithm); return base; @@ -167,6 +173,7 @@ export abstract class CoreCrypto { */ public static async sign(content: CoreBuffer, privateKey: CryptoSignaturePrivateKey, version: TransportVersion = TransportVersion.Latest): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoSignatures.sign(content, privateKey, CryptoHashAlgorithm.SHA512); default: @@ -192,6 +199,7 @@ export abstract class CoreCrypto { version: TransportVersion = TransportVersion.Latest ): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoSignatures.verify(content, signature, publicKey); default: @@ -213,6 +221,7 @@ export abstract class CoreCrypto { */ public static async encrypt(content: CoreBuffer, secretKey: CryptoSecretKey, version: TransportVersion = TransportVersion.Latest): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoEncryption.encrypt(content, secretKey); default: @@ -234,6 +243,7 @@ export abstract class CoreCrypto { */ public static async decrypt(cipher: CryptoCipher, secretKey: CryptoSecretKey, version: TransportVersion = TransportVersion.Latest): Promise { switch (version) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition case TransportVersion.V1: return await CryptoEncryption.decrypt(cipher, secretKey); default: diff --git a/packages/transport/src/core/Reference.ts b/packages/transport/src/core/Reference.ts index f64ea5aaf..8b3a38bef 100644 --- a/packages/transport/src/core/Reference.ts +++ b/packages/transport/src/core/Reference.ts @@ -70,7 +70,7 @@ export class Reference extends Serializable implements IReference { if (value === "") return undefined; return parseInt(value); - } catch (e) { + } catch (_) { throw TransportCoreErrors.general.invalidTruncatedReference("The password type must be indicated by an integer in the TruncatedReference."); } } @@ -80,7 +80,7 @@ export class Reference extends Serializable implements IReference { try { algorithm = parseInt(alg); - } catch (e) { + } catch (_) { throw TransportCoreErrors.general.invalidTruncatedReference("The encryption algorithm must be indicated by an integer in the TruncatedReference."); } diff --git a/packages/transport/src/core/TransportCoreErrors.ts b/packages/transport/src/core/TransportCoreErrors.ts index 84b517aea..a4f458341 100644 --- a/packages/transport/src/core/TransportCoreErrors.ts +++ b/packages/transport/src/core/TransportCoreErrors.ts @@ -1,5 +1,4 @@ import { CoreError } from "@nmshd/core-types"; -import stringify from "json-stringify-safe"; import { RelationshipStatus } from "../modules"; class Relationships { @@ -104,20 +103,8 @@ class Challenges { } class Datawallet { - public unsupportedModification(type: "unsupportedCacheChangedModificationCollection", data: any) { - const errorCode = "error.transport.datawallet.unsupportedModification"; - const formattedData = data ? stringify(data) : ""; - - switch (type) { - case "unsupportedCacheChangedModificationCollection": - return new CoreError( - errorCode, - `The following collections were received in CacheChanged datawallet modifications but are not supported by the current version of this library: '${formattedData}'.` - ); - - default: - throw new Error(`Given type '${type}' is not supported.`); - } + public unsupportedModification(message: string) { + return new CoreError("error.transport.datawallet.unsupportedModification", message); } public insufficientSupportedDatawalletVersion(supportedVersion: number, requiredVersion: number) { diff --git a/packages/transport/src/core/backbone/RESTClient.ts b/packages/transport/src/core/backbone/RESTClient.ts index f86ea54cd..a614fcf8a 100644 --- a/packages/transport/src/core/backbone/RESTClient.ts +++ b/packages/transport/src/core/backbone/RESTClient.ts @@ -90,7 +90,7 @@ export class RESTClient { // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/naming-convention const HttpsProxyAgent = require("https-proxy-agent").HttpsProxyAgent; resultingRequestConfig.httpsAgent = new HttpsProxyAgent(httpsProxy, this.config.httpsAgentOptions); - } catch (e) { + } catch (_) { // ignore } } else { @@ -99,7 +99,7 @@ export class RESTClient { const httpsAgent = require("https")?.Agent; if (httpsAgent) resultingRequestConfig.httpsAgent = new httpsAgent(this.config.httpsAgentOptions); - } catch (e) { + } catch (_) { // ignore } } @@ -109,7 +109,7 @@ export class RESTClient { const agent = require("http")?.Agent; if (agent) resultingRequestConfig.httpAgent = new agent(this.config.httpAgentOptions); - } catch (e) { + } catch (_) { // ignore } @@ -184,7 +184,7 @@ export class RESTClient { try { const errorText = CoreBuffer.from(response.data).toUtf8(); response.data = JSON.parse(errorText); - } catch (e) { + } catch (_) { // Do nothing here: Error is handled below } } @@ -503,7 +503,7 @@ export class RESTClient { const message = `Response ${requestId}: ${method} ${path} | TraceId: '${platformParameters.traceId}' | PlatformDuration: ${platformParameters.responseDuration}`; try { this._logger.trace(message, JSON.stringify(response.data, undefined, 2)); - } catch (e) { + } catch (_) { this._logger.trace(message); } } diff --git a/packages/transport/src/modules/accounts/IdentityDeletionProcessController.ts b/packages/transport/src/modules/accounts/IdentityDeletionProcessController.ts index cf5a28f0a..0e1a7b2f8 100644 --- a/packages/transport/src/modules/accounts/IdentityDeletionProcessController.ts +++ b/packages/transport/src/modules/accounts/IdentityDeletionProcessController.ts @@ -117,7 +117,9 @@ export class IdentityDeletionProcessController extends TransportController { const getIdentityDeletionPromises = ids.map((id) => this.identityDeletionProcessClient.getIdentityDeletionProcess(id.toString())); const backboneTokens: { id: CoreId; cache: CachedIdentityDeletionProcess }[] = []; - for await (const identityDeletionProcess of getIdentityDeletionPromises) { + const identityDeletionProcesses = await Promise.all(getIdentityDeletionPromises); + + for (const identityDeletionProcess of identityDeletionProcesses) { const { id, ...cache } = identityDeletionProcess.value; backboneTokens.push({ id: CoreId.from(id), cache: CachedIdentityDeletionProcess.from(cache) }); } diff --git a/packages/transport/src/modules/sync/DatawalletModificationsProcessor.ts b/packages/transport/src/modules/sync/DatawalletModificationsProcessor.ts index 3d3df4611..4ebc5a778 100644 --- a/packages/transport/src/modules/sync/DatawalletModificationsProcessor.ts +++ b/packages/transport/src/modules/sync/DatawalletModificationsProcessor.ts @@ -167,7 +167,9 @@ export class DatawalletModificationsProcessor { const collectionsWithUncacheableItems = uniqueCollections.filter((c) => !this.collectionsWithCacheableItems.includes(c)); if (collectionsWithUncacheableItems.length > 0) { - throw TransportCoreErrors.datawallet.unsupportedModification("unsupportedCacheChangedModificationCollection", collectionsWithUncacheableItems); + throw TransportCoreErrors.datawallet.unsupportedModification( + `The following collections were received in CacheChanged datawallet modifications but are not supported by the current version of this library: '${collectionsWithUncacheableItems.join(", ")}'.` + ); } } diff --git a/packages/transport/src/modules/tokens/TokenController.ts b/packages/transport/src/modules/tokens/TokenController.ts index 6412791e3..a54dd31b5 100644 --- a/packages/transport/src/modules/tokens/TokenController.ts +++ b/packages/transport/src/modules/tokens/TokenController.ts @@ -228,7 +228,7 @@ export class TokenController extends TransportController { public async cleanupTokensOfDecomposedRelationship(peer: CoreAddress): Promise { const tokenDocs = await this.getTokens({ "cache.createdBy": peer.toString() }); const tokens = this.parseArray(tokenDocs, Token); - for await (const token of tokens) { + for (const token of tokens) { await this.tokens.delete(token); } } diff --git a/packages/transport/test/core/backbone/Paginator.test.ts b/packages/transport/test/core/backbone/Paginator.test.ts index c37763276..fca5c715a 100644 --- a/packages/transport/test/core/backbone/Paginator.test.ts +++ b/packages/transport/test/core/backbone/Paginator.test.ts @@ -5,8 +5,8 @@ import { FakePaginationDataSource } from "../../testHelpers/FakePaginationDataSo import { TestUtil } from "../../testHelpers/TestUtil"; async function itereateThroughAllItemsAsynchronously(paginator: Paginator) { - // eslint-disable-next-line no-empty,@typescript-eslint/no-unused-vars for await (const _ of paginator) { + // noop } } diff --git a/packages/transport/test/modules/PublicAPI.test.ts b/packages/transport/test/modules/PublicAPI.test.ts index ce1d5f491..50fd8a5de 100644 --- a/packages/transport/test/modules/PublicAPI.test.ts +++ b/packages/transport/test/modules/PublicAPI.test.ts @@ -167,7 +167,6 @@ function testPublicFunctions(controllerName: string) { let found = 0; for (const functionName of publicFunctions[controllerName]) { const item = controllers[controllerName][functionName]; - // eslint-disable-next-line jest/no-conditional-in-test if (!item || typeof item !== "function") continue; found++; } diff --git a/packages/transport/test/modules/relationships/RelationshipsController.test.ts b/packages/transport/test/modules/relationships/RelationshipsController.test.ts index 689b0a1d0..819cdb0a2 100644 --- a/packages/transport/test/modules/relationships/RelationshipsController.test.ts +++ b/packages/transport/test/modules/relationships/RelationshipsController.test.ts @@ -17,7 +17,7 @@ describe("RelationshipsController", function () { let recipientRel: Relationship; let tempDate: CoreDate; - function expectValidActiveFreshRelationship(relationship: Relationship, ownAccount: AccountController, peerAccount: AccountController, creationTime: CoreDate) { + function expectValidActiveFreshRelationship(relationship: Relationship, _: AccountController, peerAccount: AccountController, creationTime: CoreDate) { expect(relationship.id).toBeInstanceOf(CoreId); expect(relationship.status).toStrictEqual(RelationshipStatus.Active); expect(relationship.peer).toBeInstanceOf(Identity); diff --git a/packages/transport/test/testHelpers/FakeSyncClient.ts b/packages/transport/test/testHelpers/FakeSyncClient.ts index ea08a722b..4a448d215 100644 --- a/packages/transport/test/testHelpers/FakeSyncClient.ts +++ b/packages/transport/test/testHelpers/FakeSyncClient.ts @@ -49,7 +49,7 @@ export class FakeSyncClient implements ISyncClient { throw new Error("Method not implemented."); } - public finalizeDatawalletVersionUpgrade(id: string, request: FinalizeDatawalletVersionUpgradeRequest): Promise> { + public finalizeDatawalletVersionUpgrade(_id: string, request: FinalizeDatawalletVersionUpgradeRequest): Promise> { this.finalizeDatawalletVersionUpgradeRequest = request; return Promise.resolve( diff --git a/packages/transport/test/utils/Random.test.ts b/packages/transport/test/utils/Random.test.ts index 164bcd0d5..f4aca4958 100644 --- a/packages/transport/test/utils/Random.test.ts +++ b/packages/transport/test/utils/Random.test.ts @@ -15,7 +15,6 @@ describe("RandomTest", function () { const iterations = 10000; for (let i = 1; i < iterations; i++) { const n = await Random.intBetween(0, 1); - // eslint-disable-next-line jest/no-conditional-in-test switch (n) { case 0: buckets[0]++; @@ -136,7 +135,6 @@ describe("RandomTest", function () { for (let i = 1; i < iterations; i++) { const n = await Random.string(1, RandomCharacterRange.Alphabet); - // eslint-disable-next-line jest/no-conditional-in-test if (buckets[n]) buckets[n]++; else buckets[n] = 1; } diff --git a/packages/transport/test/utils/Reflection.test.ts b/packages/transport/test/utils/Reflection.test.ts index d31234280..b167fd3af 100644 --- a/packages/transport/test/utils/Reflection.test.ts +++ b/packages/transport/test/utils/Reflection.test.ts @@ -99,7 +99,6 @@ describe("ReflectionTest", function () { const reflectionKeys = Reflect.getMetadataKeys(Serializable, "types"); const notFoundClasses: string[] = []; for (const className of cryptoClassNames) { - // eslint-disable-next-line jest/no-conditional-in-test if (!reflectionKeys.includes(className)) { notFoundClasses.push(className); } @@ -112,7 +111,6 @@ describe("ReflectionTest", function () { const notFoundClasses: string[] = []; for (const className of transportClassNames) { - // eslint-disable-next-line jest/no-conditional-in-test if (!reflectionKeys.includes(className)) { notFoundClasses.push(className); }