diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 3d33880..0000000 --- a/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -dist -coverage -node_modules \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 0967ef4..0000000 --- a/.prettierrc +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 274dadb..b989b9b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ Husky hooks install automatically via `prepare`. | Hook | Runs | |------|------| -| `pre-commit` | ESLint + Prettier (staged files) | +| `pre-commit` | Biome check (staged files) | | `pre-push` | Build + full test suite | | `commit-msg` | commitlint | diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..786cb13 --- /dev/null +++ b/biome.json @@ -0,0 +1,265 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.5.1/schema.json", + "vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true }, + "files": { "ignoreUnknown": false }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 80, + "attributePosition": "auto", + "bracketSameLine": false, + "bracketSpacing": true, + "expand": "auto", + "useEditorconfig": true, + "includes": ["**", "!**/dist", "!**/coverage", "!**/node_modules"] + }, + "linter": { + "enabled": true, + "rules": { + "preset": "none", + "complexity": { + "noAdjacentSpacesInRegex": "error", + "noExtraBooleanCast": "error", + "noUselessCatch": "error", + "noUselessEscapeInRegex": "error" + }, + "correctness": { + "noConstAssign": "error", + "noConstantCondition": "error", + "noEmptyCharacterClassInRegex": "error", + "noEmptyPattern": "error", + "noGlobalObjectCalls": "error", + "noInvalidBuiltinInstantiation": "error", + "noInvalidConstructorSuper": "error", + "noNonoctalDecimalEscape": "error", + "noPrecisionLoss": "error", + "noSelfAssign": "error", + "noSetterReturn": "error", + "noSwitchDeclarations": "error", + "noUndeclaredVariables": "error", + "noUnreachable": "error", + "noUnreachableSuper": "error", + "noUnsafeFinally": "error", + "noUnsafeOptionalChaining": "error", + "noUnusedLabels": "error", + "noUnusedPrivateClassMembers": "error", + "noUnusedVariables": "error", + "useIsNan": "error", + "useValidForDirection": "error", + "useValidTypeof": "error", + "useYield": "error" + }, + "style": { "useBlockStatements": "off", "useErrorCause": "off" }, + "suspicious": { + "noAsyncPromiseExecutor": "error", + "noCatchAssign": "error", + "noClassAssign": "error", + "noCompareNegZero": "error", + "noConstantBinaryExpressions": "error", + "noControlCharactersInRegex": "error", + "noDebugger": "error", + "noDuplicateCase": "error", + "noDuplicateClassMembers": "error", + "noDuplicateElseIf": "error", + "noDuplicateObjectKeys": "error", + "noDuplicateParameters": "error", + "noEmptyBlockStatements": "error", + "noFallthroughSwitchClause": "error", + "noFunctionAssign": "error", + "noGlobalAssign": "error", + "noImportAssign": "error", + "noIrregularWhitespace": "error", + "noMisleadingCharacterClass": "error", + "noPrototypeBuiltins": "error", + "noRedeclare": "error", + "noShadowRestrictedNames": "error", + "noSparseArray": "error", + "noUnassignedVariables": "error", + "noUnsafeNegation": "error", + "noUselessRegexBackrefs": "error", + "noWith": "error", + "useGetterReturn": "error" + } + }, + "includes": [ + "**", + "!dist/**", + "!node_modules/**", + "!scripts/**", + "!coverage/**" + ] + }, + "javascript": { + "formatter": { + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "trailingCommas": "all", + "semicolons": "always", + "arrowParentheses": "always", + "bracketSameLine": false, + "quoteStyle": "double", + "attributePosition": "auto", + "bracketSpacing": true + }, + "globals": [ + "onanimationend", + "ongamepadconnected", + "onlostpointercapture", + "onanimationiteration", + "onkeyup", + "onmousedown", + "onanimationstart", + "onslotchange", + "onprogress", + "ontransitionstart", + "onpause", + "onended", + "onpointerover", + "onscrollend", + "onformdata", + "ontransitionrun", + "onanimationcancel", + "ondrag", + "onchange", + "onbeforeinstallprompt", + "onbeforexrselect", + "onmessage", + "ontransitioncancel", + "onpointerdown", + "onabort", + "onpointerout", + "oncuechange", + "ongotpointercapture", + "onscrollsnapchanging", + "onsearch", + "onsubmit", + "onstalled", + "onsuspend", + "onreset", + "onerror", + "onresize", + "onmouseenter", + "ongamepaddisconnected", + "ondragover", + "onbeforetoggle", + "onmouseover", + "onpagehide", + "onmousemove", + "onratechange", + "oncommand", + "onmessageerror", + "onwheel", + "ondevicemotion", + "onauxclick", + "ontransitionend", + "onpaste", + "onpageswap", + "ononline", + "ondeviceorientationabsolute", + "onkeydown", + "onclose", + "onselect", + "onpageshow", + "onpointercancel", + "onbeforematch", + "onpointerrawupdate", + "ondragleave", + "onscrollsnapchange", + "onseeked", + "onwaiting", + "onbeforeunload", + "onplaying", + "onvolumechange", + "ondragend", + "onstorage", + "onloadeddata", + "onfocus", + "onoffline", + "onplay", + "onafterprint", + "onclick", + "oncut", + "onmouseout", + "ondblclick", + "oncanplay", + "onloadstart", + "onappinstalled", + "onpointermove", + "ontoggle", + "oncontextmenu", + "onblur", + "oncancel", + "onbeforeprint", + "oncontextrestored", + "onloadedmetadata", + "onpointerup", + "onlanguagechange", + "oncopy", + "onselectstart", + "onscroll", + "onload", + "ondragstart", + "onbeforeinput", + "oncanplaythrough", + "oninput", + "oninvalid", + "ontimeupdate", + "ondurationchange", + "onselectionchange", + "onmouseup", + "location", + "onkeypress", + "onpointerleave", + "oncontextlost", + "ondrop", + "onsecuritypolicyviolation", + "oncontentvisibilityautostatechange", + "ondeviceorientation", + "onseeking", + "onrejectionhandled", + "onunload", + "onmouseleave", + "onhashchange", + "onpointerenter", + "onmousewheel", + "onunhandledrejection", + "ondragenter", + "onpopstate", + "onpagereveal", + "onemptied" + ] + }, + "html": { + "formatter": { + "indentScriptAndStyle": false, + "selfCloseVoidElements": "always" + } + }, + "overrides": [ + { "includes": ["**/*.cjs"], "javascript": { "globals": ["exports"] } }, + { + "includes": ["**/*.spec.ts", "**/*.test.ts"], + "javascript": { + "globals": [ + "describe", + "it", + "test", + "expect", + "beforeEach", + "afterEach", + "beforeAll", + "afterAll", + "vi", + "vitest" + ] + } + } + ], + "assist": { + "enabled": true, + "actions": { "source": { "organizeImports": "on" } } + } +} diff --git a/commitlint.config.cjs b/commitlint.config.cjs index 3d88028..5073c20 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -1 +1 @@ -module.exports = { extends: ['@commitlint/config-conventional'] }; \ No newline at end of file +module.exports = { extends: ["@commitlint/config-conventional"] }; diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 5ffcd38..0000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,29 +0,0 @@ -import js from "@eslint/js"; -import globals from "globals"; -import prettier from "eslint-config-prettier"; - -export default [ - { - ignores: ["dist/**", "node_modules/**", "scripts/**", "coverage/**"], - }, - js.configs.recommended, - { - languageOptions: { - ecmaVersion: 2021, - sourceType: "module", - globals: { - ...globals.browser, - ...globals.es2021, - }, - }, - }, - { - files: ["**/*.cjs"], - languageOptions: { - globals: { - ...globals.node, - }, - }, - }, - prettier, -]; diff --git a/package-lock.json b/package-lock.json index 6d37217..21dd3eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,21 +13,17 @@ "dugite": "3.2.2" }, "devDependencies": { + "@biomejs/biome": "2.5.1", "@commitlint/cli": "20.5.0", "@commitlint/config-conventional": "20.5.0", - "@eslint/js": "10.0.1", "@rollup/plugin-terser": "1.0.0", "@rollup/plugin-typescript": "12.1.4", "@stryker-mutator/core": "9.6.1", "@stryker-mutator/vitest-runner": "9.6.1", "@types/node": "25.5.0", "@vitest/coverage-v8": "4.1.5", - "eslint": "10.0.3", - "eslint-config-prettier": "10.1.2", - "globals": "17.6.0", "husky": "9.1.7", "lint-staged": "16.3.3", - "prettier": "3.8.1", "rollup": "4.59.0", "typescript": "5.9.3", "vitest": "4.1.5" @@ -884,6 +880,181 @@ "node": ">=6.9.0" } }, + "node_modules/@biomejs/biome": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.5.1.tgz", + "integrity": "sha512-IXWLCxKmae+rI7LOHS1B3EbVisQ6GRAWbhN9msa6KjNCyFWrvKZWR4oUdinaNssrV852OrSHuSPa95h1GPJc7Q==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.5.1", + "@biomejs/cli-darwin-x64": "2.5.1", + "@biomejs/cli-linux-arm64": "2.5.1", + "@biomejs/cli-linux-arm64-musl": "2.5.1", + "@biomejs/cli-linux-x64": "2.5.1", + "@biomejs/cli-linux-x64-musl": "2.5.1", + "@biomejs/cli-win32-arm64": "2.5.1", + "@biomejs/cli-win32-x64": "2.5.1" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-npqDzvqv7vFaWRiNN1Te71siRgPaqS9MpqgYCdP/CrUbkJ7ApezaeaKjueKHRN/JH/6lRjJQAHi8acQDCAz22w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.5.1.tgz", + "integrity": "sha512-RgwTqPAM8g2tn1j+b5oRjF/DbSBX8a4gwojtuG9XuhfK7GgomvZ9+T+tqjXiVbjLEeGJOoL6VEk8mvRTVeSybw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.5.1.tgz", + "integrity": "sha512-yhV35CzZh38VyMvTEXi3JTjxZBs++oCKK9KG8vB6VI5+uvQvZNR3BFWEKKzuOmx9DJJj7sQpZ4LQJcmbGTs3+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-WMcvMLgByyTqVxGlq918NBBYliq9FRR9GAQVETHb+VjGVqXCZFfHlZHC1FX4ibuYY/Hg6TJE3rHU0xVrdJXNRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.5.1.tgz", + "integrity": "sha512-J/7uHSX7NfoYDI7HijAkd8lnQIOrRb2W7j3X+tw4R+N5ExvXGsyXFiGdQcfcxfOmNQmZVSQOCDk757fwpzqQcg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-ANTowtlLmPYm5yeMckWY8Xzb9Ix+JJP3tgHR/n6xRj1VWyIzzWtfRfih9hv9VmClwadpBvZduISZIbBsIlYG3A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.5.1.tgz", + "integrity": "sha512-zgXnKNgWPC4iPF7Y1lR3STUeCUuZRpD6IiOrC7TZTlh0Lx6FiVUT05myuMQHQ9D+1cc7uyMldi4forE6lp0ivQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.5.1.tgz", + "integrity": "sha512-6uxpR9hvaglANkZemeSiN/FhYgkGasrEGn267eXIWvjrjJ2LhDlk251IhjVJq6MXzkV2/bcXwLwSroLyPtqRZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@commitlint/cli": { "version": "20.5.0", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-20.5.0.tgz", @@ -1219,175 +1390,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", - "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", - "dev": true, - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.5.tgz", - "integrity": "sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==", - "dev": true, - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", - "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/js": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", - "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/@eslint/object-schema": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", - "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", - "dev": true, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.1.tgz", - "integrity": "sha512-iH1B076HoAshH1mLpHMgwdGeTs0CYwL0SPMkGuSebZrwBp16v415e9NZXg2jtrqPVQjf6IANe2Vtlr5KswtcZQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.1.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", - "dev": true, - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@inquirer/ansi": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.7.tgz", @@ -2825,24 +2827,12 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true - }, "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 }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, "node_modules/@types/node": { "version": "25.5.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", @@ -3037,15 +3027,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/ai": { "version": "6.0.207", "resolved": "https://registry.npmjs.org/ai/-/ai-6.0.207.tgz", @@ -3064,22 +3045,6 @@ "zod": "^3.25.76 || ^4.1.8" } }, - "node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/angular-html-parser": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/angular-html-parser/-/angular-html-parser-10.4.0.tgz", @@ -3718,12 +3683,6 @@ } } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, "node_modules/des.js": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", @@ -3899,182 +3858,12 @@ "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/eslint": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.3.tgz", - "integrity": "sha512-COV33RzXZkqhG9P2rZCFl9ZmJ7WL+gQSCRzE7RhkbclbQPtLAWReL7ysA0Sh4c8Im2U9ynybdR56PV0XcKvqaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.3", - "@eslint/config-helpers": "^0.5.2", - "@eslint/core": "^1.1.1", - "@eslint/plugin-kit": "^0.6.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.1.1", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-config-prettier": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.2.tgz", - "integrity": "sha512-Epgp/EofAUeEpIdZkW60MHKvPyru1ruQJxPL+WIycnaPApuseK0Zpkrh/FwL9oIpQvIhJwV7ptOy0DWUjTlCiA==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eventemitter3": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", @@ -4148,18 +3937,6 @@ "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", "license": "MIT" }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, "node_modules/fast-string-truncated-width": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", @@ -4238,18 +4015,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -4263,41 +4028,6 @@ "node": ">=8" } }, - "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-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", - "dev": true - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -4426,18 +4156,6 @@ "node": ">=18" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/global-directory": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-5.0.0.tgz", @@ -4454,19 +4172,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globals": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz", - "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -4562,15 +4267,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/import-fresh": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", @@ -4609,15 +4305,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -4657,15 +4344,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", @@ -4681,18 +4359,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4853,12 +4519,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -4879,18 +4539,6 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "license": "(AFL-2.1 OR BSD-3-Clause)" }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -4904,28 +4552,6 @@ "node": ">=6" } }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/lightningcss": { "version": "1.32.0", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", @@ -5281,21 +4907,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "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.groupby": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", @@ -5611,12 +5222,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, "node_modules/node-releases": { "version": "2.0.47", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.47.tgz", @@ -5681,53 +5286,6 @@ ], "license": "MIT" }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "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/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5773,15 +5331,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -5851,30 +5400,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", - "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/pretty-ms": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz", @@ -5900,15 +5425,6 @@ "node": ">=0.4.0" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/qs": { "version": "6.15.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", @@ -6591,18 +6107,6 @@ "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/typed-inject": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/typed-inject/-/typed-inject-5.0.0.tgz", @@ -6701,15 +6205,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/vite": { "version": "8.0.14", "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.14.tgz", @@ -6917,15 +6412,6 @@ "node": ">=8" } }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -7028,18 +6514,6 @@ "node": ">=12" } }, - "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" - } - }, "node_modules/yoctocolors": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz", diff --git a/package.json b/package.json index 77a0f4c..20437bb 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,7 @@ "engines": { "node": ">=20" }, - "files": [ - "dist" - ], + "files": ["dist"], "publishConfig": { "access": "public" }, @@ -20,35 +18,30 @@ "build": "npx rollup -c", "start": "node dist/index.cjs", "test": "vitest run --coverage", - "lint": "eslint .", - "format": "prettier --write \"**/*.{js,ts}\"", + "lint": "biome lint .", + "format": "biome format --write .", "prepack": "npm run build", "prepare": "husky install", "test:mutation": "stryker run", "test:mutation:incremental": "node scripts/incremental-mutation.mjs" }, "lint-staged": { - "**/*.{js,ts}": [ - "eslint --fix", - "prettier --write" + "**/*.{js,ts,cjs,mjs}": [ + "biome check --write --no-errors-on-unmatched --files-ignore-unknown=true" ] }, "devDependencies": { + "@biomejs/biome": "2.5.1", "@commitlint/cli": "20.5.0", "@commitlint/config-conventional": "20.5.0", - "@eslint/js": "10.0.1", "@rollup/plugin-terser": "1.0.0", "@rollup/plugin-typescript": "12.1.4", "@stryker-mutator/core": "9.6.1", "@stryker-mutator/vitest-runner": "9.6.1", "@types/node": "25.5.0", "@vitest/coverage-v8": "4.1.5", - "eslint": "10.0.3", - "eslint-config-prettier": "10.1.2", - "globals": "17.6.0", "husky": "9.1.7", "lint-staged": "16.3.3", - "prettier": "3.8.1", "rollup": "4.59.0", "typescript": "5.9.3", "vitest": "4.1.5" diff --git a/rollup.config.mjs b/rollup.config.mjs index 5e69720..9292db1 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -1,5 +1,5 @@ -import typescript from "@rollup/plugin-typescript"; import terser from "@rollup/plugin-terser"; +import typescript from "@rollup/plugin-typescript"; export default { input: "./src/index.ts", @@ -50,4 +50,4 @@ export default { declarationDir: "./dist/typings", }), ], -}; \ No newline at end of file +}; diff --git a/scripts/incremental-mutation.mjs b/scripts/incremental-mutation.mjs index 8321d59..4939f48 100644 --- a/scripts/incremental-mutation.mjs +++ b/scripts/incremental-mutation.mjs @@ -2,28 +2,37 @@ // Run Stryker only against `src/**/*.ts` files that changed vs the merge-base // with the base branch. Skip mutation testing when nothing changed. -import { spawnSync } from 'node:child_process'; +import { spawnSync } from "node:child_process"; -const baseBranch = process.env.MUTATION_BASE_BRANCH ?? 'origin/main'; +const baseBranch = process.env.MUTATION_BASE_BRANCH ?? "origin/main"; function git(...args) { - const result = spawnSync('git', args, { encoding: 'utf-8' }); + const result = spawnSync("git", args, { encoding: "utf-8" }); if (result.status !== 0) { - const stderr = (result.stderr ?? '').trim(); - throw new Error(`git ${args.join(' ')} failed: ${stderr}`); + const stderr = (result.stderr ?? "").trim(); + throw new Error(`git ${args.join(" ")} failed: ${stderr}`); } - return (result.stdout ?? '').trim(); + return (result.stdout ?? "").trim(); } function listChangedSourceFiles() { // --diff-filter=AM picks up Added and Modified files; deletions are skipped // because there is nothing left to mutate. Renames/copies are reported as // adds + deletes by default with --no-renames (omit; default is fine here). - const output = git('--no-pager', 'diff', '--name-only', '--diff-filter=AM', `--merge-base`, baseBranch, '--', 'src'); + const output = git( + "--no-pager", + "diff", + "--name-only", + "--diff-filter=AM", + `--merge-base`, + baseBranch, + "--", + "src", + ); return output - .split('\n') + .split("\n") .map((line) => line.trim()) - .filter((line) => line.endsWith('.ts')); + .filter((line) => line.endsWith(".ts")); } function main() { @@ -39,16 +48,20 @@ function main() { } if (files.length === 0) { - console.log('[incremental-mutation] No source files changed; skipping mutation testing.'); + console.log( + "[incremental-mutation] No source files changed; skipping mutation testing.", + ); return; } - console.log(`[incremental-mutation] Running Stryker against ${files.length} changed file(s):`); + console.log( + `[incremental-mutation] Running Stryker against ${files.length} changed file(s):`, + ); for (const file of files) console.log(` - ${file}`); - const args = ['stryker', 'run', '--mutate', files.join(',')]; - const stryker = spawnSync('npx', args, { stdio: 'inherit', shell: true }); + const args = ["stryker", "run", "--mutate", files.join(",")]; + const stryker = spawnSync("npx", args, { stdio: "inherit", shell: true }); process.exit(stryker.status ?? 1); } -main(); \ No newline at end of file +main(); diff --git a/src/ai/aiSummary.ts b/src/ai/aiSummary.ts index 669a8d2..90276f7 100644 --- a/src/ai/aiSummary.ts +++ b/src/ai/aiSummary.ts @@ -2,8 +2,8 @@ import { generateText } from "ai"; import type { CommitInfo, DiffSummary } from "../git/gitDiff.js"; import { - DEFAULT_LLM_MAX_DIFF_CHARS, DEFAULT_GIT_DIFF_SYSTEM_PROMPT, + DEFAULT_LLM_MAX_DIFF_CHARS, LLM_GATEWAY_REQUIRED_MESSAGE, } from "./aiConstants.js"; import type { diff --git a/src/git/diffNameStatusParse.ts b/src/git/diffNameStatusParse.ts index cf78460..5996986 100644 --- a/src/git/diffNameStatusParse.ts +++ b/src/git/diffNameStatusParse.ts @@ -1,5 +1,5 @@ -import type { DiffStatus } from "./diffTypes.js"; import { mapGitStatus, mergeStatus } from "./diffGitStatus.js"; +import type { DiffStatus } from "./diffTypes.js"; export type ParsedNameEntry = { path: string; diff --git a/src/git/diffSummaryBuild.ts b/src/git/diffSummaryBuild.ts index 17c68a8..0e2b518 100644 --- a/src/git/diffSummaryBuild.ts +++ b/src/git/diffSummaryBuild.ts @@ -1,11 +1,11 @@ -import type { DiffStatus, DiffSummary } from "./diffTypes.js"; import { mergeNameEntriesByPath, - parseNameStatusLines, type ParsedNameEntry, + parseNameStatusLines, } from "./diffNameStatusParse.js"; import { accumulateNumStat } from "./diffNumstatParse.js"; import { parseDiffSummary } from "./diffSummaryParse.js"; +import type { DiffStatus, DiffSummary } from "./diffTypes.js"; const STATUS_TO_SYNTHETIC_PREFIX: Record = { added: "A", diff --git a/src/git/diffSummaryParse.ts b/src/git/diffSummaryParse.ts index 612d90b..5594357 100644 --- a/src/git/diffSummaryParse.ts +++ b/src/git/diffSummaryParse.ts @@ -1,5 +1,5 @@ -import type { DiffFileSummary, DiffStatus, DiffSummary } from "./diffTypes.js"; import { mapGitStatus, mergeStatus } from "./diffGitStatus.js"; +import type { DiffFileSummary, DiffStatus, DiffSummary } from "./diffTypes.js"; type ParsedDiffSummaryLine = { status: DiffStatus; diff --git a/src/git/gitDiff.ts b/src/git/gitDiff.ts index 87a1290..020bdb7 100644 --- a/src/git/gitDiff.ts +++ b/src/git/gitDiff.ts @@ -1,3 +1,13 @@ +export { filterCommitsByMessageRegexes } from "./commitMessageFilter.js"; + +export { buildDiffPathspecs } from "./diffPathspecs.js"; +export type { DiffShapingOptions } from "./diffShaping.js"; +export { + buildDiffShapingGitArgs, + DEFAULT_NOISE_EXCLUDES, + shapeUnifiedDiff, +} from "./diffShaping.js"; +export { parseDiffSummary } from "./diffSummaryParse.js"; export type { CommitInfo, DiffFileSummary, @@ -6,9 +16,6 @@ export type { DiffSummary, GitDiffRangeQuery, } from "./diffTypes.js"; - -export { buildDiffPathspecs } from "./diffPathspecs.js"; -export { filterCommitsByMessageRegexes } from "./commitMessageFilter.js"; export type { GitClient } from "./gitDiffOps.js"; export { createGitClient, @@ -18,10 +25,3 @@ export { getDiffSummary, getRepoRoot, } from "./gitDiffOps.js"; -export { parseDiffSummary } from "./diffSummaryParse.js"; -export type { DiffShapingOptions } from "./diffShaping.js"; -export { - DEFAULT_NOISE_EXCLUDES, - buildDiffShapingGitArgs, - shapeUnifiedDiff, -} from "./diffShaping.js"; diff --git a/src/git/gitDiffOps.ts b/src/git/gitDiffOps.ts index 3aa6d01..0f0c826 100644 --- a/src/git/gitDiffOps.ts +++ b/src/git/gitDiffOps.ts @@ -1,14 +1,13 @@ import { exec } from "dugite"; - +import { buildDiffPathspecs } from "./diffPathspecs.js"; +import { buildDiffShapingGitArgs, shapeUnifiedDiff } from "./diffShaping.js"; +import { buildDiffSummaryFromGitOutputs } from "./diffSummaryBuild.js"; import type { CommitInfo, DiffPathFilter, DiffSummary, GitDiffRangeQuery, } from "./diffTypes.js"; -import { buildDiffPathspecs } from "./diffPathspecs.js"; -import { buildDiffShapingGitArgs, shapeUnifiedDiff } from "./diffShaping.js"; -import { buildDiffSummaryFromGitOutputs } from "./diffSummaryBuild.js"; export type GitClient = { run(args: string[]): Promise; diff --git a/src/index.ts b/src/index.ts index 4a936c0..4766353 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,17 +2,17 @@ import { generateSummary } from "./ai/aiSummary.js"; import type { LlmModelProvider, SummarizeFlags } from "./ai/aiTypes.js"; import type { LlmProviderId } from "./ai/llmProviders.js"; import { + type CommitInfo, createGitClient, DEFAULT_NOISE_EXCLUDES, + type DiffPathFilter, + type DiffShapingOptions, filterCommitsByMessageRegexes, + type GitClient, getChangedFiles, getCommits, getDiff, getDiffSummary, - type CommitInfo, - type DiffPathFilter, - type DiffShapingOptions, - type GitClient, } from "./git/gitDiff.js"; export type GitDiffAiSummaryOptions = { @@ -207,6 +207,33 @@ export async function summarizeGitDiff( }); } +export { + DEFAULT_GIT_DIFF_SYSTEM_PROMPT, + LLM_GATEWAY_REQUIRED_MESSAGE, +} from "./ai/aiConstants.js"; +export { + generateSummary, + resolveLlmMaxDiffChars, + truncateUnifiedDiffForLlm, +} from "./ai/aiSummary.js"; + +export type { + GenerateSummaryInput, + LlmModelProvider, + SummarizeFlags, +} from "./ai/aiTypes.js"; +export type { + LlmProviderId, + ResolveLanguageModelOptions, +} from "./ai/llmProviders.js"; +export { + defaultModelForProvider, + detectLlmProvider, + isLlmProviderConfigured, + parseLlmDefaultHeadersFromEnv, + resolveLanguageModel, + resolveLlmBaseUrl, +} from "./ai/llmProviders.js"; export type { CommitInfo, DiffFileSummary, @@ -217,10 +244,10 @@ export type { GitDiffRangeQuery, } from "./git/gitDiff.js"; export { - DEFAULT_NOISE_EXCLUDES, buildDiffPathspecs, buildDiffShapingGitArgs, createGitClient, + DEFAULT_NOISE_EXCLUDES, filterCommitsByMessageRegexes, getChangedFiles, getCommits, @@ -229,32 +256,3 @@ export { getRepoRoot, shapeUnifiedDiff, } from "./git/gitDiff.js"; - -export type { - GenerateSummaryInput, - LlmModelProvider, - SummarizeFlags, -} from "./ai/aiTypes.js"; -export { - generateSummary, - resolveLlmMaxDiffChars, - truncateUnifiedDiffForLlm, -} from "./ai/aiSummary.js"; - -export type { - LlmProviderId, - ResolveLanguageModelOptions, -} from "./ai/llmProviders.js"; -export { - defaultModelForProvider, - detectLlmProvider, - isLlmProviderConfigured, - parseLlmDefaultHeadersFromEnv, - resolveLanguageModel, - resolveLlmBaseUrl, -} from "./ai/llmProviders.js"; - -export { - DEFAULT_GIT_DIFF_SYSTEM_PROMPT, - LLM_GATEWAY_REQUIRED_MESSAGE, -} from "./ai/aiConstants.js"; diff --git a/stryker.config.mjs b/stryker.config.mjs index 3f9a806..ad0d21f 100644 --- a/stryker.config.mjs +++ b/stryker.config.mjs @@ -1,13 +1,20 @@ /** @type {import('@stryker-mutator/core').PartialStrykerOptions} */ export default { - testRunner: 'vitest', - mutate: ['src/**/*.ts', '!src/index.ts', '!src/git/gitDiff.ts', '!src/git/diffTypes.ts', '!src/ai/aiTypes.ts', '!src/ai/aiConstants.ts'], - reporters: ['html', 'clear-text', 'progress', 'json', 'dashboard'], - coverageAnalysis: 'perTest', + testRunner: "vitest", + mutate: [ + "src/**/*.ts", + "!src/index.ts", + "!src/git/gitDiff.ts", + "!src/git/diffTypes.ts", + "!src/ai/aiTypes.ts", + "!src/ai/aiConstants.ts", + ], + reporters: ["html", "clear-text", "progress", "json", "dashboard"], + coverageAnalysis: "perTest", dashboard: { - project: 'github.com/mcarvin8/smart-diff', - version: 'main', - reportType: 'full', + project: "github.com/mcarvin8/smart-diff", + version: "main", + reportType: "full", }, thresholds: { high: 80, @@ -15,6 +22,6 @@ export default { break: null, }, vitest: { - configFile: 'vitest.config.ts', + configFile: "vitest.config.ts", }, }; diff --git a/test/aiSummary.spec.ts b/test/aiSummary.spec.ts index 60fc48a..67b8012 100644 --- a/test/aiSummary.spec.ts +++ b/test/aiSummary.spec.ts @@ -1,14 +1,14 @@ -import type { CommitInfo } from "../src/git/gitDiff"; +import { + DEFAULT_GIT_DIFF_SYSTEM_PROMPT, + LLM_GATEWAY_REQUIRED_MESSAGE, +} from "../src/ai/aiConstants"; import { generateSummary, resolveLlmMaxDiffChars, truncateUnifiedDiffForLlm, } from "../src/ai/aiSummary"; -import { - DEFAULT_GIT_DIFF_SYSTEM_PROMPT, - LLM_GATEWAY_REQUIRED_MESSAGE, -} from "../src/ai/aiConstants"; import * as llmProviders from "../src/ai/llmProviders"; +import type { CommitInfo } from "../src/git/gitDiff"; import { extractSystemText, extractUserText, diff --git a/test/diffShaping.spec.ts b/test/diffShaping.spec.ts index ac58a92..b887425 100644 --- a/test/diffShaping.spec.ts +++ b/test/diffShaping.spec.ts @@ -1,6 +1,6 @@ import { - DEFAULT_NOISE_EXCLUDES, buildDiffShapingGitArgs, + DEFAULT_NOISE_EXCLUDES, shapeUnifiedDiff, } from "../src/git/gitDiff"; diff --git a/test/gitDiff.async.spec.ts b/test/gitDiff.async.spec.ts index e1fe489..e57dba9 100644 --- a/test/gitDiff.async.spec.ts +++ b/test/gitDiff.async.spec.ts @@ -1,16 +1,15 @@ import { join } from "node:path"; -import type { Mock } from "vitest"; - import { exec } from "dugite"; +import type { Mock } from "vitest"; import { + type CommitInfo, createGitClient, + type GitClient, getChangedFiles, getCommits, getDiff, getDiffSummary, getRepoRoot, - type CommitInfo, - type GitClient, } from "../src/git/gitDiff"; vi.mock("dugite", () => ({ exec: vi.fn() })); diff --git a/test/gitDiff.spec.ts b/test/gitDiff.spec.ts index 721cdb8..50f9dee 100644 --- a/test/gitDiff.spec.ts +++ b/test/gitDiff.spec.ts @@ -2,9 +2,9 @@ import { join } from "node:path"; import { buildDiffPathspecs, + type CommitInfo, filterCommitsByMessageRegexes, parseDiffSummary, - type CommitInfo, } from "../src/git/gitDiff"; describe("buildDiffPathspecs", () => { diff --git a/test/llmProviders.spec.ts b/test/llmProviders.spec.ts index 05897eb..c21d507 100644 --- a/test/llmProviders.spec.ts +++ b/test/llmProviders.spec.ts @@ -81,24 +81,24 @@ vi.mock("@ai-sdk/deepseek", () => ({ })), })); -import { createOpenAI } from "@ai-sdk/openai"; -import { createOpenAICompatible } from "@ai-sdk/openai-compatible"; import { createAnthropic } from "@ai-sdk/anthropic"; -import { createGoogleGenerativeAI } from "@ai-sdk/google"; -import { createMistral } from "@ai-sdk/mistral"; import { createCohere } from "@ai-sdk/cohere"; +import { createDeepSeek } from "@ai-sdk/deepseek"; +import { createGoogleGenerativeAI } from "@ai-sdk/google"; import { createGroq } from "@ai-sdk/groq"; +import { createMistral } from "@ai-sdk/mistral"; +import { createOpenAI } from "@ai-sdk/openai"; +import { createOpenAICompatible } from "@ai-sdk/openai-compatible"; import { createXai } from "@ai-sdk/xai"; -import { createDeepSeek } from "@ai-sdk/deepseek"; import { defaultModelForProvider, detectLlmProvider, isLlmProviderConfigured, + type LlmProviderId, parseLlmDefaultHeadersFromEnv, resolveLanguageModel, resolveLlmBaseUrl, - type LlmProviderId, } from "../src/ai/llmProviders"; const ENV_KEYS = [ @@ -568,8 +568,9 @@ describe("resolveLanguageModel", () => { vi.doMock("@ai-sdk/anthropic", () => { throw new Error("Cannot find module '@ai-sdk/anthropic'"); }); - const { resolveLanguageModel: resolveAgain } = - await import("../src/ai/llmProviders"); + const { resolveLanguageModel: resolveAgain } = await import( + "../src/ai/llmProviders" + ); process.env.LLM_PROVIDER = "anthropic"; await expect(resolveAgain()).rejects.toThrow( /Failed to load optional provider package "@ai-sdk\/anthropic" for LLM_PROVIDER="anthropic".*Install it with/, @@ -588,20 +589,18 @@ describe("resolveLanguageModel", () => { ["deepseek", "@ai-sdk/deepseek"], ]; - it.each(missingPeerCases)( - "wraps missing %s package with provider id and install instruction", - async (provider, pkg) => { - vi.resetModules(); - vi.doMock(pkg, () => { - throw new Error("Module not found"); - }); - const { resolveLanguageModel: r } = - await import("../src/ai/llmProviders"); - await expect(r({ provider })).rejects.toThrow( - new RegExp( - `package "${pkg.replace(/\//g, "\\/")}.*LLM_PROVIDER="${provider}".*Install it with`, - ), - ); - }, - ); + it.each( + missingPeerCases, + )("wraps missing %s package with provider id and install instruction", async (provider, pkg) => { + vi.resetModules(); + vi.doMock(pkg, () => { + throw new Error("Module not found"); + }); + const { resolveLanguageModel: r } = await import("../src/ai/llmProviders"); + await expect(r({ provider })).rejects.toThrow( + new RegExp( + `package "${pkg.replace(/\//g, "\\/")}.*LLM_PROVIDER="${provider}".*Install it with`, + ), + ); + }); }); diff --git a/test/summarizeGitDiff.spec.ts b/test/summarizeGitDiff.spec.ts index b997db9..508601f 100644 --- a/test/summarizeGitDiff.spec.ts +++ b/test/summarizeGitDiff.spec.ts @@ -1,9 +1,8 @@ import { join } from "node:path"; import type { LanguageModel } from "ai"; import type { Mock } from "vitest"; - -import { summarizeGitDiff } from "../src/index"; import type { GitClient } from "../src/git/gitDiff"; +import { summarizeGitDiff } from "../src/index"; import { makeMockModel } from "./helpers/mockLlm"; function createMockGit(repoRoot: string): GitClient & { run: Mock } { diff --git a/tsconfig.json b/tsconfig.json index f638908..bdd1aa6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,4 +22,4 @@ }, "include": ["./src/**/*.ts"], "exclude": ["node_modules"] -} \ No newline at end of file +}