diff --git a/apps/type-benchmark/.attest/assertions/default.json b/apps/type-benchmark/.attest/assertions/default.json new file mode 100644 index 0000000..65580b8 --- /dev/null +++ b/apps/type-benchmark/.attest/assertions/default.json @@ -0,0 +1,82 @@ +{ + "index.test.ts": [ + { + "location": { + "start": { + "line": 114, + "char": 3 + }, + "end": { + "line": 114, + "char": 15 + } + }, + "args": [ + { + "type": "() => Vec3f", + "relationships": { + "args": [ + "equality" + ], + "typeArgs": [] + } + } + ], + "typeArgs": [], + "errors": [], + "completions": {} + }, + { + "location": { + "start": { + "line": 125, + "char": 3 + }, + "end": { + "line": 125, + "char": 17 + } + }, + "args": [ + { + "type": "(a: Vec2f | Vec3f) => Vec2f | Vec3f", + "relationships": { + "args": [ + "equality" + ], + "typeArgs": [] + } + } + ], + "typeArgs": [], + "errors": [], + "completions": {} + }, + { + "location": { + "start": { + "line": 116, + "char": 3 + }, + "end": { + "line": 116, + "char": 49 + } + }, + "count": 210 + }, + { + "location": { + "start": { + "line": 127, + "char": 3 + }, + "end": { + "line": 127, + "char": 49 + } + }, + "count": 200 + } + ] +} diff --git a/apps/type-benchmark/.attest/assertions/vanilla.json b/apps/type-benchmark/.attest/assertions/vanilla.json new file mode 100644 index 0000000..65580b8 --- /dev/null +++ b/apps/type-benchmark/.attest/assertions/vanilla.json @@ -0,0 +1,82 @@ +{ + "index.test.ts": [ + { + "location": { + "start": { + "line": 114, + "char": 3 + }, + "end": { + "line": 114, + "char": 15 + } + }, + "args": [ + { + "type": "() => Vec3f", + "relationships": { + "args": [ + "equality" + ], + "typeArgs": [] + } + } + ], + "typeArgs": [], + "errors": [], + "completions": {} + }, + { + "location": { + "start": { + "line": 125, + "char": 3 + }, + "end": { + "line": 125, + "char": 17 + } + }, + "args": [ + { + "type": "(a: Vec2f | Vec3f) => Vec2f | Vec3f", + "relationships": { + "args": [ + "equality" + ], + "typeArgs": [] + } + } + ], + "typeArgs": [], + "errors": [], + "completions": {} + }, + { + "location": { + "start": { + "line": 116, + "char": 3 + }, + "end": { + "line": 116, + "char": 49 + } + }, + "count": 210 + }, + { + "location": { + "start": { + "line": 127, + "char": 3 + }, + "end": { + "line": 127, + "char": 49 + } + }, + "count": 200 + } + ] +} diff --git a/apps/type-benchmark/index.test.ts b/apps/type-benchmark/index.test.ts new file mode 100644 index 0000000..0a28856 --- /dev/null +++ b/apps/type-benchmark/index.test.ts @@ -0,0 +1,128 @@ +import { attest } from "@ark/attest"; +import { expect, test } from "vitest"; + +import { Operator } from 'tsover-runtime'; + +class Vec2f { + x: number; + y: number; + + constructor(x: number, y: number) { + this.x = x; + this.y = y; + } + + [Operator.plus](lhs: Vec2f, rhs: Vec2f): Vec2f { + return new Vec2f(lhs.x + rhs.x, lhs.y + rhs.y); + } + + [Operator.star](lhs: Vec2f | number, rhs: Vec2f | number): Vec2f; + [Operator.star]( + lhs: Vec2f | number, + rhs: Vec2f | number, + ): Vec2f | typeof Operator.deferOperation { + if (typeof lhs === 'number' && rhs instanceof Vec2f) { + return new Vec2f(lhs * rhs.x, lhs * rhs.y); + } else if (typeof rhs === 'number' && lhs instanceof Vec2f) { + return new Vec2f(lhs.x * rhs, lhs.y * rhs); + } else if (lhs instanceof Vec2f && rhs instanceof Vec2f) { + return new Vec2f(lhs.x * rhs.x, lhs.y * rhs.y); + } + return Operator.deferOperation; + } + + [Operator.starStar](lhs: Vec2f, rhs: Vec2f | number): Vec2f; + [Operator.starStar](lhs: Vec2f, rhs: Vec2f | number): Vec2f | typeof Operator.deferOperation { + if (!(lhs instanceof Vec2f)) { + return Operator.deferOperation; + } + + if (typeof rhs === 'number') { + return new Vec2f(lhs.x ** rhs, lhs.y ** rhs); + } else if (rhs instanceof Vec2f) { + return new Vec2f(lhs.x ** rhs.x, lhs.y ** rhs.y); + } + + return Operator.deferOperation; + } + + [Operator.percent](lhs: Vec2f | number, rhs: Vec2f | number): Vec2f; + [Operator.percent]( + lhs: Vec2f | number, + rhs: Vec2f | number, + ): Vec2f | typeof Operator.deferOperation { + if (typeof lhs === 'number' && rhs instanceof Vec2f) { + return new Vec2f(lhs % rhs.x, lhs % rhs.y); + } else if (typeof rhs === 'number' && lhs instanceof Vec2f) { + return new Vec2f(lhs.x % rhs, lhs.y % rhs); + } else if (lhs instanceof Vec2f && rhs instanceof Vec2f) { + return new Vec2f(lhs.x % rhs.x, lhs.y % rhs.y); + } + return Operator.deferOperation; + } + + toString(): string { + return `(${this.x}, ${this.y})`; + } +} + +class Vec3f { + x: number; + y: number; + z: number; + + constructor(x: number, y: number, z: number) { + this.x = x; + this.y = y; + this.z = z; + } + + [Operator.plus](lhs: Vec3f, rhs: Vec3f): Vec3f { + return new Vec3f(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); + } + + [Operator.star](lhs: Vec3f | number, rhs: Vec3f | number): Vec3f; + [Operator.star]( + lhs: Vec3f | number, + rhs: Vec3f | number, + ): Vec3f | typeof Operator.deferOperation { + if (typeof lhs === 'number' && rhs instanceof Vec3f) { + return new Vec3f(lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); + } else if (typeof rhs === 'number' && lhs instanceof Vec3f) { + return new Vec3f(lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); + } else if (lhs instanceof Vec3f && rhs instanceof Vec3f) { + return new Vec3f(lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); + } + return Operator.deferOperation; + } + + toString(): string { + return `(${this.x}, ${this.y})`; + } +} + + +test("bruh", () => { + function main() { + 'use tsover'; + const a = new Vec3f(1, 2, 2); + const b = new Vec3f(1, 2, 3); + + return a + b * 54; + } + + attest(main).type.toString.snap("() => Vec3f"); + + attest.instantiations([224, "instantiations"]); +}); + +test("bruh", () => { + function double(a: Vec3f | Vec2f) { + 'use gpu'; + return a * 2; + } + + attest(double).type.toString.snap("(a: Vec2f | Vec3f) => Vec2f | Vec3f"); + + attest.instantiations([224, "instantiations"]); +}); diff --git a/apps/type-benchmark/package.json b/apps/type-benchmark/package.json new file mode 100644 index 0000000..ced6e8c --- /dev/null +++ b/apps/type-benchmark/package.json @@ -0,0 +1,17 @@ +{ + "name": "type-benchmark", + "version": "0.0.0", + "private": true, + "main": "index.js", + "scripts": { + "test": "pnpm --filter tsover build && vitest run", + "test:watch": "ATTEST_skipTypes=1 vitest run" + }, + "dependencies": { + "@ark/attest": "^0.56.0", + "tsover-runtime": "workspace:^", + "typescript": "workspace:tsover@*", + "typescript-vanilla": "npm:typescript@6.0.3", + "vitest": "^4.0.18" + } +} diff --git a/apps/type-benchmark/setupVitest.ts b/apps/type-benchmark/setupVitest.ts new file mode 100644 index 0000000..fec5652 --- /dev/null +++ b/apps/type-benchmark/setupVitest.ts @@ -0,0 +1,6 @@ +import { setup } from "@ark/attest" + +// config options can be passed here +export default () => setup({ + tsVersions: ['default', 'vanilla'], +}) diff --git a/apps/type-benchmark/tsconfig.json b/apps/type-benchmark/tsconfig.json new file mode 100644 index 0000000..6f04ca1 --- /dev/null +++ b/apps/type-benchmark/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + // Environment setup & latest features + "lib": ["ESNext", "tsover"], + "target": "ESNext", + "module": "Preserve", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +} diff --git a/apps/type-benchmark/vitest.config.ts b/apps/type-benchmark/vitest.config.ts new file mode 100644 index 0000000..91fca5b --- /dev/null +++ b/apps/type-benchmark/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + globalSetup: "./setupVitest.ts" + } +}); diff --git a/package.json b/package.json index 8307a3f..e006f78 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,9 @@ "pnpm": { "overrides": { "fumadocs-twoslash>typescript": "workspace:tsover@*" + }, + "patchedDependencies": { + "@ark/attest": "patches/@ark__attest.patch" } } } diff --git a/patches/@ark__attest.patch b/patches/@ark__attest.patch new file mode 100644 index 0000000..a56529a --- /dev/null +++ b/patches/@ark__attest.patch @@ -0,0 +1,41 @@ +diff --git a/out/config.js b/out/config.js +index 1cfc8f398e45fadd9955fb3f4818e39565b1255d..c48553e9907ac653aa9b7f201891e5940ef8bbe5 100644 +--- a/out/config.js ++++ b/out/config.js +@@ -74,8 +74,11 @@ const addEnvConfig = (config) => { + } + return config; + }; +-const parseConfig = () => { ++const parseConfig = (options) => { + const baseConfig = addEnvConfig(getDefaultAttestConfig()); ++ if (options) { ++ Object.assign(baseConfig, options); ++ } + const cacheDir = resolve(".attest"); + const assertionCacheDir = join(cacheDir, "assertions"); + const defaultAssertionCachePath = join(assertionCacheDir, "typescript.json"); +@@ -105,7 +108,7 @@ const parseTsVersions = (aliases) => { + }); + }; + let cachedConfig; +-export const getConfig = () => parseConfig(); ++export const getConfig = (options) => parseConfig(options); + // workaround for a bug in Node 25 that creates localStorage as an empty proxy, + // leading to @typescript/vfs eventually throwing when it sees that it is not + // undefined and tries to call `getItem`: +diff --git a/out/fixtures.js b/out/fixtures.js +index 60114ad6182d078d2e079d6c99ce2427749aa8ba..ee5043ce264ab0fe226905da11b5bb90a4c71826 100644 +--- a/out/fixtures.js ++++ b/out/fixtures.js +@@ -6,9 +6,7 @@ import { analyzeProjectAssertions } from "./cache/writeAssertionCache.js"; + import { ensureCacheDirs, getConfig } from "./config.js"; + import { forTypeScriptVersions } from "./tsVersioning.js"; + export const setup = (options) => { +- const { ...config } = getConfig(); +- if (options) +- Object.assign(config, options); ++ const { ...config } = getConfig(options); + process.env.ATTEST_CONFIG = JSON.stringify(config); + rmSync(config.cacheDir, { recursive: true, force: true }); + ensureCacheDirs(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 65cded6..e5e7a2e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,11 @@ settings: overrides: fumadocs-twoslash>typescript: workspace:tsover@* +patchedDependencies: + '@ark/attest': + hash: fsf2gfv2kidz37vtzjjticq77a + path: patches/@ark__attest.patch + importers: .: @@ -88,6 +93,24 @@ importers: specifier: workspace:tsover@* version: link:../../packages/tsover + apps/type-benchmark: + dependencies: + '@ark/attest': + specifier: ^0.56.0 + version: 0.56.0(patch_hash=fsf2gfv2kidz37vtzjjticq77a)(typescript@packages+tsover) + tsover-runtime: + specifier: workspace:^ + version: link:../../packages/tsover-runtime + typescript: + specifier: workspace:tsover@* + version: link:../../packages/tsover + typescript-vanilla: + specifier: npm:typescript@6.0.3 + version: typescript@6.0.3 + vitest: + specifier: ^4.0.18 + version: 4.0.18(@types/node@25.2.3)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0) + examples/vite-app: dependencies: tsover-runtime: @@ -156,6 +179,21 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} + '@ark/attest@0.56.0': + resolution: {integrity: sha512-Pngs8f1UJiWbeO8LKVdyBL0K3rT/PDVACR7TPyCEULNcN8V1rVec6dKvUnQVpQSj60p4ejlK6dKs+fQoqdUMqA==} + hasBin: true + peerDependencies: + typescript: '*' + + '@ark/fs@0.56.0': + resolution: {integrity: sha512-zY/wDDhcvmt6/upQwZM766PAnvIzdEMcgydUGd9pqY9FMGNo9I9uE4RYAfms9AeUUtbZJu2h2Ua0tvFsO5XF4Q==} + + '@ark/schema@0.56.0': + resolution: {integrity: sha512-ECg3hox/6Z/nLajxXqNhgPtNdHWC9zNsDyskwO28WinoFEnWow4IsERNz9AnXRhTZJnYIlAJ4uGn3nlLk65vZA==} + + '@ark/util@0.56.0': + resolution: {integrity: sha512-BghfRC8b9pNs3vBoDJhcta0/c1J1rsoS1+HgVUreMFPdhz/CRAKReAu57YEllNaSy98rWAdY1gE+gFup7OXpgA==} + '@babel/generator@8.0.0-rc.1': resolution: {integrity: sha512-3ypWOOiC4AYHKr8vYRVtWtWmyvcoItHtVqF8paFax+ydpmUdPsJpLBkBBs5ItmhdrwC3a0ZSqqFAdzls4ODP3w==} engines: {node: ^20.19.0 || >=22.12.0} @@ -840,6 +878,11 @@ packages: cpu: [x64] os: [win32] + '@prettier/sync@0.6.1': + resolution: {integrity: sha512-yF9G8vK/LYUTF3Cijd7VC9La3b20F20/J/fgoR4H0B8JGOWnZVZX6+I6+vODPosjmMcpdlUV+gUqJQZp3kLOcw==} + peerDependencies: + prettier: '*' + '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} @@ -1711,6 +1754,15 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@typescript/analyze-trace@0.10.1': + resolution: {integrity: sha512-RnlSOPh14QbopGCApgkSx5UBgGda5MX1cHqp2fsqfiDyCwGL/m1jaeB9fzu7didVS81LQqGZZuxFBcg8YU8EVw==} + hasBin: true + + '@typescript/vfs@1.6.1': + resolution: {integrity: sha512-JwoxboBh7Oz1v38tPbkrZ62ZXNHAk9bJ7c9x0eI5zBfBnBYGhURdbnh7Z4smN/MV48Y5OCcZb58n972UtbazsA==} + peerDependencies: + typescript: '*' + '@typescript/vfs@1.6.3': resolution: {integrity: sha512-8Qs6/Tj2B8Uyo4lYJkopdCtrsfpF/ZlbTXK13Nq6JKN+Ih8FF9Oxg97gEp+zIS96wmkMdWUIETl35Yt9BITeiw==} peerDependencies: @@ -1800,6 +1852,12 @@ packages: resolution: {integrity: sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==} engines: {node: '>=10'} + arkregex@0.0.4: + resolution: {integrity: sha512-biS/FkvSwQq59TZ453piUp8bxMui11pgOMV9WHAnli1F8o0ayNCZzUwQadL/bGIUic5TkS/QlPcyMuI8ZIwedQ==} + + arktype@2.1.28: + resolution: {integrity: sha512-LVZqXl2zWRpNFnbITrtFmqeqNkPPo+KemuzbGSY6jvJwCb4v8NsDzrWOLHnQgWl26TkJeWWcUNUeBpq2Mst1/Q==} + array-timsort@1.0.3: resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} @@ -1913,6 +1971,9 @@ packages: resolution: {integrity: sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} @@ -2055,6 +2116,10 @@ packages: engines: {node: '>=18'} hasBin: true + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} @@ -2092,6 +2157,10 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} + exit@0.1.2: + resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} + engines: {node: '>= 0.8.0'} + expect-type@1.3.0: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} @@ -2244,6 +2313,10 @@ packages: next: optional: true + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} @@ -2314,6 +2387,9 @@ packages: resolution: {integrity: sha512-B6Lc2s6yApwnD2/pMzFh/d5AVjdsDXjgkeJ766FmFuJELIGHNycKRj+l3A39yZPM4CchqNCB4RITEAYB1KUM6A==} engines: {node: '>=20.19.0'} + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} @@ -2380,6 +2456,15 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + jsonparse@1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + + jsonstream-next@3.0.0: + resolution: {integrity: sha512-aAi6oPhdt7BKyQn1SrIIGZBt0ukKuOUE1qV6kJ3GgioSOYzsRc8z9Hfr1BVmacA/jLe9nARfmgMGgn68BqIAgg==} + engines: {node: '>=10'} + hasBin: true + lightningcss-android-arm64@1.30.2: resolution: {integrity: sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==} engines: {node: '>= 12.0.0'} @@ -2531,6 +2616,9 @@ packages: magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + make-synchronized@0.8.0: + resolution: {integrity: sha512-DZu4lwc0ffoFz581BSQa/BJl+1ZqIkoRQ+VejMlH0VrP4E86StAODnZujZ4sepumQj8rcP7wUnUBGM8Gu+zKUA==} + markdown-extensions@2.0.0: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} engines: {node: '>=16'} @@ -2826,6 +2914,10 @@ packages: oxlint-tsgolint: optional: true + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + parse-entities@4.0.2: resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} @@ -2867,6 +2959,11 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} + prettier@3.6.2: + resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + engines: {node: '>=14'} + hasBin: true + property-information@7.1.0: resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==} @@ -2930,6 +3027,10 @@ packages: resolution: {integrity: sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==} engines: {node: '>=0.10.0'} + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + readdirp@5.0.0: resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} engines: {node: '>= 20.19.0'} @@ -2988,6 +3089,10 @@ packages: remark@15.0.1: resolution: {integrity: sha512-Eht5w30ruCXgFmxVUSlNWQ9iiimq07URKeFS3hNc8cUWy1llX4KDWfyEDZRycMc+znsN9Ux5/tJ/BFdgdOwA3A==} + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -3112,6 +3217,9 @@ packages: space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + split2@3.2.2: + resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -3126,6 +3234,9 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} @@ -3178,6 +3289,9 @@ packages: resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} engines: {node: '>=6'} + through2@4.0.2: + resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} + tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -3211,6 +3325,10 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true + treeify@1.1.0: + resolution: {integrity: sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==} + engines: {node: '>=0.6'} + trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -3295,6 +3413,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + unconfig-core@7.4.2: resolution: {integrity: sha512-VgPCvLWugINbXvMQDf8Jh0mlbvNjNC6eSUziHsBCMpxR05OPrNrvDnyatdMjRgcHaaNsCqz+wjNXxNw1kRLHUg==} @@ -3496,10 +3619,30 @@ packages: resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} engines: {node: '>=12'} + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + wrap-ansi@8.1.0: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + zod@4.3.6: resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} @@ -3510,6 +3653,27 @@ snapshots: '@alloc/quick-lru@5.2.0': {} + '@ark/attest@0.56.0(patch_hash=fsf2gfv2kidz37vtzjjticq77a)(typescript@packages+tsover)': + dependencies: + '@ark/fs': 0.56.0 + '@ark/util': 0.56.0 + '@prettier/sync': 0.6.1(prettier@3.6.2) + '@typescript/analyze-trace': 0.10.1 + '@typescript/vfs': 1.6.1(typescript@packages+tsover) + arktype: 2.1.28 + prettier: 3.6.2 + typescript: link:packages/tsover + transitivePeerDependencies: + - supports-color + + '@ark/fs@0.56.0': {} + + '@ark/schema@0.56.0': + dependencies: + '@ark/util': 0.56.0 + + '@ark/util@0.56.0': {} + '@babel/generator@8.0.0-rc.1': dependencies: '@babel/parser': 8.0.0-rc.1 @@ -3979,6 +4143,11 @@ snapshots: '@oxlint/binding-win32-x64-msvc@1.58.0': optional: true + '@prettier/sync@0.6.1(prettier@3.6.2)': + dependencies: + make-synchronized: 0.8.0 + prettier: 3.6.2 + '@quansync/fs@1.0.0': dependencies: quansync: 1.0.0 @@ -4734,6 +4903,24 @@ snapshots: '@types/unist@3.0.3': {} + '@typescript/analyze-trace@0.10.1': + dependencies: + chalk: 4.1.2 + exit: 0.1.2 + jsonparse: 1.3.1 + jsonstream-next: 3.0.0 + p-limit: 3.1.0 + split2: 3.2.2 + treeify: 1.1.0 + yargs: 16.2.0 + + '@typescript/vfs@1.6.1(typescript@packages+tsover)': + dependencies: + debug: 4.4.3 + typescript: link:packages/tsover + transitivePeerDependencies: + - supports-color + '@typescript/vfs@1.6.3(typescript@packages+tsover)': dependencies: debug: 4.4.3 @@ -4760,6 +4947,14 @@ snapshots: optionalDependencies: vite: 7.3.1(@types/node@20.19.33)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0) + '@vitest/mocker@4.0.18(vite@7.3.1(@types/node@25.2.3)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0))': + dependencies: + '@vitest/spy': 4.0.18 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.3.1(@types/node@25.2.3)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0) + '@vitest/pretty-format@4.0.18': dependencies: tinyrainbow: 3.0.3 @@ -4823,6 +5018,16 @@ snapshots: dependencies: tslib: 2.8.1 + arkregex@0.0.4: + dependencies: + '@ark/util': 0.56.0 + + arktype@2.1.28: + dependencies: + '@ark/schema': 0.56.0 + '@ark/util': 0.56.0 + arkregex: 0.0.4 + array-timsort@1.0.3: {} assertion-error@2.0.1: {} @@ -4920,6 +5125,12 @@ snapshots: execa: 5.1.1 is-wsl: 2.2.0 + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + clsx@2.1.1: {} collapse-white-space@2.1.0: {} @@ -5063,6 +5274,8 @@ snapshots: '@esbuild/win32-ia32': 0.27.3 '@esbuild/win32-x64': 0.27.3 + escalade@3.2.0: {} + escape-string-regexp@5.0.0: {} esprima@4.0.1: {} @@ -5116,6 +5329,8 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + exit@0.1.2: {} + expect-type@1.3.0: {} extend@3.0.2: {} @@ -5263,6 +5478,8 @@ snapshots: - '@types/react-dom' - tailwindcss + get-caller-file@2.0.5: {} + get-nonce@1.0.1: {} get-stream@6.0.1: {} @@ -5399,6 +5616,8 @@ snapshots: import-without-cache@0.2.5: {} + inherits@2.0.4: {} + ini@1.3.8: {} inline-style-parser@0.2.7: {} @@ -5443,6 +5662,13 @@ snapshots: json-schema-traverse@1.0.0: {} + jsonparse@1.3.1: {} + + jsonstream-next@3.0.0: + dependencies: + jsonparse: 1.3.1 + through2: 4.0.2 + lightningcss-android-arm64@1.30.2: optional: true @@ -5552,6 +5778,8 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 + make-synchronized@0.8.0: {} + markdown-extensions@2.0.0: {} markdown-table@3.0.4: {} @@ -6126,6 +6354,10 @@ snapshots: '@oxlint/binding-win32-ia32-msvc': 1.58.0 '@oxlint/binding-win32-x64-msvc': 1.58.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + parse-entities@4.0.2: dependencies: '@types/unist': 2.0.11 @@ -6171,6 +6403,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + prettier@3.6.2: {} + property-information@7.1.0: {} punycode@2.3.1: {} @@ -6225,6 +6459,12 @@ snapshots: react@19.2.4: {} + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + readdirp@5.0.0: {} recma-build-jsx@1.0.0: @@ -6339,6 +6579,8 @@ snapshots: transitivePeerDependencies: - supports-color + require-directory@2.1.1: {} + require-from-string@2.0.2: {} resolve-pkg-maps@1.0.0: {} @@ -6551,6 +6793,10 @@ snapshots: space-separated-tokens@2.0.2: {} + split2@3.2.2: + dependencies: + readable-stream: 3.6.2 + stackback@0.0.2: {} std-env@3.10.0: {} @@ -6567,6 +6813,10 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.2 + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 @@ -6607,6 +6857,10 @@ snapshots: tapable@2.3.0: {} + through2@4.0.2: + dependencies: + readable-stream: 3.6.2 + tiny-invariant@1.3.3: optional: true @@ -6630,6 +6884,8 @@ snapshots: tree-kill@1.2.2: {} + treeify@1.1.0: {} + trim-lines@3.0.1: {} trough@2.2.0: {} @@ -6712,6 +6968,8 @@ snapshots: typescript@5.9.3: {} + typescript@6.0.3: {} + unconfig-core@7.4.2: dependencies: '@quansync/fs': 1.0.0 @@ -6898,6 +7156,43 @@ snapshots: - tsx - yaml + vitest@4.0.18(@types/node@25.2.3)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0): + dependencies: + '@vitest/expect': 4.0.18 + '@vitest/mocker': 4.0.18(vite@7.3.1(@types/node@25.2.3)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)) + '@vitest/pretty-format': 4.0.18 + '@vitest/runner': 4.0.18 + '@vitest/snapshot': 4.0.18 + '@vitest/spy': 4.0.18 + '@vitest/utils': 4.0.18 + es-module-lexer: 1.7.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.0.3 + vite: 7.3.1(@types/node@25.2.3)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 25.2.3 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - terser + - tsx + - yaml + web-namespaces@2.0.1: {} webpack-virtual-modules@0.6.2: {} @@ -6915,12 +7210,34 @@ snapshots: dependencies: string-width: 5.1.2 + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi@8.1.0: dependencies: ansi-styles: 6.2.3 string-width: 5.1.2 strip-ansi: 7.1.2 + y18n@5.0.8: {} + + yargs-parser@20.2.9: {} + + yargs@16.2.0: + 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 + + yocto-queue@0.1.0: {} + zod@4.3.6: {} zwitch@2.0.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 528a521..659fdda 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,6 @@ +nodeLinker: hoisted + packages: - - "packages/*" - - "examples/*" - - "apps/*" + - 'packages/*' + - 'examples/*' + - 'apps/*'