diff --git a/.changeset/biome-toolchain.md b/.changeset/biome-toolchain.md new file mode 100644 index 0000000..ecab1b0 --- /dev/null +++ b/.changeset/biome-toolchain.md @@ -0,0 +1,5 @@ +--- +"@tigrisdata/cli": patch +--- + +Migrate the lint/format toolchain from ESLint and Prettier to Biome. Internal change with no impact on the published CLI behavior. diff --git a/.changeset/config.json b/.changeset/config.json index 4e2e65e..6f8e152 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,9 +1,6 @@ { "$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json", - "changelog": [ - "@changesets/changelog-github", - { "repo": "tigrisdata/cli" } - ], + "changelog": ["@changesets/changelog-github", { "repo": "tigrisdata/cli" }], "commit": false, "fixed": [], "linked": [], diff --git a/.husky/pre-commit b/.husky/pre-commit index 13ae380..0ad376d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1 @@ -npm run lint -npm run format:check \ No newline at end of file +npm run check diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 46f2372..0000000 --- a/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "semi": true, - "trailingComma": "es5", - "singleQuote": true, - "printWidth": 80, - "tabWidth": 2, - "useTabs": false -} \ No newline at end of file diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..432c2a0 --- /dev/null +++ b/biome.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.5.2/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "includes": [ + "**", + "!**/dist", + "!**/node_modules", + "!**/*.cjs", + "!**/package-lock.json", + "!**/*.yaml", + "!**/*.yml", + "!src/command-registry.ts" + ] + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 80 + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "semicolons": "always", + "trailingCommas": "es5" + } + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedVariables": "error" + }, + "suspicious": { + "noExplicitAny": "warn", + "noVar": "error" + }, + "style": { + "useConst": "error", + "noNonNullAssertion": "off" + } + } + } +} diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index da7d714..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,29 +0,0 @@ -import eslint from "@eslint/js"; -import simpleImportSort from "eslint-plugin-simple-import-sort"; -import tseslint from "typescript-eslint"; - -export default tseslint.config( - eslint.configs.recommended, - ...tseslint.configs.recommended, - { - plugins: { "simple-import-sort": simpleImportSort }, - rules: { - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/no-explicit-any": "warn", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/consistent-type-imports": [ - "error", - { prefer: "type-imports", fixStyle: "separate-type-imports" }, - ], - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - "prefer-const": "error", - "no-var": "error", - }, - }, - { - ignores: ["dist/", "node_modules/", "**/*.cjs", "src/command-registry.ts"], - }, -); diff --git a/package-lock.json b/package-lock.json index 32f17e7..4020b2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tigrisdata/cli", - "version": "3.3.0", + "version": "3.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tigrisdata/cli", - "version": "3.3.0", + "version": "3.4.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -25,20 +25,16 @@ "tigris": "dist/cli.js" }, "devDependencies": { + "@biomejs/biome": "^2.5.2", "@changesets/changelog-github": "^0.7.0", "@changesets/cli": "^2.31.0", - "@eslint/js": "^10.0.1", "@types/node": "^22.19.11", "dotenv": "^17.4.2", - "eslint": "^10.2.1", - "eslint-plugin-simple-import-sort": "^13.0.0", "husky": "^9.1.7", - "prettier": "^3.8.3", "publint": "^0.3.18", "tsup": "^8.5.1", "tsx": "^4.21.0", "typescript": "^5.9.3", - "typescript-eslint": "^8.59.1", "vitest": "^4.1.5" } }, @@ -900,6 +896,181 @@ "node": ">=6.9.0" } }, + "node_modules/@biomejs/biome": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.5.2.tgz", + "integrity": "sha512-VQ3RCqr7JmDIX+w6stWYl+g/3bYofN3q2wDBHUKKc/c7i5QWrFKFBZYCYPWTE6agsUPMIZZe6/CMmVUfUAhkKA==", + "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.2", + "@biomejs/cli-darwin-x64": "2.5.2", + "@biomejs/cli-linux-arm64": "2.5.2", + "@biomejs/cli-linux-arm64-musl": "2.5.2", + "@biomejs/cli-linux-x64": "2.5.2", + "@biomejs/cli-linux-x64-musl": "2.5.2", + "@biomejs/cli-win32-arm64": "2.5.2", + "@biomejs/cli-win32-x64": "2.5.2" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.5.2.tgz", + "integrity": "sha512-e7P3P7EkwFc/KiX2AHw4YDLIBOMfG9CPCAwy52k5Bp0dfhkozx9hf6wCmIr2QeXy2XeccJ3V/Sg+hDmzYEqxSg==", + "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.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.5.2.tgz", + "integrity": "sha512-ymzMvjC1Jg0b9K0D26ZdARqFQXs7MocfLC5FOCGfkC0Ss+ACUJkX5364ZM5nT4NLZanHRZNVrZEy+Ibwcvux/g==", + "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.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.5.2.tgz", + "integrity": "sha512-t7sseOmqND57uUWTwlawU6BYj+J06T/9EkydzBhkrgw/FK3QVhjU2wsJR0frljrKZ0/I8A/rYw7284QgqjQfIQ==", + "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.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.5.2.tgz", + "integrity": "sha512-w+ANG0ZvTu9IeEg9QnstoOnk6L0fpwJifW6aHR18+cb5Z39bkANItYjAfMrnvce5tmMK+IQ6nPX7/kQFdam5iw==", + "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.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.5.2.tgz", + "integrity": "sha512-M/lOZrewzTCRDINbjhQ1gYYru37KlD3kJBQwwKCG0ckz5E9IZwIoJ3X0wBwRXA+yBDIwWUuPBHS67HzJY4dTfA==", + "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.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.5.2.tgz", + "integrity": "sha512-VArNLAzND063tF+XY0yPyM+DyahpzOMzOAvb7qs259nhjJWRjvjZdssuA+Rfl+l07+NOesKZ0Xu2yFrXyBMtzw==", + "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.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.5.2.tgz", + "integrity": "sha512-kbjFFKyZlzYnAuw7sRy5qDoFG6zrP40UK08oPQsWK0ct3NMnGSt+Bs1iviEEyEIP57N5MrykGXdO/wRiaR4lww==", + "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.2", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.5.2.tgz", + "integrity": "sha512-4InchVpdVmdkkkgjQqKpgvyu+VPnoF/7RPSw5YATgEVpt2j72wcCAeV5TwaE9ZGJUZWZn7v2CwSAj6CrMJEx8A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@changesets/apply-release-plan": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.1.1.tgz", @@ -1693,186 +1864,6 @@ "node": ">=18" } }, - "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, - "license": "MIT", - "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, - "license": "Apache-2.0", - "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, - "license": "MIT", - "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, - "license": "Apache-2.0", - "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, - "license": "Apache-2.0", - "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, - "license": "Apache-2.0", - "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, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.1.tgz", - "integrity": "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.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, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@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, - "license": "Apache-2.0", - "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, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@inquirer/external-editor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", @@ -2063,14 +2054,14 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", - "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@tybys/wasm-util": "^0.10.2" + "@tybys/wasm-util": "^0.10.3" }, "funding": { "type": "github", @@ -2247,6 +2238,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2264,6 +2258,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2281,6 +2278,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2298,6 +2298,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2315,6 +2318,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2332,6 +2338,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2510,6 +2519,9 @@ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2524,6 +2536,9 @@ "arm" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2538,6 +2553,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2552,6 +2570,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2566,6 +2587,9 @@ "loong64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2580,6 +2604,9 @@ "loong64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2594,6 +2621,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2608,6 +2638,9 @@ "ppc64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2622,6 +2655,9 @@ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2636,6 +2672,9 @@ "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2650,6 +2689,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2664,6 +2706,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2678,6 +2723,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3352,9 +3400,9 @@ } }, "node_modules/@tybys/wasm-util": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", - "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", "dev": true, "license": "MIT", "optional": true, @@ -3380,13 +3428,6 @@ "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, - "license": "MIT" - }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -3394,13 +3435,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/node": { "version": "22.19.17", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", @@ -3411,258 +3445,28 @@ "undici-types": "~6.21.0" } }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.1.tgz", - "integrity": "sha512-BOziFIfE+6osHO9FoJG4zjoHUcvI7fTNBSpdAwrNH0/TLvzjsk2oo8XSSOT2HhqUyhZPfHv4UOffoJ9oEEQ7Ag==", + "node_modules/@vitest/expect": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.5.tgz", + "integrity": "sha512-PWBaRY5JoKuRnHlUHfpV/KohFylaDZTupcXN1H9vYryNLOnitSw60Mw9IAE2r67NbwwzBw/Cc/8q9BK3kIX8Kw==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.59.1", - "@typescript-eslint/type-utils": "8.59.1", - "@typescript-eslint/utils": "8.59.1", - "@typescript-eslint/visitor-keys": "8.59.1", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.5", + "@vitest/utils": "4.1.5", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.59.1", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@typescript-eslint/parser": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.1.tgz", - "integrity": "sha512-HDQH9O/47Dxi1ceDhBXdaldtf/WV9yRYMjbjCuNk3qnaTD564qwv61Y7+gTxwxRKzSrgO5uhtw584igXVuuZkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.59.1", - "@typescript-eslint/types": "8.59.1", - "@typescript-eslint/typescript-estree": "8.59.1", - "@typescript-eslint/visitor-keys": "8.59.1", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.1.tgz", - "integrity": "sha512-+MuHQlHiEr00Of/IQbE/MmEoi44znZHbR/Pz7Opq4HryUOlRi+/44dro9Ycy8Fyo+/024IWtw8m4JUMCGTYxDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.59.1", - "@typescript-eslint/types": "^8.59.1", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.1.tgz", - "integrity": "sha512-LwuHQI4pDOYVKvmH2dkaJo6YZCSgouVgnS/z7yBPKBMvgtBvyLqiLy9Z6b7+m/TRcX1NFYUqZetI5Y+aT4GEfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.59.1", - "@typescript-eslint/visitor-keys": "8.59.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.1.tgz", - "integrity": "sha512-/0nEyPbX7gRsk0Uwfe4ALwwgxuA66d/l2mhRDNlAvaj4U3juhUtJNq0DsY8M2AYwwb9rEq2hrC3IcIcEt++iJA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.1.tgz", - "integrity": "sha512-klWPBR2ciQHS3f++ug/mVnWKPjBUo7icEL3FAO1lhAR1Z1i5NQYZ1EannMSRYcq5qCv5wNALlXr6fksRHyYl7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.59.1", - "@typescript-eslint/typescript-estree": "8.59.1", - "@typescript-eslint/utils": "8.59.1", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.1.tgz", - "integrity": "sha512-ZDCjgccSdYPw5Bxh+my4Z0lJU96ZDN7jbBzvmEn0FZx3RtU1C7VWl6NbDx94bwY3V5YsgwRzJPOgeY2Q/nLG8A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.1.tgz", - "integrity": "sha512-OUd+vJS05sSkOip+BkZ/2NS8RMxrAAJemsC6vU3kmfLyeaJT0TftHkV9mcx2107MmsBVXXexhVu4F0TZXyMl4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.59.1", - "@typescript-eslint/tsconfig-utils": "8.59.1", - "@typescript-eslint/types": "8.59.1", - "@typescript-eslint/visitor-keys": "8.59.1", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.1.tgz", - "integrity": "sha512-3pIeoXhCeYH9FSCBI8P3iNwJlGuzPlYKkTlen2O9T1DSeeg8UG8jstq6BLk+Mda0qup7mgk4z4XL4OzRaxZ8LA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.59.1", - "@typescript-eslint/types": "8.59.1", - "@typescript-eslint/typescript-estree": "8.59.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.1.tgz", - "integrity": "sha512-LdDNl6C5iJExcM0Yh0PwAIBb9PrSiCsWamF/JyEZawm3kFDnRoaq3LGE4bpyRao/fWeGKKyw7icx0YxrLFC5Cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.59.1", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vitest/expect": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.5.tgz", - "integrity": "sha512-PWBaRY5JoKuRnHlUHfpV/KohFylaDZTupcXN1H9vYryNLOnitSw60Mw9IAE2r67NbwwzBw/Cc/8q9BK3kIX8Kw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@standard-schema/spec": "^1.1.0", - "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.5", - "@vitest/utils": "4.1.5", - "chai": "^6.2.2", - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.5.tgz", - "integrity": "sha512-/x2EmFC4mT4NNzqvC3fmesuV97w5FC903KPmey4gsnJiMQ3Be1IlDKVaDaG8iqaLFHqJ2FVEkxZk5VmeLjIItw==", + "node_modules/@vitest/mocker": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.5.tgz", + "integrity": "sha512-/x2EmFC4mT4NNzqvC3fmesuV97w5FC903KPmey4gsnJiMQ3Be1IlDKVaDaG8iqaLFHqJ2FVEkxZk5VmeLjIItw==", "dev": true, "license": "MIT", "dependencies": { @@ -3767,16 +3571,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, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -3820,16 +3614,6 @@ "node": ">=12" } }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -3869,19 +3653,6 @@ "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==", "license": "MIT" }, - "node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", @@ -4052,13 +3823,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, - "license": "MIT" - }, "node_modules/default-browser": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", @@ -4206,159 +3970,6 @@ "@esbuild/win32-x64": "0.27.7" } }, - "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, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.2.1.tgz", - "integrity": "sha512-wiyGaKsDgqXvF40P8mDwiUp/KQjE1FdrIEJsM8PZ3XCiniTMXS3OHWWUe5FI5agoCnr8x4xPrTDZuxsBlNHl+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", - "@eslint/config-helpers": "^0.5.5", - "@eslint/core": "^1.2.1", - "@eslint/plugin-kit": "^0.7.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.2.0", - "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-plugin-simple-import-sort": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-13.0.0.tgz", - "integrity": "sha512-McAc+/Nlvcg4byY/CABGH8kqnefWBj8s3JA2okEtz8ixbECQgU46p0HkTUKa4YS7wvgGceimlc34p1nXqbWqtA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "eslint": ">=5.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, - "license": "BSD-2-Clause", - "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, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/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, - "license": "MIT", - "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/eslint/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, - "license": "MIT" - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "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/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -4373,42 +3984,6 @@ "node": ">=4" } }, - "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, - "license": "BSD-3-Clause", - "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, - "license": "BSD-2-Clause", - "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, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "node_modules/estree-walker": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", @@ -4419,16 +3994,6 @@ "@types/estree": "^1.0.0" } }, - "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, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -4455,13 +4020,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", @@ -4492,20 +4050,6 @@ "node": ">= 6" } }, - "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, - "license": "MIT" - }, - "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, - "license": "MIT" - }, "node_modules/fast-xml-builder": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.2.0.tgz", @@ -4553,19 +4097,6 @@ "reusify": "^1.0.4" } }, - "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, - "license": "MIT", - "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", @@ -4579,23 +4110,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, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/fix-dts-default-cjs-exports": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", @@ -4608,27 +4122,6 @@ "rollup": "^4.34.8" } }, - "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, - "license": "MIT", - "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, - "license": "ISC" - }, "node_modules/fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -4672,19 +4165,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "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, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -4786,16 +4266,6 @@ "node": ">= 4" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -4967,20 +4437,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "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, - "license": "MIT" - }, - "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, - "license": "MIT" - }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -4991,30 +4447,6 @@ "graceful-fs": "^4.1.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, - "license": "MIT", - "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, - "license": "MIT", - "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", @@ -5158,6 +4590,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5179,6 +4614,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5200,6 +4638,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5221,6 +4662,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5306,22 +4750,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.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, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lodash.startcase": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", @@ -5363,22 +4791,6 @@ "node": ">=8.6" } }, - "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/mlly": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", @@ -5440,13 +4852,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, - "license": "MIT" - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -5509,24 +4914,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "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/outdent": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", @@ -5547,38 +4934,6 @@ "node": ">=8" } }, - "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, - "license": "MIT", - "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, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-map": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", @@ -5794,32 +5149,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "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, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz", - "integrity": "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/publint": { "version": "0.3.18", "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.18.tgz", @@ -5842,16 +5171,6 @@ "url": "https://bjornlu.com/sponsor" } }, - "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, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/quansync": { "version": "0.2.11", "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", @@ -6474,19 +5793,6 @@ "tree-kill": "cli.js" } }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -6590,19 +5896,6 @@ "fsevents": "~2.3.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, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -6617,30 +5910,6 @@ "node": ">=14.17" } }, - "node_modules/typescript-eslint": { - "version": "8.59.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.1.tgz", - "integrity": "sha512-xqDcFVBmlrltH64lklOVp1wYxgJr6LVdg3NamBgH2OOQDLFdTKfIZXF5PfghrnXQKXZGTQs8tr1vL7fJvq8CTQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.59.1", - "@typescript-eslint/parser": "8.59.1", - "@typescript-eslint/typescript-estree": "8.59.1", - "@typescript-eslint/utils": "8.59.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, "node_modules/ufo": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", @@ -6665,16 +5934,6 @@ "node": ">= 4.0.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, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -6926,16 +6185,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, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wsl-utils": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.3.1.tgz", @@ -6981,19 +6230,6 @@ "funding": { "url": "https://github.com/sponsors/eemeli" } - }, - "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, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/package.json b/package.json index 26df984..b9eace0 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,10 @@ "build": "tsc --noEmit && tsup", "dev": "export $(grep -v '^#' .env.test | xargs) && (tsc --noEmit --watch --preserveWatchOutput & tsup --watch)", "cli": "export $(grep -v '^#' .env.test | xargs) && node dist/cli.js", - "lint": "eslint src test", - "lint:fix": "eslint src test --fix", - "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", - "format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"", + "lint": "biome lint", + "lint:fix": "biome lint --write", + "format": "biome format --write", + "format:check": "biome format", "test": "vitest run --exclude test/cli.test.ts", "test:watch": "vitest", "test:all": "vitest run", @@ -45,7 +45,9 @@ "prepare": "husky install", "changeset": "changeset", "version-packages": "changeset version", - "release": "changeset publish" + "release": "changeset publish", + "check": "biome check", + "check:fix": "biome check --write" }, "keywords": [ "cli", @@ -72,20 +74,16 @@ "yaml": "^2.8.3" }, "devDependencies": { + "@biomejs/biome": "^2.5.2", "@changesets/changelog-github": "^0.7.0", "@changesets/cli": "^2.31.0", - "@eslint/js": "^10.0.1", "@types/node": "^22.19.11", "dotenv": "^17.4.2", - "eslint": "^10.2.1", - "eslint-plugin-simple-import-sort": "^13.0.0", "husky": "^9.1.7", - "prettier": "^3.8.3", "publint": "^0.3.18", "tsup": "^8.5.1", "tsx": "^4.21.0", "typescript": "^5.9.3", - "typescript-eslint": "^8.59.1", "vitest": "^4.1.5" } } diff --git a/renovate.json b/renovate.json index 7efa111..8210325 100644 --- a/renovate.json +++ b/renovate.json @@ -1,9 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended", - ":semanticCommitTypeAll(chore)" - ], + "extends": ["config:recommended", ":semanticCommitTypeAll(chore)"], "timezone": "UTC", "schedule": ["* 0-8 * * 1"], "prConcurrentLimit": 5, diff --git a/scripts/build-binaries.ts b/scripts/build-binaries.ts index 29553ba..597df5a 100644 --- a/scripts/build-binaries.ts +++ b/scripts/build-binaries.ts @@ -8,9 +8,9 @@ * npx tsx scripts/build-binaries.ts linux-x64 # build one target */ -import { execSync } from 'child_process'; -import { mkdirSync } from 'fs'; -import { join } from 'path'; +import { execSync } from 'node:child_process'; +import { mkdirSync } from 'node:fs'; +import { join } from 'node:path'; const ENTRY = 'src/cli-binary.ts'; const OUT_DIR = join(process.cwd(), 'bin'); diff --git a/scripts/generate-registry.ts b/scripts/generate-registry.ts index 6079363..0de6402 100644 --- a/scripts/generate-registry.ts +++ b/scripts/generate-registry.ts @@ -9,8 +9,8 @@ * Run: npm run generate:registry */ -import { existsSync, readFileSync, writeFileSync } from 'fs'; -import { join } from 'path'; +import { existsSync, readFileSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; import * as YAML from 'yaml'; import type { CommandSpec, Specs } from '../src/types.js'; @@ -134,7 +134,9 @@ const specs: Specs = YAML.parse(specsContent, { schema: 'core' }); const entries = collectEntries(specs.commands); console.log(`Found ${entries.length} command implementations:`); -entries.forEach((e) => console.log(` ${e.key}`)); +entries.forEach((e) => { + console.log(` ${e.key}`); +}); const output = generateRegistry(entries); writeFileSync(OUTPUT_PATH, output); diff --git a/scripts/update-docs.ts b/scripts/update-docs.ts index 8b3f23d..93819a7 100644 --- a/scripts/update-docs.ts +++ b/scripts/update-docs.ts @@ -1,6 +1,6 @@ -import { existsSync, readFileSync, writeFileSync } from 'fs'; -import { dirname, join } from 'path'; -import { fileURLToPath } from 'url'; +import { existsSync, readFileSync, writeFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; import * as yaml from 'yaml'; import type { CommandSpec } from '../src/types.js'; @@ -18,7 +18,7 @@ interface Specs { function isImplemented(...parts: string[]): boolean { const base = join(libDir, ...parts); - const paths = [base + '.ts', join(base, 'index.ts')]; + const paths = [`${base}.ts`, join(base, 'index.ts')]; return paths.some((p) => existsSync(p) && !p.includes('/_')); } @@ -49,7 +49,7 @@ function getPositionalSuffix(cmd: CommandSpec): string { const positionals = (cmd.arguments ?? []) .filter((a) => a.type === 'positional' && !a.removed) .map((a) => (a.required ? `<${a.name}>` : `[${a.name}]`)); - return positionals.length ? ' ' + positionals.join(' ') : ''; + return positionals.length ? ` ${positionals.join(' ')}` : ''; } function renderCommandTable( diff --git a/src/auth/client.ts b/src/auth/client.ts index 4f2e6a1..96c0ee9 100644 --- a/src/auth/client.ts +++ b/src/auth/client.ts @@ -215,7 +215,7 @@ export class TigrisAuthClient { const idTokenClaims = await this.verifyIdToken(data.id_token); - if (idTokenClaims['email_verified'] === false) { + if (idTokenClaims.email_verified === false) { console.log( 'Email not verified. Please verify your email and try again.' ); @@ -322,7 +322,7 @@ export class TigrisAuthClient { async getIdTokenClaims(): Promise { const tokens = await storage.getTokens(); - if (!tokens || !tokens.idToken) { + if (!tokens?.idToken) { throw new Error( 'Not authenticated. Please run "tigris login" to authenticate.' ); diff --git a/src/auth/iam.ts b/src/auth/iam.ts index acb703d..c4bfd71 100644 --- a/src/auth/iam.ts +++ b/src/auth/iam.ts @@ -7,7 +7,9 @@ import { failWithError } from '@utils/exit.js'; import type { MessageContext } from '@utils/messages.js'; import { getAuthClient } from './client.js'; + export { isFlyOrganization } from './fly.js'; + import { getTigrisConfig, resolveAuthMethod } from './provider.js'; import { getLoginMethod, getSelectedOrganization } from './storage.js'; diff --git a/src/auth/provider.ts b/src/auth/provider.ts index eef6c58..607e5c6 100644 --- a/src/auth/provider.ts +++ b/src/auth/provider.ts @@ -14,9 +14,9 @@ import { getAuth0Config, getAuthClient } from './client.js'; import { type CredentialsConfig, getAwsProfileConfig, - getLoginMethod as getStoredLoginMethod, getSelectedOrganization, getStoredCredentials, + getLoginMethod as getStoredLoginMethod, hasAwsProfile, } from './storage.js'; diff --git a/src/auth/storage.ts b/src/auth/storage.ts index 59042b5..c6ae816 100644 --- a/src/auth/storage.ts +++ b/src/auth/storage.ts @@ -2,18 +2,18 @@ * Secure storage using a single config file */ -import { loadSharedConfigFiles } from '@smithy/shared-ini-file-loader'; -import type { Organization } from '@tigrisdata/iam'; -import { execFileSync } from 'child_process'; +import { execFileSync } from 'node:child_process'; import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync, -} from 'fs'; -import { homedir, platform } from 'os'; -import { join } from 'path'; +} from 'node:fs'; +import { homedir, platform } from 'node:os'; +import { join } from 'node:path'; +import { loadSharedConfigFiles } from '@smithy/shared-ini-file-loader'; +import type { Organization } from '@tigrisdata/iam'; export interface TokenSet { accessToken: string; @@ -121,18 +121,18 @@ function migrateV1(raw: Record): TigrisConfigV2 { const config: TigrisConfigV2 = { version: 2 }; // Preserve saved credentials if they look valid - const creds = raw['credentials']; + const creds = raw.credentials; if ( isRecord(creds) && - typeof creds['accessKeyId'] === 'string' && - typeof creds['secretAccessKey'] === 'string' && - typeof creds['endpoint'] === 'string' + typeof creds.accessKeyId === 'string' && + typeof creds.secretAccessKey === 'string' && + typeof creds.endpoint === 'string' ) { config.credentials = { saved: { - accessKeyId: creds['accessKeyId'], - secretAccessKey: creds['secretAccessKey'], - endpoint: creds['endpoint'], + accessKeyId: creds.accessKeyId, + secretAccessKey: creds.secretAccessKey, + endpoint: creds.endpoint, }, }; } @@ -157,7 +157,7 @@ function readConfig(): TigrisConfigV2 { } // Already v2 - if (parsed['version'] === 2) { + if (parsed.version === 2) { return parsed as unknown as TigrisConfigV2; } @@ -326,10 +326,9 @@ export async function getAwsProfileConfig( } return { - endpoint: - profileConfig['endpoint_url_s3'] || profileConfig['endpoint_url'], - iamEndpoint: profileConfig['endpoint_url_iam'], - region: profileConfig['region'], + endpoint: profileConfig.endpoint_url_s3 || profileConfig.endpoint_url, + iamEndpoint: profileConfig.endpoint_url_iam, + region: profileConfig.region, }; } catch { return {}; diff --git a/src/cli-core.ts b/src/cli-core.ts index aef0b57..2334631 100644 --- a/src/cli-core.ts +++ b/src/cli-core.ts @@ -62,16 +62,12 @@ function checkUnknownSubcommand( return positional; } -export interface ModuleLoader { - (commandPath: string[]): Promise<{ - module: Record | null; - error: string | null; - }>; -} +export type ModuleLoader = (commandPath: string[]) => Promise<{ + module: Record | null; + error: string | null; +}>; -export interface ImplementationChecker { - (commandPath: string[]): boolean; -} +export type ImplementationChecker = (commandPath: string[]) => boolean; export interface CLIConfig { specs: Specs; @@ -120,7 +116,7 @@ export function formatArgumentHelp(arg: Argument): string { const minPadding = 26; const paddedOptionPart = optionPart.length >= minPadding - ? optionPart + ' ' + ? `${optionPart} ` : optionPart.padEnd(minPadding); let description = arg.description; @@ -403,7 +399,7 @@ function getOptionValue( ): unknown { if (args) { const argDef = args.find((a) => a.name === argName); - if (argDef && argDef.alias && typeof argDef.alias === 'string') { + if (argDef?.alias && typeof argDef.alias === 'string') { const aliasKey = argDef.alias.charAt(0).toUpperCase() + argDef.alias.slice(1); if (options[aliasKey] !== undefined) { @@ -567,7 +563,9 @@ export function registerCommands( if (spec.alias) { const aliases = Array.isArray(spec.alias) ? spec.alias : [spec.alias]; - aliases.forEach((alias) => cmd.alias(alias)); + aliases.forEach((alias) => { + cmd.alias(alias); + }); } // Removed commands: register a redirect-and-exit action; skip diff --git a/src/cli.ts b/src/cli.ts index 93ffdb7..04ec53f 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,8 +1,8 @@ #!/usr/bin/env node -import { existsSync } from 'fs'; -import { dirname, join } from 'path'; -import { fileURLToPath } from 'url'; +import { existsSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { version } from '../package.json'; import { @@ -27,7 +27,7 @@ const specs = loadSpecs(); const hasImplementation: ImplementationChecker = (pathParts) => { if (pathParts.length === 0) return false; - const directPath = join(__dirname, 'lib', ...pathParts) + '.js'; + const directPath = `${join(__dirname, 'lib', ...pathParts)}.js`; if (existsSync(directPath)) return true; const indexPath = join(__dirname, 'lib', ...pathParts, 'index.js'); diff --git a/src/global.d.ts b/src/global.d.ts index 727ff22..adc36da 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -4,5 +4,5 @@ declare module '*.yaml' { } // Global JSON mode flag set by CLI core when --json or --format=json is used -// eslint-disable-next-line no-var +// biome-ignore lint/suspicious/noVar: `var` is required to augment the global scope (globalThis) declare var __TIGRIS_JSON_MODE: boolean | undefined; diff --git a/src/lib/access-keys/attach-policy.ts b/src/lib/access-keys/attach-policy.ts index 38ce608..15a04ef 100644 --- a/src/lib/access-keys/attach-policy.ts +++ b/src/lib/access-keys/attach-policy.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getIAMConfig } from '@auth/iam.js'; import { attachPolicyToAccessKey, diff --git a/src/lib/access-keys/detach-policy.ts b/src/lib/access-keys/detach-policy.ts index 0588636..2cd30b2 100644 --- a/src/lib/access-keys/detach-policy.ts +++ b/src/lib/access-keys/detach-policy.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getIAMConfig } from '@auth/iam.js'; import { detachPolicyFromAccessKey, diff --git a/src/lib/access-keys/list-policies.ts b/src/lib/access-keys/list-policies.ts index 05863a5..d2ebb5d 100644 --- a/src/lib/access-keys/list-policies.ts +++ b/src/lib/access-keys/list-policies.ts @@ -9,8 +9,7 @@ import { printStart, printSuccess, } from '@utils/messages.js'; -import { getFormat, getPaginationOptions } from '@utils/options.js'; -import { getOption } from '@utils/options.js'; +import { getFormat, getOption, getPaginationOptions } from '@utils/options.js'; const context = msg('access-keys', 'list-policies'); diff --git a/src/lib/buckets/lifecycle/shared.ts b/src/lib/buckets/lifecycle/shared.ts index cc1ec97..4f58679 100644 --- a/src/lib/buckets/lifecycle/shared.ts +++ b/src/lib/buckets/lifecycle/shared.ts @@ -6,7 +6,7 @@ import { } from '@tigrisdata/storage'; import { describeExpiration, describeTransition } from '@utils/bucket-info.js'; import { failWithError } from '@utils/exit.js'; -import { type MessageContext } from '@utils/messages.js'; +import type { MessageContext } from '@utils/messages.js'; import { getOption } from '@utils/options.js'; const VALID_TRANSITION_CLASSES = [ @@ -22,7 +22,9 @@ function isTransitionClass(value: string): value is TransitionClass { } function isIsoDate(value: string): boolean { - return /^\d{4}-\d{2}-\d{2}/.test(value) && !isNaN(new Date(value).getTime()); + return ( + /^\d{4}-\d{2}-\d{2}/.test(value) && !Number.isNaN(new Date(value).getTime()) + ); } type RuleInput = { @@ -90,7 +92,7 @@ export function validateRuleFieldCombinations( if ( input.days !== undefined && - (isNaN(Number(input.days)) || Number(input.days) <= 0) + (Number.isNaN(Number(input.days)) || Number(input.days) <= 0) ) { return '--days must be a positive number'; } @@ -105,7 +107,7 @@ export function validateRuleFieldCombinations( if ( input.expireDays !== undefined && - (isNaN(Number(input.expireDays)) || Number(input.expireDays) <= 0) + (Number.isNaN(Number(input.expireDays)) || Number(input.expireDays) <= 0) ) { return '--expire-days must be a positive number'; } diff --git a/src/lib/buckets/migrate.ts b/src/lib/buckets/migrate.ts index bfefeff..d668549 100644 --- a/src/lib/buckets/migrate.ts +++ b/src/lib/buckets/migrate.ts @@ -190,7 +190,7 @@ function printProgress(state: MigrationState, bucket: string): void { function clearProgress(): void { if (!process.stderr.isTTY || globalThis.__TIGRIS_JSON_MODE) return; - process.stderr.write('\r' + ' '.repeat(100) + '\r'); + process.stderr.write(`\r${' '.repeat(100)}\r`); } async function flushScheduleBatch( diff --git a/src/lib/buckets/set-cors.ts b/src/lib/buckets/set-cors.ts index 02e2f41..144a20e 100644 --- a/src/lib/buckets/set-cors.ts +++ b/src/lib/buckets/set-cors.ts @@ -43,7 +43,10 @@ export default async function setCors(options: Record) { failWithError(context, 'Provide --origins or --reset'); } - if (maxAge !== undefined && (isNaN(Number(maxAge)) || Number(maxAge) <= 0)) { + if ( + maxAge !== undefined && + (Number.isNaN(Number(maxAge)) || Number(maxAge) <= 0) + ) { failWithError(context, '--max-age must be a positive number'); } diff --git a/src/lib/buckets/set.ts b/src/lib/buckets/set.ts index fe55cb0..45bd331 100644 --- a/src/lib/buckets/set.ts +++ b/src/lib/buckets/set.ts @@ -1,5 +1,5 @@ import { getStorageConfigWithOrg } from '@auth/provider.js'; -import { updateBucket, type UpdateBucketOptions } from '@tigrisdata/storage'; +import { type UpdateBucketOptions, updateBucket } from '@tigrisdata/storage'; import { failWithError } from '@utils/exit.js'; import { parseLocations } from '@utils/locations.js'; import { msg, printStart, printSuccess } from '@utils/messages.js'; diff --git a/src/lib/bundle.ts b/src/lib/bundle.ts index 351c14c..e6f1e83 100644 --- a/src/lib/bundle.ts +++ b/src/lib/bundle.ts @@ -1,11 +1,11 @@ +import { createWriteStream, existsSync, readFileSync } from 'node:fs'; +import { Readable } from 'node:stream'; +import { pipeline } from 'node:stream/promises'; import { getStorageConfig } from '@auth/provider.js'; import { bundle } from '@tigrisdata/storage'; import { exitWithError } from '@utils/exit.js'; import { getFormat, getOption, readStdin } from '@utils/options.js'; import { parseAnyPath } from '@utils/path.js'; -import { createWriteStream, existsSync, readFileSync } from 'fs'; -import { Readable } from 'stream'; -import { pipeline } from 'stream/promises'; const MAX_KEYS = 5000; diff --git a/src/lib/configure/index.ts b/src/lib/configure/index.ts index 6a93220..a701b2f 100644 --- a/src/lib/configure/index.ts +++ b/src/lib/configure/index.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getTigrisConfig } from '@auth/provider.js'; import { storeCredentialOrganization, @@ -27,18 +29,17 @@ export default async function configure(options: Record) { let accessKey = options['access-key'] || - options['accessKey'] || + options.accessKey || options.key || options.Key || options.accesskey; let accessSecret = options['access-secret'] || - options['accessSecret'] || + options.accessSecret || options.secret || options.Secret || options.accesssecret; - let endpoint = - options['endpoint'] || options.e || options.E || options.Endpoint; + let endpoint = options.endpoint || options.e || options.E || options.Endpoint; // If credentials are not provided via CLI args, prompt for them if (!accessKey || !accessSecret || !endpoint) { diff --git a/src/lib/cp.ts b/src/lib/cp.ts index 7e847de..61af4a9 100644 --- a/src/lib/cp.ts +++ b/src/lib/cp.ts @@ -1,3 +1,15 @@ +import { + createReadStream, + createWriteStream, + existsSync, + mkdirSync, + readdirSync, + statSync, +} from 'node:fs'; +import { homedir } from 'node:os'; +import { basename, dirname, join, relative, resolve } from 'node:path'; +import { Readable } from 'node:stream'; +import { pipeline } from 'node:stream/promises'; import { getStorageConfig } from '@auth/provider.js'; import { copy, get, head, list, put } from '@tigrisdata/storage'; import { executeWithConcurrency } from '@utils/concurrency.js'; @@ -14,18 +26,6 @@ import { wildcardPrefix, } from '@utils/path.js'; import { calculateUploadParams } from '@utils/upload.js'; -import { - createReadStream, - createWriteStream, - existsSync, - mkdirSync, - readdirSync, - statSync, -} from 'fs'; -import { homedir } from 'os'; -import { basename, dirname, join, relative, resolve } from 'path'; -import { Readable } from 'stream'; -import { pipeline } from 'stream/promises'; import type { ParsedPath } from '../types.js'; @@ -140,7 +140,7 @@ async function uploadFile( }); if (showProgress) { - process.stdout.write('\r' + ' '.repeat(60) + '\r'); + process.stdout.write(`\r${' '.repeat(60)}\r`); } if (putError) { @@ -201,7 +201,7 @@ async function downloadFile( await pipeline(nodeStream, writeStream); if (showProgress) { - process.stdout.write('\r' + ' '.repeat(60) + '\r'); + process.stdout.write(`\r${' '.repeat(60)}\r`); } return {}; @@ -320,7 +320,7 @@ async function copyLocalToRemote( return; } - let stats; + let stats: ReturnType; try { stats = statSync(localPath); } catch { diff --git a/src/lib/iam/policies/link-key.ts b/src/lib/iam/policies/link-key.ts index 0cbd726..ba1eb35 100644 --- a/src/lib/iam/policies/link-key.ts +++ b/src/lib/iam/policies/link-key.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getOAuthIAMConfig } from '@auth/iam.js'; import { attachPolicyToAccessKey, diff --git a/src/lib/iam/policies/select-policy.ts b/src/lib/iam/policies/select-policy.ts index 4f21b21..f4981a9 100644 --- a/src/lib/iam/policies/select-policy.ts +++ b/src/lib/iam/policies/select-policy.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { listPolicies } from '@tigrisdata/iam'; import { failWithError } from '@utils/exit.js'; import { requireInteractive } from '@utils/interactive.js'; diff --git a/src/lib/iam/policies/unlink-key.ts b/src/lib/iam/policies/unlink-key.ts index 16033d4..6dfd260 100644 --- a/src/lib/iam/policies/unlink-key.ts +++ b/src/lib/iam/policies/unlink-key.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getOAuthIAMConfig } from '@auth/iam.js'; import { detachPolicyFromAccessKey, getPolicy } from '@tigrisdata/iam'; import { failWithError } from '@utils/exit.js'; diff --git a/src/lib/iam/users/list.ts b/src/lib/iam/users/list.ts index 3473827..25dc6d0 100644 --- a/src/lib/iam/users/list.ts +++ b/src/lib/iam/users/list.ts @@ -68,7 +68,7 @@ export default async function list(options: Record) { console.log(formatJson({ users, invitations })); } else if (format === 'xml') { const lines = ['']; - lines.push(' ' + formatXml(users, 'users', 'user').replace(/\n/g, '\n ')); + lines.push(` ${formatXml(users, 'users', 'user').replace(/\n/g, '\n ')}`); lines.push( ' ' + formatXml(invitations, 'invitations', 'invitation').replace( diff --git a/src/lib/iam/users/remove.ts b/src/lib/iam/users/remove.ts index f820f90..2916412 100644 --- a/src/lib/iam/users/remove.ts +++ b/src/lib/iam/users/remove.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getOAuthIAMConfig, isFlyOrganization } from '@auth/iam.js'; import { listUsers, removeUser as removeUserFromOrg } from '@tigrisdata/iam'; import { failWithError } from '@utils/exit.js'; diff --git a/src/lib/iam/users/revoke-invitation.ts b/src/lib/iam/users/revoke-invitation.ts index 8246371..be528c8 100644 --- a/src/lib/iam/users/revoke-invitation.ts +++ b/src/lib/iam/users/revoke-invitation.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getOAuthIAMConfig, isFlyOrganization } from '@auth/iam.js'; import { listUsers, revokeInvitation as revokeInv } from '@tigrisdata/iam'; import { failWithError } from '@utils/exit.js'; diff --git a/src/lib/iam/users/update-role.ts b/src/lib/iam/users/update-role.ts index bc597ef..01b943f 100644 --- a/src/lib/iam/users/update-role.ts +++ b/src/lib/iam/users/update-role.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getOAuthIAMConfig, isFlyOrganization } from '@auth/iam.js'; import { listUsers, updateUserRole } from '@tigrisdata/iam'; import { failWithError } from '@utils/exit.js'; diff --git a/src/lib/login/credentials.ts b/src/lib/login/credentials.ts index 89aab7f..dfa8504 100644 --- a/src/lib/login/credentials.ts +++ b/src/lib/login/credentials.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { getTigrisConfig } from '@auth/provider.js'; import { clearOAuthData, @@ -30,13 +32,13 @@ export default async function credentials(options: Record) { let accessKey = options['access-key'] || - options['accessKey'] || + options.accessKey || options.key || options.Key || options.accesskey; let accessSecret = options['access-secret'] || - options['accessSecret'] || + options.accessSecret || options.secret || options.Secret || options.accesssecret; diff --git a/src/lib/login/select.ts b/src/lib/login/select.ts index 3b133f7..4e57d76 100644 --- a/src/lib/login/select.ts +++ b/src/lib/login/select.ts @@ -1,5 +1,7 @@ import enquirer from 'enquirer'; + const { prompt } = enquirer; + import { requireInteractive } from '@utils/interactive.js'; import credentials from './credentials.js'; @@ -14,13 +16,13 @@ export default async function select(options: Record) { // Check if access key and/or secret are provided const accessKey = options['access-key'] || - options['accessKey'] || + options.accessKey || options.key || options.Key || options.accesskey; const accessSecret = options['access-secret'] || - options['accessSecret'] || + options.accessSecret || options.secret || options.Secret || options.accesssecret; diff --git a/src/lib/objects/get.ts b/src/lib/objects/get.ts index aac7977..ca9252d 100644 --- a/src/lib/objects/get.ts +++ b/src/lib/objects/get.ts @@ -1,13 +1,13 @@ +import { createWriteStream, writeFileSync } from 'node:fs'; +import { extname } from 'node:path'; +import { Readable } from 'node:stream'; +import { pipeline } from 'node:stream/promises'; import { getStorageConfig } from '@auth/provider.js'; import { get } from '@tigrisdata/storage'; import { failWithError } from '@utils/exit.js'; import { msg, printStart, printSuccess } from '@utils/messages.js'; import { getFormat, getOption } from '@utils/options.js'; import { resolveObjectArgs } from '@utils/path.js'; -import { createWriteStream, writeFileSync } from 'fs'; -import { extname } from 'path'; -import { Readable } from 'stream'; -import { pipeline } from 'stream/promises'; const context = msg('objects', 'get'); diff --git a/src/lib/objects/put.ts b/src/lib/objects/put.ts index e5616d0..e003992 100644 --- a/src/lib/objects/put.ts +++ b/src/lib/objects/put.ts @@ -1,3 +1,5 @@ +import { createReadStream, statSync } from 'node:fs'; +import { Readable } from 'node:stream'; import { getStorageConfig } from '@auth/provider.js'; import { put } from '@tigrisdata/storage'; import { failWithError, printNextActions } from '@utils/exit.js'; @@ -7,8 +9,6 @@ import { getContentType } from '@utils/mime.js'; import { getFormat, getOption } from '@utils/options.js'; import { resolveObjectArgs } from '@utils/path.js'; import { calculateUploadParams } from '@utils/upload.js'; -import { createReadStream, statSync } from 'fs'; -import { Readable } from 'stream'; const context = msg('objects', 'put'); @@ -98,7 +98,7 @@ export default async function putObject(options: Record) { }); // Clear the progress line - process.stdout.write('\r' + ' '.repeat(60) + '\r'); + process.stdout.write(`\r${' '.repeat(60)}\r`); if (error) { failWithError(context, error); diff --git a/src/lib/presign.ts b/src/lib/presign.ts index f8df3dd..3028c18 100644 --- a/src/lib/presign.ts +++ b/src/lib/presign.ts @@ -9,6 +9,7 @@ import { formatJson } from '@utils/format.js'; import { getFormat, getOption } from '@utils/options.js'; import { parseAnyPath } from '@utils/path.js'; import enquirer from 'enquirer'; + const { prompt } = enquirer; export default async function presign(options: Record) { diff --git a/src/lib/update.ts b/src/lib/update.ts index a811278..04211d6 100644 --- a/src/lib/update.ts +++ b/src/lib/update.ts @@ -1,3 +1,4 @@ +import { execSync } from 'node:child_process'; import { failWithError } from '@utils/exit.js'; import { msg, @@ -11,7 +12,6 @@ import { getUpdateCommand, isNewerVersion, } from '@utils/update-check.js'; -import { execSync } from 'child_process'; import { version as currentVersion } from '../../package.json'; diff --git a/src/utils/format.ts b/src/utils/format.ts index 0b41245..674482b 100644 --- a/src/utils/format.ts +++ b/src/utils/format.ts @@ -5,7 +5,7 @@ export function formatSize(bytes: number): string { if (bytes === 0) return '0 B'; const units = ['B', 'KB', 'MB', 'GB', 'TB']; const i = Math.floor(Math.log(bytes) / Math.log(1024)); - return `${(bytes / Math.pow(1024, i)).toFixed(i > 0 ? 1 : 0)} ${units[i]}`; + return `${(bytes / 1024 ** i).toFixed(i > 0 ? 1 : 0)} ${units[i]}`; } /** @@ -75,7 +75,7 @@ export interface TableColumn { */ function truncate(str: string, maxLength: number): string { if (str.length <= maxLength) return str; - return str.slice(0, maxLength - 1) + '…'; + return `${str.slice(0, maxLength - 1)}…`; } /** @@ -91,7 +91,7 @@ function formatCellValue(value: unknown): string { if (typeof value === 'string') { // Try to parse as date if it looks like an ISO date const date = new Date(value); - if (!isNaN(date.getTime()) && value.includes('T')) { + if (!Number.isNaN(date.getTime()) && value.includes('T')) { return formatDate(date); } } @@ -191,14 +191,12 @@ export function formatTable>( const widths = calculateColumnWidths(items, columns); // Build header separator - const topBorder = '┌' + widths.map((w) => '─'.repeat(w + 2)).join('┬') + '┐'; - const middleBorder = - '├' + widths.map((w) => '─'.repeat(w + 2)).join('┼') + '┤'; - const bottomBorder = - '└' + widths.map((w) => '─'.repeat(w + 2)).join('┴') + '┘'; + const topBorder = `┌${widths.map((w) => '─'.repeat(w + 2)).join('┬')}┐`; + const middleBorder = `├${widths.map((w) => '─'.repeat(w + 2)).join('┼')}┤`; + const bottomBorder = `└${widths.map((w) => '─'.repeat(w + 2)).join('┴')}┘`; // Top border - lines.push('\n' + topBorder); + lines.push(`\n${topBorder}`); // Header row const headerRow = @@ -220,11 +218,11 @@ export function formatTable>( ? value.padStart(widths[i]) : value.padEnd(widths[i]); }); - lines.push('│ ' + cells.join(' │ ') + ' │'); + lines.push(`│ ${cells.join(' │ ')} │`); }); // Bottom border - lines.push(bottomBorder + '\n'); + lines.push(`${bottomBorder}\n`); return lines.join('\n'); } diff --git a/src/utils/interactive.ts b/src/utils/interactive.ts index a528214..e4411bf 100644 --- a/src/utils/interactive.ts +++ b/src/utils/interactive.ts @@ -1,4 +1,4 @@ -import * as readline from 'readline'; +import * as readline from 'node:readline'; /** * Guard for interactive-only operations. diff --git a/src/utils/mime.ts b/src/utils/mime.ts index 1ee3402..d5a14f9 100644 --- a/src/utils/mime.ts +++ b/src/utils/mime.ts @@ -1,4 +1,4 @@ -import { extname } from 'path'; +import { extname } from 'node:path'; /** * Inline MIME table covering the file types commonly served from diff --git a/src/utils/path.ts b/src/utils/path.ts index 2182e3e..ed7b3fc 100644 --- a/src/utils/path.ts +++ b/src/utils/path.ts @@ -79,7 +79,7 @@ export function globToRegex(pattern: string): RegExp { const escaped = pattern .replace(/[.+?^${}()|[\]\\]/g, '\\$&') .replace(/\*/g, '[^/]*'); - return new RegExp('^' + escaped + '$'); + return new RegExp(`^${escaped}$`); } /** diff --git a/src/utils/specs.ts b/src/utils/specs.ts index 85df8c3..2fffa77 100644 --- a/src/utils/specs.ts +++ b/src/utils/specs.ts @@ -1,6 +1,6 @@ -import { readFileSync } from 'fs'; -import { dirname, join } from 'path'; -import { fileURLToPath } from 'url'; +import { readFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; import * as YAML from 'yaml'; import type { Argument, CommandSpec, Specs } from '../types.js'; @@ -70,7 +70,7 @@ export function getArgumentSpec( ): Argument | null { const spec = getCommandSpec(commandName, operationName); - if (!spec || !spec.arguments) { + if (!spec?.arguments) { return null; } diff --git a/src/utils/update-check.ts b/src/utils/update-check.ts index 756e2fe..d8385ee 100644 --- a/src/utils/update-check.ts +++ b/src/utils/update-check.ts @@ -1,7 +1,7 @@ -import { mkdirSync, readFileSync, realpathSync, writeFileSync } from 'fs'; -import https from 'https'; -import { homedir } from 'os'; -import { join } from 'path'; +import { mkdirSync, readFileSync, realpathSync, writeFileSync } from 'node:fs'; +import https from 'node:https'; +import { homedir } from 'node:os'; +import { join } from 'node:path'; import { version as currentVersion } from '../../package.json'; import { @@ -66,7 +66,7 @@ export function isNewerVersion(current: string, latest: string): boolean { if (parts.length !== 3) return null; const nums = parts.map(Number); - if (nums.some(isNaN)) return null; + if (nums.some(Number.isNaN)) return null; return { major: nums[0], minor: nums[1], patch: nums[2], prerelease }; }; @@ -201,9 +201,9 @@ export function checkForUpdates(): void { const line1 = `Update available: ${currentVersion} → ${cache.latestVersion}`; const line2 = 'Run "tigris update" to upgrade.'; const width = Math.max(line1.length, line2.length) + 4; - const top = '┌' + '─'.repeat(width - 2) + '┐'; - const bot = '└' + '─'.repeat(width - 2) + '┘'; - const pad = (s: string) => '│ ' + s.padEnd(width - 4) + ' │'; + const top = `┌${'─'.repeat(width - 2)}┐`; + const bot = `└${'─'.repeat(width - 2)}┘`; + const pad = (s: string) => `│ ${s.padEnd(width - 4)} │`; console.log( `\n${top}\n${pad('')}\n${pad(line1)}\n${pad(line2)}\n${pad('')}\n${bot}\n` ); diff --git a/test/auth/iam.test.ts b/test/auth/iam.test.ts index 732b0a4..e8a6309 100644 --- a/test/auth/iam.test.ts +++ b/test/auth/iam.test.ts @@ -125,25 +125,27 @@ describe('getIAMConfig', () => { expect(config).toHaveProperty('sessionToken', 'tok-456'); }); - it.each(['credentials', 'environment', 'configured', 'aws-profile'] as const)( - 'returns credential config when type is %s', - async (type) => { - vi.mocked(resolveAuthMethod).mockResolvedValue({ - type, - accessKeyId: 'ak-123', - secretAccessKey: 'sk-456', - } as Awaited>); - vi.mocked(getSelectedOrganization).mockReturnValue('org-2'); - - const config = await getIAMConfig(context); - expect(config).toEqual({ - accessKeyId: 'ak-123', - secretAccessKey: 'sk-456', - organizationId: 'org-2', - iamEndpoint: 'https://iam.test', - }); - } - ); + it.each([ + 'credentials', + 'environment', + 'configured', + 'aws-profile', + ] as const)('returns credential config when type is %s', async (type) => { + vi.mocked(resolveAuthMethod).mockResolvedValue({ + type, + accessKeyId: 'ak-123', + secretAccessKey: 'sk-456', + } as Awaited>); + vi.mocked(getSelectedOrganization).mockReturnValue('org-2'); + + const config = await getIAMConfig(context); + expect(config).toEqual({ + accessKeyId: 'ak-123', + secretAccessKey: 'sk-456', + organizationId: 'org-2', + iamEndpoint: 'https://iam.test', + }); + }); it('throws when type is none', async () => { vi.mocked(resolveAuthMethod).mockResolvedValue({ diff --git a/test/auth/provider.test.ts b/test/auth/provider.test.ts index bb7641a..f27b98f 100644 --- a/test/auth/provider.test.ts +++ b/test/auth/provider.test.ts @@ -1,6 +1,6 @@ -import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'fs'; -import { tmpdir } from 'os'; -import { join } from 'path'; +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; // Mock os.homedir() to return a temp directory so tests don't touch real config diff --git a/test/auth/storage.test.ts b/test/auth/storage.test.ts index 5d4b231..f7fcf9d 100644 --- a/test/auth/storage.test.ts +++ b/test/auth/storage.test.ts @@ -4,9 +4,9 @@ import { readFileSync, rmSync, writeFileSync, -} from 'fs'; -import { tmpdir } from 'os'; -import { join } from 'path'; +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; // Mock os.homedir() to return a temp directory so tests don't touch real config @@ -113,7 +113,7 @@ describe('auth/storage', () => { // Config should now be v2 on disk const raw = readRawConfig() as Record; - expect(raw['version']).toBe(2); + expect(raw.version).toBe(2); }); it('handles v1 config with no credentials gracefully', async () => { @@ -294,19 +294,19 @@ describe('auth/storage', () => { // Saved creds should survive const raw = readRawConfig() as Record; - const creds = raw['credentials'] as Record; - expect(creds['saved']).toBeDefined(); - const saved = creds['saved'] as Record; - expect(saved['accessKeyId']).toBe('AKID'); + const creds = raw.credentials as Record; + expect(creds.saved).toBeDefined(); + const saved = creds.saved as Record; + expect(saved.accessKeyId).toBe('AKID'); // Temporary should be gone - expect(creds['temporary']).toBeUndefined(); + expect(creds.temporary).toBeUndefined(); // OAuth should be gone - expect(raw['oauth']).toBeUndefined(); + expect(raw.oauth).toBeUndefined(); // activeMethod should be gone - expect(raw['activeMethod']).toBeUndefined(); + expect(raw.activeMethod).toBeUndefined(); }); it('works when no saved credentials exist', async () => { @@ -322,9 +322,9 @@ describe('auth/storage', () => { await storage.clearAllData(); const raw = readRawConfig() as Record; - expect(raw['version']).toBe(2); - expect(raw['oauth']).toBeUndefined(); - expect(raw['credentials']).toBeUndefined(); + expect(raw.version).toBe(2); + expect(raw.oauth).toBeUndefined(); + expect(raw.credentials).toBeUndefined(); }); }); @@ -354,13 +354,13 @@ describe('auth/storage', () => { await storage.storeCredentialOrganization('my-org', 'temporary'); const raw = readRawConfig() as Record; - const creds = raw['credentials'] as Record; - const temp = creds['temporary'] as Record; - const saved = creds['saved'] as Record; + const creds = raw.credentials as Record; + const temp = creds.temporary as Record; + const saved = creds.saved as Record; - expect(temp['organizationId']).toBe('my-org'); + expect(temp.organizationId).toBe('my-org'); // Saved should NOT have been modified - expect(saved['organizationId']).toBeUndefined(); + expect(saved.organizationId).toBeUndefined(); }); it('writes to saved slot when target is saved', async () => { @@ -380,10 +380,10 @@ describe('auth/storage', () => { await storage.storeCredentialOrganization('saved-org', 'saved'); const raw = readRawConfig() as Record; - const creds = raw['credentials'] as Record; - const saved = creds['saved'] as Record; + const creds = raw.credentials as Record; + const saved = creds.saved as Record; - expect(saved['organizationId']).toBe('saved-org'); + expect(saved.organizationId).toBe('saved-org'); }); it('does nothing when target slot does not exist', async () => { @@ -393,7 +393,7 @@ describe('auth/storage', () => { await storage.storeCredentialOrganization('org-id', 'saved'); const raw = readRawConfig() as Record; - expect(raw['credentials']).toBeUndefined(); + expect(raw.credentials).toBeUndefined(); }); }); @@ -423,9 +423,9 @@ describe('auth/storage', () => { await storage.clearTemporaryCredentials(); const raw = readRawConfig() as Record; - const creds = raw['credentials'] as Record; - expect(creds['saved']).toBeDefined(); - expect(creds['temporary']).toBeUndefined(); + const creds = raw.credentials as Record; + expect(creds.saved).toBeDefined(); + expect(creds.temporary).toBeUndefined(); }); it('does nothing when no credentials exist', async () => { @@ -435,7 +435,7 @@ describe('auth/storage', () => { await storage.clearTemporaryCredentials(); const raw = readRawConfig() as Record; - expect(raw['version']).toBe(2); + expect(raw.version).toBe(2); }); }); @@ -465,9 +465,9 @@ describe('auth/storage', () => { await storage.clearOAuthData(); const raw = readRawConfig() as Record; - expect(raw['oauth']).toBeUndefined(); - expect(raw['credentials']).toBeDefined(); - expect(raw['activeMethod']).toBeUndefined(); + expect(raw.oauth).toBeUndefined(); + expect(raw.credentials).toBeDefined(); + expect(raw.activeMethod).toBeUndefined(); }); it('preserves activeMethod when it is not oauth', async () => { @@ -483,8 +483,8 @@ describe('auth/storage', () => { await storage.clearOAuthData(); const raw = readRawConfig() as Record; - expect(raw['oauth']).toBeUndefined(); - expect(raw['activeMethod']).toBe('credentials'); + expect(raw.oauth).toBeUndefined(); + expect(raw.activeMethod).toBe('credentials'); }); it('does nothing when no OAuth data exists', async () => { @@ -494,7 +494,7 @@ describe('auth/storage', () => { await storage.clearOAuthData(); const raw = readRawConfig() as Record; - expect(raw['version']).toBe(2); + expect(raw.version).toBe(2); }); }); diff --git a/test/cli-core.test.ts b/test/cli-core.test.ts index 43b6ec6..d34b363 100644 --- a/test/cli-core.test.ts +++ b/test/cli-core.test.ts @@ -11,19 +11,26 @@ import { import type { Argument } from '../src/types.js'; describe('isValidCommandName', () => { - it.each(['buckets', 'access-keys', 'set_ttl', 'ls', 'a1'])( - 'accepts valid name: %s', - (name) => { - expect(isValidCommandName(name)).toBe(true); - } - ); - - it.each(['', '../etc', 'foo bar', 'rm;ls', 'a/b', 'cmd@1'])( - 'rejects invalid name: %s', - (name) => { - expect(isValidCommandName(name)).toBe(false); - } - ); + it.each([ + 'buckets', + 'access-keys', + 'set_ttl', + 'ls', + 'a1', + ])('accepts valid name: %s', (name) => { + expect(isValidCommandName(name)).toBe(true); + }); + + it.each([ + '', + '../etc', + 'foo bar', + 'rm;ls', + 'a/b', + 'cmd@1', + ])('rejects invalid name: %s', (name) => { + expect(isValidCommandName(name)).toBe(false); + }); }); describe('formatArgumentHelp', () => { diff --git a/test/cli.test.ts b/test/cli.test.ts index 360c573..5d2b65b 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -1,7 +1,13 @@ -import { execSync } from 'child_process'; -import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'fs'; -import { tmpdir } from 'os'; -import { join } from 'path'; +import { execSync } from 'node:child_process'; +import { + existsSync, + mkdirSync, + readFileSync, + rmSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; import { afterAll, beforeAll, describe, expect, it } from 'vitest'; import { diff --git a/test/setup.ts b/test/setup.ts index 7c30782..31d57e0 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -1,6 +1,6 @@ -import { execSync } from 'child_process'; -import { existsSync } from 'fs'; -import path from 'path'; +import { execSync } from 'node:child_process'; +import { existsSync } from 'node:fs'; +import path from 'node:path'; import { afterAll, beforeAll } from 'vitest'; const distPath = path.resolve(process.cwd(), 'dist/cli.js'); diff --git a/test/specs-completeness.test.ts b/test/specs-completeness.test.ts index 059f427..39786f5 100644 --- a/test/specs-completeness.test.ts +++ b/test/specs-completeness.test.ts @@ -1,5 +1,5 @@ -import { existsSync, readFileSync } from 'fs'; -import { join } from 'path'; +import { existsSync, readFileSync } from 'node:fs'; +import { join } from 'node:path'; import { describe, expect, it } from 'vitest'; import * as YAML from 'yaml'; @@ -83,7 +83,7 @@ describe('specs completeness', () => { for (const { path } of leaves) { const label = path.join(' '); it(`${label}`, () => { - const filePath = join(srcRoot, ...path) + '.ts'; + const filePath = `${join(srcRoot, ...path)}.ts`; const indexPath = join(srcRoot, ...path, 'index.ts'); const exists = existsSync(filePath) || existsSync(indexPath); expect(exists, `Missing handler: ${filePath} or ${indexPath}`).toBe( diff --git a/test/utils/exit.test.ts b/test/utils/exit.test.ts index 18b39d4..5e09b06 100644 --- a/test/utils/exit.test.ts +++ b/test/utils/exit.test.ts @@ -1,5 +1,5 @@ -import { readFileSync } from 'fs'; -import { join } from 'path'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import * as YAML from 'yaml'; diff --git a/test/utils/messages.test.ts b/test/utils/messages.test.ts index 0daa77f..75779b9 100644 --- a/test/utils/messages.test.ts +++ b/test/utils/messages.test.ts @@ -1,5 +1,5 @@ -import { readFileSync } from 'fs'; -import { join } from 'path'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import * as YAML from 'yaml'; diff --git a/test/utils/specs.test.ts b/test/utils/specs.test.ts index b88e7e8..8467f0d 100644 --- a/test/utils/specs.test.ts +++ b/test/utils/specs.test.ts @@ -1,5 +1,5 @@ -import { readFileSync } from 'fs'; -import { join } from 'path'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; import { describe, expect, it } from 'vitest'; import * as YAML from 'yaml'; diff --git a/tsup.config.ts b/tsup.config.ts index eb66747..9dd385f 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,5 +1,5 @@ -import { copyFileSync, watch } from 'fs'; -import { join } from 'path'; +import { copyFileSync, watch } from 'node:fs'; +import { join } from 'node:path'; import { defineConfig } from 'tsup'; const copySpecs = () => { diff --git a/vitest.config.ts b/vitest.config.ts index 335550f..7d4b045 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,5 +1,5 @@ +import path from 'node:path'; import dotenv from 'dotenv'; -import path from 'path'; import { defineConfig } from 'vitest/config'; // Load .env.test for integration tests @@ -28,11 +28,7 @@ export default defineConfig({ coverage: { provider: 'v8', reporter: ['text', 'json', 'html'], - exclude: [ - 'node_modules/', - 'dist/', - 'test/', - ], + exclude: ['node_modules/', 'dist/', 'test/'], }, }, });