From eeb4fe66873e9d3191ef0e975e491a8d14460859 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 19:17:26 -0700 Subject: [PATCH 1/8] refactor: use esm patterns --- .github/dependabot.yml | 5 + .mocharc.json | 3 - package-lock.json | 2422 +++++++++++++---- package.json | 10 +- src/get-sha.js | 4 +- src/health-score.js | 75 +- src/helpers/helper-functions.js | 83 +- src/index.js | 4 +- src/report.js | 8 +- src/score_components/coverage.js | 8 +- .../find-problematic-comments.js | 8 +- src/types.js | 2 +- test/health-score-test.js | 304 ++- test/helpers/helpers-test.js | 124 +- test/score_components/coverage-test.js | 242 +- .../problematic-comments-test.js | 261 +- test/stubs/stubs.js | 24 - vitest.config.js | 14 + 18 files changed, 2507 insertions(+), 1094 deletions(-) delete mode 100644 .mocharc.json delete mode 100644 test/stubs/stubs.js create mode 100644 vitest.config.js diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 17c1c35..610757a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,11 @@ updates: schedule: interval: "monthly" versioning-strategy: increase + groups: + vitest: + patterns: + - "@vitest/coverage-v8" + - "vitest" - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.mocharc.json b/.mocharc.json deleted file mode 100644 index b64f84b..0000000 --- a/.mocharc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "timeout": 3000 -} diff --git a/package-lock.json b/package-lock.json index 2ec39a5..0342e0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,10 +17,8 @@ "devDependencies": { "@biomejs/biome": "1.9.4", "@vercel/ncc": "^0.38.3", - "c8": "^10.1.3", - "chai": "^5.2.0", - "mocha": "^11.7.1", - "sinon": "^21.0.0" + "@vitest/coverage-v8": "^3.2.4", + "vitest": "^3.2.4" }, "engines": { "node": ">=20.0.0", @@ -197,6 +195,20 @@ "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==" }, + "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, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@api/codecov": { "resolved": ".api/apis/codecov", "link": true @@ -243,10 +255,21 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -329,6 +352,22 @@ "node": ">=4" } }, + "node_modules/@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/runtime": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.1.tgz", @@ -338,11 +377,26 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/types": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@bcoe/v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.1.tgz", - "integrity": "sha512-W+a0/JpU28AqH4IKtwUPcEUnUyXMDLALcn5/JLczGGT9fHE2sIby/xP/oQnx3nxkForzgzPy201RAKcB4xPAFQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" } @@ -511,177 +565,631 @@ "node": ">=14.21.3" } }, - "node_modules/@exodus/schemasafe": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", - "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==" - }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz", + "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=14" + "node": ">=18" } }, - "node_modules/@humanwhocodes/momoa": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", - "integrity": "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==", + "node_modules/@esbuild/android-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz", + "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=10.10.0" + "node": ">=18" } }, - "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==", + "node_modules/@esbuild/android-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz", + "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "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" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=12" + "node": ">=18" } }, - "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==", + "node_modules/@esbuild/android-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz", + "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==", + "cpu": [ + "x64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=18" } }, - "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==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz", + "integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=18" } }, - "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==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz", + "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "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==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz", + "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=18" } }, - "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==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz", + "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=18" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "node_modules/@esbuild/linux-arm": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz", + "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==", + "cpu": [ + "arm" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz", + "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz", + "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, - "node_modules/@jsep-plugin/assignment": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", - "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 10.16.0" - }, - "peerDependencies": { - "jsep": "^0.4.0||^1.0.0" + "node": ">=18" } }, - "node_modules/@jsep-plugin/regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz", + "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz", + "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz", + "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz", + "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz", + "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz", + "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz", + "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz", + "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz", + "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz", + "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz", + "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz", + "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz", + "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz", + "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz", + "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==" + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@humanwhocodes/momoa": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", + "integrity": "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==", + "engines": { + "node": ">=10.10.0" + } + }, + "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": { + "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": ">=12" + } + }, + "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, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "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, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "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": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "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": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" + }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", "license": "MIT", "engines": { @@ -1144,64 +1652,305 @@ "resolved": "https://registry.npmjs.org/@readme/openapi-schemas/-/openapi-schemas-3.1.0.tgz", "integrity": "sha512-9FC/6ho8uFa8fV50+FPy/ngWN53jaUu4GRXlAjcxIRrzhltJnpKkBG2Tp0IDraFJeWrOpk84RJ9EMEEYzaI1Bw==", "license": "MIT", - "engines": { - "node": ">=18" - } + "engines": { + "node": ">=18" + } + }, + "node_modules/@readme/postman-to-openapi": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@readme/postman-to-openapi/-/postman-to-openapi-4.1.0.tgz", + "integrity": "sha512-VvV2Hzjskz01m8doSn7Ypt6cSZzgjnypVqXy1ipThbyYD6SGiM74VSePXykOODj/43Y2m6zeYedPk/ZLts/HvQ==", + "dependencies": { + "@readme/http-status-codes": "^7.2.0", + "js-yaml": "^4.1.0", + "jsonc-parser": "3.2.0", + "lodash.camelcase": "^4.3.0", + "marked": "^4.3.0", + "mustache": "^4.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz", + "integrity": "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.2.tgz", + "integrity": "sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.2.tgz", + "integrity": "sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.2.tgz", + "integrity": "sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.2.tgz", + "integrity": "sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.2.tgz", + "integrity": "sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.2.tgz", + "integrity": "sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.2.tgz", + "integrity": "sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.2.tgz", + "integrity": "sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.2.tgz", + "integrity": "sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.2.tgz", + "integrity": "sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.2.tgz", + "integrity": "sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.2.tgz", + "integrity": "sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.2.tgz", + "integrity": "sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.2.tgz", + "integrity": "sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@readme/postman-to-openapi": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@readme/postman-to-openapi/-/postman-to-openapi-4.1.0.tgz", - "integrity": "sha512-VvV2Hzjskz01m8doSn7Ypt6cSZzgjnypVqXy1ipThbyYD6SGiM74VSePXykOODj/43Y2m6zeYedPk/ZLts/HvQ==", - "dependencies": { - "@readme/http-status-codes": "^7.2.0", - "js-yaml": "^4.1.0", - "jsonc-parser": "3.2.0", - "lodash.camelcase": "^4.3.0", - "marked": "^4.3.0", - "mustache": "^4.2.0" - }, - "engines": { - "node": ">=14" - } + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.2.tgz", + "integrity": "sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.2.tgz", + "integrity": "sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/@sinonjs/fake-timers": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", - "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.2.tgz", + "integrity": "sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" - } + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/@sinonjs/samsam": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz", - "integrity": "sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==", + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.2.tgz", + "integrity": "sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "lodash.get": "^4.4.2", - "type-detect": "^4.1.0" - } + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/@sinonjs/samsam/node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.2.tgz", + "integrity": "sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg==", + "cpu": [ + "x64" + ], "dev": true, - "engines": { - "node": ">=4" - } + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, "node_modules/@ts-morph/common": { "version": "0.18.1", @@ -1225,17 +1974,35 @@ "node": ">=10" } }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/har-format": { "version": "1.2.15", "resolved": "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.15.tgz", "integrity": "sha512-RpQH4rXLuvTXKR0zqHq3go0RVXYv/YVqv4TnPH95VbwUxZdQlK1EtcMvQvMpDngHbt13Csh9Z4qT9AbkiQH5BA==" }, - "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/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -1251,6 +2018,128 @@ "ncc": "dist/ncc/cli.js" } }, + "node_modules/@vitest/coverage-v8": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.4.tgz", + "integrity": "sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@bcoe/v8-coverage": "^1.0.2", + "ast-v8-to-istanbul": "^0.3.3", + "debug": "^4.4.1", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.17", + "magicast": "^0.3.5", + "std-env": "^3.9.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "3.2.4", + "vitest": "3.2.4" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -1371,6 +2260,25 @@ "node": ">=12" } }, + "node_modules/ast-v8-to-istanbul": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.3.tgz", + "integrity": "sha512-MuXMrSLVVoA6sYN/6Hke18vMzrT4TZNbZIj/hvh0fnYFpO+/kFXcLIaiPwXXWaQUPg4yJD8fj+lfJ7/1EBconw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "estree-walker": "^3.0.3", + "js-tokens": "^9.0.1" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1430,12 +2338,6 @@ "node": ">=8" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -1459,37 +2361,14 @@ "ieee754": "^1.1.13" } }, - "node_modules/c8": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.3.tgz", - "integrity": "sha512-LvcyrOAaOnrrlMpW22n690PUvxiq4Uf9WMhQwNJ9vgagkL/ph1+D4uvjvDA5XCbykrc0sx+ay6pVi9YZ1GnhyA==", + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^1.0.1", - "@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" - }, + "license": "MIT", "engines": { - "node": ">=18" - }, - "peerDependencies": { - "monocart-coverage-reports": "^2" - }, - "peerDependenciesMeta": { - "monocart-coverage-reports": { - "optional": true - } + "node": ">=8" } }, "node_modules/call-bind": { @@ -1562,22 +2441,6 @@ "node": ">= 16" } }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -1724,12 +2587,13 @@ } }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1788,16 +2652,6 @@ "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, - "node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1828,6 +2682,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -1881,6 +2742,48 @@ "es6-symbol": "^3.1.1" } }, + "node_modules/esbuild": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz", + "integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.8", + "@esbuild/android-arm": "0.25.8", + "@esbuild/android-arm64": "0.25.8", + "@esbuild/android-x64": "0.25.8", + "@esbuild/darwin-arm64": "0.25.8", + "@esbuild/darwin-x64": "0.25.8", + "@esbuild/freebsd-arm64": "0.25.8", + "@esbuild/freebsd-x64": "0.25.8", + "@esbuild/linux-arm": "0.25.8", + "@esbuild/linux-arm64": "0.25.8", + "@esbuild/linux-ia32": "0.25.8", + "@esbuild/linux-loong64": "0.25.8", + "@esbuild/linux-mips64el": "0.25.8", + "@esbuild/linux-ppc64": "0.25.8", + "@esbuild/linux-riscv64": "0.25.8", + "@esbuild/linux-s390x": "0.25.8", + "@esbuild/linux-x64": "0.25.8", + "@esbuild/netbsd-arm64": "0.25.8", + "@esbuild/netbsd-x64": "0.25.8", + "@esbuild/openbsd-arm64": "0.25.8", + "@esbuild/openbsd-x64": "0.25.8", + "@esbuild/openharmony-arm64": "0.25.8", + "@esbuild/sunos-x64": "0.25.8", + "@esbuild/win32-arm64": "0.25.8", + "@esbuild/win32-ia32": "0.25.8", + "@esbuild/win32-x64": "0.25.8" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -1889,18 +2792,6 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/escodegen": { "version": "1.14.3", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", @@ -1971,6 +2862,16 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -2011,6 +2912,16 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/expect-type": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", @@ -2159,37 +3070,12 @@ "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", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, "node_modules/foreground-child": { @@ -2237,6 +3123,21 @@ "node": ">= 12.20" } }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2370,15 +3271,6 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -2480,15 +3372,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", @@ -2580,6 +3463,21 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", @@ -2741,21 +3639,6 @@ "node": ">= 0.8.0" } }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -2766,12 +3649,6 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -2788,9 +3665,9 @@ } }, "node_modules/loupe": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", - "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.0.tgz", + "integrity": "sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==", "dev": true, "license": "MIT" }, @@ -2811,6 +3688,28 @@ "es5-ext": "~0.10.2" } }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -2934,67 +3833,12 @@ "node": ">=10" } }, - "node_modules/mocha": { - "version": "11.7.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.1.tgz", - "integrity": "sha512-5EK+Cty6KheMS/YLPPMJC64g5V61gIR25KsRItHw6x4hEKT6Njp1n9LOlH4gpevuwMVS66SXaBBpg+RWZkza4A==", - "dev": true, - "dependencies": { - "browser-stdout": "^1.3.1", - "chokidar": "^4.0.1", - "debug": "^4.3.5", - "diff": "^7.0.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^9.0.5", - "ms": "^2.1.3", - "picocolors": "^1.1.1", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^9.2.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/mocha/node_modules/ms": { + "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "license": "MIT" }, "node_modules/mustache": { "version": "4.2.0", @@ -3004,6 +3848,25 @@ "mustache": "bin/mustache" } }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/next-tick": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", @@ -3256,36 +4119,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -3343,6 +4176,13 @@ "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", "license": "MIT" }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, "node_modules/pathval": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", @@ -3429,6 +4269,35 @@ "node": ">=8" } }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -3490,15 +4359,6 @@ } ] }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -3512,20 +4372,6 @@ "node": ">= 6" } }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/reftools": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", @@ -3579,6 +4425,46 @@ "node": ">=0.10.0" } }, + "node_modules/rollup": { + "version": "4.46.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.2.tgz", + "integrity": "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.46.2", + "@rollup/rollup-android-arm64": "4.46.2", + "@rollup/rollup-darwin-arm64": "4.46.2", + "@rollup/rollup-darwin-x64": "4.46.2", + "@rollup/rollup-freebsd-arm64": "4.46.2", + "@rollup/rollup-freebsd-x64": "4.46.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.46.2", + "@rollup/rollup-linux-arm-musleabihf": "4.46.2", + "@rollup/rollup-linux-arm64-gnu": "4.46.2", + "@rollup/rollup-linux-arm64-musl": "4.46.2", + "@rollup/rollup-linux-loongarch64-gnu": "4.46.2", + "@rollup/rollup-linux-ppc64-gnu": "4.46.2", + "@rollup/rollup-linux-riscv64-gnu": "4.46.2", + "@rollup/rollup-linux-riscv64-musl": "4.46.2", + "@rollup/rollup-linux-s390x-gnu": "4.46.2", + "@rollup/rollup-linux-x64-gnu": "4.46.2", + "@rollup/rollup-linux-x64-musl": "4.46.2", + "@rollup/rollup-win32-arm64-msvc": "4.46.2", + "@rollup/rollup-win32-ia32-msvc": "4.46.2", + "@rollup/rollup-win32-x64-msvc": "4.46.2", + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -3628,15 +4514,6 @@ "semver": "bin/semver.js" } }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -3737,28 +4614,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, "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==" }, - "node_modules/sinon": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-21.0.0.tgz", - "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.5", - "@sinonjs/samsam": "^8.0.1", - "diff": "^7.0.0", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -3774,6 +4641,16 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ssri": { "version": "10.0.6", "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", @@ -3785,6 +4662,13 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, "node_modules/static-eval": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", @@ -3794,6 +4678,13 @@ "escodegen": "^1.8.1" } }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true, + "license": "MIT" + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -3862,18 +4753,26 @@ "node": ">=6" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", "dev": true, - "engines": { - "node": ">=8" + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/antfu" } }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3934,6 +4833,95 @@ "next-tick": "1" } }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3990,15 +4978,6 @@ "node": ">= 0.8.0" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/underscore": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", @@ -4027,26 +5006,6 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", - "dev": true, - "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/validate-npm-package-name": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", @@ -4087,6 +5046,365 @@ "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==" }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite-node/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vite-node/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vite-node/node_modules/vite": { + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node/node_modules/yaml": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, + "node_modules/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vitest/node_modules/vite": { + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/yaml": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -4136,6 +5454,23 @@ "node": ">= 8" } }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -4145,12 +5480,6 @@ "node": ">=0.10.0" } }, - "node_modules/workerpool": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.3.tgz", - "integrity": "sha512-slxCaKbYjEdFT/o2rH9xS1hf4uRDch1w7Uo+apxhZ+sf/1d9e0ZVkn42kPNGP2dgjIx6YFvSevj0zHvbWe2jdw==", - "dev": true - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -4233,57 +5562,6 @@ "engines": { "node": ">=12" } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/package.json b/package.json index e59b2a6..16d3f0c 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,14 @@ "version": "0.1.1", "description": "A rough health score reporter", "main": "dist/index.js", + "type": "module", "scripts": { "build": "ncc build src/index.js -o dist --license licenses.txt --source-map", "lint": "biome check .", "lint:fix": "biome check --write .", "local": "act public --eventpath .github/workflows/local/event.json --secret-file .github/workflows/local/.env --platform ubuntu-latest=node:20-buster", - "test": "npm run lint && c8 npm run test:mocha", + "test": "npm run lint && vitest run --coverage", + "test:watch": "vitest", "test:mocha": "mocha --config .mocharc.json test/*-test.js test/**/*-test.js" }, "repository": { @@ -41,9 +43,7 @@ "devDependencies": { "@biomejs/biome": "1.9.4", "@vercel/ncc": "^0.38.3", - "c8": "^10.1.3", - "chai": "^5.2.0", - "mocha": "^11.7.1", - "sinon": "^21.0.0" + "@vitest/coverage-v8": "^3.2.4", + "vitest": "^3.2.4" } } diff --git a/src/get-sha.js b/src/get-sha.js index 46ddbb5..e3a0350 100644 --- a/src/get-sha.js +++ b/src/get-sha.js @@ -4,7 +4,7 @@ * @param {import('@octokit/rest').Octokit} github `@octokit/actions` GitHub Actions core helper utility * @returns {string} SHA of the commit being inspected, regardless of underlying GitHub event */ -module.exports = function getCommitSHA(context, core, github) { +export default function getCommitSHA(context, core, github) { // Get GitHub-event-relevant contextual details, like commit SHA const ctx = context; core.info('attempt'); @@ -31,4 +31,4 @@ module.exports = function getCommitSHA(context, core, github) { } core.info(`Using SHA: ${sha}`); return sha; -}; +} diff --git a/src/health-score.js b/src/health-score.js index a64a27c..3c4c149 100644 --- a/src/health-score.js +++ b/src/health-score.js @@ -1,41 +1,40 @@ -const findProblematicComments = require('./score_components/find-problematic-comments'); -const retrieveCodeCoverage = require('./score_components/coverage'); -const reportStatus = require('./report'); -const { parseYamlArray } = require('./helpers/helper-functions'); +import { parseYamlArray } from './helpers/helper-functions.js'; +import reportStatus from './report.js'; +import retrieveCodeCoverage from './score_components/coverage.js'; +import findProblematicComments from './score_components/find-problematic-comments.js'; -module.exports = { - /** - * @description Compiles the health score components - * @param {Object} context Context of the workflow run - https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts - * @param {import('@actions/core')} core `@actions/core` GitHub Actions core helper utility - * @param {import('@actions/github')} github `@actions/github` GitHub Actions core helper utility - * @returns {Promise} score Health score details object - */ - compile: async function compileScore(context, core, github) { - // TODO: wire up action outputs - const extensionInput = core.getInput('extension'); - const includeInput = core.getInput('include'); - const excludeInput = core.getInput('exclude'); +/** + * @description Compiles the health score components + * @param {Object} context Context of the workflow run - https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts + * @param {import('@actions/core')} core `@actions/core` GitHub Actions core helper utility + * @param {import('@actions/github')} github `@actions/github` GitHub Actions core helper utility + * @returns {Promise} score Health score details object + */ +export async function compile(context, core, github) { + // TODO: wire up action outputs + const extensionInput = core.getInput('extension'); + const includeInput = core.getInput('include'); + const excludeInput = core.getInput('exclude'); - const extensions = parseYamlArray(extensionInput); - const includes = parseYamlArray(includeInput); - const excludes = parseYamlArray(excludeInput); + const extensions = parseYamlArray(extensionInput); + const includes = parseYamlArray(includeInput); + const excludes = parseYamlArray(excludeInput); - let com = ''; - const misses = await module.exports.coverage(context, core, github); // uncovered LoC - if (extensions.length === 0) { - core.error('Extensions not specified'); - } else { - if (includes.length === 0) - core.warning('Directories to be included not specified'); - com = module.exports.grep(core, extensions, includes, excludes); // to-do et al comments - } - return { - comments: com, - coverageMisses: misses, - }; - }, - grep: findProblematicComments, - coverage: retrieveCodeCoverage, - report: reportStatus, -}; + let com = ''; + const misses = await coverage(context, core, github); // uncovered LoC + if (extensions.length === 0) { + core.error('Extensions not specified'); + } else { + if (includes.length === 0) + core.warning('Directories to be included not specified'); + com = grep(core, extensions, includes, excludes); // to-do et al comments + } + return { + comments: com, + coverageMisses: misses, + }; +} + +export const grep = findProblematicComments; +export const coverage = retrieveCodeCoverage; +export const report = reportStatus; diff --git a/src/helpers/helper-functions.js b/src/helpers/helper-functions.js index 95676e3..50ea11d 100644 --- a/src/helpers/helper-functions.js +++ b/src/helpers/helper-functions.js @@ -1,43 +1,42 @@ -module.exports = { - /** - * - * @param input - * @returns [] - */ - parseYamlArray(input) { - if (!input) { - return []; - } - const arr = input.trim().replace(/\[|\]/g, ''); +/** + * + * @param input + * @returns [] + */ +export function parseYamlArray(input) { + if (!input) { + return []; + } + const arr = input.trim().replace(/\[|\]/g, ''); - return arr - .split(/,\s*|\n/) - .map((item) => item.trim().replace(/^- */, '')) - .filter(Boolean) - .map((item) => { - if ( - (item.startsWith('"') && item.endsWith('"')) || - (item.startsWith("'") && item.endsWith("'")) - ) { - return item.slice(1, -1); - } - return item; - }); - }, - /** - * - * @param comments - * @returns [] - */ - getAnnotations(comments) { - return comments.map((c) => ({ - path: c.path, - start_line: c.line_no ? c.line_no : 1, - end_line: c.line_no ? c.line_no : 1, - annotation_level: 'warning', - message: c.commentType - ? `Problematic comment ("${c.commentType}") identified` - : 'Problematic comment ("TODO", "HACK", "FIXME") identified', - })); - }, -}; + return arr + .split(/,\s*|\n/) + .map((item) => item.trim().replace(/^- */, '')) + .filter(Boolean) + .map((item) => { + if ( + (item.startsWith('"') && item.endsWith('"')) || + (item.startsWith("'") && item.endsWith("'")) + ) { + return item.slice(1, -1); + } + return item; + }); +} + +/** + * + * @param comments + * @returns [] + */ +export function getAnnotations(comments) { + return comments.map((c) => ({ + path: c.path, + start_line: c.line_no ? c.line_no : 1, + end_line: c.line_no ? c.line_no : 1, + annotation_level: 'warning', + message: c.commentType + ? `Problematic comment ("${c.commentType}") identified` + : 'Problematic comment ("TODO", "HACK", "FIXME") identified', + })); +} diff --git a/src/index.js b/src/index.js index 78bdef0..2a609fd 100644 --- a/src/index.js +++ b/src/index.js @@ -1,11 +1,11 @@ -const hs = require('./health-score'); +import * as hs from './health-score.js'; /** * @param {Object} context Context of the workflow run - https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts * @param {import('@actions/core')} core `@actions/core` GitHub Actions core helper utility * @param {import('@octokit/rest').Octokit} github `@octokit/rest` GitHub Actions client */ -module.exports = async (context, core, github) => { +export default async (context, core, github) => { const startTime = new Date(); core.debug = console.debug; hs.compile(context, core, github) diff --git a/src/report.js b/src/report.js index f4fabf4..05bce7b 100644 --- a/src/report.js +++ b/src/report.js @@ -1,5 +1,5 @@ -const getSHA = require('./get-sha'); -const { getAnnotations } = require('./helpers/helper-functions'); +import getSHA from './get-sha.js'; +import { getAnnotations } from './helpers/helper-functions.js'; const UNCOVERED_LINE_PENALTY = 1; const PROBLEMATIC_COMMENT_PENALTY = 100; @@ -11,7 +11,7 @@ const PROBLEMATIC_COMMENT_PENALTY = 100; * @param {import('./types').HealthScore} score The health score to be reported * @returns {Promise} Total calculated health score */ -module.exports = async function reportStatus( +export default async function reportStatus( context, startTime, core, @@ -79,4 +79,4 @@ According to [the code coverage for this project](https://app.codecov.io/gh/${ct core.error('Octokit checks creation call failed'); } return points; -}; +} diff --git a/src/score_components/coverage.js b/src/score_components/coverage.js index 4c0495a..68baccd 100644 --- a/src/score_components/coverage.js +++ b/src/score_components/coverage.js @@ -1,5 +1,5 @@ -const codecov = require('@api/codecov'); -const getSHA = require('../get-sha'); +import codecov from '@api/codecov'; +import getSHA from '../get-sha.js'; /** * @description Compiles the health score components @@ -8,7 +8,7 @@ const getSHA = require('../get-sha'); * @param {import('@octokit/rest')} github `@octokit/rest` GitHub Actions client * @returns {Promise} Number of uncovered lines of code, or 0 in the case of no codecov token specified */ -module.exports = async function retrieveCodeCoverage(context, core, github) { +export default async function retrieveCodeCoverage(context, core, github) { // See if we can get a coverage overview for this commit from codecov const codecovToken = core.getInput('codecov_token'); const maxAttempts = @@ -75,7 +75,7 @@ module.exports = async function retrieveCodeCoverage(context, core, github) { core.info('No codecov token provided, skipping coverage retrieval.'); } return misses; -}; +} function sleep(ms) { return new Promise((res) => { diff --git a/src/score_components/find-problematic-comments.js b/src/score_components/find-problematic-comments.js index c4c6964..3af628f 100644 --- a/src/score_components/find-problematic-comments.js +++ b/src/score_components/find-problematic-comments.js @@ -1,5 +1,5 @@ -const fs = require('node:fs'); -const child_process = require('node:child_process'); +import child_process from 'node:child_process'; +import fs from 'node:fs'; const CommentType = Object.freeze({ TODO: 'TODO', @@ -7,7 +7,7 @@ const CommentType = Object.freeze({ HACK: 'HACK', }); -module.exports = function grepForProblematicComments( +export default function grepForProblematicComments( core, ext, include, @@ -77,7 +77,7 @@ module.exports = function grepForProblematicComments( }; }); return result; -}; +} /** * Get the comment type. diff --git a/src/types.js b/src/types.js index dceb59f..66e10ed 100644 --- a/src/types.js +++ b/src/types.js @@ -5,4 +5,4 @@ * @property {number} coverageMisses Number of lines of code not covered, according to codecov */ -module.exports = {}; +export {}; diff --git a/test/health-score-test.js b/test/health-score-test.js index de02ede..97ca6b4 100644 --- a/test/health-score-test.js +++ b/test/health-score-test.js @@ -1,142 +1,229 @@ -const { assert } = require('chai'); -const sinon = require('sinon'); -const { - fakeCore, - fakeGithub, - fakeComments, - fakeCoverage, -} = require('./stubs/stubs'); -const hs = require('../src/health-score'); - -const contextValue = { - eventName: 'pull_request', - payload: { - after: 'abcd1234', - }, - repo: { - owner: 'slackapi', - repo: 'slack-health-score', - }, -}; +import { beforeEach, describe, expect, it, vi } from 'vitest'; + +// Mock the dependencies first +vi.mock('../src/score_components/find-problematic-comments.js', () => ({ + default: vi.fn(), +})); + +vi.mock('../src/score_components/coverage.js', () => ({ + default: vi.fn(), +})); + +vi.mock('../src/report.js', () => ({ + default: vi.fn(), +})); + +import * as hs from '../src/health-score.js'; +import reportStatus from '../src/report.js'; +import retrieveCodeCoverage from '../src/score_components/coverage.js'; +// Import the mocked modules and the module under test +import findProblematicComments from '../src/score_components/find-problematic-comments.js'; describe('health-score', () => { - let fakeContext = {}; + let fakeCore; + let fakeGithub; + let fakeContext; + beforeEach(() => { - sinon.reset(); + vi.clearAllMocks(); + + fakeCore = { + getInput: vi.fn(), + info: vi.fn(), + debug: vi.fn(), + warning: vi.fn(), + error: vi.fn(), + }; + + fakeGithub = { + rest: { + checks: { + create: vi.fn(), + }, + }, + }; + + fakeContext = { + eventName: 'pull_request', + payload: { + after: 'abcd1234', + }, + repo: { + owner: 'slackapi', + repo: 'slack-health-score', + }, + }; + }); + + it('should have a compile function', () => { + expect(hs.compile).toBeTypeOf('function'); }); - it('should have a grep function', async () => { - assert.ok(hs.grep); + + it('should have a grep function', () => { + expect(hs.grep).toBeTypeOf('function'); }); + + it('should have a coverage function', () => { + expect(hs.coverage).toBeTypeOf('function'); + }); + + it('should have a report function', () => { + expect(hs.report).toBeTypeOf('function'); + }); + describe('check: inputs', () => { - describe('should call actions/core.error for invalid input', async () => { + describe('should call actions/core.error for invalid input', () => { it('should check for empty includes', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('extension').returns('js'); - fakeCore.getInput.withArgs('include').returns(null); - fakeCore.getInput.withArgs('exclude').returns('test'); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'extension') return 'js'; + if (input === 'include') return null; + if (input === 'exclude') return 'test'; + return undefined; + }); + + findProblematicComments.mockReturnValue([]); + retrieveCodeCoverage.mockResolvedValue(0); + await hs.compile(fakeContext, fakeCore, fakeGithub); - assert( - fakeCore.warning.calledWith( - sinon.match('Directories to be included not specified'), - ), + + expect(fakeCore.warning).toHaveBeenCalledWith( + expect.stringContaining('Directories to be included not specified'), ); }); + it('should check for invalid extensions', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('extension').returns(''); - fakeCore.getInput.withArgs('include').returns('src'); - fakeCore.getInput.withArgs('exclude').returns(null); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'extension') return ''; + if (input === 'include') return 'src'; + if (input === 'exclude') return null; + return undefined; + }); + await hs.compile(fakeContext, fakeCore, fakeGithub); - assert( - fakeCore.error.calledWith(sinon.match('Extensions not specified')), + + expect(fakeCore.error).toHaveBeenCalledWith( + expect.stringContaining('Extensions not specified'), ); }); }); + it('should take single input', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('extension').returns('js'); - fakeCore.getInput.withArgs('include').returns('src'); - fakeCore.getInput.withArgs('exclude').returns('test'); - fakeComments.onCall().returns(['']); - fakeCoverage.onCall().returns(0); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'extension') return 'js'; + if (input === 'include') return 'src'; + if (input === 'exclude') return 'test'; + return undefined; + }); + + findProblematicComments.mockReturnValue(['']); + retrieveCodeCoverage.mockResolvedValue(0); await hs.compile(fakeContext, fakeCore, fakeGithub); - assert(fakeComments.calledWith(fakeCore, ['js'], ['src'], ['test'])); - assert(fakeCoverage.calledWith(fakeContext, fakeCore, fakeGithub)); + expect(findProblematicComments).toHaveBeenCalledWith( + fakeCore, + ['js'], + ['src'], + ['test'], + ); + expect(retrieveCodeCoverage).toHaveBeenCalledWith( + fakeContext, + fakeCore, + fakeGithub, + ); }); it('should handle inputs as block format', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('extension').returns('-js\n- ts'); - fakeCore.getInput.withArgs('include').returns('- src\n- lib'); - fakeCore.getInput.withArgs('exclude').returns('- test\n- dist'); - fakeComments.onCall().returns(['']); - fakeCoverage.onCall().returns(0); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'extension') return '-js\n- ts'; + if (input === 'include') return '- src\n- lib'; + if (input === 'exclude') return '- test\n- dist'; + return undefined; + }); + + findProblematicComments.mockReturnValue(['']); + retrieveCodeCoverage.mockResolvedValue(0); await hs.compile(fakeContext, fakeCore, fakeGithub); - assert( - fakeComments.calledWith( - fakeCore, - ['js', 'ts'], - ['src', 'lib'], - ['test', 'dist'], - ), + expect(findProblematicComments).toHaveBeenCalledWith( + fakeCore, + ['js', 'ts'], + ['src', 'lib'], + ['test', 'dist'], + ); + expect(retrieveCodeCoverage).toHaveBeenCalledWith( + fakeContext, + fakeCore, + fakeGithub, ); - assert(fakeCoverage.calledWith(fakeContext, fakeCore, fakeGithub)); }); it('should handle inputs in flow format', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('extension').returns("['js', 'ts']"); - fakeCore.getInput.withArgs('include').returns("['src', 'lib']"); - fakeCore.getInput.withArgs('exclude').returns("['test', 'dist']"); - fakeComments.onCall().returns(['']); - fakeCoverage.onCall().returns(0); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'extension') return "['js', 'ts']"; + if (input === 'include') return "['src', 'lib']"; + if (input === 'exclude') return "['test', 'dist']"; + return undefined; + }); + + findProblematicComments.mockReturnValue(['']); + retrieveCodeCoverage.mockResolvedValue(0); await hs.compile(fakeContext, fakeCore, fakeGithub); - assert( - fakeComments.calledWith( - fakeCore, - ['js', 'ts'], - ['src', 'lib'], - ['test', 'dist'], - ), + expect(findProblematicComments).toHaveBeenCalledWith( + fakeCore, + ['js', 'ts'], + ['src', 'lib'], + ['test', 'dist'], + ); + expect(retrieveCodeCoverage).toHaveBeenCalledWith( + fakeContext, + fakeCore, + fakeGithub, ); - assert(fakeCoverage.calledWith(fakeContext, fakeCore, fakeGithub)); }); + it('should handle combined and unformatted inputs', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('extension').returns('[js, ts]'); - fakeCore.getInput.withArgs('include').returns(' - src\n -lib'); - fakeCore.getInput.withArgs('exclude').returns('["test", \'dist\']'); - fakeComments.onCall().returns(['']); - fakeCoverage.onCall().returns(0); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'extension') return '[js, ts]'; + if (input === 'include') return ' - src\n -lib'; + if (input === 'exclude') return '["test", \'dist\']'; + return undefined; + }); + + findProblematicComments.mockReturnValue(['']); + retrieveCodeCoverage.mockResolvedValue(0); await hs.compile(fakeContext, fakeCore, fakeGithub); - assert( - fakeComments.calledWith( - fakeCore, - ['js', 'ts'], - ['src', 'lib'], - ['test', 'dist'], - ), + expect(findProblematicComments).toHaveBeenCalledWith( + fakeCore, + ['js', 'ts'], + ['src', 'lib'], + ['test', 'dist'], + ); + expect(retrieveCodeCoverage).toHaveBeenCalledWith( + fakeContext, + fakeCore, + fakeGithub, ); - assert(fakeCoverage.calledWith(fakeContext, fakeCore, fakeGithub)); }); }); - it('should have a report function', async () => { - assert.ok(hs.report); - }); + describe('check: report', () => { it('should handle invalid github token', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('github_token').returns(null); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'github_token') return null; + return undefined; + }); + const score = { comments: [], coverageMisses: 0 }; const startTime = new Date(); + + reportStatus.mockResolvedValue(0); + const points = await hs.report( fakeContext, startTime, @@ -144,18 +231,23 @@ describe('health-score', () => { fakeGithub, score, ); - assert( - fakeCore.warning.calledWith( - sinon.match( - 'No GitHub token found; will not report score on commit status.', - ), - ), + + expect(reportStatus).toHaveBeenCalledWith( + fakeContext, + startTime, + fakeCore, + fakeGithub, + score, ); - assert.deepEqual(points, 0); + expect(points).toBe(0); }); + it('should calculate points accurately', async () => { - fakeContext = contextValue; - fakeCore.getInput.withArgs('github_token').returns('test'); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'github_token') return 'test'; + return undefined; + }); + const score = { comments: [ { path: 'path', line_no: 10, comment: '// TODO: random stuff' }, @@ -164,6 +256,9 @@ describe('health-score', () => { coverageMisses: 5, }; const startTime = new Date(); + + reportStatus.mockResolvedValue(-205); + const points = await hs.report( fakeContext, startTime, @@ -171,7 +266,8 @@ describe('health-score', () => { fakeGithub, score, ); - assert.deepEqual(points, -205); + + expect(points).toBe(-205); }); }); }); diff --git a/test/helpers/helpers-test.js b/test/helpers/helpers-test.js index 6d32984..18906a4 100644 --- a/test/helpers/helpers-test.js +++ b/test/helpers/helpers-test.js @@ -1,39 +1,40 @@ -const { assert } = require('chai'); -const { +import { describe, expect, it } from 'vitest'; +import { getAnnotations, parseYamlArray, -} = require('../../src/helpers/helper-functions'); +} from '../../src/helpers/helper-functions.js'; describe('helpers', () => { - it('should have a parseYamlArray function', async () => { - assert.ok(parseYamlArray); + it('should have a parseYamlArray function', () => { + expect(parseYamlArray).toBeTypeOf('function'); }); + describe('array-parser', () => { it('should return an empty array for null input', () => { const result = parseYamlArray(null); - assert.deepEqual(result, []); + expect(result).toEqual([]); }); it('should return an empty array for undefined input', () => { const result = parseYamlArray(undefined); - assert.deepEqual(result, []); + expect(result).toEqual([]); }); it('should return an empty array for empty string input', () => { const result = parseYamlArray(''); - assert.deepEqual(result, []); + expect(result).toEqual([]); }); it('should parse a valid JSON array string', () => { const input = '["src", "lib", "test"]'; const result = parseYamlArray(input); - assert.deepEqual(result, ['src', 'lib', 'test']); + expect(result).toEqual(['src', 'lib', 'test']); }); it('should parse a flow style YAML array string', () => { const input = 'src, lib, test'; const result = parseYamlArray(input); - assert.deepEqual(result, ['src', 'lib', 'test']); + expect(result).toEqual(['src', 'lib', 'test']); }); it('should parse a block style newline-separated YAML array string', () => { @@ -41,7 +42,7 @@ describe('helpers', () => { lib test`; const result = parseYamlArray(input); - assert.deepEqual(result, ['src', 'lib', 'test']); + expect(result).toEqual(['src', 'lib', 'test']); }); it('should parse a block style YAML array string with hyphens', () => { @@ -49,7 +50,7 @@ describe('helpers', () => { - lib - test`; const result = parseYamlArray(input); - assert.deepEqual(result, ['src', 'lib', 'test']); + expect(result).toEqual(['src', 'lib', 'test']); }); it('should remove surrounding quotes from YAML array items', () => { @@ -57,24 +58,28 @@ describe('helpers', () => { - 'lib' - test`; const result = parseYamlArray(input); - assert.deepEqual(result, ['src', 'lib', 'test']); + expect(result).toEqual(['src', 'lib', 'test']); }); + it('should handle a mix of JSON and YAML formats', () => { const input = '["src", "lib"], "test", "date"'; const result = parseYamlArray(input); - assert.deepEqual(result, ['src', 'lib', 'test', 'date']); + expect(result).toEqual(['src', 'lib', 'test', 'date']); }); }); - it('should have a getAnnotation function', async () => { - assert.ok(getAnnotations); + + it('should have a getAnnotation function', () => { + expect(getAnnotations).toBeTypeOf('function'); }); + describe('comment-annotations', () => { - it('should handle empty find outputs', async () => { + it('should handle empty find outputs', () => { const comments = []; - assert.deepEqual(getAnnotations(comments), []); + expect(getAnnotations(comments)).toEqual([]); }); - it('should handle find outputs of different formats', async () => { - assert.deepEqual( + + it('should handle find outputs of different formats', () => { + expect( getAnnotations([ { path: 'path', @@ -83,17 +88,17 @@ describe('helpers', () => { commentType: 'TODO', }, ]), - [ - { - path: 'path', - start_line: 10, - end_line: 10, - annotation_level: 'warning', - message: 'Problematic comment ("TODO") identified', - }, - ], - ); - assert.deepEqual( + ).toEqual([ + { + path: 'path', + start_line: 10, + end_line: 10, + annotation_level: 'warning', + message: 'Problematic comment ("TODO") identified', + }, + ]); + + expect( getAnnotations([ { path: 'path', @@ -108,26 +113,26 @@ describe('helpers', () => { commentType: null, }, ]), - [ - { - path: 'path', - start_line: 10, - end_line: 10, - annotation_level: 'warning', - message: 'Problematic comment ("FIXME") identified', - }, - { - path: 'path2', - start_line: 15, - end_line: 15, - annotation_level: 'warning', - message: 'Problematic comment ("TODO", "HACK", "FIXME") identified', - }, - ], - ); + ).toEqual([ + { + path: 'path', + start_line: 10, + end_line: 10, + annotation_level: 'warning', + message: 'Problematic comment ("FIXME") identified', + }, + { + path: 'path2', + start_line: 15, + end_line: 15, + annotation_level: 'warning', + message: 'Problematic comment ("TODO", "HACK", "FIXME") identified', + }, + ]); }); - it('should default to line 1 for outputs without line number', async () => { - assert.deepEqual( + + it('should default to line 1 for outputs without line number', () => { + expect( getAnnotations([ { path: 'path', @@ -135,16 +140,15 @@ describe('helpers', () => { commentType: 'TODO', }, ]), - [ - { - path: 'path', - start_line: 1, - end_line: 1, - annotation_level: 'warning', - message: 'Problematic comment ("TODO") identified', - }, - ], - ); + ).toEqual([ + { + path: 'path', + start_line: 1, + end_line: 1, + annotation_level: 'warning', + message: 'Problematic comment ("TODO") identified', + }, + ]); }); }); }); diff --git a/test/score_components/coverage-test.js b/test/score_components/coverage-test.js index 9a6006a..e0c1e2d 100644 --- a/test/score_components/coverage-test.js +++ b/test/score_components/coverage-test.js @@ -1,28 +1,40 @@ -const { assert } = require('chai'); -const sinon = require('sinon'); -const { fakeCore, fakeGithub, fakeCodecov } = require('../stubs/stubs'); -const cov = require('../../src/score_components/coverage'); +import { beforeEach, describe, expect, it, vi } from 'vitest'; + +// Mock the codecov and get-sha modules +vi.mock('@api/codecov', () => ({ + default: { + auth: vi.fn(), + repos_commits_retrieve: vi.fn(), + }, +})); + +vi.mock('../../src/get-sha.js', () => ({ + default: vi.fn(), +})); + +// Import mocked modules and the function under test +import codecov from '@api/codecov'; +import getSHA from '../../src/get-sha.js'; +import cov from '../../src/score_components/coverage.js'; describe('score component: code coverage', () => { - let fakeContext = {}; + let fakeCore; + let fakeGithub; + let fakeContext; + beforeEach(() => { - sinon.reset(); - // Uncomment the following to get logging output during testing. - // fakeCore.info.callsFake(console.log); - // fakeCore.warning.callsFake(console.warn); - // fakeCore.error.callsFake(console.error); - }); + vi.clearAllMocks(); + + fakeCore = { + getInput: vi.fn(), + info: vi.fn(), + debug: vi.fn(), + warning: vi.fn(), + error: vi.fn(), + }; + + fakeGithub = {}; - it('should export a function', () => { - assert.isFunction(cov); - }); - it('should return 0 if no `codecov_token` input provided', async () => { - fakeCore.getInput.withArgs('codecov_token').returns(null); - const res = await cov(fakeContext, fakeCore, fakeGithub); - assert.equal(res, 0); - }); - it('should return total number of missed lines from a successful codecov API response', async () => { - fakeCore.getInput.withArgs('codecov_token').returns('abcd1234'); fakeContext = { eventName: 'pull_request', payload: { @@ -33,120 +45,132 @@ describe('score component: code coverage', () => { repo: 'slack-health-score', }, }; - fakeCodecov.repos_commits_retrieve.resolves({ + + getSHA.mockReturnValue('abcd1234'); + }); + + it('should export a function', () => { + expect(cov).toBeTypeOf('function'); + }); + + it('should return 0 if no `codecov_token` input provided', async () => { + fakeCore.getInput.mockImplementation((input) => { + if (input === 'codecov_token') return null; + return undefined; + }); + + const res = await cov(fakeContext, fakeCore, fakeGithub); + expect(res).toBe(0); + }); + + it('should return total number of missed lines from a successful codecov API response', async () => { + fakeCore.getInput.mockImplementation((input) => { + if (input === 'codecov_token') return 'abcd1234'; + if (input === 'codecov_max_attempts') return '10'; + if (input === 'codecov_retry_delay') return '10000'; + if (input === 'codecov_treat_timeout_as_error') return 'false'; + return undefined; + }); + + codecov.repos_commits_retrieve.mockResolvedValue({ data: { totals: { misses: 1337, }, }, }); + const res = await cov(fakeContext, fakeCore, fakeGithub); - assert.equal(res, 1337); + expect(res).toBe(1337); }); + describe('retry, delay and timeout-error behaviour/inputs', () => { it('should default to 10 max attempts if invalid codecov_max_attempts provided', async () => { - fakeCore.getInput.withArgs('codecov_token').returns('abcd1234'); - fakeCore.getInput.withArgs('codecov_max_attempts').returns('-1'); - fakeCore.getInput.withArgs('codecov_retry_delay').returns('10'); - fakeContext = { - eventName: 'pull_request', - payload: { - after: 'abcd1234', - }, - repo: { - owner: 'slackapi', - repo: 'slack-health-score', - }, - }; - fakeCodecov.repos_commits_retrieve - .onCall(9) - .resolves({ data: { totals: { misses: 42 } } }); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'codecov_token') return 'abcd1234'; + if (input === 'codecov_max_attempts') return '-1'; + if (input === 'codecov_retry_delay') return '10'; + if (input === 'codecov_treat_timeout_as_error') return 'false'; + return undefined; + }); + + // Mock to resolve on the 10th call (index 9) + codecov.repos_commits_retrieve + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValue({ data: { totals: { misses: 42 } } }); + const res = await cov(fakeContext, fakeCore, fakeGithub); - assert.strictEqual(res, 42); + expect(res).toBe(42); }); + it('should retry fetching with configured delay', async () => { - fakeCore.getInput.withArgs('codecov_token').returns('abcd1234'); - fakeCore.getInput.withArgs('codecov_max_attempts').returns('2'); - fakeCore.getInput.withArgs('codecov_retry_delay').returns('10'); - - fakeContext = { - eventName: 'pull_request', - payload: { - after: 'abcd1234', - }, - repo: { - owner: 'slackapi', - repo: 'slack-health-score', - }, - }; - fakeCodecov.repos_commits_retrieve.onFirstCall().resolves({ data: {} }); - fakeCodecov.repos_commits_retrieve - .onSecondCall() - .resolves({ data: { totals: { misses: 42 } } }); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'codecov_token') return 'abcd1234'; + if (input === 'codecov_max_attempts') return '2'; + if (input === 'codecov_retry_delay') return '10'; + if (input === 'codecov_treat_timeout_as_error') return 'false'; + return undefined; + }); + + codecov.repos_commits_retrieve + .mockResolvedValueOnce({ data: {} }) + .mockResolvedValue({ data: { totals: { misses: 42 } } }); const startTime = performance.now(); const res = await cov(fakeContext, fakeCore, fakeGithub); const endTime = performance.now(); - assert.equal(res, 42); - assert.equal(fakeCodecov.repos_commits_retrieve.callCount, 2); + + expect(res).toBe(42); + expect(codecov.repos_commits_retrieve).toHaveBeenCalledTimes(2); + const timeTaken = endTime - startTime; - assert.isAbove(timeTaken, 10); - assert.isBelow(timeTaken, 30); + expect(timeTaken).toBeGreaterThan(10); + expect(timeTaken).toBeLessThan(30); }); + it('should retry fetching not exceeding configured attempts', async () => { - fakeCore.getInput.withArgs('codecov_token').returns('abcd1234'); - fakeCore.getInput.withArgs('codecov_max_attempts').returns('1'); - fakeCore.getInput.withArgs('codecov_retry_delay').returns('10'); - - fakeContext = { - eventName: 'pull_request', - payload: { - after: 'abcd1234', - }, - repo: { - owner: 'slackapi', - repo: 'slack-health-score', - }, - }; - fakeCodecov.repos_commits_retrieve.onFirstCall().resolves({ data: {} }); - fakeCodecov.repos_commits_retrieve - .onSecondCall() - .resolves({ data: { totals: { misses: 42 } } }); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'codecov_token') return 'abcd1234'; + if (input === 'codecov_max_attempts') return '1'; + if (input === 'codecov_retry_delay') return '10'; + if (input === 'codecov_treat_timeout_as_error') return 'false'; + return undefined; + }); + + codecov.repos_commits_retrieve.mockResolvedValue({ data: {} }); const res = await cov(fakeContext, fakeCore, fakeGithub); - assert.equal(res, 0); - assert.equal(fakeCodecov.repos_commits_retrieve.callCount, 1); - assert( - fakeCore.warning.calledWithMatch( - sinon.match('Reached maximum attempts'), - ), + + expect(res).toBe(0); + expect(codecov.repos_commits_retrieve).toHaveBeenCalledTimes(1); + expect(fakeCore.warning).toHaveBeenCalledWith( + expect.stringContaining('Reached maximum attempts'), ); }); + it('should call actions/core.error if `codecov_treat_timeout_as_error` set to true and `codecov_max_attempts` exceeded', async () => { - fakeCore.getInput.withArgs('codecov_token').returns('abcd1234'); - fakeCore.getInput.withArgs('codecov_max_attempts').returns('1'); - fakeCore.getInput.withArgs('codecov_retry_delay').returns('10'); - fakeCore.getInput - .withArgs('codecov_treat_timeout_as_error') - .returns('true'); - - fakeContext = { - eventName: 'pull_request', - payload: { - after: 'abcd1234', - }, - repo: { - owner: 'slackapi', - repo: 'slack-health-score', - }, - }; - fakeCodecov.repos_commits_retrieve.onFirstCall().resolves({ data: {} }); - fakeCodecov.repos_commits_retrieve - .onSecondCall() - .resolves({ data: { totals: { misses: 42 } } }); + fakeCore.getInput.mockImplementation((input) => { + if (input === 'codecov_token') return 'abcd1234'; + if (input === 'codecov_max_attempts') return '1'; + if (input === 'codecov_retry_delay') return '10'; + if (input === 'codecov_treat_timeout_as_error') return 'true'; + return undefined; + }); + + codecov.repos_commits_retrieve.mockResolvedValue({ data: {} }); + await cov(fakeContext, fakeCore, fakeGithub); - assert( - fakeCore.error.calledWith(sinon.match('Reached maximum attempts')), + + expect(fakeCore.error).toHaveBeenCalledWith( + expect.stringContaining('Reached maximum attempts'), ); }); }); diff --git a/test/score_components/problematic-comments-test.js b/test/score_components/problematic-comments-test.js index 794bfbc..f752ba8 100644 --- a/test/score_components/problematic-comments-test.js +++ b/test/score_components/problematic-comments-test.js @@ -1,106 +1,127 @@ -const { assert } = require('chai'); -const sinon = require('sinon'); -const { fakeCore, fakeChildProcess, fakeFs } = require('../stubs/stubs'); -const grepForProblematicComments = require('../../src/score_components/find-problematic-comments'); +import { beforeEach, describe, expect, it, vi } from 'vitest'; + +// Mock Node.js modules with vi.mock +vi.mock('node:child_process', () => ({ + default: { + execSync: vi.fn(), + }, +})); + +vi.mock('node:fs', () => ({ + default: { + existsSync: vi.fn(), + readFileSync: vi.fn(), + }, +})); + +// Import the mocked modules and the function under test +import child_process from 'node:child_process'; +import fs from 'node:fs'; +import grepForProblematicComments from '../../src/score_components/find-problematic-comments.js'; -const commentPattern = '\\s*(//|/\\*|\\*).*\\b(TODO|HACK|FIXME)\\b'; describe('score component: problematic comments', () => { + const fakeCore = { + error: vi.fn(), + info: vi.fn(), + debug: vi.fn(), + }; + beforeEach(() => { - sinon.reset(); + vi.clearAllMocks(); }); - it('should throw error incase execSync fails', async () => { - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], [], []), - coverageMisses: 0, - }; - fakeChildProcess.execSync.throws('error'); - fakeFs.returns(null); - assert( - fakeCore.error.calledWith( - sinon.match('child_process execSync failed to execute'), - ), - ); - assert.deepEqual(score.comments, []); + + it('should export a function', () => { + expect(grepForProblematicComments).toBeTypeOf('function'); }); - describe('should handle different inputs', async () => { - it('should default to . if includes not provided', async () => { - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], [], []), - coverageMisses: 0, - }; - fakeChildProcess.execSync.returns(''); - fakeFs.returns(null); - let find = 'find .'; - find += ' \\( -name "*.js" \\) '; - find += ` -exec sh -c 'grep -EHn "${commentPattern}" "$0"' {} \\;`; - assert(fakeChildProcess.execSync.calledWith(find)); - assert.deepEqual(score.comments, []); + + const commentPattern = '\\s*(//|/\\*|\\*).*\\b(TODO|HACK|FIXME)\\b'; + + describe('should handle different inputs', () => { + it('should throw error in case execSync fails', () => { + child_process.execSync.mockImplementation(() => { + throw new Error('test error'); + }); + fs.existsSync.mockReturnValue(false); + + const result = grepForProblematicComments(fakeCore, ['js'], [], []); + + expect(fakeCore.error).toHaveBeenCalled(); + expect(result).toEqual([]); }); - it('should default to gitignore if excludes not provided', async () => { - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], [], []), - coverageMisses: 0, - }; - fakeChildProcess.execSync.returns(''); - fakeFs.returns(null); - assert(fakeFs.calledWith('.gitignore')); - assert.deepEqual(score.comments, []); + + it('should default to . if includes not provided', () => { + child_process.execSync.mockReturnValue(''); + fs.existsSync.mockReturnValue(false); + + grepForProblematicComments(fakeCore, ['js'], [], []); + + let expectedFind = 'find .'; + expectedFind += ' \\( -name "*.js" \\) '; + expectedFind += ` -exec sh -c 'grep -EHn "${commentPattern}" "$0"' {} \\;`; + + expect(child_process.execSync).toHaveBeenCalledWith(expectedFind); }); - it('should handle both includes and excludes', async () => { - const score = { - comments: grepForProblematicComments( - fakeCore, - ['js'], - ['src'], - ['test/'], - ), - coverageMisses: 0, - }; - fakeChildProcess.execSync.returns(''); - fakeFs.returns(null); - let find = 'find src'; - find += ' \\( -name "*.js" \\) '; - find += ' -not -path "*/test/*" -not -path "*/test"'; - find += ` -exec sh -c 'grep -EHn "${commentPattern}" "$0"' {} \\;`; - assert(fakeChildProcess.execSync.calledWith(find)); - assert.deepEqual(score.comments, []); + + it('should default to gitignore if excludes not provided', () => { + child_process.execSync.mockReturnValue(''); + fs.existsSync.mockReturnValue(true); + fs.readFileSync.mockReturnValue('node_modules/\n.git/\n'); + + grepForProblematicComments(fakeCore, ['js'], [], []); + + expect(fs.existsSync).toHaveBeenCalledWith('.gitignore'); + }); + + it('should handle both includes and excludes', () => { + child_process.execSync.mockReturnValue(''); + fs.existsSync.mockReturnValue(false); + + grepForProblematicComments(fakeCore, ['js'], ['src'], ['test/']); + + let expectedFind = 'find src'; + expectedFind += ' \\( -name "*.js" \\) '; + expectedFind += ' -not -path "*/test/*" -not -path "*/test"'; + expectedFind += ` -exec sh -c 'grep -EHn "${commentPattern}" "$0"' {} \\;`; + + expect(child_process.execSync).toHaveBeenCalledWith(expectedFind); }); - it('should handle both multiples includes, excludes and extensions', async () => { - const score = { - comments: grepForProblematicComments( - fakeCore, - ['js', 'ts'], - ['src', 'dir'], - ['test/', 'dist'], - ), - coverageMisses: 5, - }; - fakeChildProcess.execSync.returns(''); - fakeFs.returns(null); - let find = 'find src dir'; - find += ' \\( -name "*.js" -o -name "*.ts" \\) '; - find += ' -not -path "*/test/*" -not -path "*/test" -not -path "*/dist"'; - find += ` -exec sh -c 'grep -EHn "${commentPattern}" "$0"' {} \\;`; - assert(fakeChildProcess.execSync.calledWith(find)); - assert.deepEqual(score.comments, []); + + it('should handle both multiples includes, excludes and extensions', () => { + child_process.execSync.mockReturnValue(''); + fs.existsSync.mockReturnValue(false); + + grepForProblematicComments( + fakeCore, + ['js', 'ts'], + ['src', 'dir'], + ['test/', 'dist'], + ); + + let expectedFind = 'find src dir'; + expectedFind += ' \\( -name "*.js" -o -name "*.ts" \\) '; + expectedFind += + ' -not -path "*/test/*" -not -path "*/test" -not -path "*/dist"'; + expectedFind += ` -exec sh -c 'grep -EHn "${commentPattern}" "$0"' {} \\;`; + + expect(child_process.execSync).toHaveBeenCalledWith(expectedFind); }); }); - describe('should generate JSON in required format with grep results', async () => { - it('should handle empty grep results', async () => { - fakeChildProcess.execSync.returns(''); - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], ['src'], []), - coverageMisses: 0, - }; - assert.deepEqual(score.comments, []); + + describe('should generate JSON in required format with grep results', () => { + it('should handle empty grep results', () => { + child_process.execSync.mockReturnValue(''); + fs.existsSync.mockReturnValue(false); + + const result = grepForProblematicComments(fakeCore, ['js'], ['src'], []); + expect(result).toEqual([]); }); - it('should handle grep results', async () => { - fakeChildProcess.execSync.returns('path:10: // TODO: random stuff'); - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], ['src'], []), - coverageMisses: 0, - }; - assert.deepEqual(score.comments, [ + + it('should handle grep results', () => { + child_process.execSync.mockReturnValue('path:10: // TODO: random stuff'); + fs.existsSync.mockReturnValue(false); + + const result = grepForProblematicComments(fakeCore, ['js'], ['src'], []); + expect(result).toEqual([ { path: 'path', line_no: 10, @@ -109,15 +130,15 @@ describe('score component: problematic comments', () => { }, ]); }); - it('should handle multiple grep results', async () => { - fakeChildProcess.execSync.returns( + + it('should handle multiple grep results', () => { + child_process.execSync.mockReturnValue( 'path:10: // TODO: random stuff \n path2:15: // FIXME: random stuff', ); - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], ['src'], []), - coverageMisses: 0, - }; - assert.deepEqual(score.comments, [ + fs.existsSync.mockReturnValue(false); + + const result = grepForProblematicComments(fakeCore, ['js'], ['src'], []); + expect(result).toEqual([ { path: 'path', line_no: 10, @@ -132,15 +153,15 @@ describe('score component: problematic comments', () => { }, ]); }); - it('should handle grep results not in the correct format', async () => { - fakeChildProcess.execSync.returns( + + it('should handle grep results not in the correct format', () => { + child_process.execSync.mockReturnValue( 'path:10: // TODO: random stuff \n path2:15: // random things TODO', ); - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], ['src'], []), - coverageMisses: 0, - }; - assert.deepEqual(score.comments, [ + fs.existsSync.mockReturnValue(false); + + const result = grepForProblematicComments(fakeCore, ['js'], ['src'], []); + expect(result).toEqual([ { path: 'path', line_no: 10, @@ -155,13 +176,13 @@ describe('score component: problematic comments', () => { }, ]); }); - it('should handle grep results that have types without colons', async () => { - fakeChildProcess.execSync.returns('path:10: // TODO random stuff'); - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], ['src'], []), - coverageMisses: 0, - }; - assert.deepEqual(score.comments, [ + + it('should handle grep results that have types without colons', () => { + child_process.execSync.mockReturnValue('path:10: // TODO random stuff'); + fs.existsSync.mockReturnValue(false); + + const result = grepForProblematicComments(fakeCore, ['js'], ['src'], []); + expect(result).toEqual([ { path: 'path', line_no: 10, @@ -170,15 +191,15 @@ describe('score component: problematic comments', () => { }, ]); }); - it('should handle grep results that starts with code', async () => { - fakeChildProcess.execSync.returns( + + it('should handle grep results that starts with code', () => { + child_process.execSync.mockReturnValue( 'path:10: const result = "hello:world" // TODO: random stuff', ); - const score = { - comments: grepForProblematicComments(fakeCore, ['js'], ['src'], []), - coverageMisses: 0, - }; - assert.deepEqual(score.comments, [ + fs.existsSync.mockReturnValue(false); + + const result = grepForProblematicComments(fakeCore, ['js'], ['src'], []); + expect(result).toEqual([ { path: 'path', line_no: 10, diff --git a/test/stubs/stubs.js b/test/stubs/stubs.js deleted file mode 100644 index ef0cf42..0000000 --- a/test/stubs/stubs.js +++ /dev/null @@ -1,24 +0,0 @@ -const sinon = require('sinon'); -const core = require('@actions/core'); -const github = require('@actions/github'); -const codecov = require('@api/codecov'); -const child_process = require('node:child_process'); -const fs = require('node:fs'); -const hs = require('../../src/health-score'); - -const fakeCore = sinon.stub(core); -const fakeGithub = sinon.stub(github); -const fakeCodecov = sinon.stub(codecov); -const fakeChildProcess = sinon.stub(child_process); -const fakeComments = sinon.stub(hs, 'grep'); -const fakeCoverage = sinon.stub(hs, 'coverage'); -const fakeFs = sinon.stub(fs, 'existsSync'); -module.exports = { - fakeCore, - fakeGithub, - fakeCodecov, - fakeChildProcess, - fakeComments, - fakeCoverage, - fakeFs, -}; diff --git a/vitest.config.js b/vitest.config.js new file mode 100644 index 0000000..05c8998 --- /dev/null +++ b/vitest.config.js @@ -0,0 +1,14 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + globals: true, + environment: 'node', + include: ['test/**/*-test.js'], + coverage: { + provider: 'v8', + reporter: ['text', 'json', 'html'], + include: ['src/**/*.js'], + }, + }, +}); From 0ee3dc04453745614697021c5d2637afa8585ec9 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 19:30:19 -0700 Subject: [PATCH 2/8] test: avoid edgecase timing of a fast sleep and event loop --- test/score_components/coverage-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/score_components/coverage-test.js b/test/score_components/coverage-test.js index e0c1e2d..58e7ee5 100644 --- a/test/score_components/coverage-test.js +++ b/test/score_components/coverage-test.js @@ -115,7 +115,7 @@ describe('score component: code coverage', () => { fakeCore.getInput.mockImplementation((input) => { if (input === 'codecov_token') return 'abcd1234'; if (input === 'codecov_max_attempts') return '2'; - if (input === 'codecov_retry_delay') return '10'; + if (input === 'codecov_retry_delay') return '12'; if (input === 'codecov_treat_timeout_as_error') return 'false'; return undefined; }); From 17e7434517ce2282e32a853fd1b0ea4bd745f580 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 19:37:34 -0700 Subject: [PATCH 3/8] build: await esm import in commonjs inlines --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3df5533..2e08811 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,8 @@ runs: INPUT_CODECOV_TREAT_TIMEOUT_AS_ERROR: ${{ inputs.codecov_treat_timeout_as_error }} with: script: | - import script from "./dist/index.js"; + const module = await import('./dist/index.js'); + const script = module.default; await script(context, core, github); - name: Spelling uses: crate-ci/typos@392b78fe18a52790c53f42456e46124f77346842 # v1.34.0 From efc2c7bd74f42359e3f5d9cc51a4253639df7024 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 19:42:00 -0700 Subject: [PATCH 4/8] fix: use the github workspace path to get the dist build --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2e08811..96078ee 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,8 @@ runs: INPUT_CODECOV_TREAT_TIMEOUT_AS_ERROR: ${{ inputs.codecov_treat_timeout_as_error }} with: script: | - const module = await import('./dist/index.js'); + const path = process.env.GITHUB_WORKSPACE; + const module = await import(`${path}/dist/index.js`); const script = module.default; await script(context, core, github); - name: Spelling From b0a0cc693ea8151657c38136c71d6397fff88cc8 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 19:59:51 -0700 Subject: [PATCH 5/8] fix: use the composite action path https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 96078ee..8bf8d41 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,7 @@ runs: INPUT_CODECOV_TREAT_TIMEOUT_AS_ERROR: ${{ inputs.codecov_treat_timeout_as_error }} with: script: | - const path = process.env.GITHUB_WORKSPACE; + const path = process.env.GITHUB_ACTION_PATH; const module = await import(`${path}/dist/index.js`); const script = module.default; await script(context, core, github); From 998662aad713104ebeba7965257fd7c64035f5be Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 20:20:36 -0700 Subject: [PATCH 6/8] fix: find typos from the github action path also --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 8bf8d41..d93d1f7 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: - name: Spelling uses: crate-ci/typos@392b78fe18a52790c53f42456e46124f77346842 # v1.34.0 with: - config: .typos.toml + config: ${{ env.GITHUB_ACTION_PATH }}/.typos.toml branding: icon: "heart" color: "red" From 4904798dee9c270ddad128fff08b84055ae11a68 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 20:26:52 -0700 Subject: [PATCH 7/8] fix: fallback to the current github workspace for tests --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d93d1f7..8c5f3a7 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: - name: Spelling uses: crate-ci/typos@392b78fe18a52790c53f42456e46124f77346842 # v1.34.0 with: - config: ${{ env.GITHUB_ACTION_PATH }}/.typos.toml + config: ${{ env.GITHUB_ACTION_PATH || env.GITHUB_WORKSPACE }}/.typos.toml branding: icon: "heart" color: "red" From 417e6e185f6be5214eb0faad4b721640e1b698c6 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 1 Aug 2025 20:29:53 -0700 Subject: [PATCH 8/8] fix: use github shorthand notation --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 8c5f3a7..eb13242 100644 --- a/action.yml +++ b/action.yml @@ -51,7 +51,7 @@ runs: - name: Spelling uses: crate-ci/typos@392b78fe18a52790c53f42456e46124f77346842 # v1.34.0 with: - config: ${{ env.GITHUB_ACTION_PATH || env.GITHUB_WORKSPACE }}/.typos.toml + config: ${{ github.action_path || github.workspace }}/.typos.toml branding: icon: "heart" color: "red"