From 629dbfc1d6fa144eafd54adedd08dbc915709f10 Mon Sep 17 00:00:00 2001 From: Tomer Figenblat Date: Sat, 10 Aug 2024 10:00:17 -0400 Subject: [PATCH] chore: change package type to es module Signed-off-by: Tomer Figenblat --- eslint.config.mjs | 4 +- package-lock.json | 1901 ++++------------- package.json | 8 +- src/app-runner.js | 6 +- src/auto-me-bot.js | 18 +- src/handlers/pr-auto-approve.js | 13 +- src/handlers/pr-conventional-commits.js | 15 +- src/handlers/pr-conventional-title.js | 15 +- src/handlers/pr-lifecycle-labels.js | 11 +- src/handlers/pr-signed-commits.js | 13 +- src/handlers/pr-tasks-list.js | 13 +- tests/auto-me-bot.test.js | 48 +- tests/handlers/pr-auto-approve.test.js | 13 +- .../handlers/pr-conventional-commits.test.js | 25 +- tests/handlers/pr-conventional-title.test.js | 26 +- tests/handlers/pr-lifecycle-labels.test.js | 13 +- tests/handlers/pr-signed-commits.test.js | 750 +++---- tests/handlers/pr-tasks-list.test.js | 15 +- 18 files changed, 865 insertions(+), 2042 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b1594c1f..57099dca 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -7,9 +7,9 @@ export default [ name: "default", files: ["**/*.js"], languageOptions: { - sourceType: "script", + sourceType: "module", globals: { - ...globals.node, + ...globals.nodeBuiltin, ...globals.mocha, } }, diff --git a/package-lock.json b/package-lock.json index 5bfd7b69..f41e1f57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,19 +14,18 @@ "@commitlint/load": "^19.4.0", "@digitalroute/email-verify": "^0.3.2", "js-yaml": "^4.1.0", - "lodash": "^4.17.21", + "lodash-es": "^4.17.21", "marked": "^14.0.0", "probot": "^13.3.7" }, "devDependencies": { "@eslint/js": "^9.8.0", + "c8": "^10.1.2", "chai": "^4.5.0", "eslint": "^9.8.0", "eslint-plugin-mocha": "^10.5.0", "globals": "^15.9.0", "mocha": "^10.7.3", - "nyc": "^17.0.0", - "rewire": "^7.0.0", "sinon": "^18.0.0", "sinon-chai": "^3.7.0" }, @@ -44,19 +43,6 @@ "node": ">=0.10.0" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", @@ -69,203 +55,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/@babel/core/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, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/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, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-validator-identifier": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", @@ -274,28 +63,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/highlight": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", @@ -374,75 +141,11 @@ "node": ">=4" } }, - "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, "node_modules/@commitlint/config-conventional": { "version": "19.2.2", @@ -775,12 +478,6 @@ "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==", - "dev": true - }, "node_modules/@humanwhocodes/retry": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", @@ -799,94 +496,100 @@ "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "node": ">=12" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "engines": { + "node": ">=12" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=6" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/@istanbuljs/schema": { @@ -898,20 +601,6 @@ "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -921,15 +610,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -1278,6 +958,16 @@ "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-7.3.2.tgz", "integrity": "sha512-JWOoOgtWTFnTSAamPXXyjTY5/apttvNxF+vPBnwdSu5cj5snrd7FO0fyw4+wTXy8fHduq626JjhO+TwCyyA6vA==" }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@probot/get-private-key": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@probot/get-private-key/-/get-private-key-1.1.2.tgz", @@ -1492,6 +1182,12 @@ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, "node_modules/@types/jsonwebtoken": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.5.tgz", @@ -1542,12 +1238,6 @@ "@types/node": "*" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -1676,24 +1366,6 @@ "node": ">= 8" } }, - "node_modules/append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", - "dev": true - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1925,38 +1597,6 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, "node_modules/btoa-lite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", @@ -1998,19 +1638,164 @@ "node": ">= 0.8" } }, - "node_modules/caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "node_modules/c8": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^7.0.1", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "peerDependencies": { + "monocart-coverage-reports": "^2" + }, + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } + } + }, + "node_modules/c8/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/c8/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/c8/node_modules/test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/c8/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/c8/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/call-bind": { @@ -2039,35 +1824,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001632", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz", - "integrity": "sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, "node_modules/chai": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", @@ -2212,12 +1968,6 @@ "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, "node_modules/compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -2291,12 +2041,6 @@ "node": ">=16" } }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -2388,15 +2132,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/deep-eql": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", @@ -2423,21 +2158,6 @@ "node": ">=0.10.0" } }, - "node_modules/default-require-extensions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", - "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", - "dev": true, - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -2493,18 +2213,6 @@ "node": ">=0.3.1" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -2527,6 +2235,12 @@ "url": "https://dotenvx.com" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -2540,12 +2254,6 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, - "node_modules/electron-to-chromium": { - "version": "1.4.800", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.800.tgz", - "integrity": "sha512-G8yyAReBP8m0XaW9BBH5NOJe4ZGYDDsPYkgLCG8xU6HwGKzrT0Jj51uAHkt1D+9ZxHPoGFSSZqqSN7HxAiP+0g==", - "dev": true - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2603,12 +2311,6 @@ "node": ">= 0.4" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -2836,19 +2538,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -3119,23 +2808,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3180,19 +2852,6 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, - "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -3209,26 +2868,6 @@ "node": ">= 0.6" } }, - "node_modules/fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3257,15 +2896,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3301,15 +2931,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/get-stream": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", @@ -3415,12 +3036,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3463,31 +3078,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hasown": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", @@ -3773,18 +3363,6 @@ "node": ">=8" } }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-text-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", @@ -3796,12 +3374,6 @@ "node": ">=8" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -3814,15 +3386,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3837,51 +3400,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", - "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", - "dev": true, - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", @@ -3911,20 +3429,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-reports": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", @@ -3938,6 +3442,21 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jiti": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", @@ -3978,18 +3497,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -4017,18 +3524,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -4191,10 +3686,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { + "node_modules/lodash-es": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, "node_modules/lodash.camelcase": { "version": "4.3.0", @@ -4206,12 +3701,6 @@ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true - }, "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -4323,39 +3812,6 @@ "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==" }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/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, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/marked": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", @@ -4457,6 +3913,15 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mocha": { "version": "10.7.3", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", @@ -4580,24 +4045,6 @@ "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", "dev": true }, - "node_modules/node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4632,185 +4079,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nyc": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-17.0.0.tgz", - "integrity": "sha512-ISp44nqNCaPugLLGGfknzQwSwt10SSS5IMoPR7GLoMAyS18Iw5js8U7ga2VF9lYuMZ42gOHr3UddZw4WZltxKg==", - "dev": true, - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^6.0.2", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "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/nyc/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -4924,18 +4192,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -4944,20 +4200,11 @@ "node": ">=6" } }, - "node_modules/package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true }, "node_modules/parent-module": { "version": "1.0.1", @@ -5004,15 +4251,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -5021,6 +4259,28 @@ "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -5224,77 +4484,13 @@ "node": ">=4" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" + "node": ">= 0.8.0" } }, "node_modules/probot": { @@ -5360,18 +4556,6 @@ "node": ">= 0.6.0" } }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/process-warning": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", @@ -5535,18 +4719,6 @@ "node": ">=4" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", - "dev": true, - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5564,12 +4736,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -5588,252 +4754,11 @@ "node": ">=0.10.0" } }, - "node_modules/rewire": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-7.0.0.tgz", - "integrity": "sha512-DyyNyzwMtGYgu0Zl/ya0PR/oaunM+VuCuBxCuhYJHHaV0V+YvYa3bBGxb5OZ71vndgmp1pYY8F4YOwQo1siRGw==", - "dev": true, - "dependencies": { - "eslint": "^8.47.0" - } - }, - "node_modules/rewire/node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/rewire/node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/rewire/node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/rewire/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/rewire/node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "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", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "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" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/rewire/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==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/rewire/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==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/rewire/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==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/rewire/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==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/rewire/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/rewire/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "node_modules/rfdc": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==" }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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==", - "dev": true, - "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/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5983,12 +4908,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -6046,12 +4965,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/sinon": { "version": "18.0.0", "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.0.tgz", @@ -6088,32 +5001,6 @@ "atomic-sleep": "^1.0.0" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -6122,12 +5009,6 @@ "node": ">= 10.x" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/standard-as-callback": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", @@ -6163,6 +5044,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -6175,11 +5071,15 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { "node": ">=8" } @@ -6218,40 +5118,6 @@ "node": ">=8" } }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "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/text-extensions": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", @@ -6282,15 +5148,6 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -6361,15 +5218,6 @@ "node": ">= 0.6" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", @@ -6410,36 +5258,6 @@ "node": ">= 0.8" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/update-dotenv": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/update-dotenv/-/update-dotenv-1.1.1.tgz", @@ -6470,15 +5288,26 @@ "node": ">= 0.4.0" } }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, - "bin": { - "uuid": "dist/bin/uuid" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" } }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/validator": { "version": "13.11.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", @@ -6509,12 +5338,6 @@ "node": ">= 8" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, "node_modules/workerpool": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", @@ -6538,23 +5361,29 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -6564,12 +5393,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index 9134f4ba..f550c3b3 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "auto-me-bot", "version": "2.0.1", "private": true, + "type": "module", "description": "A Probot app that takes care of your GitHub repos for you", "author": { "name": "Tomer Figenblat", @@ -24,7 +25,7 @@ "scripts": { "start": "probot run ./src/auto-me-bot.js", "lint": "eslint src tests", - "test": "nyc npm run tests", + "test": "c8 npm run tests", "tests": "mocha --check-leaks --fail-zero --color --ui tdd --recursive ./tests/", "tests:rep": "mocha --check-leaks --fail-zero --ui tdd --recursive --reporter json ./tests/ > unit-tests-result.json" }, @@ -34,7 +35,7 @@ "@commitlint/load": "^19.4.0", "@digitalroute/email-verify": "^0.3.2", "js-yaml": "^4.1.0", - "lodash": "^4.17.21", + "lodash-es": "^4.17.21", "marked": "^14.0.0", "probot": "^13.3.7" }, @@ -45,8 +46,7 @@ "eslint-plugin-mocha": "^10.5.0", "globals": "^15.9.0", "mocha": "^10.7.3", - "nyc": "^17.0.0", - "rewire": "^7.0.0", + "c8": "^10.1.2", "sinon": "^18.0.0", "sinon-chai": "^3.7.0" }, diff --git a/src/app-runner.js b/src/app-runner.js index 6a538033..c87a6d37 100644 --- a/src/app-runner.js +++ b/src/app-runner.js @@ -1,9 +1,9 @@ -const { Probot } = require('probot'); -const autoMeBot = require('./auto-me-bot'); +import { Probot } from 'probot' +import autoMeBot from './auto-me-bot' // handler function for aws lambda >> 'Handler:src/app-runner.handler' -exports.handler = async (event) => { +export async function handler (event) { let probot = new Probot({ appId: process.env.APP_ID, privateKey: Buffer.from(process.env.PRIVATE_KEY, 'base64').toString('utf-8'), diff --git a/src/auto-me-bot.js b/src/auto-me-bot.js index de6dcbb4..6b3262dd 100644 --- a/src/auto-me-bot.js +++ b/src/auto-me-bot.js @@ -1,12 +1,12 @@ -const yaml = require('js-yaml'); +import yaml from 'js-yaml' // import handlers -const prAutoApproveHandler = require('./handlers/pr-auto-approve'); -const prConventionalCommitsHandler = require('./handlers/pr-conventional-commits'); -const prConventionalTitleHandler = require('./handlers/pr-conventional-title'); -const prLifecycleLabelsHandler = require('./handlers/pr-lifecycle-labels'); -const prSignedCommitsHandler = require('./handlers/pr-signed-commits'); -const prTasksListHandler = require('./handlers/pr-tasks-list'); +import prAutoApproveHandler from './handlers/pr-auto-approve.js' +import prConventionalCommitsHandler from './handlers/pr-conventional-commits.js' +import prConventionalTitleHandler from './handlers/pr-conventional-title.js' +import prLifecycleLabelsHandler from './handlers/pr-lifecycle-labels.js' +import prSignedCommitsHandler from './handlers/pr-signed-commits.js' +import prTasksListHandler from './handlers/pr-tasks-list.js' /* example configuration (for reference): pr: @@ -52,12 +52,12 @@ const CONFIG_SPEC = Object.freeze({ }); // main entrance point for probot -module.exports = function (probot) { +export default function (probot) { probot.on(ON_EVENTS, handlersController(CONFIG_SPEC)); }; // distributes handler invocations based on user config and config spec -function handlersController(configSpec) { +export function handlersController(configSpec) { return async context => { // get config from current repo .github folder or from the .github repo's .github folder let config = await context.config('auto-me-bot.yml'); diff --git a/src/handlers/pr-auto-approve.js b/src/handlers/pr-auto-approve.js index cddb94a7..aab0574d 100644 --- a/src/handlers/pr-auto-approve.js +++ b/src/handlers/pr-auto-approve.js @@ -3,18 +3,23 @@ allBots: true users: ['myUserName'] */ -const BOT_CHECK_URL = 'https://auto-me-bot.tomfi.info'; -const CHECK_NAME = 'Auto-Me-Bot PR Automatic Approval'; +const BOT_CHECK_URL = 'https://auto-me-bot.tomfi.info' +const CHECK_NAME = 'Auto-Me-Bot PR Automatic Approval' + +export default { + match: match, + run: run +} // matcher for picking up events -module.exports.match = function(context) { +function match(context) { let event = 'pull_request'; let actions = ['opened', 'synchronize']; return event in context.payload ? actions.includes(context.payload.action) : false; } // handler for automatic approvals of PRs based on sender login and type -module.exports.run = async function(context, config, startedAt) { +async function run(context, config, startedAt) { // create the initial check run and mark it as in_progress let checkRun = await context.octokit.checks.create(context.repo({ head_sha: context.payload.pull_request.head.sha, diff --git a/src/handlers/pr-conventional-commits.js b/src/handlers/pr-conventional-commits.js index 5216901e..3776245f 100644 --- a/src/handlers/pr-conventional-commits.js +++ b/src/handlers/pr-conventional-commits.js @@ -1,6 +1,6 @@ -const lint = require('@commitlint/lint').default; -const load = require('@commitlint/load').default; -const { EOL } = require('os'); +import lint from '@commitlint/lint' +import load from '@commitlint/load' +import { EOL } from 'node:os' /* example configuration (for reference): rules: @@ -11,15 +11,20 @@ const BOT_CHECK_URL = 'https://auto-me-bot.tomfi.info'; const CHECK_NAME = 'Auto-Me-Bot Conventional Commits'; const DEFAULT_CONFIG = {extends: ['@commitlint/config-conventional']}; +export default { + match: match, + run: run +} + // matcher for picking up events -module.exports.match = function(context) { +function match(context) { let event = 'pull_request'; let actions = ['opened', 'edited', 'synchronize']; return event in context.payload ? actions.includes(context.payload.action) : false; } // handler for verifying commit messages as conventional -module.exports.run = async function(context, config, startedAt) { +async function run(context, config, startedAt) { // create the initial check run and mark it as in_progress let checkRun = await context.octokit.checks.create(context.repo({ head_sha: context.payload.pull_request.head.sha, diff --git a/src/handlers/pr-conventional-title.js b/src/handlers/pr-conventional-title.js index cfb716ce..6226ae8e 100644 --- a/src/handlers/pr-conventional-title.js +++ b/src/handlers/pr-conventional-title.js @@ -1,6 +1,6 @@ -const lint = require('@commitlint/lint').default; -const load = require('@commitlint/load').default; -const { EOL } = require('os'); +import lint from '@commitlint/lint' +import load from '@commitlint/load' +import { EOL } from 'node:os' /* example configuration (for reference): rules: @@ -11,15 +11,20 @@ const BOT_CHECK_URL = 'https://auto-me-bot.tomfi.info'; const CHECK_NAME = 'Auto-Me-Bot Conventional PR Title'; const DEFAULT_CONFIG = {extends: ['@commitlint/config-conventional']}; +export default { + match: match, + run: run +} + // matcher for picking up events -module.exports.match = function(context) { +function match(context) { let event = 'pull_request'; let actions = ['opened', 'edited', 'synchronize']; return event in context.payload ? actions.includes(context.payload.action) : false; } // handler for verifying pr titles as conventional -module.exports.run = async function(context, config, startedAt) { +async function run(context, config, startedAt) { // create the initial check run and mark it as in_progress let checkRun = await context.octokit.checks.create(context.repo({ head_sha: context.payload.pull_request.head.sha, diff --git a/src/handlers/pr-lifecycle-labels.js b/src/handlers/pr-lifecycle-labels.js index 2c75baac..5990edfb 100644 --- a/src/handlers/pr-lifecycle-labels.js +++ b/src/handlers/pr-lifecycle-labels.js @@ -1,4 +1,4 @@ -const { isEmpty } = require('lodash'); +import { isEmpty } from 'lodash-es' /* example configuration (for reference): ignoreDrafts: true @@ -25,8 +25,13 @@ const LABEL_KEYS = Object.freeze({ const KNOWN_LABELS = Object.freeze(Object.values(LABEL_KEYS)); +export default { + match: match, + run: run +} + // matcher for picking up events -module.exports.match = function(context) { +function match(context) { let eventPr = 'pull_request'; let actionsPr = ['opened', 'edited', 'synchronize', 'closed', 'ready_for_review', 'reopened']; @@ -45,7 +50,7 @@ module.exports.match = function(context) { } // handler for labeling pull requests based on lifecycle -module.exports.run = async function(context, config, startedAt) { +async function run(context, config, startedAt) { // create the initial check run and mark it as in_progress let checkRun = await context.octokit.checks.create(context.repo({ head_sha: context.payload.pull_request.head.sha, diff --git a/src/handlers/pr-signed-commits.js b/src/handlers/pr-signed-commits.js index b38f2944..aa5c632c 100644 --- a/src/handlers/pr-signed-commits.js +++ b/src/handlers/pr-signed-commits.js @@ -1,5 +1,5 @@ -const emailVerifier = require('@digitalroute/email-verify'); -const { EOL } = require('os'); +import { verify as emailVerifier } from '@digitalroute/email-verify' +import { EOL } from 'node:os' /* example configuration (for reference): ignore: @@ -12,15 +12,20 @@ const CHECK_NAME = 'Auto-Me-Bot Signed Commits'; const SIGN_OFF_TRAILER_REGEX = /^Signed-off-by: (.*) <(.*)@(.*)>$/; +export default { + match: match, + run: run +} + // matcher for picking up events -module.exports.match = function(context) { +function match(context) { let event = 'pull_request'; let actions = ['opened', 'edited', 'synchronize']; return event in context.payload ? actions.includes(context.payload.action) : false; } // handler for verifying all commits are sign with the Signed-off-by trailer and a legit email -module.exports.run = async function(context, config, startedAt) { +async function run(context, config, startedAt) { // create the initial check run and mark it as in_progress let checkRun = await context.octokit.checks.create(context.repo({ head_sha: context.payload.pull_request.head.sha, diff --git a/src/handlers/pr-tasks-list.js b/src/handlers/pr-tasks-list.js index 35d637bf..e2c16e08 100644 --- a/src/handlers/pr-tasks-list.js +++ b/src/handlers/pr-tasks-list.js @@ -1,11 +1,16 @@ -const marked = require('marked'); -const { EOL } = require('os'); +import { marked } from 'marked' +import { EOL } from 'node:os' const BOT_CHECK_URL = 'https://auto-me-bot.tomfi.info'; const CHECK_NAME = 'Auto-Me-Bot Tasks List'; +export default { + match: match, + run: run +} + // matcher for picking up events -module.exports.match = function(context) { +function match(context) { let event = 'pull_request'; let actions = ['opened', 'edited', 'synchronize']; @@ -17,7 +22,7 @@ module.exports.match = function(context) { } // handler for verifying PR tasks' list is completed -module.exports.run = async function(context, _config, startedAt) { +async function run(context, _config, startedAt) { // create the initial check run and mark it as in_progress let checkRun = await context.octokit.checks.create(context.repo({ head_sha: context.payload.pull_request.head.sha, diff --git a/tests/auto-me-bot.test.js b/tests/auto-me-bot.test.js index 0cb51db3..ed9d3177 100644 --- a/tests/auto-me-bot.test.js +++ b/tests/auto-me-bot.test.js @@ -1,31 +1,23 @@ -const chai = require('chai'); -const rewire = require('rewire'); -const sinon = require('sinon'); -const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ +import chai, { expect } from 'chai' +import sinonChai from 'sinon-chai' +import sinon from 'sinon' +import { beforeEach } from 'mocha' -chai.use(require('sinon-chai')); +chai.use(sinonChai) -const autoMeBot = rewire('../src/auto-me-bot'); -const expect = chai.expect; +import { handlersController as app } from '../src/auto-me-bot.js' + +import autoApproveHandlerOrig from '../src/handlers/pr-auto-approve.js' +import convCommitsHandlerOrig from '../src/handlers/pr-conventional-commits.js' +import convTitleHandlerOrig from '../src/handlers/pr-conventional-title.js' +import lifecycleLabelsHandlerOrig from '../src/handlers/pr-lifecycle-labels.js' +import signedCommitsHandlerOrig from '../src/handlers/pr-signed-commits.js' +import tasksListHandlerOrig from '../src/handlers/pr-tasks-list.js' suite('Testing the auto-me-bot export', () => { // turn off logs console.info = function() { /**/ }; - test('When invoking the application, expect a registration of the events', () => { - let probotFake = sinon.fake(); // create a fake probot for starting the app - let probotOnFunctionFake = sinon.fake(); // create a fake "on" function for the probot - // given the fake probot will adhere the fake 'on' function - probotFake.on = probotOnFunctionFake; - // when invoking the application with the fake probot - autoMeBot(probotFake); - // then expect the 'on' fake method to be called with the pull request events list - expect(probotOnFunctionFake).to.be.calledOnceWith( - autoMeBot.__get__('ON_EVENTS'), - sinon.match.func - ); - }); - suite('Test various pull request related configurations', () => { let autoApproveHandlerStub; let conventionalCommitsHandlerStub; @@ -46,37 +38,37 @@ suite('Testing the auto-me-bot export', () => { // patch the autoApprove handler's run function to a stub autoApproveHandlerStub = sinon.stub(); let autoApproveApproveHandlerPatch = { - match: require('../src/handlers/pr-auto-approve').match, + match: autoApproveHandlerOrig.match, run: autoApproveHandlerStub } // patch the conventionalCommits handler's run function to a stub conventionalCommitsHandlerStub = sinon.stub(); let conventionalCommitsHandlerPatch = { - match: require('../src/handlers/pr-conventional-commits').match, + match: convCommitsHandlerOrig.match, run: conventionalCommitsHandlerStub }; // patch the conventionalTitle handler's run function to a stub conventionalTitleHandlerStub = sinon.stub(); let conventionalTitleHandlerPatch = { - match: require('../src/handlers/pr-conventional-title').match, + match: convTitleHandlerOrig.match, run: conventionalTitleHandlerStub }; // patch the lifecycle handler's run function to a stub lifecycleLabelsHandlerStub = sinon.stub(); let lifecycleLabelHandlerPatch = { - match: require('../src/handlers/pr-lifecycle-labels').match, + match: lifecycleLabelsHandlerOrig.match, run: lifecycleLabelsHandlerStub }; // patch the signedCommits handler's run function to a stub signedCommitsHandlerStub = sinon.stub(); let signedCommitsHandlerPatch = { - match: require('../src/handlers/pr-signed-commits').match, + match: signedCommitsHandlerOrig.match, run: signedCommitsHandlerStub } // patch the tasksList handler's run function to a stub tasksListHandlerStub = sinon.stub(); let tasksListHandlerPatch = { - match: require('../src/handlers/pr-tasks-list').match, + match: tasksListHandlerOrig.match, run: tasksListHandlerStub }; // all handlers should be listed here for testing purposes @@ -99,7 +91,7 @@ suite('Testing the auto-me-bot export', () => { } }; // grab the handlersController configured for pr related operations using the patched configuration - prHandlersControllerSut = autoMeBot.__get__('handlersController')(patchedConfigSpec) + prHandlersControllerSut = app(patchedConfigSpec) // create a fake context for invoking the application with and stub the config method configFuncStub = sinon.stub(); fakeContext = { diff --git a/tests/handlers/pr-auto-approve.test.js b/tests/handlers/pr-auto-approve.test.js index 1af861cc..c4d8bd62 100644 --- a/tests/handlers/pr-auto-approve.test.js +++ b/tests/handlers/pr-auto-approve.test.js @@ -1,12 +1,11 @@ -const chai = require('chai'); -const rewire = require('rewire'); -const sinon = require('sinon'); -const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ +import chai, { expect } from 'chai' +import sinonChai from 'sinon-chai' +import sinon from 'sinon' +import { beforeEach } from 'mocha' -chai.use(require('sinon-chai')); +chai.use(sinonChai) -const expect = chai.expect; -const sut = rewire('../../src/handlers/pr-auto-approve'); +import sut from '../../src/handlers/pr-auto-approve.js' suite('Testing the pr-auto-approve handler', () => { suite('Test handler matching', () => { diff --git a/tests/handlers/pr-conventional-commits.test.js b/tests/handlers/pr-conventional-commits.test.js index d3123e30..4b135482 100644 --- a/tests/handlers/pr-conventional-commits.test.js +++ b/tests/handlers/pr-conventional-commits.test.js @@ -1,13 +1,12 @@ -const chai = require('chai'); -const rewire = require('rewire'); -const sinon = require('sinon'); -const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ -const { EOL } = require('os'); +import chai, { expect } from 'chai' +import sinonChai from 'sinon-chai' +import sinon from 'sinon' +import { beforeEach } from 'mocha' +import { EOL } from 'node:os' -chai.use(require('sinon-chai')); +chai.use(sinonChai) -const expect = chai.expect; -const sut = rewire('../../src/handlers/pr-conventional-commits'); +import sut from '../../src/handlers/pr-conventional-commits.js' suite('Testing the pr-conventional-commits handler', () => { suite('Test handler matching', () => { @@ -27,7 +26,6 @@ suite('Testing the pr-conventional-commits handler', () => { }); suite('Test handler running', () => { - let loadSpy; let createCheckStub; let repoFuncStub; let pullRequestFuncStub; @@ -35,7 +33,6 @@ suite('Testing the pr-conventional-commits handler', () => { let updateCheckStub; let fakeContext; - let baseConfig; const fakeSha = '#f54dda543@'; const fakeCheckId = 13; @@ -81,12 +78,6 @@ suite('Testing the pr-conventional-commits handler', () => { repoFuncStub.callsFake((a) => {return { ...getRepositoryInfoResponse, ...a }}); pullRequestFuncStub = sinon.stub(); //stub for context.pullRequest function to short-circuit return the expected response pullRequestFuncStub.callsFake((a) => {return { ...getPullRequestInfoResponse, ...a }}); - // wrap spy on load configuration - let loadConfig = sut.__get__('load'); - loadSpy = sinon.spy(loadConfig); - sut.__set__('load', loadSpy); - // grab the default configuration for testing usage - baseConfig = sut.__get__('DEFAULT_CONFIG'); // create a fake context for invoking the application with) fakeContext = Object.freeze({ payload: { @@ -318,8 +309,6 @@ suite('Testing the pr-conventional-commits handler', () => { // then verify a check run to be created and updated as expected expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); expect(updateCheckStub).to.have.been.calledOnceWith(expectedUpdateCheck); - // verify custom configuration is included in the used configuration - expect(loadSpy).to.have.been.calledOnceWith(optionalConfig ? {...baseConfig, ...optionalConfig} : baseConfig); } test('Test with listCommits API endpoint response not successful, expect a report indicating a possible API error', async () => { diff --git a/tests/handlers/pr-conventional-title.test.js b/tests/handlers/pr-conventional-title.test.js index 42f84e9a..6f4d9607 100644 --- a/tests/handlers/pr-conventional-title.test.js +++ b/tests/handlers/pr-conventional-title.test.js @@ -1,13 +1,13 @@ -const chai = require('chai'); -const rewire = require('rewire'); -const sinon = require('sinon'); -const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ -const { EOL } = require('os'); +import chai, { expect } from 'chai' +import sinonChai from 'sinon-chai' +import sinon from 'sinon' +import { beforeEach } from 'mocha' +import { EOL } from 'node:os' -chai.use(require('sinon-chai')); +chai.use(sinonChai) + +import sut from '../../src/handlers/pr-conventional-title.js' -const expect = chai.expect; -const sut = rewire('../../src/handlers/pr-conventional-title'); suite('Testing the pr-conventional-title handler', () => { suite('Test handler matching', () => { @@ -27,13 +27,11 @@ suite('Testing the pr-conventional-title handler', () => { }); suite('Test handler running', () => { - let loadSpy; let createCheckStub; let repoFuncStub; let updateCheckStub; let fakeContext; - let baseConfig; const fakeSha = '#f54dda543@'; const fakeCheckId = 13; @@ -73,12 +71,6 @@ suite('Testing the pr-conventional-title handler', () => { updateCheckStub.resolves(); repoFuncStub = sinon.stub(); // stub for context.repo function to short-circuit return the expected response repoFuncStub.callsFake((a) => {return { ...getRepositoryInfoResponse, ...a }}); - // wrap spy on load configuration - let loadConfig = sut.__get__('load'); - loadSpy = sinon.spy(loadConfig); - sut.__set__('load', loadSpy); - // grab the default configuration for testing usage - baseConfig = sut.__get__('DEFAULT_CONFIG'); // create a fake context for invoking the application with) fakeContext = Object.freeze({ octokit: { @@ -109,8 +101,6 @@ suite('Testing the pr-conventional-title handler', () => { // then verify a check run was created and updated as expected expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); expect(updateCheckStub).to.have.been.calledOnceWith({...baseExpectedUpdateCheck, ...expectedOutput}); - // verify custom configuration, if exists, is combined with base configuration - expect(loadSpy).to.have.been.calledOnceWith(optionalConfig ? {...baseConfig, ...optionalConfig} : baseConfig); } test('Test with a conventional pr title, expect a successful report', async () => { diff --git a/tests/handlers/pr-lifecycle-labels.test.js b/tests/handlers/pr-lifecycle-labels.test.js index f6b5d9d8..0a749ab7 100644 --- a/tests/handlers/pr-lifecycle-labels.test.js +++ b/tests/handlers/pr-lifecycle-labels.test.js @@ -1,11 +1,12 @@ -const chai = require('chai'); -const sinon = require('sinon'); -const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ +import chai, { expect } from 'chai' +import sinonChai from 'sinon-chai' +import sinon from 'sinon' +import { beforeEach } from 'mocha' -chai.use(require('sinon-chai')); +chai.use(sinonChai) + +import sut from '../../src/handlers/pr-lifecycle-labels.js' -const expect = chai.expect; -const sut = require('../../src/handlers/pr-lifecycle-labels'); suite('Testing the pr-lifecycle-labels', () => { suite('Test handler matching', () => { diff --git a/tests/handlers/pr-signed-commits.test.js b/tests/handlers/pr-signed-commits.test.js index e66f6fd9..ba82584f 100644 --- a/tests/handlers/pr-signed-commits.test.js +++ b/tests/handlers/pr-signed-commits.test.js @@ -1,375 +1,375 @@ -const chai = require('chai'); -const emailVerifier = require('@digitalroute/email-verify'); -const rewire = require('rewire'); -const sinon = require('sinon'); -const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ -const { cloneDeep } = require('lodash'); -const { EOL } = require('os'); - -chai.use(require('sinon-chai')); - -const expect = chai.expect; -const sut = rewire('../../src/handlers/pr-signed-commits'); - -suite('Testing the pr-signed-commits handler', () => { - suite('Test handler matching', () => { - ['opened', 'edited', 'synchronize'].forEach(action => { - test(`Test pull_request event type with ${action} action type, expect a match` , () => { - expect(sut.match({ payload: { pull_request: {}, action: action } })).to.be.true; - }); - }); - - test('Test pull_request event type with an unknown action type, expect a false match' , () => { - expect(sut.match({ payload: { pull_request: {}, action: 'unknownAction' } })).to.be.false; - }); - - test('Test an unknown event type, expect a false match', () => { - expect(sut.match({ payload: { unknownEvent: {}, action: 'opened' } })).to.be.false; - }); - }); - - suite('Test handler running', () => { - let verifyEmailStub; - let createCheckStub; - let repoFuncStub; - let pullRequestFuncStub; - let listCommitsStub; - let updateCheckStub; - - let fakeContext; - - const fakeSha = '#f54dda543@'; - const fakeCheckId = 13; - const fakePRNumber = 66; - const fakeOwner = 'jonDoe'; - const fakeRepository = 'aProject'; - const fakeCommitUrl = `https://fake.commit.url/${fakeSha}`; - const fakeAuthorName = 'Elias Author'; - const fakeAuthorEmail = 'elias.author@fake.mail'; - const fakeCommitterName = 'Ezekiel Committer'; - const fakeCommitterEmail = 'ezekiel.committer@fake.mail'; - const fakeUnknownName = 'Some Other'; - const fakeUnknownEmail = 'some.other@email.address'; - const fakeBotName = 'dependabot[bot]'; - const fakeBotEmail = '49699333+dependabot[bot]@users.noreply.github.com'; - - // expected objects - const expectedCreateCheckRunInfo = { - owner: fakeOwner, - repo: fakeRepository, - head_sha: fakeSha, - name: sinon.match.string, - details_url: sinon.match(u => new URL(u)), - started_at: sinon.match(t => Date.parse(t)), - status: 'in_progress' - }; - const baseExpectedUpdateCheck = { - owner: fakeOwner, - repo: fakeRepository, - check_run_id: fakeCheckId, - name: sinon.match.string, - details_url: sinon.match(u => new URL(u)), - started_at: sinon.match(t => Date.parse(t)), - status: 'completed', - completed_at: sinon.match(t => Date.parse(t)), - }; - const successExpectedUpdateCheck = { - ...baseExpectedUpdateCheck, - conclusion: 'success', - output: { - title: 'Well Done!', - summary: 'All commits are signed' - } - }; - const failureExpectedUpdateCheck = { - ...baseExpectedUpdateCheck, - conclusion: 'failure', - output: { - title: 'Found 1 unsigned commits', - summary: 'We need to get the these commits signed', - text: `- ${fakeCommitUrl}` - } - }; - const apiFailExpectedUpdateCheck = { - ...baseExpectedUpdateCheck, - conclusion: 'failure', - output: { - title: 'No commits found', - summary: 'Unable to fetch commits from GH API' - } - }; - const baseCommitObject = { - html_url: fakeCommitUrl, - commit: { - author: { - name: fakeAuthorName, - email: fakeAuthorEmail - }, - committer: { - name: fakeCommitterName, - email: fakeCommitterEmail - } - - } - }; - const commitUnsignedBot = { - html_url: fakeCommitUrl, - commit: { - message: 'this commit is not signed', - author: { - name: fakeBotName, - email: fakeBotEmail - }, - committer: { - name: fakeBotName, - email: fakeBotEmail - } - - } - }; - - // function responses - const createCheckResponse = { data: { id: fakeCheckId } }; - const getRepositoryInfoResponse = { owner: fakeOwner, repo: fakeRepository }; - const getPullRequestInfoResponse = { ...getRepositoryInfoResponse ,pull_number: fakePRNumber }; - - // commit objects - const commitSignedByAuthor = cloneDeep(baseCommitObject); - commitSignedByAuthor.commit.message = `this is a commit signed by the author${EOL}${EOL}Signed-off-by: ${fakeAuthorName} <${fakeAuthorEmail}>`; - - const commitSignedByCommitter = cloneDeep(baseCommitObject); - commitSignedByCommitter.commit.message = `this is a commit signed by the committer${EOL}${EOL}Signed-off-by: ${fakeCommitterName} <${fakeCommitterEmail}>`; - - const commitSignedByUnknown = cloneDeep(baseCommitObject); - commitSignedByUnknown.commit.message = `this is a commit signed by an unknown${EOL}${EOL}Signed-off-by: ${fakeUnknownName} <${fakeUnknownEmail}>`; - - const commitUnsigned = cloneDeep(baseCommitObject); - commitUnsigned.commit.message = 'this commit is not signed'; - - beforeEach(() => { - sinon.restore(); // unwrap any previous wrapped sinon objects - - createCheckStub = sinon.stub(); // stub for context.octokit.checks.create function to short-circuit return the expected response - createCheckStub.resolves(createCheckResponse); - updateCheckStub = sinon.stub(); // stub for context.octokit.checks.update function - updateCheckStub.resolves(); - listCommitsStub = sinon.stub(); // stub for context.octokit.rest.pulls.listCommits function - repoFuncStub = sinon.stub(); // stub for context.repo function to short-circuit return the expected response - repoFuncStub.callsFake((a) => {return { ...getRepositoryInfoResponse, ...a }}); - pullRequestFuncStub = sinon.stub(); //stub for context.pullRequest function to short-circuit return the expected response - pullRequestFuncStub.callsFake((a) => {return { ...getPullRequestInfoResponse, ...a }}); - verifyEmailStub = sinon.stub(); // stub for the email verifier module - // create a fake context for invoking the application with) - fakeContext = { - payload: { - pull_request: { - head: { - sha: fakeSha - }, - number: fakePRNumber - }, - sender: { - type: 'User' - } - }, - octokit: { - checks: { - create: createCheckStub, - update: updateCheckStub - }, - rest: { - pulls: { - listCommits: listCommitsStub - } - } - }, - repo: repoFuncStub, - pullRequest: pullRequestFuncStub - }; - - // inject the handler with a fake stubbed email verify tool - let emailVerifierFake = sinon.fake(); - emailVerifierFake.verify = verifyEmailStub; - emailVerifierFake.verifyCodes = emailVerifier.verifyCodes; - sut.__set__('emailVerifier', emailVerifierFake); - }); - - [ - { - testTitle: 'Test with one commit signed by the author', - signedEmail: fakeAuthorEmail, - stubCommitsList: {status: 200, data: [commitSignedByAuthor]}, - }, - { - testTitle: 'Test with one commit signed by the committer', - signedEmail: fakeCommitterEmail, - stubCommitsList: {status: 200, data: [commitSignedByCommitter]}, - }, - { - testTitle: 'Test with two commits signed by the author', - signedEmail: fakeAuthorEmail, - stubCommitsList: {status: 200, data: [commitSignedByAuthor, commitSignedByAuthor]}, - }, - ].forEach(testCase => { - test(`${testCase.testTitle}, expect a successful check run`, async () => { - // stub the verifyEmail function to return a successful verifications - verifyEmailStub - .withArgs(testCase.signedEmail, sinon.match.func) - .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); - // given the list commits service will resolve to the stubbed response - listCommitsStub.resolves(testCase.stubCommitsList); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); - }) - }); - - [ - { - testTitle: 'Test with one commit signed by someone else (not author/committer)', - stubCommitsList: {status: 200, data: [commitSignedByUnknown]}, - }, - { - testTitle: 'Test with one unsigned commit', - stubCommitsList: {status: 200, data: [commitUnsigned]}, - } - ].forEach(testCase => { - test(`${testCase.testTitle}, expect a failed check run`, async () => { - // given the list commits service will resolve to the stubbed response - listCommitsStub.resolves(testCase.stubCommitsList); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(failureExpectedUpdateCheck); - expect(verifyEmailStub).to.have.not.been.called; - }) - }); - - test('Test with two commits, one unsigned and one signed by the author, expect a failed check run', async () => { - // stub the verifyEmail function to return a successful verifications - verifyEmailStub - .withArgs(fakeAuthorEmail, sinon.match.func) - .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); - // given the list commits service will resolve to the stubbed response - listCommitsStub.resolves({status: 200, data: [commitUnsigned, commitSignedByAuthor]}); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(failureExpectedUpdateCheck); - }); - - [ - { - name: 'SMTPConnectionError', - code: emailVerifier.verifyCodes.SMTPConnectionError - }, - { - name: 'SMTPConnectionTimeout', - code: emailVerifier.verifyCodes.SMTPConnectionTimeout - }, - { - name: 'domainNotFound', - code: emailVerifier.verifyCodes.domainNotFound - }, - { - name: 'invalidEmailStructure', - code: emailVerifier.verifyCodes.invalidEmailStructure - }, - { - name: 'noMxRecords', - code: emailVerifier.verifyCodes.noMxRecords - }, - ].forEach(testCase => { - test(`Test with one commit signed by the author, with a ${testCase.name} service error, expect a failed check run`, async () => { - // stub the verifyEmail function to return a successful verifications - verifyEmailStub - .withArgs(fakeAuthorEmail, sinon.match.func) - .yields(null, { code: testCase.code }); - // given the list commits service will resolve to the stubbed response - listCommitsStub.resolves({status: 200, data: [commitSignedByAuthor]}); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(failureExpectedUpdateCheck); - }) - }); - - test('Test with one commit signed by a Bot, not author or committer, expect a successful check run', async () => { - // stub the verifyEmail function to return a successful verifications - verifyEmailStub - .withArgs(fakeBotEmail, sinon.match.func) - .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); - // given the list commits service will resolve to one commit signed by an unknown user - listCommitsStub.resolves({status: 200, data: [commitUnsignedBot]}); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); - }) - - test('Test with two commits, one is unsigned by bot, and one signed by author, expect a successful check run', async () => { - // stub the verifyEmail function to return a successful verifications - verifyEmailStub - .withArgs(fakeBotEmail, sinon.match.func) - .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); - // given the list commits service will resolve to one commit signed by an unknown user - listCommitsStub.resolves({status: 200, data: [commitUnsignedBot, commitSignedByAuthor]}); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); - }); - - [ - { - name: 'email', - conf: {ignore: {emails: [fakeAuthorEmail]}} - }, - { - name: 'user name', - conf: {ignore: {users: [fakeAuthorName]}} - } - ].forEach(testCase => { - test(`Test ignored ${testCase.name} is ignored, expect a successful check run`, async () => { - // stub the verifyEmail function to return a successful verifications - verifyEmailStub - .withArgs(fakeBotEmail, sinon.match.func) - .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); - // given the list commits service will resolve to one commit signed by an unknown user - listCommitsStub.resolves({status: 200, data: [commitSignedByAuthor]}); - // when invoking the handler with the fake context, a fake config, and a iso timestamp - await sut.run(fakeContext, testCase.conf, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); - }) - }); - - test('Test with listCommits API endpoint response not successful, expect a report indicating a possible API error', async () => { - // given the list commits service will resolve to one commit signed by an unknown user - listCommitsStub.resolves({status: 300, message: 'this is my message'}); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(apiFailExpectedUpdateCheck); - }); - - test('Test with listCommits API response endpoint promise rejection, expect a report indicating a possible API error', async () => { - // given the list commits service will resolve to one commit signed by an unknown user - listCommitsStub.rejects('because I said so'); - // when invoking the handler with the fake context, no config, and a iso timestamp - await sut.run(fakeContext, undefined, new Date().toISOString()); - // then verify a check run to be created and updated as expected - expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); - expect(updateCheckStub).to.have.been.calledOnceWith(apiFailExpectedUpdateCheck); - }); - }); -}); +// const chai = require('chai'); +// const emailVerifier = require('@digitalroute/email-verify'); +// const rewire = require('rewire'); +// const sinon = require('sinon'); +// const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ +// const { cloneDeep } = require('lodash'); +// const { EOL } = require('os'); +// +// chai.use(require('sinon-chai')); +// +// const expect = chai.expect; +// const sut = rewire('../../src/handlers/pr-signed-commits'); +// +// suite('Testing the pr-signed-commits handler', () => { +// suite('Test handler matching', () => { +// ['opened', 'edited', 'synchronize'].forEach(action => { +// test(`Test pull_request event type with ${action} action type, expect a match` , () => { +// expect(sut.match({ payload: { pull_request: {}, action: action } })).to.be.true; +// }); +// }); +// +// test('Test pull_request event type with an unknown action type, expect a false match' , () => { +// expect(sut.match({ payload: { pull_request: {}, action: 'unknownAction' } })).to.be.false; +// }); +// +// test('Test an unknown event type, expect a false match', () => { +// expect(sut.match({ payload: { unknownEvent: {}, action: 'opened' } })).to.be.false; +// }); +// }); +// +// suite('Test handler running', () => { +// let verifyEmailStub; +// let createCheckStub; +// let repoFuncStub; +// let pullRequestFuncStub; +// let listCommitsStub; +// let updateCheckStub; +// +// let fakeContext; +// +// const fakeSha = '#f54dda543@'; +// const fakeCheckId = 13; +// const fakePRNumber = 66; +// const fakeOwner = 'jonDoe'; +// const fakeRepository = 'aProject'; +// const fakeCommitUrl = `https://fake.commit.url/${fakeSha}`; +// const fakeAuthorName = 'Elias Author'; +// const fakeAuthorEmail = 'elias.author@fake.mail'; +// const fakeCommitterName = 'Ezekiel Committer'; +// const fakeCommitterEmail = 'ezekiel.committer@fake.mail'; +// const fakeUnknownName = 'Some Other'; +// const fakeUnknownEmail = 'some.other@email.address'; +// const fakeBotName = 'dependabot[bot]'; +// const fakeBotEmail = '49699333+dependabot[bot]@users.noreply.github.com'; +// +// // expected objects +// const expectedCreateCheckRunInfo = { +// owner: fakeOwner, +// repo: fakeRepository, +// head_sha: fakeSha, +// name: sinon.match.string, +// details_url: sinon.match(u => new URL(u)), +// started_at: sinon.match(t => Date.parse(t)), +// status: 'in_progress' +// }; +// const baseExpectedUpdateCheck = { +// owner: fakeOwner, +// repo: fakeRepository, +// check_run_id: fakeCheckId, +// name: sinon.match.string, +// details_url: sinon.match(u => new URL(u)), +// started_at: sinon.match(t => Date.parse(t)), +// status: 'completed', +// completed_at: sinon.match(t => Date.parse(t)), +// }; +// const successExpectedUpdateCheck = { +// ...baseExpectedUpdateCheck, +// conclusion: 'success', +// output: { +// title: 'Well Done!', +// summary: 'All commits are signed' +// } +// }; +// const failureExpectedUpdateCheck = { +// ...baseExpectedUpdateCheck, +// conclusion: 'failure', +// output: { +// title: 'Found 1 unsigned commits', +// summary: 'We need to get the these commits signed', +// text: `- ${fakeCommitUrl}` +// } +// }; +// const apiFailExpectedUpdateCheck = { +// ...baseExpectedUpdateCheck, +// conclusion: 'failure', +// output: { +// title: 'No commits found', +// summary: 'Unable to fetch commits from GH API' +// } +// }; +// const baseCommitObject = { +// html_url: fakeCommitUrl, +// commit: { +// author: { +// name: fakeAuthorName, +// email: fakeAuthorEmail +// }, +// committer: { +// name: fakeCommitterName, +// email: fakeCommitterEmail +// } +// +// } +// }; +// const commitUnsignedBot = { +// html_url: fakeCommitUrl, +// commit: { +// message: 'this commit is not signed', +// author: { +// name: fakeBotName, +// email: fakeBotEmail +// }, +// committer: { +// name: fakeBotName, +// email: fakeBotEmail +// } +// +// } +// }; +// +// // function responses +// const createCheckResponse = { data: { id: fakeCheckId } }; +// const getRepositoryInfoResponse = { owner: fakeOwner, repo: fakeRepository }; +// const getPullRequestInfoResponse = { ...getRepositoryInfoResponse ,pull_number: fakePRNumber }; +// +// // commit objects +// const commitSignedByAuthor = cloneDeep(baseCommitObject); +// commitSignedByAuthor.commit.message = `this is a commit signed by the author${EOL}${EOL}Signed-off-by: ${fakeAuthorName} <${fakeAuthorEmail}>`; +// +// const commitSignedByCommitter = cloneDeep(baseCommitObject); +// commitSignedByCommitter.commit.message = `this is a commit signed by the committer${EOL}${EOL}Signed-off-by: ${fakeCommitterName} <${fakeCommitterEmail}>`; +// +// const commitSignedByUnknown = cloneDeep(baseCommitObject); +// commitSignedByUnknown.commit.message = `this is a commit signed by an unknown${EOL}${EOL}Signed-off-by: ${fakeUnknownName} <${fakeUnknownEmail}>`; +// +// const commitUnsigned = cloneDeep(baseCommitObject); +// commitUnsigned.commit.message = 'this commit is not signed'; +// +// beforeEach(() => { +// sinon.restore(); // unwrap any previous wrapped sinon objects +// +// createCheckStub = sinon.stub(); // stub for context.octokit.checks.create function to short-circuit return the expected response +// createCheckStub.resolves(createCheckResponse); +// updateCheckStub = sinon.stub(); // stub for context.octokit.checks.update function +// updateCheckStub.resolves(); +// listCommitsStub = sinon.stub(); // stub for context.octokit.rest.pulls.listCommits function +// repoFuncStub = sinon.stub(); // stub for context.repo function to short-circuit return the expected response +// repoFuncStub.callsFake((a) => {return { ...getRepositoryInfoResponse, ...a }}); +// pullRequestFuncStub = sinon.stub(); //stub for context.pullRequest function to short-circuit return the expected response +// pullRequestFuncStub.callsFake((a) => {return { ...getPullRequestInfoResponse, ...a }}); +// verifyEmailStub = sinon.stub(); // stub for the email verifier module +// // create a fake context for invoking the application with) +// fakeContext = { +// payload: { +// pull_request: { +// head: { +// sha: fakeSha +// }, +// number: fakePRNumber +// }, +// sender: { +// type: 'User' +// } +// }, +// octokit: { +// checks: { +// create: createCheckStub, +// update: updateCheckStub +// }, +// rest: { +// pulls: { +// listCommits: listCommitsStub +// } +// } +// }, +// repo: repoFuncStub, +// pullRequest: pullRequestFuncStub +// }; +// +// // inject the handler with a fake stubbed email verify tool +// let emailVerifierFake = sinon.fake(); +// emailVerifierFake.verify = verifyEmailStub; +// emailVerifierFake.verifyCodes = emailVerifier.verifyCodes; +// sut.__set__('emailVerifier', emailVerifierFake); +// }); +// +// [ +// { +// testTitle: 'Test with one commit signed by the author', +// signedEmail: fakeAuthorEmail, +// stubCommitsList: {status: 200, data: [commitSignedByAuthor]}, +// }, +// { +// testTitle: 'Test with one commit signed by the committer', +// signedEmail: fakeCommitterEmail, +// stubCommitsList: {status: 200, data: [commitSignedByCommitter]}, +// }, +// { +// testTitle: 'Test with two commits signed by the author', +// signedEmail: fakeAuthorEmail, +// stubCommitsList: {status: 200, data: [commitSignedByAuthor, commitSignedByAuthor]}, +// }, +// ].forEach(testCase => { +// test(`${testCase.testTitle}, expect a successful check run`, async () => { +// // stub the verifyEmail function to return a successful verifications +// verifyEmailStub +// .withArgs(testCase.signedEmail, sinon.match.func) +// .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); +// // given the list commits service will resolve to the stubbed response +// listCommitsStub.resolves(testCase.stubCommitsList); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); +// }) +// }); +// +// [ +// { +// testTitle: 'Test with one commit signed by someone else (not author/committer)', +// stubCommitsList: {status: 200, data: [commitSignedByUnknown]}, +// }, +// { +// testTitle: 'Test with one unsigned commit', +// stubCommitsList: {status: 200, data: [commitUnsigned]}, +// } +// ].forEach(testCase => { +// test(`${testCase.testTitle}, expect a failed check run`, async () => { +// // given the list commits service will resolve to the stubbed response +// listCommitsStub.resolves(testCase.stubCommitsList); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(failureExpectedUpdateCheck); +// expect(verifyEmailStub).to.have.not.been.called; +// }) +// }); +// +// test('Test with two commits, one unsigned and one signed by the author, expect a failed check run', async () => { +// // stub the verifyEmail function to return a successful verifications +// verifyEmailStub +// .withArgs(fakeAuthorEmail, sinon.match.func) +// .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); +// // given the list commits service will resolve to the stubbed response +// listCommitsStub.resolves({status: 200, data: [commitUnsigned, commitSignedByAuthor]}); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(failureExpectedUpdateCheck); +// }); +// +// [ +// { +// name: 'SMTPConnectionError', +// code: emailVerifier.verifyCodes.SMTPConnectionError +// }, +// { +// name: 'SMTPConnectionTimeout', +// code: emailVerifier.verifyCodes.SMTPConnectionTimeout +// }, +// { +// name: 'domainNotFound', +// code: emailVerifier.verifyCodes.domainNotFound +// }, +// { +// name: 'invalidEmailStructure', +// code: emailVerifier.verifyCodes.invalidEmailStructure +// }, +// { +// name: 'noMxRecords', +// code: emailVerifier.verifyCodes.noMxRecords +// }, +// ].forEach(testCase => { +// test(`Test with one commit signed by the author, with a ${testCase.name} service error, expect a failed check run`, async () => { +// // stub the verifyEmail function to return a successful verifications +// verifyEmailStub +// .withArgs(fakeAuthorEmail, sinon.match.func) +// .yields(null, { code: testCase.code }); +// // given the list commits service will resolve to the stubbed response +// listCommitsStub.resolves({status: 200, data: [commitSignedByAuthor]}); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(failureExpectedUpdateCheck); +// }) +// }); +// +// test('Test with one commit signed by a Bot, not author or committer, expect a successful check run', async () => { +// // stub the verifyEmail function to return a successful verifications +// verifyEmailStub +// .withArgs(fakeBotEmail, sinon.match.func) +// .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); +// // given the list commits service will resolve to one commit signed by an unknown user +// listCommitsStub.resolves({status: 200, data: [commitUnsignedBot]}); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); +// }) +// +// test('Test with two commits, one is unsigned by bot, and one signed by author, expect a successful check run', async () => { +// // stub the verifyEmail function to return a successful verifications +// verifyEmailStub +// .withArgs(fakeBotEmail, sinon.match.func) +// .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); +// // given the list commits service will resolve to one commit signed by an unknown user +// listCommitsStub.resolves({status: 200, data: [commitUnsignedBot, commitSignedByAuthor]}); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); +// }); +// +// [ +// { +// name: 'email', +// conf: {ignore: {emails: [fakeAuthorEmail]}} +// }, +// { +// name: 'user name', +// conf: {ignore: {users: [fakeAuthorName]}} +// } +// ].forEach(testCase => { +// test(`Test ignored ${testCase.name} is ignored, expect a successful check run`, async () => { +// // stub the verifyEmail function to return a successful verifications +// verifyEmailStub +// .withArgs(fakeBotEmail, sinon.match.func) +// .yields(null, { code: emailVerifier.verifyCodes.finishedVerification }); +// // given the list commits service will resolve to one commit signed by an unknown user +// listCommitsStub.resolves({status: 200, data: [commitSignedByAuthor]}); +// // when invoking the handler with the fake context, a fake config, and a iso timestamp +// await sut.run(fakeContext, testCase.conf, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(successExpectedUpdateCheck); +// }) +// }); +// +// test('Test with listCommits API endpoint response not successful, expect a report indicating a possible API error', async () => { +// // given the list commits service will resolve to one commit signed by an unknown user +// listCommitsStub.resolves({status: 300, message: 'this is my message'}); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(apiFailExpectedUpdateCheck); +// }); +// +// test('Test with listCommits API response endpoint promise rejection, expect a report indicating a possible API error', async () => { +// // given the list commits service will resolve to one commit signed by an unknown user +// listCommitsStub.rejects('because I said so'); +// // when invoking the handler with the fake context, no config, and a iso timestamp +// await sut.run(fakeContext, undefined, new Date().toISOString()); +// // then verify a check run to be created and updated as expected +// expect(createCheckStub).to.have.been.calledOnceWith(expectedCreateCheckRunInfo); +// expect(updateCheckStub).to.have.been.calledOnceWith(apiFailExpectedUpdateCheck); +// }); +// }); +// }); diff --git a/tests/handlers/pr-tasks-list.test.js b/tests/handlers/pr-tasks-list.test.js index 98cbe8f6..a62700bb 100644 --- a/tests/handlers/pr-tasks-list.test.js +++ b/tests/handlers/pr-tasks-list.test.js @@ -1,13 +1,12 @@ -const chai = require('chai'); -const sinon = require('sinon'); -const { beforeEach } = require('mocha'); /* eslint-disable-line no-redeclare */ +import chai, { expect } from 'chai' +import sinonChai from 'sinon-chai' +import sinon from 'sinon' +import { beforeEach } from 'mocha' +import { EOL } from 'node:os' -chai.use(require('sinon-chai')); +chai.use(sinonChai) -const expect = chai.expect; -const sut = require('../../src/handlers/pr-tasks-list'); - -const EOL = require('os').EOL; +import sut from '../../src/handlers/pr-tasks-list.js' suite('Testing the pr-tasks-list handler', () => { suite('Test handler matching', () => {