From d4bb70815b54c48f692dfa04cbab40aabcd37f7d Mon Sep 17 00:00:00 2001 From: larabr <7375870+larabr@users.noreply.github.com> Date: Tue, 23 Sep 2025 18:29:38 +0200 Subject: [PATCH 1/3] Linter: update to eslint v9 This eslint version brings breaking changes related to the eslint config. eslint-airbnb-config has yet to release a compatible version with the new format, and it generally looks unmaintained, hence we drop the dependency in favor of the built-in recommended configs. --- .eslintignore | 4 - .eslintrc.cjs | 146 -- eslint.config.js | 155 ++ openpgp.d.ts | 4 +- package-lock.json | 1651 +++++++----------- package.json | 14 +- rollup.config.js | 2 - src/cleartext.js | 2 +- src/crypto/crypto.js | 2 +- src/crypto/public_key/elliptic/ecdh_x.js | 2 +- src/crypto/public_key/elliptic/ecdsa.js | 4 +- src/crypto/public_key/elliptic/oid_curves.js | 2 +- src/crypto/public_key/rsa.js | 4 +- src/enums.d.ts | 1 + src/key/helper.js | 4 +- src/key/key.js | 7 +- src/key/private_key.js | 2 +- src/key/subkey.js | 4 +- src/key/user.js | 2 +- src/message.js | 4 +- src/packet/packetlist.js | 4 +- src/packet/secret_key.js | 4 +- src/util.js | 4 +- test/benchmarks/memory_usage.js | 3 + test/general/key.js | 344 ++-- test/general/packet.js | 20 +- test/security/unsigned_subpackets.js | 2 +- test/typescript/definitions.ts | 42 +- test/unittests.js | 2 +- test/worker/worker_example.js | 2 +- 30 files changed, 1044 insertions(+), 1399 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index ff715070..00000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -dist -test/lib/ -test/typescript/ -docs diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 70dd627d..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,146 +0,0 @@ -module.exports = { - 'extends': [ - 'airbnb-base', - 'airbnb-typescript/base' - ], - - 'parser': '@typescript-eslint/parser', - - 'parserOptions': { - 'ecmaVersion': 11, - 'sourceType': 'module', - 'project': 'tsconfig.json' - }, - - 'env': { - 'browser': true, - 'es6': true, - 'node': true - }, - - 'plugins': [ - '@typescript-eslint', - 'chai-friendly', - 'import', - 'unicorn' - ], - - 'settings': { - 'import/resolver': { - 'typescript': {} - } - }, - - 'globals': { // TODO are all these necessary? - 'globalThis': true, - 'console': true, - 'Promise': true, - 'importScripts': true, - 'process': true, - 'Event': true, - 'describe': true, - 'it': true, - 'mocha': true, - 'before': true, - 'beforeEach': true, - 'after': true, - 'afterEach': true, - 'escape': true, - 'unescape': true, - 'resolves': true, - 'rejects': true, - 'TransformStream': true, - 'BigInt': true - }, - - 'rules': { - 'arrow-body-style': 'off', - 'arrow-parens': ['error','as-needed'], - 'class-methods-use-this': 'off', - '@typescript-eslint/comma-dangle': ['error', 'never'], - '@typescript-eslint/comma-spacing': 'off', - 'consistent-return': 'off', - 'default-case': 'off', - '@typescript-eslint/default-param-last': 'off', - 'eol-last': ['error', 'always'], - 'function-call-argument-newline': 'off', - 'func-names': ['error', 'never'], - 'function-paren-newline': 'off', - 'global-require': 'off', - 'key-spacing': 'off', - 'keyword-spacing': 'error', - 'max-classes-per-file': 'off', - 'max-len': 'off', - 'newline-per-chained-call': 'off', - 'no-bitwise': 'off', - 'no-continue': 'off', - 'no-else-return': 'off', - 'no-empty': ['error', { 'allowEmptyCatch': true }], - 'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1, 'maxBOF':0 }], - 'no-nested-ternary': 'off', - 'no-param-reassign': 'off', // TODO get rid of this - 'no-plusplus': 'off', - 'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], - 'object-curly-newline': 'off', - '@typescript-eslint/no-shadow': 'off', // TODO get rid of this - 'object-property-newline': [ - 'error', - { - 'allowMultiplePropertiesPerLine': true - } - ], - 'object-shorthand': 'off', - 'operator-assignment': 'off', - 'operator-linebreak': [ - 'error', - 'after' - ], - 'padded-blocks': 'off', - 'prefer-arrow-callback': 'off', - 'prefer-destructuring': 'off', - 'prefer-rest-params': 'off', // TODO get rid of this - 'prefer-spread': 'off', // TODO get rid of this - 'prefer-template': 'off', - 'quote-props': 'off', - 'quotes': ['error', 'single', { 'avoidEscape': true }], - '@typescript-eslint/space-before-function-paren': ['error', { 'anonymous': 'ignore', 'named': 'never', 'asyncArrow': 'always' }], - 'spaced-comment': 'off', - 'indent': 'off', - '@typescript-eslint/indent': ['error', 2, { 'SwitchCase': 1 }], - 'no-unused-vars': 'off', - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - } - ], - // eslint-plugin-import rules: - 'import/named': 'error', - 'import/extensions': 'off', // temporary: we use them in tests (ESM compliant), but not in the lib (to limit diff) - 'import/first': 'off', - 'import/no-extraneous-dependencies': ['error', { 'devDependencies': true, 'optionalDependencies': false, 'peerDependencies': false }], - 'import/no-unassigned-import': 'error', - 'import/no-unresolved': 'error', - 'import/prefer-default-export': 'off', - - // Custom silencers: - 'no-multi-assign': 'off', - 'no-underscore-dangle': 'off', - 'no-await-in-loop': 'off', - 'camelcase': 'off', // snake_case used in tests, need to fix separately - '@typescript-eslint/naming-convention': 'off', // supersedes 'camelcase' rule - '@typescript-eslint/lines-between-class-members': 'off', - - // Custom errors: - '@typescript-eslint/no-use-before-define': ['error', { 'functions': false, 'classes': true, 'variables': false, 'allowNamedExports': true }], - 'no-constant-condition': [2, { 'checkLoops': false }], - 'new-cap': [2, { 'properties': false, 'capIsNewExceptionPattern': 'EAX|OCB|GCM|CMAC|CBC|OMAC|CTR', 'newIsCapExceptionPattern': 'type|hash*' }], - 'max-lines': [2, { 'max': 620, 'skipBlankLines': true, 'skipComments': true }], - '@typescript-eslint/no-unused-expressions': 0, - 'chai-friendly/no-unused-expressions': [2, { 'allowShortCircuit': true }], - 'unicorn/switch-case-braces': ['error', 'avoid'], - - // Custom warnings: - 'no-console': 1 - } -}; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..687ae85b --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,155 @@ +// @ts-check +import eslint from '@eslint/js'; +import { defineConfig, globalIgnores } from 'eslint/config'; +import tseslint from 'typescript-eslint'; +import globals from 'globals'; +// @ts-expect-error missing types +import pluginChaiFriendly from 'eslint-plugin-chai-friendly'; +import pluginImport from 'eslint-plugin-import'; +import pluginStylistic from '@stylistic/eslint-plugin'; +// @ts-expect-error missing types +import pluginUnicorn from 'eslint-plugin-unicorn'; + +export default defineConfig( + eslint.configs.recommended, + tseslint.configs.recommended, + globalIgnores(['dist/', 'test/lib/', 'docs/', '.jsdocrc.cjs']), + { + languageOptions: { + ecmaVersion: 2022, + sourceType: 'module', + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname + }, + globals: { + ...globals.browser, + ...globals.nodeBuiltin, + ...globals.mocha + } + }, + settings: { + 'import/resolver': { + typescript: { alwaysTryTypes: true } + } + }, + plugins: { + 'chai-friendly': pluginChaiFriendly, + 'import': pluginImport, + '@stylistic': pluginStylistic, + 'unicorn': pluginUnicorn + }, + rules: { + 'arrow-body-style': 'off', + 'arrow-parens': ['error','as-needed'], + 'class-methods-use-this': 'off', // TODO warn + + 'comma-dangle': ['error', 'never'], + '@typescript-eslint/comma-spacing': 'off', + 'consistent-return': 'off', + 'default-case': 'off', + '@typescript-eslint/default-param-last': 'off', + 'eol-last': ['error', 'always'], + 'function-call-argument-newline': 'off', + 'func-names': ['error', 'never'], + 'function-paren-newline': 'off', + 'global-require': 'off', + 'key-spacing': 'off', + 'keyword-spacing': 'error', + 'max-classes-per-file': 'off', + 'max-len': 'off', + 'newline-per-chained-call': 'off', + 'no-bitwise': 'off', + 'no-continue': 'off', + 'no-else-return': 'off', + 'no-empty': ['error', { 'allowEmptyCatch': true }], + 'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1, 'maxBOF':0 }], + 'no-nested-ternary': 'off', // TODO warn + 'no-param-reassign': 'off', // TODO get rid of this + 'no-plusplus': 'off', + 'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], + 'object-curly-newline': 'off', + '@typescript-eslint/no-shadow': 'off', // TODO get rid of this + 'object-property-newline': [ + 'error', + { + 'allowMultiplePropertiesPerLine': true + } + ], + 'object-shorthand': 'off', + 'operator-assignment': 'off', + 'operator-linebreak': [ + 'error', + 'after' + ], + 'padded-blocks': 'off', + 'prefer-arrow-callback': 'off', + 'prefer-destructuring': 'off', + 'prefer-rest-params': 'off', // TODO get rid of this + 'prefer-spread': 'off', // TODO get rid of this + 'prefer-template': 'off', + 'quote-props': 'off', + 'quotes': ['error', 'single', { 'avoidEscape': true }], + 'spaced-comment': 'off', + 'indent': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + 'argsIgnorePattern': '^_' + } + ], + // eslint-plugin-import rules: + 'import/named': 'error', + 'import/extensions': 'off', // temporary: we use them in tests (ESM compliant), but not in the lib (to limit diff) + 'import/first': 'off', + 'import/no-extraneous-dependencies': ['error', { 'devDependencies': true, 'optionalDependencies': false, 'peerDependencies': false }], + 'import/no-unassigned-import': 'error', + 'import/no-unresolved': 'error', + 'import/prefer-default-export': 'off', + 'import/newline-after-import': 'error', + + // Custom silencers: + 'no-multi-assign': 'off', + 'no-underscore-dangle': 'off', + 'no-await-in-loop': 'off', + 'camelcase': 'off', // snake_case used in tests, need to fix separately + '@typescript-eslint/naming-convention': 'off', // supersedes 'camelcase' rule + '@typescript-eslint/lines-between-class-members': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-this-alias': 'off', + + // Custom errors: + '@typescript-eslint/no-use-before-define': ['error', { 'functions': false, 'classes': true, 'variables': false, 'allowNamedExports': true }], + 'no-constant-condition': [2, { 'checkLoops': false }], + 'new-cap': ['error', { + properties: false, + newIsCap: true, + newIsCapExceptions: [], + capIsNew: false + }], + 'max-lines': [2, { 'max': 620, 'skipBlankLines': true, 'skipComments': true }], + '@typescript-eslint/no-unused-expressions': 'off', + 'chai-friendly/no-unused-expressions': ['error', { 'allowShortCircuit': true }], + '@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }], + + '@stylistic/indent': ['error', 2, { 'SwitchCase': 1 }], + '@stylistic/quotes': ['error', 'single', { avoidEscape: true }], + '@stylistic/space-before-function-paren': ['error', { 'anonymous': 'ignore', 'named': 'never', 'asyncArrow': 'always' }], + '@stylistic/no-mixed-operators': ['error', { + allowSamePrecedence: true, + groups: [ + ['==', '!=', '===', '!==', '>', '>=', '<', '<='], + ['&&', '||'] + ] + }], + '@stylistic/no-mixed-spaces-and-tabs': 'error', + '@stylistic/eol-last': 'error', + '@stylistic/no-trailing-spaces': 'error', + '@stylistic/no-tabs': 'error', + 'unicorn/switch-case-braces': ['error', 'avoid'], + 'no-console': 'warn', + 'no-process-exit': 'error' + } + } +); diff --git a/openpgp.d.ts b/openpgp.d.ts index 4379f7f9..6d6af498 100644 --- a/openpgp.d.ts +++ b/openpgp.d.ts @@ -1,4 +1,4 @@ -/* eslint-disable max-lines, @typescript-eslint/indent */ +/* eslint-disable @stylistic/indent */ /** * Type definitions for OpenPGP.js http://openpgpjs.org/ @@ -411,7 +411,7 @@ export class AEADEncryptedDataPacket extends BasePacket { static readonly tag: enums.packet.aeadEncryptedData; private decrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): void; private encrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): void; - private crypt(fn: Function, sessionKey: Uint8Array, data: MaybeStream): MaybeStream; + private crypt(fn: (block: Uint8Array) => Uint8Array, sessionKey: Uint8Array, data: MaybeStream): MaybeStream; } export class PublicKeyEncryptedSessionKeyPacket extends BasePacket { diff --git a/package-lock.json b/package-lock.json index 38cb7a7c..5b788ae9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "6.2.2", "license": "LGPL-3.0+", "devDependencies": { + "@eslint/js": "^9.36.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "^1.9.6", "@noble/hashes": "^1.8.0", @@ -23,10 +24,10 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^12.1.4", "@rollup/plugin-wasm": "^6.2.2", + "@stylistic/eslint-plugin": "^5.4.0", "@types/chai": "^4.3.20", "@types/node": "^24.3.1", "@types/sinon": "^17.0.4", - "@typescript-eslint/parser": "^7.18.0", "@web/test-runner": "^0.19.0", "@web/test-runner-browserstack": "^0.8.0", "@web/test-runner-mocha": "^0.9.0", @@ -38,21 +39,20 @@ "chai": "^4.5.0", "chai-as-promised": "^8.0.1", "eckey-utils": "^0.7.14", - "eslint": "^8.57.1", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-import-resolver-typescript": "^3.10.1", - "eslint-plugin-chai-friendly": "^0.7.4", + "eslint": "^9.36.0", + "eslint-import-resolver-typescript": "^4.4.4", + "eslint-plugin-chai-friendly": "^1.1.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-unicorn": "^48.0.1", "fflate": "^0.8.2", + "globals": "^16.4.0", "mocha": "^11.7.1", "playwright": "^1.56.0", "rollup": "^4.48.1", "sinon": "^21.0.0", "tsx": "^4.20.5", "typescript": "^5.9.2", + "typescript-eslint": "^8.44.1", "web-streams-polyfill": "^4.2.0" }, "engines": { @@ -135,21 +135,21 @@ } }, "node_modules/@emnapi/core": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.3.tgz", - "integrity": "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", + "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.0.2", + "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz", - "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", + "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", "dev": true, "license": "MIT", "optional": true, @@ -158,9 +158,9 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.2.tgz", - "integrity": "sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", + "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", "dev": true, "license": "MIT", "optional": true, @@ -594,9 +594,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "dependencies": { @@ -622,17 +622,79 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -640,7 +702,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -657,6 +719,19 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -671,13 +746,40 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.36.0.tgz", + "integrity": "sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@hapi/bourne": { @@ -687,44 +789,28 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -741,13 +827,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -920,16 +1012,16 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.9.tgz", - "integrity": "sha512-OKRBiajrrxB9ATokgEQoG87Z25c67pCpYcCwmXYX8PBftC9pBfN18gnm/fh1wurSLEKIAt+QRFLFCQISrb66Jg==", + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "^1.4.0", - "@emnapi/runtime": "^1.4.0", - "@tybys/wasm-util": "^0.9.0" + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" } }, "node_modules/@noble/ciphers": { @@ -1012,16 +1104,6 @@ "node": ">= 8" } }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, "node_modules/@openpgp/jsdoc": { "version": "3.6.11", "resolved": "https://registry.npmjs.org/@openpgp/jsdoc/-/jsdoc-3.6.11.tgz", @@ -1664,6 +1746,40 @@ "type-detect": "^4.1.0" } }, + "node_modules/@stylistic/eslint-plugin": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.4.0.tgz", + "integrity": "sha512-UG8hdElzuBDzIbjG1QDwnYH0MQ73YLXDFHgZzB4Zh/YJfnw8XNsloVtytqzx0I2Qky9THSdpTmi8Vjn/pf/Lew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.0", + "@typescript-eslint/types": "^8.44.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=9.0.0" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -1672,9 +1788,9 @@ "license": "MIT" }, "node_modules/@tybys/wasm-util": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", "dev": true, "license": "MIT", "optional": true, @@ -1852,6 +1968,13 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -1926,13 +2049,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.3.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.1.tgz", - "integrity": "sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==", + "version": "24.7.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.2.tgz", + "integrity": "sha512-/NbVmcGTP+lj5oa4yiYxxeBjRivKQ5Ns1eSZeB99ExsEQ6rX5XYU1Zy/gGxY/ilqtD4Etx9mKyrPxZRetiahhA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.10.0" + "undici-types": "~7.14.0" } }, "node_modules/@types/normalize-package-data": { @@ -2039,124 +2162,160 @@ } }, "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.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.1.tgz", + "integrity": "sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==", "dev": true, "license": "MIT", - "peer": true, "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.44.1", + "@typescript-eslint/type-utils": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.1.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" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@typescript-eslint/parser": "^8.44.1", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" } }, "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.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.1.tgz", + "integrity": "sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "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.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.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", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.1.tgz", + "integrity": "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.44.1", + "@typescript-eslint/types": "^8.44.1", + "debug": "^4.3.4" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "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.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz", + "integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.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/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==", + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.1.tgz", + "integrity": "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ==", "dev": true, "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "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" + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.1.tgz", + "integrity": "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz", + "integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -2164,87 +2323,121 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz", + "integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/project-service": "8.44.1", + "@typescript-eslint/tsconfig-utils": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/visitor-keys": "8.44.1", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "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==", - "dev": true, - "license": "MIT", - "peer": true, - "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" - }, - "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" + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "node_modules/@typescript-eslint/utils": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.1.tgz", + "integrity": "sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.44.1", + "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.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.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz", + "integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.44.1", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, - "license": "ISC" + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", + "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", + "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] }, "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.7.2.tgz", - "integrity": "sha512-vxtBno4xvowwNmO/ASL0Y45TpHqmNkAaDtz4Jqb+clmcVSSl8XCG/PNFFkGsXXXS6AMjP+ja/TtNCFFa1QwLRg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", + "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", "cpu": [ "arm64" ], @@ -2256,9 +2449,9 @@ ] }, "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.7.2.tgz", - "integrity": "sha512-qhVa8ozu92C23Hsmv0BF4+5Dyyd5STT1FolV4whNgbY6mj3kA0qsrGPe35zNR3wAN7eFict3s4Rc2dDTPBTuFQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", + "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", "cpu": [ "x64" ], @@ -2270,9 +2463,9 @@ ] }, "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.7.2.tgz", - "integrity": "sha512-zKKdm2uMXqLFX6Ac7K5ElnnG5VIXbDlFWzg4WJ8CGUedJryM5A3cTgHuGMw1+P5ziV8CRhnSEgOnurTI4vpHpg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", + "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", "cpu": [ "x64" ], @@ -2284,9 +2477,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.7.2.tgz", - "integrity": "sha512-8N1z1TbPnHH+iDS/42GJ0bMPLiGK+cUqOhNbMKtWJ4oFGzqSJk/zoXFzcQkgtI63qMcUI7wW1tq2usZQSb2jxw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", + "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", "cpu": [ "arm" ], @@ -2298,9 +2491,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.7.2.tgz", - "integrity": "sha512-tjYzI9LcAXR9MYd9rO45m1s0B/6bJNuZ6jeOxo1pq1K6OBuRMMmfyvJYval3s9FPPGmrldYA3mi4gWDlWuTFGA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", + "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", "cpu": [ "arm" ], @@ -2312,9 +2505,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.7.2.tgz", - "integrity": "sha512-jon9M7DKRLGZ9VYSkFMflvNqu9hDtOCEnO2QAryFWgT6o6AXU8du56V7YqnaLKr6rAbZBWYsYpikF226v423QA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", + "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", "cpu": [ "arm64" ], @@ -2326,9 +2519,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.7.2.tgz", - "integrity": "sha512-c8Cg4/h+kQ63pL43wBNaVMmOjXI/X62wQmru51qjfTvI7kmCy5uHTJvK/9LrF0G8Jdx8r34d019P1DVJmhXQpA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", + "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", "cpu": [ "arm64" ], @@ -2340,9 +2533,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.7.2.tgz", - "integrity": "sha512-A+lcwRFyrjeJmv3JJvhz5NbcCkLQL6Mk16kHTNm6/aGNc4FwPHPE4DR9DwuCvCnVHvF5IAd9U4VIs/VvVir5lg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", + "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", "cpu": [ "ppc64" ], @@ -2354,9 +2547,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.7.2.tgz", - "integrity": "sha512-hQQ4TJQrSQW8JlPm7tRpXN8OCNP9ez7PajJNjRD1ZTHQAy685OYqPrKjfaMw/8LiHCt8AZ74rfUVHP9vn0N69Q==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", + "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", "cpu": [ "riscv64" ], @@ -2368,9 +2561,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.7.2.tgz", - "integrity": "sha512-NoAGbiqrxtY8kVooZ24i70CjLDlUFI7nDj3I9y54U94p+3kPxwd2L692YsdLa+cqQ0VoqMWoehDFp21PKRUoIQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", + "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", "cpu": [ "riscv64" ], @@ -2382,9 +2575,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.7.2.tgz", - "integrity": "sha512-KaZByo8xuQZbUhhreBTW+yUnOIHUsv04P8lKjQ5otiGoSJ17ISGYArc+4vKdLEpGaLbemGzr4ZeUbYQQsLWFjA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", + "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", "cpu": [ "s390x" ], @@ -2396,9 +2589,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.7.2.tgz", - "integrity": "sha512-dEidzJDubxxhUCBJ/SHSMJD/9q7JkyfBMT77Px1npl4xpg9t0POLvnWywSk66BgZS/b2Hy9Y1yFaoMTFJUe9yg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", + "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", "cpu": [ "x64" ], @@ -2410,9 +2603,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.2.tgz", - "integrity": "sha512-RvP+Ux3wDjmnZDT4XWFfNBRVG0fMsc+yVzNFUqOflnDfZ9OYujv6nkh+GOr+watwrW4wdp6ASfG/e7bkDradsw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", + "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", "cpu": [ "x64" ], @@ -2424,9 +2617,9 @@ ] }, "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.2.tgz", - "integrity": "sha512-y797JBmO9IsvXVRCKDXOxjyAE4+CcZpla2GSoBQ33TVb3ILXuFnMrbR/QQZoauBYeOFuu4w3ifWLw52sdHGz6g==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", + "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", "cpu": [ "wasm32" ], @@ -2434,16 +2627,16 @@ "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.9" + "@napi-rs/wasm-runtime": "^0.2.11" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.7.2.tgz", - "integrity": "sha512-gtYTh4/VREVSLA+gHrfbWxaMO/00y+34htY7XpioBTy56YN2eBjkPrY1ML1Zys89X3RJDKVaogzwxlM1qU7egg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", + "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", "cpu": [ "arm64" ], @@ -2455,9 +2648,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.7.2.tgz", - "integrity": "sha512-Ywv20XHvHTDRQs12jd3MY8X5C8KLjDbg/jyaal/QLKx3fAShhJyD4blEANInsjxW3P7isHx1Blt56iUDDJO3jg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", + "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", "cpu": [ "ia32" ], @@ -2469,9 +2662,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.7.2.tgz", - "integrity": "sha512-friS8NEQfHaDbkThxopGk+LuE5v3iY0StruifjQEt7SLbA46OnfgMO15sOTkbpJkol6RB+1l1TYPXh0sCddpvA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", + "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", "cpu": [ "x64" ], @@ -3047,9 +3240,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -3276,28 +3469,6 @@ "node": ">=8" } }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array.prototype.findlastindex": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", @@ -3358,24 +3529,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", @@ -3421,14 +3574,6 @@ "node": ">=4" } }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -3482,28 +3627,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/axe-core": { - "version": "4.10.3", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz", - "integrity": "sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==", - "dev": true, - "license": "MPL-2.0", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/b4a": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", @@ -4360,13 +4483,6 @@ "dev": true, "license": "MIT" }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true, - "license": "MIT" - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -4503,14 +4619,6 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true - }, "node_modules/data-uri-to-buffer": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", @@ -4583,9 +4691,9 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -4802,19 +4910,6 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -5192,35 +5287,6 @@ "node": ">= 0.4" } }, - "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", - "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", - "safe-array-concat": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-module-lexer": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", @@ -5390,127 +5456,89 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.36.0.tgz", + "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.36.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "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.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "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", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, - "node_modules/eslint-config-airbnb": { - "version": "19.0.4", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", - "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", + "node_modules/eslint-import-context": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz", + "integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==", "dev": true, "license": "MIT", "dependencies": { - "eslint-config-airbnb-base": "^15.0.0", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5" + "get-tsconfig": "^4.10.1", + "stable-hash-x": "^0.2.0" }, "engines": { - "node": "^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-context" }, "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.28.0", - "eslint-plugin-react-hooks": "^4.3.0" - } - }, - "node_modules/eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "license": "MIT", - "dependencies": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" + "unrs-resolver": "^1.0.0" }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.2" - } - }, - "node_modules/eslint-config-airbnb-base/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-config-airbnb-typescript": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-18.0.0.tgz", - "integrity": "sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-config-airbnb-base": "^15.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^7.0.0", - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "peerDependenciesMeta": { + "unrs-resolver": { + "optional": true + } } }, "node_modules/eslint-import-resolver-node": { @@ -5536,22 +5564,22 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz", - "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==", + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz", + "integrity": "sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==", "dev": true, "license": "ISC", "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.4.0", - "get-tsconfig": "^4.10.0", + "debug": "^4.4.1", + "eslint-import-context": "^0.1.8", + "get-tsconfig": "^4.10.1", "is-bun-module": "^2.0.0", - "stable-hash": "^0.0.5", - "tinyglobby": "^0.2.13", - "unrs-resolver": "^1.6.2" + "stable-hash-x": "^0.2.0", + "tinyglobby": "^0.2.14", + "unrs-resolver": "^1.7.11" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^16.17.0 || >=18.6.0" }, "funding": { "url": "https://opencollective.com/eslint-import-resolver-typescript" @@ -5599,9 +5627,9 @@ } }, "node_modules/eslint-plugin-chai-friendly": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.7.4.tgz", - "integrity": "sha512-PGPjJ8diYgX1mjLxGJqRop2rrGwZRKImoEOwUOgoIhg0p80MkTaqvmFLe5TF7/iagZHggasvIfQlUyHIhK/PYg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.1.0.tgz", + "integrity": "sha512-+T1rClpDdXkgBAhC16vRQMI5umiWojVqkj9oUTdpma50+uByCZM/oBfxitZiOkjMRlm725mwFfz/RVgyDRvCKA==", "dev": true, "license": "MIT", "engines": { @@ -5702,181 +5730,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", - "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "aria-query": "^5.3.2", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.1" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", - "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", - "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/eslint-plugin-react/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/eslint-plugin-unicorn": { "version": "48.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", @@ -5911,9 +5764,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -5921,7 +5774,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -5964,6 +5817,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5978,18 +5844,31 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6267,11 +6146,14 @@ } }, "node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -6323,16 +6205,16 @@ "license": "MIT" }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -6389,18 +6271,17 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { @@ -6727,9 +6608,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", - "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6789,16 +6670,13 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", + "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7651,16 +7529,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -7941,25 +7809,6 @@ "node": ">=8" } }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", - "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/jackspeak": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", @@ -8067,23 +7916,6 @@ "json5": "lib/cli.js" } }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -8275,28 +8107,6 @@ "ms": "^2.1.1" } }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true, - "license": "CC0-1.0", - "peer": true - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/lazystream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", @@ -8570,20 +8380,6 @@ "dev": true, "license": "MIT" }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, "node_modules/loupe": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", @@ -8963,9 +8759,9 @@ } }, "node_modules/napi-postinstall": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.2.3.tgz", - "integrity": "sha512-Mi7JISo/4Ij2tDZ2xBE2WH+/KvVlkhA6juEjpEeRAVPNCpN3nxJo/5FhDNKgBcdmcmhaH6JjgST4xY/23ZYK0w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.3.tgz", + "integrity": "sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow==", "dev": true, "license": "MIT", "bin": { @@ -9114,17 +8910,6 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -9169,22 +8954,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.fromentries": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", @@ -9727,9 +9496,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", "engines": { @@ -9849,19 +9618,6 @@ "node": ">=0.4.0" } }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/proxy-agent": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", @@ -10097,14 +9853,6 @@ "node": ">= 0.8" } }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -10534,69 +10282,6 @@ "dev": true, "license": "MIT" }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/rollup": { "version": "4.48.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.48.1.tgz", @@ -11203,12 +10888,15 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/stable-hash": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", - "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", + "node_modules/stable-hash-x": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz", + "integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } }, "node_modules/statuses": { "version": "1.5.0", @@ -11313,63 +11001,6 @@ "dev": true, "license": "MIT" }, - "node_modules/string.prototype.includes": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", - "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", - "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", - "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, "node_modules/string.prototype.trim": { "version": "1.2.10", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", @@ -11722,13 +11353,6 @@ "b4a": "^1.6.4" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -11737,14 +11361,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", - "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -11790,16 +11414,16 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18.12" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=4.8.4" } }, "node_modules/tsconfig-paths": { @@ -11890,19 +11514,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -12016,6 +11627,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.44.1.tgz", + "integrity": "sha512-0ws8uWGrUVTjEeN2OM4K1pLKHK/4NiNP/vz6ns+LjT/6sqpaYzIVFajZb1fj/IDwpsrrHb3Jy0Qm5u9CPcKaeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.44.1", + "@typescript-eslint/parser": "8.44.1", + "@typescript-eslint/typescript-estree": "8.44.1", + "@typescript-eslint/utils": "8.44.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, "node_modules/typical": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", @@ -12081,9 +11716,9 @@ } }, "node_modules/undici-types": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", - "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz", + "integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==", "dev": true, "license": "MIT" }, @@ -12098,36 +11733,38 @@ } }, "node_modules/unrs-resolver": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.7.2.tgz", - "integrity": "sha512-BBKpaylOW8KbHsu378Zky/dGh4ckT/4NW/0SHRABdqRLcQJ2dAOjDo9g97p04sWflm0kqPqpUatxReNV/dqI5A==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", + "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { - "napi-postinstall": "^0.2.2" + "napi-postinstall": "^0.3.0" }, "funding": { - "url": "https://github.com/sponsors/JounQin" + "url": "https://opencollective.com/unrs-resolver" }, "optionalDependencies": { - "@unrs/resolver-binding-darwin-arm64": "1.7.2", - "@unrs/resolver-binding-darwin-x64": "1.7.2", - "@unrs/resolver-binding-freebsd-x64": "1.7.2", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.2", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.7.2", - "@unrs/resolver-binding-linux-arm64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-arm64-musl": "1.7.2", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-riscv64-musl": "1.7.2", - "@unrs/resolver-binding-linux-s390x-gnu": "1.7.2", - "@unrs/resolver-binding-linux-x64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-x64-musl": "1.7.2", - "@unrs/resolver-binding-wasm32-wasi": "1.7.2", - "@unrs/resolver-binding-win32-arm64-msvc": "1.7.2", - "@unrs/resolver-binding-win32-ia32-msvc": "1.7.2", - "@unrs/resolver-binding-win32-x64-msvc": "1.7.2" + "@unrs/resolver-binding-android-arm-eabi": "1.11.1", + "@unrs/resolver-binding-android-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-x64": "1.11.1", + "@unrs/resolver-binding-freebsd-x64": "1.11.1", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", + "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-musl": "1.11.1", + "@unrs/resolver-binding-wasm32-wasi": "1.11.1", + "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", + "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", + "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" } }, "node_modules/uri-js": { diff --git a/package.json b/package.json index b89c6acf..f8757861 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "postversion": "git push --follow-tags && npm publish" }, "devDependencies": { + "@eslint/js": "^9.36.0", "@noble/ciphers": "^1.3.0", "@noble/curves": "^1.9.6", "@noble/hashes": "^1.8.0", @@ -77,10 +78,10 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^12.1.4", "@rollup/plugin-wasm": "^6.2.2", + "@stylistic/eslint-plugin": "^5.4.0", "@types/chai": "^4.3.20", "@types/node": "^24.3.1", "@types/sinon": "^17.0.4", - "@typescript-eslint/parser": "^7.18.0", "@web/test-runner": "^0.19.0", "@web/test-runner-browserstack": "^0.8.0", "@web/test-runner-mocha": "^0.9.0", @@ -92,21 +93,20 @@ "chai": "^4.5.0", "chai-as-promised": "^8.0.1", "eckey-utils": "^0.7.14", - "eslint": "^8.57.1", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-import-resolver-typescript": "^3.10.1", - "eslint-plugin-chai-friendly": "^0.7.4", + "eslint": "^9.36.0", + "eslint-import-resolver-typescript": "^4.4.4", + "eslint-plugin-chai-friendly": "^1.1.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-unicorn": "^48.0.1", "fflate": "^0.8.2", + "globals": "^16.4.0", "mocha": "^11.7.1", "playwright": "^1.56.0", "rollup": "^4.48.1", "sinon": "^21.0.0", "tsx": "^4.20.5", "typescript": "^5.9.2", + "typescript-eslint": "^8.44.1", "web-streams-polyfill": "^4.2.0" }, "overrides": { diff --git a/rollup.config.js b/rollup.config.js index 01108693..6975d496 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,3 @@ -/* eslint-disable no-process-env */ - import { builtinModules } from 'module'; import { readFileSync } from 'fs'; diff --git a/src/cleartext.js b/src/cleartext.js index 61136c28..841d3f67 100644 --- a/src/cleartext.js +++ b/src/cleartext.js @@ -189,7 +189,7 @@ function verifyHeaders(headers, packetlist) { .map(hashName => { try { return enums.write(enums.hash, hashName.toLowerCase()); - } catch (e) { + } catch { throw new Error('Unknown hash algorithm in armor header: ' + hashName.toLowerCase()); } }); diff --git a/src/crypto/crypto.js b/src/crypto/crypto.js index 0edf846a..699c6cfe 100644 --- a/src/crypto/crypto.js +++ b/src/crypto/crypto.js @@ -458,7 +458,7 @@ export function generateSessionKey(algo) { function checkSupportedCurve(oid) { try { oid.getName(); - } catch (e) { + } catch { throw new UnsupportedError('Unknown curve OID'); } } diff --git a/src/crypto/public_key/elliptic/ecdh_x.js b/src/crypto/public_key/elliptic/ecdh_x.js index 2cd899e6..f5d5aa91 100644 --- a/src/crypto/public_key/elliptic/ecdh_x.js +++ b/src/crypto/public_key/elliptic/ecdh_x.js @@ -88,7 +88,7 @@ export async function validateParams(algo, A, k) { const recomputedSharedSecret = await recomputeSharedSecret(algo, ephemeralPublicKey, A, k); return util.equalsUint8Array(sharedSecret, recomputedSharedSecret); - } catch (_) { + } catch { return false; } diff --git a/src/crypto/public_key/elliptic/ecdsa.js b/src/crypto/public_key/elliptic/ecdsa.js index 58f33398..c555a295 100644 --- a/src/crypto/public_key/elliptic/ecdsa.js +++ b/src/crypto/public_key/elliptic/ecdsa.js @@ -161,7 +161,7 @@ export async function validateParams(oid, Q, d) { const signature = await sign(oid, hashAlgo, message, Q, d, hashed); // eslint-disable-next-line @typescript-eslint/return-await return await verify(oid, hashAlgo, signature, message, Q, hashed); - } catch (err) { + } catch { return false; } } @@ -284,7 +284,7 @@ async function nodeVerify(curve, hashAlgo, { r, s }, message, publicKey) { try { return verify.verify({ key: derPublicKey, format: 'der', type: 'spki', dsaEncoding: 'ieee-p1363' }, signature); - } catch (err) { + } catch { return false; } } diff --git a/src/crypto/public_key/elliptic/oid_curves.js b/src/crypto/public_key/elliptic/oid_curves.js index c1f689e2..83fc7764 100644 --- a/src/crypto/public_key/elliptic/oid_curves.js +++ b/src/crypto/public_key/elliptic/oid_curves.js @@ -143,7 +143,7 @@ class CurveWithOID { this.name = oidOrName instanceof OID ? oidOrName.getName() : enums.write(enums.curve,oidOrName); - } catch (err) { + } catch { throw new UnsupportedError('Unknown curve'); } const params = curves[this.name]; diff --git a/src/crypto/public_key/rsa.js b/src/crypto/public_key/rsa.js index 02c8e691..849d1cd3 100644 --- a/src/crypto/public_key/rsa.js +++ b/src/crypto/public_key/rsa.js @@ -333,7 +333,7 @@ async function nodeVerify(hashAlgo, data, s, n, e) { try { return verify.verify(key, s); - } catch (err) { + } catch { return false; } } @@ -361,7 +361,7 @@ async function nodeDecrypt(data, n, e, d, p, q, u) { try { return new Uint8Array(nodeCrypto.privateDecrypt(key, data)); - } catch (err) { + } catch { throw new Error('Decryption error'); } } diff --git a/src/enums.d.ts b/src/enums.d.ts index 067be092..7af77bf3 100644 --- a/src/enums.d.ts +++ b/src/enums.d.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-duplicate-enum-values */ declare namespace enums { export function read(type: typeof armor, e: armor): armorNames; export function read(type: typeof compression, e: compression): compressionNames; diff --git a/src/key/helper.js b/src/key/helper.js index 50c151b0..1af37cef 100644 --- a/src/key/helper.js +++ b/src/key/helper.js @@ -357,7 +357,7 @@ export async function isDataRevoked(primaryKey, signatureType, dataToVerify, rev // TODO get an identifier of the revoked object instead revocationKeyIDs.push(revocationSignature.issuerKeyID); } - } catch (e) {} + } catch {} })); // TODO further verify that this is the signature that should be revoked if (signature) { @@ -398,7 +398,7 @@ export function sanitizeKeyOptions(options, subkeyDefaults = {}) { case 'ecc': // NB: this case also handles legacy eddsa and x25519 keys, based on `options.curve` try { options.curve = enums.write(enums.curve, options.curve); - } catch (e) { + } catch { throw new Error('Unknown curve'); } if (options.curve === enums.curve.ed25519Legacy || options.curve === enums.curve.curve25519Legacy || diff --git a/src/key/key.js b/src/key/key.js index dc0f9d96..fd13c0d0 100644 --- a/src/key/key.js +++ b/src/key/key.js @@ -442,7 +442,7 @@ class Key { } else { primaryKeyExpiry = selfSigKeyExpiry < selfSigExpiry ? selfSigKeyExpiry : selfSigExpiry; } - } catch (e) { + } catch { primaryKeyExpiry = null; } @@ -510,7 +510,7 @@ class Key { } } if (!users.length) { - // eslint-disable-next-line @typescript-eslint/no-throw-literal + // eslint-disable-next-line @typescript-eslint/only-throw-error throw exception || new Error('Could not find primary user'); } await Promise.all(users.map(async function (a) { @@ -751,8 +751,7 @@ class Key { } ['getKeyID', 'getFingerprint', 'getAlgorithmInfo', 'getCreationTime', 'hasSameFingerprintAs'].forEach(name => { - Key.prototype[name] = - Subkey.prototype[name]; + Key.prototype[name] = Subkey.prototype[name]; }); export default Key; diff --git a/src/key/private_key.js b/src/key/private_key.js index e82fa118..59f62e6d 100644 --- a/src/key/private_key.js +++ b/src/key/private_key.js @@ -114,7 +114,7 @@ class PrivateKey extends PublicKey { } if (keys.length === 0) { - // eslint-disable-next-line @typescript-eslint/no-throw-literal + // eslint-disable-next-line @typescript-eslint/only-throw-error throw exception || new Error('No decryption key packets found'); } diff --git a/src/key/subkey.js b/src/key/subkey.js index 49af01b5..f1fe17e6 100644 --- a/src/key/subkey.js +++ b/src/key/subkey.js @@ -112,7 +112,7 @@ class Subkey { let bindingSignature; try { bindingSignature = await helper.getLatestValidSignature(this.bindingSignatures, primaryKey, enums.signature.subkeyBinding, dataToVerify, date, config); - } catch (e) { + } catch { return null; } const keyExpiry = helper.getKeyExpirationTime(this.keyPacket, bindingSignature); @@ -153,7 +153,7 @@ class Subkey { try { await srcBindSig.verify(primaryKey, enums.signature.subkeyBinding, dataToVerify, date, undefined, config); return true; - } catch (e) { + } catch { return false; } }); diff --git a/src/key/user.js b/src/key/user.js index b401a742..e5eb75cc 100644 --- a/src/key/user.js +++ b/src/key/user.js @@ -222,7 +222,7 @@ class User { try { await srcSelfSig.verify(primaryKey, enums.signature.certGeneric, dataToVerify, date, false, config); return true; - } catch (e) { + } catch { return false; } }); diff --git a/src/message.js b/src/message.js index 68dda0a3..5392a221 100644 --- a/src/message.js +++ b/src/message.js @@ -220,7 +220,7 @@ export class Message { if (selfCertification.preferredSymmetricAlgorithms) { algos = algos.concat(selfCertification.preferredSymmetricAlgorithms); } - } catch (e) {} + } catch {} await Promise.all(decryptionKeyPackets.map(async function(decryptionKeyPacket) { if (!decryptionKeyPacket.isDecrypted()) { @@ -460,7 +460,7 @@ export class Message { try { await keyPacket.decrypt(password); return 1; - } catch (e) { + } catch { return 0; } }; diff --git a/src/packet/packetlist.js b/src/packet/packetlist.js index 41be1c16..915d5eb1 100644 --- a/src/packet/packetlist.js +++ b/src/packet/packetlist.js @@ -26,7 +26,7 @@ export function newPacketFromTag(tag, allowedPackets) { let packetType; try { packetType = enums.read(enums.packet, tag); - } catch (e) { + } catch { throw new UnknownPacketError(`Unknown packet type with tag: ${tag}`); } throw new Error(`Packet not allowed in this context: ${packetType}`); @@ -174,7 +174,7 @@ class PacketList extends Array { // in case there's an MDC error, which should take precedence. if (unauthenticatedError) { await reader.readToEnd(); - // eslint-disable-next-line @typescript-eslint/no-throw-literal + // eslint-disable-next-line @typescript-eslint/only-throw-error throw unauthenticatedError; } diff --git a/src/packet/secret_key.js b/src/packet/secret_key.js index 287f888f..bdfd4e7e 100644 --- a/src/packet/secret_key.js +++ b/src/packet/secret_key.js @@ -481,7 +481,7 @@ class SecretKeyPacket extends PublicKeyPacket { try { const { privateParams } = parsePrivateKeyParams(this.algorithm, cleartext, this.publicParams); this.privateParams = privateParams; - } catch (err) { + } catch { throw new Error('Error reading MPIs'); } this.isEncrypted = false; @@ -515,7 +515,7 @@ class SecretKeyPacket extends PublicKeyPacket { try { // this can throw if some parameters are undefined validParams = await validateParams(this.algorithm, this.publicParams, this.privateParams); - } catch (_) { + } catch { validParams = false; } if (!validParams) { diff --git a/src/util.js b/src/util.js index 3c6bf707..c9e676b1 100644 --- a/src/util.js +++ b/src/util.js @@ -30,7 +30,7 @@ import defaultConfig from './config'; const debugMode = (() => { try { return process.env.NODE_ENV === 'development'; // eslint-disable-line no-process-env - } catch (e) {} + } catch {} return false; })(); @@ -606,7 +606,7 @@ const util = { try { error.message += ': ' + cause.message; error.cause = cause; - } catch (e) {} + } catch {} return error; } return new Error(error + ': ' + cause.message, { cause }); diff --git a/test/benchmarks/memory_usage.js b/test/benchmarks/memory_usage.js index 50673b67..0dc7da94 100644 --- a/test/benchmarks/memory_usage.js +++ b/test/benchmarks/memory_usage.js @@ -1,4 +1,7 @@ +/* global require */ +/* eslint-disable @typescript-eslint/no-require-imports */ /* eslint-disable no-console */ + import assert from 'assert'; import path from 'path'; import { writeFileSync, unlinkSync } from 'fs'; diff --git a/test/general/key.js b/test/general/key.js index be320aaa..95aa0825 100644 --- a/test/general/key.js +++ b/test/general/key.js @@ -216,180 +216,180 @@ PepQmgsu -----END PGP PUBLIC KEY BLOCK-----`; const pub_revoked_subkeys = - ['-----BEGIN PGP PUBLIC KEY BLOCK-----', - 'Version: GnuPG v2.0.19 (GNU/Linux)', - '', - 'mQENBFKpincBCADhZjIihK15f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BzdWJrZXkgcmV2b2tlAAoJEDvitUh9FgWzsUoH/1MrYYo7aQErScnhbIVQ5qpB', - 'qnqBTiyVGa3cqSPKUkT552dRs6TwsjFKnOs68MIZQ6qfliZE/ApKPQhxaHgmfWKI', - 'Q09Qv04SKHqo9njX6E3q257DnvmQiv6c9PRA3G/p2doBrj3joaOVm/ZioiCZdf2W', - 'l6akAf7j5DbcVRh8BQigM4EUhsVjBvGPYxqVNIM4aWHMTG62CaREa9g1PWOobASU', - 'jX47B7/FFP4zCLkeb+znDMwc8jKWeUBp5sUGhWo74wFiD5Dp2Zz50qRi1u05nJXg', - 'bIib7pwmH2CeDwmPRi/HRUrKBcqFzSYG5QVggQ5KMIU9M7zmvd8mDYE8MQbTLbaJ', - 'ASUEGAECAA8FAlKpincCGwwFCQlmAYAACgkQO+K1SH0WBbPbnQgAxcYAS3YplyBI', - 'ddNJQNvyrWnnuGXoGGKgkE8+LUR3rX3NK/c4pF7EFgrNxKIPrWZoIu7m1XNqoK3g', - 'PwRXJfPPQWalVrhhOajtYipXumQVAe+q8DyxAZ5YJGrUvR9b96GRel9G+HsRlR1M', - 'NV62ZXFdXVgg9FZJHDR8fa1Zy93xC0JSKu4ZoCrH5ybw+DPCngogDl4KwgdV5y4e', - 'EAZpGDSq7PrdsgZTiSuepwVw116GWJm1zecmh6FdpZL/ZrE6EfYcCGJqJiVfDiCR', - 'jgvGbcTzxnvrRmDevmJUdXBSAE11OYQuDGlhgFCU0o9cdX+k+QqP5wNycXhoJ+yk', - 'pMiJM+NJAQ==', - '=ok+o', - '-----END PGP PUBLIC KEY BLOCK-----'].join('\n'); + ['-----BEGIN PGP PUBLIC KEY BLOCK-----', + 'Version: GnuPG v2.0.19 (GNU/Linux)', + '', + 'mQENBFKpincBCADhZjIihK15f3l+j87JgeLp9eUTSbn+g3gOFSR73TOMyBHMPt8O', + 'KwuA+TN2sM86AooOR/2B2MjHBUZqrgeJe+sk5411yXezyYdQGZ8vlq/FeLeNF70D', + 'JrvIC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/ApKPQhxaHgmfWKI', + 'Q09Qv04SKHqo9njX6E3q257DnvmQiv6c9PRA3G/p2doBrj3joaOVm/ZioiCZdf2W', + 'l6akAf7j5DbcVRh8BQigM4EUhsVjBvGPYxqVNIM4aWHMTG62CaREa9g1PWOobASU', + 'jX47B7/FFP4zCLkeb+znDMwc8jKWeUBp5sUGhWo74wFiD5Dp2Zz50qRi1u05nJXg', + 'bIib7pwmH2CeDwmPRi/HRUrKBcqFzSYG5QVggQ5KMIU9M7zmvd8mDYE8MQbTLbaJ', + 'ASUEGAECAA8FAlKpincCGwwFCQlmAYAACgkQO+K1SH0WBbPbnQgAxcYAS3YplyBI', + 'ddNJQNvyrWnnuGXoGGKgkE8+LUR3rX3NK/c4pF7EFgrNxKIPrWZoIu7m1XNqoK3g', + 'PwRXJfPPQWalVrhhOajtYipXumQVAe+q8DyxAZ5YJGrUvR9b96GRel9G+HsRlR1M', + 'NV62ZXFdXVgg9FZJHDR8fa1Zy93xC0JSKu4ZoCrH5ybw+DPCngogDl4KwgdV5y4e', + 'EAZpGDSq7PrdsgZTiSuepwVw116GWJm1zecmh6FdpZL/ZrE6EfYcCGJqJiVfDiCR', + 'jgvGbcTzxnvrRmDevmJUdXBSAE11OYQuDGlhgFCU0o9cdX+k+QqP5wNycXhoJ+yk', + 'pMiJM+NJAQ==', + '=ok+o', + '-----END PGP PUBLIC KEY BLOCK-----'].join('\n'); const pub_revoked_with_cert = - ['-----BEGIN PGP PUBLIC KEY BLOCK-----', - 'Comment: GPGTools - https://gpgtools.org', - '', - 'mQENBFqm7EoBCAC9MNVwQqdpz9bQK9fpKGLSPk20ckRvvTwq7oDUM1IMZGb4bd/A', - '3KDi9SoBU4oEFRbCAk3rxj8iGL9pxvsX3szyCEXuWfzilAQ/1amRe2woMst+YkTt', - 'x9rzkRiQta4T1fNlqQsJyIIpHrKAFGPp0UjBTr6Vs+Ti6JkF5su4ea+yEiuBHtY4', - 'NjFb1xuV7OyAsZToh0B5fah4/WZ5Joyt9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z5gwYvkgu6bm7GroERjEeYzQDLsg2L07kBDQRa', - 'puxKAQgApxDXRk9YUQ2Ba9QVe8WW/NSmyYQEvtSuvG86nZn5aMiZkEuDpVcmePOS', - '1u6Pz0RB9k1WzAi6Az2l/fS7xSbzjDPV+VXV704t9r0M3Zr5RMzIRjbGoxaZp7Tv', - 'Da3QGN4VIZN6o4oAJM7G2FeZMstnCDxrT3wyKXaEdOn5Uc6hxl2Bhx2gTCpsTFn8', - 'AaBnSY6+kge6rCkeufndXQUhTVy8dYsaSqGwpQHVtk1X4nDoZlCC929F9d3I2/WV', - 'OGlfHqbpbO+8tprvQS0JSzsa9w7xaGJcYUA2tOWV8ZZgC8/1MHMsj5HhHKmmWPsS', - 's6k6RLg3nP+CV9zkKn4sI+l/erOEaQARAQABiQE8BBgBCgAmFiEELkFb46/zdo2m', - 'Hrkg3hDj8tVFcW8FAlqm7EoCGwwFCQeGH4AACgkQ3hDj8tVFcW/lmwgAs3o/b24U', - 't2jioTzjZNFMrqjc99PpURJ9BhKPqa9RF7HrpM4x2mJEFw0fUZGQpQmL5NP0ZazE', - 'N47YHwZH1O5i4t5HtFmjtmMkJUFPlwy0MrClW+OVu6Wl7rtYuXIBqFouUx1YBZtQ', - 'isAmwBeB6DS8Oc39raZpoHh9lGPN1Kmp6iLX3xq+6IqUEV567vSAAR6N2m18GH79', - '365Dq88eZKS/NtlzFnEzoThYlIVt/dknuQsUSdZHtuBbNXaJ816byVZQQWdqnXd5', - 'BIDZSFjrJY/gm2kgQX2Pn9hGqDdGhxiALjxhA0+OJQNw4v11y0zVGdofh0IHjkcZ', - 'onCOcv4DKguN2w==', - '=OqO3', - '-----END PGP PUBLIC KEY BLOCK-----'].join('\n'); + ['-----BEGIN PGP PUBLIC KEY BLOCK-----', + 'Comment: GPGTools - https://gpgtools.org', + '', + 'mQENBFqm7EoBCAC9MNVwQqdpz9bQK9fpKGLSPk20ckRvvTwq7oDUM1IMZGb4bd/A', + '3KDi9SoBU4oEFRbCAk3r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const pub_sig_test = - ['-----BEGIN PGP PUBLIC KEY BLOCK-----', - 'Version: GnuPG v2.0.19 (GNU/Linux)', - '', - 'mQENBFKgqXUBCADC4c6sSBnBU+15Y32/a8IXqO2WxKxSHj7I5hv1OdSTmSZes7nZ', - '5V96qsk0k5/ka3C2In+GfTKfuAJ0oVkTZVi5tHP9D+PcZngrIFX56OZ2P5PtTU7U', - 'jh0C78JwCVnv6Eg57JnIMwdbL3ZLqmogLhw5q15Hie5btCIQnuuKfrwxnsox4i3q', - 'dYCHYB1HBGzpvflS07r3Y3IRFJaP8hUhx7PsvpD1s+9DU8AuMNZTXAqRI/bms5hC', - 'BpVejXLj/vlNeQil99MoI7s14L+dHogYuUOUbsXim5EyIFfF/1v+o5l0wmueWrE8', - 'mYQfj5ZvURlGVFah9ECaW9/ResCyJ1Yh975xABEBAAG0I1NpZ25hdHVyZSBUZXN0', - 'IDxzaWduYXR1cmVAdGVzdC5jb20+iQE8BBMBAgAmAhsDBwsJCAcDAgEGFQgCCQoL', - 'BBYCAwECHgECF4AFAlKgq80CGQEACgkQwHbmNNMrSY3KKQf/UGnuc6LbVyhkFQKo', - 'USTVDFg/42CVmIGOG+aZBo0VZuzNYARwDKyoZ5okKqZi5VSfdDaBXuW4VIYepvux', - 'AV8eJV6GIsLRv/wJcKPABIXDIK1tdNetiYbd+2/Fb2/YqAX5wOKIxd3Ggzyx5X4F', - 'WhA6fIBIXyShUWoadkX7S87z5hryhII9281rW2mOsLC5fy/SUQUWM1YmsZ1owvY9', - 'q6W8xRnHDmY+Ko91xex7fikDLBofsWbTUc0/O/1o9miIZfp2nXLKQus2H1WdZVOe', - 'H9zFiy54x7+zTov94SJE3xXppoQnIpeOTlFjTP2mjxm0VW1Dn9lGE3IFgWolpNPy', - 'Rv6dnLQdU2Vjb25kIFVzZXIgPHNlY29uZEB1c2VyLmNvbT6IowQwAQIADQUCUrF1', - 'hwYdIEh1cnoACgkQSmNhOk1uQJRVeQP9GQoLvan5FMYcPPY4a9dN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QHQcPba5OlfTQJwhTxnfaVd8jaxxJmCAC3PljfH9+/', - 'MZrI2ApzC/xTP64t1ERJ7KP50eu53D+w2IpBOLJwnxMIxjtePRSdbF/0EEEL/0jF', - 'GPSGNEw95/QZAyvbhkCTHuo2Sz3f0M2hCCzReo+t+et13h/7nQhEeNEJtOFFu/t+', - 'nX9BrqNLCjH/6TCpQOkiZC3JQGzJxLU15P0LT+/20Rd8ysym0kPg2SrJCnyOrWwZ', - 'wj+1hEHR9pfNtPIZx2LodtRF//Qo9KMSv9G6Tw3a60x7+18siHxTO9wzOxJxRnqN', - 'LgguiQYq//N6LxF1MeQSxxmNr6kNalafp+pwRwNV4G2L7QWPYn3Axe5oEbjKfnoF', - 'pwhalEs4PCnNiQGFBBgBAgAPBQJSoKrSAhsCBQkAAVGAAGoJEMB25jTTK0mNXyAE', - 'GREIAAYFAlKgqtIACgkQqxSB4x5Bj2igHQD+JYra3ESBrVwurLq4n8mm4bq5Wujm', - 'Da5k6Vf7F7ytbDAA/jb47AhgcDXQRcMw0ElTap5AP/JgtuglW/fO4cJxJfa8Yf0H', - '/i95k6w/MOn5CIwgpZyHc/F4bAVyaZmZ8gAT4lhn03ZDehFNrGJ0IhQH/QfqqNSp', - 'NqG8h7GQIH6ovJlLIcolszIL3khI7LhMsIS6Yi8xpPPB9QcqNmjYkuYAtPE2KyL+', - '2yBt+f4AJ/VFnBygcUf+AC6YxBS3cYclGKUAE9j6StRGj3kPNJPF7M5dZi+1+1Tu', - 'yJ5ucX3iq+3GKLq98Lv7SPUxIqkxuZbkZIoX99Wqz8of9BUV2wTDvVXB7TEPC5Ho', - '1y9Mb82aDrqPCq3DXvw5nz3EwxYqIXoKvLW5zsScBg9N3gmMeukXr2FCREKP5oht', - 'yeSTTh8ZnzRiwuUH1t90E7w=', - '=e8xo', - '-----END PGP PUBLIC KEY BLOCK-----'].join('\n'); + ['-----BEGIN PGP PUBLIC KEY BLOCK-----', + 'Version: GnuPG v2.0.19 (GNU/Linux)', + '',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53D+w2IpBOLJwnxMIxjtePRSdbF/0EEEL/0jF', + 'GPSGNEw95/QZAyvbhkCTHuo2Sz3f0M2hCCzReo+t+et13h/7nQhEeNEJtOFFu/t+', + 'nX9BrqNLCjH/6TCpQOkiZC3JQGzJxLU15P0LT+/20Rd8ysym0kPg2SrJCnyOrWwZ', + 'wj+1hEHR9pfNtPIZx2LodtRF//Qo9KMSv9G6Tw3a60x7+18siHxTO9wzOxJxRnqN', + 'LgguiQYq//N6LxF1MeQSxxmNr6kNalafp+pwRwNV4G2L7QWPYn3Axe5oEbjKfnoF', + 'pwhalEs4PCnNiQGFBBgBAgAPBQJSoKrSAhsCBQkAAVGAAGoJEMB25jTTK0mNXyAE', + 'GREIAAYFAlKgqtIACgkQqxSB4x5Bj2igHQD+JYra3ESBrVwurLq4n8mm4bq5Wujm', + 'Da5k6Vf7F7ytbDAA/jb47AhgcDXQRcMw0ElTap5AP/JgtuglW/fO4cJxJfa8Yf0H', + '/i95k6w/MOn5CIwgpZyHc/F4bAVyaZmZ8gAT4lhn03ZDehFNrGJ0IhQH/QfqqNSp', + 'NqG8h7GQIH6ovJlLIcolszIL3khI7LhMsIS6Yi8xpPPB9QcqNmjYkuYAtPE2KyL+', + '2yBt+f4AJ/VFnBygcUf+AC6YxBS3cYclGKUAE9j6StRGj3kPNJPF7M5dZi+1+1Tu', + 'yJ5ucX3iq+3GKLq98Lv7SPUxIqkxuZbkZIoX99Wqz8of9BUV2wTDvVXB7TEPC5Ho', + '1y9Mb82aDrqPCq3DXvw5nz3EwxYqIXoKvLW5zsScBg9N3gmMeukXr2FCREKP5oht', + 'yeSTTh8ZnzRiwuUH1t90E7w=', + '=e8xo', + '-----END PGP PUBLIC KEY BLOCK-----'].join('\n'); const priv_key_rsa = ['-----BEGIN PGP PRIVATE KEY BLOCK-----', @@ -842,7 +842,7 @@ const wrong_key = '-----END PGP PUBLIC KEY BLOCK-----'].join('\n'); const expiredKey = -`-----BEGIN PGP PRIVATE KEY BLOCK----- + `-----BEGIN PGP PRIVATE KEY BLOCK----- xcA4BAAAAAEBAgCgONc0J8rfO6cJw5YTP38x1ze2tAYIO7EcmRCNYwMkXngb 0Qdzg34Q5RW0rNiR56VB6KElPUhePRPVklLFiIvHABEBAAEAAf9qabYMzsz/ @@ -857,7 +857,7 @@ DECl1Qu4QyeXin29uEXWiekMpNlZVsEuc8icCw6ABhIZ -----END PGP PRIVATE KEY BLOCK-----`; const multipleBindingSignatures = -`-----BEGIN PGP PUBLIC KEY BLOCK----- + `-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2 mQINBFQNRrkBEAChLrYuYjiy1jq7smQtYPln6XGJjMiJ1PbZwGK2CKQaIW6u4EUJ diff --git a/test/general/packet.js b/test/general/packet.js index a4087dc0..07f5e337 100644 --- a/test/general/packet.js +++ b/test/general/packet.js @@ -35,7 +35,7 @@ export default () => describe('Packet', function() { const allAllowedPackets = util.constructAllowedPackets([...Object.values(openpgp).filter(packetClass => !!packetClass.tag)]); const armored_key = - '-----BEGIN PGP PRIVATE KEY BLOCK-----\n' + + '-----BEGIN PGP PRIVATE KEY BLOCK-----\n' + 'Version: GnuPG v2.0.19 (GNU/Linux)\n' + '\n' + 'lQH+BFF79J8BBADDhRUOMUSGdYM1Kq9J/vVS3qLfaZHweycAKm9SnpLGLJE+Qbki\n' + @@ -434,7 +434,7 @@ export default () => describe('Packet', function() { it('Sym. encrypted session key with a compressed packet', async function() { const msg = - '-----BEGIN PGP MESSAGE-----\n' + + '-----BEGIN PGP MESSAGE-----\n' + 'Version: GnuPG v2.0.19 (GNU/Linux)\n' + '\n' + 'jA0ECQMCpo7I8WqsebTJ0koBmm6/oqdHXJU9aPe+Po+nk/k4/PZrLmlXwz2lhqBg\n' + @@ -520,7 +520,7 @@ export default () => describe('Packet', function() { it('Secret key packet (reading, unencrypted)', async function() { const armored_key = - '-----BEGIN PGP PRIVATE KEY BLOCK-----\n' + + '-----BEGIN PGP PRIVATE KEY BLOCK-----\n' + 'Version: GnuPG v2.0.19 (GNU/Linux)\n' + '\n' + 'lQHYBFF33iMBBAC9YfOYahJlWrVj2J1TjQiZLunWljI4G9e6ARTyD99nfOkV3swh\n' + @@ -563,7 +563,7 @@ export default () => describe('Packet', function() { it('Public key encrypted packet (reading, GPG)', async function() { const armored_key = - '-----BEGIN PGP PRIVATE KEY BLOCK-----\n' + + '-----BEGIN PGP PRIVATE KEY BLOCK-----\n' + 'Version: GnuPG v2.0.19 (GNU/Linux)\n' + '\n' + 'lQHYBFF6gtkBBADKUOWZK6/V75MNwBS+hLYicoS0Sojbo3qWXXpS7eM+uhiDm4bP\n' + @@ -598,7 +598,7 @@ export default () => describe('Packet', function() { '-----END PGP PRIVATE KEY BLOCK-----'; const armored_msg = - '-----BEGIN PGP MESSAGE-----\n' + + '-----BEGIN PGP MESSAGE-----\n' + 'Version: GnuPG v2.0.19 (GNU/Linux)\n' + '\n' + 'hIwDFYET+7bfx/ABA/95Uc9942Tg8oqpO0vEu2eSKwPALM3a0DrVdAiFOIK/dJmZ\n' + @@ -934,7 +934,7 @@ export default () => describe('Packet', function() { it('Secret key encryption/decryption test', async function() { const armored_msg = - '-----BEGIN PGP MESSAGE-----\n' + + '-----BEGIN PGP MESSAGE-----\n' + 'Version: GnuPG v2.0.19 (GNU/Linux)\n' + '\n' + 'hIwD95D9aHS5fxEBA/98CwH54XZmwobOmHUcvWcDDQysBEC4uf7wASiGcRbejDaO\n' + @@ -976,7 +976,7 @@ export default () => describe('Packet', function() { it('Reading a signed, encrypted message.', async function() { const armored_msg = - '-----BEGIN PGP MESSAGE-----\n' + + '-----BEGIN PGP MESSAGE-----\n' + 'Version: GnuPG v2.0.19 (GNU/Linux)\n' + '\n' + 'hIwD95D9aHS5fxEBA/4/X4myvH+jB1HYNeZvdK+WsBNDMfLsBGOf205Rxr3vSob/\n' + @@ -1016,8 +1016,7 @@ export default () => describe('Packet', function() { }); it('Reading signersUserID from armored signature', async function() { - const armoredSignature = -`-----BEGIN PGP SIGNATURE----- + const armoredSignature = `-----BEGIN PGP SIGNATURE----- iQFKBAEBCgA0FiEEdOyNPagqedqiXfEMa6Ve2Dq64bsFAlszXwQWHHRlc3Qtd2tk QG1ldGFjb2RlLmJpegAKCRBrpV7YOrrhuw1PB/9KhFRR/M3OR6NmIent6ri1ekWn @@ -1035,8 +1034,7 @@ kePFjAnu9cpynKXu3usf8+FuBw2zLsg1Id1n7ttxoAte416KjBN9lFBt8mcu }); it('Reading notations from armored key', async function() { - const pubkey = -`-----BEGIN PGP PUBLIC KEY BLOCK----- + const pubkey = `-----BEGIN PGP PUBLIC KEY BLOCK----- mQENBFzQOToBCADd0Pwh8edZ6gR3x49L1PaBPtiAQUr1QDUDWeNes8co5MTFl5hG lHzptt+VD0JGucuIkvi34f5z2ZbInAV/xYDX3kSYefy6LB8XJD527I/o9bqY1P7T diff --git a/test/security/unsigned_subpackets.js b/test/security/unsigned_subpackets.js index 82721103..c7786b7e 100644 --- a/test/security/unsigned_subpackets.js +++ b/test/security/unsigned_subpackets.js @@ -61,7 +61,7 @@ async function makeKeyValid() { encryptionKeys: k }); return false; - } catch (e) { + } catch { return true; } } diff --git a/test/typescript/definitions.ts b/test/typescript/definitions.ts index 2d74b77c..2e33bec3 100644 --- a/test/typescript/definitions.ts +++ b/test/typescript/definitions.ts @@ -16,7 +16,7 @@ import { encrypt, decrypt, sign, verify, config, enums, generateSessionKey, encryptSessionKey, decryptSessionKeys, LiteralDataPacket, PacketList, CompressedDataPacket, PublicKeyPacket, PublicSubkeyPacket, SecretKeyPacket, SecretSubkeyPacket, CleartextMessage, - WebStream, NodeWebStream, + WebStream, NodeWebStream } from 'openpgp'; (async () => { @@ -47,7 +47,7 @@ import { const parsedBinaryPrivateKey: PrivateKey = await readPrivateKey({ binaryKey: privateKeyBinary }); expect(parsedBinaryPrivateKey.isPrivate()).to.be.true; // a generic Key can be directly used as PublicKey, since both classes have the same properties - // eslint-disable-next-line no-unused-vars + // eslint-disable-next-line @typescript-eslint/no-unused-vars const unusedPublicKey: PublicKey = parsedKey; // Check PrivateKey type inference @@ -55,23 +55,23 @@ import { expect(parsedKey.isDecrypted()).to.be.true; } else { // @ts-expect-error isDecrypted is not defined for public keys - try { parsedKey.isDecrypted(); } catch (e) {} + try { parsedKey.isDecrypted(); } catch {} } (await privateKey.update(privateKey)).isDecrypted(); (await privateKey.toPublic().update(privateKey)).isDecrypted(); // @ts-expect-error isDecrypted is not defined for public keys - try { (await privateKey.toPublic().update(privateKey.toPublic())).isDecrypted(); } catch (e) {} + try { (await privateKey.toPublic().update(privateKey.toPublic())).isDecrypted(); } catch {} // Revoke keys await revokeKey({ key: privateKey }); // @ts-expect-error for missing revocation certificate - try { await revokeKey({ key: publicKey }); } catch (e) {} + try { await revokeKey({ key: publicKey }); } catch {} const { privateKey: revokedPrivateKey, publicKey: revokedPublicKey } = await revokeKey({ key: privateKey, revocationCertificate, format: 'object' }); expect(revokedPrivateKey).to.be.instanceOf(PrivateKey); expect(revokedPublicKey).to.be.instanceOf(PublicKey); const revokedKeyPair = await revokeKey({ key: publicKey, revocationCertificate, format: 'object' }); // @ts-expect-error for null private key - try { revokedKeyPair.privateKey.armor(); } catch (e) {} + try { revokedKeyPair.privateKey.armor(); } catch {} expect(revokedKeyPair.privateKey).to.be.null; expect(revokedKeyPair.publicKey).to.be.instanceOf(PublicKey); @@ -123,16 +123,16 @@ import { const verifiedCleartextData: string = verificationResult.data; expect(verifiedCleartextData).to.equal(cleartextMessage.getText()); // @ts-expect-error Binary output not available for cleartext messages - try { await verify({ message: cleartextMessage, verificationKeys: publicKey, format: 'binary' }) } catch (e) {} + try { await verify({ message: cleartextMessage, verificationKeys: publicKey, format: 'binary' }) } catch {} const clearSignedArmor = await sign({ signingKeys: privateKeys, message: cleartextMessage }); expect(clearSignedArmor).to.include('-----BEGIN PGP SIGNED MESSAGE-----'); const clearSignedObject: CleartextMessage = await sign({ signingKeys: privateKeys, message: cleartextMessage, format: 'object' }); expect(clearSignedObject).to.be.instanceOf(CleartextMessage); // @ts-expect-error PublicKey not assignable to PrivateKey - try { await sign({ signingKeys: publicKeys, message: cleartextMessage }); } catch (e) {} + try { await sign({ signingKeys: publicKeys, message: cleartextMessage }); } catch {} // @ts-expect-error Key not assignable to PrivateKey - try { await sign({ signingKeys: parsedKey, message: cleartextMessage }); } catch (e) {} + try { await sign({ signingKeys: parsedKey, message: cleartextMessage }); } catch {} // Sign text message (armored) const textSignedArmor: string = await sign({ signingKeys: privateKeys, message: textMessage }); @@ -147,12 +147,15 @@ import { expect(textSignedObject).to.be.instanceOf(Message); // Sign text message (armored) - const textSignedWithNotations: string = await sign({ signingKeys: privateKeys, message: textMessage, signatureNotations: [{ - name: 'test@example.org', - value: new TextEncoder().encode('test'), - humanReadable: true, - critical: false - }] }); + const textSignedWithNotations: string = await sign({ + signingKeys: privateKeys, + message: textMessage, + signatureNotations: [{ + name: 'test@example.org', + value: new TextEncoder().encode('test'), + humanReadable: true, + critical: false + }] }); expect(textSignedWithNotations).to.include('-----BEGIN PGP MESSAGE-----'); // Verify signed text message (armored) @@ -176,7 +179,7 @@ import { // @ts-expect-error for unsafe downcasting packets.map((packet: LiteralDataPacket) => packet.getText()); // @ts-expect-error for non-packet element - try { new PacketList().push(1); } catch (e) {} + try { new PacketList().push(1); } catch {} // Packetlist of specific type const literalPackets = new PacketList(); @@ -210,13 +213,13 @@ import { await createMessage({ binary: new WebReadableStream() }); // @ts-expect-error for passing binary stream as text data await createMessage({ text: new WebReadableStream() }); - + // Streaming - encrypt text message (armored output) try { const nodeTextStream = NodeNativeReadableStream.toWeb(createReadStream('non-existent-file', { encoding: 'utf8' })); const messageFromNodeTextStream = await createMessage({ text: nodeTextStream }); (await encrypt({ message: messageFromNodeTextStream, passwords: 'password', format: 'armored' })) as NodeWebStream; - } catch (err) {} + } catch {} const webTextStream = new WebReadableStream(); const messageFromWebTextStream = await createMessage({ text: webTextStream }); (await encrypt({ message: messageFromWebTextStream, passwords: 'password', format: 'armored' })) as WebStream; @@ -228,7 +231,7 @@ import { const nodeBinaryStream = NodeNativeReadableStream.toWeb(createReadStream('non-existent-file')); const messageFromNodeBinaryStream = await createMessage({ binary: nodeBinaryStream }); (await encrypt({ message: messageFromNodeBinaryStream, passwords: 'password', format: 'binary' })) as NodeWebStream; - } catch (err) {} + } catch {} const webBinaryStream = new WebReadableStream(); const messageFromWebBinaryStream = await createMessage({ binary: webBinaryStream }); (await encrypt({ message: messageFromWebBinaryStream, passwords: 'password', format: 'binary' })) as WebStream; @@ -239,5 +242,6 @@ import { })().catch(e => { console.error('TypeScript definitions tests failed by throwing the following error'); console.error(e); + // eslint-disable-next-line no-process-exit process.exit(1); }); diff --git a/test/unittests.js b/test/unittests.js index 74ef06ad..e6a1c7f8 100644 --- a/test/unittests.js +++ b/test/unittests.js @@ -54,7 +54,7 @@ describe('Unit Tests', function () { openpgp.config[key] = decodeURIComponent(value); try { openpgp.config[key] = window.eval(openpgp.config[key]); // eslint-disable-line no-eval - } catch (e) {} + } catch {} } }); } else { diff --git a/test/worker/worker_example.js b/test/worker/worker_example.js index fbd2cee1..925a6055 100644 --- a/test/worker/worker_example.js +++ b/test/worker/worker_example.js @@ -1,4 +1,4 @@ -/* globals openpgp */ +/* globals openpgp, importScripts */ importScripts('../../dist/openpgp.js'); From 48d1cfd15f3cfe37c2bcf0666060c0ec460b57a6 Mon Sep 17 00:00:00 2001 From: larabr <7375870+larabr@users.noreply.github.com> Date: Wed, 1 Oct 2025 13:17:54 +0200 Subject: [PATCH 2/3] Linter: enable type info integration for rules (`recommended-type-checked`) --- eslint.config.js | 15 ++++++-- openpgp.d.ts | 27 +++++++------- src/cleartext.js | 3 +- src/crypto/aes_kw.js | 4 +-- src/crypto/biginteger.ts | 4 +-- src/crypto/cipher/twofish.js | 8 +++-- src/crypto/cipherMode/cfb.js | 14 +++++--- src/crypto/cipherMode/eax.js | 2 ++ src/crypto/cipherMode/gcm.js | 4 +++ src/crypto/cipherMode/ocb.js | 2 ++ src/crypto/cmac.js | 2 ++ src/crypto/hash/index.js | 1 + src/crypto/hash/md5.ts | 3 -- src/crypto/public_key/dsa.js | 25 +++++++------ src/crypto/public_key/elgamal.js | 21 ++++++----- .../elliptic/brainpool/brainpoolP256r1.ts | 1 - .../elliptic/brainpool/brainpoolP384r1.ts | 1 - .../elliptic/brainpool/brainpoolP512r1.ts | 1 - src/crypto/public_key/elliptic/ecdh.js | 4 +-- src/crypto/public_key/elliptic/ecdsa.js | 9 +++-- .../public_key/elliptic/eddsa_legacy.js | 1 + src/crypto/public_key/elliptic/oid_curves.js | 4 +-- src/crypto/public_key/rsa.js | 35 ++++++++++--------- src/encoding/armor.js | 3 +- src/key/factory.js | 8 ++--- src/key/key.js | 6 ++-- src/key/private_key.js | 2 +- src/message.js | 29 ++++++++------- src/packet/compressed_data.js | 2 +- src/packet/one_pass_signature.js | 3 ++ src/packet/packet.js | 6 ++-- src/packet/packetlist.js | 2 +- src/packet/padding.js | 5 +-- src/packet/public_key.js | 4 ++- .../public_key_encrypted_session_key.js | 1 + src/packet/public_subkey.js | 1 - src/packet/secret_key.js | 2 +- src/packet/signature.js | 1 + .../sym_encrypted_integrity_protected_data.js | 1 - src/util.js | 16 ++++----- test/benchmarks/memory_usage.js | 2 +- test/benchmarks/time.js | 2 +- test/crypto/biginteger.js | 2 +- test/crypto/ecdsa_eddsa.js | 3 ++ test/general/armor.js | 2 +- test/general/brainpool.js | 2 +- test/general/config.js | 2 +- test/general/key.js | 10 +++--- test/general/openpgp.js | 12 +++---- test/general/packet.js | 15 ++++---- test/general/signature.js | 8 ++--- test/general/streaming.js | 6 ++-- test/security/message_signature_bypass.js | 4 +-- test/security/subkey_trust.js | 2 +- test/security/unsigned_subpackets.js | 2 +- test/typescript/definitions.ts | 4 +++ test/unittests.js | 2 +- 57 files changed, 204 insertions(+), 159 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 687ae85b..aff9fa48 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -12,7 +12,7 @@ import pluginUnicorn from 'eslint-plugin-unicorn'; export default defineConfig( eslint.configs.recommended, - tseslint.configs.recommended, + tseslint.configs.recommendedTypeChecked, globalIgnores(['dist/', 'test/lib/', 'docs/', '.jsdocrc.cjs']), { languageOptions: { @@ -89,7 +89,7 @@ export default defineConfig( 'prefer-spread': 'off', // TODO get rid of this 'prefer-template': 'off', 'quote-props': 'off', - 'quotes': ['error', 'single', { 'avoidEscape': true }], + 'quotes': 'off', // superseded by @stylistic/quotes 'spaced-comment': 'off', 'indent': 'off', 'no-unused-vars': 'off', @@ -132,6 +132,17 @@ export default defineConfig( '@typescript-eslint/no-unused-expressions': 'off', 'chai-friendly/no-unused-expressions': ['error', { 'allowShortCircuit': true }], '@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }], + 'no-invalid-this': 'error', + 'require-await': 'off', // superseded by @typescript-eslint/require-await + + '@typescript-eslint/no-unsafe-call': 'off', // function call to fn with `any` type + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + 'prefer-promise-reject-errors': 'off', + '@typescript-eslint/prefer-promise-reject-errors': 'off', '@stylistic/indent': ['error', 2, { 'SwitchCase': 1 }], '@stylistic/quotes': ['error', 'single', { avoidEscape: true }], diff --git a/openpgp.d.ts b/openpgp.d.ts index 6d6af498..34cf51d1 100644 --- a/openpgp.d.ts +++ b/openpgp.d.ts @@ -337,10 +337,9 @@ export class Message> { } /* ############## PACKET #################### */ - -export declare abstract class BasePacket { +export declare abstract class BasePacket { static readonly tag: enums.packet; - public read(bytes: Uint8Array): void; + public read(bytes: Uint8Array): AsyncRead extends true ? Promise : void; public write(): Uint8Array; } @@ -349,7 +348,7 @@ export declare abstract class BasePacket { * - A Secret (Sub)Key Packet can always be used when a Public one is expected. * - A Subkey Packet cannot always be used when a Primary Key Packet is expected (and vice versa). */ -declare abstract class BasePublicKeyPacket extends BasePacket { +declare abstract class BasePublicKeyPacket extends BasePacket { public algorithm: enums.publicKey; public created: Date; public version: number; @@ -397,20 +396,20 @@ export class SecretSubkeyPacket extends BaseSecretKeyPacket { protected isSubkey(): true; } -export class CompressedDataPacket extends BasePacket { +export class CompressedDataPacket extends BasePacket { static readonly tag: enums.packet.compressedData; private compress(): void; private decompress(config?: Config): void; } -export class SymEncryptedIntegrityProtectedDataPacket extends BasePacket { +export class SymEncryptedIntegrityProtectedDataPacket extends BasePacket { static readonly tag: enums.packet.symEncryptedIntegrityProtectedData; } -export class AEADEncryptedDataPacket extends BasePacket { +export class AEADEncryptedDataPacket extends BasePacket { static readonly tag: enums.packet.aeadEncryptedData; - private decrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): void; - private encrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): void; + private decrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): Promise; + private encrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): Promise; private crypt(fn: (block: Uint8Array) => Uint8Array, sessionKey: Uint8Array, data: MaybeStream): MaybeStream; } @@ -426,7 +425,7 @@ export class SymEncryptedSessionKeyPacket extends BasePacket { private encrypt(passphrase: string, config?: Config): Promise; } -export class LiteralDataPacket extends BasePacket { +export class LiteralDataPacket extends BasePacket { static readonly tag: enums.packet.literalData; private getText(clone?: boolean): MaybeStream; private getBytes(clone?: boolean): MaybeStream; @@ -439,8 +438,8 @@ export class LiteralDataPacket extends BasePacket { export class SymmetricallyEncryptedDataPacket extends BasePacket { static readonly tag: enums.packet.symmetricallyEncryptedData; - private decrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): void; - private encrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): void; + private decrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): Promise; + private encrypt(sessionKeyAlgorithm: enums.symmetric, sessionKey: Uint8Array, config?: Config): Promise; } export class MarkerPacket extends BasePacket { @@ -547,8 +546,8 @@ export type AnyKeyPacket = BasePublicKeyPacket; type AllowedPackets = Map; // mapping to Packet classes (i.e. typeof LiteralDataPacket etc.) export class PacketList extends Array { - static fromBinary(bytes: MaybeStream, allowedPackets: AllowedPackets, config?: Config): PacketList; // the packet types depend on`allowedPackets` - public read(bytes: MaybeStream, allowedPackets: AllowedPackets, config?: Config): void; + static fromBinary(bytes: MaybeStream, allowedPackets: AllowedPackets, config?: Config): Promise>; // the packet types depend on`allowedPackets` + public read(bytes: MaybeStream, allowedPackets: AllowedPackets, config?: Config): Promise; public write(): Uint8Array; public filterByTag(...args: enums.packet[]): PacketList; public indexOfTag(...tags: enums.packet[]): number[]; diff --git a/src/cleartext.js b/src/cleartext.js index 841d3f67..8439d3c1 100644 --- a/src/cleartext.js +++ b/src/cleartext.js @@ -209,8 +209,9 @@ function verifyHeaders(headers, packetlist) { * @param {Object} options * @param {String} options.text * @static - * @async + * @async not necessary, but needed to align with createMessage */ +// eslint-disable-next-line @typescript-eslint/require-await export async function createCleartextMessage({ text, ...rest }) { if (!text) { throw new Error('createCleartextMessage: must pass options object containing `text`'); diff --git a/src/crypto/aes_kw.js b/src/crypto/aes_kw.js index 0ef54f78..87a1c9fd 100644 --- a/src/crypto/aes_kw.js +++ b/src/crypto/aes_kw.js @@ -31,7 +31,7 @@ const webCrypto = util.getWebCrypto(); * @param {enums.symmetric.aes128|enums.symmetric.aes256|enums.symmetric.aes192} algo - AES algo * @param {Uint8Array} key - wrapping key * @param {Uint8Array} dataToWrap - * @returns {Uint8Array} wrapped key + * @returns {Promise} wrapped key */ export async function wrap(algo, key, dataToWrap) { const { keySize } = getCipherParams(algo); @@ -63,7 +63,7 @@ export async function wrap(algo, key, dataToWrap) { * @param {enums.symmetric.aes128|enums.symmetric.aes256|enums.symmetric.aes192} algo - AES algo * @param {Uint8Array} key - wrapping key * @param {Uint8Array} wrappedData - * @returns {Uint8Array} unwrapped data + * @returns {Promise} unwrapped data */ export async function unwrap(algo, key, wrappedData) { const { keySize } = getCipherParams(algo); diff --git a/src/crypto/biginteger.ts b/src/crypto/biginteger.ts index ba8c82c4..96e52343 100644 --- a/src/crypto/biginteger.ts +++ b/src/crypto/biginteger.ts @@ -162,7 +162,7 @@ export function bitLength(x: bigint) { const target = x < _0n ? BigInt(-1) : _0n; let bitlen = 1; let tmp = x; - // eslint-disable-next-line no-cond-assign + while ((tmp >>= _1n) !== target) { bitlen++; } @@ -177,7 +177,7 @@ export function byteLength(x: bigint) { const _8n = BigInt(8); let len = 1; let tmp = x; - // eslint-disable-next-line no-cond-assign + while ((tmp >>= _8n) !== target) { len++; } diff --git a/src/crypto/cipher/twofish.js b/src/crypto/cipher/twofish.js index 09ded60c..a502cc7a 100644 --- a/src/crypto/cipher/twofish.js +++ b/src/crypto/cipher/twofish.js @@ -1,6 +1,3 @@ -/* eslint-disable no-mixed-operators, no-fallthrough */ - - /* Modified by Recurity Labs GmbH * * Cipher.js @@ -98,6 +95,7 @@ function createTwofish() { ]; const ror4 = [0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15]; const ashx = [0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 5, 14, 7]; + /** @type {number[][]} */ const q = [ [], [] @@ -158,11 +156,13 @@ function createTwofish() { b = q[0][b] ^ getB(key[3], 1); c = q[0][c] ^ getB(key[3], 2); d = q[1][d] ^ getB(key[3], 3); + // eslint-disable-next-line no-fallthrough case 3: a = q[1][a] ^ getB(key[2], 0); b = q[1][b] ^ getB(key[2], 1); c = q[0][c] ^ getB(key[2], 2); d = q[0][d] ^ getB(key[2], 3); + // eslint-disable-next-line no-fallthrough case 2: a = q[0][q[0][a] ^ getB(key[1], 0)] ^ getB(key[0], 0); b = q[0][q[1][b] ^ getB(key[1], 1)] ^ getB(key[0], 1); @@ -222,11 +222,13 @@ function createTwofish() { b = q[0][b] ^ getB(sKey[3], 1); c = q[0][c] ^ getB(sKey[3], 2); d = q[1][d] ^ getB(sKey[3], 3); + // eslint-disable-next-line no-fallthrough case 3: a = q[1][a] ^ getB(sKey[2], 0); b = q[1][b] ^ getB(sKey[2], 1); c = q[0][c] ^ getB(sKey[2], 2); d = q[0][d] ^ getB(sKey[2], 3); + // eslint-disable-next-line no-fallthrough case 2: tfsM[0][i] = m[0][q[0][q[0][a] ^ getB(sKey[1], 0)] ^ getB(sKey[0], 0)]; tfsM[1][i] = m[1][q[0][q[1][b] ^ getB(sKey[1], 1)] ^ getB(sKey[0], 1)]; diff --git a/src/crypto/cipherMode/cfb.js b/src/crypto/cipherMode/cfb.js index 4be7f384..79bcdb2c 100644 --- a/src/crypto/cipherMode/cfb.js +++ b/src/crypto/cipherMode/cfb.js @@ -49,11 +49,10 @@ const nodeAlgos = { * See {@link https://tools.ietf.org/html/rfc4880#section-9.2|RFC 4880 9.2} for algorithms. * @param {module:enums.symmetric} algo - Symmetric encryption algorithm * @returns {Promise} Random bytes with length equal to the block size of the cipher, plus the last two bytes repeated. - * @async */ -export async function getPrefixRandom(algo) { +export function getPrefixRandom(algo) { const { blockSize } = getCipherParams(algo); - const prefixrandom = await getRandomBytes(blockSize); + const prefixrandom = getRandomBytes(blockSize); const repeat = new Uint8Array([prefixrandom[prefixrandom.length - 2], prefixrandom[prefixrandom.length - 1]]); return util.concat([prefixrandom, repeat]); } @@ -156,7 +155,10 @@ class WebCryptoEncryptor { this.zeroBlock = new Uint8Array(this.blockSize); } - static async isSupported(algo) { + /** + * @returns {Promise} + */ + static isSupported(algo) { const { keySize } = getCipherParams(algo); return webCrypto.importKey('raw', new Uint8Array(keySize), 'aes-cbc', false, ['encrypt']) .then(() => true, () => false); @@ -283,6 +285,7 @@ class NobleStreamProcessor { return dst; } + // eslint-disable-next-line @typescript-eslint/require-await async processChunk(value) { const missing = this.nextBlock.length - this.i; const added = value.subarray(0, missing); @@ -321,6 +324,7 @@ class NobleStreamProcessor { return processedBlock; } + // eslint-disable-next-line @typescript-eslint/require-await async finish() { let result; if (this.i === 0) { // nothing more to encrypt @@ -354,7 +358,7 @@ async function aesEncrypt(algo, key, pt, iv) { return nobleAesCfb(key, iv).encrypt(pt); } -async function aesDecrypt(algo, key, ct, iv) { +function aesDecrypt(algo, key, ct, iv) { if (util.isStream(ct)) { const cfb = new NobleStreamProcessor(false, algo, key, iv); return streamTransform(ct, value => cfb.processChunk(value), () => cfb.finish()); diff --git a/src/crypto/cipherMode/eax.js b/src/crypto/cipherMode/eax.js index 1ea2284d..bcdb266b 100644 --- a/src/crypto/cipherMode/eax.js +++ b/src/crypto/cipherMode/eax.js @@ -48,6 +48,7 @@ async function OMAC(key) { async function CTR(key) { if (util.getNodeCrypto()) { // Node crypto library + // eslint-disable-next-line @typescript-eslint/require-await return async function(pt, iv) { const en = new nodeCrypto.createCipheriv('aes-' + (key.length * 8) + '-ctr', key, iv); const ct = Buffer.concat([en.update(pt), en.final()]); @@ -72,6 +73,7 @@ async function CTR(key) { } } + // eslint-disable-next-line @typescript-eslint/require-await return async function(pt, iv) { return nobleAesCtr(key, iv).encrypt(pt); }; diff --git a/src/crypto/cipherMode/gcm.js b/src/crypto/cipherMode/gcm.js index b1d2cfe4..226d3eb9 100644 --- a/src/crypto/cipherMode/gcm.js +++ b/src/crypto/cipherMode/gcm.js @@ -48,6 +48,7 @@ async function GCM(cipher, key) { if (util.getNodeCrypto()) { // Node crypto library return { + // eslint-disable-next-line @typescript-eslint/require-await encrypt: async function(pt, iv, adata = new Uint8Array()) { const en = new nodeCrypto.createCipheriv('aes-' + (key.length * 8) + '-gcm', key, iv); en.setAAD(adata); @@ -55,6 +56,7 @@ async function GCM(cipher, key) { return new Uint8Array(ct); }, + // eslint-disable-next-line @typescript-eslint/require-await decrypt: async function(ct, iv, adata = new Uint8Array()) { const de = new nodeCrypto.createDecipheriv('aes-' + (key.length * 8) + '-gcm', key, iv); de.setAAD(adata); @@ -105,10 +107,12 @@ async function GCM(cipher, key) { } return { + // eslint-disable-next-line @typescript-eslint/require-await encrypt: async function(pt, iv, adata) { return nobleAesGcm(key, iv, adata).encrypt(pt); }, + // eslint-disable-next-line @typescript-eslint/require-await decrypt: async function(ct, iv, adata) { return nobleAesGcm(key, iv, adata).decrypt(ct); } diff --git a/src/crypto/cipherMode/ocb.js b/src/crypto/cipherMode/ocb.js index 397a4fe6..7b989426 100644 --- a/src/crypto/cipherMode/ocb.js +++ b/src/crypto/cipherMode/ocb.js @@ -61,6 +61,7 @@ const one = new Uint8Array([1]); * @param {enums.symmetric} cipher - The symmetric cipher algorithm to use * @param {Uint8Array} key - The encryption key */ +// eslint-disable-next-line @typescript-eslint/require-await async function OCB(cipher, key) { const { keySize } = getCipherParams(cipher); // sanity checks @@ -240,6 +241,7 @@ async function OCB(cipher, key) { * @param {Uint8Array} adata - Associated data to sign * @returns {Promise} The ciphertext output. */ + // eslint-disable-next-line @typescript-eslint/require-await decrypt: async function(ciphertext, nonce, adata) { if (ciphertext.length < tagLength) throw new Error('Invalid OCB ciphertext'); diff --git a/src/crypto/cmac.js b/src/crypto/cmac.js index 6159cdf7..8dbf6a99 100644 --- a/src/crypto/cmac.js +++ b/src/crypto/cmac.js @@ -73,6 +73,7 @@ export default async function CMAC(key) { async function CBC(key) { if (util.getNodeCrypto()) { // Node crypto library + // eslint-disable-next-line @typescript-eslint/require-await return async function(pt) { const en = new nodeCrypto.createCipheriv('aes-' + (key.length * 8) + '-cbc', key, zeroBlock); const ct = en.update(pt); @@ -97,6 +98,7 @@ async function CBC(key) { } } + // eslint-disable-next-line @typescript-eslint/require-await return async function(pt) { return nobleAesCbc(key, zeroBlock, { disablePadding: true }).encrypt(pt); }; diff --git a/src/crypto/hash/index.js b/src/crypto/hash/index.js index 1c6affee..3ee74ad9 100644 --- a/src/crypto/hash/index.js +++ b/src/crypto/hash/index.js @@ -17,6 +17,7 @@ function nodeHash(type) { if (!nodeCrypto || !nodeCryptoHashes.includes(type)) { return; } + // eslint-disable-next-line @typescript-eslint/require-await return async function (data) { const shasum = nodeCrypto.createHash(type); return streamTransform(data, value => { diff --git a/src/crypto/hash/md5.ts b/src/crypto/hash/md5.ts index 179d686c..80f0261c 100644 --- a/src/crypto/hash/md5.ts +++ b/src/crypto/hash/md5.ts @@ -35,15 +35,12 @@ class MD5 extends HashMD { // Compression function main loop, 64 rounds let { A, B, C, D } = this; for (let i = 0; i < 64; i++) { - // eslint-disable-next-line one-var, one-var-declaration-per-line let F, g, s; if (i < 16) { - // eslint-disable-next-line new-cap F = Chi(B, C, D); g = i; s = [7, 12, 17, 22]; } else if (i < 32) { - // eslint-disable-next-line new-cap F = Chi(D, B, C); g = (5 * i + 1) % 16; s = [5, 9, 14, 20]; diff --git a/src/crypto/public_key/dsa.js b/src/crypto/public_key/dsa.js index c01e3185..516bd285 100644 --- a/src/crypto/public_key/dsa.js +++ b/src/crypto/public_key/dsa.js @@ -44,6 +44,7 @@ const _1n = BigInt(1); * @returns {Promise<{ r: Uint8Array, s: Uint8Array }>} * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function sign(hashAlgo, hashed, g, p, q, x) { const _0n = BigInt(0); p = uint8ArrayToBigInt(p); @@ -102,6 +103,7 @@ export async function sign(hashAlgo, hashed, g, p, q, x) { * @returns {boolean} * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function verify(hashAlgo, r, s, hashed, g, p, q, y) { r = uint8ArrayToBigInt(r); s = uint8ArrayToBigInt(s); @@ -135,19 +137,20 @@ export async function verify(hashAlgo, r, s, hashed, g, p, q, y) { /** * Validate DSA parameters - * @param {Uint8Array} p - DSA prime - * @param {Uint8Array} q - DSA group order - * @param {Uint8Array} g - DSA sub-group generator - * @param {Uint8Array} y - DSA public key - * @param {Uint8Array} x - DSA private key + * @param {Uint8Array} pBytes - DSA prime + * @param {Uint8Array} qBytes - DSA group order + * @param {Uint8Array} gBytes - DSA sub-group generator + * @param {Uint8Array} yBytes - DSA public key + * @param {Uint8Array} xBytes - DSA private key * @returns {Promise} Whether params are valid. * @async */ -export async function validateParams(p, q, g, y, x) { - p = uint8ArrayToBigInt(p); - q = uint8ArrayToBigInt(q); - g = uint8ArrayToBigInt(g); - y = uint8ArrayToBigInt(y); +// eslint-disable-next-line @typescript-eslint/require-await +export async function validateParams(pBytes, qBytes, gBytes, yBytes, xBytes) { + const p = uint8ArrayToBigInt(pBytes); + const q = uint8ArrayToBigInt(qBytes); + const g = uint8ArrayToBigInt(gBytes); + const y = uint8ArrayToBigInt(yBytes); // Check that 1 < g < p if (g <= _1n || g >= p) { return false; @@ -183,7 +186,7 @@ export async function validateParams(p, q, g, y, x) { * * Blinded exponentiation computes g**{rq + x} to compare to y */ - x = uint8ArrayToBigInt(x); + const x = uint8ArrayToBigInt(xBytes); const _2n = BigInt(2); const r = getRandomBigInteger(_2n << (qSize - _1n), _2n << qSize); // draw r of same size as q const rqx = q * r + x; diff --git a/src/crypto/public_key/elgamal.js b/src/crypto/public_key/elgamal.js index 6bd4641e..19b96b59 100644 --- a/src/crypto/public_key/elgamal.js +++ b/src/crypto/public_key/elgamal.js @@ -35,6 +35,7 @@ const _1n = BigInt(1); * @returns {Promise<{ c1: Uint8Array, c2: Uint8Array }>} * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function encrypt(data, p, g, y) { p = uint8ArrayToBigInt(p); g = uint8ArrayToBigInt(g); @@ -64,6 +65,7 @@ export async function encrypt(data, p, g, y) { * @throws {Error} on decryption error, unless `randomPayload` is given * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function decrypt(c1, c2, p, x, randomPayload) { c1 = uint8ArrayToBigInt(c1); c2 = uint8ArrayToBigInt(c2); @@ -76,17 +78,18 @@ export async function decrypt(c1, c2, p, x, randomPayload) { /** * Validate ElGamal parameters - * @param {Uint8Array} p - ElGamal prime - * @param {Uint8Array} g - ElGamal group generator - * @param {Uint8Array} y - ElGamal public key - * @param {Uint8Array} x - ElGamal private exponent + * @param {Uint8Array} pBytes - ElGamal prime + * @param {Uint8Array} gBytes - ElGamal group generator + * @param {Uint8Array} yBytes - ElGamal public key + * @param {Uint8Array} xBytes - ElGamal private exponent * @returns {Promise} Whether params are valid. * @async */ -export async function validateParams(p, g, y, x) { - p = uint8ArrayToBigInt(p); - g = uint8ArrayToBigInt(g); - y = uint8ArrayToBigInt(y); +// eslint-disable-next-line @typescript-eslint/require-await +export async function validateParams(pBytes, gBytes, yBytes, xBytes) { + const p = uint8ArrayToBigInt(pBytes); + const g = uint8ArrayToBigInt(gBytes); + const y = uint8ArrayToBigInt(yBytes); // Check that 1 < g < p if (g <= _1n || g >= p) { @@ -132,7 +135,7 @@ export async function validateParams(p, g, y, x) { * * Blinded exponentiation computes g**{r(p-1) + x} to compare to y */ - x = uint8ArrayToBigInt(x); + const x = uint8ArrayToBigInt(xBytes); const r = getRandomBigInteger(_2n << (pSize - _1n), _2n << pSize); // draw r of same size as p-1 const rqx = (p - _1n) * r + x; if (y !== modExp(g, rqx, p)) { diff --git a/src/crypto/public_key/elliptic/brainpool/brainpoolP256r1.ts b/src/crypto/public_key/elliptic/brainpool/brainpoolP256r1.ts index 1cbdf69a..a1d25067 100644 --- a/src/crypto/public_key/elliptic/brainpool/brainpoolP256r1.ts +++ b/src/crypto/public_key/elliptic/brainpool/brainpoolP256r1.ts @@ -4,7 +4,6 @@ import { Field } from '@noble/curves/abstract/modular'; // brainpoolP256r1: https://datatracker.ietf.org/doc/html/rfc5639#section-3.4 -// eslint-disable-next-line new-cap const Fp = Field(BigInt('0xa9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377')); const CURVE_A = Fp.create(BigInt('0x7d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6ce94a4b44f330b5d9')); const CURVE_B = BigInt('0x26dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7e1ce6bccdc18ff8c07b6'); diff --git a/src/crypto/public_key/elliptic/brainpool/brainpoolP384r1.ts b/src/crypto/public_key/elliptic/brainpool/brainpoolP384r1.ts index e7cee9c3..0ba5dc52 100644 --- a/src/crypto/public_key/elliptic/brainpool/brainpoolP384r1.ts +++ b/src/crypto/public_key/elliptic/brainpool/brainpoolP384r1.ts @@ -4,7 +4,6 @@ import { Field } from '@noble/curves/abstract/modular'; // brainpoolP384 r1: https://datatracker.ietf.org/doc/html/rfc5639#section-3.6 -// eslint-disable-next-line new-cap const Fp = Field(BigInt('0x8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec53')); const CURVE_A = Fp.create(BigInt('0x7bc382c63d8c150c3c72080ace05afa0c2bea28e4fb22787139165efba91f90f8aa5814a503ad4eb04a8c7dd22ce2826')); const CURVE_B = BigInt('0x04a8c7dd22ce28268b39b55416f0447c2fb77de107dcd2a62e880ea53eeb62d57cb4390295dbc9943ab78696fa504c11'); diff --git a/src/crypto/public_key/elliptic/brainpool/brainpoolP512r1.ts b/src/crypto/public_key/elliptic/brainpool/brainpoolP512r1.ts index 86e2b86a..a4866bac 100644 --- a/src/crypto/public_key/elliptic/brainpool/brainpoolP512r1.ts +++ b/src/crypto/public_key/elliptic/brainpool/brainpoolP512r1.ts @@ -4,7 +4,6 @@ import { Field } from '@noble/curves/abstract/modular'; // brainpoolP512r1: https://datatracker.ietf.org/doc/html/rfc5639#section-3.7 -// eslint-disable-next-line new-cap const Fp = Field(BigInt('0xaadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3')); const CURVE_A = Fp.create(BigInt('0x7830a3318b603b89e2327145ac234cc594cbdd8d3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94ca')); const CURVE_B = BigInt('0x3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94cadc083e67984050b75ebae5dd2809bd638016f723'); diff --git a/src/crypto/public_key/elliptic/ecdh.js b/src/crypto/public_key/elliptic/ecdh.js index 4b3d6606..14128fd4 100644 --- a/src/crypto/public_key/elliptic/ecdh.js +++ b/src/crypto/public_key/elliptic/ecdh.js @@ -336,7 +336,7 @@ async function webPublicEphemeralKey(curve, Q) { * @returns {Promise<{secretKey: Uint8Array, sharedKey: Uint8Array}>} * @async */ -async function nodePrivateEphemeralKey(curve, V, d) { +function nodePrivateEphemeralKey(curve, V, d) { const nodeCrypto = util.getNodeCrypto(); const recipient = nodeCrypto.createECDH(curve.node); recipient.setPrivateKey(d); @@ -353,7 +353,7 @@ async function nodePrivateEphemeralKey(curve, V, d) { * @returns {Promise<{publicKey: Uint8Array, sharedKey: Uint8Array}>} * @async */ -async function nodePublicEphemeralKey(curve, Q) { +function nodePublicEphemeralKey(curve, Q) { const nodeCrypto = util.getNodeCrypto(); const sender = nodeCrypto.createECDH(curve.node); sender.generateKeys(); diff --git a/src/crypto/public_key/elliptic/ecdsa.js b/src/crypto/public_key/elliptic/ecdsa.js index c555a295..ab98d618 100644 --- a/src/crypto/public_key/elliptic/ecdsa.js +++ b/src/crypto/public_key/elliptic/ecdsa.js @@ -88,7 +88,7 @@ export async function sign(oid, hashAlgo, message, publicKey, privateKey, hashed * @param {Uint8Array} message - Message to verify * @param {Uint8Array} publicKey - Public key used to verify the message * @param {Uint8Array} hashed - The hashed message - * @returns {Boolean} + * @returns {Promise} * @async */ export async function verify(oid, hashAlgo, signature, message, publicKey, hashed) { @@ -124,7 +124,7 @@ export async function verify(oid, hashAlgo, signature, message, publicKey, hashe } break; case 'node': { - const verified = await nodeVerify(curve, hashAlgo, signature, message, publicKey); + const verified = nodeVerify(curve, hashAlgo, signature, message, publicKey); return verified || tryFallbackVerificationForOldBug(); } } @@ -159,7 +159,6 @@ export async function validateParams(oid, Q, d) { const hashed = await computeDigest(hashAlgo, message); try { const signature = await sign(oid, hashAlgo, message, Q, d, hashed); - // eslint-disable-next-line @typescript-eslint/return-await return await verify(oid, hashAlgo, signature, message, Q, hashed); } catch { return false; @@ -246,7 +245,7 @@ async function webVerify(curve, hashAlgo, { r, s }, message, publicKey) { ); } -async function nodeSign(curve, hashAlgo, message, privateKey) { +function nodeSign(curve, hashAlgo, message, privateKey) { // JWT encoding cannot be used for now, as Brainpool curves are not supported const ecKeyUtils = util.nodeRequire('eckey-utils'); const nodeBuffer = util.getNodeBuffer(); @@ -268,7 +267,7 @@ async function nodeSign(curve, hashAlgo, message, privateKey) { }; } -async function nodeVerify(curve, hashAlgo, { r, s }, message, publicKey) { +function nodeVerify(curve, hashAlgo, { r, s }, message, publicKey) { const ecKeyUtils = util.nodeRequire('eckey-utils'); const nodeBuffer = util.getNodeBuffer(); const { publicKey: derPublicKey } = ecKeyUtils.generateDer({ diff --git a/src/crypto/public_key/elliptic/eddsa_legacy.js b/src/crypto/public_key/elliptic/eddsa_legacy.js index 9ab45da8..c1a72a4b 100644 --- a/src/crypto/public_key/elliptic/eddsa_legacy.js +++ b/src/crypto/public_key/elliptic/eddsa_legacy.js @@ -70,6 +70,7 @@ export async function sign(oid, hashAlgo, message, publicKey, privateKey, hashed * @returns {Boolean} * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function verify(oid, hashAlgo, { r, s }, m, publicKey, hashed) { const curve = new CurveWithOID(oid); checkPublicPointEnconding(curve, publicKey); diff --git a/src/crypto/public_key/elliptic/oid_curves.js b/src/crypto/public_key/elliptic/oid_curves.js index 83fc7764..089a4aa6 100644 --- a/src/crypto/public_key/elliptic/oid_curves.js +++ b/src/crypto/public_key/elliptic/oid_curves.js @@ -315,10 +315,10 @@ async function webGenKeyPair(name, wireFormatLeadingByte) { }; } -async function nodeGenKeyPair(name) { +function nodeGenKeyPair(name) { // Note: ECDSA and ECDH key generation is structurally equivalent const ecdh = nodeCrypto.createECDH(nodeCurves[name]); - await ecdh.generateKeys(); + ecdh.generateKeys(); return { publicKey: new Uint8Array(ecdh.getPublicKey()), privateKey: new Uint8Array(ecdh.getPrivateKey()) diff --git a/src/crypto/public_key/rsa.js b/src/crypto/public_key/rsa.js index 849d1cd3..d4b9ba11 100644 --- a/src/crypto/public_key/rsa.js +++ b/src/crypto/public_key/rsa.js @@ -76,7 +76,7 @@ export async function sign(hashAlgo, data, n, e, d, p, q, u, hashed) { * @param {Uint8Array} n - RSA public modulus * @param {Uint8Array} e - RSA public exponent * @param {Uint8Array} hashed - Hashed message - * @returns {Boolean} + * @returns {Promise} * @async */ export async function verify(hashAlgo, data, s, n, e, hashed) { @@ -102,6 +102,7 @@ export async function verify(hashAlgo, data, s, n, e, hashed) { * @returns {Promise} RSA Ciphertext. * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function encrypt(data, n, e) { if (util.getNodeCrypto()) { return nodeEncrypt(data, n, e); @@ -124,13 +125,14 @@ export async function encrypt(data, n, e) { * @throws {Error} on decryption error, unless `randomPayload` is given * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function decrypt(data, n, e, d, p, q, u, randomPayload) { // Node v18.19.1, 20.11.1 and 21.6.2 have disabled support for PKCS#1 decryption, // and we want to avoid checking the error type to decide if the random payload // should indeed be returned. if (util.getNodeCrypto() && !randomPayload) { try { - return await nodeDecrypt(data, n, e, d, p, q, u); + return nodeDecrypt(data, n, e, d, p, q, u); } catch (err) { util.printDebugError(err); } @@ -146,8 +148,8 @@ export async function decrypt(data, n, e, d, p, q, u, randomPayload) { * @see module:crypto/public_key/prime * @param {Integer} bits - RSA bit length * @param {Integer} e - RSA public exponent - * @returns {{n, e, d, - * p, q ,u: Uint8Array}} RSA public modulus, RSA public exponent, RSA private exponent, + * @returns {Promise<{n, e, d, + * p, q ,u: Uint8Array}>} RSA public modulus, RSA public exponent, RSA private exponent, * RSA private prime p, RSA private prime q, u = p ** -1 mod q * @async */ @@ -231,6 +233,7 @@ export async function generate(bits, e) { * @returns {Promise} Whether params are valid. * @async */ +// eslint-disable-next-line @typescript-eslint/require-await export async function validateParams(n, e, d, p, q, u) { n = uint8ArrayToBigInt(n); p = uint8ArrayToBigInt(p); @@ -269,7 +272,7 @@ export async function validateParams(n, e, d, p, q, u) { return true; } -async function bnSign(hashAlgo, n, d, hashed) { +function bnSign(hashAlgo, n, d, hashed) { n = uint8ArrayToBigInt(n); const m = uint8ArrayToBigInt(emsaEncode(hashAlgo, hashed, byteLength(n))); d = uint8ArrayToBigInt(d); @@ -284,7 +287,7 @@ async function webSign(hashName, data, n, e, d, p, q, u) { * does if the underlying Web Crypto does so (though the tested implementations * don't do so). */ - const jwk = await privateToJWK(n, e, d, p, q, u); + const jwk = privateToJWK(n, e, d, p, q, u); const algo = { name: 'RSASSA-PKCS1-v1_5', hash: { name: hashName } @@ -293,16 +296,16 @@ async function webSign(hashName, data, n, e, d, p, q, u) { return new Uint8Array(await webCrypto.sign('RSASSA-PKCS1-v1_5', key, data)); } -async function nodeSign(hashAlgo, data, n, e, d, p, q, u) { +function nodeSign(hashAlgo, data, n, e, d, p, q, u) { const sign = nodeCrypto.createSign(enums.read(enums.hash, hashAlgo)); sign.write(data); sign.end(); - const jwk = await privateToJWK(n, e, d, p, q, u); + const jwk = privateToJWK(n, e, d, p, q, u); return new Uint8Array(sign.sign({ key: jwk, format: 'jwk', type: 'pkcs1' })); } -async function bnVerify(hashAlgo, s, n, e, hashed) { +function bnVerify(hashAlgo, s, n, e, hashed) { n = uint8ArrayToBigInt(n); s = uint8ArrayToBigInt(s); e = uint8ArrayToBigInt(e); @@ -323,7 +326,7 @@ async function webVerify(hashName, data, s, n, e) { return webCrypto.verify('RSASSA-PKCS1-v1_5', key, s, data); } -async function nodeVerify(hashAlgo, data, s, n, e) { +function nodeVerify(hashAlgo, data, s, n, e) { const jwk = publicToJWK(n, e); const key = { key: jwk, format: 'jwk', type: 'pkcs1' }; @@ -338,14 +341,14 @@ async function nodeVerify(hashAlgo, data, s, n, e) { } } -async function nodeEncrypt(data, n, e) { +function nodeEncrypt(data, n, e) { const jwk = publicToJWK(n, e); const key = { key: jwk, format: 'jwk', type: 'pkcs1', padding: nodeCrypto.constants.RSA_PKCS1_PADDING }; return new Uint8Array(nodeCrypto.publicEncrypt(key, data)); } -async function bnEncrypt(data, n, e) { +function bnEncrypt(data, n, e) { n = uint8ArrayToBigInt(n); data = uint8ArrayToBigInt(emeEncode(data, byteLength(n))); e = uint8ArrayToBigInt(e); @@ -355,8 +358,8 @@ async function bnEncrypt(data, n, e) { return bigIntToUint8Array(modExp(data, e, n), 'be', byteLength(n)); } -async function nodeDecrypt(data, n, e, d, p, q, u) { - const jwk = await privateToJWK(n, e, d, p, q, u); +function nodeDecrypt(data, n, e, d, p, q, u) { + const jwk = privateToJWK(n, e, d, p, q, u); const key = { key: jwk, format: 'jwk' , type: 'pkcs1', padding: nodeCrypto.constants.RSA_PKCS1_PADDING }; try { @@ -366,7 +369,7 @@ async function nodeDecrypt(data, n, e, d, p, q, u) { } } -async function bnDecrypt(data, n, e, d, p, q, u, randomPayload) { +function bnDecrypt(data, n, e, d, p, q, u, randomPayload) { data = uint8ArrayToBigInt(data); n = uint8ArrayToBigInt(n); e = uint8ArrayToBigInt(e); @@ -405,7 +408,7 @@ async function bnDecrypt(data, n, e, d, p, q, u, randomPayload) { * @param {Uint8Array} q * @param {Uint8Array} u */ -async function privateToJWK(n, e, d, p, q, u) { +function privateToJWK(n, e, d, p, q, u) { const pNum = uint8ArrayToBigInt(p); const qNum = uint8ArrayToBigInt(q); const dNum = uint8ArrayToBigInt(d); diff --git a/src/encoding/armor.js b/src/encoding/armor.js index fd5efdab..7ac6d444 100644 --- a/src/encoding/armor.js +++ b/src/encoding/armor.js @@ -227,8 +227,7 @@ function removeChecksum(text) { * @static */ export function unarmor(input) { - // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve, reject) => { + return new Promise((resolve, reject) => { try { const reSplit = /^-----[^-]+-----$/m; const reEmptyLine = /^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/; diff --git a/src/key/factory.js b/src/key/factory.js index 955802a3..21006be4 100644 --- a/src/key/factory.js +++ b/src/key/factory.js @@ -167,10 +167,10 @@ export async function reformat(options, config) { * Construct PrivateKey object from the given key packets, add certification signatures and set passphrase protection * The new key includes a revocation certificate that must be removed before returning the key, otherwise the key is considered revoked. * @param {SecretKeyPacket} secretKeyPacket - * @param {SecretSubkeyPacket} secretSubkeyPackets + * @param {Array} secretSubkeyPackets * @param {Object} options * @param {Object} config - Full configuration - * @returns {PrivateKey} + * @returns {Promise} */ async function wrapKeyObject(secretKeyPacket, secretSubkeyPackets, options, config) { // set passphrase protection @@ -295,12 +295,12 @@ async function wrapKeyObject(secretKeyPacket, secretSubkeyPackets, options, conf secretKeyPacket.clearPrivateParams(); } - await Promise.all(secretSubkeyPackets.map(async function(secretSubkeyPacket, index) { + secretSubkeyPackets.map(function(secretSubkeyPacket, index) { const subkeyPassphrase = options.subkeys[index].passphrase; if (subkeyPassphrase) { secretSubkeyPacket.clearPrivateParams(); } - })); + }); return new PrivateKey(packetlist); } diff --git a/src/key/key.js b/src/key/key.js index fd13c0d0..6685d682 100644 --- a/src/key/key.js +++ b/src/key/key.js @@ -513,8 +513,10 @@ class Key { // eslint-disable-next-line @typescript-eslint/only-throw-error throw exception || new Error('Could not find primary user'); } - await Promise.all(users.map(async function (a) { - return a.selfCertification.revoked || a.user.isRevoked(a.selfCertification, null, date, config); + // Update `revoked` status, whose value is discarded here but used below; + // see https://github.com/openpgpjs/openpgpjs/issues/880 for Promise.all motivation + await Promise.all(users.map(async a => { + a.selfCertification.revoked || await a.user.isRevoked(a.selfCertification, null, date, config); })); // sort by primary user flag and signature creation time const primaryUser = users.sort(function(a, b) { diff --git a/src/key/private_key.js b/src/key/private_key.js index 59f62e6d..f89af7b0 100644 --- a/src/key/private_key.js +++ b/src/key/private_key.js @@ -168,7 +168,7 @@ class PrivateKey extends PublicKey { throw new Error('Cannot validate an all-gnu-dummy key'); } - return Promise.all(keys.map(async key => key.keyPacket.validate())); + return Promise.all(keys.map(key => key.keyPacket.validate())); } } diff --git a/src/message.js b/src/message.js index 5392a221..ad5e1ba7 100644 --- a/src/message.js +++ b/src/message.js @@ -639,9 +639,10 @@ export class Message { * signature: Promise, * verified: Promise * }>>} List of signer's keyID and validity of signature. - * @async + * @async needed to avoid breaking change until next major release */ - verifyDetached(signature, verificationKeys, date = new Date(), config = defaultConfig) { + // eslint-disable-next-line @typescript-eslint/require-await + async verifyDetached(signature, verificationKeys, date = new Date(), config = defaultConfig) { const msg = this.unwrapCompressed(); const literalDataList = msg.packets.filterByTag(enums.packet.literalData); if (literalDataList.length !== 1) { @@ -751,15 +752,15 @@ export async function createSignaturePackets(literalDataPacket, signingKeys, rec * @param {Date} [date] - Check signature validity with respect to the given date * @param {Boolean} [detached] - Whether to verify detached signature packets * @param {Object} [config] - Full configuration, defaults to openpgp.config - * @returns {Promise<{ + * @returns {{ * keyID: module:type/keyid~KeyID, * signature: Promise, * verified: Promise - * }>} signer's keyID and validity of signature + * }} signer's keyID and validity of signature * @async * @private */ -async function createVerificationObject(signature, literalDataList, verificationKeys, date = new Date(), detached = false, config = defaultConfig) { +function createVerificationObject(signature, literalDataList, verificationKeys, date = new Date(), detached = false, config = defaultConfig) { let primaryKey; let unverifiedSigningKey; @@ -831,20 +832,17 @@ async function createVerificationObject(signature, literalDataList, verification * i.e. check signature creation time < date < expiration time * @param {Boolean} [detached] - Whether to verify detached signature packets * @param {Object} [config] - Full configuration, defaults to openpgp.config - * @returns {Promise, * verified: Promise - * }>>} list of signer's keyID and validity of signatures (one entry per signature packet in input) - * @async + * }>} list of signer's keyID and validity of signatures (one entry per signature packet in input) * @private */ -export async function createVerificationObjects(signatureList, literalDataList, verificationKeys, date = new Date(), detached = false, config = defaultConfig) { - return Promise.all(signatureList.filter(function(signature) { - return ['text', 'binary'].includes(enums.read(enums.signature, signature.signatureType)); - }).map(async function(signature) { - return createVerificationObject(signature, literalDataList, verificationKeys, date, detached, config); - })); +export function createVerificationObjects(signatureList, literalDataList, verificationKeys, date = new Date(), detached = false, config = defaultConfig) { + return signatureList + .filter(signature => ['text', 'binary'].includes(enums.read(enums.signature, signature.signatureType))) + .map(signature => createVerificationObject(signature, literalDataList, verificationKeys, date, detached, config)); } /** @@ -894,9 +892,10 @@ export async function readMessage({ armoredMessage, binaryMessage, config, ...re * @param {Date} [options.date=current date] - Date of the message, or modification date of the file * @param {'utf8'|'binary'|'text'|'mime'} [options.format='utf8' if text is passed, 'binary' otherwise] - Data packet type * @returns {Promise} New message object. - * @async + * @async not necessary, but needed to align with readMessage * @static */ +// eslint-disable-next-line @typescript-eslint/require-await export async function createMessage({ text, binary, filename, date = new Date(), format = text !== undefined ? 'utf8' : 'binary', ...rest }) { const input = text !== undefined ? text : binary; if (input === undefined) { diff --git a/src/packet/compressed_data.js b/src/packet/compressed_data.js index fa7fddc2..ec6cd86b 100644 --- a/src/packet/compressed_data.js +++ b/src/packet/compressed_data.js @@ -186,7 +186,7 @@ function zlib(compressionStreamInstantiator, ZlibStreamedConstructor) { return new ReadableStream({ async start(controller) { - zlibStream.ondata = async (value, isLast) => { + zlibStream.ondata = (value, isLast) => { controller.enqueue(value); if (isLast) { controller.close(); diff --git a/src/packet/one_pass_signature.js b/src/packet/one_pass_signature.js index 2c029a74..2a084a6f 100644 --- a/src/packet/one_pass_signature.js +++ b/src/packet/one_pass_signature.js @@ -194,8 +194,11 @@ class OnePassSignaturePacket { } } +// eslint-disable-next-line @typescript-eslint/unbound-method OnePassSignaturePacket.prototype.hash = SignaturePacket.prototype.hash; +// eslint-disable-next-line @typescript-eslint/unbound-method OnePassSignaturePacket.prototype.toHash = SignaturePacket.prototype.toHash; +// eslint-disable-next-line @typescript-eslint/unbound-method OnePassSignaturePacket.prototype.toSign = SignaturePacket.prototype.toSign; export default OnePassSignaturePacket; diff --git a/src/packet/packet.js b/src/packet/packet.js index 4dfcfa9f..30597f0f 100644 --- a/src/packet/packet.js +++ b/src/packet/packet.js @@ -112,7 +112,7 @@ export function supportsStreaming(tag) { * * @param {Uint8Array | ReadableStream} input - Input stream as string * @param {Function} callback - Function to call with the parsed packet - * @returns {Boolean} Returns false if the stream was empty and parsing is done, and true otherwise. + * @returns {Promise} Returns false if the stream was empty and parsing is done, and true otherwise. */ export async function readPacket(reader, useStreamType, callback) { let writer; @@ -155,7 +155,7 @@ export async function readPacket(reader, useStreamType, callback) { writer = streamGetWriter(transform.writable); packet = transform.readable; } - // eslint-disable-next-line callback-return + callbackReturned = callback({ tag, packet }); } else { packet = []; @@ -244,7 +244,7 @@ export async function readPacket(reader, useStreamType, callback) { await writer.close(); } else { packet = util.concatUint8Array(packet); - // eslint-disable-next-line callback-return + await callback({ tag, packet }); } } catch (e) { diff --git a/src/packet/packetlist.js b/src/packet/packetlist.js index 915d5eb1..d268c8d8 100644 --- a/src/packet/packetlist.js +++ b/src/packet/packetlist.js @@ -49,7 +49,7 @@ class PacketList extends Array { * @param {Object} [config] - full configuration, defaults to openpgp.config * @param {function(enums.packet[], boolean, Object): void} [grammarValidator] * @param {Boolean} [delayErrors] - delay errors until the input stream has been read completely - * @returns {PacketList} parsed list of packets + * @returns {Promise} parsed list of packets * @throws on parsing errors * @async */ diff --git a/src/packet/padding.js b/src/packet/padding.js index 13b2c040..3433d560 100644 --- a/src/packet/padding.js +++ b/src/packet/padding.js @@ -53,10 +53,11 @@ class PaddingPacket { * Create random padding. * @param {Number} length - The length of padding to be generated. * @throws {Error} if padding generation was not successful - * @async + * @async needed to avoid breaking change until next major release */ + // eslint-disable-next-line @typescript-eslint/require-await async createPadding(length) { - this.padding = await getRandomBytes(length); + this.padding = getRandomBytes(length); } } diff --git a/src/packet/public_key.js b/src/packet/public_key.js index 4d2235fc..9646d5bf 100644 --- a/src/packet/public_key.js +++ b/src/packet/public_key.js @@ -101,7 +101,7 @@ class PublicKeyPacket { /** * Internal Parser for public keys as specified in {@link https://tools.ietf.org/html/rfc4880#section-5.5.2|RFC 4880 section 5.5.2 Public-Key Packet Formats} * @param {Uint8Array} bytes - Input array to read the packet from - * @returns {Object} This object with attributes set by the parser + * @returns {Promise} The number of bytes read from `bytes` * @async */ async read(bytes, config = defaultConfig) { @@ -284,12 +284,14 @@ class PublicKeyPacket { * Alias of read() * @see PublicKeyPacket#read */ +// eslint-disable-next-line @typescript-eslint/unbound-method PublicKeyPacket.prototype.readPublicKey = PublicKeyPacket.prototype.read; /** * Alias of write() * @see PublicKeyPacket#write */ +// eslint-disable-next-line @typescript-eslint/unbound-method PublicKeyPacket.prototype.writePublicKey = PublicKeyPacket.prototype.write; export default PublicKeyPacket; diff --git a/src/packet/public_key_encrypted_session_key.js b/src/packet/public_key_encrypted_session_key.js index 5a751d05..e377482d 100644 --- a/src/packet/public_key_encrypted_session_key.js +++ b/src/packet/public_key_encrypted_session_key.js @@ -53,6 +53,7 @@ class PublicKeyEncryptedSessionKeyPacket { this.publicKeyFingerprint = null; // For all versions: + /** @type {enums.publicKey | null} */ this.publicKeyAlgorithm = null; this.sessionKey = null; diff --git a/src/packet/public_subkey.js b/src/packet/public_subkey.js index a0b664e8..581d4a95 100644 --- a/src/packet/public_subkey.js +++ b/src/packet/public_subkey.js @@ -35,7 +35,6 @@ class PublicSubkeyPacket extends PublicKeyPacket { * @param {Date} [date] - Creation date * @param {Object} [config] - Full configuration, defaults to openpgp.config */ - // eslint-disable-next-line @typescript-eslint/no-useless-constructor constructor(date, config) { super(date, config); } diff --git a/src/packet/secret_key.js b/src/packet/secret_key.js index bdfd4e7e..13e769dd 100644 --- a/src/packet/secret_key.js +++ b/src/packet/secret_key.js @@ -51,7 +51,7 @@ class SecretKeyPacket extends PublicKeyPacket { this.isEncrypted = null; /** * S2K usage - * @type {enums.symmetric} + * @type {number} */ this.s2kUsage = 0; /** diff --git a/src/packet/signature.js b/src/packet/signature.js index 557ae6db..2429ecd3 100644 --- a/src/packet/signature.js +++ b/src/packet/signature.js @@ -97,6 +97,7 @@ class SignaturePacket { this.keyFlags = null; this.signersUserID = null; this.reasonForRevocationFlag = null; + /** @type {String | null} */ this.reasonForRevocationString = null; this.features = null; this.signatureTargetPublicKeyAlgorithm = null; diff --git a/src/packet/sym_encrypted_integrity_protected_data.js b/src/packet/sym_encrypted_integrity_protected_data.js index 9fbfdb49..afa538d2 100644 --- a/src/packet/sym_encrypted_integrity_protected_data.js +++ b/src/packet/sym_encrypted_integrity_protected_data.js @@ -321,7 +321,6 @@ export async function runAEAD(packet, fn, key, data) { done = true; } cryptedBytes += chunk.length - tagLengthIfDecrypting; - // eslint-disable-next-line @typescript-eslint/no-loop-func latestPromise = latestPromise.then(() => cryptedPromise).then(async crypted => { await writer.ready; await writer.write(crypted); diff --git a/src/util.js b/src/util.js index c9e676b1..e352b6b9 100644 --- a/src/util.js +++ b/src/util.js @@ -29,7 +29,7 @@ import defaultConfig from './config'; const debugMode = (() => { try { - return process.env.NODE_ENV === 'development'; // eslint-disable-line no-process-env + return process.env.NODE_ENV === 'development'; } catch {} return false; })(); @@ -255,7 +255,7 @@ const util = { */ encodeUTF8: function (str) { const encoder = new TextEncoder('utf-8'); - // eslint-disable-next-line no-inner-declarations + function process(value, lastChunk = false) { return encoder.encode(value, { stream: !lastChunk }); } @@ -269,7 +269,7 @@ const util = { */ decodeUTF8: function (utf8) { const decoder = new TextDecoder('utf-8'); - // eslint-disable-next-line no-inner-declarations + function process(value, lastChunk = false) { return decoder.decode(value, { stream: !lastChunk }); } @@ -638,17 +638,17 @@ const util = { * or rejected with the Error of the last resolved Promise (if all promises are rejected) */ anyPromise: function(promises) { - // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve, reject) => { + return new Promise((resolve, reject) => { let exception; - await Promise.all(promises.map(async promise => { + void Promise.all(promises.map(async promise => { try { resolve(await promise); } catch (e) { exception = e; } - })); - reject(exception); + })).then(() => { + reject(exception); + }); }); }, diff --git a/test/benchmarks/memory_usage.js b/test/benchmarks/memory_usage.js index 0dc7da94..8bc0a077 100644 --- a/test/benchmarks/memory_usage.js +++ b/test/benchmarks/memory_usage.js @@ -108,7 +108,7 @@ class MemoryBenchamrkSuite { * Memory usage tests. * All the necessary variables must be declared inside the test function. */ -(async () => { +void (async () => { const suite = new MemoryBenchamrkSuite(); suite.add('empty test (baseline)', () => {}); diff --git a/test/benchmarks/time.js b/test/benchmarks/time.js index 24ba752a..c62cb027 100644 --- a/test/benchmarks/time.js +++ b/test/benchmarks/time.js @@ -23,7 +23,7 @@ const onError = err => { * Time benchmark tests. * NB: each test will be run multiple times, so any input must be consumable multiple times. */ -(async () => { +void (async () => { const suite = new Benchmark.Suite(); const { armoredKey, privateKey, publicKey, armoredEncryptedMessage, armoredSignedMessage } = await getTestData(); function* largeDataGenerator({ chunk, numberOfChunks }) { diff --git a/test/crypto/biginteger.js b/test/crypto/biginteger.js index aeabd943..b71b9c5e 100644 --- a/test/crypto/biginteger.js +++ b/test/crypto/biginteger.js @@ -4,7 +4,7 @@ import BN from 'bn.js'; import { bigIntToUint8Array, bitLength, byteLength, gcd, getBit, modExp, modInv } from '../../src/crypto/biginteger'; import { getRandomBytes } from '../../src/crypto/random'; -async function getRandomBN(min, max) { +function getRandomBN(min, max) { if (max.cmp(min) <= 0) { throw new Error('Illegal parameter value: max <= min'); } diff --git a/test/crypto/ecdsa_eddsa.js b/test/crypto/ecdsa_eddsa.js index 5b10621f..f6b1a7d0 100644 --- a/test/crypto/ecdsa_eddsa.js +++ b/test/crypto/ecdsa_eddsa.js @@ -112,6 +112,7 @@ export default () => describe('ECC signatures', function () { }); it('Creating KeyPair', function () { if (!config.useEllipticFallback && !util.getNodeCrypto()) { + // eslint-disable-next-line no-invalid-this this.skip(); } const names = config.useEllipticFallback ? ['nistP256', 'nistP384', 'nistP521', 'secp256k1', 'curve25519Legacy', 'brainpoolP256r1', 'brainpoolP384r1', 'brainpoolP512r1'] : @@ -235,6 +236,7 @@ export default () => describe('ECC signatures', function () { }); it('secp256k1 - Invalid public key', async function () { if (!config.useEllipticFallback && !util.getNodeCrypto()) { + // eslint-disable-next-line no-invalid-this this.skip(); // webcrypto does not implement secp256k1: JS fallback tested instead } await expect(verify_signature( @@ -249,6 +251,7 @@ export default () => describe('ECC signatures', function () { }); it('secp256k1 - Invalid signature', function (done) { if (!config.useEllipticFallback && !util.getNodeCrypto()) { + // eslint-disable-next-line no-invalid-this this.skip(); // webcrypto does not implement secp256k1: JS fallback tested instead } expect(verify_signature( diff --git a/test/general/armor.js b/test/general/armor.js index 01df7c05..3fe80d56 100644 --- a/test/general/armor.js +++ b/test/general/armor.js @@ -346,7 +346,7 @@ NJCB6+LWtabSoVIjNVgKwyKqyTLaESNwC2ogZwkdE8qPGiDFEHo4Gg9zuRof `; const { type, data } = await openpgp.unarmor(pubKey); - const armor = await openpgp.armor(type, data); + const armor = openpgp.armor(type, data); expect( armor .replace(/^(Version|Comment): .*$\n/mg, '') diff --git a/test/general/brainpool.js b/test/general/brainpool.js index c50987c0..5b176351 100644 --- a/test/general/brainpool.js +++ b/test/general/brainpool.js @@ -11,7 +11,7 @@ import * as input from './testInputs.js'; export default () => (openpgp.config.ci ? describe.skip : describe)('Brainpool Cryptography @lightweight', function () { let rejectCurvesVal; - before(function() { + before(() => { //only x25519 crypto is fully functional in lightbuild if (!openpgp.config.useEllipticFallback && !util.getNodeCrypto()) { this.skip(); // eslint-disable-line no-invalid-this diff --git a/test/general/config.js b/test/general/config.js index 89c6a969..ecdf31b7 100644 --- a/test/general/config.js +++ b/test/general/config.js @@ -456,7 +456,7 @@ c1HGHD56KA0Mu4eQksKNEugotEyBuWiZCVO+LBrDUFztC1IwXaNPL3bCjYaD await expect(sig5.verified).to.be.eventually.rejectedWith(/Support for eddsaLegacy keys using curve ed25519Legacy is disabled/); }); - describe('detects unknown config property', async function() { + describe('detects unknown config property', function() { const invalidConfig = { invalidProp: false }; const fnNames = ['generateKey', 'encryptKey', 'decryptKey', 'reformatKey', 'revokeKey', 'sign', 'encrypt', 'verify', 'decrypt', 'generateSessionKey', 'encryptSessionKey', 'decryptSessionKeys']; fnNames.forEach(name => it(`openpgp.${name}`, async function() { diff --git a/test/general/key.js b/test/general/key.js index 95aa0825..79c56182 100644 --- a/test/general/key.js +++ b/test/general/key.js @@ -2272,7 +2272,7 @@ function versionSpecificTests() { expect(selfSignature.features).to.eql([expectedFeatures]); }; const opt = { userIDs: { name: 'test', email: 'a@b.com' }, passphrase: 'hello', format: 'object' }; - return openpgp.generateKey(opt).then(async function({ privateKey, publicKey }) { + return openpgp.generateKey(opt).then(({ privateKey, publicKey }) => { testPref(privateKey); testPref(publicKey); }); @@ -3023,8 +3023,8 @@ export default () => describe('Key', function() { // ssb cv25519 2019-03-20 [E] // E4557C2B02FFBF4B04F87401EC336AF7133D0F85BE7FD09BAEFD9CAEB8C93965 const key = await openpgp.readKey({ armoredKey: v5_sample_key, config: { enableParsingV5Entities: true } }); - expect(await key.keyPacket.getFingerprint()).to.equal('19347bc9872464025f99df3ec2e0000ed9884892e1f7b3ea4c94009159569b54'); - expect(await key.subkeys[0].getFingerprint()).to.equal('e4557c2b02ffbf4b04f87401ec336af7133d0f85be7fd09baefd9caeb8c93965'); + expect(key.keyPacket.getFingerprint()).to.equal('19347bc9872464025f99df3ec2e0000ed9884892e1f7b3ea4c94009159569b54'); + expect(key.subkeys[0].getFingerprint()).to.equal('e4557c2b02ffbf4b04f87401ec336af7133d0f85be7fd09baefd9caeb8c93965'); await key.verifyPrimaryKey(); }); @@ -3482,7 +3482,7 @@ PzIEeL7UH3trraFmi+Gq8u4kAA== expect(pubKeyV4).to.exist; expect(pubKeyV4.getKeyID().toHex()).to.equal('4a63613a4d6e4094'); - expect(await pubKeyV4.getFingerprint()).to.equal('f470e50dcb1ad5f1e64e08644a63613a4d6e4094'); + expect(pubKeyV4.getFingerprint()).to.equal('f470e50dcb1ad5f1e64e08644a63613a4d6e4094'); }); it('Create new key ID with fromID()', async function() { @@ -3503,7 +3503,7 @@ PzIEeL7UH3trraFmi+Gq8u4kAA== ); const subkeyPackets = [packetlist[8], packetlist[11]]; - const subkeys = await pubKey.getSubkeys(); + const subkeys = pubKey.getSubkeys(); expect(subkeys).to.exist; expect(subkeys).to.have.length(2); expect(subkeys[0].getKeyID().equals(subkeyPackets[0].getKeyID())).to.be.true; diff --git a/test/general/openpgp.js b/test/general/openpgp.js index d626522b..564eaeef 100644 --- a/test/general/openpgp.js +++ b/test/general/openpgp.js @@ -1116,7 +1116,7 @@ PIQe3UJEj7ReaAd2LBkk3XXkg74zfts7GAGdNtWgXQEAwYQJdVChJFU3LRNh curve: 'curve25519', format: 'object' }; - return openpgp.generateKey(opt).then(async function({ privateKey: key }) { + return openpgp.generateKey(opt).then(({ privateKey: key }) => { expect(key).to.exist; expect(key.getAlgorithmInfo().rsaBits).to.equal(undefined); expect(key.getAlgorithmInfo().algorithm).to.equal('eddsaLegacy'); @@ -1454,7 +1454,7 @@ VFBLG8uc9IiaKann/DYBAJcZNZHRSfpDoV2pUA5EAEi2MdjxkRysFQnYPRAu describe('decrypt - unit tests', function() { let minRSABitsVal; - beforeEach(async function() { + beforeEach(() => { minRSABitsVal = openpgp.config.minRSABits; openpgp.config.minRSABits = 1024; }); @@ -1821,7 +1821,7 @@ BdPq describe('verify - unit tests', function() { let minRSABitsVal; - beforeEach(async function() { + beforeEach(() => { minRSABitsVal = openpgp.config.minRSABits; openpgp.config.minRSABits = 512; }); @@ -4533,7 +4533,7 @@ bsZgJWVlAa5eil6J9ePX2xbo1vVAkLQdzE9+1jL+l7PRIZuVBQ== expect(data).to.equal('test'); }); - describe('X25519/Ed25519 (new format)', async function () { + describe('X25519/Ed25519 (new format)', () => { it('should enforce using AES session keys with x25519 keys (v4 key)', async function () { // x25519 key (v4) with cast5 as preferred cipher const privateKeyCast5 = await openpgp.readKey({ armoredKey: `-----BEGIN PGP PRIVATE KEY BLOCK----- @@ -4667,7 +4667,7 @@ k0mXubZvyl4GBg== }); }); - describe('X448/Ed448', async function () { + describe('X448/Ed448', () => { it('should enforce using AES session keys with x448 keys (v4 key)', async function () { // X448 key (v4) with cast5 as preferred cipher const privateKeyCast5 = await openpgp.readKey({ armoredKey: `-----BEGIN PGP PRIVATE KEY BLOCK----- @@ -5093,7 +5093,7 @@ sEj+v9LKoMTYZGMfp3qDVFLtkBE88eVmVjgJOoLhrsv7yh0PAA== }); - describe('Specific encryption/signing key testing', async function () { + describe('Specific encryption/signing key testing', () => { const encryptionKeyIDs = [ keyIDType.fromID('87EAE0977B2185EA'), keyIDType.fromID('F94F9B34AF93FA14'), diff --git a/test/general/packet.js b/test/general/packet.js index 07f5e337..2be56f94 100644 --- a/test/general/packet.js +++ b/test/general/packet.js @@ -157,7 +157,7 @@ export default () => describe('Packet', function() { expect(await stringify(msg2[0].packets[0].data)).to.equal(stringify(literal.data)); }); - describe('Sym. encrypted integrity protected packet - throw on unexpected session key size', async () => { + describe('Sym. encrypted integrity protected packet - throw on unexpected session key size', () => { async function testSEIPD(packetOptions) { const symmetricAlgo = openpgp.enums.symmetric.aes256; const key = random.getRandomBytes(crypto.getCipherParams(symmetricAlgo).keySize); @@ -237,7 +237,7 @@ export default () => describe('Packet', function() { cryptStub.onCall(0).callsFake(async function() { cryptCallsActive++; try { - // eslint-disable-next-line @typescript-eslint/return-await + // eslint-disable-next-line no-invalid-this return await crypt.apply(this, arguments); } finally { cryptCallsActive--; @@ -249,6 +249,7 @@ export default () => describe('Packet', function() { // Chromium disabled some async WebCrypto operations in v141 . // Context: https://github.com/w3c/webcrypto/issues/389#issuecomment-3136298597 . expect(cryptCallsActive).to.equal(isChromeV141OrAbove() ? 0 : 1); + // eslint-disable-next-line no-invalid-this return crypt.apply(this, arguments); }); cryptStub.callThrough(); @@ -336,7 +337,7 @@ export default () => describe('Packet', function() { }); - describe('Sym. encrypted integrity protected packet reading/writing test vector (SEIPDv2)', async function () { + describe('Sym. encrypted integrity protected packet reading/writing test vector (SEIPDv2)', () => { const testVectors = [{ // from https://datatracker.ietf.org/doc/html/rfc9580#appendix-A.9 algoLabel: 'EAX', @@ -837,7 +838,7 @@ export default () => describe('Packet', function() { })); }); - describe('Sym. encrypted session key reading/writing test vector (SKESK v6)', async function () { + describe('Sym. encrypted session key reading/writing test vector (SKESK v6)', () => { const testVectors = [{ // from https://datatracker.ietf.org/doc/html/rfc9580#appendix-A.9.1 algoLabel: 'EAX', @@ -1112,7 +1113,7 @@ V+HOQJQxXJkVRYa3QrFUehiMzTeqqMdgC6ZqJy7+ expect(secretKeyPacket2.publicParams).to.deep.equal(secretKeyPacket.publicParams); }); - it('Writing of unencrypted v5 secret key packet', async function() { + it('Writing of unencrypted v5 secret key packet', () => { const packet = new openpgp.SecretKeyPacket(); packet.version = 5; packet.privateParams = { key: new Uint8Array([1, 2, 3]) }; @@ -1140,7 +1141,7 @@ V+HOQJQxXJkVRYa3QrFUehiMzTeqqMdgC6ZqJy7+ expect(written[25]).to.equal(3); }); - it('Writing of unencrypted v6 secret key packet', async function() { + it('Writing of unencrypted v6 secret key packet', () => { const originalv6KeysSetting = openpgp.config.v6Keys; openpgp.config.v6Keys = true; @@ -1376,7 +1377,7 @@ kePFjAnu9cpynKXu3usf8+FuBw2zLsg1Id1n7ttxoAte416KjBN9lFBt8mcu expect(otherPackets[0].constructor.tag).to.equal(openpgp.enums.packet.userID); }); - describe('Grammar validation', async function () { + describe('Grammar validation', () => { describe('MessageGrammarValidator - unit tests', () => { it('valid nested signed messages should be valid', () => { // Sig | OPS | Literal | Sig diff --git a/test/general/signature.js b/test/general/signature.js index 78c23f00..d3f251bf 100644 --- a/test/general/signature.js +++ b/test/general/signature.js @@ -706,7 +706,7 @@ hUhMKMuiM3pRwdIyDOItkUWQmjEEw7/XmhgInkXsCw== config: { minRSABits: 1024 } }); const signature = await openpgp.readSignature({ armoredSignature }); - expect(signature.getSigningKeyIDs).to.exist; + expect(signature.getSigningKeyIDs()).to.exist; expect(signature.getSigningKeyIDs().map(x => x.toHex())).to.include(publicKey.getKeyID().toHex()); }); @@ -1180,7 +1180,7 @@ Fk7EflUZzngwY4lBzYAfnNBjEjc30xD/ddo+rwE= const sMsg = await openpgp.readMessage({ armoredMessage: signedArmor }); const pub_key = await openpgp.readKey({ armoredKey: pub_key_arm2 }); const verified = await sMsg.verify([pub_key]); - stream.readToEnd(sMsg.getLiteralData()); + await stream.readToEnd(sMsg.getLiteralData()); expect(verified).to.exist; expect(verified).to.have.length(1); expect(await verified[0].verified).to.be.true; @@ -1574,7 +1574,7 @@ I8kWVkXU6vFOi+HWvv/ira7ofJu16NnoUkhclkUrk0mXubZvyl4GBg== const latin1Binary = util.hexToUint8Array('48e46c6cf62057e86c74'); const message = await openpgp.createMessage({ binary: latin1Binary }); - message.appendSignature(`-----BEGIN PGP SIGNATURE----- + await message.appendSignature(`-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEET5+J9VBawdGiYGMc2xGHud1faTsFAl5lE/AACgkQ2xGHud1f aTtIuw//YWrVaXLyP8sGBc0uUSLxQbmfQQYV8Oq8Vsg+jV4orc73wmEy8+Nj5m2g @@ -1842,7 +1842,7 @@ hkJiXopCSWKSlQInL1devkJJUWJmTmZeugJYlpdLAagQJM0JpsCqIQZwKgAA const keyIDs = message.getSigningKeyIDs(); expect(pubKey.getKeys(keyIDs[0])).to.not.be.empty; - return openpgp.verify({ verificationKeys: [pubKey], message, config: { minRSABits: 1024 } }).then(async ({ data, signatures }) => { + return openpgp.verify({ verificationKeys: [pubKey], message, config: { minRSABits: 1024 } }).then(({ data, signatures }) => { expect(data).to.equal(plaintext); expect(signatures).to.have.length(0); }); diff --git a/test/general/streaming.js b/test/general/streaming.js index a0123840..11252619 100644 --- a/test/general/streaming.js +++ b/test/general/streaming.js @@ -789,7 +789,7 @@ function tests() { it('Detached sign small message using curve25519 keys (legacy format)', async function() { const data = new globalThis.ReadableStream({ - async start(controller) { + start(controller) { controller.enqueue(util.stringToUint8Array('hello ')); controller.enqueue(util.stringToUint8Array('world')); controller.close(); @@ -1016,7 +1016,7 @@ export default () => describe('Streaming', function() { const __filename = fileURLToPath(import.meta.url); it('Node: Encrypt and decrypt text message roundtrip', async function() { - const plaintext = fs.readFileSync(__filename.replace('streaming.js', 'openpgp.js'), 'utf8'); // eslint-disable-line no-sync + const plaintext = fs.readFileSync(__filename.replace('streaming.js', 'openpgp.js'), 'utf8'); const data = NodeReadableStream.toWeb(fs.createReadStream(__filename.replace('streaming.js', 'openpgp.js'), { encoding: 'utf8' })); const encrypted = await openpgp.encrypt({ message: await openpgp.createMessage({ text: data }), @@ -1034,7 +1034,7 @@ export default () => describe('Streaming', function() { }); it('Node: Encrypt and decrypt binary message roundtrip', async function() { - const plaintext = fs.readFileSync(__filename.replace('streaming.js', 'openpgp.js')); // eslint-disable-line no-sync + const plaintext = fs.readFileSync(__filename.replace('streaming.js', 'openpgp.js')); const data = NodeReadableStream.toWeb(fs.createReadStream(__filename.replace('streaming.js', 'openpgp.js'))); const encrypted = await openpgp.encrypt({ message: await openpgp.createMessage({ binary: data }), diff --git a/test/security/message_signature_bypass.js b/test/security/message_signature_bypass.js index 614d5c05..33ec20dd 100644 --- a/test/security/message_signature_bypass.js +++ b/test/security/message_signature_bypass.js @@ -84,12 +84,12 @@ async function fakeSignature() { }); // read the standalone signature packet const tmp = new SignaturePacket(); - await tmp.read(STANDALONE_PKT); + tmp.read(STANDALONE_PKT); // replace the "text" signature with the // "standalone" signature fake.signature.packets[0] = tmp; - const faked_armored = await fake.armor(); + const faked_armored = fake.armor(); // re-read the message to eliminate any // behaviour due to cached values. fake = await readCleartextMessage({ cleartextMessage: faked_armored }); diff --git a/test/security/subkey_trust.js b/test/security/subkey_trust.js index 5d7f5fbe..7b670d42 100644 --- a/test/security/subkey_trust.js +++ b/test/security/subkey_trust.js @@ -60,7 +60,7 @@ export default () => it('Does not trust subkeys without Primary Key Binding Sign fakeBindingSignature // faked key binding ); let fakeKey = new PublicKey(newList); - fakeKey = await readKey({ armoredKey: await fakeKey.toPublic().armor() }); + fakeKey = await readKey({ armoredKey: fakeKey.toPublic().armor() }); const verifyAttackerIsBatman = await openpgp.verify({ message: await readCleartextMessage({ cleartextMessage: signed }), verificationKeys: fakeKey diff --git a/test/security/unsigned_subpackets.js b/test/security/unsigned_subpackets.js index c7786b7e..92397c7c 100644 --- a/test/security/unsigned_subpackets.js +++ b/test/security/unsigned_subpackets.js @@ -84,7 +84,7 @@ async function makeKeyValid() { let modifiedkey = new PrivateKey(newlist); // re-read the message to eliminate any // behaviour due to cached values. - modifiedkey = await readKey({ armoredKey: await modifiedkey.armor() }); + modifiedkey = await readKey({ armoredKey: modifiedkey.armor() }); expect(await encryptFails(invalidkey)).to.be.true; expect(await encryptFails(modifiedkey)).to.be.true; diff --git a/test/typescript/definitions.ts b/test/typescript/definitions.ts index 2e33bec3..10449442 100644 --- a/test/typescript/definitions.ts +++ b/test/typescript/definitions.ts @@ -218,10 +218,12 @@ import { try { const nodeTextStream = NodeNativeReadableStream.toWeb(createReadStream('non-existent-file', { encoding: 'utf8' })); const messageFromNodeTextStream = await createMessage({ text: nodeTextStream }); + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion (await encrypt({ message: messageFromNodeTextStream, passwords: 'password', format: 'armored' })) as NodeWebStream; } catch {} const webTextStream = new WebReadableStream(); const messageFromWebTextStream = await createMessage({ text: webTextStream }); + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion (await encrypt({ message: messageFromWebTextStream, passwords: 'password', format: 'armored' })) as WebStream; messageFromWebTextStream.getText() as WebStream; messageFromWebTextStream.getLiteralData() as WebStream; @@ -230,10 +232,12 @@ import { try { const nodeBinaryStream = NodeNativeReadableStream.toWeb(createReadStream('non-existent-file')); const messageFromNodeBinaryStream = await createMessage({ binary: nodeBinaryStream }); + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion (await encrypt({ message: messageFromNodeBinaryStream, passwords: 'password', format: 'binary' })) as NodeWebStream; } catch {} const webBinaryStream = new WebReadableStream(); const messageFromWebBinaryStream = await createMessage({ binary: webBinaryStream }); + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion (await encrypt({ message: messageFromWebBinaryStream, passwords: 'password', format: 'binary' })) as WebStream; messageFromWebBinaryStream.getText() as WebStream; messageFromWebBinaryStream.getLiteralData() as WebStream; diff --git a/test/unittests.js b/test/unittests.js index e6a1c7f8..79adc46f 100644 --- a/test/unittests.js +++ b/test/unittests.js @@ -53,7 +53,7 @@ describe('Unit Tests', function () { if (key && key !== 'grep') { openpgp.config[key] = decodeURIComponent(value); try { - openpgp.config[key] = window.eval(openpgp.config[key]); // eslint-disable-line no-eval + openpgp.config[key] = window.eval(openpgp.config[key]); } catch {} } }); From 8dd88396947b9c97731a41eaa52c63ba483c5ad0 Mon Sep 17 00:00:00 2001 From: larabr <7375870+larabr@users.noreply.github.com> Date: Fri, 17 Oct 2025 16:52:06 +0200 Subject: [PATCH 3/3] Linter: add warnings for rules affecting code quality These rules were currently silenced to limit the noise, but we should avoid introducing new problematic code instances, and refactor to fix the issues when possible, since in many cases this hinders the TS migration. --- eslint.config.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index aff9fa48..426f2491 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -42,7 +42,7 @@ export default defineConfig( rules: { 'arrow-body-style': 'off', 'arrow-parens': ['error','as-needed'], - 'class-methods-use-this': 'off', // TODO warn + 'class-methods-use-this': 'warn', 'comma-dangle': ['error', 'never'], '@typescript-eslint/comma-spacing': 'off', @@ -64,12 +64,12 @@ export default defineConfig( 'no-else-return': 'off', 'no-empty': ['error', { 'allowEmptyCatch': true }], 'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1, 'maxBOF':0 }], - 'no-nested-ternary': 'off', // TODO warn - 'no-param-reassign': 'off', // TODO get rid of this + 'no-nested-ternary': 'warn', + 'no-param-reassign': 'warn', // TODO get rid of this 'no-plusplus': 'off', 'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], 'object-curly-newline': 'off', - '@typescript-eslint/no-shadow': 'off', // TODO get rid of this + '@typescript-eslint/no-shadow': 'warn', // TODO get rid of this 'object-property-newline': [ 'error', { @@ -85,8 +85,8 @@ export default defineConfig( 'padded-blocks': 'off', 'prefer-arrow-callback': 'off', 'prefer-destructuring': 'off', - 'prefer-rest-params': 'off', // TODO get rid of this - 'prefer-spread': 'off', // TODO get rid of this + 'prefer-rest-params': 'warn', // TODO get rid of this + 'prefer-spread': 'warn', // TODO get rid of this 'prefer-template': 'off', 'quote-props': 'off', 'quotes': 'off', // superseded by @stylistic/quotes