From 81d3566f3a0fbee0dc066128f334fefab1275eb3 Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Sun, 23 Aug 2026 17:24:42 +0300 Subject: [PATCH 1/8] chore: modernize workspace tooling foundation --- oxfmt.config.ts | 8 + oxlint.config.ts | 3 + package-lock.json | 3338 ------------------------------ package.json | 41 +- packages/core/package.json | 20 +- packages/types/oxlint.config.ts | 8 + packages/types/package.json | 11 +- packages/utils/oxlint.config.ts | 8 + packages/utils/package.json | 20 +- pnpm-lock.yaml | 3357 +++++++++++++++++++++++++++++++ pnpm-workspace.yaml | 4 + 11 files changed, 3426 insertions(+), 3392 deletions(-) create mode 100644 oxfmt.config.ts create mode 100644 oxlint.config.ts delete mode 100644 package-lock.json create mode 100644 packages/types/oxlint.config.ts create mode 100644 packages/utils/oxlint.config.ts create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml diff --git a/oxfmt.config.ts b/oxfmt.config.ts new file mode 100644 index 0000000..dc12394 --- /dev/null +++ b/oxfmt.config.ts @@ -0,0 +1,8 @@ +import { createOxfmtConfig } from "@ylfjuk/oxc/oxfmt"; + +const config = createOxfmtConfig({ + ignorePatterns: ["**/dist/**", "**/node_modules/**", "**/coverage/**", "**/.turbo/**"], + scopes: ["ylfjuk", "ylfjuk-core"], +}); + +export default { ...config, endOfLine: "crlf" }; diff --git a/oxlint.config.ts b/oxlint.config.ts new file mode 100644 index 0000000..21338a7 --- /dev/null +++ b/oxlint.config.ts @@ -0,0 +1,3 @@ +import { createOxlintConfig } from "@ylfjuk/oxc/oxlint"; + +export default createOxlintConfig({ jsdoc: true }); diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index aeed74f..0000000 --- a/package-lock.json +++ /dev/null @@ -1,3338 +0,0 @@ -{ - "name": "root", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "root", - "version": "0.0.0", - "license": "MIT", - "workspaces": [ - "apps/*", - "packages/*", - "playground/*" - ], - "devDependencies": { - "@biomejs/biome": "^2.0.5", - "@changesets/changelog-github": "^0.5.1", - "@changesets/cli": "^2.28.1", - "@vitest/coverage-v8": "^3.2.3", - "@vitest/ui": "^3.2.3", - "@ylfjuk/biome": "^0.1.2", - "@ylfjuk/md": "^0.0.3", - "knip": "^5.46.5", - "turbo": "^2.5.0", - "vitest": "^3.2.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.26.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.9" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.27.0", - "dev": true, - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.26.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/@biomejs/biome": { - "version": "2.0.5", - "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.0.5", - "@biomejs/cli-darwin-x64": "2.0.5", - "@biomejs/cli-linux-arm64": "2.0.5", - "@biomejs/cli-linux-arm64-musl": "2.0.5", - "@biomejs/cli-linux-x64": "2.0.5", - "@biomejs/cli-linux-x64-musl": "2.0.5", - "@biomejs/cli-win32-arm64": "2.0.5", - "@biomejs/cli-win32-x64": "2.0.5" - } - }, - "node_modules/@biomejs/cli-win32-x64": { - "version": "2.0.5", - "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.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/config": "^3.1.1", - "@changesets/get-version-range-type": "^0.4.0", - "@changesets/git": "^3.0.2", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "detect-indent": "^6.0.0", - "fs-extra": "^7.0.1", - "lodash.startcase": "^4.4.0", - "outdent": "^0.5.0", - "prettier": "^2.7.1", - "resolve-from": "^5.0.0", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/assemble-release-plan": { - "version": "6.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/changelog-git": { - "version": "0.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0" - } - }, - "node_modules/@changesets/changelog-github": { - "version": "0.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/get-github-info": "^0.6.0", - "@changesets/types": "^6.1.0", - "dotenv": "^8.1.0" - } - }, - "node_modules/@changesets/cli": { - "version": "2.28.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/apply-release-plan": "^7.0.10", - "@changesets/assemble-release-plan": "^6.0.6", - "@changesets/changelog-git": "^0.2.1", - "@changesets/config": "^3.1.1", - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/get-release-plan": "^4.0.8", - "@changesets/git": "^3.0.2", - "@changesets/logger": "^0.1.1", - "@changesets/pre": "^2.0.2", - "@changesets/read": "^0.6.3", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@changesets/write": "^0.4.0", - "@manypkg/get-packages": "^1.1.3", - "ansi-colors": "^4.1.3", - "ci-info": "^3.7.0", - "enquirer": "^2.4.1", - "external-editor": "^3.1.0", - "fs-extra": "^7.0.1", - "mri": "^1.2.0", - "p-limit": "^2.2.0", - "package-manager-detector": "^0.2.0", - "picocolors": "^1.1.0", - "resolve-from": "^5.0.0", - "semver": "^7.5.3", - "spawndamnit": "^3.0.1", - "term-size": "^2.1.0" - }, - "bin": { - "changeset": "bin.js" - } - }, - "node_modules/@changesets/config": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/logger": "^0.1.1", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1", - "micromatch": "^4.0.8" - } - }, - "node_modules/@changesets/errors": { - "version": "0.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "extendable-error": "^0.1.5" - } - }, - "node_modules/@changesets/get-dependents-graph": { - "version": "2.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "picocolors": "^1.1.0", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/get-github-info": { - "version": "0.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "dataloader": "^1.4.0", - "node-fetch": "^2.5.0" - } - }, - "node_modules/@changesets/get-release-plan": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/assemble-release-plan": "^6.0.6", - "@changesets/config": "^3.1.1", - "@changesets/pre": "^2.0.2", - "@changesets/read": "^0.6.3", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3" - } - }, - "node_modules/@changesets/get-version-range-type": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@changesets/git": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@manypkg/get-packages": "^1.1.3", - "is-subdir": "^1.1.1", - "micromatch": "^4.0.8", - "spawndamnit": "^3.0.1" - } - }, - "node_modules/@changesets/logger": { - "version": "0.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "picocolors": "^1.1.0" - } - }, - "node_modules/@changesets/parse": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "js-yaml": "^3.13.1" - } - }, - "node_modules/@changesets/pre": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1" - } - }, - "node_modules/@changesets/read": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/git": "^3.0.2", - "@changesets/logger": "^0.1.1", - "@changesets/parse": "^0.4.1", - "@changesets/types": "^6.1.0", - "fs-extra": "^7.0.1", - "p-filter": "^2.1.0", - "picocolors": "^1.1.0" - } - }, - "node_modules/@changesets/should-skip-package": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3" - } - }, - "node_modules/@changesets/types": { - "version": "6.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@changesets/write": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "fs-extra": "^7.0.1", - "human-id": "^4.1.1", - "prettier": "^2.7.1" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.25.0", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@manypkg/find-root": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.5.5", - "@types/node": "^12.7.1", - "find-up": "^4.1.0", - "fs-extra": "^8.1.0" - } - }, - "node_modules/@manypkg/find-root/node_modules/@types/node": { - "version": "12.20.55", - "dev": true, - "license": "MIT" - }, - "node_modules/@manypkg/find-root/node_modules/fs-extra": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@manypkg/get-packages": { - "version": "1.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.5.5", - "@changesets/types": "^4.0.1", - "@manypkg/find-root": "^1.1.0", - "fs-extra": "^8.1.0", - "globby": "^11.0.0", - "read-yaml-file": "^1.1.0" - } - }, - "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { - "version": "4.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@manypkg/get-packages/node_modules/fs-extra": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@polka/url": { - "version": "1.0.0-next.29", - "dev": true, - "license": "MIT" - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.1", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@snyk/github-codeowners": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^4.1.1", - "ignore": "^5.1.8", - "p-map": "^4.0.0" - }, - "bin": { - "github-codeowners": "dist/cli.js" - }, - "engines": { - "node": ">=8.10" - } - }, - "node_modules/@snyk/github-codeowners/node_modules/p-map": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@types/chai": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*" - } - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.14.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@vitest/coverage-v8": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.3.0", - "@bcoe/v8-coverage": "^1.0.2", - "ast-v8-to-istanbul": "^0.3.3", - "debug": "^4.4.1", - "istanbul-lib-coverage": "^3.2.2", - "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^5.0.6", - "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.17", - "magicast": "^0.3.5", - "std-env": "^3.9.0", - "test-exclude": "^7.0.1", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@vitest/browser": "3.2.4", - "vitest": "3.2.4" - }, - "peerDependenciesMeta": { - "@vitest/browser": { - "optional": true - } - } - }, - "node_modules/@vitest/expect": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "3.2.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/pretty-format": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "3.2.4", - "pathe": "^2.0.3", - "strip-literal": "^3.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "magic-string": "^0.30.17", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyspy": "^4.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/ui": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "3.2.4", - "fflate": "^0.8.2", - "flatted": "^3.3.3", - "pathe": "^2.0.3", - "sirv": "^3.0.1", - "tinyglobby": "^0.2.14", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "vitest": "3.2.4" - } - }, - "node_modules/@vitest/utils": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "loupe": "^3.1.4", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@ylfjuk-core/types": { - "resolved": "packages/types", - "link": true - }, - "node_modules/@ylfjuk-core/utils": { - "resolved": "packages/utils", - "link": true - }, - "node_modules/@ylfjuk/biome": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@biomejs/biome": "2.0.0 || >=2.0.4" - } - }, - "node_modules/@ylfjuk/core": { - "resolved": "packages/core", - "link": true - }, - "node_modules/@ylfjuk/md": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@ylfjuk/tsconfigs": { - "version": "0.0.6", - "dev": true, - "license": "MIT", - "peerDependencies": { - "typescript": "^5.5.4" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "dev": true, - "license": "MIT" - }, - "node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/ast-v8-to-istanbul": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", - "estree-walker": "^3.0.3", - "js-tokens": "^9.0.1" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/better-path-resolve": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-windows": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/bundle-require": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "load-tsconfig": "^0.2.3" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "peerDependencies": { - "esbuild": ">=0.18" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/chai": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/chardet": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/check-error": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/consola": { - "version": "3.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.18.0 || >=16.10.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/dataloader": { - "version": "1.4.0", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/debug": { - "version": "4.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-eql": { - "version": "5.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/defaults": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/detect-indent": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dotenv": { - "version": "8.6.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=10" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/easy-table": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "optionalDependencies": { - "wcwidth": "^1.0.1" - } - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "dev": true, - "license": "MIT" - }, - "node_modules/enhanced-resolve": { - "version": "5.18.1", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/enquirer": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.25.0", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.0", - "@esbuild/android-arm": "0.25.0", - "@esbuild/android-arm64": "0.25.0", - "@esbuild/android-x64": "0.25.0", - "@esbuild/darwin-arm64": "0.25.0", - "@esbuild/darwin-x64": "0.25.0", - "@esbuild/freebsd-arm64": "0.25.0", - "@esbuild/freebsd-x64": "0.25.0", - "@esbuild/linux-arm": "0.25.0", - "@esbuild/linux-arm64": "0.25.0", - "@esbuild/linux-ia32": "0.25.0", - "@esbuild/linux-loong64": "0.25.0", - "@esbuild/linux-mips64el": "0.25.0", - "@esbuild/linux-ppc64": "0.25.0", - "@esbuild/linux-riscv64": "0.25.0", - "@esbuild/linux-s390x": "0.25.0", - "@esbuild/linux-x64": "0.25.0", - "@esbuild/netbsd-arm64": "0.25.0", - "@esbuild/netbsd-x64": "0.25.0", - "@esbuild/openbsd-arm64": "0.25.0", - "@esbuild/openbsd-x64": "0.25.0", - "@esbuild/sunos-x64": "0.25.0", - "@esbuild/win32-arm64": "0.25.0", - "@esbuild/win32-ia32": "0.25.0", - "@esbuild/win32-x64": "0.25.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/expect-type": { - "version": "1.2.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/extendable-error": { - "version": "0.1.7", - "dev": true, - "license": "MIT" - }, - "node_modules/external-editor": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.19.1", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fflate": { - "version": "0.8.2", - "dev": true, - "license": "MIT" - }, - "node_modules/fill-range": { - "version": "7.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "dev": true, - "license": "ISC" - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/fs-extra": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/glob": { - "version": "10.4.5", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/human-id": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "bin": { - "human-id": "dist/cli.js" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-subdir": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "better-path-resolve": "1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jiti": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/joycon": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/js-tokens": { - "version": "9.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/knip": { - "version": "5.46.5", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/webpro" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/knip" - }, - { - "type": "polar", - "url": "https://polar.sh/webpro-nl" - } - ], - "license": "ISC", - "dependencies": { - "@nodelib/fs.walk": "3.0.1", - "@snyk/github-codeowners": "1.1.0", - "easy-table": "1.2.0", - "enhanced-resolve": "^5.18.1", - "fast-glob": "^3.3.3", - "jiti": "^2.4.2", - "js-yaml": "^4.1.0", - "minimist": "^1.2.8", - "picocolors": "^1.1.0", - "picomatch": "^4.0.1", - "pretty-ms": "^9.0.0", - "smol-toml": "^1.3.1", - "strip-json-comments": "5.0.1", - "summary": "2.1.0", - "zod": "^3.22.4", - "zod-validation-error": "^3.0.3" - }, - "bin": { - "knip": "bin/knip.js", - "knip-bun": "bin/knip-bun.js" - }, - "engines": { - "node": ">=18.18.0" - }, - "peerDependencies": { - "@types/node": ">=18", - "typescript": ">=5.0.4" - } - }, - "node_modules/knip/node_modules/@nodelib/fs.scandir": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "4.0.0", - "run-parallel": "^1.2.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/knip/node_modules/@nodelib/fs.stat": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/knip/node_modules/@nodelib/fs.walk": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "4.0.1", - "fastq": "^1.15.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/knip/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/knip/node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/knip/node_modules/picomatch": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/lilconfig": { - "version": "3.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/load-tsconfig": { - "version": "0.2.5", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.sortby": { - "version": "4.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.startcase": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/loupe": { - "version": "3.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "dev": true, - "license": "ISC" - }, - "node_modules/magic-string": { - "version": "0.30.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - } - }, - "node_modules/magicast": { - "version": "0.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.25.4", - "@babel/types": "^7.25.4", - "source-map-js": "^1.2.0" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/mrmime": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/mz": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.11", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/outdent": { - "version": "0.5.0", - "dev": true, - "license": "MIT" - }, - "node_modules/p-filter": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-map": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-map": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "dev": true, - "license": "BlueOak-1.0.0" - }, - "node_modules/package-manager-detector": { - "version": "0.2.9", - "dev": true, - "license": "MIT" - }, - "node_modules/parse-ms": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/pathval": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss": { - "version": "8.5.6", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-load-config": { - "version": "6.0.1", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "lilconfig": "^3.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-ms": { - "version": "9.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parse-ms": "^4.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/read-yaml-file": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.6.1", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/readdirp": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "dev": true, - "license": "MIT" - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "4.41.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.7" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.1", - "@rollup/rollup-android-arm64": "4.41.1", - "@rollup/rollup-darwin-arm64": "4.41.1", - "@rollup/rollup-darwin-x64": "4.41.1", - "@rollup/rollup-freebsd-arm64": "4.41.1", - "@rollup/rollup-freebsd-x64": "4.41.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", - "@rollup/rollup-linux-arm-musleabihf": "4.41.1", - "@rollup/rollup-linux-arm64-gnu": "4.41.1", - "@rollup/rollup-linux-arm64-musl": "4.41.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-gnu": "4.41.1", - "@rollup/rollup-linux-riscv64-musl": "4.41.1", - "@rollup/rollup-linux-s390x-gnu": "4.41.1", - "@rollup/rollup-linux-x64-gnu": "4.41.1", - "@rollup/rollup-linux-x64-musl": "4.41.1", - "@rollup/rollup-win32-arm64-msvc": "4.41.1", - "@rollup/rollup-win32-ia32-msvc": "4.41.1", - "@rollup/rollup-win32-x64-msvc": "4.41.1", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.7.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sirv": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/smol-toml": { - "version": "1.3.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 18" - }, - "funding": { - "url": "https://github.com/sponsors/cyyynthia" - } - }, - "node_modules/source-map": { - "version": "0.8.0-beta.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "whatwg-url": "^7.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map/node_modules/tr46": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/source-map/node_modules/webidl-conversions": { - "version": "4.0.2", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/source-map/node_modules/whatwg-url": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "node_modules/spawndamnit": { - "version": "3.0.1", - "dev": true, - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "cross-spawn": "^7.0.5", - "signal-exit": "^4.0.1" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stackback": { - "version": "0.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "3.9.0", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width": { - "version": "5.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-literal": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^9.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/sucrase": { - "version": "3.35.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "^10.3.10", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/summary": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/term-size": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/test-exclude": { - "version": "7.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^9.0.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tinybench": { - "version": "2.9.0", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.14", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.5", - "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/tinypool": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, - "node_modules/tinyrainbow": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tmp": { - "version": "0.0.33", - "dev": true, - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/totalist": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/tree-kill": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "bin": { - "tree-kill": "cli.js" - } - }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/tsup": { - "version": "8.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "bundle-require": "^5.1.0", - "cac": "^6.7.14", - "chokidar": "^4.0.3", - "consola": "^3.4.0", - "debug": "^4.4.0", - "esbuild": "^0.25.0", - "joycon": "^3.1.1", - "picocolors": "^1.1.1", - "postcss-load-config": "^6.0.1", - "resolve-from": "^5.0.0", - "rollup": "^4.34.8", - "source-map": "0.8.0-beta.0", - "sucrase": "^3.35.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.11", - "tree-kill": "^1.2.2" - }, - "bin": { - "tsup": "dist/cli-default.js", - "tsup-node": "dist/cli-node.js" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@microsoft/api-extractor": "^7.36.0", - "@swc/core": "^1", - "postcss": "^8.4.12", - "typescript": ">=4.5.0" - }, - "peerDependenciesMeta": { - "@microsoft/api-extractor": { - "optional": true - }, - "@swc/core": { - "optional": true - }, - "postcss": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/turbo": { - "version": "2.5.0", - "dev": true, - "license": "MIT", - "bin": { - "turbo": "bin/turbo" - }, - "optionalDependencies": { - "turbo-darwin-64": "2.5.0", - "turbo-darwin-arm64": "2.5.0", - "turbo-linux-64": "2.5.0", - "turbo-linux-arm64": "2.5.0", - "turbo-windows-64": "2.5.0", - "turbo-windows-arm64": "2.5.0" - } - }, - "node_modules/turbo-windows-64": { - "version": "2.5.0", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/typescript": { - "version": "5.8.3", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/universalify": { - "version": "0.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/vite": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.6", - "picomatch": "^4.0.2", - "postcss": "^8.5.6", - "rollup": "^4.40.0", - "tinyglobby": "^0.2.14" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "lightningcss": "^1.21.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.1", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vite/node_modules/fdir": { - "version": "6.4.6", - "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/vitest": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.4", - "@vitest/mocker": "3.2.4", - "@vitest/pretty-format": "^3.2.4", - "@vitest/runner": "3.2.4", - "@vitest/snapshot": "3.2.4", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "debug": "^4.4.1", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", - "pathe": "^2.0.3", - "picomatch": "^4.0.2", - "std-env": "^3.9.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.14", - "tinypool": "^1.1.1", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", - "vite-node": "3.2.4", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.4", - "@vitest/ui": "3.2.4", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/debug": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/vitest/node_modules/picomatch": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/zod": { - "version": "3.24.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-validation-error": { - "version": "3.4.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "zod": "^3.18.0" - } - }, - "packages/core": { - "name": "@ylfjuk/core", - "version": "0.0.17", - "license": "MIT", - "dependencies": { - "@ylfjuk-core/types": "0.0.16", - "@ylfjuk-core/utils": "0.0.8" - }, - "devDependencies": { - "@ylfjuk/tsconfigs": "^0.0.6", - "tsup": "^8.4.0", - "typescript": "^5.8.3" - } - }, - "packages/types": { - "name": "@ylfjuk-core/types", - "version": "0.0.16", - "license": "MIT", - "devDependencies": { - "@ylfjuk/tsconfigs": "^0.0.6", - "typescript": "^5.8.3" - }, - "peerDependencies": { - "typescript": "^5.5.4" - } - }, - "packages/utils": { - "name": "@ylfjuk-core/utils", - "version": "0.0.8", - "license": "MIT", - "devDependencies": { - "@ylfjuk-core/types": "^0.0.16", - "@ylfjuk/biome": "^0.1.1", - "@ylfjuk/tsconfigs": "^0.0.6", - "tsup": "^8.4.0", - "typescript": "^5.8.3" - } - } - } -} diff --git a/package.json b/package.json index fad8041..95d3842 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,6 @@ "url": "git+https://github.com/YLfjuk/core.git" }, "scripts": { - "prep:ver": "npx changeset", - "release": "npm run build && changeset publish", - "version": "changeset version", "build": "turbo run build", "dev": "turbo run dev", "test": "turbo test", @@ -20,30 +17,34 @@ "test:v": "vitest --typecheck", "coverage": "vitest run --coverage", "lint": "turbo run lint", - "knip": "knip" + "knip": "knip", + "plan": "changeset", + "preversion": "pnpm run build", + "version": "changeset version", + "prerelease": "pnpm run build", + "release": "changeset publish" }, "devDependencies": { - "@biomejs/biome": "^2.0.5", - "@changesets/changelog-github": "^0.5.1", - "@changesets/cli": "^2.28.1", - "@vitest/coverage-v8": "^3.2.3", - "@vitest/ui": "^3.2.3", - "@ylfjuk/biome": "^0.1.2", + "@arethetypeswrong/cli": "^0.18.2", + "@changesets/cli": "^3.0.1", + "@vitest/coverage-v8": "^4.1.11", + "@vitest/ui": "^4.1.11", + "@ylfjuk/oxc": "^0.0.1", + "@ylfjuk/tsconfigs": "^0.1.0", "@ylfjuk/md": "^0.0.3", - "knip": "^5.46.5", - "turbo": "^2.5.0", - "vitest": "^3.2.3" + "knip": "^6.31.0", + "oxfmt": "^0.61.0", + "oxlint": "^1.77.0", + "tsdown": "^0.22.14", + "turbo": "^2.10.10", + "typescript": "^7.0.2", + "vitest": "^4.1.11" }, "knip": { "ignoreExportsUsedInFile": true }, "engines": { - "node": ">=18" + "node": ">=22.18.0" }, - "packageManager": "npm@11.2.0", - "workspaces": [ - "apps/*", - "packages/*", - "playground/*" - ] + "packageManager": "pnpm@11.22.0" } diff --git a/packages/core/package.json b/packages/core/package.json index a1b2507..599c05a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,29 +17,23 @@ "files": [ "dist" ], - "main": "dist/index.cjs", - "module": "dist/index.js", "types": "dist/index.d.ts", "exports": { ".": { - "require": "./dist/index.cjs", + "@ylfjuk-core/dev.src": "./src/index.ts", + "types": "./dist/index.d.ts", "import": "./dist/index.js" } }, "sideEffects": false, "scripts": { - "build": "tsup", - "dev": "tsup --watch", + "build": "tsdown", + "dev": "tsdown --watch", "test": "vitest run --typecheck", "test:types": "tsc --noEmit" }, "dependencies": { - "@ylfjuk-core/types": "0.0.18", - "@ylfjuk-core/utils": "0.0.10" - }, - "devDependencies": { - "@ylfjuk/tsconfigs": "^0.0.6", - "tsup": "^8.4.0", - "typescript": "^5.8.3" + "@ylfjuk-core/types": "workspace:*", + "@ylfjuk-core/utils": "workspace:*" } -} \ No newline at end of file +} diff --git a/packages/types/oxlint.config.ts b/packages/types/oxlint.config.ts new file mode 100644 index 0000000..02cd98e --- /dev/null +++ b/packages/types/oxlint.config.ts @@ -0,0 +1,8 @@ +import { createOxlintConfig } from "@ylfjuk/oxc/oxlint"; + +const config = createOxlintConfig({ jsdoc: true }); + +export default { + ...config, + rules: { ...config.rules, "typescript/no-explicit-any": "off" }, +}; diff --git a/packages/types/package.json b/packages/types/package.json index 193d16d..6d46bdd 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -20,20 +20,17 @@ "types": "./src/index.ts", "exports": { ".": { + "@ylfjuk-core/dev.src": "./src/index.ts", "types": "./src/index.ts" } }, "sideEffects": false, "scripts": { - "build": "npm test && npm run test:types", + "build": "pnpm run test && pnpm run test:types", "test": "vitest run --typecheck", "test:types": "tsc --noEmit" }, - "devDependencies": { - "@ylfjuk/tsconfigs": "^0.0.6", - "typescript": "^5.8.3" - }, "peerDependencies": { - "typescript": "^5.5.4" + "typescript": "^7.0.2" } -} \ No newline at end of file +} diff --git a/packages/utils/oxlint.config.ts b/packages/utils/oxlint.config.ts new file mode 100644 index 0000000..02cd98e --- /dev/null +++ b/packages/utils/oxlint.config.ts @@ -0,0 +1,8 @@ +import { createOxlintConfig } from "@ylfjuk/oxc/oxlint"; + +const config = createOxlintConfig({ jsdoc: true }); + +export default { + ...config, + rules: { ...config.rules, "typescript/no-explicit-any": "off" }, +}; diff --git a/packages/utils/package.json b/packages/utils/package.json index b8952f4..a7d7543 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -17,28 +17,20 @@ "files": [ "dist" ], - "main": "dist/index.cjs", - "module": "dist/index.js", "types": "dist/index.d.ts", "exports": { ".": { - "require": "./dist/index.cjs", + "@ylfjuk-core/dev.src": "./src/index.ts", + "types": "./dist/index.d.ts", "import": "./dist/index.js" } }, "sideEffects": false, "scripts": { - "build": "tsup", - "dev": "tsup --watch", + "build": "tsdown", + "dev": "tsdown --watch", "test": "vitest run --typecheck", "test:types": "tsc --noEmit", - "lint": "biome lint --write" - }, - "devDependencies": { - "@ylfjuk-core/types": "^0.0.18", - "@ylfjuk/biome": "^0.1.1", - "@ylfjuk/tsconfigs": "^0.0.6", - "tsup": "^8.4.0", - "typescript": "^5.8.3" + "lint": "oxlint" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..dc4d552 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,3357 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@arethetypeswrong/cli': + specifier: ^0.18.2 + version: 0.18.5 + '@changesets/cli': + specifier: ^3.0.1 + version: 3.0.1 + '@vitest/coverage-v8': + specifier: ^4.1.11 + version: 4.1.11(vitest@4.1.11) + '@vitest/ui': + specifier: ^4.1.11 + version: 4.1.11(vitest@4.1.11) + '@ylfjuk/md': + specifier: ^0.0.3 + version: 0.0.3 + '@ylfjuk/oxc': + specifier: ^0.0.1 + version: 0.0.1(oxfmt@0.61.0)(oxlint@1.79.0) + '@ylfjuk/tsconfigs': + specifier: ^0.1.0 + version: 0.1.0(typescript@7.0.2) + knip: + specifier: ^6.31.0 + version: 6.32.2 + oxfmt: + specifier: ^0.61.0 + version: 0.61.0 + oxlint: + specifier: ^1.77.0 + version: 1.79.0 + tsdown: + specifier: ^0.22.14 + version: 0.22.14(@arethetypeswrong/core@0.18.5)(oxc-resolver@11.24.2)(typescript@7.0.2) + turbo: + specifier: ^2.10.10 + version: 2.10.11 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + vitest: + specifier: ^4.1.11 + version: 4.1.11(@vitest/coverage-v8@4.1.11)(@vitest/ui@4.1.11)(vite@8.2.2(jiti@2.7.0)(yaml@2.9.0)) + + packages/core: + dependencies: + '@ylfjuk-core/types': + specifier: workspace:* + version: link:../types + '@ylfjuk-core/utils': + specifier: workspace:* + version: link:../utils + + packages/types: + dependencies: + typescript: + specifier: ^7.0.2 + version: 7.0.2 + + packages/utils: {} + +packages: + + '@andrewbranch/untar.js@1.0.4': + resolution: {integrity: sha512-pVXSwPsLuw8IGLo2Di0EaOfsk+ntVvpkk942J/sHYIkwvtKUakEcPh7HBgZ6tuimgzKSEHgCvO4XgQ05DEbwDw==} + + '@arethetypeswrong/cli@0.18.5': + resolution: {integrity: sha512-gM+8vRsQOD/Uc7EnBedUhkG5OCsDWE4uoak5QvomGpMpaky0Eh41p04nIMgrWb8EOmqZUJGc6zz9hsP6E56R7g==} + engines: {node: '>=20'} + hasBin: true + + '@arethetypeswrong/core@0.18.5': + resolution: {integrity: sha512-9ytjzGwxjm9Uz7I9avfbt5vlQt6uk9uRRESzJjqrznl6WKvI6dwYTo+vJ3U02Wrq/mR3iql/PzhvHhKdJIAjDQ==} + engines: {node: '>=20'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.8': + resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/types@7.29.8': + resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@1.0.2': + resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} + engines: {node: '>=18'} + + '@braidai/lang@1.1.2': + resolution: {integrity: sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA==} + + '@changesets/apply-release-plan@8.0.0': + resolution: {integrity: sha512-kUd2pbf1w5/AYmBMb0Tt+rkIPCjFJdT0SZMrkOjJT/WV/QbtmvkyB5jkV0oaNPheavprZk+SfUiozUti7TIL2w==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/assemble-release-plan@7.0.0': + resolution: {integrity: sha512-oEW8BxdA604kGGtDSCiHr5w9Tv4UWe9I2k61IBNZzCOE1kbYaJj4v+lFQNgcEZFkUc2pV/+hASErGDvpJOZCTg==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/changelog-git@1.0.0': + resolution: {integrity: sha512-3Dst2Ime2Op5nd4XmWJLPIgp11ZFqJqSkVug9izK6TDcIV4YlhPS4ECbEVR+eGI0bk0r1ItogD4j2Oli87bJrA==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/cli@3.0.1': + resolution: {integrity: sha512-3IVpRSgiKDj2aRbBHKtWTXSRH2/iR3bWxau9iQUoEsZjDhRIj9nhl90k7FWMxZAJvLgJBbgMq8+qS0xQsenYsQ==} + engines: {node: ^22.11 || ^24 || >=26, npm: '>=10.9.0', pnpm: '>=10.0.0', yarn: '>=4.5.2'} + hasBin: true + + '@changesets/config@4.0.0': + resolution: {integrity: sha512-mw95/YrkOuhZZxfnVAA4bSXOFUi+KlhzOBTM8C4x777NhUU6HWIl9Z+K+nME+E4PVsv5NQVQwTfiHihAS1A/ow==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/errors@1.0.0': + resolution: {integrity: sha512-ElN/mEzn6zmETgjwf5MclCMa9ef59sAR0lfO8VSYIsiRvbC2FbLB/92EoYw10Sl0kGixxHFiJZUSv7dA+YpR8g==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/format@0.1.2': + resolution: {integrity: sha512-Caez5XtNXCFS/G5bwyav3wuXL0tMxVd2ZGbaumWbzN08tyzO21asCw7JZhNtVsAZDCvDRUzZN+Iit9SyRITSYA==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/get-dependents-graph@3.0.0': + resolution: {integrity: sha512-ji/t5wFA1zREKXRUePE6Qi+Qu2UgxCeSSGQrphezwvQZrp49B7sJ+8+wvM0tA7zPeSxYKCojDy3WWgrl+s+awg==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/git@4.0.0': + resolution: {integrity: sha512-uIEswpPUgzBBqrC0qg13byNaPorzhf05LE2T+gRizEKCXvMsJC6NPJp5iNDSV/gYj4Viqh09UiOF5E7XWeH5lQ==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/parse@1.0.0': + resolution: {integrity: sha512-P0iaMb9p9CRYZiTgAllEIF9AUMQHIy1G72tKlcIqJp61icZSsKQNiOPdxAMZG8m/DvZwt/oz5xEbTpike//dWg==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/pre@3.0.0': + resolution: {integrity: sha512-Zm/6YliV/a2oeWTqHJf6KxLrQwgcK1i/BRDl2m0EKZvbnxV5fG9QRhwJJGshjsZTUTS6dkfURQ2K6aAvgNw/3Q==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/read@1.0.0': + resolution: {integrity: sha512-8TdE2PwG6yArPt5Ozej83Z6iHz1G8BDBKvIEKZ455MccR4K3GNbLR2XqjBxa+5yLFnEd3xAOPXYboBg1pt8stQ==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/should-skip-package@1.0.0': + resolution: {integrity: sha512-pwqoJmbONn1XgXmZXPEExgAaT+HdZLjALFTDgIm+PnS5KeO2nLtzA2/Q+4aMFY14kFMuXKG30MObhvDzWgzDgg==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/types@7.0.0': + resolution: {integrity: sha512-c5GoiQyt3pxiXjrWSNoP8/GRf4kG+VnKzovx1OQM8dYYALlSwgedmkPmJ+ZqGxqwg9D3Bkj85Uo4KLd5BN3A0w==} + engines: {node: ^22.11 || ^24 || >=26} + + '@changesets/write@1.0.1': + resolution: {integrity: sha512-q/ThtP9gcnEP6xlv7LrY26C2mHqdGBti/MmOVngt/M/oIGYkssmQGxPK9WzBNt2juVcH/vml2WQ+ra8LXYOTaA==} + engines: {node: ^22.11 || ^24 || >=26} + + '@clack/core@1.4.3': + resolution: {integrity: sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==} + engines: {node: '>= 20.12.0'} + + '@clack/prompts@1.7.0': + resolution: {integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==} + engines: {node: '>= 20.12.0'} + + '@colors/colors@1.5.0': + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + + '@emnapi/core@1.11.2': + resolution: {integrity: sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==} + + '@emnapi/runtime@1.11.2': + resolution: {integrity: sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==} + + '@emnapi/wasi-threads@1.2.2': + resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@loaderkit/resolve@1.0.6': + resolution: {integrity: sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg==} + + '@manypkg/find-root@3.1.0': + resolution: {integrity: sha512-BcSqCyKhBVZ5YkSzOiheMCV41kqAFptW6xGqYSTjkVTl9XQpr+pqHhwgGCOHQtjDCv7Is6EFyA14Sm5GVbVABA==} + engines: {node: '>=20.0.0'} + + '@manypkg/get-packages@3.1.0': + resolution: {integrity: sha512-0TbBVyvPrP7xGYBI/cP8UP+yl/z+HtbTttAD7FMAJgn/kXOTwh5/60TsqP9ZYY710forNfyV0N8P/IE/ujGZJg==} + engines: {node: '>=20.0.0'} + + '@manypkg/tools@2.1.2': + resolution: {integrity: sha512-6QEf6yqFbETdwGITKq57aYoPfX/3K8XFNwsAlx0C1M7o8cb79sv1M3w+tWuWvIcSbNqrLF7OD7YpZMVVz335hQ==} + engines: {node: '>=20.0.0'} + + '@napi-rs/wasm-runtime@1.2.3': + resolution: {integrity: sha512-UMduMbqO5s5zF2NkNacMT/yK5Y5QiKvWr2+50bzIIxFDwVJ2h49b+oyjaCGPhJxd2/gC2x39EHv/gHVuu36x2Q==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4 + + '@oxc-parser/binding-android-arm-eabi@0.143.0': + resolution: {integrity: sha512-n9uozULWflPqBtdmI8lAabLqGKNgLVNN0ZH8HfgCwpKGNtzRzauB76jTiW/3YLkcA7N1zskpi9GdVnZuu1SAvg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxc-parser/binding-android-arm64@0.143.0': + resolution: {integrity: sha512-9BbdjHETk6O3zH/DDid9IgBtF0GlpLabNKN231uraXpRDSfY+iiZxTP5bk1Z63GBownVdhdINFIeddmMz4MzpQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxc-parser/binding-darwin-arm64@0.143.0': + resolution: {integrity: sha512-gh+6ecoHUy4/sUcolBl/1qPXKBbYNxFY0Pk0ujgQvINTMSftJY7o4yb8gOkDJPeZeB8+a+u7xTe6umoP8N5HFA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxc-parser/binding-darwin-x64@0.143.0': + resolution: {integrity: sha512-qd1hl2d+lXgHv/VQ/M9qm8TrMC5T4RqDBwtOnl+1D0QMjwcz+8AaB4JSg8STgeag0GP6a6L74XEGAsrTSJWNzQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxc-parser/binding-freebsd-x64@0.143.0': + resolution: {integrity: sha512-M5XXcNa7aOqLPKTR41msfghKu2yQ4xWvCm11/gwU0JzOzHNk5sgW//rVEjJ+LO48+VDAMzXTSzurUVxIDKwozw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxc-parser/binding-linux-arm-gnueabihf@0.143.0': + resolution: {integrity: sha512-T/GXusuOkPNQhCQCSBbcU/N8j0rAypuDBl1IyFK+lyYT594XsVz80clPC/OtbSSpBGyJxj8uYEfctxVuxVYoww==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm-musleabihf@0.143.0': + resolution: {integrity: sha512-oKu4RcBlXSqo3OC62dp6YTnQaZIurNDpCX3BnAM3+bJxt7s8J2TJKMnC0UYer1qhlRaDCg6wkTaTw+2IlsZ12w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-parser/binding-linux-arm64-gnu@0.143.0': + resolution: {integrity: sha512-WJBbD186AZmMGaSIhlktC+rPl8L3peCTXAh88Ih9uEvK0en2mPojGyCGYiL6mHtV1RPV3JyfJW5t6n5hh0lXhA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-arm64-musl@0.143.0': + resolution: {integrity: sha512-t1AcYOwEzgceadT4v5e+vaCCb0AncCA3v5AyzfBAz/tMq11qzVccXKzNHtkWdjBsgvTKwRkaUF3QvT4kot8vcQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxc-parser/binding-linux-ppc64-gnu@0.143.0': + resolution: {integrity: sha512-RsnO/NoD8376LMJq8JS8TwI0ieNaFRTuNe2GVJntQg6gwZNMENZsEbknHdVwjpOmxdGLGodcwaGSbAeRr5Bgjw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-riscv64-gnu@0.143.0': + resolution: {integrity: sha512-48fSVfR9TZi5CASZFyv0VC6z6BCoeihFsX031mAD/oSH7d9PYsPgIqza7d9mjP7Z2KTEpTFyH6SIu0Ui6R1vdg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-riscv64-musl@0.143.0': + resolution: {integrity: sha512-T8CpdD+SfE01DnIOD4HpVxu0ZJOfMJ/VhCvikKfaXAxkZ+9veyLM/D2hpi7Y2hFUyPmVQO3FNZHmYzV/WlVR4g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxc-parser/binding-linux-s390x-gnu@0.143.0': + resolution: {integrity: sha512-QLdeMsCcacenPEFsfxnBUDF1y6opyz5+fmOz9bfD5Y7fiGCMupUCuB3KTPQhNwshIG1P9fPqar9MHxuBDd4bwQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-x64-gnu@0.143.0': + resolution: {integrity: sha512-659ujfqLy6k7cuH3sbzhd8b+ztSq+i6E2E9pG78Q0BmHjAExfGIdgc8cGgMdwAozDXeZFHkJ+LXYJdWsaGdgyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxc-parser/binding-linux-x64-musl@0.143.0': + resolution: {integrity: sha512-/Mw/9j4TfZcnKphPrzOE6t4MMknXadcAAuVUlDRTF/ETWB5xOgQvOJV2Mh9We/bWxZdoxaGAdc+hy4GuYwQ2yQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxc-parser/binding-openharmony-arm64@0.143.0': + resolution: {integrity: sha512-8rIKWR2BFuifbIK/1XB9wTaSdtuJ25dlE7ZQYDnEwj/2xH2vHsxnvIjHT3ZjSVuLLwGGlSslIG/fbOJ8TV8rTw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-parser/binding-win32-arm64-msvc@0.143.0': + resolution: {integrity: sha512-5U9kQYMfRRI6Zq7KDxgbIP0RMnKrfn3gLepRMgJuRkPSUALTiRCk9d/uyhb4lGDjUdzwK7mBkKqhLgzBPCmLpQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxc-parser/binding-win32-ia32-msvc@0.143.0': + resolution: {integrity: sha512-25P7AaHk4R88Yv2XH4gToDVmh0cOu+bEURQU10CRrmvgabfRArSGAP5osmwUKeSUHj0VS50upbpbRWWW/m7mHA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxc-parser/binding-win32-x64-msvc@0.143.0': + resolution: {integrity: sha512-ORMh3JE1s6V7ySicdRK7vgaDQnn5o+UHg9ct989PlWHbel8O9ARrmWXM6kZjrBMtNucxNayQ8g69G0VfWzhANw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxc-project/types@0.143.0': + resolution: {integrity: sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==} + + '@oxc-project/types@0.146.0': + resolution: {integrity: sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==} + + '@oxc-resolver/binding-android-arm-eabi@11.24.2': + resolution: {integrity: sha512-y09e0L0SRI2OA2tUIrjBgoV3eH5hvUKXNkJqXmNo5V2WxIjyC7I7aJfRLMEVpA8yi95f90gFDvO0VMgrDw+vwA==} + cpu: [arm] + os: [android] + + '@oxc-resolver/binding-android-arm64@11.24.2': + resolution: {integrity: sha512-cl4icWaZFnLdg8m6qtnh5rBMuGbxc/ptStFHLeCNwr+2cZjkjNwQu/jYRS0CHlnPecOJMpuS5M6/BH+0J/YkEg==} + cpu: [arm64] + os: [android] + + '@oxc-resolver/binding-darwin-arm64@11.24.2': + resolution: {integrity: sha512-At29QEMF6HajbQvgY8K6OXnHD1x9rad74xBEfmCB6ZqCGsdq75aK7tOYcTbOanMy8qdIBrfL3SMr3p/lfSlb9w==} + cpu: [arm64] + os: [darwin] + + '@oxc-resolver/binding-darwin-x64@11.24.2': + resolution: {integrity: sha512-A5Kqr1EUj4oIL5CF4WRssq/o5P0Y11cwoFouMRmQ7YnC/A8V93nv1nb7aSU8HwcgmXropjLNkVTl4MN87cu28Q==} + cpu: [x64] + os: [darwin] + + '@oxc-resolver/binding-freebsd-x64@11.24.2': + resolution: {integrity: sha512-R5xkRBRRz7ceH/P5Jrc6G7FmdUdgpLYyESFAUDVTNQ9K0sGPxcp4ljiwEwEqsvNcQ4sYbMRrWcHHBCu7ksAJVw==} + cpu: [x64] + os: [freebsd] + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.24.2': + resolution: {integrity: sha512-k/RuYL4L/R58IBn3wT5ma3Wh4k62bp1eYCFRWCmMsasUOqL+H6sW0VGFadEzKWXFFlz+2uIMoeMk9ySSZJHgbg==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm-musleabihf@11.24.2': + resolution: {integrity: sha512-bnHAak3ujYfH5pKk4NieFNbvYvernfoQDgwLddbZ3OtMYrem87/qjlA+u+aKG0oZcqSLGCful/6/CEA+aeAgaA==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-gnu@11.24.2': + resolution: {integrity: sha512-vDT3KHgzYp47gmtNOqL2VNhCyl5Zv643eyxm//A68J8DeUGXrvD1pZFiaT4jSfe+RInfnn1R2yVHye4enx6RnA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxc-resolver/binding-linux-arm64-musl@11.24.2': + resolution: {integrity: sha512-+kMlQvbzfyEYtu5FcjE4p+ttBLpKW4d/AsAsuE69BxV6V4twZJeIQZFfD8gh/wqglY0MkPSezWXQH0jBV13MUw==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxc-resolver/binding-linux-ppc64-gnu@11.24.2': + resolution: {integrity: sha512-shjfMhmZ3gq9fv/w7bi3PnZlgOPG+2QAOFf0BJF0EgBSIGZ6PMLN2zbGEblTUYB/NKVDRyYhE2ff3dJ1QqNPkA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxc-resolver/binding-linux-riscv64-gnu@11.24.2': + resolution: {integrity: sha512-zGelwFR5oRo+b69k8Lrzun86DyUHzfKN6cnjbR9l7Z7NIRznOE/2ZvPa1IUKqAL2PzAXOdwkfVqNvO1H2RlpAw==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxc-resolver/binding-linux-riscv64-musl@11.24.2': + resolution: {integrity: sha512-qxZ1SWCXJY0eyhAlP6Lmo9F2Nrtx7EkYj9oCgL8apDPCwXwCEDA2U697bbT81JIc2IrVjxO4KX6WU2N+oN9Z4w==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxc-resolver/binding-linux-s390x-gnu@11.24.2': + resolution: {integrity: sha512-sGCecF3cx2DFlH4t/z7ApnOnXqN48p5p5mlHDEnHTAukQa2P+qMVE4CwyWE9W+q/m3QJ7kKfGrIjax31f44oFQ==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxc-resolver/binding-linux-x64-gnu@11.24.2': + resolution: {integrity: sha512-k/VlMMcSzMlahb3/fENM4rTlsJ0s3fFROA0KXPBmKggqmTSaE383sl8F3KCOXPLmVsYfW6hCitMhXCEtNeZxxg==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxc-resolver/binding-linux-x64-musl@11.24.2': + resolution: {integrity: sha512-8hbnZyNi97b/8wapYaIF9+t9GmZKBW2vunaOc3h9HGJptH7b7XpvZqOTBSm/MpTjr7H497BlgOaSfLUdhmy2bw==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxc-resolver/binding-openharmony-arm64@11.24.2': + resolution: {integrity: sha512-MvyGik3a6pVgZ0t/kWlbmFxFLmXQJwgLsY2eYFHLpy0wGwRbfzeIGgDwQ3kXqE30z+kSXennRkCrT7TUvkptNg==} + cpu: [arm64] + os: [openharmony] + + '@oxc-resolver/binding-wasm32-wasi@11.24.2': + resolution: {integrity: sha512-vHcssMPwO08RTvj/c0iOBz90attxyG3wQJ0dTcyEQK43LRpcdLWZlV5feBhv6Isn6ahbQIzHbCgfa81+RiML0Q==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-resolver/binding-win32-arm64-msvc@11.24.2': + resolution: {integrity: sha512-uokJqro2iBqkFvJdKQLP7d8/BUmFwESQFVmIJUQKj1Xn1a/LysJoe1vmeECLF5b3jsV8CAL5sEMJXX6SdK9Nhg==} + cpu: [arm64] + os: [win32] + + '@oxc-resolver/binding-win32-x64-msvc@11.24.2': + resolution: {integrity: sha512-UqGPmo56KDfLlfXFAFIrNflHT8tFxWGEivWg3Zeyp4Uy2NlKN1FGPr6/BxcLGG3+kZ6Wp14g5Uj+n71boqZfiw==} + cpu: [x64] + os: [win32] + + '@oxfmt/binding-android-arm-eabi@0.61.0': + resolution: {integrity: sha512-BaS+1OVvg9sr+Xav0+KdWedQRcAzrdoEcwMZeqoc2F6ieC1s/t5eM35YQoRPQ7vAqkZ+p3tbQb1r9I9mrV5oGA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.61.0': + resolution: {integrity: sha512-of8atAV0M1egGcVOMbgZCvc10sFOP3ayQBNQV5h5G3fNq8gACdEswfFk9bzGrdbM23rtg0Coxi7np7oPLcueNw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.61.0': + resolution: {integrity: sha512-7l8+5ov4BGwtAcmpzvEik/TG3bciwyw/S3e6j5GKH7pcQqcgCVxD3AuJeP6upto+SOTBKQ4wrrdbMt0gq8fHSQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.61.0': + resolution: {integrity: sha512-Fnz4dDDXBb7udk+DmwelNjxbD6yptyxwCqwCH2ebo4RVLxVsRfFsn/AHJC49KIltPrVokamGv4SSOsiV50DTxQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.61.0': + resolution: {integrity: sha512-mddOebKNCP+AucmzfNsk3jgbr681qAUvgMqi865GW5gWLJ/AnzXbvjQRrny0e++NAN8aphav/aRSrfFxNsNjpA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.61.0': + resolution: {integrity: sha512-svx59iYL+DbaZGZUIoice4W0CjRXGExnbz7Re+awIb60rVxBS2KrU7Hnlx+nZYanLGLpjneUEgo/VFEKkSZAyQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.61.0': + resolution: {integrity: sha512-BYK9MPJPCf6d+fLKMTruThmEyCtHzQ1zLcsrTlUVkmnoXIaHAbfpeLYQwX1tkjs7W11dyzoi6HFvKcdnvX1zNg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.61.0': + resolution: {integrity: sha512-QUaCNLq2/EC6G5ljOuFanl9Lgw6ZWp4co7rs4+KOMUzbGfA4Lq58FHRjjF9sVIG+93XSbo343MxFATrOU1qctA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.61.0': + resolution: {integrity: sha512-S6uvJ6MXnRXl+zTs0CARNDvkE+cymj0EVWEKKsyKnlLlqTyQJBjw5s4D2pSIOZc+S46cy4STefzcr/sm0VzVPA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.61.0': + resolution: {integrity: sha512-6VDlRcytvZG6UlSIdAFKDLbppo9tvPxrWzle6vHldYFMeuDPQEfMKrkwezp7FaBq1wik9ra554ZZeRPsyIkFpg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.61.0': + resolution: {integrity: sha512-KkBTYbzExpbmn15XjKPLu2fRV2PVlq+KWt+brad5rwIa03vdYoaDRWiS7raHII/dCTR6Ro4UpYUCH4t6lif4WQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.61.0': + resolution: {integrity: sha512-69tzIq7sJLVB9dxYYtvMzcSSsnZHSO+U2U19O2RqDqgj6+Q4O7HjSXdaszbcgqzhsUwzSH7z5kWvk8nmf6BHTg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.61.0': + resolution: {integrity: sha512-Oqi/N0OvtOVXsPKAOOhKgGH3msRYF8BLJaNBbWiupRiKoKVyc8JRKPCfarkQJC+RgP9U8raUKLe+bNwd0HUMiA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.61.0': + resolution: {integrity: sha512-3TKwv/ed4uwJSemAA8P9XcoqETpjQI4waquF9UilhA9Mn/dhr1PdUEXWlL74mtc6ZNfmKPA9+NEJm01nRF8CVA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.61.0': + resolution: {integrity: sha512-uFso4u4nLkVSlMCpgjyvWV60Gt7GvDQHnk1mmRxHIkZTMB0ljpUKwCD9FYGgN9H97x2wYl0UwEjgRZaPIuhEhw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-openharmony-arm64@0.61.0': + resolution: {integrity: sha512-keGLkzeOvkMpNmPp4hffXWpfoSsY6e1K8++KXD4mSSfxdvM8q9QUDsYY689TB1k6Co832DZn1MnaaVx6cIBMWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.61.0': + resolution: {integrity: sha512-VzsAISkFxmNhJ5LBDEL9VuH6tJsVJMtqYit2LyIUf/HLnsCe4Pg9SMOjjVQzGWt0bnpyfJ94CrqTqcpNZzK+ug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.61.0': + resolution: {integrity: sha512-xv4t7yzwJoYaLB6Zv28B3W+j7brEjsyv50rLTAQgmxJzddce9fAMCxed8dSAkbWES0zz2J29nYK5FaTuD2YBHg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.61.0': + resolution: {integrity: sha512-6EZXFkqOwxdDYjIn3TSNnPk3ST5E5GiYd4FiM6UF/mCL/LZSfr6D6UygTfW3R1PCQP2quCKpCEGRlij8E3VYbg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxlint/binding-android-arm-eabi@1.79.0': + resolution: {integrity: sha512-TebFaaMklO/RXzTv7PucaCq9l3X6D1gA+C8H6K4njtjFOV+zWE9MKLpulcJZN9bzytbUbQIY0mZuz12nQ5Kv4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxlint/binding-android-arm64@1.79.0': + resolution: {integrity: sha512-KqqnOtAVgNsPPF0YSodkFZA1O80jcKoCZCTu3bgsszxA+MrMP9TLzfXitKjEj1FmrPprKDMdRDMmY3weESO9sg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxlint/binding-darwin-arm64@1.79.0': + resolution: {integrity: sha512-BVC2nsMzqQzRDPc5RhixkZ+m1p7iH4bxRRvqkbwDXX0PlQKm1BPy8J8cRjnAFafOq2QzI+BfO3vE8w2GZ3CBag==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxlint/binding-darwin-x64@1.79.0': + resolution: {integrity: sha512-p6Lm+snmhGuLKL1+CpCV8L6ijkE/qJzK2H2jG9+eKJT0n31RbY4FLsdhexekgP3bLpw4Kgde+9DZuDZQ4yIInA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxlint/binding-freebsd-x64@1.79.0': + resolution: {integrity: sha512-qDMm0dXZnoHyRqSL4N4xUq82T4sqK5cbKSjvd/dF/YbMUXc2R1wEPf+vmA5S0qUmi0nwXfNbjXBtZaIqzQLIMg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxlint/binding-linux-arm-gnueabihf@1.79.0': + resolution: {integrity: sha512-2od7s0nuKPzqyUZAWk9KkCyGg7eI9dwFPZg+20lB15fKFkVZ0c9ZFxqPfiBAyDTlTkh9stPI0t+JlPCqMbItVA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm-musleabihf@1.79.0': + resolution: {integrity: sha512-ZOQUjkzDnvlhSE3+tWC3YXx94MMl+sYMlwH+u1+YGApGHOJP/YAc8ZBRFOXZ6eOBmxtXAWuS/fBcdZr8qqNO1A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm64-gnu@1.79.0': + resolution: {integrity: sha512-lu158FR4nGqGeRS3BQvtG85wRgU/Fy4MD5Cxp1hzJXizGiLo6u2742wJSCDKh8cFcZntvX7fcxlq4mMmfryH1g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-arm64-musl@1.79.0': + resolution: {integrity: sha512-mbpKQeE2aflTjddaHK7MP8KP/OFbUM++lt5M635ENM8IyIdK0jm2t9pb+2v9mVVIvhF6TqA4l7F79Pll1mi+uw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-ppc64-gnu@1.79.0': + resolution: {integrity: sha512-WpGNua7gaxaHnpSDeog2ji8IDHn/QLPl9LPzwkR/FvVv58vT5BcXjRXnU+wbu3N75cpeha8CdC7ho/U2OIsB4g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-gnu@1.79.0': + resolution: {integrity: sha512-tK1E93A5LVzISg4ngpKJnfTs7EqtIUceGI7MQ4GyDjJiLi8wPCkEyKlj2xkyKWZ1yzkDJyLHTBJ5/iFWRdnJvg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-riscv64-musl@1.79.0': + resolution: {integrity: sha512-qhQvUIrngXivA2A9pQ+xPCychztn/5qUv7yS3gDwXv3w7Rag+eTeeXWmRyx+t7XsW5x6LuY/8AsTq36UgFIblg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxlint/binding-linux-s390x-gnu@1.79.0': + resolution: {integrity: sha512-sv6AaVgU/eE6u+6WFiQVDcPPwTxP6IJMSB9k701W2r/r6Tx465e8vPvVyRxquNH4Vy6KwRNu90mVbxXJN8+5gg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-gnu@1.79.0': + resolution: {integrity: sha512-iFZL02deziHslb3jEX9KdqlAkYoo4fGyotchKDzdfK1f5mxlIBeiQeHhvK3iFpuEJSB4ma/qeFn9oxPiwnhUPQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxlint/binding-linux-x64-musl@1.79.0': + resolution: {integrity: sha512-3DtZR2raqObnh7wXZoFYFd0Fw7skBvcb3f7A+/lkEiDuh8hrE6vv9b/62Qxao1a9/OeHLw/FcXlXzgsW9wTRFg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxlint/binding-openharmony-arm64@1.79.0': + resolution: {integrity: sha512-Oatt4GuA1WJkqzk2ozx4HrWROOi7opV3AKDw/U8qDIqeTqzsjn5K2x3REJMNjU3/KU/Bkq96Zi3CknaiDTaC/Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxlint/binding-win32-arm64-msvc@1.79.0': + resolution: {integrity: sha512-NAgZr9Qp8nIA9rpo0JEvwiabTF/2UVqBNnupBG9X4kxXcQoScJUTi+qHhvabb9s/thgj5wQ4XcIaJvb+ZMgoKw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxlint/binding-win32-ia32-msvc@1.79.0': + resolution: {integrity: sha512-+KyXjIvcpaXmWW/j9NNY5yWjrIVxaX18VyIheQy3jwc2GSYgpCr7MGI/HxIGQ/shAL5IWEKbhsqoMpAO5Stiog==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.79.0': + resolution: {integrity: sha512-mEelcCMMBS57sIXh2veGMNy+pQwuGtcMxHxGIZWQ5Ba9pJ5jCCUFOZB9E2JhBaxGsURe+WGe0zJp4RVre52gpQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@pnpm/deps.graph-sequencer@1100.0.1': + resolution: {integrity: sha512-pOr5+q1fLYKwFN3LAJuGZEnfXDcQ73zqgDHMtGy+K+uIoUqyY+6MeDCWFwfu+4EFuq76I5EPFofoNAI+Bmmq4A==} + engines: {node: '>=22.13'} + + '@polka/url@1.0.0-next.29': + resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} + + '@quansync/fs@1.0.0': + resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} + + '@rolldown/binding-android-arm-eabi@1.2.5': + resolution: {integrity: sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.2.5': + resolution: {integrity: sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.5': + resolution: {integrity: sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.5': + resolution: {integrity: sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.5': + resolution: {integrity: sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.5': + resolution: {integrity: sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.5': + resolution: {integrity: sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.5': + resolution: {integrity: sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.5': + resolution: {integrity: sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.5': + resolution: {integrity: sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.5': + resolution: {integrity: sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.5': + resolution: {integrity: sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.5': + resolution: {integrity: sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.5': + resolution: {integrity: sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.5': + resolution: {integrity: sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@turbo/darwin-64@2.10.11': + resolution: {integrity: sha512-v3R+1R/Ysozyo+p7Ri8MCIbndOvYt3DgPFrGLhrhQHfvyvbxyH3WyJj+A/2JTNmNleuAlh3JUyCV0iSVHIONTA==} + cpu: [x64] + os: [darwin] + + '@turbo/darwin-arm64@2.10.11': + resolution: {integrity: sha512-R0a0CvGAeYYsBgPIgFNB3agGXh6qukjduNhFlwVVX1Ss2IdBJLXmgjytNGmo084bLKS0B6UdLRwKhXMHKKaObQ==} + cpu: [arm64] + os: [darwin] + + '@turbo/linux-64@2.10.11': + resolution: {integrity: sha512-dGlY2vg7jpsLjGS1bf9sD/cw1sGMAYbeHGQKGRFxd5Zaj+Ufbj8cNXl/vIit8ueCU97zhL/znn60ZV5iSfZAxw==} + cpu: [x64] + os: [android, linux] + + '@turbo/linux-arm64@2.10.11': + resolution: {integrity: sha512-eSP9+jjsSCBs2x0QpJZlp49dSD1EIMwXH7PsMIhdWk7w6IThhuKJ+jL95JQ2IW7tRjRmdh8gKcKQtrHLD5R5lA==} + cpu: [arm64] + os: [android, linux] + + '@turbo/windows-64@2.10.11': + resolution: {integrity: sha512-4aD7edogJ8arK8DOyvjTI2KKwmchD5M/WM4BZgidrtFf7aSgn8Ce2rJnDwmriw980c2cKlHnhXtlGy38VtKB8g==} + cpu: [x64] + os: [win32] + + '@turbo/windows-arm64@2.10.11': + resolution: {integrity: sha512-m8tJkIrTrbQ9O1uHxV0GUq623Zg1678xGna8eMsy4KbygUX/wVFgdZDYV/AxyoyaW/U7nyKoBvaDVwm22p9xqA==} + cpu: [arm64] + os: [win32] + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + '@vitest/coverage-v8@4.1.11': + resolution: {integrity: sha512-8MVGEFnJIcdGjcbfKmeq8z0pZHH0JlVtoVZH9Q/qwUp6wyFnEJUBMrw9DCaj+ra3vShGmhavjalMIhPNxZAUcw==} + peerDependencies: + '@vitest/browser': 4.1.11 + vitest: 4.1.11 + peerDependenciesMeta: + '@vitest/browser': + optional: true + + '@vitest/expect@4.1.11': + resolution: {integrity: sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==} + + '@vitest/mocker@4.1.11': + resolution: {integrity: sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.11': + resolution: {integrity: sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==} + + '@vitest/runner@4.1.11': + resolution: {integrity: sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==} + + '@vitest/snapshot@4.1.11': + resolution: {integrity: sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==} + + '@vitest/spy@4.1.11': + resolution: {integrity: sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==} + + '@vitest/ui@4.1.11': + resolution: {integrity: sha512-r/rwyKoev21mWdRGSEkZOqkQ2BYy68mwjihg9M90nNRbf4NGrgzZ4cj6JNCEwlOGJkbKeMgsjlykvwKUbRr7gw==} + peerDependencies: + vitest: 4.1.11 + + '@vitest/utils@4.1.11': + resolution: {integrity: sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==} + + '@ylfjuk/md@0.0.3': + resolution: {integrity: sha512-8Ht1CKXSiva+ufgdIP18NdVbKFTazqggidtOjV2LtqCwBw+wyBN6H+UYVpbyi1DdNRPO/Xeyfh5utoTErq0BAw==} + + '@ylfjuk/oxc@0.0.1': + resolution: {integrity: sha512-HPtZd5m4pHKsMeYuMMm17w7l89+tiUd82hMZ7b2H77AC5n/P74bC98mzrlh9e96wtUg4ahmnSSOSqJLumT2Reg==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + oxfmt: ^0.61.0 + oxlint: ^1.77.0 + + '@ylfjuk/tsconfigs@0.1.0': + resolution: {integrity: sha512-Dqo9L3yVtZ38o7ONVdTRNC229YY4xtmpfSH/OCaoASwQNQgf+0lvka3lVfSRsF5Ez5xlcsbXJ5PCbu/KSMduUA==} + peerDependencies: + typescript: ^7.0.2 + + '@yuku-codegen/binding-android-arm64@0.8.7': + resolution: {integrity: sha512-C/0zV5IhgVdYhGJTwrY0v8dknxlhiKwtVJkMUaexu9/QvRmzlV4vfU3hZlUSgqc2BxQHntL1mCVbDq8j0FRFDw==} + cpu: [arm64] + os: [android] + + '@yuku-codegen/binding-darwin-arm64@0.8.7': + resolution: {integrity: sha512-/u+REDMI4a0/lsJXTM4c53/w31OGZLOReZIyg62uhgLs0kc8NHsj/nOcxTdlQjq5gi0zhdkccD9LaLTXcdzPvw==} + cpu: [arm64] + os: [darwin] + + '@yuku-codegen/binding-darwin-x64@0.8.7': + resolution: {integrity: sha512-sMMzFOwCo4WXR+/6zIBThOocSC50iIIZZdfiIDbaLvj0Ax/rWt/iavyfEAqajyvzydLyCqR/ZItdLWSRlu1umw==} + cpu: [x64] + os: [darwin] + + '@yuku-codegen/binding-freebsd-x64@0.8.7': + resolution: {integrity: sha512-MpdpKXix9P+Y1rKgjvcNeNtGjXeL1CmttNhYINrWls8kRpm4xM/oBGTmn6w7to8lAlwj5jm8q03dQPl5mRv4Qw==} + cpu: [x64] + os: [freebsd] + + '@yuku-codegen/binding-linux-arm-gnu@0.8.7': + resolution: {integrity: sha512-rr1srFLlPAmC1vtxfc9C1YLDe3iH09YjfSeeIidBqKhzx1MATjOAq4mjlRUOnhr/L27MotWIYOFKwVsd5JZFOg==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@yuku-codegen/binding-linux-arm-musl@0.8.7': + resolution: {integrity: sha512-eAufXh8qBRpiSO6ueaMDL+yyoXIGLhpUce72YbcACtZU2qhExwBIJyEtQf5kH2Ki0X2aqkSjSfog4OPtKXan3Q==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@yuku-codegen/binding-linux-arm64-gnu@0.8.7': + resolution: {integrity: sha512-gw4w6wPoHObBrdIC4duVWLmJOvpdE25j5D7yrM5mACNlK4klRz/lv8hK+ssQk9EJHBgZjSaqZIJVFgqNYbfv7A==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@yuku-codegen/binding-linux-arm64-musl@0.8.7': + resolution: {integrity: sha512-L68N6Y4XkqcIaKo3Ra88JEvBEH4AHff44A4INcrxeVWZ8CZtu2tCpfVxe3hR8qQQMcvBSQlDn24KpkCKEhVvfA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@yuku-codegen/binding-linux-x64-gnu@0.8.7': + resolution: {integrity: sha512-dzyAbltJmf3Cqlb8HcFuYIf5Yn0fl1vTr3XJ9HiVNNvOlhqPSArOqtw9vI1p6/VTXTjrMLXlU+s+/kNHiIy/Cw==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@yuku-codegen/binding-linux-x64-musl@0.8.7': + resolution: {integrity: sha512-Otw4MH3404q0Bbvl+YTdW9aoUV5vXmUw8260bWvt1XlaoIX/ceSgI4ygheRDMfBPoHt6FDayQaO9OLVUZAgkFA==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@yuku-codegen/binding-win32-arm64@0.8.7': + resolution: {integrity: sha512-qo/jyrzryiBuKEsFiuWaBCBe3tRMynQ0qFWFgOEjcCMQeZfBm+wKiVEUEFXXLc7bh8YezguAWp0Mtnhq4ARNyA==} + cpu: [arm64] + os: [win32] + + '@yuku-codegen/binding-win32-x64@0.8.7': + resolution: {integrity: sha512-D5lDsVDx6m00E6bWySlWdH72Ca4TPSaphDqB6QjU6MpuNLIJqoGoatYyq2rOmBE8Zv/kunot/o58KGL03P3eiA==} + cpu: [x64] + os: [win32] + + '@yuku-parser/binding-android-arm64@0.8.7': + resolution: {integrity: sha512-eGKYiUDX7Y0V7tDTmg+JTVnXnjMqfXXsorZ+EDf5kxwchQ3Or1HS14MzI2fw+jFhHR85fCWt+mtX33Yao73hIQ==} + cpu: [arm64] + os: [android] + + '@yuku-parser/binding-darwin-arm64@0.8.7': + resolution: {integrity: sha512-Re0RHelKLnjEURulY2/KxW+Ngb8zuNA4BRZuMwgGQNzVumT6u4U2N2hc01oeYVNVof0i7GrXE4UCNBgbpRRnjQ==} + cpu: [arm64] + os: [darwin] + + '@yuku-parser/binding-darwin-x64@0.8.7': + resolution: {integrity: sha512-Hn8DROtQkjlA1ACbPgj4a7eP9IuVOI504oiTwpkWPbpaDWD9KdmnVYCqW+1LfenNK/g7O9NhWGpXEdaCNX7lIA==} + cpu: [x64] + os: [darwin] + + '@yuku-parser/binding-freebsd-x64@0.8.7': + resolution: {integrity: sha512-bAP2OV8wRuzplX/jYxv9+vvqQT8JxyNphI8fLfXGL054Xs+4/J5u33cIm3y4rxY8rdoLmmdiJs2Tq7r7lrDRfA==} + cpu: [x64] + os: [freebsd] + + '@yuku-parser/binding-linux-arm-gnu@0.8.7': + resolution: {integrity: sha512-kTYwJQQgmZeAWdDIWabiReIZMpmfLueIj1tCmjStUtFGhR1Z0qwxonKVfUC4N7h/VhGGzLZ//7O1kgt1QKqgCg==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@yuku-parser/binding-linux-arm-musl@0.8.7': + resolution: {integrity: sha512-uL4jE8HPT2BLlxAXyD10LqgPuXa9eDa0BKpCdSANmzIJghq/2eZo3/gQNtaxPZMupWoxjYzSad9IXrwu7aYPXQ==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@yuku-parser/binding-linux-arm64-gnu@0.8.7': + resolution: {integrity: sha512-3gVN4pWSKZmXiNX7cU164dR9MPvesCHnlH6nPfpK+yQsCuYphjKKplcb4SnZBrhiqmXbgb2HR0c2TS0IZUPhgA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@yuku-parser/binding-linux-arm64-musl@0.8.7': + resolution: {integrity: sha512-S0mwfEjoLpxzXeZw802Wa4RaELsQiPtWqG6INcy8j4GtvNFtl4LCX3eGO1XLn9pyLAISLzTRyU3zUCBUPin8lg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@yuku-parser/binding-linux-x64-gnu@0.8.7': + resolution: {integrity: sha512-lnbWdPmerE5D1uH1G4IEZKnPzCrWCStRGrtgpSIe1RibAo5bZIjDbbbPYXmMHCEh4F+x/JaJpElh26a3r+BPbg==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@yuku-parser/binding-linux-x64-musl@0.8.7': + resolution: {integrity: sha512-769uwndMvMzUvATWbAcEvyLHKA+DzhHSCl/obBUrRdYfRo26yxui6S8y3z7uJ+Naup7UKrDxrpK7OnQkxkl9KQ==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@yuku-parser/binding-win32-arm64@0.8.7': + resolution: {integrity: sha512-mEB/9PlaAkisJ6KWGz0zvywXoU6+80dTlR2LwS7s/jcXXoU6fm2+sitBZXtqu3+Q4DcDgPxM45uWMCzPs0TSRw==} + cpu: [arm64] + os: [win32] + + '@yuku-parser/binding-win32-x64@0.8.7': + resolution: {integrity: sha512-8vNB2DP0ou61nGb8tc/qfi41gfyDXz1MHr2zqL3nR+cJ6CEbiuWV/l/a/vv151gCgiZLLAyGkQGENpozdg716w==} + cpu: [x64] + os: [win32] + + '@yuku-toolchain/types@0.8.7': + resolution: {integrity: sha512-2Z53dNxAJL6UvFoIrDZvYf3zlO8s4VJK4O2hhaB4mXVwwpX/7ajtss3cmfqKvamlNLWyt9FSWs4eoYdlbxpnHA==} + + ansi-escapes@7.3.0: + resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} + engines: {node: '>=18'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansis@4.3.1: + resolution: {integrity: sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==} + engines: {node: '>=14'} + + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + ast-v8-to-istanbul@1.0.5: + resolution: {integrity: sha512-UPAgKJFSEGMWSDr3LX4tqnAb4f7KGT8O40Tyx8wbYmmZ/yn58lNCm8h3svs3eXgiGd5AXxz8NDOvXWvicq+rJA==} + + cac@7.0.0: + resolution: {integrity: sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==} + engines: {node: '>=20.19.0'} + + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + + cjs-module-lexer@1.4.3: + resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} + + cli-highlight@2.1.11: + resolution: {integrity: sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==} + engines: {node: '>=8.0.0', npm: '>=5.0.0'} + hasBin: true + + cli-table3@0.6.5: + resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} + engines: {node: 10.* || >= 12.*} + + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + dts-resolver@3.0.0: + resolution: {integrity: sha512-1T1f+z+4tl9XD+m+0HBgWoL/nm0bOIffyWaUuUSBlFg/86IWvfx+wjNaO/ybU0AJzG9/Mi5hBUgGV6zCmWEN7Q==} + engines: {node: ^22.18.0 || >=24.0.0} + peerDependencies: + oxc-resolver: '>=11.0.0' + peerDependenciesMeta: + oxc-resolver: + optional: true + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emojilib@2.4.0: + resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} + + empathic@2.0.1: + resolution: {integrity: sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==} + engines: {node: '>=14'} + + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fast-string-truncated-width@3.0.3: + resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} + + fast-string-width@3.0.2: + resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} + + fast-wrap-ansi@0.2.2: + resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} + + fd-package-json@2.0.0: + resolution: {integrity: sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fflate@0.8.3: + resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} + + flatted@3.4.4: + resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + + formatly@0.3.0: + resolution: {integrity: sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w==} + engines: {node: '>=18.3.0'} + hasBin: true + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-tsconfig@4.14.1: + resolution: {integrity: sha512-Dz/6HxkrxgNehhxLVeyv8sad9UzF2xBVeaKBQNDfJ5XiSXmp2gTR0eO0RWiT2NCKS5aGP9jjkOMggTN90qU50A==} + + get-tsconfig@5.0.0-beta.5: + resolution: {integrity: sha512-/6gFNr0N04nob252sTQxyFLi3eKFRqIg1I87YcqAMT1i6SQrSF6KujUEQrtrjMV0H/eejTCltLdDSTEMzHbnsQ==} + engines: {node: '>=20.20.0'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + highlight.js@10.7.3: + resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + + hookable@6.1.1: + resolution: {integrity: sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + human-id@4.2.1: + resolution: {integrity: sha512-zPGsiS+dWoTZtZ4AtpA9Y+BdSFSNWvnouNlWNoUFyAM6xHOHmdCvqO3k8AIbdamCOv4gUFUVNPf6rJFfc4UiJw==} + hasBin: true + + import-meta-resolve@4.2.0: + resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + + import-without-cache@0.4.0: + resolution: {integrity: sha512-NkJQA7oZ4YHQhd2+H3BoRFKF3d/XNsiKpHZCQEMH9pDX27hQQLsTyOocyRgaIVtf8gHX3Nt3LPkR4e5EdtPAGQ==} + engines: {node: ^22.18.0 || >=24.0.0} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-reports@3.2.0: + resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} + engines: {node: '>=8'} + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + + js-tokens@10.0.0: + resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + knip@6.32.2: + resolution: {integrity: sha512-WXTXbmocrw7gqm1A1TQvFN0OgJ7hUSU6E1g6SPRIzzHFogUBhXByc7cYeOFVtJ2uODg7DP4VbESYBYnfbtBYsg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + launch-editor@2.14.1: + resolution: {integrity: sha512-QWBrQsMpH7gPr965dsKD/3cKWiNoTjpATQf++Xq63N6sKRGMwlVXz41O1IZTMfZQgBctD/K5Zt06+/I6pP6+HA==} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + lru-cache@11.5.2: + resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==} + engines: {node: 20 || >=22} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + magicast@0.5.4: + resolution: {integrity: sha512-llBEhWm1SacoRwgHUoQJYtwp4PBLF4faQi5TCpIGyGs9n4y5+juI0tDgyKIfpqxckRHaHzouUEph3THklWh03w==} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + marked-terminal@7.3.0: + resolution: {integrity: sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw==} + engines: {node: '>=16.0.0'} + peerDependencies: + marked: '>=1 <16' + + marked@9.1.6: + resolution: {integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==} + engines: {node: '>= 16'} + hasBin: true + + mrmime@2.0.1: + resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} + engines: {node: '>=10'} + + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + + nanoid@3.3.18: + resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + node-emoji@2.2.0: + resolution: {integrity: sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==} + engines: {node: '>=18'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + obug@2.1.4: + resolution: {integrity: sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==} + engines: {node: '>=12.20.0'} + + oxc-parser@0.143.0: + resolution: {integrity: sha512-ov0NzaDCOInknS7mP1cwKdJERt3utPW8ldjtdUXQ8Ty0GEFD08wk422vCUN0d7pST6kqtV7dxoI9w1Zi0l/9TA==} + engines: {node: ^20.19.0 || >=22.12.0} + + oxc-resolver@11.24.2: + resolution: {integrity: sha512-FY91FiDBj7ls5MsFS9jN3tjz2o0/zsdSsymlakySaBwVJZorHhkWyICLZMKxlu1R9vYo+sd3z1jwb4J8x7bNDw==} + + oxfmt@0.61.0: + resolution: {integrity: sha512-DxdHBEMYpcEnHoUHjjOigUqV2TYKsvxLwUPXnVYBjgFdqrcQ/91OtwubtZ2PUodCs3sStI8R5Qw3fKNGK4e8wQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + svelte: ^5.0.0 + vite-plus: '*' + peerDependenciesMeta: + svelte: + optional: true + vite-plus: + optional: true + + oxlint@1.79.0: + resolution: {integrity: sha512-hVJ9hq9m2unPS+Of4eJJgCPdIeCC+3DHEUX3tkmrPJr3OK2hz7PhXwgC+ZP71ZcYu8cCDEtQrqLxWNvxBppBVg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=7.0.2001' + vite-plus: '*' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + vite-plus: + optional: true + + package-manager-detector@1.8.0: + resolution: {integrity: sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==} + + parse5-htmlparser2-tree-adapter@6.0.1: + resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==} + + parse5@5.1.1: + resolution: {integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==} + + parse5@6.0.1: + resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + + postcss@8.5.26: + resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} + engines: {node: ^10 || ^12 || >=14} + + quansync@1.0.0: + resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + rolldown-plugin-dts@0.27.14: + resolution: {integrity: sha512-ZvuDDwoIpRK9RPxDXratCpklFO9QZZWndf/sd0VBFb4LEj0jj07UcHK9OCh7V4XiFz2Z89ziyBC2K6tJiDjrbw==} + engines: {node: ^22.18.0 || >=24.11.0} + peerDependencies: + '@typescript/native-preview': '*' + '@volar/typescript': ~2.4.0 + rolldown: ^1.0.0 + typescript: ^5.0.0 || ^6.0.0 || ~7.0.0 + vue-tsc: ~3.2.0 || ~3.3.0 + peerDependenciesMeta: + '@typescript/native-preview': + optional: true + '@volar/typescript': + optional: true + typescript: + optional: true + vue-tsc: + optional: true + + rolldown@1.2.5: + resolution: {integrity: sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + shell-quote@1.10.0: + resolution: {integrity: sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==} + engines: {node: '>= 0.4'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + sirv@3.0.2: + resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} + engines: {node: '>=18'} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + skin-tone@2.0.0: + resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} + engines: {node: '>=8'} + + smol-toml@1.8.0: + resolution: {integrity: sha512-kCZr2V3ch9i00x8zXRhjUNVcjG9ijES5dDudkXvUVCT5QlJNQWElSJdZqyPemffHoLNUYwOcou0Fy+ojN0uHSQ==} + engines: {node: '>= 18'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@4.2.0: + resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-json-comments@5.0.3: + resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} + engines: {node: '>=14.16'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-hyperlinks@3.2.0: + resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==} + engines: {node: '>=14.18'} + + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@1.3.0: + resolution: {integrity: sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinypool@2.1.0: + resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} + engines: {node: ^20.0.0 || >=22.0.0} + + tinyrainbow@3.1.1: + resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==} + engines: {node: '>=14.0.0'} + + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + tsdown@0.22.14: + resolution: {integrity: sha512-ule7Y+fsAN2iZbLDoo7C4KYljFJNJJ+fLshyn+9gozeTspVersWHxwdGB+Dm2hzA38s6muFnUTl0jK3vJm9ifQ==} + engines: {node: ^22.18.0 || >=24.11.0} + hasBin: true + peerDependencies: + '@arethetypeswrong/core': ^0.18.1 + '@tsdown/css': 0.22.14 + '@tsdown/exe': 0.22.14 + '@vitejs/devtools': '*' + publint: ^0.3.8 + tsx: '*' + typescript: ^5.0.0 || ^6.0.0 || ^7.0.0 + unplugin-unused: ^0.5.0 + unrun: '*' + peerDependenciesMeta: + '@arethetypeswrong/core': + optional: true + '@tsdown/css': + optional: true + '@tsdown/exe': + optional: true + '@vitejs/devtools': + optional: true + publint: + optional: true + tsx: + optional: true + typescript: + optional: true + unplugin-unused: + optional: true + unrun: + optional: true + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + turbo@2.10.11: + resolution: {integrity: sha512-yQfwQVoRXwOuyX1LxiJFBFNg6VfuYh+/RyZLd82+isgyLkBXw3S5XRRzvcck1FAjSCG5sVyLd+O1eDMvYa3J7g==} + hasBin: true + + typescript@5.6.1-rc: + resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + unbash@4.0.10: + resolution: {integrity: sha512-b7zoBQvpWp0vuN5q2vK2RRBR2SvuruQAs50DApdDveBSn3eSYd84IaHodFqQIMlvY9K2VnyBUEXgwOBuGU9GBg==} + engines: {node: '>=14'} + + unconfig-core@7.5.0: + resolution: {integrity: sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==} + + unicode-emoji-modifier-base@1.0.0: + resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} + engines: {node: '>=4'} + + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + verkit@0.3.2: + resolution: {integrity: sha512-zj/ob3UsvJGN0whEAKFp53REA5X66hvffVqoCtVQAakJKnKlH+/PcOfMoFwIG/o4rElqLv/ycAFlx8ZlXUorCg==} + engines: {node: '>=18.12.0'} + + vite@8.2.2: + resolution: {integrity: sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.4.0 || ^0.5.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@4.1.11: + resolution: {integrity: sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.11 + '@vitest/browser-preview': 4.1.11 + '@vitest/browser-webdriverio': 4.1.11 + '@vitest/coverage-istanbul': 4.1.11 + '@vitest/coverage-v8': 4.1.11 + '@vitest/ui': 4.1.11 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + walk-up-path@4.0.0: + resolution: {integrity: sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==} + engines: {node: 20 || >=22} + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + yargs@16.2.2: + resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==} + engines: {node: '>=10'} + + yuku-ast@0.8.7: + resolution: {integrity: sha512-h6+4bDfyootiMB9vckk5uKo5r5j0GHrkr17FQTDNfEsFT3DWlN9uu1HJwQwc64pgmLCI945fWM3lbTIqxjT3GQ==} + + yuku-codegen@0.8.7: + resolution: {integrity: sha512-adwDZSh8oVDzhE6Du9PwVWxcOxeV0e2EVhUuMKWfhSY4wkrDq9eqixlxFF3l/XGUV1E7UFzhpz9393MUumkyNw==} + + yuku-parser@0.8.7: + resolution: {integrity: sha512-vRD9nwt4L3aYpxNqeSC4WqLv58xrXef0Ong1Mc45CTXTIpvLafx7JO05sczmQZwdLEZvywrLOGdNC5+Rp5N1BQ==} + + zod@4.4.3: + resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + +snapshots: + + '@andrewbranch/untar.js@1.0.4': {} + + '@arethetypeswrong/cli@0.18.5': + dependencies: + '@arethetypeswrong/core': 0.18.5 + chalk: 4.1.2 + cli-table3: 0.6.5 + commander: 10.0.1 + marked: 9.1.6 + marked-terminal: 7.3.0(marked@9.1.6) + semver: 7.8.5 + + '@arethetypeswrong/core@0.18.5': + dependencies: + '@andrewbranch/untar.js': 1.0.4 + '@loaderkit/resolve': 1.0.6 + cjs-module-lexer: 1.4.3 + fflate: 0.8.3 + lru-cache: 11.5.2 + semver: 7.8.5 + typescript: 5.6.1-rc + validate-npm-package-name: 5.0.1 + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/parser@7.29.8': + dependencies: + '@babel/types': 7.29.8 + + '@babel/types@7.29.8': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@bcoe/v8-coverage@1.0.2': {} + + '@braidai/lang@1.1.2': {} + + '@changesets/apply-release-plan@8.0.0': + dependencies: + '@changesets/config': 4.0.0 + '@changesets/format': 0.1.2 + '@changesets/git': 4.0.0 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + import-meta-resolve: 4.2.0 + jsonc-parser: 3.3.1 + semver: 7.8.5 + + '@changesets/assemble-release-plan@7.0.0': + dependencies: + '@changesets/errors': 1.0.0 + '@changesets/get-dependents-graph': 3.0.0 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + semver: 7.8.5 + + '@changesets/changelog-git@1.0.0': + dependencies: + '@changesets/types': 7.0.0 + + '@changesets/cli@3.0.1': + dependencies: + '@changesets/apply-release-plan': 8.0.0 + '@changesets/assemble-release-plan': 7.0.0 + '@changesets/changelog-git': 1.0.0 + '@changesets/config': 4.0.0 + '@changesets/errors': 1.0.0 + '@changesets/get-dependents-graph': 3.0.0 + '@changesets/git': 4.0.0 + '@changesets/pre': 3.0.0 + '@changesets/read': 1.0.0 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + '@changesets/write': 1.0.1 + '@clack/prompts': 1.7.0 + '@manypkg/get-packages': 3.1.0 + '@pnpm/deps.graph-sequencer': 1100.0.1 + cac: 7.0.0 + import-meta-resolve: 4.2.0 + launch-editor: 2.14.1 + package-manager-detector: 1.8.0 + semver: 7.8.5 + tinyexec: 1.3.0 + + '@changesets/config@4.0.0': + dependencies: + '@changesets/get-dependents-graph': 3.0.0 + '@changesets/should-skip-package': 1.0.0 + '@changesets/types': 7.0.0 + '@manypkg/get-packages': 3.1.0 + picomatch: 4.0.5 + + '@changesets/errors@1.0.0': {} + + '@changesets/format@0.1.2': + dependencies: + package-manager-detector: 1.8.0 + tinyexec: 1.3.0 + + '@changesets/get-dependents-graph@3.0.0': + dependencies: + '@changesets/types': 7.0.0 + semver: 7.8.5 + + '@changesets/git@4.0.0': + dependencies: + '@changesets/errors': 1.0.0 + '@changesets/types': 7.0.0 + '@manypkg/get-packages': 3.1.0 + picomatch: 4.0.5 + tinyexec: 1.3.0 + + '@changesets/parse@1.0.0': + dependencies: + '@changesets/types': 7.0.0 + yaml: 2.9.0 + + '@changesets/pre@3.0.0': + dependencies: + '@changesets/errors': 1.0.0 + '@changesets/types': 7.0.0 + '@manypkg/get-packages': 3.1.0 + + '@changesets/read@1.0.0': + dependencies: + '@changesets/git': 4.0.0 + '@changesets/parse': 1.0.0 + '@changesets/types': 7.0.0 + + '@changesets/should-skip-package@1.0.0': + dependencies: + '@changesets/types': 7.0.0 + + '@changesets/types@7.0.0': {} + + '@changesets/write@1.0.1': + dependencies: + '@changesets/format': 0.1.2 + '@changesets/types': 7.0.0 + human-id: 4.2.1 + + '@clack/core@1.4.3': + dependencies: + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 + + '@clack/prompts@1.7.0': + dependencies: + '@clack/core': 1.4.3 + fast-string-width: 3.0.2 + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 + + '@colors/colors@1.5.0': + optional: true + + '@emnapi/core@1.11.2': + dependencies: + '@emnapi/wasi-threads': 1.2.2 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.2': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.2': + dependencies: + tslib: 2.8.1 + optional: true + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@loaderkit/resolve@1.0.6': + dependencies: + '@braidai/lang': 1.1.2 + + '@manypkg/find-root@3.1.0': + dependencies: + '@manypkg/tools': 2.1.2 + + '@manypkg/get-packages@3.1.0': + dependencies: + '@manypkg/find-root': 3.1.0 + '@manypkg/tools': 2.1.2 + + '@manypkg/tools@2.1.2': + dependencies: + jju: 1.4.0 + tinyglobby: 0.2.17 + yaml: 2.9.0 + + '@napi-rs/wasm-runtime@1.2.3(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)': + dependencies: + '@emnapi/core': 1.11.2 + '@emnapi/runtime': 1.11.2 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@oxc-parser/binding-android-arm-eabi@0.143.0': + optional: true + + '@oxc-parser/binding-android-arm64@0.143.0': + optional: true + + '@oxc-parser/binding-darwin-arm64@0.143.0': + optional: true + + '@oxc-parser/binding-darwin-x64@0.143.0': + optional: true + + '@oxc-parser/binding-freebsd-x64@0.143.0': + optional: true + + '@oxc-parser/binding-linux-arm-gnueabihf@0.143.0': + optional: true + + '@oxc-parser/binding-linux-arm-musleabihf@0.143.0': + optional: true + + '@oxc-parser/binding-linux-arm64-gnu@0.143.0': + optional: true + + '@oxc-parser/binding-linux-arm64-musl@0.143.0': + optional: true + + '@oxc-parser/binding-linux-ppc64-gnu@0.143.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-gnu@0.143.0': + optional: true + + '@oxc-parser/binding-linux-riscv64-musl@0.143.0': + optional: true + + '@oxc-parser/binding-linux-s390x-gnu@0.143.0': + optional: true + + '@oxc-parser/binding-linux-x64-gnu@0.143.0': + optional: true + + '@oxc-parser/binding-linux-x64-musl@0.143.0': + optional: true + + '@oxc-parser/binding-openharmony-arm64@0.143.0': + optional: true + + '@oxc-parser/binding-win32-arm64-msvc@0.143.0': + optional: true + + '@oxc-parser/binding-win32-ia32-msvc@0.143.0': + optional: true + + '@oxc-parser/binding-win32-x64-msvc@0.143.0': + optional: true + + '@oxc-project/types@0.143.0': {} + + '@oxc-project/types@0.146.0': {} + + '@oxc-resolver/binding-android-arm-eabi@11.24.2': + optional: true + + '@oxc-resolver/binding-android-arm64@11.24.2': + optional: true + + '@oxc-resolver/binding-darwin-arm64@11.24.2': + optional: true + + '@oxc-resolver/binding-darwin-x64@11.24.2': + optional: true + + '@oxc-resolver/binding-freebsd-x64@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-arm-musleabihf@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-arm64-gnu@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-arm64-musl@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-ppc64-gnu@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-riscv64-gnu@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-riscv64-musl@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-s390x-gnu@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-x64-gnu@11.24.2': + optional: true + + '@oxc-resolver/binding-linux-x64-musl@11.24.2': + optional: true + + '@oxc-resolver/binding-openharmony-arm64@11.24.2': + optional: true + + '@oxc-resolver/binding-wasm32-wasi@11.24.2': + dependencies: + '@emnapi/core': 1.11.2 + '@emnapi/runtime': 1.11.2 + '@napi-rs/wasm-runtime': 1.2.3(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + optional: true + + '@oxc-resolver/binding-win32-arm64-msvc@11.24.2': + optional: true + + '@oxc-resolver/binding-win32-x64-msvc@11.24.2': + optional: true + + '@oxfmt/binding-android-arm-eabi@0.61.0': + optional: true + + '@oxfmt/binding-android-arm64@0.61.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.61.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.61.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.61.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.61.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.61.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.61.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.61.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.61.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.61.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.61.0': + optional: true + + '@oxlint/binding-android-arm-eabi@1.79.0': + optional: true + + '@oxlint/binding-android-arm64@1.79.0': + optional: true + + '@oxlint/binding-darwin-arm64@1.79.0': + optional: true + + '@oxlint/binding-darwin-x64@1.79.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.79.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.79.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.79.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.79.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.79.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.79.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.79.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.79.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.79.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.79.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.79.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.79.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.79.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.79.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.79.0': + optional: true + + '@pnpm/deps.graph-sequencer@1100.0.1': {} + + '@polka/url@1.0.0-next.29': {} + + '@quansync/fs@1.0.0': + dependencies: + quansync: 1.0.0 + + '@rolldown/binding-android-arm-eabi@1.2.5': + optional: true + + '@rolldown/binding-android-arm64@1.2.5': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.5': + optional: true + + '@rolldown/binding-darwin-x64@1.2.5': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.5': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.5': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.5': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.5': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.5': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.5': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.5': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.5': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.5': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.5': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.5': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@sindresorhus/is@4.6.0': {} + + '@standard-schema/spec@1.1.0': {} + + '@turbo/darwin-64@2.10.11': + optional: true + + '@turbo/darwin-arm64@2.10.11': + optional: true + + '@turbo/linux-64@2.10.11': + optional: true + + '@turbo/linux-arm64@2.10.11': + optional: true + + '@turbo/windows-64@2.10.11': + optional: true + + '@turbo/windows-arm64@2.10.11': + optional: true + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.9': {} + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + '@vitest/coverage-v8@4.1.11(vitest@4.1.11)': + dependencies: + '@bcoe/v8-coverage': 1.0.2 + '@vitest/utils': 4.1.11 + ast-v8-to-istanbul: 1.0.5 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.2.0 + magicast: 0.5.4 + obug: 2.1.4 + std-env: 4.2.0 + tinyrainbow: 3.1.1 + vitest: 4.1.11(@vitest/coverage-v8@4.1.11)(@vitest/ui@4.1.11)(vite@8.2.2(jiti@2.7.0)(yaml@2.9.0)) + + '@vitest/expect@4.1.11': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.11 + '@vitest/utils': 4.1.11 + chai: 6.2.2 + tinyrainbow: 3.1.1 + + '@vitest/mocker@4.1.11(vite@8.2.2(jiti@2.7.0)(yaml@2.9.0))': + dependencies: + '@vitest/spy': 4.1.11 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 8.2.2(jiti@2.7.0)(yaml@2.9.0) + + '@vitest/pretty-format@4.1.11': + dependencies: + tinyrainbow: 3.1.1 + + '@vitest/runner@4.1.11': + dependencies: + '@vitest/utils': 4.1.11 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.11': + dependencies: + '@vitest/pretty-format': 4.1.11 + '@vitest/utils': 4.1.11 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.11': {} + + '@vitest/ui@4.1.11(vitest@4.1.11)': + dependencies: + '@vitest/utils': 4.1.11 + fflate: 0.8.3 + flatted: 3.4.4 + pathe: 2.0.3 + sirv: 3.0.2 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.1 + vitest: 4.1.11(@vitest/coverage-v8@4.1.11)(@vitest/ui@4.1.11)(vite@8.2.2(jiti@2.7.0)(yaml@2.9.0)) + + '@vitest/utils@4.1.11': + dependencies: + '@vitest/pretty-format': 4.1.11 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.1 + + '@ylfjuk/md@0.0.3': {} + + '@ylfjuk/oxc@0.0.1(oxfmt@0.61.0)(oxlint@1.79.0)': + dependencies: + oxfmt: 0.61.0 + oxlint: 1.79.0 + + '@ylfjuk/tsconfigs@0.1.0(typescript@7.0.2)': + dependencies: + typescript: 7.0.2 + + '@yuku-codegen/binding-android-arm64@0.8.7': + optional: true + + '@yuku-codegen/binding-darwin-arm64@0.8.7': + optional: true + + '@yuku-codegen/binding-darwin-x64@0.8.7': + optional: true + + '@yuku-codegen/binding-freebsd-x64@0.8.7': + optional: true + + '@yuku-codegen/binding-linux-arm-gnu@0.8.7': + optional: true + + '@yuku-codegen/binding-linux-arm-musl@0.8.7': + optional: true + + '@yuku-codegen/binding-linux-arm64-gnu@0.8.7': + optional: true + + '@yuku-codegen/binding-linux-arm64-musl@0.8.7': + optional: true + + '@yuku-codegen/binding-linux-x64-gnu@0.8.7': + optional: true + + '@yuku-codegen/binding-linux-x64-musl@0.8.7': + optional: true + + '@yuku-codegen/binding-win32-arm64@0.8.7': + optional: true + + '@yuku-codegen/binding-win32-x64@0.8.7': + optional: true + + '@yuku-parser/binding-android-arm64@0.8.7': + optional: true + + '@yuku-parser/binding-darwin-arm64@0.8.7': + optional: true + + '@yuku-parser/binding-darwin-x64@0.8.7': + optional: true + + '@yuku-parser/binding-freebsd-x64@0.8.7': + optional: true + + '@yuku-parser/binding-linux-arm-gnu@0.8.7': + optional: true + + '@yuku-parser/binding-linux-arm-musl@0.8.7': + optional: true + + '@yuku-parser/binding-linux-arm64-gnu@0.8.7': + optional: true + + '@yuku-parser/binding-linux-arm64-musl@0.8.7': + optional: true + + '@yuku-parser/binding-linux-x64-gnu@0.8.7': + optional: true + + '@yuku-parser/binding-linux-x64-musl@0.8.7': + optional: true + + '@yuku-parser/binding-win32-arm64@0.8.7': + optional: true + + '@yuku-parser/binding-win32-x64@0.8.7': + optional: true + + '@yuku-toolchain/types@0.8.7': {} + + ansi-escapes@7.3.0: + dependencies: + environment: 1.1.0 + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansis@4.3.1: {} + + any-promise@1.3.0: {} + + assertion-error@2.0.1: {} + + ast-v8-to-istanbul@1.0.5: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + estree-walker: 3.0.3 + js-tokens: 10.0.0 + + cac@7.0.0: {} + + chai@6.2.2: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.6.2: {} + + char-regex@1.0.2: {} + + cjs-module-lexer@1.4.3: {} + + cli-highlight@2.1.11: + dependencies: + chalk: 4.1.2 + highlight.js: 10.7.3 + mz: 2.7.0 + parse5: 5.1.1 + parse5-htmlparser2-tree-adapter: 6.0.1 + yargs: 16.2.2 + + cli-table3@0.6.5: + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + commander@10.0.1: {} + + convert-source-map@2.0.0: {} + + defu@6.1.7: {} + + detect-libc@2.1.2: {} + + dts-resolver@3.0.0(oxc-resolver@11.24.2): + optionalDependencies: + oxc-resolver: 11.24.2 + + emoji-regex@8.0.0: {} + + emojilib@2.4.0: {} + + empathic@2.0.1: {} + + environment@1.1.0: {} + + es-module-lexer@2.3.2: {} + + escalade@3.2.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + expect-type@1.4.0: {} + + fast-string-truncated-width@3.0.3: {} + + fast-string-width@3.0.2: + dependencies: + fast-string-truncated-width: 3.0.3 + + fast-wrap-ansi@0.2.2: + dependencies: + fast-string-width: 3.0.2 + + fd-package-json@2.0.0: + dependencies: + walk-up-path: 4.0.0 + + fdir@6.5.0(picomatch@4.0.5): + optionalDependencies: + picomatch: 4.0.5 + + fflate@0.8.3: {} + + flatted@3.4.4: {} + + formatly@0.3.0: + dependencies: + fd-package-json: 2.0.0 + + fsevents@2.3.3: + optional: true + + get-caller-file@2.0.5: {} + + get-tsconfig@4.14.1: + dependencies: + resolve-pkg-maps: 1.0.0 + + get-tsconfig@5.0.0-beta.5: + dependencies: + resolve-pkg-maps: 1.0.0 + + has-flag@4.0.0: {} + + highlight.js@10.7.3: {} + + hookable@6.1.1: {} + + html-escaper@2.0.2: {} + + human-id@4.2.1: {} + + import-meta-resolve@4.2.0: {} + + import-without-cache@0.4.0: {} + + is-fullwidth-code-point@3.0.0: {} + + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-reports@3.2.0: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + + jiti@2.7.0: {} + + jju@1.4.0: {} + + js-tokens@10.0.0: {} + + jsonc-parser@3.3.1: {} + + knip@6.32.2: + dependencies: + fdir: 6.5.0(picomatch@4.0.5) + formatly: 0.3.0 + get-tsconfig: 4.14.1 + jiti: 2.7.0 + oxc-parser: 0.143.0 + oxc-resolver: 11.24.2 + picomatch: 4.0.5 + smol-toml: 1.8.0 + strip-json-comments: 5.0.3 + tinyglobby: 0.2.17 + unbash: 4.0.10 + yaml: 2.9.0 + zod: 4.4.3 + + launch-editor@2.14.1: + dependencies: + picocolors: 1.1.1 + shell-quote: 1.10.0 + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + lru-cache@11.5.2: {} + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + magicast@0.5.4: + dependencies: + '@babel/parser': 7.29.8 + '@babel/types': 7.29.8 + source-map-js: 1.2.1 + + make-dir@4.0.0: + dependencies: + semver: 7.8.5 + + marked-terminal@7.3.0(marked@9.1.6): + dependencies: + ansi-escapes: 7.3.0 + ansi-regex: 6.3.0 + chalk: 5.6.2 + cli-highlight: 2.1.11 + cli-table3: 0.6.5 + marked: 9.1.6 + node-emoji: 2.2.0 + supports-hyperlinks: 3.2.0 + + marked@9.1.6: {} + + mrmime@2.0.1: {} + + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + + nanoid@3.3.18: {} + + node-emoji@2.2.0: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 + + object-assign@4.1.1: {} + + obug@2.1.4: {} + + oxc-parser@0.143.0: + dependencies: + '@oxc-project/types': 0.143.0 + optionalDependencies: + '@oxc-parser/binding-android-arm-eabi': 0.143.0 + '@oxc-parser/binding-android-arm64': 0.143.0 + '@oxc-parser/binding-darwin-arm64': 0.143.0 + '@oxc-parser/binding-darwin-x64': 0.143.0 + '@oxc-parser/binding-freebsd-x64': 0.143.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.143.0 + '@oxc-parser/binding-linux-arm-musleabihf': 0.143.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.143.0 + '@oxc-parser/binding-linux-arm64-musl': 0.143.0 + '@oxc-parser/binding-linux-ppc64-gnu': 0.143.0 + '@oxc-parser/binding-linux-riscv64-gnu': 0.143.0 + '@oxc-parser/binding-linux-riscv64-musl': 0.143.0 + '@oxc-parser/binding-linux-s390x-gnu': 0.143.0 + '@oxc-parser/binding-linux-x64-gnu': 0.143.0 + '@oxc-parser/binding-linux-x64-musl': 0.143.0 + '@oxc-parser/binding-openharmony-arm64': 0.143.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.143.0 + '@oxc-parser/binding-win32-ia32-msvc': 0.143.0 + '@oxc-parser/binding-win32-x64-msvc': 0.143.0 + + oxc-resolver@11.24.2: + optionalDependencies: + '@oxc-resolver/binding-android-arm-eabi': 11.24.2 + '@oxc-resolver/binding-android-arm64': 11.24.2 + '@oxc-resolver/binding-darwin-arm64': 11.24.2 + '@oxc-resolver/binding-darwin-x64': 11.24.2 + '@oxc-resolver/binding-freebsd-x64': 11.24.2 + '@oxc-resolver/binding-linux-arm-gnueabihf': 11.24.2 + '@oxc-resolver/binding-linux-arm-musleabihf': 11.24.2 + '@oxc-resolver/binding-linux-arm64-gnu': 11.24.2 + '@oxc-resolver/binding-linux-arm64-musl': 11.24.2 + '@oxc-resolver/binding-linux-ppc64-gnu': 11.24.2 + '@oxc-resolver/binding-linux-riscv64-gnu': 11.24.2 + '@oxc-resolver/binding-linux-riscv64-musl': 11.24.2 + '@oxc-resolver/binding-linux-s390x-gnu': 11.24.2 + '@oxc-resolver/binding-linux-x64-gnu': 11.24.2 + '@oxc-resolver/binding-linux-x64-musl': 11.24.2 + '@oxc-resolver/binding-openharmony-arm64': 11.24.2 + '@oxc-resolver/binding-wasm32-wasi': 11.24.2 + '@oxc-resolver/binding-win32-arm64-msvc': 11.24.2 + '@oxc-resolver/binding-win32-x64-msvc': 11.24.2 + + oxfmt@0.61.0: + dependencies: + tinypool: 2.1.0 + optionalDependencies: + '@oxfmt/binding-android-arm-eabi': 0.61.0 + '@oxfmt/binding-android-arm64': 0.61.0 + '@oxfmt/binding-darwin-arm64': 0.61.0 + '@oxfmt/binding-darwin-x64': 0.61.0 + '@oxfmt/binding-freebsd-x64': 0.61.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.61.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.61.0 + '@oxfmt/binding-linux-arm64-gnu': 0.61.0 + '@oxfmt/binding-linux-arm64-musl': 0.61.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.61.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.61.0 + '@oxfmt/binding-linux-riscv64-musl': 0.61.0 + '@oxfmt/binding-linux-s390x-gnu': 0.61.0 + '@oxfmt/binding-linux-x64-gnu': 0.61.0 + '@oxfmt/binding-linux-x64-musl': 0.61.0 + '@oxfmt/binding-openharmony-arm64': 0.61.0 + '@oxfmt/binding-win32-arm64-msvc': 0.61.0 + '@oxfmt/binding-win32-ia32-msvc': 0.61.0 + '@oxfmt/binding-win32-x64-msvc': 0.61.0 + + oxlint@1.79.0: + optionalDependencies: + '@oxlint/binding-android-arm-eabi': 1.79.0 + '@oxlint/binding-android-arm64': 1.79.0 + '@oxlint/binding-darwin-arm64': 1.79.0 + '@oxlint/binding-darwin-x64': 1.79.0 + '@oxlint/binding-freebsd-x64': 1.79.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.79.0 + '@oxlint/binding-linux-arm-musleabihf': 1.79.0 + '@oxlint/binding-linux-arm64-gnu': 1.79.0 + '@oxlint/binding-linux-arm64-musl': 1.79.0 + '@oxlint/binding-linux-ppc64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-musl': 1.79.0 + '@oxlint/binding-linux-s390x-gnu': 1.79.0 + '@oxlint/binding-linux-x64-gnu': 1.79.0 + '@oxlint/binding-linux-x64-musl': 1.79.0 + '@oxlint/binding-openharmony-arm64': 1.79.0 + '@oxlint/binding-win32-arm64-msvc': 1.79.0 + '@oxlint/binding-win32-ia32-msvc': 1.79.0 + '@oxlint/binding-win32-x64-msvc': 1.79.0 + + package-manager-detector@1.8.0: {} + + parse5-htmlparser2-tree-adapter@6.0.1: + dependencies: + parse5: 6.0.1 + + parse5@5.1.1: {} + + parse5@6.0.1: {} + + pathe@2.0.3: {} + + picocolors@1.1.1: {} + + picomatch@4.0.5: {} + + postcss@8.5.26: + dependencies: + nanoid: 3.3.18 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + quansync@1.0.0: {} + + require-directory@2.1.1: {} + + resolve-pkg-maps@1.0.0: {} + + rolldown-plugin-dts@0.27.14(oxc-resolver@11.24.2)(rolldown@1.2.5)(typescript@7.0.2): + dependencies: + dts-resolver: 3.0.0(oxc-resolver@11.24.2) + get-tsconfig: 5.0.0-beta.5 + obug: 2.1.4 + rolldown: 1.2.5 + yuku-ast: 0.8.7 + yuku-codegen: 0.8.7 + yuku-parser: 0.8.7 + optionalDependencies: + typescript: 7.0.2 + transitivePeerDependencies: + - oxc-resolver + + rolldown@1.2.5: + dependencies: + '@oxc-project/types': 0.146.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.2.5 + '@rolldown/binding-android-arm64': 1.2.5 + '@rolldown/binding-darwin-arm64': 1.2.5 + '@rolldown/binding-darwin-x64': 1.2.5 + '@rolldown/binding-freebsd-x64': 1.2.5 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.5 + '@rolldown/binding-linux-arm64-gnu': 1.2.5 + '@rolldown/binding-linux-arm64-musl': 1.2.5 + '@rolldown/binding-linux-ppc64-gnu': 1.2.5 + '@rolldown/binding-linux-s390x-gnu': 1.2.5 + '@rolldown/binding-linux-x64-gnu': 1.2.5 + '@rolldown/binding-linux-x64-musl': 1.2.5 + '@rolldown/binding-openharmony-arm64': 1.2.5 + '@rolldown/binding-win32-arm64-msvc': 1.2.5 + '@rolldown/binding-win32-x64-msvc': 1.2.5 + + semver@7.8.5: {} + + shell-quote@1.10.0: {} + + siginfo@2.0.0: {} + + sirv@3.0.2: + dependencies: + '@polka/url': 1.0.0-next.29 + mrmime: 2.0.1 + totalist: 3.0.1 + + sisteransi@1.0.5: {} + + skin-tone@2.0.0: + dependencies: + unicode-emoji-modifier-base: 1.0.0 + + smol-toml@1.8.0: {} + + source-map-js@1.2.1: {} + + stackback@0.0.2: {} + + std-env@4.2.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-json-comments@5.0.3: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-hyperlinks@3.2.0: + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + + tinybench@2.9.0: {} + + tinyexec@1.3.0: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.5) + picomatch: 4.0.5 + + tinypool@2.1.0: {} + + tinyrainbow@3.1.1: {} + + totalist@3.0.1: {} + + tree-kill@1.2.2: {} + + tsdown@0.22.14(@arethetypeswrong/core@0.18.5)(oxc-resolver@11.24.2)(typescript@7.0.2): + dependencies: + ansis: 4.3.1 + cac: 7.0.0 + defu: 6.1.7 + empathic: 2.0.1 + hookable: 6.1.1 + import-without-cache: 0.4.0 + obug: 2.1.4 + picomatch: 4.0.5 + rolldown: 1.2.5 + rolldown-plugin-dts: 0.27.14(oxc-resolver@11.24.2)(rolldown@1.2.5)(typescript@7.0.2) + tinyexec: 1.3.0 + tinyglobby: 0.2.17 + tree-kill: 1.2.2 + unconfig-core: 7.5.0 + verkit: 0.3.2 + optionalDependencies: + '@arethetypeswrong/core': 0.18.5 + typescript: 7.0.2 + transitivePeerDependencies: + - '@typescript/native-preview' + - '@volar/typescript' + - oxc-resolver + - vue-tsc + + tslib@2.8.1: + optional: true + + turbo@2.10.11: + optionalDependencies: + '@turbo/darwin-64': 2.10.11 + '@turbo/darwin-arm64': 2.10.11 + '@turbo/linux-64': 2.10.11 + '@turbo/linux-arm64': 2.10.11 + '@turbo/windows-64': 2.10.11 + '@turbo/windows-arm64': 2.10.11 + + typescript@5.6.1-rc: {} + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + unbash@4.0.10: {} + + unconfig-core@7.5.0: + dependencies: + '@quansync/fs': 1.0.0 + quansync: 1.0.0 + + unicode-emoji-modifier-base@1.0.0: {} + + validate-npm-package-name@5.0.1: {} + + verkit@0.3.2: {} + + vite@8.2.2(jiti@2.7.0)(yaml@2.9.0): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.5 + postcss: 8.5.26 + rolldown: 1.2.5 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + jiti: 2.7.0 + yaml: 2.9.0 + + vitest@4.1.11(@vitest/coverage-v8@4.1.11)(@vitest/ui@4.1.11)(vite@8.2.2(jiti@2.7.0)(yaml@2.9.0)): + dependencies: + '@vitest/expect': 4.1.11 + '@vitest/mocker': 4.1.11(vite@8.2.2(jiti@2.7.0)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.11 + '@vitest/runner': 4.1.11 + '@vitest/snapshot': 4.1.11 + '@vitest/spy': 4.1.11 + '@vitest/utils': 4.1.11 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.1.4 + pathe: 2.0.3 + picomatch: 4.0.5 + std-env: 4.2.0 + tinybench: 2.9.0 + tinyexec: 1.3.0 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.1 + vite: 8.2.2(jiti@2.7.0)(yaml@2.9.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@vitest/coverage-v8': 4.1.11(vitest@4.1.11) + '@vitest/ui': 4.1.11(vitest@4.1.11) + transitivePeerDependencies: + - msw + + walk-up-path@4.0.0: {} + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + y18n@5.0.8: {} + + yaml@2.9.0: {} + + yargs-parser@20.2.9: {} + + yargs@16.2.2: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + + yuku-ast@0.8.7: + dependencies: + '@yuku-toolchain/types': 0.8.7 + + yuku-codegen@0.8.7: + dependencies: + '@yuku-toolchain/types': 0.8.7 + optionalDependencies: + '@yuku-codegen/binding-android-arm64': 0.8.7 + '@yuku-codegen/binding-darwin-arm64': 0.8.7 + '@yuku-codegen/binding-darwin-x64': 0.8.7 + '@yuku-codegen/binding-freebsd-x64': 0.8.7 + '@yuku-codegen/binding-linux-arm-gnu': 0.8.7 + '@yuku-codegen/binding-linux-arm-musl': 0.8.7 + '@yuku-codegen/binding-linux-arm64-gnu': 0.8.7 + '@yuku-codegen/binding-linux-arm64-musl': 0.8.7 + '@yuku-codegen/binding-linux-x64-gnu': 0.8.7 + '@yuku-codegen/binding-linux-x64-musl': 0.8.7 + '@yuku-codegen/binding-win32-arm64': 0.8.7 + '@yuku-codegen/binding-win32-x64': 0.8.7 + + yuku-parser@0.8.7: + dependencies: + '@yuku-toolchain/types': 0.8.7 + yuku-ast: 0.8.7 + optionalDependencies: + '@yuku-parser/binding-android-arm64': 0.8.7 + '@yuku-parser/binding-darwin-arm64': 0.8.7 + '@yuku-parser/binding-darwin-x64': 0.8.7 + '@yuku-parser/binding-freebsd-x64': 0.8.7 + '@yuku-parser/binding-linux-arm-gnu': 0.8.7 + '@yuku-parser/binding-linux-arm-musl': 0.8.7 + '@yuku-parser/binding-linux-arm64-gnu': 0.8.7 + '@yuku-parser/binding-linux-arm64-musl': 0.8.7 + '@yuku-parser/binding-linux-x64-gnu': 0.8.7 + '@yuku-parser/binding-linux-x64-musl': 0.8.7 + '@yuku-parser/binding-win32-arm64': 0.8.7 + '@yuku-parser/binding-win32-x64': 0.8.7 + + zod@4.4.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..9b772b4 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,4 @@ +packages: + - apps/* + - packages/* + - playground/* From 8ed25297cecd46b1f6861a8cffb2ff2638688d5c Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Sun, 23 Aug 2026 18:25:08 +0300 Subject: [PATCH 2/8] chore: migrate formatting and linting to oxc --- .changeset/config.json | 28 +- .github/ISSUE_TEMPLATE/feature_request.md | 5 +- .markdownlint.json | 10 +- biome.json | 21 - oxlint.config.ts | 7 +- package.json | 99 ++-- packages/core/CHANGELOG.md | 44 +- packages/core/package.json | 74 +-- packages/core/src/index.ts | 4 +- packages/core/tests/packages.spec.ts | 23 +- packages/core/tsconfig.json | 16 +- packages/core/tsup.config.ts | 18 +- packages/types/CHANGELOG.md | 128 ++-- packages/types/__tests__/abs.spec.ts | 47 +- packages/types/__tests__/array-of-n.spec.ts | 127 ++-- packages/types/__tests__/at-least-one.spec.ts | 125 ++-- packages/types/__tests__/box.spec.ts | 25 +- packages/types/__tests__/deep-dict.spec.ts | 53 +- packages/types/__tests__/empty-object.spec.ts | 36 +- packages/types/__tests__/equals.spec.ts | 69 +-- packages/types/__tests__/exactly-one.spec.ts | 125 ++-- packages/types/__tests__/extend.spec.ts | 73 +-- packages/types/__tests__/extends.spec.ts | 37 +- .../types/__tests__/extract-literal.spec.ts | 209 +++---- .../types/__tests__/extract-values.spec.ts | 545 +++++++++--------- packages/types/__tests__/fn.spec.ts | 97 ++-- .../types/__tests__/has-duplicates.spec.ts | 37 +- packages/types/__tests__/if.spec.ts | 51 +- packages/types/__tests__/increment.spec.ts | 51 +- .../types/__tests__/inverse-extract.spec.ts | 67 +-- .../types/__tests__/is-disjoint-union.spec.ts | 47 +- .../__tests__/is-positive-or-zero.spec.ts | 77 +-- packages/types/__tests__/is-tuple.spec.ts | 31 +- packages/types/__tests__/join.spec.ts | 111 ++-- packages/types/__tests__/key-path.spec.ts | 115 ++-- packages/types/__tests__/keyof-union.spec.ts | 1 + .../types/__tests__/last-of-union.spec.ts | 1 + .../types/__tests__/less-than-equal.spec.ts | 139 ++--- packages/types/__tests__/less-than.spec.ts | 139 ++--- packages/types/__tests__/mapped-enum.spec.ts | 57 +- packages/types/__tests__/mask-dates.spec.ts | 101 ++-- .../types/__tests__/mask-literals.spec.ts | 269 ++++----- .../types/__tests__/non-empty-array.spec.ts | 47 +- packages/types/__tests__/non-optional.spec.ts | 35 +- packages/types/__tests__/omit-by.spec.ts | 121 ++-- .../types/__tests__/omit-functions.spec.ts | 110 ++-- packages/types/__tests__/partial-deep.spec.ts | 31 +- packages/types/__tests__/patch-union.spec.ts | 1 + packages/types/__tests__/pick-by.spec.ts | 119 ++-- .../types/__tests__/pick-optional.spec.ts | 73 +-- packages/types/__tests__/prettify.spec.ts | 291 +++++----- packages/types/__tests__/replace.spec.ts | 51 +- packages/types/__tests__/result.spec.ts | 81 +-- packages/types/__tests__/reverse.spec.ts | 27 +- packages/types/__tests__/safe-record.spec.ts | 37 +- packages/types/__tests__/strict-omit.spec.ts | 29 +- packages/types/__tests__/suggest-str.spec.ts | 27 +- packages/types/__tests__/suggest.spec.ts | 49 +- packages/types/__tests__/to-str.spec.ts | 87 +-- .../types/__tests__/union-to-tuple.spec.ts | 1 + packages/types/__tests__/value-of.spec.ts | 67 +-- packages/types/__tests__/whatever.spec.ts | 37 +- packages/types/oxlint.config.ts | 6 +- packages/types/package.json | 68 +-- packages/types/src/abs.ts | 4 +- packages/types/src/array-of-n.ts | 25 +- packages/types/src/at-least-one.ts | 8 +- packages/types/src/deep-dict.ts | 2 +- packages/types/src/empty-object.ts | 2 +- packages/types/src/equals.ts | 8 +- packages/types/src/exactly-one.ts | 12 +- packages/types/src/extend.ts | 2 +- packages/types/src/extends.ts | 2 +- packages/types/src/extract-literal.ts | 4 +- packages/types/src/extract-values.ts | 25 +- packages/types/src/falsy.ts | 2 +- packages/types/src/fn.ts | 4 +- packages/types/src/has-duplicates.ts | 15 +- packages/types/src/if.ts | 8 +- packages/types/src/increment.ts | 11 +- packages/types/src/is-disjoint-union.ts | 6 +- packages/types/src/is-positive-or-zero.ts | 6 +- packages/types/src/is-tuple.ts | 4 +- packages/types/src/join.ts | 27 +- packages/types/src/key-path.ts | 22 +- packages/types/src/last-of-union.ts | 5 +- packages/types/src/less-than-equal.ts | 12 +- packages/types/src/less-than.ts | 28 +- packages/types/src/mask-dates.ts | 2 +- packages/types/src/mask-literals.ts | 9 +- packages/types/src/non-optional.ts | 2 +- packages/types/src/omit-by.ts | 2 +- packages/types/src/omit-functions.ts | 4 +- packages/types/src/partial-deep.ts | 12 +- packages/types/src/patch-union.ts | 15 +- packages/types/src/pick-by.ts | 2 +- packages/types/src/pick-optional.ts | 2 +- packages/types/src/prettify.ts | 8 +- packages/types/src/primitive.ts | 9 +- packages/types/src/replace.ts | 16 +- packages/types/src/reverse.ts | 10 +- packages/types/src/stringifiable.ts | 10 +- packages/types/src/suggest-str.ts | 4 - packages/types/src/to-str.ts | 10 +- packages/types/src/union-to-intersection.ts | 10 +- packages/types/src/whatever.ts | 4 +- packages/types/tsconfig.json | 16 +- packages/utils/CHANGELOG.md | 36 +- packages/utils/__tests__/arr/includes.spec.ts | 37 +- packages/utils/__tests__/assert-never.spec.ts | 27 +- packages/utils/__tests__/bool.spec.ts | 165 +++--- .../utils/__tests__/enum/to-tuple.spec.ts | 1 + .../utils/__tests__/infinite-object.spec.ts | 57 +- packages/utils/__tests__/is-defined.spec.ts | 215 +++---- packages/utils/__tests__/json/parse.spec.ts | 18 +- .../utils/__tests__/json/safe-parse.spec.ts | 14 +- .../utils/__tests__/json/stringify.spec.ts | 14 +- packages/utils/__tests__/noop.spec.ts | 61 +- .../utils/__tests__/obj/entries-of.spec.ts | 18 +- packages/utils/__tests__/obj/keys-of.spec.ts | 8 +- .../utils/__tests__/str/ends-with.spec.ts | 4 +- .../utils/__tests__/str/starts-with.spec.ts | 4 +- packages/utils/__tests__/toggle.spec.ts | 182 +++--- packages/utils/oxlint.config.ts | 6 +- packages/utils/package.json | 68 +-- packages/utils/src/assert-never.ts | 5 +- packages/utils/src/bool.ts | 2 +- packages/utils/src/infinite-object.ts | 34 +- packages/utils/src/is-defined.ts | 2 +- packages/utils/src/json/index.ts | 6 +- packages/utils/src/json/parse.ts | 1 + packages/utils/src/json/safe-parse.ts | 1 + packages/utils/src/json/stringify.ts | 7 +- packages/utils/src/json/types/helpers.ts | 24 +- packages/utils/src/noop.ts | 2 +- packages/utils/src/obj/index.ts | 5 +- packages/utils/src/str/index.ts | 5 +- packages/utils/src/toggle.ts | 40 +- packages/utils/tsconfig.json | 16 +- packages/utils/tsup.config.ts | 18 +- pnpm-workspace.yaml | 6 +- turbo.json | 61 +- 142 files changed, 3120 insertions(+), 3175 deletions(-) delete mode 100644 biome.json diff --git a/.changeset/config.json b/.changeset/config.json index 91d1786..10b885d 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,15 +1,15 @@ { - "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", - "changelog": "@changesets/cli/changelog", - "commit": false, - "fixed": [], - "linked": [], - "access": "public", - "baseBranch": "main", - "updateInternalDependencies": "patch", - "ignore": [], - "privatePackages": { - "tag": false, - "version": false - } -} \ No newline at end of file + "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [], + "privatePackages": { + "tag": false, + "version": false + } +} diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 89cd8eb..15fcf3d 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' -labels: '' +title: "" +labels: "" assignees: YLfjuk - --- **Is your feature request related to a specific package? Please specify.** diff --git a/.markdownlint.json b/.markdownlint.json index f080e0f..c64f53a 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,6 +1,6 @@ { - "extends": "@ylfjuk/md", - "MD013": { - "line_length": 120 - } -} \ No newline at end of file + "extends": "@ylfjuk/md", + "MD013": { + "line_length": 120 + } +} diff --git a/biome.json b/biome.json deleted file mode 100644 index f5466d3..0000000 --- a/biome.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/2.0.5/schema.json", - "extends": [ - "@ylfjuk/biome" - ], - "overrides": [ - { - "includes": [ - "packages/types/**", - "packages/utils/**" - ], - "linter": { - "rules": { - "suspicious": { - "noExplicitAny": "off" - } - } - } - } - ] -} \ No newline at end of file diff --git a/oxlint.config.ts b/oxlint.config.ts index 21338a7..d338863 100644 --- a/oxlint.config.ts +++ b/oxlint.config.ts @@ -1,3 +1,8 @@ import { createOxlintConfig } from "@ylfjuk/oxc/oxlint"; -export default createOxlintConfig({ jsdoc: true }); +const config = createOxlintConfig({ jsdoc: true }); + +export default { + ...config, + rules: { ...config.rules, "jsdoc/check-tag-names": "off" }, +}; diff --git a/package.json b/package.json index 95d3842..8499a5b 100644 --- a/package.json +++ b/package.json @@ -1,50 +1,53 @@ { - "name": "root", - "version": "0.0.0", - "private": true, - "author": "YLfjuk", - "type": "module", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/YLfjuk/core.git" - }, - "scripts": { - "build": "turbo run build", - "dev": "turbo run dev", - "test": "turbo test", - "test:types": "turbo run test:types", - "test:v": "vitest --typecheck", - "coverage": "vitest run --coverage", - "lint": "turbo run lint", - "knip": "knip", - "plan": "changeset", - "preversion": "pnpm run build", - "version": "changeset version", - "prerelease": "pnpm run build", - "release": "changeset publish" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.18.2", - "@changesets/cli": "^3.0.1", - "@vitest/coverage-v8": "^4.1.11", - "@vitest/ui": "^4.1.11", - "@ylfjuk/oxc": "^0.0.1", - "@ylfjuk/tsconfigs": "^0.1.0", - "@ylfjuk/md": "^0.0.3", - "knip": "^6.31.0", - "oxfmt": "^0.61.0", - "oxlint": "^1.77.0", - "tsdown": "^0.22.14", - "turbo": "^2.10.10", - "typescript": "^7.0.2", - "vitest": "^4.1.11" - }, - "knip": { - "ignoreExportsUsedInFile": true - }, - "engines": { - "node": ">=22.18.0" - }, - "packageManager": "pnpm@11.22.0" + "name": "root", + "version": "0.0.0", + "private": true, + "license": "MIT", + "author": "YLfjuk", + "repository": { + "type": "git", + "url": "git+https://github.com/YLfjuk/core.git" + }, + "type": "module", + "scripts": { + "build": "turbo run build", + "dev": "turbo run dev", + "test": "turbo test", + "test:types": "turbo run test:types", + "test:v": "vitest --typecheck", + "coverage": "vitest run --coverage", + "fmt": "oxfmt .", + "fmt:check": "oxfmt --check .", + "lint": "oxlint .", + "lint:fix": "oxlint --fix .", + "knip": "knip", + "plan": "changeset", + "preversion": "pnpm run build", + "version": "changeset version", + "prerelease": "pnpm run build", + "release": "changeset publish" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.18.2", + "@changesets/cli": "^3.0.1", + "@vitest/coverage-v8": "^4.1.11", + "@vitest/ui": "^4.1.11", + "@ylfjuk/md": "^0.0.3", + "@ylfjuk/oxc": "^0.0.1", + "@ylfjuk/tsconfigs": "^0.1.0", + "knip": "^6.31.0", + "oxfmt": "^0.61.0", + "oxlint": "^1.77.0", + "tsdown": "^0.22.14", + "turbo": "^2.10.10", + "typescript": "^7.0.2", + "vitest": "^4.1.11" + }, + "engines": { + "node": ">=22.18.0" + }, + "packageManager": "pnpm@11.22.0", + "knip": { + "ignoreExportsUsedInFile": true + } } diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index b4b1352..5e30f62 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -5,8 +5,8 @@ ### Patch Changes - Updated dependencies - - @ylfjuk-core/types@0.0.18 - - @ylfjuk-core/utils@0.0.10 + - @ylfjuk-core/types@0.0.18 + - @ylfjuk-core/utils@0.0.10 ## 0.0.18 @@ -14,8 +14,8 @@ - Updated dependencies [dabc973] - Updated dependencies [7544b97] - - @ylfjuk-core/types@0.0.17 - - @ylfjuk-core/utils@0.0.9 + - @ylfjuk-core/types@0.0.17 + - @ylfjuk-core/utils@0.0.9 ## 0.0.17 @@ -27,15 +27,15 @@ - Updated dependencies - Updated dependencies - - @ylfjuk-core/utils@0.0.8 - - @ylfjuk-core/types@0.0.16 + - @ylfjuk-core/utils@0.0.8 + - @ylfjuk-core/types@0.0.16 ## 0.0.16 ### Patch Changes - Updated dependencies - - @ylfjuk-core/types@0.0.15 + - @ylfjuk-core/types@0.0.15 ## 0.0.15 @@ -43,15 +43,15 @@ - Updated dependencies [18201d3] - Updated dependencies [b89cb4c] - - @ylfjuk-core/utils@0.0.7 - - @ylfjuk-core/types@0.0.14 + - @ylfjuk-core/utils@0.0.7 + - @ylfjuk-core/types@0.0.14 ## 0.0.14 ### Patch Changes - Updated dependencies - - @ylfjuk-core/types@0.0.13 + - @ylfjuk-core/types@0.0.13 ## 0.0.13 @@ -60,43 +60,43 @@ - Updated dependencies [4af919a] - Updated dependencies [78da6dd] - Updated dependencies [457d7e7] - - @ylfjuk-core/types@0.0.12 + - @ylfjuk-core/types@0.0.12 ## 0.0.12 ### Patch Changes - Updated dependencies - - @ylfjuk-core/utils@0.0.6 + - @ylfjuk-core/utils@0.0.6 ## 0.0.11 ### Patch Changes - Updated dependencies - - @ylfjuk-core/types@0.0.11 + - @ylfjuk-core/types@0.0.11 ## 0.0.10 ### Patch Changes - Updated dependencies - - @ylfjuk-core/types@0.0.10 + - @ylfjuk-core/types@0.0.10 ## 0.0.9 ### Patch Changes - Updated dependencies - - @ylfjuk-core/types@0.0.9 - - @ylfjuk-core/utils@0.0.5 + - @ylfjuk-core/types@0.0.9 + - @ylfjuk-core/utils@0.0.5 ## 0.0.8 ### Patch Changes - Updated dependencies - - @ylfjuk-core/types@0.0.8 + - @ylfjuk-core/types@0.0.8 ## 0.0.7 @@ -110,22 +110,22 @@ - utils: removed prod check - Updated dependencies - - @ylfjuk-core/utils@0.0.4 + - @ylfjuk-core/utils@0.0.4 ## 0.0.5 ### Patch Changes - Updated dependencies - - @ylfjuk-core/utils@0.0.3 + - @ylfjuk-core/utils@0.0.3 ## 0.0.4 ### Patch Changes - Updated dependencies - - @ylfjuk-core/utils@0.0.2 - - @ylfjuk-core/types@0.0.7 + - @ylfjuk-core/utils@0.0.2 + - @ylfjuk-core/types@0.0.7 ## 0.0.3 @@ -133,7 +133,7 @@ - Bundled - Updated dependencies - - @ylfjuk-core/utils@0.0.1 + - @ylfjuk-core/utils@0.0.1 ## 0.0.2 diff --git a/packages/core/package.json b/packages/core/package.json index 599c05a..0e745ef 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,39 +1,39 @@ { - "name": "@ylfjuk/core", - "version": "0.0.19", - "description": "The core packages", - "author": "YLfjuk", - "type": "module", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/YLfjuk/core.git", - "directory": "packages/core" - }, - "keywords": [ - "ylfjuk", - "core" - ], - "files": [ - "dist" - ], - "types": "dist/index.d.ts", - "exports": { - ".": { - "@ylfjuk-core/dev.src": "./src/index.ts", - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - } - }, - "sideEffects": false, - "scripts": { - "build": "tsdown", - "dev": "tsdown --watch", - "test": "vitest run --typecheck", - "test:types": "tsc --noEmit" - }, - "dependencies": { - "@ylfjuk-core/types": "workspace:*", - "@ylfjuk-core/utils": "workspace:*" - } + "name": "@ylfjuk/core", + "version": "0.0.19", + "description": "The core packages", + "keywords": [ + "core", + "ylfjuk" + ], + "license": "MIT", + "author": "YLfjuk", + "repository": { + "type": "git", + "url": "git+https://github.com/YLfjuk/core.git", + "directory": "packages/core" + }, + "files": [ + "dist" + ], + "type": "module", + "sideEffects": false, + "types": "dist/index.d.ts", + "exports": { + ".": { + "@ylfjuk-core/dev.src": "./src/index.ts", + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } + }, + "scripts": { + "build": "tsdown", + "dev": "tsdown --watch", + "test": "vitest run --typecheck", + "test:types": "tsc --noEmit" + }, + "dependencies": { + "@ylfjuk-core/types": "workspace:*", + "@ylfjuk-core/utils": "workspace:*" + } } diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 4be8bf7..e821238 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,2 +1,2 @@ -export type * from '@ylfjuk-core/types'; -export * from '@ylfjuk-core/utils'; +export type * from "@ylfjuk-core/types"; +export * from "@ylfjuk-core/utils"; diff --git a/packages/core/tests/packages.spec.ts b/packages/core/tests/packages.spec.ts index d9b2ead..dffae1c 100644 --- a/packages/core/tests/packages.spec.ts +++ b/packages/core/tests/packages.spec.ts @@ -1,15 +1,16 @@ -import { describe, expect, expectTypeOf, test } from 'vitest'; -import type { FN } from '../src'; +import { describe, expect, expectTypeOf, test } from "vitest"; -describe('testing packages', () => { - test('testing @ylfjuk-core/types', async () => { - expectTypeOf().toEqualTypeOf(); - }); +import type { FN } from "../src"; - test('testing @ylfjuk-core/utils', async () => { - const { isDefined, noop } = await import('../src'); +describe("testing packages", () => { + test("testing @ylfjuk-core/types", async () => { + expectTypeOf().toEqualTypeOf(); + }); - expect(isDefined).toBeDefined(); - expect(noop).toBeDefined(); - }); + test("testing @ylfjuk-core/utils", async () => { + const { isDefined, noop } = await import("../src"); + + expect(isDefined).toBeDefined(); + expect(noop).toBeDefined(); + }); }); diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 752d370..10e4c5e 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "@ylfjuk/tsconfigs/lib", - "compilerOptions": { - "target": "ES2018", - "module": "ESNext", - "moduleResolution": "bundler", - "isolatedDeclarations": false - }, - "include": ["src"] + "extends": "@ylfjuk/tsconfigs/lib", + "compilerOptions": { + "target": "ES2018", + "module": "ESNext", + "moduleResolution": "bundler", + "isolatedDeclarations": false + }, + "include": ["src"] } diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts index fa0cd8a..39b7bb7 100644 --- a/packages/core/tsup.config.ts +++ b/packages/core/tsup.config.ts @@ -1,12 +1,12 @@ -import { defineConfig } from 'tsup'; +import { defineConfig } from "tsup"; export default defineConfig((options) => ({ - minify: !options.watch, - entry: ['src/index.ts'], - target: 'es2020', - sourcemap: true, - dts: true, - shims: true, - injectStyle: true, - format: ['esm', 'cjs'], + minify: !options.watch, + entry: ["src/index.ts"], + target: "es2020", + sourcemap: true, + dts: true, + shims: true, + injectStyle: true, + format: ["esm", "cjs"], })); diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 39d6393..f73c65b 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -7,8 +7,8 @@ #### Features 🆕 - Added - - LastOfUnion | Extracts the last type from a union type - - UnionToTuple | Converts a `union` into an ordered `tuple` + - LastOfUnion | Extracts the last type from a union type + - UnionToTuple | Converts a `union` into an ordered `tuple` ## 0.0.17 @@ -17,13 +17,13 @@ #### Features 🆕 - Added - - Success | A Result type that represents a successful operation - - Failure | A Result type that represents a failed operation - - KeyofUnion | Extracts the keys of a union type - - PatchUnion | Creates a type that represents a union of objects, where each object has all keys from the union + - Success | A Result type that represents a successful operation + - Failure | A Result type that represents a failed operation + - KeyofUnion | Extracts the keys of a union type + - PatchUnion | Creates a type that represents a union of objects, where each object has all keys from the union - Modified - - Result | Using the `Success` and `Failure` types + - Result | Using the `Success` and `Failure` types ## 0.0.16 @@ -32,7 +32,7 @@ #### Features 🆕 - Added - - Falsy | A type that represents all representable falsy values in TypeScript + - Falsy | A type that represents all representable falsy values in TypeScript #### Chores 🧹 @@ -53,33 +53,33 @@ #### Features 🆕 - Added - - Extends | A wrapper around the `extends` keyword', with option for strictness - - HasDuplicates | Checks if an array has duplicate elements - - If | A wrapper around conditional types - - Join | Joins together `Stringifiable` elements - - KeyPath | Extracts all possible key paths from a given object - - MaskDates | Masks the `Date` type as a `string` - - NonOptional | Makes all keys required - - OmitBy | Omits keys by condition - - OmitFunctions | Omits the set of properties that are functions - - PartialDeep | Recursively makes all properties in `T` optional. - - PickOptional | Picks optional properties from a given type `T` - - Replace | Recursively replaces occurrences of type `R` in `T` with `N`. - - Reverse | Reverses an array - - Stringifiable | `Primitive`s that can be stringified, or an object with the `toString` method - - SuggestStr | Similar to the `Suggest` type, but allows any any string - - ToStr | Stringifies values that can be turned into strings - - UnknownArray | An array of unknown values - - Whatever | Similar to the `Suggest` type, but allows any value + - Extends | A wrapper around the `extends` keyword', with option for strictness + - HasDuplicates | Checks if an array has duplicate elements + - If | A wrapper around conditional types + - Join | Joins together `Stringifiable` elements + - KeyPath | Extracts all possible key paths from a given object + - MaskDates | Masks the `Date` type as a `string` + - NonOptional | Makes all keys required + - OmitBy | Omits keys by condition + - OmitFunctions | Omits the set of properties that are functions + - PartialDeep | Recursively makes all properties in `T` optional. + - PickOptional | Picks optional properties from a given type `T` + - Replace | Recursively replaces occurrences of type `R` in `T` with `N`. + - Reverse | Reverses an array + - Stringifiable | `Primitive`s that can be stringified, or an object with the `toString` method + - SuggestStr | Similar to the `Suggest` type, but allows any any string + - ToStr | Stringifies values that can be turned into strings + - UnknownArray | An array of unknown values + - Whatever | Similar to the `Suggest` type, but allows any value - Modified - - Equals | Renamed from `Equal` - - ExtractValues | Flattened the nesting - - FN | Added better support for args array, and the `this` arg (breaking 💥) - - MaskLiterals | Only accepts a `Primitive` type (breaking 💥) - - Prettify | Prettifies the entire `object`, and avoids expanding the `Date` type - - Suggest | Now a generic suggestion - - SuggestStr | Split from `Suggest` + - Equals | Renamed from `Equal` + - ExtractValues | Flattened the nesting + - FN | Added better support for args array, and the `this` arg (breaking 💥) + - MaskLiterals | Only accepts a `Primitive` type (breaking 💥) + - Prettify | Prettifies the entire `object`, and avoids expanding the `Date` type + - Suggest | Now a generic suggestion + - SuggestStr | Split from `Suggest` #### Chores 🧹 @@ -93,14 +93,14 @@ - Added Types - - SafeRecord | A record that emulates the `noUncheckedIndexedAccess` tsconfig setting - - Result - - ResultData | Extracts the data from a `Result` type - - ResultError | Extracts the error from a `Result` type + - SafeRecord | A record that emulates the `noUncheckedIndexedAccess` tsconfig setting + - Result + - ResultData | Extracts the data from a `Result` type + - ResultError | Extracts the error from a `Result` type - Modified Types - - ValueOf | Add support for arrays - - Extend + - ValueOf | Add support for arrays + - Extend #### Chores 🧹 @@ -113,12 +113,12 @@ #### Features 🆕 - Added Types - - Box | Boxes union types - - Equal | Returns if two types are strictly equal - - LessThanEqual | Returns if a number is less than or equal to another number | ⚠️ Floats Unsupported + - Box | Boxes union types + - Equal | Returns if two types are strictly equal + - LessThanEqual | Returns if a number is less than or equal to another number | ⚠️ Floats Unsupported - Modified Types - - ArrayOfN | Fill now accepts any type + - ArrayOfN | Fill now accepts any type ## 0.0.11 @@ -127,7 +127,7 @@ #### Features 🆕 - Added Types - - `Increment` | Increments a N ∈ ℕ number by 1 | ⚠️ Negative/Floats Unsupported + - `Increment` | Increments a N ∈ ℕ number by 1 | ⚠️ Negative/Floats Unsupported #### Fixes 🩹 @@ -145,18 +145,18 @@ - Added Types - - Abs | Returns the absolute value of a number - - ArrayOfN | Returns an array of n length - - AtLeastOne | Requires at least one of the fields in an object - - ExactlyOne | Requires exactly one of the fields in an object - - IsNatural | Returns if the number is an element of the Natural numbers group - - IsTuple | Return if an array is a tuple - - LessThan | Returns if a number is less than another number | ⚠️ Floats Unsupported - - PickBy | Picks the fields of an object where the value matches the condition + - Abs | Returns the absolute value of a number + - ArrayOfN | Returns an array of n length + - AtLeastOne | Requires at least one of the fields in an object + - ExactlyOne | Requires exactly one of the fields in an object + - IsNatural | Returns if the number is an element of the Natural numbers group + - IsTuple | Return if an array is a tuple + - LessThan | Returns if a number is less than another number | ⚠️ Floats Unsupported + - PickBy | Picks the fields of an object where the value matches the condition - Modified Types - - Primitive | Added support for `symbol` type - - MaskLiterals | Trailing changes from the `Primitive` type modification + - Primitive | Added support for `symbol` type + - MaskLiterals | Trailing changes from the `Primitive` type modification ## 0.0.9 @@ -169,12 +169,12 @@ #### Features 🆕 - Added Types - - DeepDict - - EmptyObject - - InverseExtract - - MaskLiterals - - NonEmptyArray - - Primitive + - DeepDict + - EmptyObject + - InverseExtract + - MaskLiterals + - NonEmptyArray + - Primitive #### Fixes 🩹 @@ -227,7 +227,7 @@ ### Patch Changes - Utility types - - ValueOf - - Prettify - - Extend - - AutoCompleteStr + - ValueOf + - Prettify + - Extend + - AutoCompleteStr diff --git a/packages/types/__tests__/abs.spec.ts b/packages/types/__tests__/abs.spec.ts index 563d752..dba2856 100644 --- a/packages/types/__tests__/abs.spec.ts +++ b/packages/types/__tests__/abs.spec.ts @@ -1,32 +1,33 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { Abs } from '../src/abs'; +import { describe, expectTypeOf, test } from "vitest"; -describe('returns the absolute value of a number', () => { - test('positive number', () => { - type Actual = Abs<1>; - type Expected = 1; +import type { Abs } from "../src/abs"; - expectTypeOf().toEqualTypeOf(); - }); +describe("returns the absolute value of a number", () => { + test("positive number", () => { + type Actual = Abs<1>; + type Expected = 1; - test('negative number', () => { - type Actual = Abs<-1>; - type Expected = 1; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("negative number", () => { + type Actual = Abs<-1>; + type Expected = 1; - test('zero', () => { - type Actual = Abs<0>; - type Expected = 0; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("zero", () => { + type Actual = Abs<0>; + type Expected = 0; - test('"negative" zero', () => { - type Actual = Abs<-0>; - type Expected = 0; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test('"negative" zero', () => { + type Actual = Abs<-0>; + type Expected = 0; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/array-of-n.spec.ts b/packages/types/__tests__/array-of-n.spec.ts index 3cecb21..f3407e3 100644 --- a/packages/types/__tests__/array-of-n.spec.ts +++ b/packages/types/__tests__/array-of-n.spec.ts @@ -1,87 +1,88 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { ArrayOfN } from '../src/array-of-n'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Array of n', () => { - test('array of positive length', () => { - type Actual = ArrayOfN<1>; - type Expected = [0]; +import type { ArrayOfN } from "../src/array-of-n"; - expectTypeOf().toEqualTypeOf(); - }); +describe("Array of n", () => { + test("array of positive length", () => { + type Actual = ArrayOfN<1>; + type Expected = [0]; - test('array of 0 length', () => { - type Actual = ArrayOfN<0>; - type Expected = []; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("array of 0 length", () => { + type Actual = ArrayOfN<0>; + type Expected = []; - test('array of "negative" length', () => { - type Actual = ArrayOfN<-1>; - type Expected = never; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test('array of "negative" length', () => { + type Actual = ArrayOfN<-1>; + type Expected = never; - test('Amount < Limit', () => { - type Actual = ArrayOfN<2, 3>; - type Expected = [0, 0]; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("Amount < Limit", () => { + type Actual = ArrayOfN<2, 3>; + type Expected = [0, 0]; - test('Amount = Limit', () => { - type Actual = ArrayOfN<3, 3>; - type Expected = never; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("Amount = Limit", () => { + type Actual = ArrayOfN<3, 3>; + type Expected = never; - test('Amount > Limit', () => { - type Actual = ArrayOfN<4, 3>; - type Expected = never; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("Amount > Limit", () => { + type Actual = ArrayOfN<4, 3>; + type Expected = never; - test('Limit = -1 is the same as no Limit', () => { - type Actual = ArrayOfN<2, -1>; - type Same = ArrayOfN<2>; - type Expected = [0, 0]; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + test("Limit = -1 is the same as no Limit", () => { + type Actual = ArrayOfN<2, -1>; + type Same = ArrayOfN<2>; + type Expected = [0, 0]; - test('Acc has initial value is the same as without', () => { - type Actual = ArrayOfN<4, -1, [0, 0]>; - type Same = ArrayOfN<4>; + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); - type Expected = [0, 0, 0, 0]; + test("Acc has initial value is the same as without", () => { + type Actual = ArrayOfN<4, -1, [0, 0]>; + type Same = ArrayOfN<4>; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type Expected = [0, 0, 0, 0]; - test('Fill != 0', () => { - type Actual = ArrayOfN<4, -1, [], 2>; - type Expected = [2, 2, 2, 2]; + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("Fill != 0", () => { + type Actual = ArrayOfN<4, -1, [], 2>; + type Expected = [2, 2, 2, 2]; - test('Acc can not contain values other than Fill value', () => { - // @ts-expect-error: testing - type Actual = ArrayOfN<4, -1, [1], 2>; - type Expected = [2, 2, 2, 2]; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().not.toEqualTypeOf(); - }); + test("Acc can not contain values other than Fill value", () => { + // @ts-expect-error: testing + type Actual = ArrayOfN<4, -1, [1], 2>; + type Expected = [2, 2, 2, 2]; - test('Can be filled with any type', () => { - type Actual = ArrayOfN<4, -1, [], true>; - type Expected = [true, true, true, true]; + expectTypeOf().not.toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("Can be filled with any type", () => { + type Actual = ArrayOfN<4, -1, [], true>; + type Expected = [true, true, true, true]; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/at-least-one.spec.ts b/packages/types/__tests__/at-least-one.spec.ts index 681e064..233f7fa 100644 --- a/packages/types/__tests__/at-least-one.spec.ts +++ b/packages/types/__tests__/at-least-one.spec.ts @@ -1,63 +1,64 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { AtLeastOne } from '../src/at-least-one'; - -describe('requires to pass at least one of the values', () => { - it('should allow objects with at least one of the fields', () => { - type Obj = { - bob: string; - bert: number; - berta: { - check: boolean; - }; - }; - - type Actual = AtLeastOne; - - const exactlyBob = { bob: '13' }; - const exactlyBert = { bert: 13 }; - const exactlyBerta = { - berta: { - check: true, - }, - }; - - const bobAndBert = { - bob: '13', - bert: 13, - }; - - const bobAndBerta = { - bob: '13', - berta: { - check: true, - }, - }; - - const bertAndBerta = { - bert: 13, - berta: { - check: true, - }, - }; - - const all = { - bob: '13', - bert: 13, - berta: { - check: true, - }, - }; - - const nothing = {}; - - expectTypeOf(exactlyBob).toExtend(); - expectTypeOf(exactlyBert).toExtend(); - expectTypeOf(exactlyBerta).toExtend(); - expectTypeOf(bobAndBert).toExtend(); - expectTypeOf(bobAndBerta).toExtend(); - expectTypeOf(bertAndBerta).toExtend(); - expectTypeOf(all).toExtend(); - - expectTypeOf(nothing).not.toExtend(); - }); +import { describe, expectTypeOf, it } from "vitest"; + +import type { AtLeastOne } from "../src/at-least-one"; + +describe("requires to pass at least one of the values", () => { + it("should allow objects with at least one of the fields", () => { + type Obj = { + bob: string; + bert: number; + berta: { + check: boolean; + }; + }; + + type Actual = AtLeastOne; + + const exactlyBob = { bob: "13" }; + const exactlyBert = { bert: 13 }; + const exactlyBerta = { + berta: { + check: true, + }, + }; + + const bobAndBert = { + bob: "13", + bert: 13, + }; + + const bobAndBerta = { + bob: "13", + berta: { + check: true, + }, + }; + + const bertAndBerta = { + bert: 13, + berta: { + check: true, + }, + }; + + const all = { + bob: "13", + bert: 13, + berta: { + check: true, + }, + }; + + const nothing = {}; + + expectTypeOf(exactlyBob).toExtend(); + expectTypeOf(exactlyBert).toExtend(); + expectTypeOf(exactlyBerta).toExtend(); + expectTypeOf(bobAndBert).toExtend(); + expectTypeOf(bobAndBerta).toExtend(); + expectTypeOf(bertAndBerta).toExtend(); + expectTypeOf(all).toExtend(); + + expectTypeOf(nothing).not.toExtend(); + }); }); diff --git a/packages/types/__tests__/box.spec.ts b/packages/types/__tests__/box.spec.ts index b3242c3..a33bd3d 100644 --- a/packages/types/__tests__/box.spec.ts +++ b/packages/types/__tests__/box.spec.ts @@ -1,17 +1,18 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { InverseExtract } from '../src/inverse-extract'; -import type { Box } from '../src/box'; +import { describe, expectTypeOf, it } from "vitest"; -describe('A type to Box union types', () => { - it('should match full unions instead of testing each element separately', () => { - type UnionIsTestedSeparately = InverseExtract; +import type { Box } from "../src/box"; +import type { InverseExtract } from "../src/inverse-extract"; - type Actual = InverseExtract, Box>; +describe("A type to Box union types", () => { + it("should match full unions instead of testing each element separately", () => { + type UnionIsTestedSeparately = InverseExtract; - type Expected = never; + type Actual = InverseExtract, Box>; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().not.toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type Expected = never; + + expectTypeOf().toEqualTypeOf(); + expectTypeOf().not.toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/deep-dict.spec.ts b/packages/types/__tests__/deep-dict.spec.ts index 1bd55f0..504de3b 100644 --- a/packages/types/__tests__/deep-dict.spec.ts +++ b/packages/types/__tests__/deep-dict.spec.ts @@ -1,35 +1,36 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { DeepDict } from '../src/deep-dict'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Deep Dictionary', () => { - it('should allow nested dicts', () => { - const dict = { - bob: 1, - }; +import type { DeepDict } from "../src/deep-dict"; - const nestedDict = { - bob: 1, - bert: { - berta: 2, - }, - }; +describe("Deep Dictionary", () => { + it("should allow nested dicts", () => { + const dict = { + bob: 1, + }; - type Expected = DeepDict; + const nestedDict = { + bob: 1, + bert: { + berta: 2, + }, + }; - expectTypeOf(dict).toExtend(); - expectTypeOf(nestedDict).toExtend(); - }); + type Expected = DeepDict; - it('should work with never', () => { - const dict = {}; + expectTypeOf(dict).toExtend(); + expectTypeOf(nestedDict).toExtend(); + }); - const nestedDict = { - bob: {}, - }; + it("should work with never", () => { + const dict = {}; - type Expected = DeepDict; + const nestedDict = { + bob: {}, + }; - expectTypeOf(dict).toExtend(); - expectTypeOf(nestedDict).toExtend(); - }); + type Expected = DeepDict; + + expectTypeOf(dict).toExtend(); + expectTypeOf(nestedDict).toExtend(); + }); }); diff --git a/packages/types/__tests__/empty-object.spec.ts b/packages/types/__tests__/empty-object.spec.ts index 72d21b2..9e77858 100644 --- a/packages/types/__tests__/empty-object.spec.ts +++ b/packages/types/__tests__/empty-object.spec.ts @@ -1,25 +1,25 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { EmptyObject } from '../src/empty-object'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Empty Object', () => { - it('should match an empty object', () => { - type Actual = EmptyObject; - const actual = {}; +import type { EmptyObject } from "../src/empty-object"; - // biome-ignore lint/complexity/noBannedTypes: testing types - type Expected = {}; +describe("Empty Object", () => { + it("should match an empty object", () => { + type Actual = EmptyObject; + const actual = {}; - expectTypeOf(actual).toExtend(); - expectTypeOf().toExtend(); - }); + type Expected = {}; - it('should not work non-empty objects', () => { - const nestedDict = { - bob: '', - }; + expectTypeOf(actual).toExtend(); + expectTypeOf().toExtend(); + }); - type Expected = EmptyObject; + it("should not work non-empty objects", () => { + const nestedDict = { + bob: "", + }; - expectTypeOf(nestedDict).not.toExtend(); - }); + type Expected = EmptyObject; + + expectTypeOf(nestedDict).not.toExtend(); + }); }); diff --git a/packages/types/__tests__/equals.spec.ts b/packages/types/__tests__/equals.spec.ts index 31b1a46..174999b 100644 --- a/packages/types/__tests__/equals.spec.ts +++ b/packages/types/__tests__/equals.spec.ts @@ -1,50 +1,51 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { Equals } from '../src/equals'; +import { describe, expectTypeOf, test } from "vitest"; -describe('A type that checks if two other types are strictly equal', () => { - test('diff types', () => { - type Actual = Equals; - type InvertedActual = Equals; +import type { Equals } from "../src/equals"; - type Expected = false; +describe("A type that checks if two other types are strictly equal", () => { + test("diff types", () => { + type Actual = Equals; + type InvertedActual = Equals; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type Expected = false; - test('same types', () => { - type Actual = Equals; + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); - type Expected = true; + test("same types", () => { + type Actual = Equals; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = true; - test('same literals', () => { - type Actual = Equals<2, 2>; + expectTypeOf().toEqualTypeOf(); + }); - type Expected = true; + test("same literals", () => { + type Actual = Equals<2, 2>; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = true; - test('literals and mask', () => { - type Actual = Equals<2, number>; - type InvertedActual = Equals; + expectTypeOf().toEqualTypeOf(); + }); - type Expected = false; + test("literals and mask", () => { + type Actual = Equals<2, number>; + type InvertedActual = Equals; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type Expected = false; - test('type and union with it', () => { - type Actual = Equals; - type InvertedActual = Equals; + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); - type Expected = false; + test("type and union with it", () => { + type Actual = Equals; + type InvertedActual = Equals; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type Expected = false; + + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/exactly-one.spec.ts b/packages/types/__tests__/exactly-one.spec.ts index 133848d..4e04005 100644 --- a/packages/types/__tests__/exactly-one.spec.ts +++ b/packages/types/__tests__/exactly-one.spec.ts @@ -1,63 +1,64 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { ExactlyOne } from '../src/exactly-one'; - -describe('requires to pass exactly one of the values', () => { - it('should allow objects with exactly one of the fields', () => { - type Obj = { - bob: string; - bert: number; - berta: { - check: boolean; - }; - }; - - type Actual = ExactlyOne; - - const exactlyBob = { bob: '13' }; - const exactlyBert = { bert: 13 }; - const exactlyBerta = { - berta: { - check: true, - }, - }; - - const bobAndBert = { - bob: '13', - bert: 13, - }; - - const bobAndBerta = { - bob: '13', - berta: { - check: true, - }, - }; - - const bertAndBerta = { - bert: 13, - berta: { - check: true, - }, - }; - - const all = { - bob: '13', - bert: 13, - berta: { - check: true, - }, - }; - - const nothing = {}; - - expectTypeOf(exactlyBob).toExtend(); - expectTypeOf(exactlyBert).toExtend(); - expectTypeOf(exactlyBerta).toExtend(); - - expectTypeOf(bobAndBert).not.toExtend(); - expectTypeOf(bobAndBerta).not.toExtend(); - expectTypeOf(bertAndBerta).not.toExtend(); - expectTypeOf(all).not.toExtend(); - expectTypeOf(nothing).not.toExtend(); - }); +import { describe, expectTypeOf, it } from "vitest"; + +import type { ExactlyOne } from "../src/exactly-one"; + +describe("requires to pass exactly one of the values", () => { + it("should allow objects with exactly one of the fields", () => { + type Obj = { + bob: string; + bert: number; + berta: { + check: boolean; + }; + }; + + type Actual = ExactlyOne; + + const exactlyBob = { bob: "13" }; + const exactlyBert = { bert: 13 }; + const exactlyBerta = { + berta: { + check: true, + }, + }; + + const bobAndBert = { + bob: "13", + bert: 13, + }; + + const bobAndBerta = { + bob: "13", + berta: { + check: true, + }, + }; + + const bertAndBerta = { + bert: 13, + berta: { + check: true, + }, + }; + + const all = { + bob: "13", + bert: 13, + berta: { + check: true, + }, + }; + + const nothing = {}; + + expectTypeOf(exactlyBob).toExtend(); + expectTypeOf(exactlyBert).toExtend(); + expectTypeOf(exactlyBerta).toExtend(); + + expectTypeOf(bobAndBert).not.toExtend(); + expectTypeOf(bobAndBerta).not.toExtend(); + expectTypeOf(bertAndBerta).not.toExtend(); + expectTypeOf(all).not.toExtend(); + expectTypeOf(nothing).not.toExtend(); + }); }); diff --git a/packages/types/__tests__/extend.spec.ts b/packages/types/__tests__/extend.spec.ts index bd52e59..de19a30 100644 --- a/packages/types/__tests__/extend.spec.ts +++ b/packages/types/__tests__/extend.spec.ts @@ -1,37 +1,38 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { Extend } from '../src/extend'; -import type { EmptyObject } from '../src/empty-object'; - -describe('Extend another type', () => { - test('extend existing fields and ignore non-existing fields', () => { - type Bob = { - Bob: string; - Berta: 4; - }; - - type Bert = { - Bob: number; - Bert: string; - }; - - type Expected = { - Bob: string | number; - Berta: 4; - }; - - type Actual = Extend; - - expectTypeOf().toEqualTypeOf(); - }); - - test('extend with nothing does nothing', () => { - type Expected = { - Bob: string; - Berta: 4; - }; - - type Actual = Extend; - - expectTypeOf().toEqualTypeOf(); - }); +import { describe, expectTypeOf, test } from "vitest"; + +import type { EmptyObject } from "../src/empty-object"; +import type { Extend } from "../src/extend"; + +describe("Extend another type", () => { + test("extend existing fields and ignore non-existing fields", () => { + type Bob = { + Bob: string; + Berta: 4; + }; + + type Bert = { + Bob: number; + Bert: string; + }; + + type Expected = { + Bob: string | number; + Berta: 4; + }; + + type Actual = Extend; + + expectTypeOf().toEqualTypeOf(); + }); + + test("extend with nothing does nothing", () => { + type Expected = { + Bob: string; + Berta: 4; + }; + + type Actual = Extend; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/extends.spec.ts b/packages/types/__tests__/extends.spec.ts index d7b4d49..429a262 100644 --- a/packages/types/__tests__/extends.spec.ts +++ b/packages/types/__tests__/extends.spec.ts @@ -1,25 +1,26 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { Extends } from '../src/extends'; +import { describe, expectTypeOf, test } from "vitest"; -describe('A stricter wrapper around the `extends` keyword', () => { - test('extends', () => { - type Actual = Extends<'bob', string>; - type Expected = true; +import type { Extends } from "../src/extends"; - expectTypeOf().toEqualTypeOf(); - }); +describe("A stricter wrapper around the `extends` keyword", () => { + test("extends", () => { + type Actual = Extends<"bob", string>; + type Expected = true; - test('not extends', () => { - type Actual = Extends; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("not extends", () => { + type Actual = Extends; + type Expected = false; - test('not strict extends', () => { - type Actual = Extends<'bob' | 3, string>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("not strict extends", () => { + type Actual = Extends<"bob" | 3, string>; + type Expected = false; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/extract-literal.spec.ts b/packages/types/__tests__/extract-literal.spec.ts index f18ed6b..48dab39 100644 --- a/packages/types/__tests__/extract-literal.spec.ts +++ b/packages/types/__tests__/extract-literal.spec.ts @@ -1,145 +1,146 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { ExtractLiteral } from '../src/extract-literal'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Extract the type from a template literal type', () => { - test('string', () => { - type Expected = string; - type Actual = ExtractLiteral; +import type { ExtractLiteral } from "../src/extract-literal"; - expectTypeOf().toEqualTypeOf(); - }); +describe("Extract the type from a template literal type", () => { + test("string", () => { + type Expected = string; + type Actual = ExtractLiteral; - test('const string', () => { - type Expected = 'bob'; - type Actual = ExtractLiteral<'bob'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const string", () => { + type Expected = "bob"; + type Actual = ExtractLiteral<"bob">; - test('number', () => { - type Expected = number; - type Actual = ExtractLiteral<`${number}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("number", () => { + type Expected = number; + type Actual = ExtractLiteral<`${number}`>; - test('const number', () => { - type Expected = 12345; - type Actual = ExtractLiteral<'12345'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const number", () => { + type Expected = 12345; + type Actual = ExtractLiteral<"12345">; - test('negative const number', () => { - type Expected = -12345; - type Actual = ExtractLiteral<'-12345'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("negative const number", () => { + type Expected = -12345; + type Actual = ExtractLiteral<"-12345">; - test('float const number', () => { - type Expected = 1.06; - type Actual = ExtractLiteral<'1.06'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("float const number", () => { + type Expected = 1.06; + type Actual = ExtractLiteral<"1.06">; - test('negative float const number', () => { - type Expected = -1.6; - type Actual = ExtractLiteral<'-1.6'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("negative float const number", () => { + type Expected = -1.6; + type Actual = ExtractLiteral<"-1.6">; - test.fails.todo('"negative" zero', () => { - type Expected = 0; - type Actual = ExtractLiteral<'-0'>; + expectTypeOf().toEqualTypeOf(); + }); - // @ts-expect-error: this test fails - expectTypeOf().toEqualTypeOf(); - }); + test.fails.todo('"negative" zero', () => { + type Expected = 0; + type Actual = ExtractLiteral<"-0">; - test('str number', () => { - type Expected = 'number'; - type Actual = ExtractLiteral<'number'>; + // @ts-expect-error: this test fails + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("str number", () => { + type Expected = "number"; + type Actual = ExtractLiteral<"number">; - test('NaN', () => { - type Expected = number; - type Actual = ExtractLiteral<`${typeof NaN}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("NaN", () => { + type Expected = number; + type Actual = ExtractLiteral<`${typeof NaN}`>; - test('bigint', () => { - type Expected = bigint; - type Actual = ExtractLiteral<`${bigint}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("bigint", () => { + type Expected = bigint; + type Actual = ExtractLiteral<`${bigint}`>; - test('const bigint', () => { - type Expected = 12345678910111213n; - type Actual = ExtractLiteral<`${12345678910111213n}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const bigint", () => { + type Expected = 12345678910111213n; + type Actual = ExtractLiteral<`${12345678910111213n}`>; - test('const "bigint"', () => { - type Expected = 12345; - type Actual = ExtractLiteral<`${12345n}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test('const "bigint"', () => { + type Expected = 12345; + type Actual = ExtractLiteral<`${12345n}`>; - test('boolean', () => { - type Expected = boolean; - type Actual = ExtractLiteral<`${boolean}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("boolean", () => { + type Expected = boolean; + type Actual = ExtractLiteral<`${boolean}`>; - test('const boolean', () => { - type Expected = true; - type Actual = ExtractLiteral<`${true}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const boolean", () => { + type Expected = true; + type Actual = ExtractLiteral<`${true}`>; - test('null', () => { - type Expected = null; - type Actual = ExtractLiteral<`${null}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("null", () => { + type Expected = null; + type Actual = ExtractLiteral<`${null}`>; - test('str null', () => { - type Expected = null; - type Actual = ExtractLiteral<'null'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("str null", () => { + type Expected = null; + type Actual = ExtractLiteral<"null">; - test('undefined', () => { - type Expected = undefined; - type Actual = ExtractLiteral<`${undefined}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("undefined", () => { + type Expected = undefined; + type Actual = ExtractLiteral<`${undefined}`>; - test('literals union', () => { - type Expected = boolean | number; - type Actual = ExtractLiteral<`${boolean | number}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("literals union", () => { + type Expected = boolean | number; + type Actual = ExtractLiteral<`${boolean | number}`>; - test('const literals union', () => { - type Expected = true | 1234; - type Actual = ExtractLiteral<`${true | 1234}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const literals union", () => { + type Expected = true | 1234; + type Actual = ExtractLiteral<`${true | 1234}`>; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/extract-values.spec.ts b/packages/types/__tests__/extract-values.spec.ts index b8279ad..66f5389 100644 --- a/packages/types/__tests__/extract-values.spec.ts +++ b/packages/types/__tests__/extract-values.spec.ts @@ -1,275 +1,276 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { ExtractValues } from '../src/extract-values'; -import type { ValueOf } from '../src/value-of'; - -describe('Extract the values from a nested object', () => { - test('1-layer-deep object', () => { - const obj = { - Bob: 'bob', - Bert: 'bert', - }; - - type Expected = string; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('same as ValueOf for 1-layer-deep object', () => { - const obj = { - Bob: 'bob', - Bert: 'bert', - }; - - type Expected = ValueOf; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('1-layer-deep const object', () => { - const obj = { - Bob: 'bob', - Bert: 'bert', - } as const; - - type Expected = 'bob' | 'bert'; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('same as ValueOf for 1-layer-deep const object', () => { - const obj = { - Bob: 'bob', - Bert: 'bert', - } as const; +import { describe, expectTypeOf, test } from "vitest"; + +import type { ExtractValues } from "../src/extract-values"; +import type { ValueOf } from "../src/value-of"; + +describe("Extract the values from a nested object", () => { + test("1-layer-deep object", () => { + const obj = { + Bob: "bob", + Bert: "bert", + }; + + type Expected = string; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("same as ValueOf for 1-layer-deep object", () => { + const obj = { + Bob: "bob", + Bert: "bert", + }; + + type Expected = ValueOf; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("1-layer-deep const object", () => { + const obj = { + Bob: "bob", + Bert: "bert", + } as const; + + type Expected = "bob" | "bert"; + type Actual = ExtractValues; - type Expected = ValueOf; - type Actual = ExtractValues; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); - - test('1-layer-deep const object with Date value', () => { - const obj = { - Bob: 'bob', - now: new Date(), - } as const; - - type Expected = 'bob' | Date; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('nested object', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - age: -0, - }, - }; - - type Expected = string | number; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('nested const object', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - age: 0, - }, - } as const; - - type Expected = 'bob' | 'bert' | 0; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('nested const object with Date', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - age: 0, - birthday: new Date(), - }, - } as const; - - type Expected = 'bob' | 'bert' | 0 | Date; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - describe('fn return type', () => { - test('fn, extract = false', () => { - const fn = () => 'bob'; - - type Expected = never; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('fn, extract = true', () => { - const fn = () => 'bob'; - - type Expected = string; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('fn w/ const return type, extract = false', () => { - const fn = () => 'bob'; - - type Expected = never; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('fn w/ const return type, extract = true', () => { - const fn = () => 'bob'; - - type Expected = string; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('object w/ fn, extract = false', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - }, - Other: { - index: 'other', - tmp: () => 0, - user(username: string) { - return `${this.index}/${username}`; - }, - }, - }; - - type Expected = string; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('object w/ fn, extract = true', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - }, - Other: { - index: 'other', - tmp: () => 0, - user(username: string) { - return `${this.index}/${username}`; - }, - }, - }; - - type Expected = string | number; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('const object w/ fn, extract = false', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - }, - Other: { - index: 'other', - tmp: () => 0, - user(username: string) { - return `${this.index}/${username}`; - }, - }, - } as const; - - type Expected = 'bob' | 'bert' | 'other'; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('const object w/ fn, extract = true', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - }, - Other: { - index: 'other', - tmp: () => 0, - user(username: string) { - return `${this.index}/${username}`; - }, - }, - } as const; - - type Expected = string | number; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('const object w/ const fn, extract = false', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - }, - Other: { - index: 'other', - tmp: () => 0 as const, - user(username: string) { - return `other/${username}` as const; - }, - }, - } as const; - - type Expected = 'bert' | 'other' | 'bob'; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - - test('const object w/ const fn, extract = true', () => { - const obj = { - Bob: 'bob', - Bert: { - name: 'bert', - }, - Other: { - index: 'other', - tmp: () => 0 as const, - user(username: string) { - return `other/${username}` as const; - }, - }, - } as const; - - type Expected = 0 | 'bert' | 'other' | 'bob' | `other/${string}`; - type Actual = ExtractValues; - - expectTypeOf().toEqualTypeOf(); - }); - }); + test("same as ValueOf for 1-layer-deep const object", () => { + const obj = { + Bob: "bob", + Bert: "bert", + } as const; + + type Expected = ValueOf; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("1-layer-deep const object with Date value", () => { + const obj = { + Bob: "bob", + now: new Date(), + } as const; + + type Expected = "bob" | Date; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("nested object", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + age: -0, + }, + }; + + type Expected = string | number; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("nested const object", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + age: 0, + }, + } as const; + + type Expected = "bob" | "bert" | 0; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("nested const object with Date", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + age: 0, + birthday: new Date(), + }, + } as const; + + type Expected = "bob" | "bert" | 0 | Date; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + describe("fn return type", () => { + test("fn, extract = false", () => { + const fn = () => "bob"; + + type Expected = never; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("fn, extract = true", () => { + const fn = () => "bob"; + + type Expected = string; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("fn w/ const return type, extract = false", () => { + const fn = () => "bob"; + + type Expected = never; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("fn w/ const return type, extract = true", () => { + const fn = () => "bob"; + + type Expected = string; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("object w/ fn, extract = false", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + }, + Other: { + index: "other", + tmp: () => 0, + user(username: string) { + return `${this.index}/${username}`; + }, + }, + }; + + type Expected = string; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("object w/ fn, extract = true", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + }, + Other: { + index: "other", + tmp: () => 0, + user(username: string) { + return `${this.index}/${username}`; + }, + }, + }; + + type Expected = string | number; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("const object w/ fn, extract = false", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + }, + Other: { + index: "other", + tmp: () => 0, + user(username: string) { + return `${this.index}/${username}`; + }, + }, + } as const; + + type Expected = "bob" | "bert" | "other"; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("const object w/ fn, extract = true", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + }, + Other: { + index: "other", + tmp: () => 0, + user(username: string) { + return `${this.index}/${username}`; + }, + }, + } as const; + + type Expected = string | number; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("const object w/ const fn, extract = false", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + }, + Other: { + index: "other", + tmp: () => 0 as const, + user(username: string) { + return `other/${username}` as const; + }, + }, + } as const; + + type Expected = "bert" | "other" | "bob"; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + + test("const object w/ const fn, extract = true", () => { + const obj = { + Bob: "bob", + Bert: { + name: "bert", + }, + Other: { + index: "other", + tmp: () => 0 as const, + user(username: string) { + return `other/${username}` as const; + }, + }, + } as const; + + type Expected = 0 | "bert" | "other" | "bob" | `other/${string}`; + type Actual = ExtractValues; + + expectTypeOf().toEqualTypeOf(); + }); + }); }); diff --git a/packages/types/__tests__/fn.spec.ts b/packages/types/__tests__/fn.spec.ts index 6c3c586..7b1bf5c 100644 --- a/packages/types/__tests__/fn.spec.ts +++ b/packages/types/__tests__/fn.spec.ts @@ -1,73 +1,66 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { FN } from '../src/fn'; +import { describe, expectTypeOf, test } from "vitest"; -describe('FN', () => { - test('any function type', () => { - const fn = (...args: any[]) => { - return args?.[0]; - }; +import type { FN } from "../src/fn"; - type Expected = FN; +describe("FN", () => { + test("any function type", () => { + const fn = (...args: any[]) => { + return args?.[0]; + }; - type Actual = typeof fn; + type Expected = FN; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = typeof fn; - test('any any[] function type', () => { - const fn = (...args: any[]) => { - return args; - }; + expectTypeOf().toEqualTypeOf(); + }); - type Expected = FN; + test("any any[] function type", () => { + const fn = (...args: any[]) => { + return args; + }; - type Actual = typeof fn; + type Expected = FN; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = typeof fn; - test('string void function type', () => { - const fn = (...args: string[]) => console.log(args); + expectTypeOf().toEqualTypeOf(); + }); - type Expected = FN; + test("string void function type", () => { + const fn = (...args: string[]) => console.log(args); - type Actual = typeof fn; + type Expected = FN; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = typeof fn; - test('function with named arguments', () => { - const fn = (arg1: string, arg2: number, ...rest: boolean[]) => - console.log(arg1, arg2, ...rest); + expectTypeOf().toEqualTypeOf(); + }); - type Expected = FN< - void, - [arg1: string, arg2: number, ...rest: boolean[]] - >; + test("function with named arguments", () => { + const fn = (arg1: string, arg2: number, ...rest: boolean[]) => + console.log(arg1, arg2, ...rest); - type Actual = typeof fn; + type Expected = FN; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = typeof fn; - test('function with `this`', () => { - function fn( - this: { name: string }, - arg1: string, - arg2: number, - ...rest: boolean[] - ) { - console.log(this.name, arg1, arg2, ...rest); - } + expectTypeOf().toEqualTypeOf(); + }); - type Expected = FN< - void, - [arg1: string, arg2: number, ...rest: boolean[]], - { name: string } - >; + test("function with `this`", () => { + function fn(this: { name: string }, arg1: string, arg2: number, ...rest: boolean[]) { + console.log(this.name, arg1, arg2, ...rest); + } - type Actual = typeof fn; + type Expected = FN< + void, + [arg1: string, arg2: number, ...rest: boolean[]], + { name: string } + >; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = typeof fn; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/has-duplicates.spec.ts b/packages/types/__tests__/has-duplicates.spec.ts index f3ae22c..b8636db 100644 --- a/packages/types/__tests__/has-duplicates.spec.ts +++ b/packages/types/__tests__/has-duplicates.spec.ts @@ -1,25 +1,26 @@ -import { HasDuplicates } from '../src/has-duplicates'; -import { describe, expectTypeOf, it, test } from 'vitest'; +import { describe, expectTypeOf, it } from "vitest"; -describe('HasDuplicates', () => { - it('should return true when there are duplicate elements', () => { - type Actual = HasDuplicates<[1, 2, 3, 1]>; - type Expected = true; +import type { HasDuplicates } from "../src/has-duplicates"; - expectTypeOf().toEqualTypeOf(); - }); +describe("HasDuplicates", () => { + it("should return true when there are duplicate elements", () => { + type Actual = HasDuplicates<[1, 2, 3, 1]>; + type Expected = true; - it('should return false when there are no duplicate elements', () => { - type Actual = HasDuplicates<[1, 2, 3]>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should return false when there are no duplicate elements", () => { + type Actual = HasDuplicates<[1, 2, 3]>; + type Expected = false; - it('should return false when the array is empty', () => { - type Actual = HasDuplicates<[]>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should return false when the array is empty", () => { + type Actual = HasDuplicates<[]>; + type Expected = false; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/if.spec.ts b/packages/types/__tests__/if.spec.ts index a66ed1a..dc40ff1 100644 --- a/packages/types/__tests__/if.spec.ts +++ b/packages/types/__tests__/if.spec.ts @@ -1,34 +1,35 @@ -import { describe, expectTypeOf, suite, test } from 'vitest'; -import type { If } from '../src/if'; +import { describe, expectTypeOf, suite, test } from "vitest"; -describe('A wrapper around conditional types', () => { - suite('should work as a wrapper around `T extends U ? Then : Else`', () => { - test('truthy condition with else clause', () => { - type Actual = If; - type Expected = 'then'; +import type { If } from "../src/if"; - expectTypeOf().toEqualTypeOf(); - }); +describe("A wrapper around conditional types", () => { + suite("should work as a wrapper around `T extends U ? Then : Else`", () => { + test("truthy condition with else clause", () => { + type Actual = If; + type Expected = "then"; - test('truthy condition w/o else clause', () => { - type Actual = If; - type Expected = 'then'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("truthy condition w/o else clause", () => { + type Actual = If; + type Expected = "then"; - test('falsy condition with else clause', () => { - type Actual = If; - type Expected = 'else'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("falsy condition with else clause", () => { + type Actual = If; + type Expected = "else"; - test('falsy condition w/o else clause', () => { - type Actual = If; - type Expected = never; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); - }); + test("falsy condition w/o else clause", () => { + type Actual = If; + type Expected = never; + + expectTypeOf().toEqualTypeOf(); + }); + }); }); diff --git a/packages/types/__tests__/increment.spec.ts b/packages/types/__tests__/increment.spec.ts index d30b11e..ae963d5 100644 --- a/packages/types/__tests__/increment.spec.ts +++ b/packages/types/__tests__/increment.spec.ts @@ -1,35 +1,36 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { Increment } from '../src/increment'; +import { describe, expectTypeOf, test } from "vitest"; -describe('returns an increment of the provided value', () => { - test('positive int', () => { - type Actual = Increment<1>; - type Expected = 2; +import type { Increment } from "../src/increment"; - expectTypeOf().toEqualTypeOf(); - }); +describe("returns an increment of the provided value", () => { + test("positive int", () => { + type Actual = Increment<1>; + type Expected = 2; - test('0', () => { - type Actual = Increment<0>; - type Expected = 1; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("0", () => { + type Actual = Increment<0>; + type Expected = 1; - test('"negative" zero', () => { - type Actual = Increment<-0>; - type Expected = 1; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test('"negative" zero', () => { + type Actual = Increment<-0>; + type Expected = 1; - test('negative int', () => { - type Actual = Increment<-1>; - type Expected = 'Error: Unsupported numeric value'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("negative int", () => { + type Actual = Increment<-1>; + type Expected = "Error: Unsupported numeric value"; - test.todo('float'); - test.todo('negative float'); + expectTypeOf().toEqualTypeOf(); + }); + + test.todo("float"); + test.todo("negative float"); }); diff --git a/packages/types/__tests__/inverse-extract.spec.ts b/packages/types/__tests__/inverse-extract.spec.ts index 15d7aba..1384169 100644 --- a/packages/types/__tests__/inverse-extract.spec.ts +++ b/packages/types/__tests__/inverse-extract.spec.ts @@ -1,46 +1,47 @@ -import { describe, expectTypeOf, it, test } from 'vitest'; -import type { InverseExtract } from '../src/inverse-extract'; +import { describe, expectTypeOf, it, test } from "vitest"; -describe('Performs the inverse operation of the built-in `Extract` type', () => { - it('should perform the inverse of the `Extract` built-in type', () => { - type T = 1234; - type U = number; +import type { InverseExtract } from "../src/inverse-extract"; - type Extracted = Extract; - type Inverse = InverseExtract; +describe("Performs the inverse operation of the built-in `Extract` type", () => { + it("should perform the inverse of the `Extract` built-in type", () => { + type T = 1234; + type U = number; - type ExpectedExtract = 1234; - type ExpectedInverse = number; + type Extracted = Extract; + type Inverse = InverseExtract; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type ExpectedExtract = 1234; + type ExpectedInverse = number; - test('literals', () => { - type Actual = InverseExtract<1234, number>; - type Expected = number; + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("literals", () => { + type Actual = InverseExtract<1234, number>; + type Expected = number; - test('unions', () => { - type Actual = InverseExtract<1234 | string, number>; - type Expected = number; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("unions", () => { + type Actual = InverseExtract<1234 | string, number>; + type Expected = number; - test('unions to unions', () => { - type Actual = InverseExtract<1234 | 'non', number | string>; - type Expected = number | string; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("unions to unions", () => { + type Actual = InverseExtract<1234 | "non", number | string>; + type Expected = number | string; - it('should result in never if U does not extend T', () => { - type Actual = InverseExtract<1234, string>; - type Expected = never; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should result in never if U does not extend T", () => { + type Actual = InverseExtract<1234, string>; + type Expected = never; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/is-disjoint-union.spec.ts b/packages/types/__tests__/is-disjoint-union.spec.ts index 34532d0..55838af 100644 --- a/packages/types/__tests__/is-disjoint-union.spec.ts +++ b/packages/types/__tests__/is-disjoint-union.spec.ts @@ -1,36 +1,37 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { IsDisjointUnion } from '../src/is-disjoint-union'; +import { describe, expectTypeOf, test } from "vitest"; -describe('is disjoint union', () => { - test('a non-union', () => { - type Expected = false; +import type { IsDisjointUnion } from "../src/is-disjoint-union"; - type Actual = IsDisjointUnion; +describe("is disjoint union", () => { + test("a non-union", () => { + type Expected = false; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = IsDisjointUnion; - test('a disjoint union', () => { - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = IsDisjointUnion; + test("a disjoint union", () => { + type Expected = true; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = IsDisjointUnion; - test('a disjoint const union', () => { - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = IsDisjointUnion<'bob' | 'bert'>; + test("a disjoint const union", () => { + type Expected = true; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = IsDisjointUnion<"bob" | "bert">; - test('union with intersection', () => { - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = IsDisjointUnion; + test("union with intersection", () => { + type Expected = false; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = IsDisjointUnion; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/is-positive-or-zero.spec.ts b/packages/types/__tests__/is-positive-or-zero.spec.ts index b886db6..a9e117f 100644 --- a/packages/types/__tests__/is-positive-or-zero.spec.ts +++ b/packages/types/__tests__/is-positive-or-zero.spec.ts @@ -1,53 +1,54 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { IsPositiveOrZero } from '../src/is-positive-or-zero'; +import { describe, expectTypeOf, test } from "vitest"; -describe('returns if a number is an element of the natural numbers group', () => { - test('positive number', () => { - type Actual = IsPositiveOrZero<4>; - type Expected = true; +import type { IsPositiveOrZero } from "../src/is-positive-or-zero"; - expectTypeOf().toEqualTypeOf(); - }); +describe("returns if a number is an element of the natural numbers group", () => { + test("positive number", () => { + type Actual = IsPositiveOrZero<4>; + type Expected = true; - test('positive float', () => { - type Actual = IsPositiveOrZero<4.7>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("positive float", () => { + type Actual = IsPositiveOrZero<4.7>; + type Expected = true; - test('0', () => { - type Actual = IsPositiveOrZero<0>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("0", () => { + type Actual = IsPositiveOrZero<0>; + type Expected = true; - test('number', () => { - type Actual = IsPositiveOrZero; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("number", () => { + type Actual = IsPositiveOrZero; + type Expected = true; - test('negative number', () => { - type Actual = IsPositiveOrZero<-1>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("negative number", () => { + type Actual = IsPositiveOrZero<-1>; + type Expected = false; - test('negative float', () => { - type Actual = IsPositiveOrZero<-4.7>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("negative float", () => { + type Actual = IsPositiveOrZero<-4.7>; + type Expected = false; - test('"negative" zero', () => { - type Actual = IsPositiveOrZero<-0>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test('"negative" zero', () => { + type Actual = IsPositiveOrZero<-0>; + type Expected = true; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/is-tuple.spec.ts b/packages/types/__tests__/is-tuple.spec.ts index a4b8560..90ccaf3 100644 --- a/packages/types/__tests__/is-tuple.spec.ts +++ b/packages/types/__tests__/is-tuple.spec.ts @@ -1,22 +1,23 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { IsTuple } from '../src/is-tuple'; +import { describe, expectTypeOf, test } from "vitest"; -describe('returns if an array is a tuple', () => { - test('array', () => { - const arr = [1, 2, 3]; +import type { IsTuple } from "../src/is-tuple"; - type Actual = IsTuple; - type Expected = false; +describe("returns if an array is a tuple", () => { + test("array", () => { + const arr = [1, 2, 3]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = IsTuple; + type Expected = false; - test('const array', () => { - const arr = [1, 2, 3] as const; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = IsTuple; - type Expected = true; + test("const array", () => { + const arr = [1, 2, 3] as const; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = IsTuple; + type Expected = true; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/join.spec.ts b/packages/types/__tests__/join.spec.ts index 7e6fbb7..113edfa 100644 --- a/packages/types/__tests__/join.spec.ts +++ b/packages/types/__tests__/join.spec.ts @@ -1,80 +1,81 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { Join } from '../src/join'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Joins together things that can be stringified', () => { - test('strings', () => { - type Arr = ['bob_', 'bert_', 'berta']; +import type { Join } from "../src/join"; - type Actual = Join; - type Expected = 'bob_bert_berta'; +describe("Joins together things that can be stringified", () => { + test("strings", () => { + type Arr = ["bob_", "bert_", "berta"]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Expected = "bob_bert_berta"; - test('strings with custom separator', () => { - type Arr = ['bob', 'bert', 'berta']; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = Join; - type Expected = 'bob_bert_berta'; + test("strings with custom separator", () => { + type Arr = ["bob", "bert", "berta"]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Expected = "bob_bert_berta"; - test('numbers', () => { - type Arr = ['1', '2', '3']; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = Join; - type Expected = '1.2.3'; + test("numbers", () => { + type Arr = ["1", "2", "3"]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Expected = "1.2.3"; - test('booleans', () => { - type Arr = [true, false]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = Join; - type Expected = 'true/false'; + test("booleans", () => { + type Arr = [true, false]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Expected = "true/false"; - test('bigints', () => { - type Arr = [121421412n, 89734n]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = Join; - type Expected = '121421412+89734'; + test("bigints", () => { + type Arr = [121421412n, 89734n]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Expected = "121421412+89734"; - test('nullish', () => { - type Arr = [null, undefined]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = Join; - type Expected = 'null | undefined'; + test("nullish", () => { + type Arr = [null, undefined]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Expected = "null | undefined"; - test('mix', () => { - type Arr = [null, 13, 'bob', true, undefined]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = Join; - type Expected = 'null | 13 | bob | true | undefined'; + test("mix", () => { + type Arr = [null, 13, "bob", true, undefined]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Expected = "null | 13 | bob | true | undefined"; - test('stringifiable object', () => { - type Arr = [{ toString(): 'bob' }]; - type Arr2 = [{ toString(): 'bob' }, { toString: () => 'bert' }]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = Join; - type Actual2 = Join; - type Expected = 'bob'; - type Expected2 = 'bob | bert'; + test("stringifiable object", () => { + type Arr = [{ toString(): "bob" }]; + type Arr2 = [{ toString(): "bob" }, { toString: () => "bert" }]; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type Actual = Join; + type Actual2 = Join; + type Expected = "bob"; + type Expected2 = "bob | bert"; + + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/key-path.spec.ts b/packages/types/__tests__/key-path.spec.ts index a20ee3d..8df8582 100644 --- a/packages/types/__tests__/key-path.spec.ts +++ b/packages/types/__tests__/key-path.spec.ts @@ -1,72 +1,73 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import { KeyPath } from '../src/key-path'; -import type { Primitive } from '../src'; +import { describe, expectTypeOf, it } from "vitest"; -describe('KeyPath', () => { - it('should extract key paths from an object', () => { - type Obj = { - a: string; - b: number; - c: { - d: boolean; - e: string[]; - }; - arr: { - f: string; - }[]; - tuple: [first: number, second: { g: Date }]; - }; +import type { Primitive } from "../src"; +import type { KeyPath } from "../src/key-path"; - type Actual = KeyPath; - type Expected = - | 'a' - | 'b' - | 'c' - | 'c.d' - | 'c.e' - | `c.e.${number}` - | 'arr' - | `arr.${number}` - | `arr.${number}.f` - | 'tuple' - | 'tuple.0' - | 'tuple.1' - | 'tuple.1.g'; +describe("KeyPath", () => { + it("should extract key paths from an object", () => { + type Obj = { + a: string; + b: number; + c: { + d: boolean; + e: string[]; + }; + arr: { + f: string; + }[]; + tuple: [first: number, second: { g: Date }]; + }; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = KeyPath; + type Expected = + | "a" + | "b" + | "c" + | "c.d" + | "c.e" + | `c.e.${number}` + | "arr" + | `arr.${number}` + | `arr.${number}.f` + | "tuple" + | "tuple.0" + | "tuple.1" + | "tuple.1.g"; - it('should extract key paths from a primitive array', () => { - type Arr = Primitive[]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = KeyPath; - type Expected = `${number}`; + it("should extract key paths from a primitive array", () => { + type Arr = Primitive[]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = KeyPath; + type Expected = `${number}`; - it('should extract key paths from an array', () => { - type Arr = { a: number }[]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = KeyPath; - type Expected = `${number}` | `${number}.a`; + it("should extract key paths from an array", () => { + type Arr = { a: number }[]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = KeyPath; + type Expected = `${number}` | `${number}.a`; - it('should extract key paths from a tuple', () => { - type Tuple = [number, { a: string }]; + expectTypeOf().toEqualTypeOf(); + }); - type Actual = KeyPath; - type Expected = '0' | '1' | '1.a'; + it("should extract key paths from a tuple", () => { + type Tuple = [number, { a: string }]; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = KeyPath; + type Expected = "0" | "1" | "1.a"; - it('should not extract key paths from a `Date`', () => { - type Actual = KeyPath; - type Expected = never; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should not extract key paths from a `Date`", () => { + type Actual = KeyPath; + type Expected = never; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/keyof-union.spec.ts b/packages/types/__tests__/keyof-union.spec.ts index a6c584f..2ab4e72 100644 --- a/packages/types/__tests__/keyof-union.spec.ts +++ b/packages/types/__tests__/keyof-union.spec.ts @@ -1,4 +1,5 @@ import { describe, expectTypeOf, it } from "vitest"; + import type { KeyofUnion } from "../src/keyof-union"; describe("KeyofUnion", () => { diff --git a/packages/types/__tests__/last-of-union.spec.ts b/packages/types/__tests__/last-of-union.spec.ts index 43a617f..aa38517 100644 --- a/packages/types/__tests__/last-of-union.spec.ts +++ b/packages/types/__tests__/last-of-union.spec.ts @@ -1,4 +1,5 @@ import { describe, expectTypeOf, it } from "vitest"; + import type { LastOfUnion } from "../src/last-of-union"; describe("LastOfUnion", () => { diff --git a/packages/types/__tests__/less-than-equal.spec.ts b/packages/types/__tests__/less-than-equal.spec.ts index 3956bb4..a2b9115 100644 --- a/packages/types/__tests__/less-than-equal.spec.ts +++ b/packages/types/__tests__/less-than-equal.spec.ts @@ -1,97 +1,98 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { LessThanEqual } from '../src/less-than-equal'; +import { describe, expectTypeOf, test } from "vitest"; -describe('returns if a number is less than another number', () => { - test('+x < +y', () => { - type Actual = LessThanEqual<1, 2>; - type Expected = true; +import type { LessThanEqual } from "../src/less-than-equal"; - expectTypeOf().toEqualTypeOf; - }); +describe("returns if a number is less than another number", () => { + test("+x < +y", () => { + type Actual = LessThanEqual<1, 2>; + type Expected = true; - test('+x = +y', () => { - type Actual = LessThanEqual<1, 1>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x = +y", () => { + type Actual = LessThanEqual<1, 1>; + type Expected = true; - test('+x > +y', () => { - type Actual = LessThanEqual<2, 1>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x > +y", () => { + type Actual = LessThanEqual<2, 1>; + type Expected = false; - test('+x > 0', () => { - type Actual = LessThanEqual<1, 0>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x > 0", () => { + type Actual = LessThanEqual<1, 0>; + type Expected = false; - test('0 < +y', () => { - type Actual = LessThanEqual<0, 1>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("0 < +y", () => { + type Actual = LessThanEqual<0, 1>; + type Expected = true; - test('0 = 0', () => { - type Actual = LessThanEqual<0, 0>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("0 = 0", () => { + type Actual = LessThanEqual<0, 0>; + type Expected = true; - test('-x < +y', () => { - type Actual = LessThanEqual<-3, 3>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x < +y", () => { + type Actual = LessThanEqual<-3, 3>; + type Expected = true; - test('+x > -y', () => { - type Actual = LessThanEqual<3, -2>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x > -y", () => { + type Actual = LessThanEqual<3, -2>; + type Expected = false; - test('-x = -y', () => { - type Actual = LessThanEqual<-2, -2>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x = -y", () => { + type Actual = LessThanEqual<-2, -2>; + type Expected = true; - test('-x < -y', () => { - type Actual = LessThanEqual<-3, -2>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x < -y", () => { + type Actual = LessThanEqual<-3, -2>; + type Expected = true; - test('-x > -y', () => { - type Actual = LessThanEqual<-2, -3>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x > -y", () => { + type Actual = LessThanEqual<-2, -3>; + type Expected = false; - test('-x < 0', () => { - type Actual = LessThanEqual<-3, 0>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x < 0", () => { + type Actual = LessThanEqual<-3, 0>; + type Expected = true; - test('0 > -y', () => { - type Actual = LessThanEqual<0, -3>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("0 > -y", () => { + type Actual = LessThanEqual<0, -3>; + type Expected = false; - test.todo('add float support'); + expectTypeOf().toEqualTypeOf(); + }); + + test.todo("add float support"); }); diff --git a/packages/types/__tests__/less-than.spec.ts b/packages/types/__tests__/less-than.spec.ts index 793ac4c..2dd72c5 100644 --- a/packages/types/__tests__/less-than.spec.ts +++ b/packages/types/__tests__/less-than.spec.ts @@ -1,97 +1,98 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { LessThan } from '../src/less-than'; +import { describe, expectTypeOf, test } from "vitest"; -describe('returns if a number is less than another number', () => { - test('+x < +y', () => { - type Actual = LessThan<1, 2>; - type Expected = true; +import type { LessThan } from "../src/less-than"; - expectTypeOf().toEqualTypeOf; - }); +describe("returns if a number is less than another number", () => { + test("+x < +y", () => { + type Actual = LessThan<1, 2>; + type Expected = true; - test('+x = +y', () => { - type Actual = LessThan<1, 1>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x = +y", () => { + type Actual = LessThan<1, 1>; + type Expected = false; - test('+x > +y', () => { - type Actual = LessThan<2, 1>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x > +y", () => { + type Actual = LessThan<2, 1>; + type Expected = false; - test('+x > 0', () => { - type Actual = LessThan<1, 0>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x > 0", () => { + type Actual = LessThan<1, 0>; + type Expected = false; - test('0 < +y', () => { - type Actual = LessThan<0, 1>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("0 < +y", () => { + type Actual = LessThan<0, 1>; + type Expected = true; - test('0 = 0', () => { - type Actual = LessThan<0, 0>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("0 = 0", () => { + type Actual = LessThan<0, 0>; + type Expected = false; - test('-x < +y', () => { - type Actual = LessThan<-3, 3>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x < +y", () => { + type Actual = LessThan<-3, 3>; + type Expected = true; - test('+x > -y', () => { - type Actual = LessThan<3, -2>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("+x > -y", () => { + type Actual = LessThan<3, -2>; + type Expected = false; - test('-x = -y', () => { - type Actual = LessThan<-2, -2>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x = -y", () => { + type Actual = LessThan<-2, -2>; + type Expected = false; - test('-x < -y', () => { - type Actual = LessThan<-3, -2>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x < -y", () => { + type Actual = LessThan<-3, -2>; + type Expected = true; - test('-x > -y', () => { - type Actual = LessThan<-2, -3>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x > -y", () => { + type Actual = LessThan<-2, -3>; + type Expected = false; - test('-x < 0', () => { - type Actual = LessThan<-3, 0>; - type Expected = true; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("-x < 0", () => { + type Actual = LessThan<-3, 0>; + type Expected = true; - test('0 > -y', () => { - type Actual = LessThan<0, -3>; - type Expected = false; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf; - }); + test("0 > -y", () => { + type Actual = LessThan<0, -3>; + type Expected = false; - test.todo('add float support'); + expectTypeOf().toEqualTypeOf(); + }); + + test.todo("add float support"); }); diff --git a/packages/types/__tests__/mapped-enum.spec.ts b/packages/types/__tests__/mapped-enum.spec.ts index 60aa34a..8b5337f 100644 --- a/packages/types/__tests__/mapped-enum.spec.ts +++ b/packages/types/__tests__/mapped-enum.spec.ts @@ -1,38 +1,39 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { MappedEnum } from '../src/mapped-enum'; -import type { ValueOf } from '../src/value-of'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Map an enum into an object', () => { - test('standalone', () => { - type Enum = 'bob' | 'bert' | 'bobette' | 'big berta'; +import type { MappedEnum } from "../src/mapped-enum"; +import type { ValueOf } from "../src/value-of"; - type Expected = { - bob: 'bob'; - bert: 'bert'; - bobette: 'bobette'; - 'big berta': 'big berta'; - }; +describe("Map an enum into an object", () => { + test("standalone", () => { + type Enum = "bob" | "bert" | "bobette" | "big berta"; - type Actual = MappedEnum; + type Expected = { + bob: "bob"; + bert: "bert"; + bobette: "bobette"; + "big berta": "big berta"; + }; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = MappedEnum; - test('recreate from ValueOf', () => { - const Enum = { - BOB: 'BOB', - BERT: 'BERT', - } as const; + expectTypeOf().toEqualTypeOf(); + }); - type Enum = ValueOf; + test("recreate from ValueOf", () => { + const Enum = { + BOB: "BOB", + BERT: "BERT", + } as const; - type Expected = { - BOB: 'BOB'; - BERT: 'BERT'; - }; + type Enum = ValueOf; - type Actual = MappedEnum; + type Expected = { + BOB: "BOB"; + BERT: "BERT"; + }; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = MappedEnum; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/mask-dates.spec.ts b/packages/types/__tests__/mask-dates.spec.ts index e034a7b..8636440 100644 --- a/packages/types/__tests__/mask-dates.spec.ts +++ b/packages/types/__tests__/mask-dates.spec.ts @@ -1,51 +1,52 @@ -import { describe, expectTypeOf, it, test } from 'vitest'; -import type { MaskDates } from '../src/mask-dates'; - -describe('Masks the `Date` type as a `string`', () => { - it('should mask all `Date` types as `string`', () => { - type Actual = MaskDates<{ - date: Date; - nested: { - date: Date; - }; - }>; - - type Expected = { - date: string; - nested: { - date: string; - }; - }; - - expectTypeOf().toEqualTypeOf(); - }); - - test('Date should be replaced with string', () => { - type Result = MaskDates; - expectTypeOf().toEqualTypeOf(); - }); - - test('Nested Date fields should be replaced', () => { - type Expected = { createdAt: string; name: string }; - type Result = MaskDates<{ createdAt: Date; name: string }>; - expectTypeOf().toEqualTypeOf(); - }); - - test('Deeply nested Date fields should be replaced', () => { - type Expected = { - timestamps: { start: string; end: string }; - value: number; - }; - type Result = MaskDates<{ - timestamps: { start: Date; end: Date }; - value: number; - }>; - expectTypeOf().toEqualTypeOf(); - }); - - test('Non-Date fields should remain unchanged', () => { - type Input = { date: string; nested: { d: string } }; - type Result = MaskDates; - expectTypeOf().toEqualTypeOf(); - }); +import { describe, expectTypeOf, it, test } from "vitest"; + +import type { MaskDates } from "../src/mask-dates"; + +describe("Masks the `Date` type as a `string`", () => { + it("should mask all `Date` types as `string`", () => { + type Actual = MaskDates<{ + date: Date; + nested: { + date: Date; + }; + }>; + + type Expected = { + date: string; + nested: { + date: string; + }; + }; + + expectTypeOf().toEqualTypeOf(); + }); + + test("Date should be replaced with string", () => { + type Result = MaskDates; + expectTypeOf().toEqualTypeOf(); + }); + + test("Nested Date fields should be replaced", () => { + type Expected = { createdAt: string; name: string }; + type Result = MaskDates<{ createdAt: Date; name: string }>; + expectTypeOf().toEqualTypeOf(); + }); + + test("Deeply nested Date fields should be replaced", () => { + type Expected = { + timestamps: { start: string; end: string }; + value: number; + }; + type Result = MaskDates<{ + timestamps: { start: Date; end: Date }; + value: number; + }>; + expectTypeOf().toEqualTypeOf(); + }); + + test("Non-Date fields should remain unchanged", () => { + type Input = { date: string; nested: { d: string } }; + type Result = MaskDates; + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/mask-literals.spec.ts b/packages/types/__tests__/mask-literals.spec.ts index db6dc61..8e9c0cd 100644 --- a/packages/types/__tests__/mask-literals.spec.ts +++ b/packages/types/__tests__/mask-literals.spec.ts @@ -1,185 +1,186 @@ -import { describe, expectTypeOf, it, test } from 'vitest'; -import type { MaskLiterals } from '../src/mask-literals'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Extract the type from a template literal type', () => { - test('string', () => { - type Expected = string; - type Actual = MaskLiterals; +import type { MaskLiterals } from "../src/mask-literals"; - expectTypeOf().toEqualTypeOf(); - }); +describe("Extract the type from a template literal type", () => { + test("string", () => { + type Expected = string; + type Actual = MaskLiterals; - test('const string', () => { - type Expected = string; - type Actual = MaskLiterals<'bob'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const string", () => { + type Expected = string; + type Actual = MaskLiterals<"bob">; - test('number', () => { - type Expected = number; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("number", () => { + type Expected = number; + type Actual = MaskLiterals; - test('const number', () => { - type Expected = number; - type Actual = MaskLiterals<12345>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const number", () => { + type Expected = number; + type Actual = MaskLiterals<12345>; - test('stringified number', () => { - type Expected = string; - type Actual = MaskLiterals<`${number}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("stringified number", () => { + type Expected = string; + type Actual = MaskLiterals<`${number}`>; - test('str number', () => { - type Expected = string; - type Actual = MaskLiterals<'number'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("str number", () => { + type Expected = string; + type Actual = MaskLiterals<"number">; - test('NaN', () => { - type Expected = number; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("NaN", () => { + type Expected = number; + type Actual = MaskLiterals; - test('stringified NaN', () => { - type Expected = string; - type Actual = MaskLiterals<`${typeof NaN}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("stringified NaN", () => { + type Expected = string; + type Actual = MaskLiterals<`${typeof NaN}`>; - test('bigint', () => { - type Expected = bigint; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("bigint", () => { + type Expected = bigint; + type Actual = MaskLiterals; - test('const bigint', () => { - type Expected = bigint; - type Actual = MaskLiterals<12345678910111213n>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const bigint", () => { + type Expected = bigint; + type Actual = MaskLiterals<12345678910111213n>; - test('stringified bigint', () => { - type Expected = string; - type Actual = MaskLiterals<`${bigint}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("stringified bigint", () => { + type Expected = string; + type Actual = MaskLiterals<`${bigint}`>; - test('boolean', () => { - type Expected = boolean; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("boolean", () => { + type Expected = boolean; + type Actual = MaskLiterals; - test('const boolean', () => { - type Expected = boolean; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const boolean", () => { + type Expected = boolean; + type Actual = MaskLiterals; - test('stringified boolean', () => { - type Expected = string; - type Actual = MaskLiterals<`${boolean}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("stringified boolean", () => { + type Expected = string; + type Actual = MaskLiterals<`${boolean}`>; - test('symbol', () => { - const actual = Symbol(0); + expectTypeOf().toEqualTypeOf(); + }); - type Expected = symbol; - type Actual = MaskLiterals; + test("symbol", () => { + const actual = Symbol(0); - expectTypeOf().toEqualTypeOf(); - }); + type Expected = symbol; + type Actual = MaskLiterals; - test('null', () => { - type Expected = null; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("null", () => { + type Expected = null; + type Actual = MaskLiterals; - test('stringified null', () => { - type Expected = string; - type Actual = MaskLiterals<`${null}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("stringified null", () => { + type Expected = string; + type Actual = MaskLiterals<`${null}`>; - test('str null', () => { - type Expected = string; - type Actual = MaskLiterals<'null'>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("str null", () => { + type Expected = string; + type Actual = MaskLiterals<"null">; - test('undefined', () => { - type Expected = undefined; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("undefined", () => { + type Expected = undefined; + type Actual = MaskLiterals; - test('stringified undefined', () => { - type Expected = string; - type Actual = MaskLiterals<`${undefined}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("stringified undefined", () => { + type Expected = string; + type Actual = MaskLiterals<`${undefined}`>; - test('literals union', () => { - type Expected = boolean | number; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("literals union", () => { + type Expected = boolean | number; + type Actual = MaskLiterals; - test('const literals union', () => { - type Expected = boolean | number; - type Actual = MaskLiterals; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("const literals union", () => { + type Expected = boolean | number; + type Actual = MaskLiterals; - test('stringified literals union', () => { - type Expected = string; - type Actual = MaskLiterals<`${boolean | number}`>; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + test("stringified literals union", () => { + type Expected = string; + type Actual = MaskLiterals<`${boolean | number}`>; - // it('should musk an object with literals', () => { - // type Actual = MaskLiterals<{ - // name: 'bob'; - // age: -1; - // likes: ['ts']; - // birthday: Date; - // }>; + expectTypeOf().toEqualTypeOf(); + }); - // type Expected = { - // name: string; - // age: number; - // likes: [string]; - // birthday: Date; - // }; + // it('should musk an object with literals', () => { + // type Actual = MaskLiterals<{ + // name: 'bob'; + // age: -1; + // likes: ['ts']; + // birthday: Date; + // }>; - // expectTypeOf().toEqualTypeOf(); - // }); + // type Expected = { + // name: string; + // age: number; + // likes: [string]; + // birthday: Date; + // }; + + // expectTypeOf().toEqualTypeOf(); + // }); }); diff --git a/packages/types/__tests__/non-empty-array.spec.ts b/packages/types/__tests__/non-empty-array.spec.ts index ec9cb87..66978e8 100644 --- a/packages/types/__tests__/non-empty-array.spec.ts +++ b/packages/types/__tests__/non-empty-array.spec.ts @@ -1,32 +1,33 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { NonEmptyArray } from '../src/non-empty-array'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Ensure that the array is populated with at least one element', () => { - it('should have a default T value of `unknown`', () => { - type Expected = NonEmptyArray; - type Actual = NonEmptyArray; +import type { NonEmptyArray } from "../src/non-empty-array"; - expectTypeOf().toExtend(); - }); +describe("Ensure that the array is populated with at least one element", () => { + it("should have a default T value of `unknown`", () => { + type Expected = NonEmptyArray; + type Actual = NonEmptyArray; - it('should allow an array with at least one element', () => { - type Expected = NonEmptyArray; - const singleElement = [1] satisfies Expected; + expectTypeOf().toExtend(); + }); - expectTypeOf(singleElement).toExtend(); - }); + it("should allow an array with at least one element", () => { + type Expected = NonEmptyArray; + const singleElement = [1] satisfies Expected; - it('should allow an array with multiple elements', () => { - type Expected = NonEmptyArray; - const multipleElements = [1, 2, 3] satisfies Expected; + expectTypeOf(singleElement).toExtend(); + }); - expectTypeOf(multipleElements).toExtend(); - }); + it("should allow an array with multiple elements", () => { + type Expected = NonEmptyArray; + const multipleElements = [1, 2, 3] satisfies Expected; - it('should not allow an empty array', () => { - type Expected = NonEmptyArray; - const emptyArray = [] as []; + expectTypeOf(multipleElements).toExtend(); + }); - expectTypeOf(emptyArray).not.toExtend(); - }); + it("should not allow an empty array", () => { + type Expected = NonEmptyArray; + const emptyArray = [] as []; + + expectTypeOf(emptyArray).not.toExtend(); + }); }); diff --git a/packages/types/__tests__/non-optional.spec.ts b/packages/types/__tests__/non-optional.spec.ts index ab3cc32..02e4b9a 100644 --- a/packages/types/__tests__/non-optional.spec.ts +++ b/packages/types/__tests__/non-optional.spec.ts @@ -1,21 +1,22 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { NonOptional } from '../src/non-optional'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Makes optional keys required while preserving their nullability', () => { - it('should preserve nullability', () => { - type Actual = NonOptional<{ - bob: 'bob'; - bert?: string | undefined; - berta?: boolean; - }>; +import type { NonOptional } from "../src/non-optional"; - type Expected = { - bob: 'bob'; - bert: string | undefined; - berta: boolean; - }; +describe("Makes optional keys required while preserving their nullability", () => { + it("should preserve nullability", () => { + type Actual = NonOptional<{ + bob: "bob"; + bert?: string | undefined; + berta?: boolean; + }>; - // @ts-expect-error: still accepts undefined even when type doesn't - expectTypeOf().toEqualTypeOf(); - }); + type Expected = { + bob: "bob"; + bert: string | undefined; + berta: boolean; + }; + + // @ts-expect-error: still accepts undefined even when type doesn't + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/omit-by.spec.ts b/packages/types/__tests__/omit-by.spec.ts index 2027989..049c2d0 100644 --- a/packages/types/__tests__/omit-by.spec.ts +++ b/packages/types/__tests__/omit-by.spec.ts @@ -1,61 +1,62 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { OmitBy } from '../src/omit-by'; - -describe('Omits keys by condition', () => { - test('matches', () => { - type Obj = { - bob: string; - bert: string; - berta: number; - josh: { - amount: number; - }; - }; - - type Actual = OmitBy; - type Expected = { - berta: number; - josh: { - amount: number; - }; - }; - - expectTypeOf().toEqualTypeOf(); - }); - - test('matches obj', () => { - type Obj = { - bob: string; - bert: string; - berta: number; - josh: { - amount: number; - }; - }; - - type Actual = OmitBy; - type Expected = { - bob: string; - bert: string; - berta: number; - }; - - expectTypeOf().toEqualTypeOf(); - }); - - test('nothing matches', () => { - type Obj = { - bob: string; - bert: string; - berta: number; - josh: { - amount: number; - }; - }; - - type Actual = OmitBy; - type Expected = Obj; - - expectTypeOf().toMatchTypeOf(); - }); +import { describe, expectTypeOf, test } from "vitest"; + +import type { OmitBy } from "../src/omit-by"; + +describe("Omits keys by condition", () => { + test("matches", () => { + type Obj = { + bob: string; + bert: string; + berta: number; + josh: { + amount: number; + }; + }; + + type Actual = OmitBy; + type Expected = { + berta: number; + josh: { + amount: number; + }; + }; + + expectTypeOf().toEqualTypeOf(); + }); + + test("matches obj", () => { + type Obj = { + bob: string; + bert: string; + berta: number; + josh: { + amount: number; + }; + }; + + type Actual = OmitBy; + type Expected = { + bob: string; + bert: string; + berta: number; + }; + + expectTypeOf().toEqualTypeOf(); + }); + + test("nothing matches", () => { + type Obj = { + bob: string; + bert: string; + berta: number; + josh: { + amount: number; + }; + }; + + type Actual = OmitBy; + type Expected = Obj; + + expectTypeOf().toMatchTypeOf(); + }); }); diff --git a/packages/types/__tests__/omit-functions.spec.ts b/packages/types/__tests__/omit-functions.spec.ts index 7451ad6..7742cfd 100644 --- a/packages/types/__tests__/omit-functions.spec.ts +++ b/packages/types/__tests__/omit-functions.spec.ts @@ -1,75 +1,75 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { OmitFunctions } from '../src/omit-functions'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Omits the set of properties that are functions', () => { - it('should omit the functions from an object', () => { - const actual = { - bob: 'bob', - bert: 'bert', +import type { OmitFunctions } from "../src/omit-functions"; - berta() { - return 'berta'; - }, +describe("Omits the set of properties that are functions", () => { + it("should omit the functions from an object", () => { + const actual = { + bob: "bob", + bert: "bert", - another: () => 'another', - }; + berta() { + return "berta"; + }, - type Actual = OmitFunctions; - type Expected = { - bob: string; - bert: string; - }; + another: () => "another", + }; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = OmitFunctions; + type Expected = { + bob: string; + bert: string; + }; - it('should omit the functions from a class and only show non-private properties', () => { - class Class { - width!: number; - height!: number; + expectTypeOf().toEqualTypeOf(); + }); - #private = 'hidden'; + it("should omit the functions from a class and only show non-private properties", () => { + class Class { + width!: number; + height!: number; - getWidth() { - return this.width; - } + #private = "hidden"; - getHeight = () => this.height; + getWidth() { + return this.width; + } - getPrivate() { - return this.#private; - } - } + getHeight = () => this.height; - const instance = new Class(); + getPrivate() { + return this.#private; + } + } - type ActualClass = OmitFunctions; - type ActualInstance = OmitFunctions; + const instance = new Class(); - type ExpectedClass = { - width: number; - height: number; - }; + type ActualClass = OmitFunctions; + type ActualInstance = OmitFunctions; - type ExpectedInstance = { - width: number; - height: number; - }; + type ExpectedClass = { + width: number; + height: number; + }; - expectTypeOf().toEqualTypeOf(); - expectTypeOf().toEqualTypeOf(); - }); + type ExpectedInstance = { + width: number; + height: number; + }; - it('should strip function', () => { - const fn = () => { - return 'bob'; - }; + expectTypeOf().toEqualTypeOf(); + expectTypeOf().toEqualTypeOf(); + }); - type Actual = OmitFunctions; + it("should strip function", () => { + const fn = () => { + return "bob"; + }; - // biome-ignore lint/complexity/noBannedTypes: testing - type Expected = {}; + type Actual = OmitFunctions; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = {}; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/partial-deep.spec.ts b/packages/types/__tests__/partial-deep.spec.ts index cbb7886..f100bbb 100644 --- a/packages/types/__tests__/partial-deep.spec.ts +++ b/packages/types/__tests__/partial-deep.spec.ts @@ -1,18 +1,19 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { PartialDeep } from '../src/partial-deep'; +import { describe, expectTypeOf, it } from "vitest"; -describe('PartialDeep Type Tests', () => { - it('should recursively make properties optional', () => { - type Input = { a: number; nested: { b: string; c: boolean } }; - type Result = PartialDeep; - type Expected = { a?: number; nested?: { b?: string; c?: boolean } }; - expectTypeOf().toEqualTypeOf(); - }); +import type { PartialDeep } from "../src/partial-deep"; - it('should preserve Date types', () => { - type Input = { timestamp: Date; data: { createdAt: Date } }; - type Result = PartialDeep; - type Expected = { timestamp?: Date; data?: { createdAt?: Date } }; - expectTypeOf().toEqualTypeOf(); - }); +describe("PartialDeep Type Tests", () => { + it("should recursively make properties optional", () => { + type Input = { a: number; nested: { b: string; c: boolean } }; + type Result = PartialDeep; + type Expected = { a?: number; nested?: { b?: string; c?: boolean } }; + expectTypeOf().toEqualTypeOf(); + }); + + it("should preserve Date types", () => { + type Input = { timestamp: Date; data: { createdAt: Date } }; + type Result = PartialDeep; + type Expected = { timestamp?: Date; data?: { createdAt?: Date } }; + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/patch-union.spec.ts b/packages/types/__tests__/patch-union.spec.ts index c7e3e44..28ccd90 100644 --- a/packages/types/__tests__/patch-union.spec.ts +++ b/packages/types/__tests__/patch-union.spec.ts @@ -1,4 +1,5 @@ import { describe, expectTypeOf, it } from "vitest"; + import type { PatchUnion } from "./../src/patch-union"; import type { Prettify } from "./../src/prettify"; diff --git a/packages/types/__tests__/pick-by.spec.ts b/packages/types/__tests__/pick-by.spec.ts index 324cbf4..b16c301 100644 --- a/packages/types/__tests__/pick-by.spec.ts +++ b/packages/types/__tests__/pick-by.spec.ts @@ -1,60 +1,61 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { EmptyObject } from '../src/empty-object'; -import type { PickBy } from '../src/pick-by'; - -describe('pick fields of an object if they match type', () => { - test('matches', () => { - type Obj = { - bob: string; - bert: string; - berta: number; - josh: { - amount: number; - }; - }; - - type Actual = PickBy; - type Expected = { - bob: string; - bert: string; - }; - - expectTypeOf().toEqualTypeOf(); - }); - - test('matches obj', () => { - type Obj = { - bob: string; - bert: string; - berta: number; - josh: { - amount: number; - }; - }; - - type Actual = PickBy; - type Expected = { - josh: { - amount: number; - }; - }; - - expectTypeOf().toEqualTypeOf(); - }); - - test('nothing matches', () => { - type Obj = { - bob: string; - bert: string; - berta: number; - josh: { - amount: number; - }; - }; - - type Actual = PickBy; - type Expected = EmptyObject; - - expectTypeOf().toExtend(); - }); +import { describe, expectTypeOf, test } from "vitest"; + +import type { EmptyObject } from "../src/empty-object"; +import type { PickBy } from "../src/pick-by"; + +describe("pick fields of an object if they match type", () => { + test("matches", () => { + type Obj = { + bob: string; + bert: string; + berta: number; + josh: { + amount: number; + }; + }; + + type Actual = PickBy; + type Expected = { + bob: string; + bert: string; + }; + + expectTypeOf().toEqualTypeOf(); + }); + + test("matches obj", () => { + type Obj = { + bob: string; + bert: string; + berta: number; + josh: { + amount: number; + }; + }; + + type Actual = PickBy; + type Expected = { + josh: { + amount: number; + }; + }; + + expectTypeOf().toEqualTypeOf(); + }); + + test("nothing matches", () => { + type Obj = { + bob: string; + bert: string; + berta: number; + josh: { + amount: number; + }; + }; + + type Actual = PickBy; + type Expected = EmptyObject; + + expectTypeOf().toExtend(); + }); }); diff --git a/packages/types/__tests__/pick-optional.spec.ts b/packages/types/__tests__/pick-optional.spec.ts index 9e9bb8e..a569c08 100644 --- a/packages/types/__tests__/pick-optional.spec.ts +++ b/packages/types/__tests__/pick-optional.spec.ts @@ -1,42 +1,43 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { PickOptional } from '../src/pick-optional'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Extracts optional properties from a given type `T`', () => { - test('Extract only optional properties', () => { - type Input = { a: number; b?: string; c?: boolean; d: string }; - type Expected = { b?: string; c?: boolean }; - type Result = PickOptional; - expectTypeOf().toEqualTypeOf(); - }); +import type { PickOptional } from "../src/pick-optional"; - test('No optional properties should result in an empty object type', () => { - type Input = { a: number; b: string }; - type Result = PickOptional; - expectTypeOf().toEqualTypeOf>(); - }); +describe("Extracts optional properties from a given type `T`", () => { + test("Extract only optional properties", () => { + type Input = { a: number; b?: string; c?: boolean; d: string }; + type Expected = { b?: string; c?: boolean }; + type Result = PickOptional; + expectTypeOf().toEqualTypeOf(); + }); - test('All optional properties should remain unchanged', () => { - type Input = { a?: number; b?: string }; - type Result = PickOptional; - expectTypeOf().toEqualTypeOf(); - }); + test("No optional properties should result in an empty object type", () => { + type Input = { a: number; b: string }; + type Result = PickOptional; + expectTypeOf().toEqualTypeOf>(); + }); - test('Works with mixed required and optional properties', () => { - type Input = { x: string; y?: number; z: boolean; w?: Date }; - type Expected = { y?: number; w?: Date }; - type Result = PickOptional; - expectTypeOf().toEqualTypeOf(); - }); + test("All optional properties should remain unchanged", () => { + type Input = { a?: number; b?: string }; + type Result = PickOptional; + expectTypeOf().toEqualTypeOf(); + }); - test('Works with optional undefined fields', () => { - type Input = { - x: string; - y?: number | undefined; - z: boolean; - w?: Date; - }; - type Expected = { y?: number | undefined; w?: Date }; - type Result = PickOptional; - expectTypeOf().toEqualTypeOf(); - }); + test("Works with mixed required and optional properties", () => { + type Input = { x: string; y?: number; z: boolean; w?: Date }; + type Expected = { y?: number; w?: Date }; + type Result = PickOptional; + expectTypeOf().toEqualTypeOf(); + }); + + test("Works with optional undefined fields", () => { + type Input = { + x: string; + y?: number | undefined; + z: boolean; + w?: Date; + }; + type Expected = { y?: number | undefined; w?: Date }; + type Result = PickOptional; + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/prettify.spec.ts b/packages/types/__tests__/prettify.spec.ts index 64b0b27..0ac6a74 100644 --- a/packages/types/__tests__/prettify.spec.ts +++ b/packages/types/__tests__/prettify.spec.ts @@ -1,146 +1,147 @@ -import { describe, expectTypeOf, it, test } from 'vitest'; -import type { Prettify } from '../src/prettify'; -import type { Primitive } from '../src/primitive'; - -describe('Prettify the type', () => { - test('simple union', () => { - type Bob = { - Bob: string; - }; - - type Bert = { - Bert: string; - }; - - type Both = Bob & Bert; - - type Expected = { - Bob: string; - Bert: string; - }; - - type Actual = Prettify; - - expectTypeOf().toEqualTypeOf(); - }); - - test('complex union', () => { - type Bob = { - Bob: string; - }; - - type Bert = { - Bert: string; - }; - - type Person = { - name: string; - age: number; - }; - - type Both = (Bob | Bert) & Person; - - type Expected = - | { - Bob: string; - name: string; - age: number; - } - | { - Bert: string; - name: string; - age: number; - }; - - type Actual = Prettify; - - expectTypeOf().toEqualTypeOf(); - }); - - test('deeply nested objects', () => { - type Bob = { - Bob: string; - }; - - type Bert = { - Bert: string; - }; - - type Berta = { - Berta: true; - }; - - type NestedObject = - | { - person: Bob | Bert; - nested: { - identity: Bob | Bert | (Berta & { birthdate: Date }); - }; - } - | { - person: Bob & Bert; - }; - - type Actual = Prettify; - - type Expected = - | { - person: - | { - Bob: string; - } - | { - Bert: string; - }; - nested: { - identity: - | { - Bob: string; - } - | { - Bert: string; - } - | { - Berta: true; - birthdate: Date; - }; - }; - } - | { - person: { - Bob: string; - Bert: string; - }; - }; - - expectTypeOf().toEqualTypeOf(); - }); - - it('should not expand a `Date` type', () => { - type Actual = Prettify; - - type Expected = Date; - - expectTypeOf().toEqualTypeOf(); - }); - - it('should not expand a field `Date` type', () => { - type Actual = Prettify<{ - date: Date; - }>; - - type Expected = { - date: Date; - }; - - expectTypeOf().toEqualTypeOf(); - }); - - it('should not expand a `Primitive` type', () => { - type Actual = Prettify; - - type Expected = Primitive; - - expectTypeOf().toEqualTypeOf(); - }); +import { describe, expectTypeOf, it, test } from "vitest"; + +import type { Prettify } from "../src/prettify"; +import type { Primitive } from "../src/primitive"; + +describe("Prettify the type", () => { + test("simple union", () => { + type Bob = { + Bob: string; + }; + + type Bert = { + Bert: string; + }; + + type Both = Bob & Bert; + + type Expected = { + Bob: string; + Bert: string; + }; + + type Actual = Prettify; + + expectTypeOf().toEqualTypeOf(); + }); + + test("complex union", () => { + type Bob = { + Bob: string; + }; + + type Bert = { + Bert: string; + }; + + type Person = { + name: string; + age: number; + }; + + type Both = (Bob | Bert) & Person; + + type Expected = + | { + Bob: string; + name: string; + age: number; + } + | { + Bert: string; + name: string; + age: number; + }; + + type Actual = Prettify; + + expectTypeOf().toEqualTypeOf(); + }); + + test("deeply nested objects", () => { + type Bob = { + Bob: string; + }; + + type Bert = { + Bert: string; + }; + + type Berta = { + Berta: true; + }; + + type NestedObject = + | { + person: Bob | Bert; + nested: { + identity: Bob | Bert | (Berta & { birthdate: Date }); + }; + } + | { + person: Bob & Bert; + }; + + type Actual = Prettify; + + type Expected = + | { + person: + | { + Bob: string; + } + | { + Bert: string; + }; + nested: { + identity: + | { + Bob: string; + } + | { + Bert: string; + } + | { + Berta: true; + birthdate: Date; + }; + }; + } + | { + person: { + Bob: string; + Bert: string; + }; + }; + + expectTypeOf().toEqualTypeOf(); + }); + + it("should not expand a `Date` type", () => { + type Actual = Prettify; + + type Expected = Date; + + expectTypeOf().toEqualTypeOf(); + }); + + it("should not expand a field `Date` type", () => { + type Actual = Prettify<{ + date: Date; + }>; + + type Expected = { + date: Date; + }; + + expectTypeOf().toEqualTypeOf(); + }); + + it("should not expand a `Primitive` type", () => { + type Actual = Prettify; + + type Expected = Primitive; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/replace.spec.ts b/packages/types/__tests__/replace.spec.ts index dcc20ec..139ccd3 100644 --- a/packages/types/__tests__/replace.spec.ts +++ b/packages/types/__tests__/replace.spec.ts @@ -1,30 +1,31 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { Replace } from '../src/replace'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Recursively replaces occurrences of type `R` in `T` with `N`.', () => { - test('Basic type replacement', () => { - type Result = Replace; - expectTypeOf().toEqualTypeOf(); - }); +import type { Replace } from "../src/replace"; - test('Nested object replacement', () => { - type Input = { a: number; b: string; c: { d: number; e: boolean } }; - type Expected = { - a: boolean; - b: string; - c: { d: boolean; e: boolean }; - }; - type Result = Replace; - expectTypeOf().toEqualTypeOf(); - }); +describe("Recursively replaces occurrences of type `R` in `T` with `N`.", () => { + test("Basic type replacement", () => { + type Result = Replace; + expectTypeOf().toEqualTypeOf(); + }); - test('Array replacement', () => { - type Result = Replace; - expectTypeOf().toEqualTypeOf(); - }); + test("Nested object replacement", () => { + type Input = { a: number; b: string; c: { d: number; e: boolean } }; + type Expected = { + a: boolean; + b: string; + c: { d: boolean; e: boolean }; + }; + type Result = Replace; + expectTypeOf().toEqualTypeOf(); + }); - test('No replacement needed', () => { - type Result = Replace; - expectTypeOf().toEqualTypeOf(); - }); + test("Array replacement", () => { + type Result = Replace; + expectTypeOf().toEqualTypeOf(); + }); + + test("No replacement needed", () => { + type Result = Replace; + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/result.spec.ts b/packages/types/__tests__/result.spec.ts index b04dc81..ada4efb 100644 --- a/packages/types/__tests__/result.spec.ts +++ b/packages/types/__tests__/result.spec.ts @@ -1,41 +1,42 @@ -import { describe, expect, expectTypeOf, it, suite } from 'vitest'; -import type { Result, ResultData, ResultError } from '../src/result'; - -describe('Result of a function call. Either successful w/ data, or not w/ a reason', () => { - suite('Result type', () => { - it('should contain data when success is set to `true`', () => { - const successfulResult: Result = { success: true, data: 5 }; - - expect(successfulResult.success).toBe(true); - expect(successfulResult.data).toBeTypeOf('number'); - }); - - it('should contain reason when success is set to `false`', () => { - const successfulResult: Result = { - success: false, - reason: 'a reason', - }; - - expect(successfulResult.success).toBe(false); - expect(successfulResult.reason).toBeTypeOf('string'); - }); - }); - - suite('ResultError type', () => { - it('should return the type of the reason property of the result', () => { - type Expected = string; - type Actual = ResultError>; - - expectTypeOf().toEqualTypeOf(); - }); - }); - - suite('ResultData type', () => { - it('should return the type of the data property of the result', () => { - type Expected = number; - type Actual = ResultData>; - - expectTypeOf().toEqualTypeOf(); - }); - }); +import { describe, expect, expectTypeOf, it, suite } from "vitest"; + +import type { Result, ResultData, ResultError } from "../src/result"; + +describe("Result of a function call. Either successful w/ data, or not w/ a reason", () => { + suite("Result type", () => { + it("should contain data when success is set to `true`", () => { + const successfulResult: Result = { success: true, data: 5 }; + + expect(successfulResult.success).toBe(true); + expect(successfulResult.data).toBeTypeOf("number"); + }); + + it("should contain reason when success is set to `false`", () => { + const successfulResult: Result = { + success: false, + reason: "a reason", + }; + + expect(successfulResult.success).toBe(false); + expect(successfulResult.reason).toBeTypeOf("string"); + }); + }); + + suite("ResultError type", () => { + it("should return the type of the reason property of the result", () => { + type Expected = string; + type Actual = ResultError>; + + expectTypeOf().toEqualTypeOf(); + }); + }); + + suite("ResultData type", () => { + it("should return the type of the data property of the result", () => { + type Expected = number; + type Actual = ResultData>; + + expectTypeOf().toEqualTypeOf(); + }); + }); }); diff --git a/packages/types/__tests__/reverse.spec.ts b/packages/types/__tests__/reverse.spec.ts index 57cfbec..5ca59d1 100644 --- a/packages/types/__tests__/reverse.spec.ts +++ b/packages/types/__tests__/reverse.spec.ts @@ -1,20 +1,21 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { Reverse } from '../src/reverse'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Reverses an array', () => { - it('should reverse a tuple/array', () => { - type Actual = Reverse<[1, 2, 3]>; +import type { Reverse } from "../src/reverse"; - type Expected = [3, 2, 1]; +describe("Reverses an array", () => { + it("should reverse a tuple/array", () => { + type Actual = Reverse<[1, 2, 3]>; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = [3, 2, 1]; - it('should preserve a generic array', () => { - type Actual = Reverse; + expectTypeOf().toEqualTypeOf(); + }); - type Expected = unknown[]; + it("should preserve a generic array", () => { + type Actual = Reverse; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = unknown[]; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/safe-record.spec.ts b/packages/types/__tests__/safe-record.spec.ts index 1941450..9811135 100644 --- a/packages/types/__tests__/safe-record.spec.ts +++ b/packages/types/__tests__/safe-record.spec.ts @@ -1,25 +1,26 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { SafeRecord } from '../src/safe-record'; +import { describe, expectTypeOf, it } from "vitest"; -describe('A safe way to access a record when `noUncheckedIndexedAccess` is turned off', () => { - it('should be the same as adding `| undefined` to a regular record', () => { - type Actual = SafeRecord; - type Expected = Record; +import type { SafeRecord } from "../src/safe-record"; - expectTypeOf().toEqualTypeOf(); - }); +describe("A safe way to access a record when `noUncheckedIndexedAccess` is turned off", () => { + it("should be the same as adding `| undefined` to a regular record", () => { + type Actual = SafeRecord; + type Expected = Record; - it('should return `T | undefined` when accessed', () => { - type Expected = string | undefined; + expectTypeOf().toEqualTypeOf(); + }); - const safeRecord: SafeRecord = { - key: 'value', - }; + it("should return `T | undefined` when accessed", () => { + type Expected = string | undefined; - const existingProperty = safeRecord.key; - const unknownProperty = safeRecord.bob; + const safeRecord: SafeRecord = { + key: "value", + }; - expectTypeOf(existingProperty).toEqualTypeOf(); - expectTypeOf(unknownProperty).toEqualTypeOf(); - }); + const existingProperty = safeRecord.key; + const unknownProperty = safeRecord.bob; + + expectTypeOf(existingProperty).toEqualTypeOf(); + expectTypeOf(unknownProperty).toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/strict-omit.spec.ts b/packages/types/__tests__/strict-omit.spec.ts index afc4661..2c532f1 100644 --- a/packages/types/__tests__/strict-omit.spec.ts +++ b/packages/types/__tests__/strict-omit.spec.ts @@ -1,19 +1,20 @@ -import { describe, expectTypeOf, test } from 'vitest'; -import type { StrictOmit } from '../src/strict-omit'; +import { describe, expectTypeOf, test } from "vitest"; -describe('Strict Omit', () => { - test('type omit keys of object from object', () => { - const obj = { - Bob: 'bob', - Bert: 'bert', - }; +import type { StrictOmit } from "../src/strict-omit"; - type Expected = { - Bob: string; - }; +describe("Strict Omit", () => { + test("type omit keys of object from object", () => { + const obj = { + Bob: "bob", + Bert: "bert", + }; - type Actual = StrictOmit; + type Expected = { + Bob: string; + }; - expectTypeOf().toEqualTypeOf(); - }); + type Actual = StrictOmit; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/suggest-str.spec.ts b/packages/types/__tests__/suggest-str.spec.ts index 9e0d803..b0af782 100644 --- a/packages/types/__tests__/suggest-str.spec.ts +++ b/packages/types/__tests__/suggest-str.spec.ts @@ -1,20 +1,21 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { SuggestStr } from '../src/suggest-str'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Suggests strings, but accepts any string', () => { - it('should accept suggestion', () => { - type Expected = SuggestStr<'bob' | 'bert'>; +import type { SuggestStr } from "../src/suggest-str"; - const actual: Expected = 'bob'; +describe("Suggests strings, but accepts any string", () => { + it("should accept suggestion", () => { + type Expected = SuggestStr<"bob" | "bert">; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = "bob"; - it('should accept any string', () => { - type Expected = SuggestStr<'bob' | 'bert'>; + expectTypeOf(actual).toExtend(); + }); - const actual: Expected = 'berta'; + it("should accept any string", () => { + type Expected = SuggestStr<"bob" | "bert">; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = "berta"; + + expectTypeOf(actual).toExtend(); + }); }); diff --git a/packages/types/__tests__/suggest.spec.ts b/packages/types/__tests__/suggest.spec.ts index 5a0d81f..7463e7f 100644 --- a/packages/types/__tests__/suggest.spec.ts +++ b/packages/types/__tests__/suggest.spec.ts @@ -1,37 +1,38 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { Suggest } from '../src/suggest'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Suggests a type, but accepts any non-nullable value', () => { - it('should accept suggestion', () => { - type Expected = Suggest<{ bob: 'bob' }>; +import type { Suggest } from "../src/suggest"; - const actual: Expected = { bob: 'bob' }; +describe("Suggests a type, but accepts any non-nullable value", () => { + it("should accept suggestion", () => { + type Expected = Suggest<{ bob: "bob" }>; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = { bob: "bob" }; - it('should accept primitive suggestion', () => { - type Expected = Suggest<6>; + expectTypeOf(actual).toExtend(); + }); - const actual: Expected = 6; + it("should accept primitive suggestion", () => { + type Expected = Suggest<6>; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = 6; - it('should accept any non nullable value', () => { - type Expected = Suggest<'bob' | 'bert'>; + expectTypeOf(actual).toExtend(); + }); - const actual: Expected = 2; + it("should accept any non nullable value", () => { + type Expected = Suggest<"bob" | "bert">; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = 2; - it('should not accept nullable value', () => { - type Expected = Suggest<'bob' | 'bert'>; + expectTypeOf(actual).toExtend(); + }); - // @ts-expect-error: testing - const actual = null satisfies Expected; + it("should not accept nullable value", () => { + type Expected = Suggest<"bob" | "bert">; - expectTypeOf(actual).not.toExtend(); - }); + // @ts-expect-error: testing + const actual = null satisfies Expected; + + expectTypeOf(actual).not.toExtend(); + }); }); diff --git a/packages/types/__tests__/to-str.spec.ts b/packages/types/__tests__/to-str.spec.ts index 444a487..120b88d 100644 --- a/packages/types/__tests__/to-str.spec.ts +++ b/packages/types/__tests__/to-str.spec.ts @@ -1,60 +1,61 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { ToStr } from '../src/to-str'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Stringifies values that can be turned into strings', () => { - it('should stringify string', () => { - type Actual = ToStr<'bob'>; - type Expected = 'bob'; +import type { ToStr } from "../src/to-str"; - expectTypeOf().toEqualTypeOf(); - }); +describe("Stringifies values that can be turned into strings", () => { + it("should stringify string", () => { + type Actual = ToStr<"bob">; + type Expected = "bob"; - it('should stringify number', () => { - type Actual = ToStr<3>; - type Expected = '3'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should stringify number", () => { + type Actual = ToStr<3>; + type Expected = "3"; - it('should stringify bigint', () => { - type Actual = ToStr<30923987n>; - type Expected = '30923987'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should stringify bigint", () => { + type Actual = ToStr<30923987n>; + type Expected = "30923987"; - it('should stringify boolean', () => { - type Actual = ToStr; - type Expected = 'true' | 'false'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should stringify boolean", () => { + type Actual = ToStr; + type Expected = "true" | "false"; - it('should stringify null', () => { - type Actual = ToStr; - type Expected = 'null'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should stringify null", () => { + type Actual = ToStr; + type Expected = "null"; - it('should stringify undefined', () => { - type Actual = ToStr; - type Expected = 'undefined'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should stringify undefined", () => { + type Actual = ToStr; + type Expected = "undefined"; - it('should not stringify symbol', () => { - type Actual = ToStr; - type Expected = never; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should not stringify symbol", () => { + type Actual = ToStr; + type Expected = never; - it('should stringify an object that implements `toString(): string`', () => { - type Actual = ToStr<{ toString(): 'bob' }>; - type Expected = 'bob'; + expectTypeOf().toEqualTypeOf(); + }); - expectTypeOf().toEqualTypeOf(); - }); + it("should stringify an object that implements `toString(): string`", () => { + type Actual = ToStr<{ toString(): "bob" }>; + type Expected = "bob"; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/union-to-tuple.spec.ts b/packages/types/__tests__/union-to-tuple.spec.ts index 6a5ac22..0ab50f4 100644 --- a/packages/types/__tests__/union-to-tuple.spec.ts +++ b/packages/types/__tests__/union-to-tuple.spec.ts @@ -1,4 +1,5 @@ import { describe, expectTypeOf, it } from "vitest"; + import type { UnionToTuple } from "../src/union-to-tuple"; describe("UnionToTuple", () => { diff --git a/packages/types/__tests__/value-of.spec.ts b/packages/types/__tests__/value-of.spec.ts index 8718752..eff32de 100644 --- a/packages/types/__tests__/value-of.spec.ts +++ b/packages/types/__tests__/value-of.spec.ts @@ -1,46 +1,47 @@ -import { describe, expectTypeOf, it, test } from 'vitest'; -import type { ValueOf } from '../src/value-of'; +import { describe, expectTypeOf, it, test } from "vitest"; -describe('Value Of', () => { - test('type contains values of object', () => { - const obj = { - Bob: 'bob', - Bert: 'bert', - }; +import type { ValueOf } from "../src/value-of"; - type Expected = string; - type Actual = ValueOf; +describe("Value Of", () => { + test("type contains values of object", () => { + const obj = { + Bob: "bob", + Bert: "bert", + }; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = string; + type Actual = ValueOf; - test('type contains values of const object', () => { - const obj = { - Bob: 'bob', - Bert: 'bert', - } as const; + expectTypeOf().toEqualTypeOf(); + }); - type Expected = 'bob' | 'bert'; - type Actual = ValueOf; + test("type contains values of const object", () => { + const obj = { + Bob: "bob", + Bert: "bert", + } as const; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = "bob" | "bert"; + type Actual = ValueOf; - it('should return the elements of an array', () => { - const arr = ['bob', 'bert', 2]; + expectTypeOf().toEqualTypeOf(); + }); - type Expected = string | number; - type Actual = ValueOf; + it("should return the elements of an array", () => { + const arr = ["bob", "bert", 2]; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = string | number; + type Actual = ValueOf; - it('should return the elements of a const array', () => { - const arr = ['bob', 'bert'] as const; + expectTypeOf().toEqualTypeOf(); + }); - type Expected = 'bob' | 'bert'; - type Actual = ValueOf; + it("should return the elements of a const array", () => { + const arr = ["bob", "bert"] as const; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = "bob" | "bert"; + type Actual = ValueOf; + + expectTypeOf().toEqualTypeOf(); + }); }); diff --git a/packages/types/__tests__/whatever.spec.ts b/packages/types/__tests__/whatever.spec.ts index ba3943e..a34b286 100644 --- a/packages/types/__tests__/whatever.spec.ts +++ b/packages/types/__tests__/whatever.spec.ts @@ -1,28 +1,29 @@ -import { describe, expectTypeOf, it } from 'vitest'; -import type { Whatever } from '../src/whatever'; +import { describe, expectTypeOf, it } from "vitest"; -describe('Suggests a type, but accepts any value', () => { - it('should accept suggestion', () => { - type Expected = Whatever<{ bob: 'bob' }>; +import type { Whatever } from "../src/whatever"; - const actual: Expected = { bob: 'bob' }; +describe("Suggests a type, but accepts any value", () => { + it("should accept suggestion", () => { + type Expected = Whatever<{ bob: "bob" }>; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = { bob: "bob" }; - it('should accept primitive suggestion', () => { - type Expected = Whatever<6>; + expectTypeOf(actual).toExtend(); + }); - const actual: Expected = 6; + it("should accept primitive suggestion", () => { + type Expected = Whatever<6>; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = 6; - it('should accept any value', () => { - type Expected = Whatever<'bob' | 'bert'>; + expectTypeOf(actual).toExtend(); + }); - const actual: Expected = null; + it("should accept any value", () => { + type Expected = Whatever<"bob" | "bert">; - expectTypeOf(actual).toExtend(); - }); + const actual: Expected = null; + + expectTypeOf(actual).toExtend(); + }); }); diff --git a/packages/types/oxlint.config.ts b/packages/types/oxlint.config.ts index 02cd98e..89d97ac 100644 --- a/packages/types/oxlint.config.ts +++ b/packages/types/oxlint.config.ts @@ -4,5 +4,9 @@ const config = createOxlintConfig({ jsdoc: true }); export default { ...config, - rules: { ...config.rules, "typescript/no-explicit-any": "off" }, + rules: { + ...config.rules, + "jsdoc/check-tag-names": "off", + "typescript/no-explicit-any": "off", + }, }; diff --git a/packages/types/package.json b/packages/types/package.json index 6d46bdd..099d5ca 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,36 +1,36 @@ { - "name": "@ylfjuk-core/types", - "version": "0.0.18", - "author": "YLfjuk", - "type": "module", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/YLfjuk/core.git", - "directory": "packages/types" - }, - "keywords": [ - "ylfjuk", - "core", - "types" - ], - "files": [ - "src" - ], - "types": "./src/index.ts", - "exports": { - ".": { - "@ylfjuk-core/dev.src": "./src/index.ts", - "types": "./src/index.ts" - } - }, - "sideEffects": false, - "scripts": { - "build": "pnpm run test && pnpm run test:types", - "test": "vitest run --typecheck", - "test:types": "tsc --noEmit" - }, - "peerDependencies": { - "typescript": "^7.0.2" - } + "name": "@ylfjuk-core/types", + "version": "0.0.18", + "keywords": [ + "core", + "types", + "ylfjuk" + ], + "license": "MIT", + "author": "YLfjuk", + "repository": { + "type": "git", + "url": "git+https://github.com/YLfjuk/core.git", + "directory": "packages/types" + }, + "files": [ + "src" + ], + "type": "module", + "sideEffects": false, + "types": "./src/index.ts", + "exports": { + ".": { + "@ylfjuk-core/dev.src": "./src/index.ts", + "types": "./src/index.ts" + } + }, + "scripts": { + "build": "pnpm run test && pnpm run test:types", + "test": "vitest run --typecheck", + "test:types": "tsc --noEmit" + }, + "peerDependencies": { + "typescript": "^7.0.2" + } } diff --git a/packages/types/src/abs.ts b/packages/types/src/abs.ts index 0adb84e..ed5c624 100644 --- a/packages/types/src/abs.ts +++ b/packages/types/src/abs.ts @@ -3,6 +3,4 @@ * * @since 0.0.10 */ -export type Abs = `${N}` extends `-${infer P extends number}` - ? P - : N; +export type Abs = `${N}` extends `-${infer P extends number}` ? P : N; diff --git a/packages/types/src/array-of-n.ts b/packages/types/src/array-of-n.ts index e961ccb..5713c78 100644 --- a/packages/types/src/array-of-n.ts +++ b/packages/types/src/array-of-n.ts @@ -1,4 +1,4 @@ -import type { Abs } from './abs'; +import type { Abs } from "./abs"; /** * @template Amount - amount of {@link Fill} @@ -10,14 +10,15 @@ import type { Abs } from './abs'; * @modified 0.0.12 - Now accepts any type for {@link Fill} */ export type ArrayOfN< - Amount extends number, - Limit extends number = -1, - Acc extends Fill[] = [], - Fill = 0 -> = Abs extends Amount - ? Acc['length'] extends Limit - ? never - : Acc['length'] extends Amount - ? Acc - : ArrayOfN - : never; + Amount extends number, + Limit extends number = -1, + Acc extends Fill[] = [], + Fill = 0, +> = + Abs extends Amount + ? Acc["length"] extends Limit + ? never + : Acc["length"] extends Amount + ? Acc + : ArrayOfN + : never; diff --git a/packages/types/src/at-least-one.ts b/packages/types/src/at-least-one.ts index 1ee3b22..c17203a 100644 --- a/packages/types/src/at-least-one.ts +++ b/packages/types/src/at-least-one.ts @@ -1,10 +1,10 @@ -import type { Prettify } from './prettify'; +import type { Prettify } from "./prettify"; /** * @since 0.0.10 */ export type AtLeastOne = Prettify< - { - [K in keyof T]-?: Partial & Required>; - }[keyof T] + { + [K in keyof T]-?: Partial & Required>; + }[keyof T] >; diff --git a/packages/types/src/deep-dict.ts b/packages/types/src/deep-dict.ts index 1b0c2ea..4700b52 100644 --- a/packages/types/src/deep-dict.ts +++ b/packages/types/src/deep-dict.ts @@ -6,5 +6,5 @@ * @since 0.0.9 */ export type DeepDict = { - [key: string]: T | DeepDict; + [key: string]: T | DeepDict; }; diff --git a/packages/types/src/empty-object.ts b/packages/types/src/empty-object.ts index bb1c398..3e27273 100644 --- a/packages/types/src/empty-object.ts +++ b/packages/types/src/empty-object.ts @@ -2,5 +2,5 @@ * @since 0.0.9 */ export type EmptyObject = { - [key: string]: never; + [key: string]: never; }; diff --git a/packages/types/src/equals.ts b/packages/types/src/equals.ts index c101421..7b15e76 100644 --- a/packages/types/src/equals.ts +++ b/packages/types/src/equals.ts @@ -1,4 +1,4 @@ -import type { Box } from './box'; +import type { Box } from "./box"; /** * @see {@link Box} @@ -11,8 +11,4 @@ import type { Box } from './box'; * @since 0.0.12 * @modified 0.0.14 {@breaking 💥} */ -export type Equals = Box extends Box - ? Box extends Box - ? true - : false - : false; +export type Equals = Box extends Box ? (Box extends Box ? true : false) : false; diff --git a/packages/types/src/exactly-one.ts b/packages/types/src/exactly-one.ts index 93e2461..24cb375 100644 --- a/packages/types/src/exactly-one.ts +++ b/packages/types/src/exactly-one.ts @@ -1,12 +1,12 @@ -import type { Prettify } from './prettify'; +import type { Prettify } from "./prettify"; /** * @since 0.0.10 */ export type ExactlyOne = Prettify< - { - [K in keyof T]-?: Required> & { - [I in keyof T as I extends K ? never : I]?: never; - }; - }[keyof T] + { + [K in keyof T]-?: Required> & { + [I in keyof T as I extends K ? never : I]?: never; + }; + }[keyof T] >; diff --git a/packages/types/src/extend.ts b/packages/types/src/extend.ts index ec117ef..731c172 100644 --- a/packages/types/src/extend.ts +++ b/packages/types/src/extend.ts @@ -5,5 +5,5 @@ * @modified 0.0.13 */ export type Extend = { - [K in keyof T]: K extends keyof Ext ? T[K] | Ext[K] : T[K]; + [K in keyof T]: K extends keyof Ext ? T[K] | Ext[K] : T[K]; }; diff --git a/packages/types/src/extends.ts b/packages/types/src/extends.ts index 26b5b27..eb6098b 100644 --- a/packages/types/src/extends.ts +++ b/packages/types/src/extends.ts @@ -1,4 +1,4 @@ -import type { Box } from '@ylfjuk-core/types'; +import type { Box } from "@ylfjuk-core/types"; /** * @description A stricter wrapper around the `extends` keyword' diff --git a/packages/types/src/extract-literal.ts b/packages/types/src/extract-literal.ts index d3771f8..18e1743 100644 --- a/packages/types/src/extract-literal.ts +++ b/packages/types/src/extract-literal.ts @@ -1,4 +1,4 @@ -import type { Primitive } from './primitive'; +import type { Primitive } from "./primitive"; /** * @description Extracts the literals from a string @@ -16,4 +16,4 @@ import type { Primitive } from './primitive'; * @modified 0.0.9 {@breaking 💥} */ export type ExtractLiteral = - T extends `${infer U extends Exclude}` ? U : T; + T extends `${infer U extends Exclude}` ? U : T; diff --git a/packages/types/src/extract-values.ts b/packages/types/src/extract-values.ts index 6590e7c..1cf566b 100644 --- a/packages/types/src/extract-values.ts +++ b/packages/types/src/extract-values.ts @@ -1,5 +1,5 @@ -import type { FN } from './fn'; -import type { ValueOf } from './value-of'; +import type { FN } from "./fn"; +import type { ValueOf } from "./value-of"; /** * @note preserves `Date` @@ -10,14 +10,13 @@ import type { ValueOf } from './value-of'; * @modified 0.0.6 * @modified 0.0.14 - Flattened the nesting */ -export type ExtractValues = T extends FN< - infer R -> - ? extractFnReturnType extends true - ? ExtractValues - : never - : T extends Date - ? T - : T extends object - ? ExtractValues, extractFnReturnType> - : T; +export type ExtractValues = + T extends FN + ? extractFnReturnType extends true + ? ExtractValues + : never + : T extends Date + ? T + : T extends object + ? ExtractValues, extractFnReturnType> + : T; diff --git a/packages/types/src/falsy.ts b/packages/types/src/falsy.ts index 06fd93a..1b44450 100644 --- a/packages/types/src/falsy.ts +++ b/packages/types/src/falsy.ts @@ -5,4 +5,4 @@ * * @since 0.0.16 */ -export type Falsy = false | 0 | '' | null | undefined | 0n; +export type Falsy = false | 0 | "" | null | undefined | 0n; diff --git a/packages/types/src/fn.ts b/packages/types/src/fn.ts index 039f11c..f5b2be1 100644 --- a/packages/types/src/fn.ts +++ b/packages/types/src/fn.ts @@ -7,6 +7,6 @@ * @todo Add support for `this` context in function types */ export type FN = ( - this: This, - ...args: Args + this: This, + ...args: Args ) => Return; diff --git a/packages/types/src/has-duplicates.ts b/packages/types/src/has-duplicates.ts index 8635388..67c09fd 100644 --- a/packages/types/src/has-duplicates.ts +++ b/packages/types/src/has-duplicates.ts @@ -1,15 +1,12 @@ -import type { UnknownArray } from './unknown-array'; +import type { UnknownArray } from "./unknown-array"; /** * @description A type that checks if an array has duplicate elements. * * @since 0.0.14 */ -export type HasDuplicates = T extends readonly [ - infer First, - ...infer Rest -] - ? First extends Rest[number] - ? true - : HasDuplicates - : false; +export type HasDuplicates = T extends readonly [infer First, ...infer Rest] + ? First extends Rest[number] + ? true + : HasDuplicates + : false; diff --git a/packages/types/src/if.ts b/packages/types/src/if.ts index c2f23a7..9ff1264 100644 --- a/packages/types/src/if.ts +++ b/packages/types/src/if.ts @@ -3,8 +3,6 @@ * * @since 0.0.14 */ -export type If< - Condition extends boolean, - Then, - Else = never -> = Condition extends true ? Then : Else; +export type If = Condition extends true + ? Then + : Else; diff --git a/packages/types/src/increment.ts b/packages/types/src/increment.ts index b2adf8b..3adff47 100644 --- a/packages/types/src/increment.ts +++ b/packages/types/src/increment.ts @@ -1,5 +1,5 @@ -import type { ArrayOfN } from './array-of-n'; -import type { IsPositiveOrZero } from './is-positive-or-zero'; +import type { ArrayOfN } from "./array-of-n"; +import type { IsPositiveOrZero } from "./is-positive-or-zero"; /** * @description Increments a numeric value by 1 @@ -13,8 +13,9 @@ import type { IsPositiveOrZero } from './is-positive-or-zero'; * * @since 0.0.10 */ -export type Increment = IsPositiveOrZero extends true - ? [...ArrayOfN, N]['length'] - : 'Error: Unsupported numeric value'; +export type Increment = + IsPositiveOrZero extends true + ? [...ArrayOfN, N]["length"] + : "Error: Unsupported numeric value"; // TODO: add support for Z, R values diff --git a/packages/types/src/is-disjoint-union.ts b/packages/types/src/is-disjoint-union.ts index d9be23f..2132e29 100644 --- a/packages/types/src/is-disjoint-union.ts +++ b/packages/types/src/is-disjoint-union.ts @@ -1,4 +1,4 @@ -import type { UnionToIntersection } from './union-to-intersection'; +import type { UnionToIntersection } from "./union-to-intersection"; /** * @see {@link UnionToIntersection} @@ -28,6 +28,4 @@ import type { UnionToIntersection } from './union-to-intersection'; * * @since 0.0.7 */ -export type IsDisjointUnion = UnionToIntersection extends never - ? true - : false; +export type IsDisjointUnion = UnionToIntersection extends never ? true : false; diff --git a/packages/types/src/is-positive-or-zero.ts b/packages/types/src/is-positive-or-zero.ts index 34c693a..473ca03 100644 --- a/packages/types/src/is-positive-or-zero.ts +++ b/packages/types/src/is-positive-or-zero.ts @@ -1,4 +1,4 @@ -import type { Abs } from './abs'; +import type { Abs } from "./abs"; /** * @description @@ -11,6 +11,4 @@ import type { Abs } from './abs'; * @since 0.0.10 * @modified 0.0.11 {@breaking 💥} */ -export type IsPositiveOrZero = Abs extends N - ? true - : false; +export type IsPositiveOrZero = Abs extends N ? true : false; diff --git a/packages/types/src/is-tuple.ts b/packages/types/src/is-tuple.ts index 280165f..75b7afd 100644 --- a/packages/types/src/is-tuple.ts +++ b/packages/types/src/is-tuple.ts @@ -1,6 +1,4 @@ /** * @since 0.0.10 */ -export type IsTuple = number extends T['length'] - ? false - : true; +export type IsTuple = number extends T["length"] ? false : true; diff --git a/packages/types/src/join.ts b/packages/types/src/join.ts index 3238769..5566fcd 100644 --- a/packages/types/src/join.ts +++ b/packages/types/src/join.ts @@ -1,8 +1,8 @@ -import type { Stringifiable } from './stringifiable'; -import type { ToStr } from './to-str'; +import type { Stringifiable } from "./stringifiable"; +import type { ToStr } from "./to-str"; type Settings = { separator: string }; -type DefaultSettings = { separator: '' }; +type DefaultSettings = { separator: "" }; /** * @description Joins together stringifiable elements @@ -13,15 +13,12 @@ type DefaultSettings = { separator: '' }; * @since 0.0.14 */ export type Join< - T extends Stringifiable[], - Options extends Settings = DefaultSettings -> = T extends [ - infer S extends Stringifiable, - ...infer Rest extends Stringifiable[] -] - ? `${ToStr}${Join extends infer U extends string - ? U extends '' - ? '' - : `${Options['separator']}${U}` - : ''}` - : ''; + T extends Stringifiable[], + Options extends Settings = DefaultSettings, +> = T extends [infer S extends Stringifiable, ...infer Rest extends Stringifiable[]] + ? `${ToStr}${Join extends infer U extends string + ? U extends "" + ? "" + : `${Options["separator"]}${U}` + : ""}` + : ""; diff --git a/packages/types/src/key-path.ts b/packages/types/src/key-path.ts index db50ce6..51321d9 100644 --- a/packages/types/src/key-path.ts +++ b/packages/types/src/key-path.ts @@ -1,4 +1,4 @@ -import type { IsTuple } from '@ylfjuk-core/types'; +import type { IsTuple } from "@ylfjuk-core/types"; /** * Recursively extracts all possible key paths from a given type `T` as string literal types. @@ -14,13 +14,13 @@ import type { IsTuple } from '@ylfjuk-core/types'; * */ export type KeyPath = T extends Date - ? never - : T extends Array - ? IsTuple extends true - ? KeyPath> - : `${number}` | `${number}.${KeyPath}` - : T extends object - ? { - [K in keyof T & string]: `${K}` | `${K}.${KeyPath}`; - }[keyof T & string] - : never; + ? never + : T extends Array + ? IsTuple extends true + ? KeyPath> + : `${number}` | `${number}.${KeyPath}` + : T extends object + ? { + [K in keyof T & string]: `${K}` | `${K}.${KeyPath}`; + }[keyof T & string] + : never; diff --git a/packages/types/src/last-of-union.ts b/packages/types/src/last-of-union.ts index df7bd8c..c797c62 100644 --- a/packages/types/src/last-of-union.ts +++ b/packages/types/src/last-of-union.ts @@ -7,6 +7,5 @@ import type { UnionToIntersection } from "./union-to-intersection"; * * @since 0.0.18 */ -export type LastOfUnion = UnionToIntersection U : never> extends () => infer R - ? R - : never; +export type LastOfUnion = + UnionToIntersection U : never> extends () => infer R ? R : never; diff --git a/packages/types/src/less-than-equal.ts b/packages/types/src/less-than-equal.ts index 361bdc0..18cf8f1 100644 --- a/packages/types/src/less-than-equal.ts +++ b/packages/types/src/less-than-equal.ts @@ -1,5 +1,5 @@ -import type { Equals } from './equals'; -import type { LessThan } from './less-than'; +import type { Equals } from "./equals"; +import type { LessThan } from "./less-than"; /** * @description @@ -12,9 +12,5 @@ import type { LessThan } from './less-than'; * * @since 0.0.12 */ -export type LessThanEqual = Equals< - A, - B -> extends true - ? true - : LessThan; +export type LessThanEqual = + Equals extends true ? true : LessThan; diff --git a/packages/types/src/less-than.ts b/packages/types/src/less-than.ts index 8e2bd6c..96a2fc8 100644 --- a/packages/types/src/less-than.ts +++ b/packages/types/src/less-than.ts @@ -1,6 +1,6 @@ -import type { Abs } from './abs'; -import type { ArrayOfN } from './array-of-n'; -import type { IsPositiveOrZero } from './is-positive-or-zero'; +import type { Abs } from "./abs"; +import type { ArrayOfN } from "./array-of-n"; +import type { IsPositiveOrZero } from "./is-positive-or-zero"; /** * @description @@ -15,15 +15,13 @@ import type { IsPositiveOrZero } from './is-positive-or-zero'; * * @since 0.0.10 */ -export type LessThan< - A extends number, - B extends number -> = IsPositiveOrZero extends true - ? IsPositiveOrZero extends true - ? ArrayOfN extends never - ? false - : true - : false - : IsPositiveOrZero extends true - ? true - : LessThan, Abs>; +export type LessThan = + IsPositiveOrZero extends true + ? IsPositiveOrZero extends true + ? ArrayOfN extends never + ? false + : true + : false + : IsPositiveOrZero extends true + ? true + : LessThan, Abs>; diff --git a/packages/types/src/mask-dates.ts b/packages/types/src/mask-dates.ts index 365a6f7..143387e 100644 --- a/packages/types/src/mask-dates.ts +++ b/packages/types/src/mask-dates.ts @@ -1,4 +1,4 @@ -import type { Replace } from './replace'; +import type { Replace } from "./replace"; /** * @description Masks the `Date` type as a `string` diff --git a/packages/types/src/mask-literals.ts b/packages/types/src/mask-literals.ts index 62c31f7..650e9b5 100644 --- a/packages/types/src/mask-literals.ts +++ b/packages/types/src/mask-literals.ts @@ -1,5 +1,5 @@ -import type { InverseExtract } from './inverse-extract'; -import type { Primitive } from './primitive'; +import type { InverseExtract } from "./inverse-extract"; +import type { Primitive } from "./primitive"; /** * @description Masks the literals as their primitive form @@ -34,8 +34,5 @@ import type { Primitive } from './primitive'; * TODO: Support objects */ export type MaskLiterals = { - [K in Primitive as string]: InverseExtract< - T, - K extends boolean ? boolean : K - >; + [K in Primitive as string]: InverseExtract; }[string]; diff --git a/packages/types/src/non-optional.ts b/packages/types/src/non-optional.ts index a91c329..65ee054 100644 --- a/packages/types/src/non-optional.ts +++ b/packages/types/src/non-optional.ts @@ -9,5 +9,5 @@ * @since 0.0.14 */ export type NonOptional = { - [K in keyof Required]: T[K]; + [K in keyof Required]: T[K]; }; diff --git a/packages/types/src/omit-by.ts b/packages/types/src/omit-by.ts index 4509c0a..45827be 100644 --- a/packages/types/src/omit-by.ts +++ b/packages/types/src/omit-by.ts @@ -6,5 +6,5 @@ * @since 0.0.14 */ export type OmitBy = { - [K in keyof T as T[K] extends Check ? never : K]: T[K]; + [K in keyof T as T[K] extends Check ? never : K]: T[K]; }; diff --git a/packages/types/src/omit-functions.ts b/packages/types/src/omit-functions.ts index 7b509d9..c03422b 100644 --- a/packages/types/src/omit-functions.ts +++ b/packages/types/src/omit-functions.ts @@ -1,5 +1,5 @@ -import type { FN } from './fn'; -import type { OmitBy } from './omit-by'; +import type { FN } from "./fn"; +import type { OmitBy } from "./omit-by"; /** * @description Omits the set of properties that are functions diff --git a/packages/types/src/partial-deep.ts b/packages/types/src/partial-deep.ts index ff4aa03..07db82c 100644 --- a/packages/types/src/partial-deep.ts +++ b/packages/types/src/partial-deep.ts @@ -14,9 +14,9 @@ * @since 0.0.14 */ export type PartialDeep = T extends Date - ? Date - : T extends object - ? { - [K in keyof T]?: PartialDeep; - } - : T; + ? Date + : T extends object + ? { + [K in keyof T]?: PartialDeep; + } + : T; diff --git a/packages/types/src/patch-union.ts b/packages/types/src/patch-union.ts index 7222000..407746f 100644 --- a/packages/types/src/patch-union.ts +++ b/packages/types/src/patch-union.ts @@ -14,10 +14,11 @@ import type { KeyofUnion } from "./keyof-union"; * * @since 0.0.17 */ -export type PatchUnion = Box extends Box - ? _T extends infer U - ? U & { - [K in Exclude, keyof U>]?: never; - } - : never - : never; +export type PatchUnion = + Box extends Box + ? _T extends infer U + ? U & { + [K in Exclude, keyof U>]?: never; + } + : never + : never; diff --git a/packages/types/src/pick-by.ts b/packages/types/src/pick-by.ts index d1e161e..b291145 100644 --- a/packages/types/src/pick-by.ts +++ b/packages/types/src/pick-by.ts @@ -4,5 +4,5 @@ * @since 0.0.10 */ export type PickBy = { - [K in keyof T as T[K] extends U ? K : never]: T[K]; + [K in keyof T as T[K] extends U ? K : never]: T[K]; }; diff --git a/packages/types/src/pick-optional.ts b/packages/types/src/pick-optional.ts index 713d40d..780e58c 100644 --- a/packages/types/src/pick-optional.ts +++ b/packages/types/src/pick-optional.ts @@ -13,5 +13,5 @@ * @since 0.0.14 */ export type PickOptional = { - [K in keyof T as T[K] extends Required[K] ? never : K]: T[K]; + [K in keyof T as T[K] extends Required[K] ? never : K]: T[K]; }; diff --git a/packages/types/src/prettify.ts b/packages/types/src/prettify.ts index 377ad65..08c33c2 100644 --- a/packages/types/src/prettify.ts +++ b/packages/types/src/prettify.ts @@ -8,7 +8,7 @@ * @modified 0.0.14 */ export type Prettify = T extends Date - ? T - : { - [K in keyof T]: Prettify; - }; + ? T + : { + [K in keyof T]: Prettify; + }; diff --git a/packages/types/src/primitive.ts b/packages/types/src/primitive.ts index 4295ea0..be4912b 100644 --- a/packages/types/src/primitive.ts +++ b/packages/types/src/primitive.ts @@ -2,11 +2,4 @@ * @since 0.0.9 * @modified 0.0.10 */ -export type Primitive = - | string - | number - | bigint - | boolean - | symbol - | null - | undefined; +export type Primitive = string | number | bigint | boolean | symbol | null | undefined; diff --git a/packages/types/src/replace.ts b/packages/types/src/replace.ts index 7f57b3d..695eff5 100644 --- a/packages/types/src/replace.ts +++ b/packages/types/src/replace.ts @@ -14,11 +14,11 @@ * @since 0.0.14 */ export type Replace = T extends R - ? N - : T extends Date - ? Date - : T extends object - ? { - [K in keyof T]: Replace; - } - : T; + ? N + : T extends Date + ? Date + : T extends object + ? { + [K in keyof T]: Replace; + } + : T; diff --git a/packages/types/src/reverse.ts b/packages/types/src/reverse.ts index 026221c..80cd1a5 100644 --- a/packages/types/src/reverse.ts +++ b/packages/types/src/reverse.ts @@ -1,4 +1,4 @@ -import type { UnknownArray } from './unknown-array'; +import type { UnknownArray } from "./unknown-array"; /** * @description Reverses an array @@ -6,7 +6,7 @@ import type { UnknownArray } from './unknown-array'; * @since 0.0.14 */ export type Reverse = [] extends T - ? T - : T extends [...infer Rest, infer Last] - ? [Last, ...Reverse] - : []; + ? T + : T extends [...infer Rest, infer Last] + ? [Last, ...Reverse] + : []; diff --git a/packages/types/src/stringifiable.ts b/packages/types/src/stringifiable.ts index b302e60..471fd6c 100644 --- a/packages/types/src/stringifiable.ts +++ b/packages/types/src/stringifiable.ts @@ -1,4 +1,4 @@ -import type { Primitive } from './primitive'; +import type { Primitive } from "./primitive"; /** * @description Primitives that can be stringified, or an object with the `toString` method @@ -8,7 +8,7 @@ import type { Primitive } from './primitive'; * @since 0.0.14 */ export type Stringifiable = - | Exclude - | { - toString(): string; - }; + | Exclude + | { + toString(): string; + }; diff --git a/packages/types/src/suggest-str.ts b/packages/types/src/suggest-str.ts index 1f1220e..38a7ae4 100644 --- a/packages/types/src/suggest-str.ts +++ b/packages/types/src/suggest-str.ts @@ -1,11 +1,7 @@ -import type { Suggest } from './suggest'; - /** * @description * Suggests the provided string {@link T}, but allows any string * - * @see {@link Suggest} - * * @previous AutoCompleteStr {@v 0.0.1} * * @since 0.0.1 diff --git a/packages/types/src/to-str.ts b/packages/types/src/to-str.ts index 15c643f..91500f3 100644 --- a/packages/types/src/to-str.ts +++ b/packages/types/src/to-str.ts @@ -1,4 +1,4 @@ -import type { Stringifiable } from './stringifiable'; +import type { Stringifiable } from "./stringifiable"; /** * @description Stringifies values that can be turned into strings @@ -8,7 +8,7 @@ import type { Stringifiable } from './stringifiable'; * @since 0.0.14 */ export type ToStr = T extends object - ? ReturnType - : T extends Exclude - ? `${T}` - : never; + ? ReturnType + : T extends Exclude + ? `${T}` + : never; diff --git a/packages/types/src/union-to-intersection.ts b/packages/types/src/union-to-intersection.ts index 6645a0f..b89be96 100644 --- a/packages/types/src/union-to-intersection.ts +++ b/packages/types/src/union-to-intersection.ts @@ -12,8 +12,8 @@ * * @since 0.0.7 */ -export type UnionToIntersection = ( - T extends any ? (x: T) => any : never -) extends (x: infer R) => any - ? R - : never; +export type UnionToIntersection = (T extends any ? (x: T) => any : never) extends ( + x: infer R, +) => any + ? R + : never; diff --git a/packages/types/src/whatever.ts b/packages/types/src/whatever.ts index e9a1a99..7679481 100644 --- a/packages/types/src/whatever.ts +++ b/packages/types/src/whatever.ts @@ -1,5 +1,5 @@ -import type { Maybe } from './maybe'; -import type { Suggest } from './suggest'; +import type { Maybe } from "./maybe"; +import type { Suggest } from "./suggest"; /** * @description diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 61f3a45..a06ebfb 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "@ylfjuk/tsconfigs/lib", - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "moduleResolution": "bundler", - "isolatedDeclarations": false - }, - "include": ["src"] + "extends": "@ylfjuk/tsconfigs/lib", + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "bundler", + "isolatedDeclarations": false + }, + "include": ["src"] } diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 550690b..b3c0056 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -7,11 +7,11 @@ #### Features 🆕 - Added - - Enum | Utility module for enums - - enum/toTuple | Converts an `enum` into an ordered `tuple` + - Enum | Utility module for enums + - enum/toTuple | Converts an `enum` into an ordered `tuple` - Modified - - Renamed `Arr`, `Json`, `Obj` and `Str` utilities internally + - Renamed `Arr`, `Json`, `Obj` and `Str` utilities internally ## 0.0.9 @@ -20,10 +20,10 @@ #### Features 🆕 - Added - - jsonParse | A wrapper around `JSON.parse` that fixes the type - - jsonSafeParse | A wrapper around `jsonParse` that returns a `Result` value instead of throwing - - stringify | A wrapper around `JSON.stringify` that fixes the type - - Json | Utility functions for JSON + - jsonParse | A wrapper around `JSON.parse` that fixes the type + - jsonSafeParse | A wrapper around `jsonParse` that returns a `Result` value instead of throwing + - stringify | A wrapper around `JSON.stringify` that fixes the type + - Json | Utility functions for JSON ## 0.0.8 @@ -32,15 +32,15 @@ #### Features 🆕 - Added - - bool | A wrapper around `Boolean` that narrows the type to exclude falsy values - - keysOf | A wrapper around `Object.keys` that retains the type of the keys - - entriesOf | A wrapper around `Object.entries` that retains the type of the keys and values - - arrIncludes | A wrapper around `Array.prototype.includes` that allows to check against any type - - strStartsWith | A wrapper around `String.prototype.startsWith` that narrows the type to a template literal type - - strEndsWith | A wrapper around `String.prototype.endsWith` that narrows the type to a template literal type - - Arr | Utility functions for arrays - - Obj | Utility functions for objects - - Str | Utility functions for strings + - bool | A wrapper around `Boolean` that narrows the type to exclude falsy values + - keysOf | A wrapper around `Object.keys` that retains the type of the keys + - entriesOf | A wrapper around `Object.entries` that retains the type of the keys and values + - arrIncludes | A wrapper around `Array.prototype.includes` that allows to check against any type + - strStartsWith | A wrapper around `String.prototype.startsWith` that narrows the type to a template literal type + - strEndsWith | A wrapper around `String.prototype.endsWith` that narrows the type to a template literal type + - Arr | Utility functions for arrays + - Obj | Utility functions for objects + - Str | Utility functions for strings #### Chores 🧹 @@ -53,7 +53,7 @@ #### Features 🆕 - Modified - - toggle | The `isEqual` arg now directly accepts both arguments for comparison (breaking 💥) + - toggle | The `isEqual` arg now directly accepts both arguments for comparison (breaking 💥) #### Chores 🧹 @@ -66,7 +66,7 @@ #### Features 🆕 - Added Utilities: - - toggle | toggles between elements in an array + - toggle | toggles between elements in an array ## 0.0.5 diff --git a/packages/utils/__tests__/arr/includes.spec.ts b/packages/utils/__tests__/arr/includes.spec.ts index ebc709c..f823f1c 100644 --- a/packages/utils/__tests__/arr/includes.spec.ts +++ b/packages/utils/__tests__/arr/includes.spec.ts @@ -1,24 +1,25 @@ -import { describe, expect, it, test } from 'vitest'; -import { arrIncludes } from '../../src/arr/includes'; +import { describe, expect, it, test } from "vitest"; -describe('arr/includes', () => { - test.each([ - [[1, 2, 3], 2], - [[1, 2, 3], 4], - ])('should include %p in array %p', (arr, el) => { - const expected = arr.includes(el); - const actual = arrIncludes(arr, el); +import { arrIncludes } from "../../src/arr/includes"; - expect(actual).toBe(expected); - }); +describe("arr/includes", () => { + test.each([ + [[1, 2, 3], 2], + [[1, 2, 3], 4], + ])("should include %p in array %p", (arr, el) => { + const expected = arr.includes(el); + const actual = arrIncludes(arr, el); - it('should allow to include elements that are of different type', () => { - const arr = [1, 2, 3]; + expect(actual).toBe(expected); + }); - //? Works fine - expect(arrIncludes(arr, true)).toBe(false); + it("should allow to include elements that are of different type", () => { + const arr = [1, 2, 3]; - // @ts-expect-error: Argument of type 'false' is not assignable to parameter of type 'true'. - expect(arr.includes(true)).toBe(false); - }); + //? Works fine + expect(arrIncludes(arr, true)).toBe(false); + + // @ts-expect-error: Argument of type 'false' is not assignable to parameter of type 'true'. + expect(arr.includes(true)).toBe(false); + }); }); diff --git a/packages/utils/__tests__/assert-never.spec.ts b/packages/utils/__tests__/assert-never.spec.ts index 0fe7e94..c99d13d 100644 --- a/packages/utils/__tests__/assert-never.spec.ts +++ b/packages/utils/__tests__/assert-never.spec.ts @@ -1,19 +1,20 @@ -import { describe, expect, it, vi } from 'vitest'; -import { assertNever } from '../src/assert-never'; -import { noop } from '../src/noop'; +import { describe, expect, it, vi } from "vitest"; -describe('Function that asserts a value has not reached it', () => { - it('should throw', () => { - expect(assertNever).toThrowError(); - }); +import { assertNever } from "../src/assert-never"; +import { noop } from "../src/noop"; - it('should error silently', () => { - const consoleSpy = vi.spyOn(console, 'error').mockImplementation(noop); +describe("Function that asserts a value has not reached it", () => { + it("should throw", () => { + expect(assertNever).toThrowError(); + }); - assertNever.silent(); + it("should error silently", () => { + const consoleSpy = vi.spyOn(console, "error").mockImplementation(noop); - expect(consoleSpy).toHaveBeenCalledOnce(); + assertNever.silent(); - consoleSpy.mockRestore(); - }); + expect(consoleSpy).toHaveBeenCalledOnce(); + + consoleSpy.mockRestore(); + }); }); diff --git a/packages/utils/__tests__/bool.spec.ts b/packages/utils/__tests__/bool.spec.ts index 2a41600..f889157 100644 --- a/packages/utils/__tests__/bool.spec.ts +++ b/packages/utils/__tests__/bool.spec.ts @@ -1,104 +1,87 @@ -import { describe, expect, expectTypeOf, it } from 'vitest'; -import { bool } from './../src/bool'; +import { describe, expect, expectTypeOf, it } from "vitest"; -describe('bool', () => { - it.each([ - false, - 0, - '', - null, - undefined, - 0n, - Number.NaN, - 1, - 1.2, - Math.random(), - new Date(), - 'str', - Symbol(), - Number.NEGATIVE_INFINITY, - true, - 1n, - {}, - [], - { key: undefined }, - [null], - ])('should have the same result as `Boolean`', (value) => { - const actual = bool(value); - const expected = Boolean(value); +import { bool } from "./../src/bool"; - expect(actual).toBe(expected); - }); +describe("bool", () => { + it.each([ + false, + 0, + "", + null, + undefined, + 0n, + Number.NaN, + 1, + 1.2, + Math.random(), + new Date(), + "str", + Symbol(), + Number.NEGATIVE_INFINITY, + true, + 1n, + {}, + [], + { key: undefined }, + [null], + ])("should have the same result as `Boolean`", (value) => { + const actual = bool(value); + const expected = Boolean(value); - it('should narrow down the type correctly', () => { - const arr = [ - false, - 0, - '', - null, - undefined, - 0n, - 1, - 1.2, - 'str', - new Date(), - Symbol(), - true, - 1n, - [], - ] as const; + expect(actual).toBe(expected); + }); - const actual = arr.filter(bool); + it("should narrow down the type correctly", () => { + const arr = [ + false, + 0, + "", + null, + undefined, + 0n, + 1, + 1.2, + "str", + new Date(), + Symbol(), + true, + 1n, + [], + ] as const; - type Actual = typeof actual; + const actual = arr.filter(bool); - type Expected = ( - | true - | symbol - | 1 - | 1.2 - | Date - | 'str' - | 1n - | readonly [] - )[]; + type Actual = typeof actual; - expectTypeOf().toEqualTypeOf(); - }); + type Expected = (true | symbol | 1 | 1.2 | Date | "str" | 1n | readonly [])[]; - it('`Boolean` should not narrow down the type correctly', () => { - const arr = [ - false, - 0, - '', - null, - undefined, - 0n, - 1, - 1.2, - 'str', - new Date(), - Symbol(), - true, - 1n, - [], - ] as const; + expectTypeOf().toEqualTypeOf(); + }); - const actual = arr.filter(Boolean); + it("`Boolean` should not narrow down the type correctly", () => { + const arr = [ + false, + 0, + "", + null, + undefined, + 0n, + 1, + 1.2, + "str", + new Date(), + Symbol(), + true, + 1n, + [], + ] as const; - type Actual = typeof actual; + const actual = arr.filter(Boolean); - type Expected = ( - | true - | symbol - | 1 - | 1.2 - | Date - | 'str' - | 1n - | readonly [] - )[]; + type Actual = typeof actual; - expectTypeOf().not.toEqualTypeOf(); - }); + type Expected = (true | symbol | 1 | 1.2 | Date | "str" | 1n | readonly [])[]; + + expectTypeOf().not.toEqualTypeOf(); + }); }); diff --git a/packages/utils/__tests__/enum/to-tuple.spec.ts b/packages/utils/__tests__/enum/to-tuple.spec.ts index f8a9927..04c6534 100644 --- a/packages/utils/__tests__/enum/to-tuple.spec.ts +++ b/packages/utils/__tests__/enum/to-tuple.spec.ts @@ -1,4 +1,5 @@ import { describe, expect, expectTypeOf, it } from "vitest"; + import { Enum } from "../../src/enum"; describe("enum/toTuple", () => { diff --git a/packages/utils/__tests__/infinite-object.spec.ts b/packages/utils/__tests__/infinite-object.spec.ts index bddbd73..c6de4b3 100644 --- a/packages/utils/__tests__/infinite-object.spec.ts +++ b/packages/utils/__tests__/infinite-object.spec.ts @@ -1,39 +1,40 @@ -import { describe, expect, it } from 'vitest'; -import { InfiniteObject } from './../src/infinite-object'; +import { describe, expect, it } from "vitest"; -describe('Object that can be accessed ad infinitum', () => { - it('can be accessed infinitely', () => { - const expected = InfiniteObject; - const actual = InfiniteObject.a?.b?.c; +import { InfiniteObject } from "./../src/infinite-object"; - expect(actual).toBe(expected); - }); +describe("Object that can be accessed ad infinitum", () => { + it("can be accessed infinitely", () => { + const expected = InfiniteObject; + const actual = InfiniteObject.a?.b?.c; - it('can handle function calls', () => { - const expected = InfiniteObject; - const actual = InfiniteObject.a?.b?.()?.c; + expect(actual).toBe(expected); + }); - expect(actual).toBe(expected); - }); + it("can handle function calls", () => { + const expected = InfiniteObject; + const actual = InfiniteObject.a?.b?.()?.c; - it('can handle class calls', () => { - const expected = InfiniteObject; - const actual = new InfiniteObject(); + expect(actual).toBe(expected); + }); - expect(actual).toBe(expected); - }); + it("can handle class calls", () => { + const expected = InfiniteObject; + const actual = new InfiniteObject(); - it('can receive any argument when used as callback', () => { - const expected = InfiniteObject; - const actual = InfiniteObject({ a: 2 }, 43, 5, Boolean(1), 'str'); + expect(actual).toBe(expected); + }); - expect(actual).toBe(expected); - }); + it("can receive any argument when used as callback", () => { + const expected = InfiniteObject; + const actual = InfiniteObject({ a: 2 }, 43, 5, Boolean(1), "str"); - it('can receive any argument when used as class', () => { - const expected = InfiniteObject; - const actual = new InfiniteObject({ a: 2 }, 43, 5, Boolean(1), 'str'); + expect(actual).toBe(expected); + }); - expect(actual).toBe(expected); - }); + it("can receive any argument when used as class", () => { + const expected = InfiniteObject; + const actual = new InfiniteObject({ a: 2 }, 43, 5, Boolean(1), "str"); + + expect(actual).toBe(expected); + }); }); diff --git a/packages/utils/__tests__/is-defined.spec.ts b/packages/utils/__tests__/is-defined.spec.ts index d9a733f..880615f 100644 --- a/packages/utils/__tests__/is-defined.spec.ts +++ b/packages/utils/__tests__/is-defined.spec.ts @@ -1,108 +1,109 @@ -import { describe, expect, expectTypeOf, test } from 'vitest'; -import { isDefined } from '../src/is-defined'; - -describe('Checks if a value is defined', () => { - test('null value', () => { - const value = null; - const actual = isDefined(value); - expect(actual).toBeFalsy(); - }); - - test('undefined value', () => { - const value = undefined; - const actual = isDefined(value); - expect(actual).toBeFalsy(); - }); - - test('void value', () => { - const value = void 0; - const actual = isDefined(value); - expect(actual).toBeFalsy(); - }); - - test('empty object value', () => { - const value = {}; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('non-empty object value', () => { - const value = { bob: 'bob' }; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('number value', () => { - const value = 13; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('NaN value', () => { - const value = Number.NaN; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('Infinity value', () => { - const value = Number.POSITIVE_INFINITY; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('-Infinity value', () => { - const value = Number.NEGATIVE_INFINITY; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('0 value', () => { - const value = 0; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('-0 value', () => { - const value = -0; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('string value', () => { - const value = 'bob'; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('false value', () => { - const value = false; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('true value', () => { - const value = true; - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('symbol value', () => { - const value = Symbol('bob'); - const actual = isDefined(value); - expect(actual).toBeTruthy(); - }); - - test('randomly defined value', () => { - let value: string | undefined; - - if (Math.random() > 0.5) { - value = 'bob'; - } - - if (isDefined(value)) { - expectTypeOf(value).toBeString(); - } else { - expectTypeOf(value).toBeUndefined(); - } - }); +import { describe, expect, expectTypeOf, test } from "vitest"; + +import { isDefined } from "../src/is-defined"; + +describe("Checks if a value is defined", () => { + test("null value", () => { + const value = null; + const actual = isDefined(value); + expect(actual).toBeFalsy(); + }); + + test("undefined value", () => { + const value = undefined; + const actual = isDefined(value); + expect(actual).toBeFalsy(); + }); + + test("void value", () => { + const value = void 0; + const actual = isDefined(value); + expect(actual).toBeFalsy(); + }); + + test("empty object value", () => { + const value = {}; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("non-empty object value", () => { + const value = { bob: "bob" }; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("number value", () => { + const value = 13; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("NaN value", () => { + const value = Number.NaN; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("Infinity value", () => { + const value = Number.POSITIVE_INFINITY; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("-Infinity value", () => { + const value = Number.NEGATIVE_INFINITY; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("0 value", () => { + const value = 0; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("-0 value", () => { + const value = -0; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("string value", () => { + const value = "bob"; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("false value", () => { + const value = false; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("true value", () => { + const value = true; + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("symbol value", () => { + const value = Symbol("bob"); + const actual = isDefined(value); + expect(actual).toBeTruthy(); + }); + + test("randomly defined value", () => { + let value: string | undefined; + + if (Math.random() > 0.5) { + value = "bob"; + } + + if (isDefined(value)) { + expectTypeOf(value).toBeString(); + } else { + expectTypeOf(value).toBeUndefined(); + } + }); }); diff --git a/packages/utils/__tests__/json/parse.spec.ts b/packages/utils/__tests__/json/parse.spec.ts index a1a9e76..c24fea4 100644 --- a/packages/utils/__tests__/json/parse.spec.ts +++ b/packages/utils/__tests__/json/parse.spec.ts @@ -1,11 +1,11 @@ -import { describe, it } from 'vitest'; +import { describe, it } from "vitest"; -describe('json/parse', () => { - it.todo('should parse JSON strings into objects with type safety'); - it.todo('should handle primitive types and string literals correctly'); - it.todo('should support reviver functions for custom transformations'); - it.todo('should throw SyntaxError for invalid JSON strings'); - it.todo('should handle null input gracefully'); +describe("json/parse", () => { + it.todo("should parse JSON strings into objects with type safety"); + it.todo("should handle primitive types and string literals correctly"); + it.todo("should support reviver functions for custom transformations"); + it.todo("should throw SyntaxError for invalid JSON strings"); + it.todo("should handle null input gracefully"); - // TODO: add type tests -}); \ No newline at end of file + // TODO: add type tests +}); diff --git a/packages/utils/__tests__/json/safe-parse.spec.ts b/packages/utils/__tests__/json/safe-parse.spec.ts index b919577..7f0f4d1 100644 --- a/packages/utils/__tests__/json/safe-parse.spec.ts +++ b/packages/utils/__tests__/json/safe-parse.spec.ts @@ -1,10 +1,10 @@ import { describe, it } from "vitest"; describe("json/safe-parse", () => { - it.todo("should safely parse JSON strings into objects with type safety"); - it.todo("should handle primitive types and string literals correctly"); - it.todo("should support reviver functions for custom transformations"); - it.todo("should return null for invalid JSON strings instead of throwing an error"); - it.todo("should handle null input gracefully"); - // TODO: add type tests -}); \ No newline at end of file + it.todo("should safely parse JSON strings into objects with type safety"); + it.todo("should handle primitive types and string literals correctly"); + it.todo("should support reviver functions for custom transformations"); + it.todo("should return null for invalid JSON strings instead of throwing an error"); + it.todo("should handle null input gracefully"); + // TODO: add type tests +}); diff --git a/packages/utils/__tests__/json/stringify.spec.ts b/packages/utils/__tests__/json/stringify.spec.ts index af6c65d..f7d8bc5 100644 --- a/packages/utils/__tests__/json/stringify.spec.ts +++ b/packages/utils/__tests__/json/stringify.spec.ts @@ -1,11 +1,11 @@ import { describe, it } from "vitest"; describe("json/stringify", () => { - it.todo("should convert JavaScript values to JSON strings with type safety"); - it.todo("should handle undefined, symbol, and function values correctly"); - it.todo("should support replacer functions for custom serialization"); - it.todo("should handle arrays and objects with circular references gracefully"); - it.todo("should format JSON strings with indentation when space is provided"); + it.todo("should convert JavaScript values to JSON strings with type safety"); + it.todo("should handle undefined, symbol, and function values correctly"); + it.todo("should support replacer functions for custom serialization"); + it.todo("should handle arrays and objects with circular references gracefully"); + it.todo("should format JSON strings with indentation when space is provided"); - // TODO: add type tests -}) \ No newline at end of file + // TODO: add type tests +}); diff --git a/packages/utils/__tests__/noop.spec.ts b/packages/utils/__tests__/noop.spec.ts index 072392b..0f58b53 100644 --- a/packages/utils/__tests__/noop.spec.ts +++ b/packages/utils/__tests__/noop.spec.ts @@ -1,41 +1,34 @@ -import { describe, expect, test } from 'vitest'; -import { noop } from '../src/noop'; +import { describe, expect, test } from "vitest"; -describe('Function that accepts any parameter(s) and returns undefined', () => { - test('no params', () => { - const actual = noop(); - expect(actual).toBeUndefined(); - }); +import { noop } from "../src/noop"; - test('null value', () => { - const value = null; - const actual = noop(value); - expect(actual).toBeUndefined(); - }); +describe("Function that accepts any parameter(s) and returns undefined", () => { + test("no params", () => { + const actual = noop(); + expect(actual).toBeUndefined(); + }); - test('undefined value', () => { - const value = undefined; - const actual = noop(value); - expect(actual).toBeUndefined(); - }); + test("null value", () => { + const value = null; + const actual = noop(value); + expect(actual).toBeUndefined(); + }); - test('void value', () => { - const value = void 0; - const actual = noop(value); - expect(actual).toBeUndefined(); - }); + test("undefined value", () => { + const value = undefined; + const actual = noop(value); + expect(actual).toBeUndefined(); + }); - test('values', () => { - const actual = noop( - 1, - 2, - 3, - null, - [1, 2, 3, undefined], - '3252345', - new Date() - ); + test("void value", () => { + const value = void 0; + const actual = noop(value); + expect(actual).toBeUndefined(); + }); - expect(actual).toBeUndefined(); - }); + test("values", () => { + const actual = noop(1, 2, 3, null, [1, 2, 3, undefined], "3252345", new Date()); + + expect(actual).toBeUndefined(); + }); }); diff --git a/packages/utils/__tests__/obj/entries-of.spec.ts b/packages/utils/__tests__/obj/entries-of.spec.ts index 70be851..885477d 100644 --- a/packages/utils/__tests__/obj/entries-of.spec.ts +++ b/packages/utils/__tests__/obj/entries-of.spec.ts @@ -1,11 +1,11 @@ -import { describe, it } from 'vitest'; +import { describe, it } from "vitest"; -describe('obj/entriesOf', () => { - it.todo('should return entries of object'); - it.todo('should return empty array for empty object'); - it.todo('should return entries of object with different types'); - it.todo('should handle nested objects'); - it.todo('should handle arrays as values'); - it.todo('should handle objects with non-enumerable properties'); - it.todo('should handle objects with symbols as keys'); +describe("obj/entriesOf", () => { + it.todo("should return entries of object"); + it.todo("should return empty array for empty object"); + it.todo("should return entries of object with different types"); + it.todo("should handle nested objects"); + it.todo("should handle arrays as values"); + it.todo("should handle objects with non-enumerable properties"); + it.todo("should handle objects with symbols as keys"); }); diff --git a/packages/utils/__tests__/obj/keys-of.spec.ts b/packages/utils/__tests__/obj/keys-of.spec.ts index b35f60d..d9efa73 100644 --- a/packages/utils/__tests__/obj/keys-of.spec.ts +++ b/packages/utils/__tests__/obj/keys-of.spec.ts @@ -1,6 +1,6 @@ -import { describe, it } from 'vitest'; +import { describe, it } from "vitest"; -describe('obj/keysOf', () => { - it.todo('should return entries of object'); - it.todo('should return the exact keys instead of string'); +describe("obj/keysOf", () => { + it.todo("should return entries of object"); + it.todo("should return the exact keys instead of string"); }); diff --git a/packages/utils/__tests__/str/ends-with.spec.ts b/packages/utils/__tests__/str/ends-with.spec.ts index 8e7943b..f6ffeb0 100644 --- a/packages/utils/__tests__/str/ends-with.spec.ts +++ b/packages/utils/__tests__/str/ends-with.spec.ts @@ -1,3 +1,3 @@ -import { describe } from 'vitest'; +import { describe } from "vitest"; -describe.todo('str/endsWith'); +describe.todo("str/endsWith"); diff --git a/packages/utils/__tests__/str/starts-with.spec.ts b/packages/utils/__tests__/str/starts-with.spec.ts index c369b84..a8477de 100644 --- a/packages/utils/__tests__/str/starts-with.spec.ts +++ b/packages/utils/__tests__/str/starts-with.spec.ts @@ -1,3 +1,3 @@ -import { describe } from 'vitest'; +import { describe } from "vitest"; -describe.todo('str/startsWith'); +describe.todo("str/startsWith"); diff --git a/packages/utils/__tests__/toggle.spec.ts b/packages/utils/__tests__/toggle.spec.ts index 731a89c..d82d67b 100644 --- a/packages/utils/__tests__/toggle.spec.ts +++ b/packages/utils/__tests__/toggle.spec.ts @@ -1,131 +1,121 @@ -import type { MockInstance } from 'vitest'; -import { - afterAll, - afterEach, - beforeEach, - describe, - expect, - it, - test, - vi, -} from 'vitest'; -import { noop } from '../src/noop'; -import { toggle } from '../src/toggle'; +import type { MockInstance } from "vitest"; +import { afterAll, afterEach, beforeEach, describe, expect, it, test, vi } from "vitest"; -describe('toggles between elements in an array', () => { - let consoleSpy: MockInstance<(typeof console)['warn']>; +import { noop } from "../src/noop"; +import { toggle } from "../src/toggle"; - beforeEach(() => { - consoleSpy = vi.spyOn(console, 'warn').mockImplementation(noop); - }); +describe("toggles between elements in an array", () => { + let consoleSpy: MockInstance<(typeof console)["warn"]>; - afterEach(() => { - vi.clearAllMocks(); - }); + beforeEach(() => { + consoleSpy = vi.spyOn(console, "warn").mockImplementation(noop); + }); - afterAll(() => { - vi.restoreAllMocks(); - }); + afterEach(() => { + vi.clearAllMocks(); + }); - it('should return the first (index = 0) option when `currentOption` is not provided', () => { - const options = [1, 2, 3]; + afterAll(() => { + vi.restoreAllMocks(); + }); - const [next, idx] = toggle(options); + it("should return the first (index = 0) option when `currentOption` is not provided", () => { + const options = [1, 2, 3]; - expect(next).toBe(1); - expect(idx).toBe(0); + const [next, idx] = toggle(options); - expect(consoleSpy).not.toHaveBeenCalled(); - }); + expect(next).toBe(1); + expect(idx).toBe(0); - it.each([ - [1, 2, 1], - [2, 3, 2], - [3, 4, 3], - [4, 5, 4], - [5, 6, 5], - ])( - 'should return the next option when `currentOption` is provided and not the last element', - (currentOption, nextOption, nextIdx) => { - const options = [1, 2, 3, 4, 5, 6]; + expect(consoleSpy).not.toHaveBeenCalled(); + }); - const [next, idx] = toggle(options, currentOption); + it.each([ + [1, 2, 1], + [2, 3, 2], + [3, 4, 3], + [4, 5, 4], + [5, 6, 5], + ])( + "should return the next option when `currentOption` is provided and not the last element", + (currentOption, nextOption, nextIdx) => { + const options = [1, 2, 3, 4, 5, 6]; - expect(next).toBe(nextOption); - expect(idx).toBe(nextIdx); + const [next, idx] = toggle(options, currentOption); - expect(consoleSpy).not.toHaveBeenCalled(); - } - ); + expect(next).toBe(nextOption); + expect(idx).toBe(nextIdx); - it('should wrap around and return the first option when `currentOption` is the last element', () => { - const options = [1, 2, 3, 4, 5, 6]; + expect(consoleSpy).not.toHaveBeenCalled(); + }, + ); - const [next, idx] = toggle(options, 6); + it("should wrap around and return the first option when `currentOption` is the last element", () => { + const options = [1, 2, 3, 4, 5, 6]; - expect(next).toBe(1); - expect(idx).toBe(0); + const [next, idx] = toggle(options, 6); - expect(consoleSpy).not.toHaveBeenCalled(); - }); + expect(next).toBe(1); + expect(idx).toBe(0); - it('should wrap around and return the first option when `currentOption` is the last element', () => { - const options = [1, 2, 3, 4, 5, 6]; + expect(consoleSpy).not.toHaveBeenCalled(); + }); - const [next, idx] = toggle(options, 6); + it("should wrap around and return the first option when `currentOption` is the last element", () => { + const options = [1, 2, 3, 4, 5, 6]; - expect(next).toBe(1); - expect(idx).toBe(0); + const [next, idx] = toggle(options, 6); - expect(consoleSpy).not.toHaveBeenCalled(); - }); + expect(next).toBe(1); + expect(idx).toBe(0); - it('should work with objects (by ref)', () => { - const options = [1, 2, 3, 4, 5, 6].map((id) => ({ id })); + expect(consoleSpy).not.toHaveBeenCalled(); + }); - const [next, idx] = toggle(options, options[1]); + it("should work with objects (by ref)", () => { + const options = [1, 2, 3, 4, 5, 6].map((id) => ({ id })); - expect(next).toStrictEqual({ id: 3 }); - expect(next).not.toBe({ id: 3 }); - expect(next).toBe(options[2]); - expect(idx).toBe(2); - }); + const [next, idx] = toggle(options, options[1]); - it('should return first element passing a copy of an option object (by ref)', () => { - const options = [1, 2, 3, 4, 5, 6].map((id) => ({ id })); + expect(next).toStrictEqual({ id: 3 }); + expect(next).not.toBe({ id: 3 }); + expect(next).toBe(options[2]); + expect(idx).toBe(2); + }); - const [next, idx] = toggle(options, { id: 2 }); + it("should return first element passing a copy of an option object (by ref)", () => { + const options = [1, 2, 3, 4, 5, 6].map((id) => ({ id })); - expect(next).toStrictEqual({ id: 1 }); - expect(next).not.toBe({ id: 1 }); - expect(next).toBe(options[0]); - expect(idx).toBe(0); + const [next, idx] = toggle(options, { id: 2 }); - expect(next).not.toStrictEqual({ id: 3 }); - expect(next).not.toBe({ id: 3 }); - expect(idx).not.toBe(2); - }); + expect(next).toStrictEqual({ id: 1 }); + expect(next).not.toBe({ id: 1 }); + expect(next).toBe(options[0]); + expect(idx).toBe(0); - it('should work when providing a `isEqual` function', () => { - const options = [1, 2, 3, 4, 5, 6].map((id) => ({ id })); + expect(next).not.toStrictEqual({ id: 3 }); + expect(next).not.toBe({ id: 3 }); + expect(idx).not.toBe(2); + }); - const [next, idx] = toggle(options, { id: 2 }, (a, b) => a.id === b.id); + it("should work when providing a `isEqual` function", () => { + const options = [1, 2, 3, 4, 5, 6].map((id) => ({ id })); - expect(next).toBe(options[2]); - expect(idx).toBe(2); - }); + const [next, idx] = toggle(options, { id: 2 }, (a, b) => a.id === b.id); - test('empty array', () => { - const options = [] as const; + expect(next).toBe(options[2]); + expect(idx).toBe(2); + }); - const [next, idx] = toggle(options); + test("empty array", () => { + const options = [] as const; - expect(next).toBeNull(); - expect(idx).toBe(-1); + const [next, idx] = toggle(options); - expect(consoleSpy).toHaveBeenCalledOnce(); - expect(consoleSpy).toHaveBeenCalledWith( - 'Array has no options to toggle' - ); - }); + expect(next).toBeNull(); + expect(idx).toBe(-1); + + expect(consoleSpy).toHaveBeenCalledOnce(); + expect(consoleSpy).toHaveBeenCalledWith("Array has no options to toggle"); + }); }); diff --git a/packages/utils/oxlint.config.ts b/packages/utils/oxlint.config.ts index 02cd98e..89d97ac 100644 --- a/packages/utils/oxlint.config.ts +++ b/packages/utils/oxlint.config.ts @@ -4,5 +4,9 @@ const config = createOxlintConfig({ jsdoc: true }); export default { ...config, - rules: { ...config.rules, "typescript/no-explicit-any": "off" }, + rules: { + ...config.rules, + "jsdoc/check-tag-names": "off", + "typescript/no-explicit-any": "off", + }, }; diff --git a/packages/utils/package.json b/packages/utils/package.json index a7d7543..246273d 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,36 +1,36 @@ { - "name": "@ylfjuk-core/utils", - "version": "0.0.10", - "author": "YLfjuk", - "type": "module", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/YLfjuk/core.git", - "directory": "packages/utils" - }, - "keywords": [ - "ylfjuk", - "core", - "utils" - ], - "files": [ - "dist" - ], - "types": "dist/index.d.ts", - "exports": { - ".": { - "@ylfjuk-core/dev.src": "./src/index.ts", - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - } - }, - "sideEffects": false, - "scripts": { - "build": "tsdown", - "dev": "tsdown --watch", - "test": "vitest run --typecheck", - "test:types": "tsc --noEmit", - "lint": "oxlint" - } + "name": "@ylfjuk-core/utils", + "version": "0.0.10", + "keywords": [ + "core", + "utils", + "ylfjuk" + ], + "license": "MIT", + "author": "YLfjuk", + "repository": { + "type": "git", + "url": "git+https://github.com/YLfjuk/core.git", + "directory": "packages/utils" + }, + "files": [ + "dist" + ], + "type": "module", + "sideEffects": false, + "types": "dist/index.d.ts", + "exports": { + ".": { + "@ylfjuk-core/dev.src": "./src/index.ts", + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } + }, + "scripts": { + "build": "tsdown", + "dev": "tsdown --watch", + "test": "vitest run --typecheck", + "test:types": "tsc --noEmit", + "lint": "oxlint" + } } diff --git a/packages/utils/src/assert-never.ts b/packages/utils/src/assert-never.ts index 8563edb..0d88053 100644 --- a/packages/utils/src/assert-never.ts +++ b/packages/utils/src/assert-never.ts @@ -3,9 +3,10 @@ * @since 0.0.2 */ export const assertNever = (_?: never): never => { - throw new Error(`Unexpected value: ${_}`); + throw new Error(`Unexpected value: ${_}`); }; assertNever.silent = (_?: never): void => { - console.error(`Unexpected value: ${_}`); + // oxlint-disable-next-line no-console -- preserves the existing diagnostic output. + console.error(`Unexpected value: ${_}`); }; diff --git a/packages/utils/src/bool.ts b/packages/utils/src/bool.ts index 8ab32e2..4b12d3d 100644 --- a/packages/utils/src/bool.ts +++ b/packages/utils/src/bool.ts @@ -1,4 +1,4 @@ -import type { Falsy } from '@ylfjuk-core/types'; +import type { Falsy } from "@ylfjuk-core/types"; /** * Type guard that checks if a value is truthy. diff --git a/packages/utils/src/infinite-object.ts b/packages/utils/src/infinite-object.ts index ee2d80e..d40559e 100644 --- a/packages/utils/src/infinite-object.ts +++ b/packages/utils/src/infinite-object.ts @@ -1,7 +1,7 @@ type InfiniteObject = { - [key: string]: InfiniteObject; - (...args: unknown[]): InfiniteObject; - new (...args: unknown[]): InfiniteObject; + [key: string]: InfiniteObject; + (...args: unknown[]): InfiniteObject; + new (...args: unknown[]): InfiniteObject; }; /** @@ -10,18 +10,18 @@ type InfiniteObject = { * @since 0.0.5 */ export const InfiniteObject: InfiniteObject = new Proxy( - class {} as InfiniteObject, - { - has: () => true, - set: () => true, - ownKeys: () => [], - get: () => InfiniteObject, - setPrototypeOf: () => true, - deleteProperty: () => true, - defineProperty: () => true, - apply: () => InfiniteObject, - construct: () => InfiniteObject, - getPrototypeOf: () => InfiniteObject, - getOwnPropertyDescriptor: () => undefined, - } + class {} as InfiniteObject, + { + has: () => true, + set: () => true, + ownKeys: () => [], + get: () => InfiniteObject, + setPrototypeOf: () => true, + deleteProperty: () => true, + defineProperty: () => true, + apply: () => InfiniteObject, + construct: () => InfiniteObject, + getPrototypeOf: () => InfiniteObject, + getOwnPropertyDescriptor: () => undefined, + }, ); diff --git a/packages/utils/src/is-defined.ts b/packages/utils/src/is-defined.ts index f7b13d3..753e776 100644 --- a/packages/utils/src/is-defined.ts +++ b/packages/utils/src/is-defined.ts @@ -4,4 +4,4 @@ * @since 0.0.1 */ export const isDefined = (value: unknown): value is NonNullable => - value != null; + value !== null && value !== undefined; diff --git a/packages/utils/src/json/index.ts b/packages/utils/src/json/index.ts index 67fbe00..02e4155 100644 --- a/packages/utils/src/json/index.ts +++ b/packages/utils/src/json/index.ts @@ -6,8 +6,4 @@ */ export * as Json from "./Json"; -export { - parse as jsonParse, - safeParse as jsonSafeParse, - stringify as jsonStringify, -} from "./Json"; +export { parse as jsonParse, safeParse as jsonSafeParse, stringify as jsonStringify } from "./Json"; diff --git a/packages/utils/src/json/parse.ts b/packages/utils/src/json/parse.ts index 4c42038..c657ebe 100644 --- a/packages/utils/src/json/parse.ts +++ b/packages/utils/src/json/parse.ts @@ -1,4 +1,5 @@ import type { ExtractLiteral, ToStr } from "@ylfjuk-core/types"; + import type { ExtractTupleLiteral, ReviverFN, diff --git a/packages/utils/src/json/safe-parse.ts b/packages/utils/src/json/safe-parse.ts index 6b07bee..5602938 100644 --- a/packages/utils/src/json/safe-parse.ts +++ b/packages/utils/src/json/safe-parse.ts @@ -1,4 +1,5 @@ import type { ExtractLiteral, Result, Success, ToStr } from "@ylfjuk-core/types"; + import { parse } from "./parse"; import type { ExtractTupleLiteral, diff --git a/packages/utils/src/json/stringify.ts b/packages/utils/src/json/stringify.ts index 4b8a63f..8b203f1 100644 --- a/packages/utils/src/json/stringify.ts +++ b/packages/utils/src/json/stringify.ts @@ -1,4 +1,5 @@ import type { FN, ToStr } from "@ylfjuk-core/types"; + import type { ReplacerFN, StringifiablePrimitive } from "./types/helpers"; type JsonStringify = { @@ -28,7 +29,11 @@ type JsonStringify = { * @param replacer Is not used in this case, so it is set to `never`. * @param spaceIs Is not used in this case, so it is set to `never`. */ - (value: T, replacer?: never, space?: never): ToStr; + ( + value: T, + replacer?: never, + space?: never, + ): ToStr; /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. diff --git a/packages/utils/src/json/types/helpers.ts b/packages/utils/src/json/types/helpers.ts index ef88472..ceb7134 100644 --- a/packages/utils/src/json/types/helpers.ts +++ b/packages/utils/src/json/types/helpers.ts @@ -5,20 +5,16 @@ export type StringifiableTuplePrimitive = | [StringifiablePrimitive | ToStr] | [StringifiableTuplePrimitive]; -export type ExtractTupleLiteral = - T[0] extends infer U - ? U extends StringifiableTuplePrimitive - ? ExtractTupleLiteral - : U extends StringifiablePrimitive - ? U - : U extends string - ? ExtractLiteral - : never - : never; +export type ExtractTupleLiteral = T[0] extends infer U + ? U extends StringifiableTuplePrimitive + ? ExtractTupleLiteral + : U extends StringifiablePrimitive + ? U + : U extends string + ? ExtractLiteral + : never + : never; -export type ReviverFN = FN< - R, - [key: K, value: T] ->; +export type ReviverFN = FN; export type ReplacerFN = FN; diff --git a/packages/utils/src/noop.ts b/packages/utils/src/noop.ts index c07fb87..e735440 100644 --- a/packages/utils/src/noop.ts +++ b/packages/utils/src/noop.ts @@ -1,4 +1,4 @@ -import type { FN } from '@ylfjuk-core/types'; +import type { FN } from "@ylfjuk-core/types"; /** * @description A no-operation function that does nothing. This is useful as a placeholder or default function diff --git a/packages/utils/src/obj/index.ts b/packages/utils/src/obj/index.ts index f62811e..6eb06cb 100644 --- a/packages/utils/src/obj/index.ts +++ b/packages/utils/src/obj/index.ts @@ -6,7 +6,4 @@ */ export * as Obj from "./Obj"; -export { - entries as entriesOf, - keys as keysOf, -} from "./Obj"; +export { entries as entriesOf, keys as keysOf } from "./Obj"; diff --git a/packages/utils/src/str/index.ts b/packages/utils/src/str/index.ts index 1f69b9d..ce17f60 100644 --- a/packages/utils/src/str/index.ts +++ b/packages/utils/src/str/index.ts @@ -6,7 +6,4 @@ */ export * as Str from "./Str"; -export { - endsWith as strEndsWith, - startsWith as strStartsWith, -} from "./Str"; +export { endsWith as strEndsWith, startsWith as strStartsWith } from "./Str"; diff --git a/packages/utils/src/toggle.ts b/packages/utils/src/toggle.ts index 8886bc2..16d9c33 100644 --- a/packages/utils/src/toggle.ts +++ b/packages/utils/src/toggle.ts @@ -1,4 +1,4 @@ -import type { FN, Maybe } from '@ylfjuk-core/types'; +import type { FN, Maybe } from "@ylfjuk-core/types"; /** * @@ -20,29 +20,29 @@ import type { FN, Maybe } from '@ylfjuk-core/types'; * @modified 0.0.7 {@breaking 💥} */ export const toggle = ( - options: ReadonlyArray, - currentOption?: NoInfer, - isEqual: FN = (a, b) => a === b + options: ReadonlyArray, + currentOption?: NoInfer, + isEqual: FN = (a, b) => a === b, ): [Maybe, number] => { - if (!options.length) { - console.warn('Array has no options to toggle'); - return [null, -1]; - } + if (!options.length) { + // oxlint-disable-next-line no-console -- preserves the existing diagnostic output. + console.warn("Array has no options to toggle"); + return [null, -1]; + } - if (!currentOption) return [options[0], 0]; + if (!currentOption) return [options[0], 0]; - const currentIdx = options.findIndex((option) => - isEqual(option, currentOption) - ); + const currentIdx = options.findIndex((option) => isEqual(option, currentOption)); - if (currentIdx === -1) { - console.warn( - '`currentOption` was not found in `options` array. defaulting to the first option' - ); - } + if (currentIdx === -1) { + // oxlint-disable-next-line no-console -- preserves the existing diagnostic output. + console.warn( + "`currentOption` was not found in `options` array. defaulting to the first option", + ); + } - const nextIdx = (currentIdx + 1) % options.length; - const nextOption = options[nextIdx]; + const nextIdx = (currentIdx + 1) % options.length; + const nextOption = options[nextIdx]; - return [nextOption, nextIdx]; + return [nextOption, nextIdx]; }; diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 61f3a45..a06ebfb 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "@ylfjuk/tsconfigs/lib", - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "moduleResolution": "bundler", - "isolatedDeclarations": false - }, - "include": ["src"] + "extends": "@ylfjuk/tsconfigs/lib", + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "bundler", + "isolatedDeclarations": false + }, + "include": ["src"] } diff --git a/packages/utils/tsup.config.ts b/packages/utils/tsup.config.ts index fa0cd8a..39b7bb7 100644 --- a/packages/utils/tsup.config.ts +++ b/packages/utils/tsup.config.ts @@ -1,12 +1,12 @@ -import { defineConfig } from 'tsup'; +import { defineConfig } from "tsup"; export default defineConfig((options) => ({ - minify: !options.watch, - entry: ['src/index.ts'], - target: 'es2020', - sourcemap: true, - dts: true, - shims: true, - injectStyle: true, - format: ['esm', 'cjs'], + minify: !options.watch, + entry: ["src/index.ts"], + target: "es2020", + sourcemap: true, + dts: true, + shims: true, + injectStyle: true, + format: ["esm", "cjs"], })); diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 9b772b4..75e6938 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,4 @@ packages: - - apps/* - - packages/* - - playground/* + - apps/* + - packages/* + - playground/* diff --git a/turbo.json b/turbo.json index 65ec6fc..97e3f34 100644 --- a/turbo.json +++ b/turbo.json @@ -1,39 +1,24 @@ { - "$schema": "https://turbo.build/schema.json", - "ui": "tui", - "tasks": { - "dev": { - "cache": false, - "persistent": true - }, - "build": { - "dependsOn": [ - "^build" - ], - "outputs": [ - "dist/**" - ] - }, - "test": { - "with": [ - "test:types" - ], - "dependsOn": [ - "^test:types", - "^test", - "^build" - ] - }, - "test:types": { - "dependsOn": [ - "^test:types", - "^build" - ] - }, - "lint": { - "dependsOn": [ - "^lint" - ] - } - } -} \ No newline at end of file + "$schema": "https://turbo.build/schema.json", + "ui": "tui", + "tasks": { + "dev": { + "cache": false, + "persistent": true + }, + "build": { + "dependsOn": ["^build"], + "outputs": ["dist/**"] + }, + "test": { + "with": ["test:types"], + "dependsOn": ["^test:types", "^test", "^build"] + }, + "test:types": { + "dependsOn": ["^test:types", "^build"] + }, + "lint": { + "dependsOn": ["^lint"] + } + } +} From 81950fcb0b2c1656455951138abf7d382d0371f8 Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Sun, 23 Aug 2026 22:23:16 +0300 Subject: [PATCH 3/8] chore: modernize typescript and vitest setup --- packages/core/tsconfig.json | 8 +--- packages/core/vitest.config.ts | 18 +++++++- packages/types/tsconfig.json | 8 +--- packages/types/vitest.config.ts | 18 +++++++- packages/utils/__tests__/arr/includes.spec.ts | 2 +- .../utils/__tests__/infinite-object.spec.ts | 14 +++++++ packages/utils/__tests__/json/parse.spec.ts | 40 ++++++++++++++---- .../utils/__tests__/json/safe-parse.spec.ts | 42 +++++++++++++++---- .../utils/__tests__/json/stringify.spec.ts | 38 +++++++++++++---- .../utils/__tests__/obj/entries-of.spec.ts | 31 ++++++++++---- packages/utils/__tests__/obj/keys-of.spec.ts | 22 ++++++++-- .../utils/__tests__/str/ends-with.spec.ts | 21 +++++++++- .../utils/__tests__/str/starts-with.spec.ts | 21 +++++++++- packages/utils/src/infinite-object.ts | 4 +- packages/utils/src/json/stringify.ts | 2 +- packages/utils/tsconfig.json | 8 +--- packages/utils/vitest.config.ts | 18 +++++++- tsconfig.base.json | 10 +++++ turbo.json | 4 +- vitest.config.ts | 18 ++++++++ 20 files changed, 282 insertions(+), 65 deletions(-) create mode 100644 tsconfig.base.json diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 10e4c5e..9e5fc68 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,10 +1,4 @@ { - "extends": "@ylfjuk/tsconfigs/lib", - "compilerOptions": { - "target": "ES2018", - "module": "ESNext", - "moduleResolution": "bundler", - "isolatedDeclarations": false - }, + "extends": "../../tsconfig.base.json", "include": ["src"] } diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts index d7b613c..25cb7e5 100644 --- a/packages/core/vitest.config.ts +++ b/packages/core/vitest.config.ts @@ -1,3 +1,19 @@ import { defineProject } from "vitest/config"; -export default defineProject({}); +import baseTsconfig from "../../tsconfig.base.json" with { type: "json" }; + +const { + compilerOptions: { customConditions: conditions }, +} = baseTsconfig; + +export default defineProject({ + resolve: { + conditions, + }, + ssr: { + resolve: { + conditions, + externalConditions: conditions, + }, + }, +}); diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index a06ebfb..9e5fc68 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,10 +1,4 @@ { - "extends": "@ylfjuk/tsconfigs/lib", - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "moduleResolution": "bundler", - "isolatedDeclarations": false - }, + "extends": "../../tsconfig.base.json", "include": ["src"] } diff --git a/packages/types/vitest.config.ts b/packages/types/vitest.config.ts index d7b613c..25cb7e5 100644 --- a/packages/types/vitest.config.ts +++ b/packages/types/vitest.config.ts @@ -1,3 +1,19 @@ import { defineProject } from "vitest/config"; -export default defineProject({}); +import baseTsconfig from "../../tsconfig.base.json" with { type: "json" }; + +const { + compilerOptions: { customConditions: conditions }, +} = baseTsconfig; + +export default defineProject({ + resolve: { + conditions, + }, + ssr: { + resolve: { + conditions, + externalConditions: conditions, + }, + }, +}); diff --git a/packages/utils/__tests__/arr/includes.spec.ts b/packages/utils/__tests__/arr/includes.spec.ts index f823f1c..c7ce6d2 100644 --- a/packages/utils/__tests__/arr/includes.spec.ts +++ b/packages/utils/__tests__/arr/includes.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it, test } from "vitest"; -import { arrIncludes } from "../../src/arr/includes"; +import { includes as arrIncludes } from "../../src/arr/includes"; describe("arr/includes", () => { test.each([ diff --git a/packages/utils/__tests__/infinite-object.spec.ts b/packages/utils/__tests__/infinite-object.spec.ts index c6de4b3..964edf2 100644 --- a/packages/utils/__tests__/infinite-object.spec.ts +++ b/packages/utils/__tests__/infinite-object.spec.ts @@ -37,4 +37,18 @@ describe("Object that can be accessed ad infinitum", () => { expect(actual).toBe(expected); }); + + it("accepts object mutations", () => { + expect("anything" in InfiniteObject).toBe(true); + expect(Reflect.set(InfiniteObject, "value", 1)).toBe(true); + expect(Reflect.deleteProperty(InfiniteObject, "value")).toBe(true); + expect(Reflect.defineProperty(InfiniteObject, "value", { value: 1 })).toBe(true); + expect(Reflect.setPrototypeOf(InfiniteObject, null)).toBe(true); + }); + + it("has no enumerable own properties", () => { + expect(Reflect.ownKeys(InfiniteObject)).toStrictEqual([]); + expect(Reflect.getOwnPropertyDescriptor(InfiniteObject, "value")).toBeUndefined(); + expect(Reflect.getPrototypeOf(InfiniteObject)).toBe(InfiniteObject); + }); }); diff --git a/packages/utils/__tests__/json/parse.spec.ts b/packages/utils/__tests__/json/parse.spec.ts index c24fea4..47d1849 100644 --- a/packages/utils/__tests__/json/parse.spec.ts +++ b/packages/utils/__tests__/json/parse.spec.ts @@ -1,11 +1,37 @@ -import { describe, it } from "vitest"; +import { describe, expect, expectTypeOf, it } from "vitest"; + +import { parse as jsonParse } from "../../src/json/parse"; describe("json/parse", () => { - it.todo("should parse JSON strings into objects with type safety"); - it.todo("should handle primitive types and string literals correctly"); - it.todo("should support reviver functions for custom transformations"); - it.todo("should throw SyntaxError for invalid JSON strings"); - it.todo("should handle null input gracefully"); + it("parses objects", () => { + expect(jsonParse('{"name":"Ada"}')).toStrictEqual({ name: "Ada" }); + }); + + it.each([ + ["true", true], + ["42", 42], + ['"value"', "value"], + ] as const)("preserves the literal type of %s", (text, expected) => { + expect(jsonParse(text)).toBe(expected); + }); + + it("supports revivers", () => { + const actual = jsonParse('{"createdAt":"2026-08-23"}', (key, value) => + key === "createdAt" ? new Date(value) : value, + ); + + expect(actual).toStrictEqual({ createdAt: new Date("2026-08-23") }); + }); + + it("throws for invalid JSON", () => { + expect(() => jsonParse("{")).toThrow(SyntaxError); + }); + + it("handles null", () => { + expect(jsonParse(null)).toBeNull(); + }); - // TODO: add type tests + expectTypeOf(jsonParse("true")).toEqualTypeOf(); + expectTypeOf(jsonParse("42")).toEqualTypeOf<42>(); + expectTypeOf(jsonParse(null)).toEqualTypeOf(); }); diff --git a/packages/utils/__tests__/json/safe-parse.spec.ts b/packages/utils/__tests__/json/safe-parse.spec.ts index 7f0f4d1..cc094aa 100644 --- a/packages/utils/__tests__/json/safe-parse.spec.ts +++ b/packages/utils/__tests__/json/safe-parse.spec.ts @@ -1,10 +1,38 @@ -import { describe, it } from "vitest"; +import { describe, expect, expectTypeOf, it } from "vitest"; + +import { safeParse as jsonSafeParse } from "../../src/json/safe-parse"; describe("json/safe-parse", () => { - it.todo("should safely parse JSON strings into objects with type safety"); - it.todo("should handle primitive types and string literals correctly"); - it.todo("should support reviver functions for custom transformations"); - it.todo("should return null for invalid JSON strings instead of throwing an error"); - it.todo("should handle null input gracefully"); - // TODO: add type tests + it("returns parsed data on success", () => { + expect(jsonSafeParse('{"name":"Ada"}')).toStrictEqual({ + success: true, + data: { name: "Ada" }, + }); + }); + + it("preserves primitive literal types", () => { + const result = jsonSafeParse("42"); + + expect(result).toStrictEqual({ success: true, data: 42 }); + expectTypeOf(result.data).toEqualTypeOf<42>(); + }); + + it("supports revivers", () => { + const result = jsonSafeParse("42", (_key, value) => value * 2); + + expect(result).toStrictEqual({ success: true, data: 84 }); + }); + + it("returns the parsing error on failure", () => { + const result = jsonSafeParse("{"); + + expect(result.success).toBe(false); + if (result.success) return; + + expect(result.reason).toBeInstanceOf(SyntaxError); + }); + + it("handles null", () => { + expect(jsonSafeParse(null)).toStrictEqual({ success: true, data: null }); + }); }); diff --git a/packages/utils/__tests__/json/stringify.spec.ts b/packages/utils/__tests__/json/stringify.spec.ts index f7d8bc5..ded4e43 100644 --- a/packages/utils/__tests__/json/stringify.spec.ts +++ b/packages/utils/__tests__/json/stringify.spec.ts @@ -1,11 +1,35 @@ -import { describe, it } from "vitest"; +import { describe, expect, expectTypeOf, it } from "vitest"; + +import { stringify as jsonStringify } from "../../src/json/stringify"; describe("json/stringify", () => { - it.todo("should convert JavaScript values to JSON strings with type safety"); - it.todo("should handle undefined, symbol, and function values correctly"); - it.todo("should support replacer functions for custom serialization"); - it.todo("should handle arrays and objects with circular references gracefully"); - it.todo("should format JSON strings with indentation when space is provided"); + it("serializes values", () => { + expect(jsonStringify({ name: "Ada", active: true })).toBe('{"name":"Ada","active":true}'); + }); + + it.each([undefined, Symbol(), () => undefined])("returns undefined for %s", (value) => { + expect(jsonStringify(value)).toBeUndefined(); + }); + + it("forwards replacers", () => { + const actual = jsonStringify({ keep: 1, remove: 2 }, (key, value) => + key === "remove" ? undefined : value, + ); + + expect(actual).toBe('{"keep":1}'); + }); + + it("throws for circular values", () => { + const value: { self?: unknown } = {}; + value.self = value; + + expect(() => jsonStringify(value)).toThrow(TypeError); + }); + + it("forwards indentation", () => { + expect(jsonStringify({ value: 1 }, null, 2)).toBe('{\n "value": 1\n}'); + }); - // TODO: add type tests + expectTypeOf(jsonStringify(42)).toEqualTypeOf<"42">(); + expectTypeOf(jsonStringify(undefined)).toEqualTypeOf(); }); diff --git a/packages/utils/__tests__/obj/entries-of.spec.ts b/packages/utils/__tests__/obj/entries-of.spec.ts index 885477d..e3c11bc 100644 --- a/packages/utils/__tests__/obj/entries-of.spec.ts +++ b/packages/utils/__tests__/obj/entries-of.spec.ts @@ -1,11 +1,26 @@ -import { describe, it } from "vitest"; +import { describe, expect, expectTypeOf, it } from "vitest"; + +import { entries as entriesOf } from "../../src/obj/entries"; describe("obj/entriesOf", () => { - it.todo("should return entries of object"); - it.todo("should return empty array for empty object"); - it.todo("should return entries of object with different types"); - it.todo("should handle nested objects"); - it.todo("should handle arrays as values"); - it.todo("should handle objects with non-enumerable properties"); - it.todo("should handle objects with symbols as keys"); + it("returns typed entries", () => { + const actual = entriesOf({ name: "Ada", active: true } as const); + + expect(actual).toStrictEqual([ + ["name", "Ada"], + ["active", true], + ]); + expectTypeOf(actual).toEqualTypeOf<(["name", "Ada"] | ["active", true])[]>(); + }); + + it("returns an empty array for an empty object", () => { + expect(entriesOf({})).toStrictEqual([]); + }); + + it("follows Object.entries enumeration", () => { + const symbol = Symbol("symbol"); + const value = Object.defineProperty({ visible: 1, [symbol]: 2 }, "hidden", { value: 3 }); + + expect(entriesOf(value)).toStrictEqual([["visible", 1]]); + }); }); diff --git a/packages/utils/__tests__/obj/keys-of.spec.ts b/packages/utils/__tests__/obj/keys-of.spec.ts index d9efa73..bebf82f 100644 --- a/packages/utils/__tests__/obj/keys-of.spec.ts +++ b/packages/utils/__tests__/obj/keys-of.spec.ts @@ -1,6 +1,22 @@ -import { describe, it } from "vitest"; +import { describe, expect, expectTypeOf, it } from "vitest"; + +import { keys as keysOf } from "../../src/obj/keys"; describe("obj/keysOf", () => { - it.todo("should return entries of object"); - it.todo("should return the exact keys instead of string"); + it("returns exact keys", () => { + const actual = keysOf({ name: "Ada", active: true }); + + expect(actual).toStrictEqual(["name", "active"]); + expectTypeOf(actual).toEqualTypeOf<("name" | "active")[]>(); + }); + + it("returns an empty array for an empty object", () => { + expect(keysOf({})).toStrictEqual([]); + }); + + it("ignores symbols", () => { + const symbol = Symbol("symbol"); + + expect(keysOf({ [symbol]: "symbol" })).toStrictEqual([]); + }); }); diff --git a/packages/utils/__tests__/str/ends-with.spec.ts b/packages/utils/__tests__/str/ends-with.spec.ts index f6ffeb0..c37ea85 100644 --- a/packages/utils/__tests__/str/ends-with.spec.ts +++ b/packages/utils/__tests__/str/ends-with.spec.ts @@ -1,3 +1,20 @@ -import { describe } from "vitest"; +import { describe, expect, expectTypeOf, it } from "vitest"; -describe.todo("str/endsWith"); +import { endsWith as strEndsWith } from "../../src/str/ends-with"; + +describe("str/endsWith", () => { + it.each([ + ["value.json", ".json", true], + ["value.txt", ".json", false], + ] as const)("checks whether %s ends with %s", (value, suffix, expected) => { + expect(strEndsWith(value, suffix)).toBe(expected); + }); + + it("narrows matching strings", () => { + const value: string = "value.json"; + + if (!strEndsWith(value, ".json")) return; + + expectTypeOf(value).toEqualTypeOf<`${string}.json`>(); + }); +}); diff --git a/packages/utils/__tests__/str/starts-with.spec.ts b/packages/utils/__tests__/str/starts-with.spec.ts index a8477de..b7a862f 100644 --- a/packages/utils/__tests__/str/starts-with.spec.ts +++ b/packages/utils/__tests__/str/starts-with.spec.ts @@ -1,3 +1,20 @@ -import { describe } from "vitest"; +import { describe, expect, expectTypeOf, it } from "vitest"; -describe.todo("str/startsWith"); +import { startsWith as strStartsWith } from "../../src/str/starts-with"; + +describe("str/startsWith", () => { + it.each([ + ["prefix-value", "prefix-", true], + ["value", "prefix-", false], + ] as const)("checks whether %s starts with %s", (value, prefix, expected) => { + expect(strStartsWith(value, prefix)).toBe(expected); + }); + + it("narrows matching strings", () => { + const value: string = "prefix-value"; + + if (!strStartsWith(value, "prefix-")) return; + + expectTypeOf(value).toEqualTypeOf<`prefix-${string}`>(); + }); +}); diff --git a/packages/utils/src/infinite-object.ts b/packages/utils/src/infinite-object.ts index d40559e..35945f9 100644 --- a/packages/utils/src/infinite-object.ts +++ b/packages/utils/src/infinite-object.ts @@ -10,7 +10,9 @@ type InfiniteObject = { * @since 0.0.5 */ export const InfiniteObject: InfiniteObject = new Proxy( - class {} as InfiniteObject, + // Bound functions have no non-configurable `prototype`, keeping the `ownKeys` trap valid. + // oxlint-disable-next-line no-extra-bind + function () {}.bind(null) as InfiniteObject, { has: () => true, set: () => true, diff --git a/packages/utils/src/json/stringify.ts b/packages/utils/src/json/stringify.ts index 8b203f1..3ca70b5 100644 --- a/packages/utils/src/json/stringify.ts +++ b/packages/utils/src/json/stringify.ts @@ -132,4 +132,4 @@ type JsonStringify = { * @since 0.0.9 * @modified 0.0.10 */ -export const stringify = ((value: unknown) => JSON.stringify(value)) as JsonStringify; +export const stringify = JSON.stringify as JsonStringify; diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index a06ebfb..9e5fc68 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,10 +1,4 @@ { - "extends": "@ylfjuk/tsconfigs/lib", - "compilerOptions": { - "target": "ES2020", - "module": "ESNext", - "moduleResolution": "bundler", - "isolatedDeclarations": false - }, + "extends": "../../tsconfig.base.json", "include": ["src"] } diff --git a/packages/utils/vitest.config.ts b/packages/utils/vitest.config.ts index d7b613c..25cb7e5 100644 --- a/packages/utils/vitest.config.ts +++ b/packages/utils/vitest.config.ts @@ -1,3 +1,19 @@ import { defineProject } from "vitest/config"; -export default defineProject({}); +import baseTsconfig from "../../tsconfig.base.json" with { type: "json" }; + +const { + compilerOptions: { customConditions: conditions }, +} = baseTsconfig; + +export default defineProject({ + resolve: { + conditions, + }, + ssr: { + resolve: { + conditions, + externalConditions: conditions, + }, + }, +}); diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..052a70c --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,10 @@ +{ + "extends": "@ylfjuk/tsconfigs/lib", + "compilerOptions": { + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "bundler", + "isolatedDeclarations": false, + "customConditions": ["@ylfjuk-core/dev.src"] + } +} diff --git a/turbo.json b/turbo.json index 97e3f34..a20982e 100644 --- a/turbo.json +++ b/turbo.json @@ -12,10 +12,10 @@ }, "test": { "with": ["test:types"], - "dependsOn": ["^test:types", "^test", "^build"] + "dependsOn": ["^test:types", "^test"] }, "test:types": { - "dependsOn": ["^test:types", "^build"] + "dependsOn": ["^test:types"] }, "lint": { "dependsOn": ["^lint"] diff --git a/vitest.config.ts b/vitest.config.ts index 3664c91..4ebeb99 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,7 +1,25 @@ import { defineConfig } from "vitest/config"; +import baseTsconfig from "./tsconfig.base.json" with { type: "json" }; + +const { + compilerOptions: { customConditions: conditions }, +} = baseTsconfig; + export default defineConfig({ + resolve: { + conditions, + }, + ssr: { + resolve: { + conditions, + externalConditions: conditions, + }, + }, test: { + coverage: { + include: ["packages/core/src/**/*.ts", "packages/utils/src/**/*.ts"], + }, projects: ["apps/*", "packages/*", "playground/*"], }, }); From 1b4bbecfe04489686ff80d183fd3d22aa22c09bf Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Sun, 23 Aug 2026 23:31:08 +0300 Subject: [PATCH 4/8] chore: migrate package builds to tsdown --- package.json | 2 ++ packages/core/tsdown.config.ts | 12 ++++++++ packages/core/tsup.config.ts | 12 -------- packages/utils/package.json | 3 ++ packages/utils/tsdown.config.ts | 12 ++++++++ packages/utils/tsup.config.ts | 12 -------- pnpm-lock.yaml | 51 +++++++++++++++++++++++++++++++-- 7 files changed, 77 insertions(+), 27 deletions(-) create mode 100644 packages/core/tsdown.config.ts delete mode 100644 packages/core/tsup.config.ts create mode 100644 packages/utils/tsdown.config.ts delete mode 100644 packages/utils/tsup.config.ts diff --git a/package.json b/package.json index 8499a5b..38268e8 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ }, "devDependencies": { "@arethetypeswrong/cli": "^0.18.2", + "@arethetypeswrong/core": "^0.18.1", "@changesets/cli": "^3.0.1", "@vitest/coverage-v8": "^4.1.11", "@vitest/ui": "^4.1.11", @@ -38,6 +39,7 @@ "knip": "^6.31.0", "oxfmt": "^0.61.0", "oxlint": "^1.77.0", + "publint": "^0.3.8", "tsdown": "^0.22.14", "turbo": "^2.10.10", "typescript": "^7.0.2", diff --git a/packages/core/tsdown.config.ts b/packages/core/tsdown.config.ts new file mode 100644 index 0000000..f1e0433 --- /dev/null +++ b/packages/core/tsdown.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from "tsdown"; + +export default defineConfig({ + attw: { + profile: "esm-only", + }, + entry: ["src/index.ts"], + fixedExtension: false, + publint: true, + sourcemap: true, + target: "es2024", +}); diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts deleted file mode 100644 index 39b7bb7..0000000 --- a/packages/core/tsup.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig } from "tsup"; - -export default defineConfig((options) => ({ - minify: !options.watch, - entry: ["src/index.ts"], - target: "es2020", - sourcemap: true, - dts: true, - shims: true, - injectStyle: true, - format: ["esm", "cjs"], -})); diff --git a/packages/utils/package.json b/packages/utils/package.json index 246273d..8e11fc8 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -32,5 +32,8 @@ "test": "vitest run --typecheck", "test:types": "tsc --noEmit", "lint": "oxlint" + }, + "dependencies": { + "@ylfjuk-core/types": "workspace:*" } } diff --git a/packages/utils/tsdown.config.ts b/packages/utils/tsdown.config.ts new file mode 100644 index 0000000..f1e0433 --- /dev/null +++ b/packages/utils/tsdown.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from "tsdown"; + +export default defineConfig({ + attw: { + profile: "esm-only", + }, + entry: ["src/index.ts"], + fixedExtension: false, + publint: true, + sourcemap: true, + target: "es2024", +}); diff --git a/packages/utils/tsup.config.ts b/packages/utils/tsup.config.ts deleted file mode 100644 index 39b7bb7..0000000 --- a/packages/utils/tsup.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig } from "tsup"; - -export default defineConfig((options) => ({ - minify: !options.watch, - entry: ["src/index.ts"], - target: "es2020", - sourcemap: true, - dts: true, - shims: true, - injectStyle: true, - format: ["esm", "cjs"], -})); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc4d552..a494c55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@arethetypeswrong/cli': specifier: ^0.18.2 version: 0.18.5 + '@arethetypeswrong/core': + specifier: ^0.18.1 + version: 0.18.5 '@changesets/cli': specifier: ^3.0.1 version: 3.0.1 @@ -38,9 +41,12 @@ importers: oxlint: specifier: ^1.77.0 version: 1.79.0 + publint: + specifier: ^0.3.8 + version: 0.3.24 tsdown: specifier: ^0.22.14 - version: 0.22.14(@arethetypeswrong/core@0.18.5)(oxc-resolver@11.24.2)(typescript@7.0.2) + version: 0.22.14(@arethetypeswrong/core@0.18.5)(oxc-resolver@11.24.2)(publint@0.3.24)(typescript@7.0.2) turbo: specifier: ^2.10.10 version: 2.10.11 @@ -66,7 +72,11 @@ importers: specifier: ^7.0.2 version: 7.0.2 - packages/utils: {} + packages/utils: + dependencies: + '@ylfjuk-core/types': + specifier: workspace:* + version: link:../types packages: @@ -702,6 +712,10 @@ packages: '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} + '@publint/pack@0.1.7': + resolution: {integrity: sha512-4EDEmvxWtgsCnnVeBvtFIFZtUhPPt1+bA9JrSwU4Sa//6oKtzCSlGGXYJr44OD9aGISymbieJ4mCKHUygUDU+g==} + engines: {node: '>=18'} + '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} @@ -1497,6 +1511,10 @@ packages: engines: {node: '>= 16'} hasBin: true + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} @@ -1580,6 +1598,11 @@ packages: resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} engines: {node: ^10 || ^12 || >=14} + publint@0.3.24: + resolution: {integrity: sha512-9zS56KrKBoqi5Qt8h92uMP8TTM9AYZSgnmCo4u2priMqkOZvQnTsziZ2p5LJ2ywbYkAjoCDp2jda9u4cgFefIw==} + engines: {node: '>=18'} + hasBin: true + quansync@1.0.0: resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==} @@ -1614,6 +1637,10 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + semver@7.8.5: resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} engines: {node: '>=10'} @@ -2353,6 +2380,10 @@ snapshots: '@polka/url@1.0.0-next.29': {} + '@publint/pack@0.1.7': + dependencies: + tinyexec: 1.3.0 + '@quansync/fs@1.0.0': dependencies: quansync: 1.0.0 @@ -2922,6 +2953,8 @@ snapshots: marked@9.1.6: {} + mri@1.2.0: {} + mrmime@2.0.1: {} mz@2.7.0: @@ -3057,6 +3090,13 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + publint@0.3.24: + dependencies: + '@publint/pack': 0.1.7 + package-manager-detector: 1.8.0 + picocolors: 1.1.1 + sade: 1.8.1 + quansync@1.0.0: {} require-directory@2.1.1: {} @@ -3098,6 +3138,10 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.2.5 '@rolldown/binding-win32-x64-msvc': 1.2.5 + sade@1.8.1: + dependencies: + mri: 1.2.0 + semver@7.8.5: {} shell-quote@1.10.0: {} @@ -3170,7 +3214,7 @@ snapshots: tree-kill@1.2.2: {} - tsdown@0.22.14(@arethetypeswrong/core@0.18.5)(oxc-resolver@11.24.2)(typescript@7.0.2): + tsdown@0.22.14(@arethetypeswrong/core@0.18.5)(oxc-resolver@11.24.2)(publint@0.3.24)(typescript@7.0.2): dependencies: ansis: 4.3.1 cac: 7.0.0 @@ -3189,6 +3233,7 @@ snapshots: verkit: 0.3.2 optionalDependencies: '@arethetypeswrong/core': 0.18.5 + publint: 0.3.24 typescript: 7.0.2 transitivePeerDependencies: - '@typescript/native-preview' From 6c2dedf5c4a5a0562164379af7cf24e01760d6ac Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Mon, 24 Aug 2026 00:09:53 +0300 Subject: [PATCH 5/8] chore: complete documentation and release modernization --- .changeset/README.md | 7 +- .changeset/modernize-core-package.md | 7 ++ .changeset/modernize-types-package.md | 7 ++ .changeset/modernize-utils-package.md | 7 ++ .github/workflows/release.yml | 40 ++++---- .github/workflows/validation.yml | 55 +++++++++++ README.md | 32 ++++++- oxlint.config.ts | 5 +- packages/core/README.md | 21 ++++- packages/types/README.md | 18 +++- packages/types/oxlint.config.ts | 2 +- packages/types/package.json | 2 +- packages/types/src/array-of-n.ts | 3 +- packages/types/src/at-least-one.ts | 2 +- packages/types/src/deep-dict.ts | 4 +- packages/types/src/equals.ts | 11 ++- packages/types/src/exactly-one.ts | 2 +- packages/types/src/extend.ts | 1 - packages/types/src/extends.ts | 10 +- packages/types/src/extract-literal.ts | 7 +- packages/types/src/extract-values.ts | 8 +- packages/types/src/falsy.ts | 2 +- packages/types/src/fn.ts | 10 +- packages/types/src/has-duplicates.ts | 4 +- packages/types/src/if.ts | 2 +- packages/types/src/increment.ts | 8 +- packages/types/src/index.ts | 110 +++++++++++----------- packages/types/src/is-disjoint-union.ts | 4 +- packages/types/src/is-positive-or-zero.ts | 8 +- packages/types/src/join.ts | 6 +- packages/types/src/key-path.ts | 2 +- packages/types/src/keyof-union.ts | 2 +- packages/types/src/last-of-union.ts | 4 +- packages/types/src/less-than-equal.ts | 9 +- packages/types/src/less-than.ts | 11 +-- packages/types/src/mapped-enum.ts | 2 +- packages/types/src/mask-dates.ts | 6 +- packages/types/src/mask-literals.ts | 12 +-- packages/types/src/non-optional.ts | 7 +- packages/types/src/omit-by.ts | 4 +- packages/types/src/omit-functions.ts | 6 +- packages/types/src/partial-deep.ts | 5 +- packages/types/src/patch-union.ts | 8 +- packages/types/src/pick-by.ts | 2 +- packages/types/src/pick-optional.ts | 4 +- packages/types/src/prettify.ts | 6 +- packages/types/src/primitive.ts | 1 - packages/types/src/replace.ts | 2 +- packages/types/src/result.ts | 11 +-- packages/types/src/reverse.ts | 4 +- packages/types/src/safe-record.ts | 2 +- packages/types/src/stringifiable.ts | 4 +- packages/types/src/suggest-str.ts | 6 +- packages/types/src/suggest.ts | 4 +- packages/types/src/to-str.ts | 4 +- packages/types/src/union-to-tuple.ts | 4 +- packages/types/src/value-of.ts | 1 - packages/types/src/whatever.ts | 9 +- packages/utils/README.md | 18 +++- packages/utils/oxlint.config.ts | 2 +- packages/utils/src/arr/includes.ts | 3 +- packages/utils/src/arr/index.ts | 1 - packages/utils/src/bool.ts | 2 +- packages/utils/src/enum/to-tuple.ts | 2 +- packages/utils/src/infinite-object.ts | 2 +- packages/utils/src/is-defined.ts | 2 +- packages/utils/src/json/index.ts | 1 - packages/utils/src/json/parse.ts | 3 +- packages/utils/src/json/safe-parse.ts | 1 - packages/utils/src/json/stringify.ts | 3 +- packages/utils/src/noop.ts | 2 +- packages/utils/src/obj/entries.ts | 3 +- packages/utils/src/obj/index.ts | 1 - packages/utils/src/obj/keys.ts | 3 +- packages/utils/src/str/ends-with.ts | 3 +- packages/utils/src/str/index.ts | 1 - packages/utils/src/str/starts-with.ts | 3 +- packages/utils/src/toggle.ts | 5 +- 78 files changed, 356 insertions(+), 252 deletions(-) create mode 100644 .changeset/modernize-core-package.md create mode 100644 .changeset/modernize-types-package.md create mode 100644 .changeset/modernize-utils-package.md create mode 100644 .github/workflows/validation.yml diff --git a/.changeset/README.md b/.changeset/README.md index e5b6d8d..295db23 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -1,8 +1,5 @@ # Changesets -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets) +Run `pnpm run plan` and describe each user-visible package change. Commit the generated changeset with the code it describes. -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) +On `main`, the release workflow uses Changesets to maintain a release pull request. Merging that pull request publishes changed public packages through npm trusted publishing. diff --git a/.changeset/modernize-core-package.md b/.changeset/modernize-core-package.md new file mode 100644 index 0000000..5580ed4 --- /dev/null +++ b/.changeset/modernize-core-package.md @@ -0,0 +1,7 @@ +--- +"@ylfjuk/core": patch +--- + +- Re-export `Func` as an alias for `FN`. +- Include corrected `InfiniteObject` reflection behavior and complete `JSON.stringify` argument forwarding. +- Modernize ESM package documentation. diff --git a/.changeset/modernize-types-package.md b/.changeset/modernize-types-package.md new file mode 100644 index 0000000..32bb3d0 --- /dev/null +++ b/.changeset/modernize-types-package.md @@ -0,0 +1,7 @@ +--- +"@ylfjuk-core/types": patch +--- + +- Add `Func` as an alias for `FN`. +- Support Node-compatible ESM resolution for published type imports. +- Modernize ESM API documentation. diff --git a/.changeset/modernize-utils-package.md b/.changeset/modernize-utils-package.md new file mode 100644 index 0000000..a077543 --- /dev/null +++ b/.changeset/modernize-utils-package.md @@ -0,0 +1,7 @@ +--- +"@ylfjuk-core/utils": patch +--- + +- Preserve `replacer` and `space` arguments in the typed `JSON.stringify` wrapper. +- Keep `InfiniteObject` callable and constructable without violating JavaScript reflection invariants. +- Modernize ESM API documentation. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index baf6976..0c4e70f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,31 +13,31 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + pull-requests: write id-token: write steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - - name: Setup Node.js 20.x - uses: actions/setup-node@v3 + - name: Checkout repository + uses: actions/checkout@v7 with: - node-version: 20.x + fetch-depth: 0 + + - name: Set up pnpm + uses: pnpm/action-setup@v6 - - name: Install Dependencies - run: npm i + - name: Set up Node.js + uses: actions/setup-node@v7 + with: + node-version: 24 + registry-url: https://registry.npmjs.org + package-manager-cache: false - - name: Install Optional Dependencies - run: npm i @rollup/rollup-linux-x64-gnu + - name: Install dependencies + run: pnpm install --frozen-lockfile - - name: Build Packages - run: npm run build + - name: Build and check packages + run: pnpm run build - - name: Create Release Pull Request or Publish to npm - id: changesets - uses: changesets/action@v1 + - name: Create release pull request or publish + uses: changesets/action@v2 with: - # This expects you to have a script called release which does a build for your packages and calls changeset publish - publish: npm run release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + publish-script: pnpm run release diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 0000000..1e65098 --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,55 @@ +name: Validation + +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + validate: + name: Validate + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Set up pnpm + uses: pnpm/action-setup@v6 + + - name: Set up Node.js + uses: actions/setup-node@v7 + with: + node-version: 24 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Check formatting + run: pnpm run fmt:check + + - name: Lint + run: pnpm run lint + + - name: Check types + run: pnpm run test:types + + - name: Test + run: pnpm run test + + - name: Check coverage + run: pnpm run coverage + + - name: Build and check packages + run: pnpm run build + + - name: Audit dependencies + run: pnpm audit diff --git a/README.md b/README.md index 5e668b5..f21c6ad 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,36 @@ # @ylfjuk/core · ![GitHub License](https://img.shields.io/github/license/ylfjuk/core) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk%2Fcore?label=core&logo=typescript) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk-core%2Ftypes?label=types&logo=typescript) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk-core%2Futils?label=utils&logo=typescript) -The core packages for `@ylfjuk` projects +Shared types and utilities for `@ylfjuk` projects. ## Packages -- [@ylfjuk/core](packages/core/README.md) -- [@ylfjuk-core/types](packages/types/README.md) -- [@ylfjuk-core/utils](packages/utils/README.md) +- [`@ylfjuk/core`](packages/core/README.md) re-exports the complete public API. +- [`@ylfjuk-core/types`](packages/types/README.md) provides TypeScript utility types. +- [`@ylfjuk-core/utils`](packages/utils/README.md) provides runtime utilities. + +The runtime packages are ESM-only and target ES2024. Use `import`, not `require`. + +## Development + +Development requires Node.js 22.18.0 or newer and the pnpm version declared in `package.json`. + +```sh +pnpm install --frozen-lockfile +pnpm run fmt:check +pnpm run lint +pnpm run test:types +pnpm run test +pnpm run coverage +pnpm run build +``` + +Oxfmt and Oxlint handle formatting and linting, Vitest runs tests and coverage, TypeScript checks declarations, and tsdown builds and validates publishable packages with publint and Are the Types Wrong. + +## Releases + +Add a changeset with `pnpm run plan`. Merges to `main` update a release pull request; merging that pull request publishes changed packages through npm trusted publishing. + +Each public package must trust GitHub owner `YLfjuk`, repository `core`, workflow `release.yml`, with only `npm publish` allowed. The workflow uses OIDC and does not use an npm token. ## License diff --git a/oxlint.config.ts b/oxlint.config.ts index d338863..faccaa7 100644 --- a/oxlint.config.ts +++ b/oxlint.config.ts @@ -4,5 +4,8 @@ const config = createOxlintConfig({ jsdoc: true }); export default { ...config, - rules: { ...config.rules, "jsdoc/check-tag-names": "off" }, + rules: { + ...config.rules, + "jsdoc/check-tag-names": ["error", { definedTags: ["remarks"] }], + }, }; diff --git a/packages/core/README.md b/packages/core/README.md index 6328830..549704f 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1,11 +1,24 @@ # @ylfjuk/core · ![GitHub License](https://img.shields.io/github/license/ylfjuk/core) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk%2Fcore?logo=typescript) -The complete core package for `@ylfjuk` projects +The complete public API for the `@ylfjuk` core packages. -## Content +## Install -- [@ylfjuk-core/types](../types/README.md) -- [@ylfjuk-core/utils](../utils/README.md) +```sh +pnpm add @ylfjuk/core +``` + +This package is ESM-only and targets ES2024. + +```ts +import { isDefined } from "@ylfjuk/core"; +``` + +It re-exports [`@ylfjuk-core/types`](../types/README.md) and [`@ylfjuk-core/utils`](../utils/README.md). + +## Development + +From the repository root, use Node.js 22.18.0 or newer and run `pnpm run build`, `pnpm run test`, and `pnpm run test:types`. ## License diff --git a/packages/types/README.md b/packages/types/README.md index b36bfa2..8fd9f63 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -1,6 +1,22 @@ # @ylfjuk-core/types · ![GitHub License](https://img.shields.io/github/license/ylfjuk/core) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk-core/types?logo=typescript) -The types for the [@ylfjuk/core](../core/README.md) package +TypeScript utility types used by [`@ylfjuk/core`](../core/README.md). + +## Install + +```sh +pnpm add @ylfjuk-core/types +``` + +The package is type-only, uses ESM package metadata, and requires TypeScript 7. + +```ts +import type { Result } from "@ylfjuk-core/types"; +``` + +## Development + +From the repository root, use Node.js 22.18.0 or newer and run `pnpm run test` and `pnpm run test:types`. ## License diff --git a/packages/types/oxlint.config.ts b/packages/types/oxlint.config.ts index 89d97ac..8001aa4 100644 --- a/packages/types/oxlint.config.ts +++ b/packages/types/oxlint.config.ts @@ -6,7 +6,7 @@ export default { ...config, rules: { ...config.rules, - "jsdoc/check-tag-names": "off", + "jsdoc/check-tag-names": ["error", { definedTags: ["remarks"] }], "typescript/no-explicit-any": "off", }, }; diff --git a/packages/types/package.json b/packages/types/package.json index 099d5ca..b2c65e1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -26,7 +26,7 @@ } }, "scripts": { - "build": "pnpm run test && pnpm run test:types", + "build": "pnpm run test && pnpm run test:types && publint && attw --pack --profile esm-only", "test": "vitest run --typecheck", "test:types": "tsc --noEmit" }, diff --git a/packages/types/src/array-of-n.ts b/packages/types/src/array-of-n.ts index 5713c78..6d84797 100644 --- a/packages/types/src/array-of-n.ts +++ b/packages/types/src/array-of-n.ts @@ -1,4 +1,4 @@ -import type { Abs } from "./abs"; +import type { Abs } from "./abs.js"; /** * @template Amount - amount of {@link Fill} @@ -7,7 +7,6 @@ import type { Abs } from "./abs"; * @template Fill - What to fill the array with * * @since 0.0.10 - * @modified 0.0.12 - Now accepts any type for {@link Fill} */ export type ArrayOfN< Amount extends number, diff --git a/packages/types/src/at-least-one.ts b/packages/types/src/at-least-one.ts index c17203a..efb3e98 100644 --- a/packages/types/src/at-least-one.ts +++ b/packages/types/src/at-least-one.ts @@ -1,4 +1,4 @@ -import type { Prettify } from "./prettify"; +import type { Prettify } from "./prettify.js"; /** * @since 0.0.10 diff --git a/packages/types/src/deep-dict.ts b/packages/types/src/deep-dict.ts index 4700b52..aa06d5f 100644 --- a/packages/types/src/deep-dict.ts +++ b/packages/types/src/deep-dict.ts @@ -1,7 +1,7 @@ /** - * @description An infinite record + * An infinitely nested record. * - * @note Deep + * @remarks Applies recursively. * * @since 0.0.9 */ diff --git a/packages/types/src/equals.ts b/packages/types/src/equals.ts index 7b15e76..afd049f 100644 --- a/packages/types/src/equals.ts +++ b/packages/types/src/equals.ts @@ -1,14 +1,15 @@ -import type { Box } from "./box"; +import type { Box } from "./box.js"; /** + * Checks whether `A` and `B` are mutually assignable. + * * @see {@link Box} * - * @alternative + * @remarks An alternative function-variance formulation is: + * ```ts * type Equal = (() => G extends A ? 1 : 2) extends (() => G extends B ? 1 : 2) ? true : false - * - * @previous Equal {@v 0.0.12} + * ``` * * @since 0.0.12 - * @modified 0.0.14 {@breaking 💥} */ export type Equals = Box extends Box ? (Box extends Box ? true : false) : false; diff --git a/packages/types/src/exactly-one.ts b/packages/types/src/exactly-one.ts index 24cb375..0304d3a 100644 --- a/packages/types/src/exactly-one.ts +++ b/packages/types/src/exactly-one.ts @@ -1,4 +1,4 @@ -import type { Prettify } from "./prettify"; +import type { Prettify } from "./prettify.js"; /** * @since 0.0.10 diff --git a/packages/types/src/extend.ts b/packages/types/src/extend.ts index 731c172..6beffb5 100644 --- a/packages/types/src/extend.ts +++ b/packages/types/src/extend.ts @@ -2,7 +2,6 @@ * @returns Extends existing fields of a type * * @since 0.0.1 - * @modified 0.0.13 */ export type Extend = { [K in keyof T]: K extends keyof Ext ? T[K] | Ext[K] : T[K]; diff --git a/packages/types/src/extends.ts b/packages/types/src/extends.ts index eb6098b..94404be 100644 --- a/packages/types/src/extends.ts +++ b/packages/types/src/extends.ts @@ -1,19 +1,13 @@ import type { Box } from "@ylfjuk-core/types"; /** - * @description A stricter wrapper around the `extends` keyword' + * A stricter wrapper around the `extends` keyword. * - * @bug Does not work on the `never` type + * @remarks Does not support `never` because TypeScript evaluates the underlying conditional as `true`: * ```ts * type MyType = Extends; // Result: true * ``` * - * - This is due to the behavior of typescript - * ```ts - * type MyType = never extends any ? true : false; // Result: true - * ``` - * TODO: fix bug - * * @since 0.0.14 */ export type Extends = Box extends Box ? true : false; diff --git a/packages/types/src/extract-literal.ts b/packages/types/src/extract-literal.ts index 18e1743..bef901b 100644 --- a/packages/types/src/extract-literal.ts +++ b/packages/types/src/extract-literal.ts @@ -1,9 +1,9 @@ -import type { Primitive } from "./primitive"; +import type { Primitive } from "./primitive.js"; /** - * @description Extracts the literals from a string + * Extracts literal types from a string. * - * @note The opposite of MaskLiterals + * @remarks The inverse of `MaskLiterals`. * * @see {@link Primitive} * @@ -13,7 +13,6 @@ import type { Primitive } from "./primitive"; * ``` * * @since 0.0.8 - * @modified 0.0.9 {@breaking 💥} */ export type ExtractLiteral = T extends `${infer U extends Exclude}` ? U : T; diff --git a/packages/types/src/extract-values.ts b/packages/types/src/extract-values.ts index 1cf566b..561d9da 100644 --- a/packages/types/src/extract-values.ts +++ b/packages/types/src/extract-values.ts @@ -1,14 +1,12 @@ -import type { FN } from "./fn"; -import type { ValueOf } from "./value-of"; +import type { FN } from "./fn.js"; +import type { ValueOf } from "./value-of.js"; /** - * @note preserves `Date` + * @remarks Applies recursively while preserving `Date`. * * @see {@link ValueOf} * * @since 0.0.4 - * @modified 0.0.6 - * @modified 0.0.14 - Flattened the nesting */ export type ExtractValues = T extends FN diff --git a/packages/types/src/falsy.ts b/packages/types/src/falsy.ts index 1b44450..b8c519e 100644 --- a/packages/types/src/falsy.ts +++ b/packages/types/src/falsy.ts @@ -1,7 +1,7 @@ /** * A type that represents all representable falsy values in TypeScript. * - * @note Does not include `NaN` as it cannot be represented as a type. + * @remarks Does not include `NaN`, which cannot be represented as a type. * * @since 0.0.16 */ diff --git a/packages/types/src/fn.ts b/packages/types/src/fn.ts index f5b2be1..823799a 100644 --- a/packages/types/src/fn.ts +++ b/packages/types/src/fn.ts @@ -1,8 +1,7 @@ /** - * @description A type representing with a function + * Represents a function. * * @since 0.0.5 - * @modified 0.0.14 {@breaking 💥} * * @todo Add support for `this` context in function types */ @@ -10,3 +9,10 @@ export type FN = ( this: This, ...args: Args ) => Return; + +/** + * Alias for {@link FN}. + * + * @since 0.0.19 + */ +export type { FN as Func }; diff --git a/packages/types/src/has-duplicates.ts b/packages/types/src/has-duplicates.ts index 67c09fd..cbf38e5 100644 --- a/packages/types/src/has-duplicates.ts +++ b/packages/types/src/has-duplicates.ts @@ -1,7 +1,7 @@ -import type { UnknownArray } from "./unknown-array"; +import type { UnknownArray } from "./unknown-array.js"; /** - * @description A type that checks if an array has duplicate elements. + * Checks whether an array has duplicate elements. * * @since 0.0.14 */ diff --git a/packages/types/src/if.ts b/packages/types/src/if.ts index 9ff1264..3539eaa 100644 --- a/packages/types/src/if.ts +++ b/packages/types/src/if.ts @@ -1,5 +1,5 @@ /** - * @description A wrapper around conditional types + * Wraps a conditional type. * * @since 0.0.14 */ diff --git a/packages/types/src/increment.ts b/packages/types/src/increment.ts index 3adff47..9b75290 100644 --- a/packages/types/src/increment.ts +++ b/packages/types/src/increment.ts @@ -1,10 +1,10 @@ -import type { ArrayOfN } from "./array-of-n"; -import type { IsPositiveOrZero } from "./is-positive-or-zero"; +import type { ArrayOfN } from "./array-of-n.js"; +import type { IsPositiveOrZero } from "./is-positive-or-zero.js"; /** - * @description Increments a numeric value by 1 + * Increments a numeric value by one. * - * @note does not support negative/float values + * @remarks Does not support negative or floating-point values. * * @template N ∈ ℕ * diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index bf43794..25f6add 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,55 +1,55 @@ -export type * from "./abs"; -export type * from "./array-of-n"; -export type * from "./at-least-one"; -export type * from "./box"; -export type * from "./deep-dict"; -export type * from "./empty-object"; -export type * from "./equals"; -export type * from "./exactly-one"; -export type * from "./extend"; -export type * from "./extends"; -export type * from "./extract-literal"; -export type * from "./extract-values"; -export type * from "./falsy"; -export type * from "./fn"; -export type * from "./has-duplicates"; -export type * from "./if"; -export type * from "./increment"; -export type * from "./inverse-extract"; -export type * from "./is-disjoint-union"; -export type * from "./is-positive-or-zero"; -export type * from "./is-tuple"; -export type * from "./join"; -export type * from "./key-path"; -export type * from "./keyof-union"; -export type * from "./last-of-union"; -export type * from "./less-than"; -export type * from "./less-than-equal"; -export type * from "./mapped-enum"; -export type * from "./mask-dates"; -export type * from "./mask-literals"; -export type * from "./maybe"; -export type * from "./non-empty-array"; -export type * from "./non-optional"; -export type * from "./omit-by"; -export type * from "./omit-functions"; -export type * from "./partial-deep"; -export type * from "./patch-union"; -export type * from "./pick-by"; -export type * from "./pick-optional"; -export type * from "./prettify"; -export type * from "./primitive"; -export type * from "./replace"; -export type * from "./result"; -export type * from "./reverse"; -export type * from "./safe-record"; -export type * from "./strict-omit"; -export type * from "./stringifiable"; -export type * from "./suggest"; -export type * from "./suggest-str"; -export type * from "./to-str"; -export type * from "./union-to-intersection"; -export type * from "./union-to-tuple"; -export type * from "./unknown-array"; -export type * from "./value-of"; -export type * from "./whatever"; +export type * from "./abs.js"; +export type * from "./array-of-n.js"; +export type * from "./at-least-one.js"; +export type * from "./box.js"; +export type * from "./deep-dict.js"; +export type * from "./empty-object.js"; +export type * from "./equals.js"; +export type * from "./exactly-one.js"; +export type * from "./extend.js"; +export type * from "./extends.js"; +export type * from "./extract-literal.js"; +export type * from "./extract-values.js"; +export type * from "./falsy.js"; +export type * from "./fn.js"; +export type * from "./has-duplicates.js"; +export type * from "./if.js"; +export type * from "./increment.js"; +export type * from "./inverse-extract.js"; +export type * from "./is-disjoint-union.js"; +export type * from "./is-positive-or-zero.js"; +export type * from "./is-tuple.js"; +export type * from "./join.js"; +export type * from "./key-path.js"; +export type * from "./keyof-union.js"; +export type * from "./last-of-union.js"; +export type * from "./less-than.js"; +export type * from "./less-than-equal.js"; +export type * from "./mapped-enum.js"; +export type * from "./mask-dates.js"; +export type * from "./mask-literals.js"; +export type * from "./maybe.js"; +export type * from "./non-empty-array.js"; +export type * from "./non-optional.js"; +export type * from "./omit-by.js"; +export type * from "./omit-functions.js"; +export type * from "./partial-deep.js"; +export type * from "./patch-union.js"; +export type * from "./pick-by.js"; +export type * from "./pick-optional.js"; +export type * from "./prettify.js"; +export type * from "./primitive.js"; +export type * from "./replace.js"; +export type * from "./result.js"; +export type * from "./reverse.js"; +export type * from "./safe-record.js"; +export type * from "./strict-omit.js"; +export type * from "./stringifiable.js"; +export type * from "./suggest.js"; +export type * from "./suggest-str.js"; +export type * from "./to-str.js"; +export type * from "./union-to-intersection.js"; +export type * from "./union-to-tuple.js"; +export type * from "./unknown-array.js"; +export type * from "./value-of.js"; +export type * from "./whatever.js"; diff --git a/packages/types/src/is-disjoint-union.ts b/packages/types/src/is-disjoint-union.ts index 2132e29..3292634 100644 --- a/packages/types/src/is-disjoint-union.ts +++ b/packages/types/src/is-disjoint-union.ts @@ -1,4 +1,4 @@ -import type { UnionToIntersection } from "./union-to-intersection"; +import type { UnionToIntersection } from "./union-to-intersection.js"; /** * @see {@link UnionToIntersection} @@ -14,7 +14,7 @@ import type { UnionToIntersection } from "./union-to-intersection"; * utility to convert the union type into an intersection type. If the result is `never`, it indicates that * the original type was a union. * - * @note Objects will always be considered to have an intersection + * @remarks Objects are always considered to intersect. * * @see {@link UnionToIntersection} * diff --git a/packages/types/src/is-positive-or-zero.ts b/packages/types/src/is-positive-or-zero.ts index 473ca03..1e8f93b 100644 --- a/packages/types/src/is-positive-or-zero.ts +++ b/packages/types/src/is-positive-or-zero.ts @@ -1,14 +1,10 @@ -import type { Abs } from "./abs"; +import type { Abs } from "./abs.js"; /** - * @description - * return N >= 0; + * Checks whether `N` is greater than or equal to zero. * * @see {@link Abs} * - * @previous IsNatural {@v 0.0.10} - * * @since 0.0.10 - * @modified 0.0.11 {@breaking 💥} */ export type IsPositiveOrZero = Abs extends N ? true : false; diff --git a/packages/types/src/join.ts b/packages/types/src/join.ts index 5566fcd..a5934e5 100644 --- a/packages/types/src/join.ts +++ b/packages/types/src/join.ts @@ -1,11 +1,11 @@ -import type { Stringifiable } from "./stringifiable"; -import type { ToStr } from "./to-str"; +import type { Stringifiable } from "./stringifiable.js"; +import type { ToStr } from "./to-str.js"; type Settings = { separator: string }; type DefaultSettings = { separator: "" }; /** - * @description Joins together stringifiable elements + * Joins stringifiable elements. * * @see {@link Stringifiable} * @see {@link ToStr} diff --git a/packages/types/src/key-path.ts b/packages/types/src/key-path.ts index 51321d9..d6ecefd 100644 --- a/packages/types/src/key-path.ts +++ b/packages/types/src/key-path.ts @@ -10,7 +10,7 @@ import type { IsTuple } from "@ylfjuk-core/types"; * - If the array is not a tuple, includes numeric indices and recursively extracts key paths for array elements (e.g., `"items.0"`, `"items.0.subKey"`). * - Excludes `Date` types from extraction. * - * @note Auto-completion of array indices is not supported in TypeScript, but the type will still reflect the structure. + * @remarks TypeScript cannot autocomplete array indices, but the type still reflects their structure. * */ export type KeyPath = T extends Date diff --git a/packages/types/src/keyof-union.ts b/packages/types/src/keyof-union.ts index e15cbe0..ea9f07b 100644 --- a/packages/types/src/keyof-union.ts +++ b/packages/types/src/keyof-union.ts @@ -1,5 +1,5 @@ /** - * @describe Extracts the keys of a union type, including distinct keys from each member of the union. + * Extracts every key from every member of a union. * * @example * type Union = { bob: string } | { bert: number }; diff --git a/packages/types/src/last-of-union.ts b/packages/types/src/last-of-union.ts index c797c62..3435fc4 100644 --- a/packages/types/src/last-of-union.ts +++ b/packages/types/src/last-of-union.ts @@ -1,7 +1,7 @@ -import type { UnionToIntersection } from "./union-to-intersection"; +import type { UnionToIntersection } from "./union-to-intersection.js"; /** - * @description Extracts the last type from a union type + * Extracts the last type from a union. * * @see {@link UnionToIntersection} * diff --git a/packages/types/src/less-than-equal.ts b/packages/types/src/less-than-equal.ts index 18cf8f1..f508c31 100644 --- a/packages/types/src/less-than-equal.ts +++ b/packages/types/src/less-than-equal.ts @@ -1,11 +1,10 @@ -import type { Equals } from "./equals"; -import type { LessThan } from "./less-than"; +import type { Equals } from "./equals.js"; +import type { LessThan } from "./less-than.js"; /** - * @description - * A, B ∈ ℤ (integers) + * Checks whether integer `A` is less than or equal to integer `B`. * - * @note does not support float values + * @remarks Does not support floating-point values. * * @see {@link Equals} * @see {@link LessThan} diff --git a/packages/types/src/less-than.ts b/packages/types/src/less-than.ts index 96a2fc8..5b1e4b4 100644 --- a/packages/types/src/less-than.ts +++ b/packages/types/src/less-than.ts @@ -1,12 +1,11 @@ -import type { Abs } from "./abs"; -import type { ArrayOfN } from "./array-of-n"; -import type { IsPositiveOrZero } from "./is-positive-or-zero"; +import type { Abs } from "./abs.js"; +import type { ArrayOfN } from "./array-of-n.js"; +import type { IsPositiveOrZero } from "./is-positive-or-zero.js"; /** - * @description - * A, B ∈ ℤ (integers) + * Checks whether integer `A` is less than integer `B`. * - * @note does not support float values + * @remarks Does not support floating-point values. * * @see {@link IsPositiveOrZero} * @see {@link ArrayOfN} diff --git a/packages/types/src/mapped-enum.ts b/packages/types/src/mapped-enum.ts index f81ffa4..a87794e 100644 --- a/packages/types/src/mapped-enum.ts +++ b/packages/types/src/mapped-enum.ts @@ -1,5 +1,5 @@ /** - * @description Maps a string enum into an object enum + * Maps a string enum-like type into an object enum-like type. * * @since 0.0.4 */ diff --git a/packages/types/src/mask-dates.ts b/packages/types/src/mask-dates.ts index 143387e..1584424 100644 --- a/packages/types/src/mask-dates.ts +++ b/packages/types/src/mask-dates.ts @@ -1,9 +1,9 @@ -import type { Replace } from "./replace"; +import type { Replace } from "./replace.js"; /** - * @description Masks the `Date` type as a `string` + * Replaces `Date` with `string`. * - * @note Useful for wrapping API response types or handling `JSON` data where `Date` objects are serialized as strings. + * @remarks Useful for API responses and JSON data where dates are serialized as strings. * * @see {@link Replace} * diff --git a/packages/types/src/mask-literals.ts b/packages/types/src/mask-literals.ts index 650e9b5..bc529b0 100644 --- a/packages/types/src/mask-literals.ts +++ b/packages/types/src/mask-literals.ts @@ -1,10 +1,10 @@ -import type { InverseExtract } from "./inverse-extract"; -import type { Primitive } from "./primitive"; +import type { InverseExtract } from "./inverse-extract.js"; +import type { Primitive } from "./primitive.js"; /** - * @description Masks the literals as their primitive form + * Widens literal types to their primitive forms. * - * @note The opposite of ExtractLiteral + * @remarks This is the inverse of `ExtractLiteral`. An equivalent conditional definition is: * * @see {@link Primitive} * @@ -13,8 +13,6 @@ import type { Primitive } from "./primitive"; * type MaskedLiteral = ExtractLiterals<56>; //? number * ``` * - * @alternative - * works the same as * ```ts * type MaskLiterals = * T extends infer U ? @@ -28,8 +26,6 @@ import type { Primitive } from "./primitive"; * `K extends boolean ? boolean : K` is used since boolean is often spread into `true | false` * * @since 0.0.9 - * @modified 0.0.10 - * @modified 0.0.14 {@breaking 💥} * * TODO: Support objects */ diff --git a/packages/types/src/non-optional.ts b/packages/types/src/non-optional.ts index 65ee054..1691ceb 100644 --- a/packages/types/src/non-optional.ts +++ b/packages/types/src/non-optional.ts @@ -1,10 +1,9 @@ /** - * @description makes all keys required while preserving their nullability - * - * @note {@link Required} can be used directly with the `tsconfig` flag `exactOptionalPropertyTypes` set to `true` + * Makes every key required while preserving nullability. * * @remarks - * The type can also be described as `PreserveUndefined`, `LeanRequired`, `LaxRequired` or `SofRequired` + * Use `Required` directly when `exactOptionalPropertyTypes` is enabled. This type is also known as + * `PreserveUndefined`, `LeanRequired`, `LaxRequired`, or `SoftRequired`. * * @since 0.0.14 */ diff --git a/packages/types/src/omit-by.ts b/packages/types/src/omit-by.ts index 45827be..587f1f3 100644 --- a/packages/types/src/omit-by.ts +++ b/packages/types/src/omit-by.ts @@ -1,7 +1,7 @@ /** - * @description Omits keys that extend {@link U} + * Omits properties whose values extend `U`. * - * @note Deep + * @remarks Applies recursively. * * @since 0.0.14 */ diff --git a/packages/types/src/omit-functions.ts b/packages/types/src/omit-functions.ts index c03422b..0a55296 100644 --- a/packages/types/src/omit-functions.ts +++ b/packages/types/src/omit-functions.ts @@ -1,8 +1,8 @@ -import type { FN } from "./fn"; -import type { OmitBy } from "./omit-by"; +import type { FN } from "./fn.js"; +import type { OmitBy } from "./omit-by.js"; /** - * @description Omits the set of properties that are functions + * Omits properties whose values are functions. * * @see {@link OmitBy} * diff --git a/packages/types/src/partial-deep.ts b/packages/types/src/partial-deep.ts index 07db82c..75dca6f 100644 --- a/packages/types/src/partial-deep.ts +++ b/packages/types/src/partial-deep.ts @@ -1,8 +1,7 @@ /** - * @description Recursively makes all properties in `T` optional. + * Recursively makes every property in `T` optional. * - * @note Deep - * @note preserves `Date` + * @remarks Applies recursively while preserving `Date`. * * @example * ```ts diff --git a/packages/types/src/patch-union.ts b/packages/types/src/patch-union.ts index 407746f..4ceb70e 100644 --- a/packages/types/src/patch-union.ts +++ b/packages/types/src/patch-union.ts @@ -1,10 +1,10 @@ -import type { Box } from "./box"; -import type { KeyofUnion } from "./keyof-union"; +import type { Box } from "./box.js"; +import type { KeyofUnion } from "./keyof-union.js"; /** - * @describe Creates a type that represents a union of objects, where each object has all keys from the union, while preserving the original types. + * Adds every key in an object union to each member while preserving its original property types. * - * @note This type is useful when you need to be able to access any key from the union without having to check which specific type of the union you are dealing with. + * @remarks Use this when every union key must be accessible before narrowing to a specific member. * * @see {@link KeyofUnion} for extracting keys from a union type. * diff --git a/packages/types/src/pick-by.ts b/packages/types/src/pick-by.ts index b291145..5c3f05b 100644 --- a/packages/types/src/pick-by.ts +++ b/packages/types/src/pick-by.ts @@ -1,5 +1,5 @@ /** - * @description Picks keys that extend {@link U} + * Picks properties whose values extend `U`. * * @since 0.0.10 */ diff --git a/packages/types/src/pick-optional.ts b/packages/types/src/pick-optional.ts index 780e58c..98ee258 100644 --- a/packages/types/src/pick-optional.ts +++ b/packages/types/src/pick-optional.ts @@ -1,7 +1,7 @@ /** - * @description Extracts optional properties from a given type `T` + * Extracts the optional properties from `T`. * - * @note Does not preserve `exactOptionalPropertyTypes` unless `exactOptionalPropertyTypes` flag is set to true in the `tsconfig` + * @remarks Preserves exact optional-property semantics only when `exactOptionalPropertyTypes` is enabled. * * @example * ```ts diff --git a/packages/types/src/prettify.ts b/packages/types/src/prettify.ts index 08c33c2..7ce8f85 100644 --- a/packages/types/src/prettify.ts +++ b/packages/types/src/prettify.ts @@ -1,11 +1,9 @@ /** - * @description Prettifies the type and expands it + * Expands a type into a readable shape. * - * @note Deep - * @note preserves `Date` + * @remarks Applies recursively while preserving `Date`. * * @since 0.0.1 - * @modified 0.0.14 */ export type Prettify = T extends Date ? T diff --git a/packages/types/src/primitive.ts b/packages/types/src/primitive.ts index be4912b..f935f96 100644 --- a/packages/types/src/primitive.ts +++ b/packages/types/src/primitive.ts @@ -1,5 +1,4 @@ /** * @since 0.0.9 - * @modified 0.0.10 */ export type Primitive = string | number | bigint | boolean | symbol | null | undefined; diff --git a/packages/types/src/replace.ts b/packages/types/src/replace.ts index 695eff5..4778db4 100644 --- a/packages/types/src/replace.ts +++ b/packages/types/src/replace.ts @@ -1,5 +1,5 @@ /** - * @description Recursively replaces occurrences of type `R` in `T` with `N`. + * Recursively replaces occurrences of `R` in `T` with `N`. * * @template T - The original type to process. * @template R - The type to be replaced. diff --git a/packages/types/src/result.ts b/packages/types/src/result.ts index 4f77384..6b0eee2 100644 --- a/packages/types/src/result.ts +++ b/packages/types/src/result.ts @@ -1,30 +1,29 @@ /** - * @description A Result type that represents a successful operation + * Represents a successful operation. * * @since 0.0.17 */ export type Success = { success: true; data: T }; /** - * @description A Result type that represents a failed operation + * Represents a failed operation. * * @since 0.0.17 */ export type Failure = { success: false; reason: Err }; /** - * @description A safer way to deal with errors without throwing + * Represents success or failure without throwing. * * @see {@link Success} * @see {@link Failure} * * @since 0.0.13 - * @modified 0.0.17 */ export type Result = Success | Failure; /** - * @description Extract the reason type from a Result type + * Extracts the reason type from a `Result`. * * @see {@link Result} * @@ -36,7 +35,7 @@ export type ResultError> = Extract< >["reason"]; /** - * @description Extract the data type from a Result type + * Extracts the data type from a `Result`. * * @see {@link Result} * diff --git a/packages/types/src/reverse.ts b/packages/types/src/reverse.ts index 80cd1a5..57e1f42 100644 --- a/packages/types/src/reverse.ts +++ b/packages/types/src/reverse.ts @@ -1,7 +1,7 @@ -import type { UnknownArray } from "./unknown-array"; +import type { UnknownArray } from "./unknown-array.js"; /** - * @description Reverses an array + * Reverses an array. * * @since 0.0.14 */ diff --git a/packages/types/src/safe-record.ts b/packages/types/src/safe-record.ts index 7381363..5d0b943 100644 --- a/packages/types/src/safe-record.ts +++ b/packages/types/src/safe-record.ts @@ -1,5 +1,5 @@ /** - * @note {@link Record} can be used directly with the `tsconfig` flag `noUncheckedIndexedAccess` set to `true` + * @remarks Use `Record` directly when `noUncheckedIndexedAccess` is enabled. * * @since 0.0.13 */ diff --git a/packages/types/src/stringifiable.ts b/packages/types/src/stringifiable.ts index 471fd6c..3e45160 100644 --- a/packages/types/src/stringifiable.ts +++ b/packages/types/src/stringifiable.ts @@ -1,7 +1,7 @@ -import type { Primitive } from "./primitive"; +import type { Primitive } from "./primitive.js"; /** - * @description Primitives that can be stringified, or an object with the `toString` method + * A primitive or object with a `toString` method. * * @see {@link Primitives} * diff --git a/packages/types/src/suggest-str.ts b/packages/types/src/suggest-str.ts index 38a7ae4..9b035e4 100644 --- a/packages/types/src/suggest-str.ts +++ b/packages/types/src/suggest-str.ts @@ -1,10 +1,6 @@ /** - * @description - * Suggests the provided string {@link T}, but allows any string - * - * @previous AutoCompleteStr {@v 0.0.1} + * Suggests `T` while allowing any string. * * @since 0.0.1 - * @modified 0.0.14 {@breaking 💥} */ export type SuggestStr = T | (string & {}); diff --git a/packages/types/src/suggest.ts b/packages/types/src/suggest.ts index 8aec317..c16a208 100644 --- a/packages/types/src/suggest.ts +++ b/packages/types/src/suggest.ts @@ -1,8 +1,6 @@ /** - * @description - * Suggests the provided type {@link T}, but allows any non-nullable value + * Suggests `T` while allowing any non-nullable value. * * @since 0.0.9 - * @modified 0.0.14 - Now a generic suggestion */ export type Suggest = T | (unknown & {}); diff --git a/packages/types/src/to-str.ts b/packages/types/src/to-str.ts index 91500f3..d5a1bcd 100644 --- a/packages/types/src/to-str.ts +++ b/packages/types/src/to-str.ts @@ -1,7 +1,7 @@ -import type { Stringifiable } from "./stringifiable"; +import type { Stringifiable } from "./stringifiable.js"; /** - * @description Stringifies values that can be turned into strings + * Converts stringifiable values to strings. * * @see {@link Stringifiable} * diff --git a/packages/types/src/union-to-tuple.ts b/packages/types/src/union-to-tuple.ts index fe9fb49..79b0df0 100644 --- a/packages/types/src/union-to-tuple.ts +++ b/packages/types/src/union-to-tuple.ts @@ -1,7 +1,7 @@ -import type { LastOfUnion } from "./last-of-union"; +import type { LastOfUnion } from "./last-of-union.js"; /** - * @description Converts a `union` into an ordered `tuple` + * Converts a union into an ordered tuple. * * @see {@link LastOfUnion} * diff --git a/packages/types/src/value-of.ts b/packages/types/src/value-of.ts index 15ba922..29b6ce0 100644 --- a/packages/types/src/value-of.ts +++ b/packages/types/src/value-of.ts @@ -2,6 +2,5 @@ * @returns The values of an object or an array * * @since 0.0.1 - * @modified 0.0.13 */ export type ValueOf = T extends readonly unknown[] ? T[number] : T[keyof T]; diff --git a/packages/types/src/whatever.ts b/packages/types/src/whatever.ts index 7679481..80577f1 100644 --- a/packages/types/src/whatever.ts +++ b/packages/types/src/whatever.ts @@ -1,15 +1,14 @@ -import type { Maybe } from "./maybe"; -import type { Suggest } from "./suggest"; +import type { Maybe } from "./maybe.js"; +import type { Suggest } from "./suggest.js"; /** - * @description - * Suggests the provided type {@link T}, but allows any value + * Suggests `T` while allowing any value. * * @see {@link Suggest} * @see {@link Maybe} * @see {@link https://x.com/colinhacks/status/1891069007299522877?s=19} * - * @alternative + * @remarks An equivalent definition is: * type Whatever = T | {} | null | undefined; */ export type Whatever = Maybe>; diff --git a/packages/utils/README.md b/packages/utils/README.md index 75ba973..fe17903 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -1,6 +1,22 @@ # @ylfjuk-core/utils · ![GitHub License](https://img.shields.io/github/license/ylfjuk/core) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk-core/utils?logo=typescript) -The utils for the [@ylfjuk/core](../core/README.md) package +Runtime utilities used by [`@ylfjuk/core`](../core/README.md). + +## Install + +```sh +pnpm add @ylfjuk-core/utils +``` + +This package is ESM-only and targets ES2024. + +```ts +import { isDefined } from "@ylfjuk-core/utils"; +``` + +## Development + +From the repository root, use Node.js 22.18.0 or newer and run `pnpm run build`, `pnpm run test`, and `pnpm run test:types`. ## License diff --git a/packages/utils/oxlint.config.ts b/packages/utils/oxlint.config.ts index 89d97ac..8001aa4 100644 --- a/packages/utils/oxlint.config.ts +++ b/packages/utils/oxlint.config.ts @@ -6,7 +6,7 @@ export default { ...config, rules: { ...config.rules, - "jsdoc/check-tag-names": "off", + "jsdoc/check-tag-names": ["error", { definedTags: ["remarks"] }], "typescript/no-explicit-any": "off", }, }; diff --git a/packages/utils/src/arr/includes.ts b/packages/utils/src/arr/includes.ts index e73fea4..2e1f299 100644 --- a/packages/utils/src/arr/includes.ts +++ b/packages/utils/src/arr/includes.ts @@ -3,10 +3,9 @@ import type { Suggest, UnknownArray } from "@ylfjuk-core/types"; /** * Checks if an array includes a specific element. * - * @note A wrapper around {@link Array.prototype.includes} that allows to check against any type + * @remarks Wraps {@link Array.prototype.includes} while accepting values outside the array's inferred element type. * * @since 0.0.8 - * @modified 0.0.10 */ export const includes = >( arr: Arr, diff --git a/packages/utils/src/arr/index.ts b/packages/utils/src/arr/index.ts index 4963916..5d7867d 100644 --- a/packages/utils/src/arr/index.ts +++ b/packages/utils/src/arr/index.ts @@ -2,7 +2,6 @@ * Utility module for arrays. * * @since 0.0.8 - * @modified 0.0.10 */ export * as Arr from "./Arr"; diff --git a/packages/utils/src/bool.ts b/packages/utils/src/bool.ts index 4b12d3d..2955d7e 100644 --- a/packages/utils/src/bool.ts +++ b/packages/utils/src/bool.ts @@ -3,7 +3,7 @@ import type { Falsy } from "@ylfjuk-core/types"; /** * Type guard that checks if a value is truthy. * - * @note A wrapper around `Boolean` that narrows the type to exclude falsy values. + * @remarks Wraps `Boolean` while narrowing the type to exclude falsy values. * * @since 0.0.8 */ diff --git a/packages/utils/src/enum/to-tuple.ts b/packages/utils/src/enum/to-tuple.ts index f64af80..88ad39d 100644 --- a/packages/utils/src/enum/to-tuple.ts +++ b/packages/utils/src/enum/to-tuple.ts @@ -1,7 +1,7 @@ import type { UnionToTuple, ValueOf } from "@ylfjuk-core/types"; /** - * @description Converts an `enum` into an ordered `tuple` + * Converts an enum-like object into an ordered tuple. * * @see {@link UnionToTuple} * @see {@link ValueOf} diff --git a/packages/utils/src/infinite-object.ts b/packages/utils/src/infinite-object.ts index 35945f9..becad45 100644 --- a/packages/utils/src/infinite-object.ts +++ b/packages/utils/src/infinite-object.ts @@ -5,7 +5,7 @@ type InfiniteObject = { }; /** - * @description An object you can use to access any property or method without worrying about it existing. + * An object whose properties and methods can be accessed without checking whether they exist. * * @since 0.0.5 */ diff --git a/packages/utils/src/is-defined.ts b/packages/utils/src/is-defined.ts index 753e776..6f130f3 100644 --- a/packages/utils/src/is-defined.ts +++ b/packages/utils/src/is-defined.ts @@ -1,5 +1,5 @@ /** - * @description A type guard that checks if a value is defined (not `null` or `undefined`). + * Checks whether a value is neither `null` nor `undefined`. * * @since 0.0.1 */ diff --git a/packages/utils/src/json/index.ts b/packages/utils/src/json/index.ts index 02e4155..073340f 100644 --- a/packages/utils/src/json/index.ts +++ b/packages/utils/src/json/index.ts @@ -2,7 +2,6 @@ * Utility module for {@link JSON}. * * @since 0.0.9 - * @modified 0.0.10 */ export * as Json from "./Json"; diff --git a/packages/utils/src/json/parse.ts b/packages/utils/src/json/parse.ts index c657ebe..575db2b 100644 --- a/packages/utils/src/json/parse.ts +++ b/packages/utils/src/json/parse.ts @@ -76,10 +76,9 @@ type JsonParse = { /** * Parses a JSON string into an object. * - * @note A wrapper for {@link JSON.parse} that provides type safety and overloads for various input types. + * @remarks Wraps {@link JSON.parse} with type-safe overloads for supported inputs. * * @since 0.0.9 - * @modified 0.0.10 */ export const parse = ((text: string | null | StringifiableTuplePrimitive, reviver?: ReviverFN) => // @ts-expect-error: JSON.parse can receive `null`, or a single literal element tuple, but it is not represented by `ts` diff --git a/packages/utils/src/json/safe-parse.ts b/packages/utils/src/json/safe-parse.ts index 5602938..8e0fe0c 100644 --- a/packages/utils/src/json/safe-parse.ts +++ b/packages/utils/src/json/safe-parse.ts @@ -86,7 +86,6 @@ type JsonSafeParse = { * @see {@link parse} * * @since 0.0.9 - * @modified 0.0.10 */ export const safeParse = ((text: string | null, reviver?: ReviverFN) => { try { diff --git a/packages/utils/src/json/stringify.ts b/packages/utils/src/json/stringify.ts index 3ca70b5..6298f7a 100644 --- a/packages/utils/src/json/stringify.ts +++ b/packages/utils/src/json/stringify.ts @@ -127,9 +127,8 @@ type JsonStringify = { /** * Converts a JavaScript value to a JavaScript Object Notation (JSON) string. * - * @note A wrapper for {@link JSON.stringify} that provides type safety and overloads for various input types. + * @remarks Wraps {@link JSON.stringify} with type-safe overloads for supported inputs. * * @since 0.0.9 - * @modified 0.0.10 */ export const stringify = JSON.stringify as JsonStringify; diff --git a/packages/utils/src/noop.ts b/packages/utils/src/noop.ts index e735440..1c1cbde 100644 --- a/packages/utils/src/noop.ts +++ b/packages/utils/src/noop.ts @@ -1,7 +1,7 @@ import type { FN } from "@ylfjuk-core/types"; /** - * @description A no-operation function that does nothing. This is useful as a placeholder or default function + * A no-operation placeholder or default function. * * @since 0.0.1 */ diff --git a/packages/utils/src/obj/entries.ts b/packages/utils/src/obj/entries.ts index 370f304..992e788 100644 --- a/packages/utils/src/obj/entries.ts +++ b/packages/utils/src/obj/entries.ts @@ -7,10 +7,9 @@ type Entry = ValueOf<{ /** * Gets the entries of an object as an array of key-value pairs. * - * @note A wrapper around {@link Object.entries} that retains the type of the keys and values. + * @remarks Wraps {@link Object.entries} while retaining key and value types. * * @since 0.0.8 - * @modified 0.0.10 */ export const entries = (obj: T): Entry[] => Object.entries(obj) as Entry[]; diff --git a/packages/utils/src/obj/index.ts b/packages/utils/src/obj/index.ts index 6eb06cb..d68643c 100644 --- a/packages/utils/src/obj/index.ts +++ b/packages/utils/src/obj/index.ts @@ -2,7 +2,6 @@ * Utility module for objects. * * @since 0.0.8 - * @modified 0.0.10 */ export * as Obj from "./Obj"; diff --git a/packages/utils/src/obj/keys.ts b/packages/utils/src/obj/keys.ts index f6948b6..c092143 100644 --- a/packages/utils/src/obj/keys.ts +++ b/packages/utils/src/obj/keys.ts @@ -1,10 +1,9 @@ /** * Gets the keys of an object as an array. * - * @note A wrapper around {@link Object.keys} that retains the type of the keys. + * @remarks Wraps {@link Object.keys} while retaining key types. * * @since 0.0.8 - * @modified 0.0.10 */ export const keys = (obj: T): (keyof T)[] => Object.keys(obj) as (keyof T)[]; diff --git a/packages/utils/src/str/ends-with.ts b/packages/utils/src/str/ends-with.ts index 7330088..419ea76 100644 --- a/packages/utils/src/str/ends-with.ts +++ b/packages/utils/src/str/ends-with.ts @@ -1,10 +1,9 @@ /** * Checks if a string ends with a specific suffix. * - * @note A wrapper around {@link String.prototype.endsWith} that narrows the type to a template literal type. + * @remarks Wraps {@link String.prototype.endsWith} while narrowing to a template literal type. * * @since 0.0.8 - * @modified 0.0.10 */ export const endsWith = (str: string, suffix: P): str is `${string}${P}` => str.endsWith(suffix); diff --git a/packages/utils/src/str/index.ts b/packages/utils/src/str/index.ts index ce17f60..511b0af 100644 --- a/packages/utils/src/str/index.ts +++ b/packages/utils/src/str/index.ts @@ -2,7 +2,6 @@ * Utility module for strings. * * @since 0.0.8 - * @modified 0.0.10 */ export * as Str from "./Str"; diff --git a/packages/utils/src/str/starts-with.ts b/packages/utils/src/str/starts-with.ts index e110cd0..5173c87 100644 --- a/packages/utils/src/str/starts-with.ts +++ b/packages/utils/src/str/starts-with.ts @@ -1,10 +1,9 @@ /** * Checks if a string starts with a specific prefix. * - * @note A wrapper around {@link String.prototype.startsWith} that narrows the type to a template literal type. + * @remarks Wraps {@link String.prototype.startsWith} while narrowing to a template literal type. * * @since 0.0.8 - * @modified 0.0.10 */ export const startsWith = ( str: string, diff --git a/packages/utils/src/toggle.ts b/packages/utils/src/toggle.ts index 16d9c33..b833742 100644 --- a/packages/utils/src/toggle.ts +++ b/packages/utils/src/toggle.ts @@ -6,8 +6,8 @@ import type { FN, Maybe } from "@ylfjuk-core/types"; * @param currentOption - the current option * @param isEqual - A function that returns if two given elements should be treated as equal * - * @description toggles between elements in an array - * @note doesn't support duplicates in the array + * Toggles between elements in an array. + * @remarks Duplicate options are not supported. * * @example * const [next,] = toggle([]) // [null, -1] @@ -17,7 +17,6 @@ import type { FN, Maybe } from "@ylfjuk-core/types"; * const [next,] = toggle([{ id: 1 }, { id: 2 }], { id: 2 }, ([a, b]) => a.id === b.id) // [{ id: 1 }, 0] * * @since 0.0.6 - * @modified 0.0.7 {@breaking 💥} */ export const toggle = ( options: ReadonlyArray, From caaca4e226ed9bce41d25cdc541521d5391cc229 Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Fri, 28 Aug 2026 21:34:41 +0300 Subject: [PATCH 6/8] chore: finish migration housekeeping --- .gitignore | 3 +-- packages/core/README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b2f0c5c..88d91a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -# ignore top-level vscode settings -.vscode/settings.json +.artifacts # build output dist/ diff --git a/packages/core/README.md b/packages/core/README.md index 549704f..4fdb642 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1,4 +1,4 @@ -# @ylfjuk/core · ![GitHub License](https://img.shields.io/github/license/ylfjuk/core) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk%2Fcore?logo=typescript) +# @ylfjuk/core · ![GitHub License](https://img.shields.io/github/license/ylfjuk/core) ![NPM Version](https://img.shields.io/npm/v/%40ylfjuk/core?logo=typescript) The complete public API for the `@ylfjuk` core packages. From 77c14951b66fffa0aa714dc6b4c5cedf83d921f0 Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Fri, 28 Aug 2026 21:36:57 +0300 Subject: [PATCH 7/8] Version Packages --- .changeset/modernize-core-package.md | 7 ------- .changeset/modernize-types-package.md | 7 ------- .changeset/modernize-utils-package.md | 7 ------- packages/core/CHANGELOG.md | 12 ++++++++++++ packages/core/package.json | 2 +- packages/types/CHANGELOG.md | 8 ++++++++ packages/types/package.json | 2 +- packages/utils/CHANGELOG.md | 10 ++++++++++ packages/utils/package.json | 2 +- 9 files changed, 33 insertions(+), 24 deletions(-) delete mode 100644 .changeset/modernize-core-package.md delete mode 100644 .changeset/modernize-types-package.md delete mode 100644 .changeset/modernize-utils-package.md diff --git a/.changeset/modernize-core-package.md b/.changeset/modernize-core-package.md deleted file mode 100644 index 5580ed4..0000000 --- a/.changeset/modernize-core-package.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@ylfjuk/core": patch ---- - -- Re-export `Func` as an alias for `FN`. -- Include corrected `InfiniteObject` reflection behavior and complete `JSON.stringify` argument forwarding. -- Modernize ESM package documentation. diff --git a/.changeset/modernize-types-package.md b/.changeset/modernize-types-package.md deleted file mode 100644 index 32bb3d0..0000000 --- a/.changeset/modernize-types-package.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@ylfjuk-core/types": patch ---- - -- Add `Func` as an alias for `FN`. -- Support Node-compatible ESM resolution for published type imports. -- Modernize ESM API documentation. diff --git a/.changeset/modernize-utils-package.md b/.changeset/modernize-utils-package.md deleted file mode 100644 index a077543..0000000 --- a/.changeset/modernize-utils-package.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@ylfjuk-core/utils": patch ---- - -- Preserve `replacer` and `space` arguments in the typed `JSON.stringify` wrapper. -- Keep `InfiniteObject` callable and constructable without violating JavaScript reflection invariants. -- Modernize ESM API documentation. diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 5e30f62..578c027 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,17 @@ # @ylfjuk/core +## 0.0.20 + +### Patch Changes + +- 6c2dedf: - Re-export `Func` as an alias for `FN`. + - Include corrected `InfiniteObject` reflection behavior and complete `JSON.stringify` argument forwarding. + - Modernize ESM package documentation. +- Updated dependencies [6c2dedf] +- Updated dependencies [6c2dedf] + - @ylfjuk-core/types@0.0.19 + - @ylfjuk-core/utils@0.0.11 + ## 0.0.19 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 0e745ef..3fca7ca 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@ylfjuk/core", - "version": "0.0.19", + "version": "0.0.20", "description": "The core packages", "keywords": [ "core", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index f73c65b..cedc9c0 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,13 @@ # @ylfjuk-core/types +## 0.0.19 + +### Patch Changes + +- 6c2dedf: - Add `Func` as an alias for `FN`. + - Support Node-compatible ESM resolution for published type imports. + - Modernize ESM API documentation. + ## 0.0.18 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index b2c65e1..0a2bcf7 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@ylfjuk-core/types", - "version": "0.0.18", + "version": "0.0.19", "keywords": [ "core", "types", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index b3c0056..f5d0261 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @ylfjuk-core/utils +## 0.0.11 + +### Patch Changes + +- 6c2dedf: - Preserve `replacer` and `space` arguments in the typed `JSON.stringify` wrapper. + - Keep `InfiniteObject` callable and constructable without violating JavaScript reflection invariants. + - Modernize ESM API documentation. +- Updated dependencies [6c2dedf] + - @ylfjuk-core/types@0.0.19 + ## 0.0.10 ### Patch Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index 8e11fc8..a0bf369 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@ylfjuk-core/utils", - "version": "0.0.10", + "version": "0.0.11", "keywords": [ "core", "utils", From ed33b7c952de11ca54c0239ecdac16ed71889caf Mon Sep 17 00:00:00 2001 From: YLfjuk Date: Fri, 28 Aug 2026 21:38:54 +0300 Subject: [PATCH 8/8] fix: standardize LF line endings --- .gitattributes | 1 + oxfmt.config.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/oxfmt.config.ts b/oxfmt.config.ts index dc12394..c5d7943 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -5,4 +5,4 @@ const config = createOxfmtConfig({ scopes: ["ylfjuk", "ylfjuk-core"], }); -export default { ...config, endOfLine: "crlf" }; +export default { ...config, endOfLine: "lf" };