From a73674ea90480ce8ff3085a0449f2a7a9bc5526e Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Wed, 14 May 2025 08:26:09 -0700 Subject: [PATCH 01/16] chore: scaffold svelte app --- packages/svelte-db/.gitignore | 24 + packages/svelte-db/README.md | 58 +++ packages/svelte-db/package.json | 50 ++ packages/svelte-db/src/app.d.ts | 13 + packages/svelte-db/src/app.html | 12 + packages/svelte-db/src/lib/index.ts | 1 + packages/svelte-db/src/routes/+page.svelte | 3 + packages/svelte-db/static/favicon.png | Bin 0 -> 1571 bytes packages/svelte-db/svelte.config.js | 18 + packages/svelte-db/tsconfig.json | 15 + packages/svelte-db/vite.config.ts | 6 + pnpm-lock.yaml | 574 ++++++++++++++++++--- 12 files changed, 715 insertions(+), 59 deletions(-) create mode 100644 packages/svelte-db/.gitignore create mode 100644 packages/svelte-db/README.md create mode 100644 packages/svelte-db/package.json create mode 100644 packages/svelte-db/src/app.d.ts create mode 100644 packages/svelte-db/src/app.html create mode 100644 packages/svelte-db/src/lib/index.ts create mode 100644 packages/svelte-db/src/routes/+page.svelte create mode 100644 packages/svelte-db/static/favicon.png create mode 100644 packages/svelte-db/svelte.config.js create mode 100644 packages/svelte-db/tsconfig.json create mode 100644 packages/svelte-db/vite.config.ts diff --git a/packages/svelte-db/.gitignore b/packages/svelte-db/.gitignore new file mode 100644 index 0000000..294b385 --- /dev/null +++ b/packages/svelte-db/.gitignore @@ -0,0 +1,24 @@ +node_modules + +# Output +.output +.vercel +.netlify +.wrangler +/.svelte-kit +/build +/dist + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/packages/svelte-db/README.md b/packages/svelte-db/README.md new file mode 100644 index 0000000..9410ac8 --- /dev/null +++ b/packages/svelte-db/README.md @@ -0,0 +1,58 @@ +# Svelte library + +Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv). + +Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npx sv create + +# create a new project in my-app +npx sv create my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app. + +## Building + +To build your library: + +```bash +npm run package +``` + +To create a production version of your showcase app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. + +## Publishing + +Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)). + +To publish your library to [npm](https://www.npmjs.com): + +```bash +npm publish +``` diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json new file mode 100644 index 0000000..399b5d6 --- /dev/null +++ b/packages/svelte-db/package.json @@ -0,0 +1,50 @@ +{ + "name": "@tanstack/svelte-db", + "description": "Svelte integration for @tanstack/db", + "version": "0.0.0", + "scripts": { + "dev": "vite dev", + "build": "vite build && npm run prepack", + "preview": "vite preview", + "prepare": "svelte-kit sync || echo ''", + "prepack": "svelte-kit sync && svelte-package && publint", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*" + ], + "sideEffects": [ + "**/*.css" + ], + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + }, + "peerDependencies": { + "svelte": "^5.0.0" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^6.0.0", + "@sveltejs/kit": "^2.16.0", + "@sveltejs/package": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "publint": "^0.3.2", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "typescript": "^5.0.0", + "vite": "^6.2.6" + }, + "keywords": [ + "optimistic", + "svelte", + "typescript" + ] +} diff --git a/packages/svelte-db/src/app.d.ts b/packages/svelte-db/src/app.d.ts new file mode 100644 index 0000000..c0c0816 --- /dev/null +++ b/packages/svelte-db/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://svelte.dev/docs/kit/types#app.d.ts +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {} diff --git a/packages/svelte-db/src/app.html b/packages/svelte-db/src/app.html new file mode 100644 index 0000000..f22aeaa --- /dev/null +++ b/packages/svelte-db/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/packages/svelte-db/src/lib/index.ts b/packages/svelte-db/src/lib/index.ts new file mode 100644 index 0000000..47d3c46 --- /dev/null +++ b/packages/svelte-db/src/lib/index.ts @@ -0,0 +1 @@ +// Reexport your entry components here diff --git a/packages/svelte-db/src/routes/+page.svelte b/packages/svelte-db/src/routes/+page.svelte new file mode 100644 index 0000000..9c42926 --- /dev/null +++ b/packages/svelte-db/src/routes/+page.svelte @@ -0,0 +1,3 @@ +

Welcome to your library project

+

Create your package using @sveltejs/package and preview/showcase your work with SvelteKit

+

Visit svelte.dev/docs/kit to read the documentation

diff --git a/packages/svelte-db/static/favicon.png b/packages/svelte-db/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..825b9e65af7c104cfb07089bb28659393b4f2097 GIT binary patch literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX1 z+6Okem(d}YXmmOiZq$!IPk5t8nnS{%?+vDFz3BevmFNgpIod~R{>@#@5x9zJKEHLHv!gHeK~n)Ld!M8DB|Kfe%~123&Hz1Z(86nU7*G5chmyDe ziV7$pB7pJ=96hpxHv9rCR29%bLOXlKU<_13_M8x)6;P8E1Kz6G<&P?$P^%c!M5`2` zfY2zg;VK5~^>TJGQzc+33-n~gKt{{of8GzUkWmU110IgI0DLxRIM>0US|TsM=L|@F z0Bun8U!cRB7-2apz=y-7*UxOxz@Z0)@QM)9wSGki1AZ38ceG7Q72z5`i;i=J`ILzL z@iUO?SBBG-0cQuo+an4TsLy-g-x;8P4UVwk|D8{W@U1Zi z!M)+jqy@nQ$p?5tsHp-6J304Q={v-B>66$P0IDx&YT(`IcZ~bZfmn11#rXd7<5s}y zBi9eim&zQc0Dk|2>$bs0PnLmDfMP5lcXRY&cvJ=zKxI^f0%-d$tD!`LBf9^jMSYUA zI8U?CWdY@}cRq6{5~y+)#h1!*-HcGW@+gZ4B};0OnC~`xQOyH19z*TA!!BJ%9s0V3F?CAJ{hTd#*tf+ur-W9MOURF-@B77_-OshsY}6 zOXRY=5%C^*26z?l)1=$bz30!so5tfABdSYzO+H=CpV~aaUefmjvfZ3Ttu9W&W3Iu6 zROlh0MFA5h;my}8lB0tAV-Rvc2Zs_CCSJnx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH=6.9.0'} + '@babel/helper-string-parser@7.27.1': + resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.25.9': resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.27.1': + resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.25.9': resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} @@ -375,6 +413,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.27.2': + resolution: {integrity: sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-transform-react-jsx-self@7.25.9': resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} engines: {node: '>=6.9.0'} @@ -411,6 +454,10 @@ packages: resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} engines: {node: '>=6.9.0'} + '@babel/types@7.27.1': + resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==} + engines: {node: '>=6.9.0'} + '@changesets/apply-release-plan@7.0.10': resolution: {integrity: sha512-wNyeIJ3yDsVspYvHnEz1xQDq18D9ifed3lI+wxRQRK4pArUcuHgCTrHv0QRnnwjhVCQACxZ+CBih3wgOct6UXw==} @@ -1254,6 +1301,9 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@polka/url@1.0.0-next.29': + resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} + '@publint/pack@0.1.2': resolution: {integrity: sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw==} engines: {node: '>=18'} @@ -1522,6 +1572,47 @@ packages: peerDependencies: eslint: '>=9.0.0' + '@sveltejs/acorn-typescript@1.0.5': + resolution: {integrity: sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==} + peerDependencies: + acorn: ^8.9.0 + + '@sveltejs/adapter-auto@6.0.1': + resolution: {integrity: sha512-mcWud3pYGPWM2Pphdj8G9Qiq24nZ8L4LB7coCUckUEy5Y7wOWGJ/enaZ4AtJTcSm5dNK1rIkBRoqt+ae4zlxcQ==} + peerDependencies: + '@sveltejs/kit': ^2.0.0 + + '@sveltejs/kit@2.21.0': + resolution: {integrity: sha512-kvu4h9qXduiPk1Q1oqFKDLFGu/7mslEYbVaqpbBcBxjlRJnvNCFwEvEwKt0Mx9TtSi8J77xRelvJobrGlst4nQ==} + engines: {node: '>=18.13'} + hasBin: true + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^3.0.0 || ^4.0.0-next.1 || ^5.0.0 + svelte: ^4.0.0 || ^5.0.0-next.0 + vite: ^5.0.3 || ^6.0.0 + + '@sveltejs/package@2.3.11': + resolution: {integrity: sha512-DSMt2U0XNAdoQBYksrmgQi5dKy7jUTVDJLiagS/iXF7AShjAmTbGJQKruBuT/FfYAWvNxfQTSjkXU8eAIjVeNg==} + engines: {node: ^16.14 || >=18} + hasBin: true + peerDependencies: + svelte: ^3.44.0 || ^4.0.0 || ^5.0.0-next.1 + + '@sveltejs/vite-plugin-svelte-inspector@4.0.1': + resolution: {integrity: sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^5.0.0 + svelte: ^5.0.0 + vite: ^6.0.0 + + '@sveltejs/vite-plugin-svelte@5.0.3': + resolution: {integrity: sha512-MCFS6CrQDu1yGwspm4qtli0e63vaPCehf6V7pIMP15AsWgMKrqDGCPFF/0kn4SP0ii4aySu4Pa62+fIRGFMjgw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} + peerDependencies: + svelte: ^5.0.0 + vite: ^6.0.0 + '@svitejs/changesets-changelog-github-compact@1.2.0': resolution: {integrity: sha512-08eKiDAjj4zLug1taXSIJ0kGL5cawjVCyJkBb6EWSg5fEPX6L+Wtr0CH2If4j5KYylz85iaZiFlUItvgJvll5g==} engines: {node: ^14.13.1 || ^16.0.0 || >=18} @@ -1698,6 +1789,9 @@ packages: '@types/conventional-commits-parser@5.0.1': resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + '@types/cors@2.8.17': resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} @@ -1921,14 +2015,20 @@ packages: '@vue/compiler-core@3.5.13': resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} + '@vue/compiler-core@3.5.14': + resolution: {integrity: sha512-k7qMHMbKvoCXIxPhquKQVw3Twid3Kg4s7+oYURxLGRd56LiuHJVrvFKI4fm2AM3c8apqODPfVJGoh8nePbXMRA==} + '@vue/compiler-dom@3.5.13': resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} - '@vue/compiler-sfc@3.5.13': - resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} + '@vue/compiler-dom@3.5.14': + resolution: {integrity: sha512-1aOCSqxGOea5I80U2hQJvXYpPm/aXo95xL/m/mMhgyPUsKe9jhjwWpziNAw7tYRnbz1I61rd9Mld4W9KmmRoug==} + + '@vue/compiler-sfc@3.5.14': + resolution: {integrity: sha512-9T6m/9mMr81Lj58JpzsiSIjBgv2LiVoWjIVa7kuXHICUi8LiDSIotMpPRXYJsXKqyARrzjT24NAwttrMnMaCXA==} - '@vue/compiler-ssr@3.5.13': - resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} + '@vue/compiler-ssr@3.5.14': + resolution: {integrity: sha512-Y0G7PcBxr1yllnHuS/NxNCSPWnRGH4Ogrp0tsLA5QemDZuJLs99YjAKQ7KqkHE0vCg4QTKlQzXLKCMF7WPSl7Q==} '@vue/compiler-vue2@2.7.16': resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} @@ -1941,23 +2041,26 @@ packages: typescript: optional: true - '@vue/reactivity@3.5.13': - resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} + '@vue/reactivity@3.5.14': + resolution: {integrity: sha512-7cK1Hp343Fu/SUCCO52vCabjvsYu7ZkOqyYu7bXV9P2yyfjUMUXHZafEbq244sP7gf+EZEz+77QixBTuEqkQQw==} - '@vue/runtime-core@3.5.13': - resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} + '@vue/runtime-core@3.5.14': + resolution: {integrity: sha512-w9JWEANwHXNgieAhxPpEpJa+0V5G0hz3NmjAZwlOebtfKyp2hKxKF0+qSh0Xs6/PhfGihuSdqMprMVcQU/E6ag==} - '@vue/runtime-dom@3.5.13': - resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} + '@vue/runtime-dom@3.5.14': + resolution: {integrity: sha512-lCfR++IakeI35TVR80QgOelsUIdcKjd65rWAMfdSlCYnaEY5t3hYwru7vvcWaqmrK+LpI7ZDDYiGU5V3xjMacw==} - '@vue/server-renderer@3.5.13': - resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} + '@vue/server-renderer@3.5.14': + resolution: {integrity: sha512-Rf/ISLqokIvcySIYnv3tNWq40PLpNLDLSJwwVWzG6MNtyIhfbcrAxo5ZL9nARJhqjZyWWa40oRb2IDuejeuv6w==} peerDependencies: - vue: 3.5.13 + vue: 3.5.14 '@vue/shared@3.5.13': resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + '@vue/shared@3.5.14': + resolution: {integrity: sha512-oXTwNxVfc9EtP1zzXAlSlgARLXNC84frFYkS0HHz0h3E4WZSP9sywqjqzGCP9Y34M8ipNmd380pVgmMuwELDyQ==} + JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -2102,6 +2205,10 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -2207,6 +2314,10 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -2276,6 +2387,10 @@ packages: cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + cookie@0.6.0: + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} + cookie@0.7.1: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} @@ -2352,6 +2467,9 @@ packages: decimal.js@10.5.0: resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} + dedent-js@1.0.1: + resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} + deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} @@ -2359,6 +2477,10 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -2391,6 +2513,9 @@ packages: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} + devalue@5.1.1: + resolution: {integrity: sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==} + diff@7.0.0: resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} engines: {node: '>=0.3.1'} @@ -2734,6 +2859,9 @@ packages: jiti: optional: true + esm-env@1.2.2: + resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + espree@10.3.0: resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2751,6 +2879,9 @@ packages: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} + esrap@1.4.6: + resolution: {integrity: sha512-F/D2mADJ9SHY3IwksD4DAXjTt7qt7GWUf3/8RhCNWmC/67tyb55dpimHmy7EplakFaflV0R/PC+fdSPqrRHAQw==} + esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -2826,6 +2957,14 @@ packages: picomatch: optional: true + fdir@6.4.4: + resolution: {integrity: sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -3182,6 +3321,9 @@ packages: is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + is-reference@3.0.3: + resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} + is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} @@ -3345,6 +3487,10 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -3447,6 +3593,9 @@ packages: resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==} engines: {node: '>=14'} + locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -3478,6 +3627,9 @@ packages: loupe@3.1.3: resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} + lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -3594,6 +3746,10 @@ packages: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} + mrmime@2.0.1: + resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} + engines: {node: '>=10'} + ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -3621,6 +3777,9 @@ packages: nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} + no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -3754,6 +3913,9 @@ packages: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -4159,6 +4321,9 @@ packages: resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} engines: {node: '>= 0.8.0'} + set-cookie-parser@2.7.1: + resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -4233,6 +4398,10 @@ packages: simple-git@3.27.0: resolution: {integrity: sha512-ivHoFS9Yi9GY49ogc6/YAi3Fl9ROnF4VyubNylgCkA+RVqLaKWnDSzXOVzya8csELIaWaYNutsEuAhZrtOjozA==} + sirv@3.0.1: + resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==} + engines: {node: '>=18'} + slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -4363,6 +4532,24 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + svelte-check@4.2.0: + resolution: {integrity: sha512-79ozTLjGBQ2R5PvZ7enSYBsMyY1fy3pwQ/N1BtuTVXtQRH9Vc10eV66LePV52t1ZlflZBTkIGz79cStPnCUEEQ==} + engines: {node: '>= 18.0.0'} + hasBin: true + peerDependencies: + svelte: ^4.0.0 || ^5.0.0-next.0 + typescript: '>=5.0.0' + + svelte2tsx@0.7.37: + resolution: {integrity: sha512-uQCWibXwUNPGQBGTZP1axIpFGFHTXXN30/ppodLVXCnX23U1nzEhqiVtFSEQjtUK3pFVxPhdnfyxD6ikxMCzPQ==} + peerDependencies: + svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 + typescript: ^4.9.4 || ^5.0.0 + + svelte@5.28.6: + resolution: {integrity: sha512-9qqr7mw8YR9PAnxGFfzCK6PUlNGtns7wVavrhnxyf3fpB1mP/Ol55Z2UnIapsSzNNl3k9qw7cZ22PdE8+xT/jQ==} + engines: {node: '>=18'} + symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -4412,6 +4599,10 @@ packages: resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.13: + resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==} + engines: {node: '>=12.0.0'} + tinypool@1.0.2: resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -4443,6 +4634,10 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + tough-cookie@5.1.1: resolution: {integrity: sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==} engines: {node: '>=16'} @@ -4681,6 +4876,54 @@ packages: yaml: optional: true + vite@6.3.5: + resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitefu@1.0.6: + resolution: {integrity: sha512-+Rex1GlappUyNN6UfwbVZne/9cYC4+R2XDk9xkNXBKMw6HQagdX9PgZ8V2v1WUSK1wfBLp7qbI1+XSNIlB1xmA==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + vite: + optional: true + vitest@3.0.9: resolution: {integrity: sha512-BbcFDqNyBlfSpATmTtXOAOj71RNKDDvjBM/uPfnxxVGrG+FSH2RQIwgeEngTaTkuU/h0ScFvf+tRcKfYXzBybQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -4729,8 +4972,8 @@ packages: peerDependencies: eslint: '>=6.0.0' - vue@3.5.13: - resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} + vue@3.5.14: + resolution: {integrity: sha512-LbOm50/vZFG6Mhy6KscQYXZMQ0LMCC/y40HDJPPvGFQ+i/lUH+PJHR6C3assgOQiXdl6tAfsXHbXYVBZZu65ew==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -4877,6 +5120,9 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zimmerframe@1.1.2: + resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} + zod@3.24.2: resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==} @@ -4961,8 +5207,12 @@ snapshots: '@babel/helper-string-parser@7.25.9': {} + '@babel/helper-string-parser@7.27.1': {} + '@babel/helper-validator-identifier@7.25.9': {} + '@babel/helper-validator-identifier@7.27.1': {} + '@babel/helper-validator-option@7.25.9': {} '@babel/helpers@7.26.9': @@ -4978,6 +5228,10 @@ snapshots: dependencies: '@babel/types': 7.26.9 + '@babel/parser@7.27.2': + dependencies: + '@babel/types': 7.27.1 + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.9)': dependencies: '@babel/core': 7.26.9 @@ -5024,6 +5278,11 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 + '@babel/types@7.27.1': + dependencies: + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 + '@changesets/apply-release-plan@7.0.10': dependencies: '@changesets/config': 3.1.1 @@ -5731,6 +5990,8 @@ snapshots: '@pkgr/core@0.1.1': {} + '@polka/url@1.0.0-next.29': {} + '@publint/pack@0.1.2': {} '@rollup/pluginutils@5.1.4(rollup@4.36.0)': @@ -5953,6 +6214,65 @@ snapshots: - supports-color - typescript + '@sveltejs/acorn-typescript@1.0.5(acorn@8.14.1)': + dependencies: + acorn: 8.14.1 + + '@sveltejs/adapter-auto@6.0.1(@sveltejs/kit@2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))': + dependencies: + '@sveltejs/kit': 2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + + '@sveltejs/kit@2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + dependencies: + '@sveltejs/acorn-typescript': 1.0.5(acorn@8.14.1) + '@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + '@types/cookie': 0.6.0 + acorn: 8.14.1 + cookie: 0.6.0 + devalue: 5.1.1 + esm-env: 1.2.2 + kleur: 4.1.5 + magic-string: 0.30.17 + mrmime: 2.0.1 + sade: 1.8.1 + set-cookie-parser: 2.7.1 + sirv: 3.0.1 + svelte: 5.28.6 + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + + '@sveltejs/package@2.3.11(svelte@5.28.6)(typescript@5.8.2)': + dependencies: + chokidar: 4.0.3 + kleur: 4.1.5 + sade: 1.8.1 + semver: 7.7.1 + svelte: 5.28.6 + svelte2tsx: 0.7.37(svelte@5.28.6)(typescript@5.8.2) + transitivePeerDependencies: + - typescript + + '@sveltejs/vite-plugin-svelte-inspector@4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + dependencies: + '@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + debug: 4.4.0 + svelte: 5.28.6 + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + transitivePeerDependencies: + - supports-color + + '@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + dependencies: + '@sveltejs/vite-plugin-svelte-inspector': 4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + debug: 4.4.0 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.17 + svelte: 5.28.6 + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vitefu: 1.0.6(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + transitivePeerDependencies: + - supports-color + '@svitejs/changesets-changelog-github-compact@1.2.0': dependencies: '@changesets/get-github-info': 0.6.0 @@ -6090,11 +6410,11 @@ snapshots: - typescript - vite - '@tanstack/vue-store@0.7.0(vue@3.5.13(typescript@5.8.2))': + '@tanstack/vue-store@0.7.0(vue@3.5.14(typescript@5.8.2))': dependencies: '@tanstack/store': 0.7.0 - vue: 3.5.13(typescript@5.8.2) - vue-demi: 0.14.10(vue@3.5.13(typescript@5.8.2)) + vue: 3.5.14(typescript@5.8.2) + vue-demi: 0.14.10(vue@3.5.14(typescript@5.8.2)) '@testing-library/dom@10.4.0': dependencies: @@ -6170,6 +6490,8 @@ snapshots: dependencies: '@types/node': 22.13.10 + '@types/cookie@0.6.0': {} + '@types/cors@2.8.17': dependencies: '@types/node': 22.13.10 @@ -6364,10 +6686,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@5.2.4(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))(vue@3.5.13(typescript@5.8.2))': + '@vitejs/plugin-vue@5.2.4(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))(vue@3.5.14(typescript@5.8.2))': dependencies: - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) - vue: 3.5.13(typescript@5.8.2) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vue: 3.5.14(typescript@5.8.2) '@vitest/coverage-istanbul@3.0.9(vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': dependencies: @@ -6392,13 +6714,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.9(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + '@vitest/mocker@3.0.9(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': dependencies: '@vitest/spy': 3.0.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) '@vitest/pretty-format@3.0.9': dependencies: @@ -6445,27 +6767,40 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.1 + '@vue/compiler-core@3.5.14': + dependencies: + '@babel/parser': 7.27.2 + '@vue/shared': 3.5.14 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + '@vue/compiler-dom@3.5.13': dependencies: '@vue/compiler-core': 3.5.13 '@vue/shared': 3.5.13 - '@vue/compiler-sfc@3.5.13': + '@vue/compiler-dom@3.5.14': dependencies: - '@babel/parser': 7.26.10 - '@vue/compiler-core': 3.5.13 - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 + '@vue/compiler-core': 3.5.14 + '@vue/shared': 3.5.14 + + '@vue/compiler-sfc@3.5.14': + dependencies: + '@babel/parser': 7.27.2 + '@vue/compiler-core': 3.5.14 + '@vue/compiler-dom': 3.5.14 + '@vue/compiler-ssr': 3.5.14 + '@vue/shared': 3.5.14 estree-walker: 2.0.2 magic-string: 0.30.17 postcss: 8.5.3 source-map-js: 1.2.1 - '@vue/compiler-ssr@3.5.13': + '@vue/compiler-ssr@3.5.14': dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/shared': 3.5.13 + '@vue/compiler-dom': 3.5.14 + '@vue/shared': 3.5.14 '@vue/compiler-vue2@2.7.16': dependencies: @@ -6485,30 +6820,32 @@ snapshots: optionalDependencies: typescript: 5.8.2 - '@vue/reactivity@3.5.13': + '@vue/reactivity@3.5.14': dependencies: - '@vue/shared': 3.5.13 + '@vue/shared': 3.5.14 - '@vue/runtime-core@3.5.13': + '@vue/runtime-core@3.5.14': dependencies: - '@vue/reactivity': 3.5.13 - '@vue/shared': 3.5.13 + '@vue/reactivity': 3.5.14 + '@vue/shared': 3.5.14 - '@vue/runtime-dom@3.5.13': + '@vue/runtime-dom@3.5.14': dependencies: - '@vue/reactivity': 3.5.13 - '@vue/runtime-core': 3.5.13 - '@vue/shared': 3.5.13 + '@vue/reactivity': 3.5.14 + '@vue/runtime-core': 3.5.14 + '@vue/shared': 3.5.14 csstype: 3.1.3 - '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.8.2))': + '@vue/server-renderer@3.5.14(vue@3.5.14(typescript@5.8.2))': dependencies: - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 - vue: 3.5.13(typescript@5.8.2) + '@vue/compiler-ssr': 3.5.14 + '@vue/shared': 3.5.14 + vue: 3.5.14(typescript@5.8.2) '@vue/shared@3.5.13': {} + '@vue/shared@3.5.14': {} + JSONStream@1.3.5: dependencies: jsonparse: 1.3.1 @@ -6659,6 +6996,8 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 + axobject-query@4.1.0: {} + balanced-match@1.0.2: {} better-path-resolve@1.0.0: @@ -6779,6 +7118,8 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + clsx@2.1.1: {} + color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -6841,6 +7182,8 @@ snapshots: cookie-signature@1.0.6: {} + cookie@0.6.0: {} + cookie@0.7.1: {} cors@2.8.5: @@ -6912,10 +7255,14 @@ snapshots: decimal.js@10.5.0: {} + dedent-js@1.0.1: {} + deep-eql@5.0.2: {} deep-is@0.1.4: {} + deepmerge@4.3.1: {} + define-data-property@1.1.4: dependencies: es-define-property: 1.0.1 @@ -6940,6 +7287,8 @@ snapshots: detect-libc@2.0.3: {} + devalue@5.1.1: {} + diff@7.0.0: {} dir-glob@3.0.1: @@ -7398,6 +7747,8 @@ snapshots: transitivePeerDependencies: - supports-color + esm-env@1.2.2: {} + espree@10.3.0: dependencies: acorn: 8.14.1 @@ -7416,6 +7767,10 @@ snapshots: dependencies: estraverse: 5.3.0 + esrap@1.4.6: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -7526,6 +7881,10 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fdir@6.4.4(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -7893,6 +8252,10 @@ snapshots: is-potential-custom-element-name@1.0.1: {} + is-reference@3.0.3: + dependencies: + '@types/estree': 1.0.6 + is-regex@1.2.1: dependencies: call-bound: 1.0.3 @@ -8078,6 +8441,8 @@ snapshots: dependencies: json-buffer: 3.0.1 + kleur@4.1.5: {} + kolorist@1.8.0: {} kysely@0.27.6: @@ -8172,6 +8537,8 @@ snapshots: mlly: 1.7.4 pkg-types: 1.3.1 + locate-character@3.0.0: {} + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -8202,6 +8569,10 @@ snapshots: loupe@3.1.3: {} + lower-case@2.0.2: + dependencies: + tslib: 2.8.1 + lru-cache@10.4.3: {} lru-cache@5.1.1: @@ -8301,6 +8672,8 @@ snapshots: mri@1.2.0: {} + mrmime@2.0.1: {} + ms@2.0.0: {} ms@2.1.3: {} @@ -8321,6 +8694,11 @@ snapshots: nice-try@1.0.5: {} + no-case@3.0.4: + dependencies: + lower-case: 2.0.2 + tslib: 2.8.1 + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 @@ -8451,6 +8829,11 @@ snapshots: parseurl@1.3.3: {} + pascal-case@3.1.2: + dependencies: + no-case: 3.0.4 + tslib: 2.8.1 + path-browserify@1.0.1: {} path-exists@4.0.0: {} @@ -8876,6 +9259,8 @@ snapshots: transitivePeerDependencies: - supports-color + set-cookie-parser@2.7.1: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -8968,6 +9353,12 @@ snapshots: transitivePeerDependencies: - supports-color + sirv@3.0.1: + dependencies: + '@polka/url': 1.0.0-next.29 + mrmime: 2.0.1 + totalist: 3.0.1 + slash@3.0.0: {} slice-ansi@5.0.0: @@ -9114,6 +9505,42 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + svelte-check@4.2.0(picomatch@4.0.2)(svelte@5.28.6)(typescript@5.8.2): + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + chokidar: 4.0.3 + fdir: 6.4.4(picomatch@4.0.2) + picocolors: 1.1.1 + sade: 1.8.1 + svelte: 5.28.6 + typescript: 5.8.2 + transitivePeerDependencies: + - picomatch + + svelte2tsx@0.7.37(svelte@5.28.6)(typescript@5.8.2): + dependencies: + dedent-js: 1.0.1 + pascal-case: 3.1.2 + svelte: 5.28.6 + typescript: 5.8.2 + + svelte@5.28.6: + dependencies: + '@ampproject/remapping': 2.3.0 + '@jridgewell/sourcemap-codec': 1.5.0 + '@sveltejs/acorn-typescript': 1.0.5(acorn@8.14.1) + '@types/estree': 1.0.6 + acorn: 8.14.1 + aria-query: 5.3.2 + axobject-query: 4.1.0 + clsx: 2.1.1 + esm-env: 1.2.2 + esrap: 1.4.6 + is-reference: 3.0.3 + locate-character: 3.0.0 + magic-string: 0.30.17 + zimmerframe: 1.1.2 + symbol-tree@3.2.4: {} synckit@0.9.2: @@ -9156,6 +9583,11 @@ snapshots: fdir: 6.4.3(picomatch@4.0.2) picomatch: 4.0.2 + tinyglobby@0.2.13: + dependencies: + fdir: 6.4.4(picomatch@4.0.2) + picomatch: 4.0.2 + tinypool@1.0.2: {} tinyrainbow@2.0.0: {} @@ -9178,6 +9610,8 @@ snapshots: toidentifier@1.0.1: {} + totalist@3.0.1: {} + tough-cookie@5.1.1: dependencies: tldts: 6.1.78 @@ -9358,7 +9792,7 @@ snapshots: debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 2.0.3 - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) transitivePeerDependencies: - '@types/node' - jiti @@ -9420,10 +9854,30 @@ snapshots: tsx: 4.19.3 yaml: 2.7.0 + vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0): + dependencies: + esbuild: 0.25.1 + fdir: 6.4.4(picomatch@4.0.2) + picomatch: 4.0.2 + postcss: 8.5.3 + rollup: 4.36.0 + tinyglobby: 0.2.13 + optionalDependencies: + '@types/node': 22.13.10 + fsevents: 2.3.3 + jiti: 2.4.2 + lightningcss: 1.29.2 + tsx: 4.19.3 + yaml: 2.7.0 + + vitefu@1.0.6(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)): + optionalDependencies: + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0): dependencies: '@vitest/expect': 3.0.9 - '@vitest/mocker': 3.0.9(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + '@vitest/mocker': 3.0.9(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) '@vitest/pretty-format': 3.0.9 '@vitest/runner': 3.0.9 '@vitest/snapshot': 3.0.9 @@ -9439,7 +9893,7 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) vite-node: 3.0.9(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: @@ -9462,9 +9916,9 @@ snapshots: vscode-uri@3.1.0: {} - vue-demi@0.14.10(vue@3.5.13(typescript@5.8.2)): + vue-demi@0.14.10(vue@3.5.14(typescript@5.8.2)): dependencies: - vue: 3.5.13(typescript@5.8.2) + vue: 3.5.14(typescript@5.8.2) vue-eslint-parser@9.4.3(eslint@9.22.0(jiti@2.4.2)): dependencies: @@ -9479,13 +9933,13 @@ snapshots: transitivePeerDependencies: - supports-color - vue@3.5.13(typescript@5.8.2): + vue@3.5.14(typescript@5.8.2): dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-sfc': 3.5.13 - '@vue/runtime-dom': 3.5.13 - '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.8.2)) - '@vue/shared': 3.5.13 + '@vue/compiler-dom': 3.5.14 + '@vue/compiler-sfc': 3.5.14 + '@vue/runtime-dom': 3.5.14 + '@vue/server-renderer': 3.5.14(vue@3.5.14(typescript@5.8.2)) + '@vue/shared': 3.5.14 optionalDependencies: typescript: 5.8.2 @@ -9633,4 +10087,6 @@ snapshots: yocto-queue@0.1.0: {} + zimmerframe@1.1.2: {} + zod@3.24.2: {} From a7303792c09c8ae1e4451de535ac8b21f9839457 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Wed, 14 May 2025 21:41:14 -0700 Subject: [PATCH 02/16] feat: add Svelte support --- packages/svelte-db/README.md | 59 +- packages/svelte-db/package.json | 24 +- packages/svelte-db/src/lib/index.ts | 11 +- .../svelte-db/src/lib/useLiveQuery.svelte.ts | 69 ++ .../src/lib/useOptimisticMutation.ts | 15 + .../tests/useLiveQuery.svelte.test.ts | 852 ++++++++++++++++++ packages/svelte-db/vite.config.ts | 18 +- pnpm-lock.yaml | 65 +- 8 files changed, 1032 insertions(+), 81 deletions(-) create mode 100644 packages/svelte-db/src/lib/useLiveQuery.svelte.ts create mode 100644 packages/svelte-db/src/lib/useOptimisticMutation.ts create mode 100644 packages/svelte-db/tests/useLiveQuery.svelte.test.ts diff --git a/packages/svelte-db/README.md b/packages/svelte-db/README.md index 9410ac8..1d5b574 100644 --- a/packages/svelte-db/README.md +++ b/packages/svelte-db/README.md @@ -1,58 +1,3 @@ -# Svelte library +# @tanstack/react-db -Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv). - -Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npx sv create - -# create a new project in my-app -npx sv create my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app. - -## Building - -To build your library: - -```bash -npm run package -``` - -To create a production version of your showcase app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. - -## Publishing - -Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)). - -To publish your library to [npm](https://www.npmjs.com): - -```bash -npm publish -``` +Svelte hooks for TanStack DB. See [TanStack/db](https://github.com/TanStack/db) for more details. diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index 399b5d6..411a707 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -9,7 +9,8 @@ "prepare": "svelte-kit sync || echo ''", "prepack": "svelte-kit sync && svelte-package && publint", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "test": "npx vitest --run" }, "files": [ "dist", @@ -28,19 +29,24 @@ "svelte": "./dist/index.js" } }, + "dependencies": { + "@tanstack/db": "workspace:*", + "@tanstack/svelte-store": "^0.7.0" + }, "peerDependencies": { "svelte": "^5.0.0" }, "devDependencies": { - "@sveltejs/adapter-auto": "^6.0.0", - "@sveltejs/kit": "^2.16.0", - "@sveltejs/package": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^5.0.0", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/svelte": "^5.2.4", + "@sveltejs/adapter-auto": "^6.0.1", + "@sveltejs/kit": "^2.21.0", + "@sveltejs/package": "^2.3.11", + "@vitest/coverage-istanbul": "^3.0.9", + "@sveltejs/vite-plugin-svelte": "^5.0.3", "publint": "^0.3.2", - "svelte": "^5.0.0", - "svelte-check": "^4.0.0", - "typescript": "^5.0.0", - "vite": "^6.2.6" + "svelte": "^5.28.6", + "svelte-check": "^4.2.0" }, "keywords": [ "optimistic", diff --git a/packages/svelte-db/src/lib/index.ts b/packages/svelte-db/src/lib/index.ts index 47d3c46..ed5cd00 100644 --- a/packages/svelte-db/src/lib/index.ts +++ b/packages/svelte-db/src/lib/index.ts @@ -1 +1,10 @@ -// Reexport your entry components here +// Re-export all public APIs +export * from "./useOptimisticMutation.js" +export * from "./useLiveQuery.svelte.js" + +// Re-export everything from @tanstack/db +export * from "@tanstack/db" + +// Re-export some stuff explicitly to ensure the type & value is exported +export { Collection } from "@tanstack/db" +export { createTransaction } from "@tanstack/db" diff --git a/packages/svelte-db/src/lib/useLiveQuery.svelte.ts b/packages/svelte-db/src/lib/useLiveQuery.svelte.ts new file mode 100644 index 0000000..091fc8e --- /dev/null +++ b/packages/svelte-db/src/lib/useLiveQuery.svelte.ts @@ -0,0 +1,69 @@ +import { useStore } from "@tanstack/svelte-store" +import { compileQuery, queryBuilder } from "@tanstack/db" +import type { + Collection, + Context, + InitialQueryBuilder, + QueryBuilder, + ResultsFromContext, + Schema, +} from "@tanstack/db" + +type ComputedRef = { + get current(): T +} + +type Getter = () => T + +function toValue() {} + +export interface UseLiveQueryReturn { + state: Map + data: Array + collection: Collection +} + +export function useLiveQuery< + TResultContext extends Context = Context, +>( + queryFn: ( + q: InitialQueryBuilder> + ) => QueryBuilder, + deps: Array> = [] +): UseLiveQueryReturn> { + const compiledQuery = $derived.by(() => { + // Just reference deps to make derived reactive to them + // deps.forEach((dep) => toValue(dep)) + + const query = queryFn(queryBuilder()) + const compiled = compileQuery(query) + compiled.start() + return compiled + }) + + const state = $derived(useStore(compiledQuery.results.derivedState).current) + const data = $derived(useStore(compiledQuery.results.derivedArray).current) + const collection = $derived(compiledQuery.results) + + $effect(() => { + if (compiledQuery.state === `stopped`) { + compiledQuery.start() + } + + return () => { + compiledQuery.stop() + } + }) + + return { + get state() { + return state + }, + get data() { + return data + }, + get collection() { + return collection as any + }, + } +} diff --git a/packages/svelte-db/src/lib/useOptimisticMutation.ts b/packages/svelte-db/src/lib/useOptimisticMutation.ts new file mode 100644 index 0000000..c8b1b84 --- /dev/null +++ b/packages/svelte-db/src/lib/useOptimisticMutation.ts @@ -0,0 +1,15 @@ +import { createTransaction } from "@tanstack/db" +import type { Transaction, TransactionConfig } from "@tanstack/db" + +export function useOptimisticMutation(config: TransactionConfig) { + return { + mutate: (callback: () => void): Transaction => { + const transaction = createTransaction(config) + transaction.mutate(callback) + return transaction + }, + createTransaction: (): Transaction => { + return createTransaction({ ...config, autoCommit: false }) + }, + } +} diff --git a/packages/svelte-db/tests/useLiveQuery.svelte.test.ts b/packages/svelte-db/tests/useLiveQuery.svelte.test.ts new file mode 100644 index 0000000..1d196fc --- /dev/null +++ b/packages/svelte-db/tests/useLiveQuery.svelte.test.ts @@ -0,0 +1,852 @@ +import { afterEach, describe, expect, it, test, vi } from "vitest" +import mitt from "mitt" +import { Collection, createTransaction } from "@tanstack/db" +import { act } from "@testing-library/svelte" +import { flushSync } from "svelte" +import type { + Context, + InitialQueryBuilder, + PendingMutation, + Schema, +} from "@tanstack/db" +import { useLiveQuery } from "$lib/useLiveQuery.svelte.js" + +type Person = { + id: string + name: string + age: number + email: string + isActive: boolean + team: string +} + +type Issue = { + id: string + title: string + description: string + userId: string +} + +const initialPersons: Array = [ + { + id: `1`, + name: `John Doe`, + age: 30, + email: `john.doe@example.com`, + isActive: true, + team: `team1`, + }, + { + id: `2`, + name: `Jane Doe`, + age: 25, + email: `jane.doe@example.com`, + isActive: true, + team: `team2`, + }, + { + id: `3`, + name: `John Smith`, + age: 35, + email: `john.smith@example.com`, + isActive: true, + team: `team1`, + }, +] + +const initialIssues: Array = [ + { + id: `1`, + title: `Issue 1`, + description: `Issue 1 description`, + userId: `1`, + }, + { + id: `2`, + title: `Issue 2`, + description: `Issue 2 description`, + userId: `2`, + }, + { + id: `3`, + title: `Issue 3`, + description: `Issue 3 description`, + userId: `1`, + }, +] + +describe(`Query Collections`, () => { + let cleanup: (() => void) | null = null + + afterEach(() => { + cleanup?.() + }) + + it(`should be able to query a collection`, () => { + cleanup = $effect.root(() => { + const emitter = mitt() + + // Create collection with mutation capability + const collection = new Collection({ + id: `optimistic-changes-test`, + sync: { + sync: ({ begin, write, commit }) => { + // Listen for sync events + emitter.on(`*`, (_, changes) => { + begin() + ;(changes as Array).forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Person, + }) + }) + commit() + }) + }, + }, + }) + + // Sync from initial state + act(() => { + emitter.emit( + `sync`, + initialPersons.map((person) => ({ + key: person.id, + type: `insert`, + changes: person, + })) + ) + }) + + const result = useLiveQuery((q) => + q + .from({ collection }) + .where(`@age`, `>`, 30) + .keyBy(`@id`) + .select(`@id`, `@name`) + .orderBy({ "@id": `asc` }) + ) + + expect(result.state.size).toBe(1) + expect(result.state.get(`3`)).toEqual({ + _orderByIndex: 0, + id: `3`, + name: `John Smith`, + }) + + expect(result.data.length).toBe(1) + expect(result.data[0]).toEqual({ + _orderByIndex: 0, + id: `3`, + name: `John Smith`, + }) + + // Insert a new person + act(() => { + emitter.emit(`sync`, [ + { + key: `4`, + type: `insert`, + changes: { + id: `4`, + name: `Kyle Doe`, + age: 40, + email: `kyle.doe@example.com`, + isActive: true, + }, + }, + ]) + }) + + flushSync() + + expect(result.state.size).toBe(2) + expect(result.state.get(`3`)).toEqual({ + _orderByIndex: 0, + id: `3`, + name: `John Smith`, + }) + expect(result.state.get(`4`)).toEqual({ + _orderByIndex: 1, + id: `4`, + name: `Kyle Doe`, + }) + + expect(result.data.length).toBe(2) + expect(result.data).toContainEqual({ + _orderByIndex: 0, + id: `3`, + name: `John Smith`, + }) + expect(result.data).toContainEqual({ + _orderByIndex: 1, + id: `4`, + name: `Kyle Doe`, + }) + + // Update the person + emitter.emit(`sync`, [ + { + key: `4`, + type: `update`, + changes: { + name: `Kyle Doe 2`, + }, + }, + ]) + + flushSync() + + expect(result.state.size).toBe(2) + expect(result.state.get(`4`)).toEqual({ + _orderByIndex: 1, + id: `4`, + name: `Kyle Doe 2`, + }) + + expect(result.data.length).toBe(2) + expect(result.data).toContainEqual({ + _orderByIndex: 1, + id: `4`, + name: `Kyle Doe 2`, + }) + + // Delete the person + emitter.emit(`sync`, [ + { + key: `4`, + type: `delete`, + }, + ]) + + flushSync() + + expect(result.state.size).toBe(1) + expect(result.state.get(`4`)).toBeUndefined() + + expect(result.data.length).toBe(1) + expect(result.data).toContainEqual({ + _orderByIndex: 0, + id: `3`, + name: `John Smith`, + }) + }) + }) + + it.skip(`should join collections and return combined results`, () => { + const cleanup = $effect.root(() => { + const emitter = mitt() + + // Create person collection + const personCollection = new Collection({ + id: `person-collection-test`, + sync: { + sync: ({ begin, write, commit }) => { + emitter.on(`sync-person`, (changes) => { + begin() + ;(changes as Array).forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Person, + }) + }) + commit() + }) + }, + }, + }) + + // Create issue collection + const issueCollection = new Collection({ + id: `issue-collection-test`, + sync: { + sync: ({ begin, write, commit }) => { + emitter.on(`sync-issue`, (changes) => { + begin() + ;(changes as Array).forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Issue, + }) + }) + commit() + }) + }, + }, + }) + + // Sync initial person data + emitter.emit( + `sync-person`, + initialPersons.map((person) => ({ + key: person.id, + type: `insert`, + changes: person, + })) + ) + + // Sync initial issue data + emitter.emit( + `sync-issue`, + initialIssues.map((issue) => ({ + key: issue.id, + type: `insert`, + changes: issue, + })) + ) + + const result = useLiveQuery((q) => + q + .from({ issues: issueCollection }) + .join({ + type: `inner`, + from: { persons: personCollection }, + on: [`@persons.id`, `=`, `@issues.userId`], + }) + .select(`@issues.id`, `@issues.title`, `@persons.name`) + .keyBy(`@id`) + ) + + flushSync() + + // Verify that we have the expected joined results + expect(result.state.size).toBe(3) + + expect(result.state.get(`1`)).toEqual({ + id: `1`, + name: `John Doe`, + title: `Issue 1`, + }) + + expect(result.state.get(`2`)).toEqual({ + id: `2`, + name: `Jane Doe`, + title: `Issue 2`, + }) + + expect(result.state.get(`3`)).toEqual({ + id: `3`, + name: `John Doe`, + title: `Issue 3`, + }) + + // Add a new issue for user 1 + emitter.emit(`sync-issue`, [ + { + key: `4`, + type: `insert`, + changes: { + id: `4`, + title: `Issue 4`, + description: `Issue 4 description`, + userId: `2`, + }, + }, + ]) + + flushSync() + + expect(result.state.size).toBe(4) + expect(result.state.get(`4`)).toEqual({ + id: `4`, + name: `Jane Doe`, + title: `Issue 4`, + }) + + // Update an issue we're already joined with + emitter.emit(`sync-issue`, [ + { + key: `2`, + type: `update`, + changes: { + title: `Updated Issue 2`, + }, + }, + ]) + + flushSync() + + // The updated title should be reflected in the joined results + expect(result.state.get(`2`)).toEqual({ + id: `2`, + name: `Jane Doe`, + title: `Updated Issue 2`, + }) + + // Delete an issue + emitter.emit(`sync-issue`, [ + { + key: `3`, + type: `delete`, + }, + ]) + + flushSync() + + // After deletion, user 3 should no longer have a joined result + expect(result.state.get(`3`)).toBeUndefined() + }) + + cleanup() + }) + + it.skip(`should recompile query when parameters change and change results`, () => { + const cleanup = $effect.root(() => { + const emitter = mitt() + + // Create collection with mutation capability + const collection = new Collection({ + id: `params-change-test`, + sync: { + sync: ({ begin, write, commit }) => { + // Listen for sync events + emitter.on(`sync`, (changes) => { + begin() + ;(changes as Array).forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Person, + }) + }) + commit() + }) + }, + }, + }) + + // Sync from initial state + emitter.emit( + `sync`, + initialPersons.map((person) => ({ + key: person.id, + type: `insert`, + changes: person, + })) + ) + + let minAge = $state(30) + + const result = useLiveQuery((q) => { + return q + .from({ collection }) + .where(`@age`, `>`, minAge) + .keyBy(`@id`) + .select(`@id`, `@name`, `@age`) + }) + + // Initially should return only people older than 30 + expect(result.state.size).toBe(1) + expect(result.state.get(`3`)).toEqual({ + id: `3`, + name: `John Smith`, + age: 35, + }) + + // Change the parameter to include more people + minAge = 20 + + flushSync() + + // Now should return all people as they're all older than 20 + expect(result.state.size).toBe(3) + expect(result.state.get(`1`)).toEqual({ + id: `1`, + name: `John Doe`, + age: 30, + }) + expect(result.state.get(`2`)).toEqual({ + id: `2`, + name: `Jane Doe`, + age: 25, + }) + expect(result.state.get(`3`)).toEqual({ + id: `3`, + name: `John Smith`, + age: 35, + }) + + // Change to exclude everyone + minAge = 50 + + flushSync() + + // Should now be empty + expect(result.state.size).toBe(0) + }) + }) + + // it(`should stop old query when parameters change`, async () => { + // const emitter = mitt() + + // // Create collection with mutation capability + // const collection = new Collection({ + // id: `stop-query-test`, + // sync: { + // sync: ({ begin, write, commit }) => { + // emitter.on(`sync`, (changes) => { + // begin() + // ;(changes as Array).forEach((change) => { + // write({ + // key: change.key, + // type: change.type, + // value: change.changes as Person, + // }) + // }) + // commit() + // }) + // }, + // }, + // }) + + // // Mock console.log to track when compiledQuery.stop() is called + // let logCalls: Array = [] + // const originalConsoleLog = console.log + // console.log = vi.fn((...args) => { + // logCalls.push(args.join(` `)) + // originalConsoleLog(...args) + // }) + + // // Add a custom hook that wraps useLiveQuery to log when queries are created and stopped + // function useTrackedLiveQuery( + // queryFn: (q: InitialQueryBuilder>) => any, + // deps: Array> + // ): T { + // const result = useLiveQuery(queryFn, deps) + + // watch( + // () => deps.map((dep) => dep.value).join(`,`), + // (updatedDeps, _, fn) => { + // console.log(`Creating new query with deps`, updatedDeps) + // fn(() => console.log(`Stopping query with deps`, updatedDeps)) + // }, + // { immediate: true } + // ) + + // return result as T + // } + + // // Sync initial state + // emitter.emit( + // `sync`, + // initialPersons.map((person) => ({ + // key: person.id, + // type: `insert`, + // changes: person, + // })) + // ) + + // const minAge = ref(30) + // useTrackedLiveQuery( + // (q) => + // q + // .from({ collection }) + // .where(`@age`, `>`, minAge.value) + // .keyBy(`@id`) + // .select(`@id`, `@name`), + // [minAge] + // ) + + // // Initial query should be created + // expect( + // logCalls.some((call) => call.includes(`Creating new query with deps 30`)) + // ).toBe(true) + + // // Clear log calls + // logCalls = [] + + // // Change the parameter + // minAge.value = 25 + + // flushSync() + + // // Old query should be stopped and new query created + // expect( + // logCalls.some((call) => call.includes(`Stopping query with deps 30`)) + // ).toBe(true) + // expect( + // logCalls.some((call) => call.includes(`Creating new query with deps 25`)) + // ).toBe(true) + + // // Restore console.log + // console.log = originalConsoleLog + // }) + + // it(`should be able to query a result collection`, async () => { + // const emitter = mitt() + + // // Create collection with mutation capability + // const collection = new Collection({ + // id: `optimistic-changes-test`, + // sync: { + // sync: ({ begin, write, commit }) => { + // // Listen for sync events + // emitter.on(`*`, (_, changes) => { + // begin() + // ;(changes as Array).forEach((change) => { + // write({ + // key: change.key, + // type: change.type, + // value: change.changes as Person, + // }) + // }) + // commit() + // }) + // }, + // }, + // }) + + // // Sync from initial state + // emitter.emit( + // `sync`, + // initialPersons.map((person) => ({ + // key: person.id, + // type: `insert`, + // changes: person, + // })) + // ) + + // // Initial query + // const result = useLiveQuery((q) => + // q + // .from({ collection }) + // .where(`@age`, `>`, 30) + // .keyBy(`@id`) + // .select(`@id`, `@name`, `@team`) + // .orderBy({ "@id": `asc` }) + // ) + + // // Grouped query derived from initial query + // const groupedResult = useLiveQuery((q) => + // q + // .from({ queryResult: result.collection.value }) + // .groupBy(`@team`) + // .keyBy(`@team`) + // .select(`@team`, { count: { COUNT: `@id` } }) + // ) + + // // Verify initial grouped results + // expect(groupedResult.result.state.size).toBe(1) + // expect(groupedResult.result.state.get(`team1`)).toEqual({ + // team: `team1`, + // count: 1, + // }) + + // // Insert two new users in different teams + // emitter.emit(`sync`, [ + // { + // key: `5`, + // type: `insert`, + // changes: { + // id: `5`, + // name: `Sarah Jones`, + // age: 32, + // email: `sarah.jones@example.com`, + // isActive: true, + // team: `team1`, + // }, + // }, + // { + // key: `6`, + // type: `insert`, + // changes: { + // id: `6`, + // name: `Mike Wilson`, + // age: 38, + // email: `mike.wilson@example.com`, + // isActive: true, + // team: `team2`, + // }, + // }, + // ]) + + // flushSync() + + // // Verify the grouped results include the new team members + // expect(groupedResult.result.state.size).toBe(2) + // expect(groupedResult.result.state.get(`team1`)).toEqual({ + // team: `team1`, + // count: 2, + // }) + // expect(groupedResult.result.state.get(`team2`)).toEqual({ + // team: `team2`, + // count: 1, + // }) + // }) + + it.skip(`optimistic state is dropped after commit`, () => { + const cleanup = $effect.root(() => { + const emitter = mitt() + // Track renders and states + const renderStates: Array<{ + stateSize: number + hasTempKey: boolean + hasPermKey: boolean + timestamp: number + }> = [] + + // Create person collection + const personCollection = new Collection({ + id: `person-collection-test-bug`, + sync: { + sync: ({ begin, write, commit }) => { + // @ts-expect-error Mitt typing doesn't match our usage + emitter.on(`sync-person`, (changes: Array) => { + begin() + changes.forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Person, + }) + }) + commit() + }) + }, + }, + }) + + // Create issue collection + const issueCollection = new Collection({ + id: `issue-collection-test-bug`, + sync: { + sync: ({ begin, write, commit }) => { + // @ts-expect-error Mitt typing doesn't match our usage + emitter.on(`sync-issue`, (changes: Array) => { + begin() + changes.forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Issue, + }) + }) + commit() + }) + }, + }, + }) + + // Sync initial person data + emitter.emit( + `sync-person`, + initialPersons.map((person) => ({ + key: person.id, + type: `insert`, + changes: person, + })) + ) + + // Sync initial issue data + emitter.emit( + `sync-issue`, + initialIssues.map((issue) => ({ + key: issue.id, + type: `insert`, + changes: issue, + })) + ) + + // Render the hook with a query that joins persons and issues + const result = useLiveQuery((q) => + q + .from({ issues: issueCollection }) + .join({ + type: `inner`, + from: { persons: personCollection }, + on: [`@persons.id`, `=`, `@issues.userId`], + }) + .select(`@issues.id`, `@issues.title`, `@persons.name`) + .keyBy(`@id`) + ) + + // Track each render state + $effect(() => { + renderStates.push({ + stateSize: result.state.size, + hasTempKey: result.state.has(`temp-key`), + hasPermKey: result.state.has(`4`), + timestamp: Date.now(), + }) + }) + + flushSync() + + // Verify initial state + expect(result.state.size).toBe(3) + + // Reset render states array for clarity in the remaining test + renderStates.length = 0 + + // Create a transaction to perform an optimistic mutation + const tx = createTransaction({ + mutationFn: async () => { + emitter.emit(`sync-issue`, [ + { + key: `4`, + type: `insert`, + changes: { + id: `4`, + title: `New Issue`, + description: `New Issue Description`, + userId: `1`, + }, + }, + ]) + return Promise.resolve() + }, + }) + + // Perform optimistic insert of a new issue + tx.mutate(() => + issueCollection.insert( + { + id: `temp-key`, + title: `New Issue`, + description: `New Issue Description`, + userId: `1`, + }, + { key: `temp-key` } + ) + ) + + // Verify optimistic state is immediately reflected + expect(result.state.size).toBe(4) + expect(result.state.get(`temp-key`)).toEqual({ + id: `temp-key`, + name: `John Doe`, + title: `New Issue`, + }) + + // Wait for the transaction to be committed + tx.isPersisted.promise.then(() => {}) + flushSync() + + // Check if we had any render where the temp key was removed but the permanent key wasn't added yet + const hadFlicker = renderStates.some( + (state) => + !state.hasTempKey && !state.hasPermKey && state.stateSize === 3 + ) + + expect(hadFlicker).toBe(false) + + // Verify the temporary key is replaced by the permanent one + expect(result.state.size).toBe(4) + expect(result.state.get(`temp-key`)).toBeUndefined() + expect(result.state.get(`4`)).toEqual({ + id: `4`, + name: `John Doe`, + title: `New Issue`, + }) + }) + + cleanup() + }) +}) + +async function waitForChanges(ms = 0) { + await new Promise((resolve) => setTimeout(resolve, ms)) +} diff --git a/packages/svelte-db/vite.config.ts b/packages/svelte-db/vite.config.ts index 5b29b3a..4c87e64 100644 --- a/packages/svelte-db/vite.config.ts +++ b/packages/svelte-db/vite.config.ts @@ -1,6 +1,20 @@ +import { svelteTesting } from "@testing-library/svelte/vite" import { sveltekit } from "@sveltejs/kit/vite" -import { defineConfig } from "vite" +import { defineConfig } from "vitest/config" +import packageJson from "./package.json" with { type: "json" } export default defineConfig({ - plugins: [sveltekit()], + plugins: [sveltekit(), svelteTesting()], + test: { + name: packageJson.name, + dir: `./tests`, + watch: false, + environment: `jsdom`, + // coverage: { + // enabled: true, + // provider: `istanbul`, + // include: [`src/lib/**/*`], + // }, + typecheck: { enabled: true }, + }, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a8bef0b..8c30009 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -282,34 +282,44 @@ importers: version: 19.0.0(react@19.0.0) packages/svelte-db: + dependencies: + '@tanstack/db': + specifier: workspace:* + version: link:../db + '@tanstack/svelte-store': + specifier: ^0.7.0 + version: 0.7.0(svelte@5.28.6) devDependencies: '@sveltejs/adapter-auto': - specifier: ^6.0.0 + specifier: ^6.0.1 version: 6.0.1(@sveltejs/kit@2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))) '@sveltejs/kit': - specifier: ^2.16.0 + specifier: ^2.21.0 version: 2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) '@sveltejs/package': - specifier: ^2.0.0 + specifier: ^2.3.11 version: 2.3.11(svelte@5.28.6)(typescript@5.8.2) '@sveltejs/vite-plugin-svelte': - specifier: ^5.0.0 + specifier: ^5.0.3 version: 5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + '@testing-library/jest-dom': + specifier: ^6.6.3 + version: 6.6.3 + '@testing-library/svelte': + specifier: ^5.2.4 + version: 5.2.7(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + '@vitest/coverage-istanbul': + specifier: ^3.0.9 + version: 3.0.9(vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) publint: specifier: ^0.3.2 version: 0.3.9 svelte: - specifier: ^5.0.0 + specifier: ^5.28.6 version: 5.28.6 svelte-check: - specifier: ^4.0.0 + specifier: ^4.2.0 version: 4.2.0(picomatch@4.0.2)(svelte@5.28.6)(typescript@5.8.2) - typescript: - specifier: ^5.0.0 - version: 5.8.2 - vite: - specifier: ^6.2.6 - version: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) packages/vue-db: dependencies: @@ -1719,6 +1729,11 @@ packages: '@tanstack/store@0.7.0': resolution: {integrity: sha512-CNIhdoUsmD2NolYuaIs8VfWM467RK6oIBAW4nPEKZhg1smZ+/CwtCdpURgp7nxSqOaV9oKkzdWD80+bC66F/Jg==} + '@tanstack/svelte-store@0.7.0': + resolution: {integrity: sha512-FVuPuCLkGV/YcsJImIiJAZRh3s8DqI8C9jQMNXymELwsrpe538Vmb81fxHHNZx9MCtzsFcHfYOkImFB4r4QcfA==} + peerDependencies: + svelte: ^5.0.0 + '@tanstack/typedoc-config@0.1.0': resolution: {integrity: sha512-WaeDXvt9Dyds53SCOCZKGmwHdS6LGwNH7LyDeTtsmPW7zn7ApOaNyAPWlqjkEHGVd0ykvR+XA8CI8RPfLGGxmw==} engines: {node: '>=18'} @@ -1759,6 +1774,19 @@ packages: '@types/react-dom': optional: true + '@testing-library/svelte@5.2.7': + resolution: {integrity: sha512-aGhUaFmEXEVost4QOsbHUUbHLwi7ZZRRxAHFDO2Cmr0BZD3/3+XvaYEPq70Rdw0NRNjdqZHdARBEcrCOkPuAqw==} + engines: {node: '>= 10'} + peerDependencies: + svelte: ^3 || ^4 || ^5 || ^5.0.0-next.0 + vite: '*' + vitest: '*' + peerDependenciesMeta: + vite: + optional: true + vitest: + optional: true + '@tybys/wasm-util@0.9.0': resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} @@ -6389,6 +6417,11 @@ snapshots: '@tanstack/store@0.7.0': {} + '@tanstack/svelte-store@0.7.0(svelte@5.28.6)': + dependencies: + '@tanstack/store': 0.7.0 + svelte: 5.28.6 + '@tanstack/typedoc-config@0.1.0(typescript@5.8.2)': dependencies: typedoc: 0.27.9(typescript@5.8.2) @@ -6447,6 +6480,14 @@ snapshots: '@types/react': 19.0.12 '@types/react-dom': 19.0.4(@types/react@19.0.12) + '@testing-library/svelte@5.2.7(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + dependencies: + '@testing-library/dom': 10.4.0 + svelte: 5.28.6 + optionalDependencies: + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vitest: 3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + '@tybys/wasm-util@0.9.0': dependencies: tslib: 2.8.1 From 3ca1f6d61175cb0862a926bf0304e668296f5757 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 05:34:20 -0700 Subject: [PATCH 03/16] chore: fix tests --- packages/svelte-db/package.json | 15 +- packages/svelte-db/src/app.d.ts | 13 - packages/svelte-db/src/app.html | 12 - packages/svelte-db/src/{lib => }/index.ts | 0 packages/svelte-db/src/routes/+page.svelte | 3 - .../src/{lib => }/useLiveQuery.svelte.ts | 29 +- .../src/{lib => }/useOptimisticMutation.ts | 0 packages/svelte-db/static/favicon.png | Bin 1571 -> 0 bytes packages/svelte-db/svelte.config.js | 19 +- .../tests/useLiveQuery.svelte.test.ts | 523 +++++++++--------- packages/svelte-db/tsconfig.json | 28 +- packages/svelte-db/vite.config.ts | 15 +- 12 files changed, 310 insertions(+), 347 deletions(-) delete mode 100644 packages/svelte-db/src/app.d.ts delete mode 100644 packages/svelte-db/src/app.html rename packages/svelte-db/src/{lib => }/index.ts (100%) delete mode 100644 packages/svelte-db/src/routes/+page.svelte rename packages/svelte-db/src/{lib => }/useLiveQuery.svelte.ts (65%) rename packages/svelte-db/src/{lib => }/useOptimisticMutation.ts (100%) delete mode 100644 packages/svelte-db/static/favicon.png diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index 411a707..b8faf8e 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -3,14 +3,13 @@ "description": "Svelte integration for @tanstack/db", "version": "0.0.0", "scripts": { - "dev": "vite dev", - "build": "vite build && npm run prepack", - "preview": "vite preview", - "prepare": "svelte-kit sync || echo ''", - "prepack": "svelte-kit sync && svelte-package && publint", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "test": "npx vitest --run" + "test:types": "svelte-check --tsconfig ./tsconfig.json", + "test:eslint": "eslint ./src ./tests", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict", + "test": "npx vitest --run", + "build": "svelte-package --input ./src --output ./dist" }, "files": [ "dist", diff --git a/packages/svelte-db/src/app.d.ts b/packages/svelte-db/src/app.d.ts deleted file mode 100644 index c0c0816..0000000 --- a/packages/svelte-db/src/app.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// See https://svelte.dev/docs/kit/types#app.d.ts -// for information about these interfaces -declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface PageState {} - // interface Platform {} - } -} - -export {} diff --git a/packages/svelte-db/src/app.html b/packages/svelte-db/src/app.html deleted file mode 100644 index f22aeaa..0000000 --- a/packages/svelte-db/src/app.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - %sveltekit.head% - - -
%sveltekit.body%
- - diff --git a/packages/svelte-db/src/lib/index.ts b/packages/svelte-db/src/index.ts similarity index 100% rename from packages/svelte-db/src/lib/index.ts rename to packages/svelte-db/src/index.ts diff --git a/packages/svelte-db/src/routes/+page.svelte b/packages/svelte-db/src/routes/+page.svelte deleted file mode 100644 index 9c42926..0000000 --- a/packages/svelte-db/src/routes/+page.svelte +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to your library project

-

Create your package using @sveltejs/package and preview/showcase your work with SvelteKit

-

Visit svelte.dev/docs/kit to read the documentation

diff --git a/packages/svelte-db/src/lib/useLiveQuery.svelte.ts b/packages/svelte-db/src/useLiveQuery.svelte.ts similarity index 65% rename from packages/svelte-db/src/lib/useLiveQuery.svelte.ts rename to packages/svelte-db/src/useLiveQuery.svelte.ts index 091fc8e..74db894 100644 --- a/packages/svelte-db/src/lib/useLiveQuery.svelte.ts +++ b/packages/svelte-db/src/useLiveQuery.svelte.ts @@ -9,14 +9,6 @@ import type { Schema, } from "@tanstack/db" -type ComputedRef = { - get current(): T -} - -type Getter = () => T - -function toValue() {} - export interface UseLiveQueryReturn { state: Map data: Array @@ -29,11 +21,11 @@ export function useLiveQuery< queryFn: ( q: InitialQueryBuilder> ) => QueryBuilder, - deps: Array> = [] + deps: Array<() => unknown> = [] ): UseLiveQueryReturn> { const compiledQuery = $derived.by(() => { // Just reference deps to make derived reactive to them - // deps.forEach((dep) => toValue(dep)) + deps.forEach((dep) => dep()) const query = queryFn(queryBuilder()) const compiled = compileQuery(query) @@ -41,15 +33,10 @@ export function useLiveQuery< return compiled }) - const state = $derived(useStore(compiledQuery.results.derivedState).current) - const data = $derived(useStore(compiledQuery.results.derivedArray).current) - const collection = $derived(compiledQuery.results) + const state = () => useStore(compiledQuery.results.derivedState).current + const data = () => useStore(compiledQuery.results.derivedArray).current $effect(() => { - if (compiledQuery.state === `stopped`) { - compiledQuery.start() - } - return () => { compiledQuery.stop() } @@ -57,13 +44,15 @@ export function useLiveQuery< return { get state() { - return state + return state() }, get data() { - return data + return data() }, get collection() { - return collection as any + return compiledQuery.results as unknown as Collection< + ResultsFromContext + > }, } } diff --git a/packages/svelte-db/src/lib/useOptimisticMutation.ts b/packages/svelte-db/src/useOptimisticMutation.ts similarity index 100% rename from packages/svelte-db/src/lib/useOptimisticMutation.ts rename to packages/svelte-db/src/useOptimisticMutation.ts diff --git a/packages/svelte-db/static/favicon.png b/packages/svelte-db/static/favicon.png deleted file mode 100644 index 825b9e65af7c104cfb07089bb28659393b4f2097..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX1 z+6Okem(d}YXmmOiZq$!IPk5t8nnS{%?+vDFz3BevmFNgpIod~R{>@#@5x9zJKEHLHv!gHeK~n)Ld!M8DB|Kfe%~123&Hz1Z(86nU7*G5chmyDe ziV7$pB7pJ=96hpxHv9rCR29%bLOXlKU<_13_M8x)6;P8E1Kz6G<&P?$P^%c!M5`2` zfY2zg;VK5~^>TJGQzc+33-n~gKt{{of8GzUkWmU110IgI0DLxRIM>0US|TsM=L|@F z0Bun8U!cRB7-2apz=y-7*UxOxz@Z0)@QM)9wSGki1AZ38ceG7Q72z5`i;i=J`ILzL z@iUO?SBBG-0cQuo+an4TsLy-g-x;8P4UVwk|D8{W@U1Zi z!M)+jqy@nQ$p?5tsHp-6J304Q={v-B>66$P0IDx&YT(`IcZ~bZfmn11#rXd7<5s}y zBi9eim&zQc0Dk|2>$bs0PnLmDfMP5lcXRY&cvJ=zKxI^f0%-d$tD!`LBf9^jMSYUA zI8U?CWdY@}cRq6{5~y+)#h1!*-HcGW@+gZ4B};0OnC~`xQOyH19z*TA!!BJ%9s0V3F?CAJ{hTd#*tf+ur-W9MOURF-@B77_-OshsY}6 zOXRY=5%C^*26z?l)1=$bz30!so5tfABdSYzO+H=CpV~aaUefmjvfZ3Ttu9W&W3Iu6 zROlh0MFA5h;my}8lB0tAV-Rvc2Zs_CCSJnx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH { }) // Sync from initial state - act(() => { - emitter.emit( - `sync`, - initialPersons.map((person) => ({ - key: person.id, - type: `insert`, - changes: person, - })) - ) - }) + emitter.emit( + `sync`, + initialPersons.map((person) => ({ + key: person.id, + type: `insert`, + changes: person, + })) + ) const result = useLiveQuery((q) => q @@ -143,21 +140,19 @@ describe(`Query Collections`, () => { }) // Insert a new person - act(() => { - emitter.emit(`sync`, [ - { - key: `4`, - type: `insert`, - changes: { - id: `4`, - name: `Kyle Doe`, - age: 40, - email: `kyle.doe@example.com`, - isActive: true, - }, + emitter.emit(`sync`, [ + { + key: `4`, + type: `insert`, + changes: { + id: `4`, + name: `Kyle Doe`, + age: 40, + email: `kyle.doe@example.com`, + isActive: true, }, - ]) - }) + }, + ]) flushSync() @@ -234,8 +229,8 @@ describe(`Query Collections`, () => { }) }) - it.skip(`should join collections and return combined results`, () => { - const cleanup = $effect.root(() => { + it(`should join collections and return combined results`, () => { + cleanup = $effect.root(() => { const emitter = mitt() // Create person collection @@ -288,6 +283,8 @@ describe(`Query Collections`, () => { })) ) + flushSync() + // Sync initial issue data emitter.emit( `sync-issue`, @@ -389,12 +386,10 @@ describe(`Query Collections`, () => { // After deletion, user 3 should no longer have a joined result expect(result.state.get(`3`)).toBeUndefined() }) - - cleanup() }) - it.skip(`should recompile query when parameters change and change results`, () => { - const cleanup = $effect.root(() => { + it(`should recompile query when parameters change and change results`, () => { + cleanup = $effect.root(() => { const emitter = mitt() // Create collection with mutation capability @@ -428,6 +423,8 @@ describe(`Query Collections`, () => { })) ) + flushSync() + let minAge = $state(30) const result = useLiveQuery((q) => { @@ -479,206 +476,218 @@ describe(`Query Collections`, () => { }) }) - // it(`should stop old query when parameters change`, async () => { - // const emitter = mitt() - - // // Create collection with mutation capability - // const collection = new Collection({ - // id: `stop-query-test`, - // sync: { - // sync: ({ begin, write, commit }) => { - // emitter.on(`sync`, (changes) => { - // begin() - // ;(changes as Array).forEach((change) => { - // write({ - // key: change.key, - // type: change.type, - // value: change.changes as Person, - // }) - // }) - // commit() - // }) - // }, - // }, - // }) - - // // Mock console.log to track when compiledQuery.stop() is called - // let logCalls: Array = [] - // const originalConsoleLog = console.log - // console.log = vi.fn((...args) => { - // logCalls.push(args.join(` `)) - // originalConsoleLog(...args) - // }) - - // // Add a custom hook that wraps useLiveQuery to log when queries are created and stopped - // function useTrackedLiveQuery( - // queryFn: (q: InitialQueryBuilder>) => any, - // deps: Array> - // ): T { - // const result = useLiveQuery(queryFn, deps) - - // watch( - // () => deps.map((dep) => dep.value).join(`,`), - // (updatedDeps, _, fn) => { - // console.log(`Creating new query with deps`, updatedDeps) - // fn(() => console.log(`Stopping query with deps`, updatedDeps)) - // }, - // { immediate: true } - // ) - - // return result as T - // } - - // // Sync initial state - // emitter.emit( - // `sync`, - // initialPersons.map((person) => ({ - // key: person.id, - // type: `insert`, - // changes: person, - // })) - // ) - - // const minAge = ref(30) - // useTrackedLiveQuery( - // (q) => - // q - // .from({ collection }) - // .where(`@age`, `>`, minAge.value) - // .keyBy(`@id`) - // .select(`@id`, `@name`), - // [minAge] - // ) - - // // Initial query should be created - // expect( - // logCalls.some((call) => call.includes(`Creating new query with deps 30`)) - // ).toBe(true) - - // // Clear log calls - // logCalls = [] - - // // Change the parameter - // minAge.value = 25 - - // flushSync() - - // // Old query should be stopped and new query created - // expect( - // logCalls.some((call) => call.includes(`Stopping query with deps 30`)) - // ).toBe(true) - // expect( - // logCalls.some((call) => call.includes(`Creating new query with deps 25`)) - // ).toBe(true) - - // // Restore console.log - // console.log = originalConsoleLog - // }) - - // it(`should be able to query a result collection`, async () => { - // const emitter = mitt() - - // // Create collection with mutation capability - // const collection = new Collection({ - // id: `optimistic-changes-test`, - // sync: { - // sync: ({ begin, write, commit }) => { - // // Listen for sync events - // emitter.on(`*`, (_, changes) => { - // begin() - // ;(changes as Array).forEach((change) => { - // write({ - // key: change.key, - // type: change.type, - // value: change.changes as Person, - // }) - // }) - // commit() - // }) - // }, - // }, - // }) - - // // Sync from initial state - // emitter.emit( - // `sync`, - // initialPersons.map((person) => ({ - // key: person.id, - // type: `insert`, - // changes: person, - // })) - // ) - - // // Initial query - // const result = useLiveQuery((q) => - // q - // .from({ collection }) - // .where(`@age`, `>`, 30) - // .keyBy(`@id`) - // .select(`@id`, `@name`, `@team`) - // .orderBy({ "@id": `asc` }) - // ) - - // // Grouped query derived from initial query - // const groupedResult = useLiveQuery((q) => - // q - // .from({ queryResult: result.collection.value }) - // .groupBy(`@team`) - // .keyBy(`@team`) - // .select(`@team`, { count: { COUNT: `@id` } }) - // ) - - // // Verify initial grouped results - // expect(groupedResult.result.state.size).toBe(1) - // expect(groupedResult.result.state.get(`team1`)).toEqual({ - // team: `team1`, - // count: 1, - // }) - - // // Insert two new users in different teams - // emitter.emit(`sync`, [ - // { - // key: `5`, - // type: `insert`, - // changes: { - // id: `5`, - // name: `Sarah Jones`, - // age: 32, - // email: `sarah.jones@example.com`, - // isActive: true, - // team: `team1`, - // }, - // }, - // { - // key: `6`, - // type: `insert`, - // changes: { - // id: `6`, - // name: `Mike Wilson`, - // age: 38, - // email: `mike.wilson@example.com`, - // isActive: true, - // team: `team2`, - // }, - // }, - // ]) - - // flushSync() - - // // Verify the grouped results include the new team members - // expect(groupedResult.result.state.size).toBe(2) - // expect(groupedResult.result.state.get(`team1`)).toEqual({ - // team: `team1`, - // count: 2, - // }) - // expect(groupedResult.result.state.get(`team2`)).toEqual({ - // team: `team2`, - // count: 1, - // }) - // }) - - it.skip(`optimistic state is dropped after commit`, () => { - const cleanup = $effect.root(() => { + it(`should stop old query when parameters change`, () => { + cleanup = $effect.root(() => { + const emitter = mitt() + + // Create collection with mutation capability + const collection = new Collection({ + id: `stop-query-test`, + sync: { + sync: ({ begin, write, commit }) => { + emitter.on(`sync`, (changes) => { + begin() + ;(changes as Array).forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Person, + }) + }) + commit() + }) + }, + }, + }) + + // Mock console.log to track when compiledQuery.stop() is called + let logCalls: Array = [] + const originalConsoleLog = console.log + console.log = vi.fn((...args) => { + logCalls.push(args.join(` `)) + originalConsoleLog(...args) + }) + + // Add a custom hook that wraps useLiveQuery to log when queries are created and stopped + function useTrackedLiveQuery( + queryFn: (q: InitialQueryBuilder>) => any, + deps: Array<() => unknown> + ): T { + const result = useLiveQuery(queryFn) + const derivedDeps = () => deps.map((dep) => dep()).join(`,`) + + $effect(() => { + console.log(`Creating new query with deps`, derivedDeps()) + + return () => { + console.log(`Stopping query with deps`, derivedDeps()) + } + }) + + return result as T + } + + // Sync initial state + emitter.emit( + `sync`, + initialPersons.map((person) => ({ + key: person.id, + type: `insert`, + changes: person, + })) + ) + + let minAge = $state(30) + useTrackedLiveQuery( + (q) => + q + .from({ collection }) + .where(`@age`, `>`, minAge) + .keyBy(`@id`) + .select(`@id`, `@name`), + [() => minAge] + ) + + flushSync() + + // Initial query should be created + expect( + logCalls.some((call) => { + return call.includes(`Creating new query with deps 30`) + }) + ).toBe(true) + + // Clear log calls + logCalls = [] + + // Change the parameter + minAge = 25 + + flushSync() + + // Old query should be stopped and new query created + expect( + logCalls.some((call) => call.includes(`Stopping query with deps 30`)) + ).toBe(true) + expect( + logCalls.some((call) => + call.includes(`Creating new query with deps 25`) + ) + ).toBe(true) + + // Restore console.log + console.log = originalConsoleLog + }) + }) + + it(`should be able to query a result collection`, () => { + cleanup = $effect.root(() => { + const emitter = mitt() + + // Create collection with mutation capability + const collection = new Collection({ + id: `optimistic-changes-test`, + sync: { + sync: ({ begin, write, commit }) => { + // Listen for sync events + emitter.on(`*`, (_, changes) => { + begin() + ;(changes as Array).forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Person, + }) + }) + commit() + }) + }, + }, + }) + + // Sync from initial state + emitter.emit( + `sync`, + initialPersons.map((person) => ({ + key: person.id, + type: `insert`, + changes: person, + })) + ) + + flushSync() + + // Initial query + const result = useLiveQuery((q) => + q + .from({ collection }) + .where(`@age`, `>`, 30) + .keyBy(`@id`) + .select(`@id`, `@name`, `@team`) + .orderBy({ "@id": `asc` }) + ) + + // Grouped query derived from initial query + const groupedResult = useLiveQuery((q) => + q + .from({ queryResult: result.collection }) + .groupBy(`@team`) + .keyBy(`@team`) + .select(`@team`, { count: { COUNT: `@id` } }) + ) + + // Verify initial grouped results + expect(groupedResult.state.size).toBe(1) + expect(groupedResult.state.get(`team1`)).toEqual({ + team: `team1`, + count: 1, + }) + + // Insert two new users in different teams + emitter.emit(`sync`, [ + { + key: `5`, + type: `insert`, + changes: { + id: `5`, + name: `Sarah Jones`, + age: 32, + email: `sarah.jones@example.com`, + isActive: true, + team: `team1`, + }, + }, + { + key: `6`, + type: `insert`, + changes: { + id: `6`, + name: `Mike Wilson`, + age: 38, + email: `mike.wilson@example.com`, + isActive: true, + team: `team2`, + }, + }, + ]) + + flushSync() + + // Verify the grouped results include the new team members + expect(groupedResult.state.size).toBe(2) + expect(groupedResult.state.get(`team1`)).toEqual({ + team: `team1`, + count: 2, + }) + expect(groupedResult.state.get(`team2`)).toEqual({ + team: `team2`, + count: 1, + }) + }) + }) + + it(`optimistic state is dropped after commit`, () => { + cleanup = $effect.root(() => { const emitter = mitt() // Track renders and states const renderStates: Array<{ @@ -740,6 +749,8 @@ describe(`Query Collections`, () => { })) ) + flushSync() + // Sync initial issue data emitter.emit( `sync-issue`, @@ -750,6 +761,8 @@ describe(`Query Collections`, () => { })) ) + flushSync() + // Render the hook with a query that joins persons and issues const result = useLiveQuery((q) => q @@ -822,31 +835,25 @@ describe(`Query Collections`, () => { }) // Wait for the transaction to be committed - tx.isPersisted.promise.then(() => {}) - flushSync() - - // Check if we had any render where the temp key was removed but the permanent key wasn't added yet - const hadFlicker = renderStates.some( - (state) => - !state.hasTempKey && !state.hasPermKey && state.stateSize === 3 - ) - - expect(hadFlicker).toBe(false) - - // Verify the temporary key is replaced by the permanent one - expect(result.state.size).toBe(4) - expect(result.state.get(`temp-key`)).toBeUndefined() - expect(result.state.get(`4`)).toEqual({ - id: `4`, - name: `John Doe`, - title: `New Issue`, - }) + // await tx.isPersisted.promise + // flushSync() + + // // Check if we had any render where the temp key was removed but the permanent key wasn't added yet + // const hadFlicker = renderStates.some( + // (state) => + // !state.hasTempKey && !state.hasPermKey && state.stateSize === 3 + // ) + + // expect(hadFlicker).toBe(false) + + // // Verify the temporary key is replaced by the permanent one + // expect(result.state.size).toBe(4) + // expect(result.state.get(`temp-key`)).toBeUndefined() + // expect(result.state.get(`4`)).toEqual({ + // id: `4`, + // name: `John Doe`, + // title: `New Issue`, + // }) }) - - cleanup() }) }) - -async function waitForChanges(ms = 0) { - await new Promise((resolve) => setTimeout(resolve, ms)) -} diff --git a/packages/svelte-db/tsconfig.json b/packages/svelte-db/tsconfig.json index 6f788f1..83265e3 100644 --- a/packages/svelte-db/tsconfig.json +++ b/packages/svelte-db/tsconfig.json @@ -1,15 +1,17 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "module": "NodeNext", - "moduleResolution": "NodeNext" - } + "extends": "../../tsconfig.json", + "compilerOptions": { + "types": ["svelte"], + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "declaration": true, + "outDir": "dist", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + }, + "include": ["src/**/*", "tests", "vite.config.ts"], + "exclude": ["node_modules", "dist"] } diff --git a/packages/svelte-db/vite.config.ts b/packages/svelte-db/vite.config.ts index 4c87e64..3946d91 100644 --- a/packages/svelte-db/vite.config.ts +++ b/packages/svelte-db/vite.config.ts @@ -10,11 +10,16 @@ export default defineConfig({ dir: `./tests`, watch: false, environment: `jsdom`, - // coverage: { - // enabled: true, - // provider: `istanbul`, - // include: [`src/lib/**/*`], - // }, + coverage: { + enabled: false, + provider: `istanbul`, + include: [`src/**/*`], + }, typecheck: { enabled: true }, + alias: { + // This is needed for svelte-5 support + // https://github.com/testing-library/svelte-testing-library?tab=readme-ov-file#svelte-5-support + "@testing-library/svelte": `@testing-library/svelte/svelte5`, + }, }, }) From 7900bf1db7ccd1ef66af3e7e31af60ab64af3e22 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:17:56 -0700 Subject: [PATCH 04/16] chore: adjust effect roots --- .../tests/useLiveQuery.svelte.test.ts | 176 ++++++++++-------- 1 file changed, 95 insertions(+), 81 deletions(-) diff --git a/packages/svelte-db/tests/useLiveQuery.svelte.test.ts b/packages/svelte-db/tests/useLiveQuery.svelte.test.ts index 5b655d1..7d1d576 100644 --- a/packages/svelte-db/tests/useLiveQuery.svelte.test.ts +++ b/packages/svelte-db/tests/useLiveQuery.svelte.test.ts @@ -686,59 +686,78 @@ describe(`Query Collections`, () => { }) }) - it(`optimistic state is dropped after commit`, () => { - cleanup = $effect.root(() => { - const emitter = mitt() - // Track renders and states - const renderStates: Array<{ - stateSize: number - hasTempKey: boolean - hasPermKey: boolean - timestamp: number - }> = [] - - // Create person collection - const personCollection = new Collection({ - id: `person-collection-test-bug`, - sync: { - sync: ({ begin, write, commit }) => { - // @ts-expect-error Mitt typing doesn't match our usage - emitter.on(`sync-person`, (changes: Array) => { - begin() - changes.forEach((change) => { - write({ - key: change.key, - type: change.type, - value: change.changes as Person, - }) + it(`optimistic state is dropped after commit`, async () => { + const emitter = mitt() + // Track renders and states + const renderStates: Array<{ + stateSize: number + hasTempKey: boolean + hasPermKey: boolean + timestamp: number + }> = [] + + // Create person collection + const personCollection = new Collection({ + id: `person-collection-test-bug`, + sync: { + sync: ({ begin, write, commit }) => { + // @ts-expect-error Mitt typing doesn't match our usage + emitter.on(`sync-person`, (changes: Array) => { + begin() + changes.forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Person, }) - commit() }) - }, + commit() + }) }, - }) + }, + }) - // Create issue collection - const issueCollection = new Collection({ - id: `issue-collection-test-bug`, - sync: { - sync: ({ begin, write, commit }) => { - // @ts-expect-error Mitt typing doesn't match our usage - emitter.on(`sync-issue`, (changes: Array) => { - begin() - changes.forEach((change) => { - write({ - key: change.key, - type: change.type, - value: change.changes as Issue, - }) + // Create issue collection + const issueCollection = new Collection({ + id: `issue-collection-test-bug`, + sync: { + sync: ({ begin, write, commit }) => { + // @ts-expect-error Mitt typing doesn't match our usage + emitter.on(`sync-issue`, (changes: Array) => { + begin() + changes.forEach((change) => { + write({ + key: change.key, + type: change.type, + value: change.changes as Issue, }) - commit() }) - }, + commit() + }) }, - }) + }, + }) + + // Create a transaction to perform an optimistic mutation + const tx = createTransaction({ + mutationFn: async () => { + emitter.emit(`sync-issue`, [ + { + key: `4`, + type: `insert`, + changes: { + id: `4`, + title: `New Issue`, + description: `New Issue Description`, + userId: `1`, + }, + }, + ]) + return Promise.resolve() + }, + }) + cleanup = $effect.root(() => { // Sync initial person data emitter.emit( `sync-person`, @@ -794,25 +813,6 @@ describe(`Query Collections`, () => { // Reset render states array for clarity in the remaining test renderStates.length = 0 - // Create a transaction to perform an optimistic mutation - const tx = createTransaction({ - mutationFn: async () => { - emitter.emit(`sync-issue`, [ - { - key: `4`, - type: `insert`, - changes: { - id: `4`, - title: `New Issue`, - description: `New Issue Description`, - userId: `1`, - }, - }, - ]) - return Promise.resolve() - }, - }) - // Perform optimistic insert of a new issue tx.mutate(() => issueCollection.insert( @@ -833,27 +833,41 @@ describe(`Query Collections`, () => { name: `John Doe`, title: `New Issue`, }) + }) - // Wait for the transaction to be committed - // await tx.isPersisted.promise - // flushSync() + // Wait for the transaction to be committed + await tx.isPersisted.promise + flushSync() - // // Check if we had any render where the temp key was removed but the permanent key wasn't added yet - // const hadFlicker = renderStates.some( - // (state) => - // !state.hasTempKey && !state.hasPermKey && state.stateSize === 3 - // ) + $effect.root(() => { + const result = useLiveQuery((q) => + q + .from({ issues: issueCollection }) + .join({ + type: `inner`, + from: { persons: personCollection }, + on: [`@persons.id`, `=`, `@issues.userId`], + }) + .select(`@issues.id`, `@issues.title`, `@persons.name`) + .keyBy(`@id`) + ) - // expect(hadFlicker).toBe(false) + // Check if we had any render where the temp key was removed but the permanent key wasn't added yet + const hadFlicker = renderStates.some( + (state) => + !state.hasTempKey && !state.hasPermKey && state.stateSize === 3 + ) - // // Verify the temporary key is replaced by the permanent one - // expect(result.state.size).toBe(4) - // expect(result.state.get(`temp-key`)).toBeUndefined() - // expect(result.state.get(`4`)).toEqual({ - // id: `4`, - // name: `John Doe`, - // title: `New Issue`, - // }) + expect(hadFlicker).toBe(false) + + // Verify the temporary key is replaced by the permanent one + expect(result.state.size).toBe(4) + expect(result.state.get(`temp-key`)).toBeUndefined() + expect(result.state.get(`4`)).toEqual({ + id: `4`, + name: `John Doe`, + title: `New Issue`, + }) }) }) }) From 558af77b9911ac0e39559245a595748a6e556095 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:30:35 -0700 Subject: [PATCH 05/16] chore: remove unused packages --- packages/svelte-db/package.json | 2 -- packages/svelte-db/vite.config.ts | 13 ++++++------- pnpm-lock.yaml | 27 --------------------------- 3 files changed, 6 insertions(+), 36 deletions(-) diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index b8faf8e..e35ec68 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -36,8 +36,6 @@ "svelte": "^5.0.0" }, "devDependencies": { - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/svelte": "^5.2.4", "@sveltejs/adapter-auto": "^6.0.1", "@sveltejs/kit": "^2.21.0", "@sveltejs/package": "^2.3.11", diff --git a/packages/svelte-db/vite.config.ts b/packages/svelte-db/vite.config.ts index 3946d91..851a0c5 100644 --- a/packages/svelte-db/vite.config.ts +++ b/packages/svelte-db/vite.config.ts @@ -1,10 +1,9 @@ -import { svelteTesting } from "@testing-library/svelte/vite" import { sveltekit } from "@sveltejs/kit/vite" import { defineConfig } from "vitest/config" import packageJson from "./package.json" with { type: "json" } export default defineConfig({ - plugins: [sveltekit(), svelteTesting()], + plugins: [sveltekit()], test: { name: packageJson.name, dir: `./tests`, @@ -16,10 +15,10 @@ export default defineConfig({ include: [`src/**/*`], }, typecheck: { enabled: true }, - alias: { - // This is needed for svelte-5 support - // https://github.com/testing-library/svelte-testing-library?tab=readme-ov-file#svelte-5-support - "@testing-library/svelte": `@testing-library/svelte/svelte5`, - }, }, + resolve: process.env.VITEST + ? { + conditions: [`browser`], + } + : undefined, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8c30009..979af4e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -302,12 +302,6 @@ importers: '@sveltejs/vite-plugin-svelte': specifier: ^5.0.3 version: 5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) - '@testing-library/jest-dom': - specifier: ^6.6.3 - version: 6.6.3 - '@testing-library/svelte': - specifier: ^5.2.4 - version: 5.2.7(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) '@vitest/coverage-istanbul': specifier: ^3.0.9 version: 3.0.9(vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) @@ -1774,19 +1768,6 @@ packages: '@types/react-dom': optional: true - '@testing-library/svelte@5.2.7': - resolution: {integrity: sha512-aGhUaFmEXEVost4QOsbHUUbHLwi7ZZRRxAHFDO2Cmr0BZD3/3+XvaYEPq70Rdw0NRNjdqZHdARBEcrCOkPuAqw==} - engines: {node: '>= 10'} - peerDependencies: - svelte: ^3 || ^4 || ^5 || ^5.0.0-next.0 - vite: '*' - vitest: '*' - peerDependenciesMeta: - vite: - optional: true - vitest: - optional: true - '@tybys/wasm-util@0.9.0': resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} @@ -6480,14 +6461,6 @@ snapshots: '@types/react': 19.0.12 '@types/react-dom': 19.0.4(@types/react@19.0.12) - '@testing-library/svelte@5.2.7(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': - dependencies: - '@testing-library/dom': 10.4.0 - svelte: 5.28.6 - optionalDependencies: - vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) - vitest: 3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) - '@tybys/wasm-util@0.9.0': dependencies: tslib: 2.8.1 From f555db5a515a322f47399b04e34bdf6a46afc2da Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:33:19 -0700 Subject: [PATCH 06/16] chore: run dedupe --- pnpm-lock.yaml | 698 ++++--------------------------------------------- 1 file changed, 52 insertions(+), 646 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 979af4e..5a89f87 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,7 @@ importers: version: 1.2.0 '@tanstack/config': specifier: ^0.17.1 - version: 0.17.1(@types/node@22.13.10)(eslint@9.22.0(jiti@2.4.2))(rollup@4.36.0)(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + version: 0.17.1(@types/node@22.13.10)(eslint@9.22.0(jiti@2.4.2))(rollup@4.36.0)(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) '@testing-library/jest-dom': specifier: ^6.6.3 version: 6.6.3 @@ -50,7 +50,7 @@ importers: version: 8.26.1(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2) '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.3.4(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + version: 4.3.4(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) eslint: specifier: ^9.22.0 version: 9.22.0(jiti@2.4.2) @@ -92,7 +92,7 @@ importers: version: 5.8.2 vite: specifier: ^6.2.2 - version: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + version: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) vitest: specifier: ^3.0.9 version: 3.0.9(@types/node@22.13.10)(happy-dom@17.4.4)(jiti@2.4.2)(jsdom@26.0.0)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) @@ -144,7 +144,7 @@ importers: version: 9.22.0 '@tailwindcss/vite': specifier: ^4.0.0-alpha.8 - version: 4.0.14(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + version: 4.0.14(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) '@types/cors': specifier: ^2.8.17 version: 2.8.17 @@ -171,7 +171,7 @@ importers: version: 8.26.1(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2) '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.3.4(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + version: 4.3.4(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) concurrently: specifier: ^9.1.2 version: 9.1.2 @@ -201,7 +201,7 @@ importers: version: 5.8.2 vite: specifier: ^6.2.2 - version: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + version: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) packages/db: dependencies: @@ -383,18 +383,10 @@ packages: resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.27.1': resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} @@ -407,16 +399,6 @@ packages: resolution: {integrity: sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.10': - resolution: {integrity: sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/parser@7.26.9': - resolution: {integrity: sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==} - engines: {node: '>=6.0.0'} - hasBin: true - '@babel/parser@7.27.2': resolution: {integrity: sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==} engines: {node: '>=6.0.0'} @@ -438,10 +420,6 @@ packages: resolution: {integrity: sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.26.9': - resolution: {integrity: sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==} - engines: {node: '>=6.9.0'} - '@babel/template@7.26.9': resolution: {integrity: sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==} engines: {node: '>=6.9.0'} @@ -450,14 +428,6 @@ packages: resolution: {integrity: sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==} engines: {node: '>=6.9.0'} - '@babel/types@7.26.10': - resolution: {integrity: sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==} - engines: {node: '>=6.9.0'} - - '@babel/types@7.26.9': - resolution: {integrity: sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==} - engines: {node: '>=6.9.0'} - '@babel/types@7.27.1': resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==} engines: {node: '>=6.9.0'} @@ -596,12 +566,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.0': - resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.25.1': resolution: {integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==} engines: {node: '>=18'} @@ -620,12 +584,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.0': - resolution: {integrity: sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.25.1': resolution: {integrity: sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==} engines: {node: '>=18'} @@ -644,12 +602,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.0': - resolution: {integrity: sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.25.1': resolution: {integrity: sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==} engines: {node: '>=18'} @@ -668,12 +620,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.0': - resolution: {integrity: sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.25.1': resolution: {integrity: sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==} engines: {node: '>=18'} @@ -692,12 +638,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.0': - resolution: {integrity: sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.25.1': resolution: {integrity: sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==} engines: {node: '>=18'} @@ -716,12 +656,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.0': - resolution: {integrity: sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.25.1': resolution: {integrity: sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==} engines: {node: '>=18'} @@ -740,12 +674,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.0': - resolution: {integrity: sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.25.1': resolution: {integrity: sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==} engines: {node: '>=18'} @@ -764,12 +692,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.0': - resolution: {integrity: sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.25.1': resolution: {integrity: sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==} engines: {node: '>=18'} @@ -788,12 +710,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.0': - resolution: {integrity: sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.25.1': resolution: {integrity: sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==} engines: {node: '>=18'} @@ -812,12 +728,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.0': - resolution: {integrity: sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.25.1': resolution: {integrity: sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==} engines: {node: '>=18'} @@ -836,12 +746,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.0': - resolution: {integrity: sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.25.1': resolution: {integrity: sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==} engines: {node: '>=18'} @@ -860,12 +764,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.0': - resolution: {integrity: sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.25.1': resolution: {integrity: sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==} engines: {node: '>=18'} @@ -884,12 +782,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.0': - resolution: {integrity: sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.25.1': resolution: {integrity: sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==} engines: {node: '>=18'} @@ -908,12 +800,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.0': - resolution: {integrity: sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.25.1': resolution: {integrity: sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==} engines: {node: '>=18'} @@ -932,12 +818,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.0': - resolution: {integrity: sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.25.1': resolution: {integrity: sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==} engines: {node: '>=18'} @@ -956,12 +836,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.0': - resolution: {integrity: sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.25.1': resolution: {integrity: sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==} engines: {node: '>=18'} @@ -980,24 +854,12 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.0': - resolution: {integrity: sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.25.1': resolution: {integrity: sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.0': - resolution: {integrity: sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - '@esbuild/netbsd-arm64@0.25.1': resolution: {integrity: sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==} engines: {node: '>=18'} @@ -1016,24 +878,12 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.0': - resolution: {integrity: sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.25.1': resolution: {integrity: sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.0': - resolution: {integrity: sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-arm64@0.25.1': resolution: {integrity: sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==} engines: {node: '>=18'} @@ -1052,12 +902,6 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.0': - resolution: {integrity: sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.25.1': resolution: {integrity: sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==} engines: {node: '>=18'} @@ -1076,12 +920,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.0': - resolution: {integrity: sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.25.1': resolution: {integrity: sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==} engines: {node: '>=18'} @@ -1100,12 +938,6 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.0': - resolution: {integrity: sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.25.1': resolution: {integrity: sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==} engines: {node: '>=18'} @@ -1124,12 +956,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.0': - resolution: {integrity: sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.25.1': resolution: {integrity: sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==} engines: {node: '>=18'} @@ -1148,12 +974,6 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.0': - resolution: {integrity: sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.25.1': resolution: {integrity: sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==} engines: {node: '>=18'} @@ -1321,191 +1141,96 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.34.8': - resolution: {integrity: sha512-q217OSE8DTp8AFHuNHXo0Y86e1wtlfVrXiAlwkIvGRQv9zbc6mE3sjIVfwI8sYUyNxwOg0j/Vm1RKM04JcWLJw==} - cpu: [arm] - os: [android] - '@rollup/rollup-android-arm-eabi@4.36.0': resolution: {integrity: sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.34.8': - resolution: {integrity: sha512-Gigjz7mNWaOL9wCggvoK3jEIUUbGul656opstjaUSGC3eT0BM7PofdAJaBfPFWWkXNVAXbaQtC99OCg4sJv70Q==} - cpu: [arm64] - os: [android] - '@rollup/rollup-android-arm64@4.36.0': resolution: {integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.34.8': - resolution: {integrity: sha512-02rVdZ5tgdUNRxIUrFdcMBZQoaPMrxtwSb+/hOfBdqkatYHR3lZ2A2EGyHq2sGOd0Owk80oV3snlDASC24He3Q==} - cpu: [arm64] - os: [darwin] - '@rollup/rollup-darwin-arm64@4.36.0': resolution: {integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.34.8': - resolution: {integrity: sha512-qIP/elwR/tq/dYRx3lgwK31jkZvMiD6qUtOycLhTzCvrjbZ3LjQnEM9rNhSGpbLXVJYQ3rq39A6Re0h9tU2ynw==} - cpu: [x64] - os: [darwin] - '@rollup/rollup-darwin-x64@4.36.0': resolution: {integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.34.8': - resolution: {integrity: sha512-IQNVXL9iY6NniYbTaOKdrlVP3XIqazBgJOVkddzJlqnCpRi/yAeSOa8PLcECFSQochzqApIOE1GHNu3pCz+BDA==} - cpu: [arm64] - os: [freebsd] - '@rollup/rollup-freebsd-arm64@4.36.0': resolution: {integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.34.8': - resolution: {integrity: sha512-TYXcHghgnCqYFiE3FT5QwXtOZqDj5GmaFNTNt3jNC+vh22dc/ukG2cG+pi75QO4kACohZzidsq7yKTKwq/Jq7Q==} - cpu: [x64] - os: [freebsd] - '@rollup/rollup-freebsd-x64@4.36.0': resolution: {integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.34.8': - resolution: {integrity: sha512-A4iphFGNkWRd+5m3VIGuqHnG3MVnqKe7Al57u9mwgbyZ2/xF9Jio72MaY7xxh+Y87VAHmGQr73qoKL9HPbXj1g==} - cpu: [arm] - os: [linux] - '@rollup/rollup-linux-arm-gnueabihf@4.36.0': resolution: {integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.34.8': - resolution: {integrity: sha512-S0lqKLfTm5u+QTxlFiAnb2J/2dgQqRy/XvziPtDd1rKZFXHTyYLoVL58M/XFwDI01AQCDIevGLbQrMAtdyanpA==} - cpu: [arm] - os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.36.0': resolution: {integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.34.8': - resolution: {integrity: sha512-jpz9YOuPiSkL4G4pqKrus0pn9aYwpImGkosRKwNi+sJSkz+WU3anZe6hi73StLOQdfXYXC7hUfsQlTnjMd3s1A==} - cpu: [arm64] - os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.36.0': resolution: {integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.34.8': - resolution: {integrity: sha512-KdSfaROOUJXgTVxJNAZ3KwkRc5nggDk+06P6lgi1HLv1hskgvxHUKZ4xtwHkVYJ1Rep4GNo+uEfycCRRxht7+Q==} - cpu: [arm64] - os: [linux] - '@rollup/rollup-linux-arm64-musl@4.36.0': resolution: {integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.34.8': - resolution: {integrity: sha512-NyF4gcxwkMFRjgXBM6g2lkT58OWztZvw5KkV2K0qqSnUEqCVcqdh2jN4gQrTn/YUpAcNKyFHfoOZEer9nwo6uQ==} - cpu: [loong64] - os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.36.0': resolution: {integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.34.8': - resolution: {integrity: sha512-LMJc999GkhGvktHU85zNTDImZVUCJ1z/MbAJTnviiWmmjyckP5aQsHtcujMjpNdMZPT2rQEDBlJfubhs3jsMfw==} - cpu: [ppc64] - os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': resolution: {integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.34.8': - resolution: {integrity: sha512-xAQCAHPj8nJq1PI3z8CIZzXuXCstquz7cIOL73HHdXiRcKk8Ywwqtx2wrIy23EcTn4aZ2fLJNBB8d0tQENPCmw==} - cpu: [riscv64] - os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.36.0': resolution: {integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.34.8': - resolution: {integrity: sha512-DdePVk1NDEuc3fOe3dPPTb+rjMtuFw89gw6gVWxQFAuEqqSdDKnrwzZHrUYdac7A7dXl9Q2Vflxpme15gUWQFA==} - cpu: [s390x] - os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.36.0': resolution: {integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.34.8': - resolution: {integrity: sha512-8y7ED8gjxITUltTUEJLQdgpbPh1sUQ0kMTmufRF/Ns5tI9TNMNlhWtmPKKHCU0SilX+3MJkZ0zERYYGIVBYHIA==} - cpu: [x64] - os: [linux] - '@rollup/rollup-linux-x64-gnu@4.36.0': resolution: {integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.34.8': - resolution: {integrity: sha512-SCXcP0ZpGFIe7Ge+McxY5zKxiEI5ra+GT3QRxL0pMMtxPfpyLAKleZODi1zdRHkz5/BhueUrYtYVgubqe9JBNQ==} - cpu: [x64] - os: [linux] - '@rollup/rollup-linux-x64-musl@4.36.0': resolution: {integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.34.8': - resolution: {integrity: sha512-YHYsgzZgFJzTRbth4h7Or0m5O74Yda+hLin0irAIobkLQFRQd1qWmnoVfwmKm9TXIZVAD0nZ+GEb2ICicLyCnQ==} - cpu: [arm64] - os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.36.0': resolution: {integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.34.8': - resolution: {integrity: sha512-r3NRQrXkHr4uWy5TOjTpTYojR9XmF0j/RYgKCef+Ag46FWUTltm5ziticv8LdNsDMehjJ543x/+TJAek/xBA2w==} - cpu: [ia32] - os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.36.0': resolution: {integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.34.8': - resolution: {integrity: sha512-U0FaE5O1BCpZSeE6gBl3c5ObhePQSfk9vDRToMmTkbhCOgW4jqvtS5LGyQ76L1fH8sM0keRp4uDTsbjiUyjk0g==} - cpu: [x64] - os: [win32] - '@rollup/rollup-win32-x64-msvc@4.36.0': resolution: {integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==} cpu: [x64] @@ -2021,15 +1746,9 @@ packages: '@volar/typescript@2.4.12': resolution: {integrity: sha512-HJB73OTJDgPc80K30wxi3if4fSsZZAOScbj2fcicMuOPoOkcf9NNAINb33o+DzhBdF9xTKC1gnPmIRDous5S0g==} - '@vue/compiler-core@3.5.13': - resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} - '@vue/compiler-core@3.5.14': resolution: {integrity: sha512-k7qMHMbKvoCXIxPhquKQVw3Twid3Kg4s7+oYURxLGRd56LiuHJVrvFKI4fm2AM3c8apqODPfVJGoh8nePbXMRA==} - '@vue/compiler-dom@3.5.13': - resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} - '@vue/compiler-dom@3.5.14': resolution: {integrity: sha512-1aOCSqxGOea5I80U2hQJvXYpPm/aXo95xL/m/mMhgyPUsKe9jhjwWpziNAw7tYRnbz1I61rd9Mld4W9KmmRoug==} @@ -2064,9 +1783,6 @@ packages: peerDependencies: vue: 3.5.14 - '@vue/shared@3.5.13': - resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} - '@vue/shared@3.5.14': resolution: {integrity: sha512-oXTwNxVfc9EtP1zzXAlSlgARLXNC84frFYkS0HHz0h3E4WZSP9sywqjqzGCP9Y34M8ipNmd380pVgmMuwELDyQ==} @@ -2757,11 +2473,6 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.25.0: - resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==} - engines: {node: '>=18'} - hasBin: true - esbuild@0.25.1: resolution: {integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==} engines: {node: '>=18'} @@ -2958,14 +2669,6 @@ packages: fastq@1.19.0: resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==} - fdir@6.4.3: - resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - fdir@6.4.4: resolution: {integrity: sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==} peerDependencies: @@ -4252,11 +3955,6 @@ packages: peerDependencies: rollup: 2.x || 3.x || 4.x - rollup@4.34.8: - resolution: {integrity: sha512-489gTVMzAYdiZHFVA/ig/iYFllCcWFHMvUHI1rpFmkoUtRlQxqh6/yiNqnYibjMZ2b/+FUQwldG+aLsEt6bglQ==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - rollup@4.36.0: resolution: {integrity: sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -4604,10 +4302,6 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.12: - resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} - engines: {node: '>=12.0.0'} - tinyglobby@0.2.13: resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==} engines: {node: '>=12.0.0'} @@ -4845,46 +4539,6 @@ packages: vite: optional: true - vite@6.2.2: - resolution: {integrity: sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - jiti: '>=1.21.0' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - '@types/node': - optional: true - jiti: - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - tsx: - optional: true - yaml: - optional: true - vite@6.3.5: resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -5154,7 +4808,7 @@ snapshots: '@babel/code-frame@7.26.2': dependencies: - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 js-tokens: 4.0.0 picocolors: 1.1.1 @@ -5168,10 +4822,10 @@ snapshots: '@babel/helper-compilation-targets': 7.26.5 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.9) '@babel/helpers': 7.26.9 - '@babel/parser': 7.26.9 + '@babel/parser': 7.27.2 '@babel/template': 7.26.9 '@babel/traverse': 7.26.9 - '@babel/types': 7.26.9 + '@babel/types': 7.27.1 convert-source-map: 2.0.0 debug: 4.4.0 gensync: 1.0.0-beta.2 @@ -5182,8 +4836,8 @@ snapshots: '@babel/generator@7.26.9': dependencies: - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.1.0 @@ -5199,7 +4853,7 @@ snapshots: '@babel/helper-module-imports@7.25.9': dependencies: '@babel/traverse': 7.26.9 - '@babel/types': 7.26.10 + '@babel/types': 7.27.1 transitivePeerDependencies: - supports-color @@ -5207,19 +4861,15 @@ snapshots: dependencies: '@babel/core': 7.26.9 '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-validator-identifier': 7.27.1 '@babel/traverse': 7.26.9 transitivePeerDependencies: - supports-color '@babel/helper-plugin-utils@7.26.5': {} - '@babel/helper-string-parser@7.25.9': {} - '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-validator-identifier@7.25.9': {} - '@babel/helper-validator-identifier@7.27.1': {} '@babel/helper-validator-option@7.25.9': {} @@ -5227,15 +4877,7 @@ snapshots: '@babel/helpers@7.26.9': dependencies: '@babel/template': 7.26.9 - '@babel/types': 7.26.9 - - '@babel/parser@7.26.10': - dependencies: - '@babel/types': 7.26.10 - - '@babel/parser@7.26.9': - dependencies: - '@babel/types': 7.26.9 + '@babel/types': 7.27.1 '@babel/parser@7.27.2': dependencies: @@ -5255,38 +4897,24 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@babel/runtime@7.26.9': - dependencies: - regenerator-runtime: 0.14.1 - '@babel/template@7.26.9': dependencies: '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 '@babel/traverse@7.26.9': dependencies: '@babel/code-frame': 7.26.2 '@babel/generator': 7.26.9 - '@babel/parser': 7.26.9 + '@babel/parser': 7.27.2 '@babel/template': 7.26.9 - '@babel/types': 7.26.9 + '@babel/types': 7.27.1 debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.26.10': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - - '@babel/types@7.26.9': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/types@7.27.1': dependencies: '@babel/helper-string-parser': 7.27.1 @@ -5513,9 +5141,6 @@ snapshots: '@esbuild/aix-ppc64@0.19.12': optional: true - '@esbuild/aix-ppc64@0.25.0': - optional: true - '@esbuild/aix-ppc64@0.25.1': optional: true @@ -5525,9 +5150,6 @@ snapshots: '@esbuild/android-arm64@0.19.12': optional: true - '@esbuild/android-arm64@0.25.0': - optional: true - '@esbuild/android-arm64@0.25.1': optional: true @@ -5537,9 +5159,6 @@ snapshots: '@esbuild/android-arm@0.19.12': optional: true - '@esbuild/android-arm@0.25.0': - optional: true - '@esbuild/android-arm@0.25.1': optional: true @@ -5549,9 +5168,6 @@ snapshots: '@esbuild/android-x64@0.19.12': optional: true - '@esbuild/android-x64@0.25.0': - optional: true - '@esbuild/android-x64@0.25.1': optional: true @@ -5561,9 +5177,6 @@ snapshots: '@esbuild/darwin-arm64@0.19.12': optional: true - '@esbuild/darwin-arm64@0.25.0': - optional: true - '@esbuild/darwin-arm64@0.25.1': optional: true @@ -5573,9 +5186,6 @@ snapshots: '@esbuild/darwin-x64@0.19.12': optional: true - '@esbuild/darwin-x64@0.25.0': - optional: true - '@esbuild/darwin-x64@0.25.1': optional: true @@ -5585,9 +5195,6 @@ snapshots: '@esbuild/freebsd-arm64@0.19.12': optional: true - '@esbuild/freebsd-arm64@0.25.0': - optional: true - '@esbuild/freebsd-arm64@0.25.1': optional: true @@ -5597,9 +5204,6 @@ snapshots: '@esbuild/freebsd-x64@0.19.12': optional: true - '@esbuild/freebsd-x64@0.25.0': - optional: true - '@esbuild/freebsd-x64@0.25.1': optional: true @@ -5609,9 +5213,6 @@ snapshots: '@esbuild/linux-arm64@0.19.12': optional: true - '@esbuild/linux-arm64@0.25.0': - optional: true - '@esbuild/linux-arm64@0.25.1': optional: true @@ -5621,9 +5222,6 @@ snapshots: '@esbuild/linux-arm@0.19.12': optional: true - '@esbuild/linux-arm@0.25.0': - optional: true - '@esbuild/linux-arm@0.25.1': optional: true @@ -5633,9 +5231,6 @@ snapshots: '@esbuild/linux-ia32@0.19.12': optional: true - '@esbuild/linux-ia32@0.25.0': - optional: true - '@esbuild/linux-ia32@0.25.1': optional: true @@ -5645,9 +5240,6 @@ snapshots: '@esbuild/linux-loong64@0.19.12': optional: true - '@esbuild/linux-loong64@0.25.0': - optional: true - '@esbuild/linux-loong64@0.25.1': optional: true @@ -5657,9 +5249,6 @@ snapshots: '@esbuild/linux-mips64el@0.19.12': optional: true - '@esbuild/linux-mips64el@0.25.0': - optional: true - '@esbuild/linux-mips64el@0.25.1': optional: true @@ -5669,9 +5258,6 @@ snapshots: '@esbuild/linux-ppc64@0.19.12': optional: true - '@esbuild/linux-ppc64@0.25.0': - optional: true - '@esbuild/linux-ppc64@0.25.1': optional: true @@ -5681,9 +5267,6 @@ snapshots: '@esbuild/linux-riscv64@0.19.12': optional: true - '@esbuild/linux-riscv64@0.25.0': - optional: true - '@esbuild/linux-riscv64@0.25.1': optional: true @@ -5693,9 +5276,6 @@ snapshots: '@esbuild/linux-s390x@0.19.12': optional: true - '@esbuild/linux-s390x@0.25.0': - optional: true - '@esbuild/linux-s390x@0.25.1': optional: true @@ -5705,15 +5285,9 @@ snapshots: '@esbuild/linux-x64@0.19.12': optional: true - '@esbuild/linux-x64@0.25.0': - optional: true - '@esbuild/linux-x64@0.25.1': optional: true - '@esbuild/netbsd-arm64@0.25.0': - optional: true - '@esbuild/netbsd-arm64@0.25.1': optional: true @@ -5723,15 +5297,9 @@ snapshots: '@esbuild/netbsd-x64@0.19.12': optional: true - '@esbuild/netbsd-x64@0.25.0': - optional: true - '@esbuild/netbsd-x64@0.25.1': optional: true - '@esbuild/openbsd-arm64@0.25.0': - optional: true - '@esbuild/openbsd-arm64@0.25.1': optional: true @@ -5741,9 +5309,6 @@ snapshots: '@esbuild/openbsd-x64@0.19.12': optional: true - '@esbuild/openbsd-x64@0.25.0': - optional: true - '@esbuild/openbsd-x64@0.25.1': optional: true @@ -5753,9 +5318,6 @@ snapshots: '@esbuild/sunos-x64@0.19.12': optional: true - '@esbuild/sunos-x64@0.25.0': - optional: true - '@esbuild/sunos-x64@0.25.1': optional: true @@ -5765,9 +5327,6 @@ snapshots: '@esbuild/win32-arm64@0.19.12': optional: true - '@esbuild/win32-arm64@0.25.0': - optional: true - '@esbuild/win32-arm64@0.25.1': optional: true @@ -5777,9 +5336,6 @@ snapshots: '@esbuild/win32-ia32@0.19.12': optional: true - '@esbuild/win32-ia32@0.25.0': - optional: true - '@esbuild/win32-ia32@0.25.1': optional: true @@ -5789,9 +5345,6 @@ snapshots: '@esbuild/win32-x64@0.19.12': optional: true - '@esbuild/win32-x64@0.25.0': - optional: true - '@esbuild/win32-x64@0.25.1': optional: true @@ -5903,7 +5456,7 @@ snapshots: '@manypkg/get-packages@1.1.3': dependencies: - '@babel/runtime': 7.26.9 + '@babel/runtime': 7.26.10 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -6011,117 +5564,60 @@ snapshots: optionalDependencies: rollup: 4.36.0 - '@rollup/rollup-android-arm-eabi@4.34.8': - optional: true - '@rollup/rollup-android-arm-eabi@4.36.0': optional: true - '@rollup/rollup-android-arm64@4.34.8': - optional: true - '@rollup/rollup-android-arm64@4.36.0': optional: true - '@rollup/rollup-darwin-arm64@4.34.8': - optional: true - '@rollup/rollup-darwin-arm64@4.36.0': optional: true - '@rollup/rollup-darwin-x64@4.34.8': - optional: true - '@rollup/rollup-darwin-x64@4.36.0': optional: true - '@rollup/rollup-freebsd-arm64@4.34.8': - optional: true - '@rollup/rollup-freebsd-arm64@4.36.0': optional: true - '@rollup/rollup-freebsd-x64@4.34.8': - optional: true - '@rollup/rollup-freebsd-x64@4.36.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.34.8': - optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.36.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.34.8': - optional: true - '@rollup/rollup-linux-arm-musleabihf@4.36.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.34.8': - optional: true - '@rollup/rollup-linux-arm64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.34.8': - optional: true - '@rollup/rollup-linux-arm64-musl@4.36.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.34.8': - optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.34.8': - optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.34.8': - optional: true - '@rollup/rollup-linux-riscv64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.34.8': - optional: true - '@rollup/rollup-linux-s390x-gnu@4.36.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.34.8': - optional: true - '@rollup/rollup-linux-x64-gnu@4.36.0': optional: true - '@rollup/rollup-linux-x64-musl@4.34.8': - optional: true - '@rollup/rollup-linux-x64-musl@4.36.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.34.8': - optional: true - '@rollup/rollup-win32-arm64-msvc@4.36.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.34.8': - optional: true - '@rollup/rollup-win32-ia32-msvc@4.36.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.34.8': - optional: true - '@rollup/rollup-win32-x64-msvc@4.36.0': optional: true @@ -6342,20 +5838,20 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.0.14 '@tailwindcss/oxide-win32-x64-msvc': 4.0.14 - '@tailwindcss/vite@4.0.14(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + '@tailwindcss/vite@4.0.14(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': dependencies: '@tailwindcss/node': 4.0.14 '@tailwindcss/oxide': 4.0.14 lightningcss: 1.29.2 tailwindcss: 4.0.14 - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) - '@tanstack/config@0.17.1(@types/node@22.13.10)(eslint@9.22.0(jiti@2.4.2))(rollup@4.36.0)(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + '@tanstack/config@0.17.1(@types/node@22.13.10)(eslint@9.22.0(jiti@2.4.2))(rollup@4.36.0)(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': dependencies: '@tanstack/eslint-config': 0.1.0(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2) '@tanstack/publish-config': 0.1.0 '@tanstack/typedoc-config': 0.1.0(typescript@5.8.2) - '@tanstack/vite-config': 0.1.0(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + '@tanstack/vite-config': 0.1.0(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) transitivePeerDependencies: - '@types/node' - eslint @@ -6411,12 +5907,12 @@ snapshots: transitivePeerDependencies: - typescript - '@tanstack/vite-config@0.1.0(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + '@tanstack/vite-config@0.1.0(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': dependencies: rollup-plugin-preserve-directives: 0.4.0(rollup@4.36.0) - vite-plugin-dts: 4.2.3(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) - vite-plugin-externalize-deps: 0.9.0(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) - vite-tsconfig-paths: 5.1.4(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + vite-plugin-dts: 4.2.3(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + vite-plugin-externalize-deps: 0.9.0(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) + vite-tsconfig-paths: 5.1.4(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) transitivePeerDependencies: - '@types/node' - rollup @@ -6472,24 +5968,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.26.9 + '@babel/types': 7.27.1 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.26.9 - '@babel/types': 7.26.9 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.26.9 + '@babel/types': 7.27.1 '@types/body-parser@1.19.5': dependencies: @@ -6689,14 +6185,14 @@ snapshots: '@unrs/rspack-resolver-binding-win32-x64-msvc@1.2.2': optional: true - '@vitejs/plugin-react@4.3.4(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': + '@vitejs/plugin-react@4.3.4(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': dependencies: '@babel/core': 7.26.9 '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.9) '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.9) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) transitivePeerDependencies: - supports-color @@ -6773,14 +6269,6 @@ snapshots: path-browserify: 1.0.1 vscode-uri: 3.1.0 - '@vue/compiler-core@3.5.13': - dependencies: - '@babel/parser': 7.26.10 - '@vue/shared': 3.5.13 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.2.1 - '@vue/compiler-core@3.5.14': dependencies: '@babel/parser': 7.27.2 @@ -6789,11 +6277,6 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.1 - '@vue/compiler-dom@3.5.13': - dependencies: - '@vue/compiler-core': 3.5.13 - '@vue/shared': 3.5.13 - '@vue/compiler-dom@3.5.14': dependencies: '@vue/compiler-core': 3.5.14 @@ -6824,9 +6307,9 @@ snapshots: '@vue/language-core@2.1.6(typescript@5.8.2)': dependencies: '@volar/language-core': 2.4.12 - '@vue/compiler-dom': 3.5.13 + '@vue/compiler-dom': 3.5.14 '@vue/compiler-vue2': 2.7.16 - '@vue/shared': 3.5.13 + '@vue/shared': 3.5.14 computeds: 0.0.1 minimatch: 9.0.5 muggle-string: 0.4.1 @@ -6856,8 +6339,6 @@ snapshots: '@vue/shared': 3.5.14 vue: 3.5.14(typescript@5.8.2) - '@vue/shared@3.5.13': {} - '@vue/shared@3.5.14': {} JSONStream@1.3.5: @@ -7057,9 +6538,9 @@ snapshots: buffer-from@1.1.2: {} - bundle-require@5.1.0(esbuild@0.25.0): + bundle-require@5.1.0(esbuild@0.25.1): dependencies: - esbuild: 0.25.0 + esbuild: 0.25.1 load-tsconfig: 0.2.5 bytes@3.1.2: {} @@ -7550,34 +7031,6 @@ snapshots: '@esbuild/win32-ia32': 0.19.12 '@esbuild/win32-x64': 0.19.12 - esbuild@0.25.0: - 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 - esbuild@0.25.1: optionalDependencies: '@esbuild/aix-ppc64': 0.25.1 @@ -7891,10 +7344,6 @@ snapshots: dependencies: reusify: 1.0.4 - fdir@6.4.3(picomatch@4.0.2): - optionalDependencies: - picomatch: 4.0.2 - fdir@6.4.4(picomatch@4.0.2): optionalDependencies: picomatch: 4.0.2 @@ -8334,7 +7783,7 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: '@babel/core': 7.26.9 - '@babel/parser': 7.26.10 + '@babel/parser': 7.27.2 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.7.1 @@ -8607,8 +8056,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.26.10 - '@babel/types': 7.26.10 + '@babel/parser': 7.27.2 + '@babel/types': 7.27.1 source-map-js: 1.2.1 make-dir@4.0.0: @@ -9129,31 +8578,6 @@ snapshots: magic-string: 0.30.17 rollup: 4.36.0 - rollup@4.34.8: - dependencies: - '@types/estree': 1.0.6 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.34.8 - '@rollup/rollup-android-arm64': 4.34.8 - '@rollup/rollup-darwin-arm64': 4.34.8 - '@rollup/rollup-darwin-x64': 4.34.8 - '@rollup/rollup-freebsd-arm64': 4.34.8 - '@rollup/rollup-freebsd-x64': 4.34.8 - '@rollup/rollup-linux-arm-gnueabihf': 4.34.8 - '@rollup/rollup-linux-arm-musleabihf': 4.34.8 - '@rollup/rollup-linux-arm64-gnu': 4.34.8 - '@rollup/rollup-linux-arm64-musl': 4.34.8 - '@rollup/rollup-linux-loongarch64-gnu': 4.34.8 - '@rollup/rollup-linux-powerpc64le-gnu': 4.34.8 - '@rollup/rollup-linux-riscv64-gnu': 4.34.8 - '@rollup/rollup-linux-s390x-gnu': 4.34.8 - '@rollup/rollup-linux-x64-gnu': 4.34.8 - '@rollup/rollup-linux-x64-musl': 4.34.8 - '@rollup/rollup-win32-arm64-msvc': 4.34.8 - '@rollup/rollup-win32-ia32-msvc': 4.34.8 - '@rollup/rollup-win32-x64-msvc': 4.34.8 - fsevents: 2.3.3 - rollup@4.36.0: dependencies: '@types/estree': 1.0.6 @@ -9592,11 +9016,6 @@ snapshots: tinyexec@0.3.2: {} - tinyglobby@0.2.12: - dependencies: - fdir: 6.4.3(picomatch@4.0.2) - picomatch: 4.0.2 - tinyglobby@0.2.13: dependencies: fdir: 6.4.4(picomatch@4.0.2) @@ -9656,21 +9075,21 @@ snapshots: tsup@8.4.0(@microsoft/api-extractor@7.52.1(@types/node@22.13.10))(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.3)(typescript@5.8.2)(yaml@2.7.0): dependencies: - bundle-require: 5.1.0(esbuild@0.25.0) + bundle-require: 5.1.0(esbuild@0.25.1) cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.0 debug: 4.4.0 - esbuild: 0.25.0 + esbuild: 0.25.1 joycon: 3.1.1 picocolors: 1.1.1 postcss-load-config: 6.0.1(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.3)(yaml@2.7.0) resolve-from: 5.0.0 - rollup: 4.34.8 + rollup: 4.36.0 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tinyexec: 0.3.2 - tinyglobby: 0.2.12 + tinyglobby: 0.2.13 tree-kill: 1.2.2 optionalDependencies: '@microsoft/api-extractor': 7.52.1(@types/node@22.13.10) @@ -9821,7 +9240,7 @@ snapshots: - tsx - yaml - vite-plugin-dts@4.2.3(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)): + vite-plugin-dts@4.2.3(@types/node@22.13.10)(rollup@4.36.0)(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)): dependencies: '@microsoft/api-extractor': 7.47.7(@types/node@22.13.10) '@rollup/pluginutils': 5.1.4(rollup@4.36.0) @@ -9834,40 +9253,27 @@ snapshots: magic-string: 0.30.17 typescript: 5.8.2 optionalDependencies: - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-externalize-deps@0.9.0(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)): + vite-plugin-externalize-deps@0.9.0(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)): dependencies: - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) - vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)): + vite-tsconfig-paths@5.1.4(typescript@5.8.2)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)): dependencies: debug: 4.4.0 globrex: 0.1.2 tsconfck: 3.1.5(typescript@5.8.2) optionalDependencies: - vite: 6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) + vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) transitivePeerDependencies: - supports-color - typescript - vite@6.2.2(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0): - dependencies: - esbuild: 0.25.1 - postcss: 8.5.3 - rollup: 4.36.0 - optionalDependencies: - '@types/node': 22.13.10 - fsevents: 2.3.3 - jiti: 2.4.2 - lightningcss: 1.29.2 - tsx: 4.19.3 - yaml: 2.7.0 - vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0): dependencies: esbuild: 0.25.1 From 1d7c2ddf2ab38571f9afe4da36de1d6cec6d6979 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:42:36 -0700 Subject: [PATCH 07/16] chore: update scripts --- packages/svelte-db/package.json | 10 +++------- packages/svelte-db/svelte.config.js | 2 +- packages/svelte-db/tsconfig.json | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index e35ec68..b85fc85 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -3,13 +3,9 @@ "description": "Svelte integration for @tanstack/db", "version": "0.0.0", "scripts": { - "test:types": "svelte-check --tsconfig ./tsconfig.json", - "test:eslint": "eslint ./src ./tests", - "test:lib": "vitest", - "test:lib:dev": "pnpm run test:lib --watch", - "test:build": "publint --strict", - "test": "npx vitest --run", - "build": "svelte-package --input ./src --output ./dist" + "build": "svelte-package --input ./src --output ./dist", + "test": "npx vitest --run", + "lint": "eslint . --fix" }, "files": [ "dist", diff --git a/packages/svelte-db/svelte.config.js b/packages/svelte-db/svelte.config.js index 94ca454..af7d74e 100644 --- a/packages/svelte-db/svelte.config.js +++ b/packages/svelte-db/svelte.config.js @@ -1,4 +1,4 @@ -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' +import { vitePreprocess } from "@sveltejs/vite-plugin-svelte" const config = { preprocess: vitePreprocess(), diff --git a/packages/svelte-db/tsconfig.json b/packages/svelte-db/tsconfig.json index 83265e3..17dd3f2 100644 --- a/packages/svelte-db/tsconfig.json +++ b/packages/svelte-db/tsconfig.json @@ -12,6 +12,6 @@ "skipLibCheck": true, "forceConsistentCasingInFileNames": true, }, - "include": ["src/**/*", "tests", "vite.config.ts"], + "include": ["src/**/*", "tests", "vite.config.ts", "svelte.config.js"], "exclude": ["node_modules", "dist"] } From 4be68d651b34c16cf010a699018d244b92b77e1f Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:46:07 -0700 Subject: [PATCH 08/16] chore: remove unused packages --- packages/svelte-db/package.json | 2 - packages/svelte-db/vite.config.ts | 4 +- pnpm-lock.yaml | 90 ------------------------------- 3 files changed, 2 insertions(+), 94 deletions(-) diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index b85fc85..cc43785 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -32,8 +32,6 @@ "svelte": "^5.0.0" }, "devDependencies": { - "@sveltejs/adapter-auto": "^6.0.1", - "@sveltejs/kit": "^2.21.0", "@sveltejs/package": "^2.3.11", "@vitest/coverage-istanbul": "^3.0.9", "@sveltejs/vite-plugin-svelte": "^5.0.3", diff --git a/packages/svelte-db/vite.config.ts b/packages/svelte-db/vite.config.ts index 851a0c5..3a6ce2a 100644 --- a/packages/svelte-db/vite.config.ts +++ b/packages/svelte-db/vite.config.ts @@ -1,9 +1,9 @@ -import { sveltekit } from "@sveltejs/kit/vite" +import { svelte } from "@sveltejs/vite-plugin-svelte" import { defineConfig } from "vitest/config" import packageJson from "./package.json" with { type: "json" } export default defineConfig({ - plugins: [sveltekit()], + plugins: [svelte()], test: { name: packageJson.name, dir: `./tests`, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a89f87..ab23091 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -290,12 +290,6 @@ importers: specifier: ^0.7.0 version: 0.7.0(svelte@5.28.6) devDependencies: - '@sveltejs/adapter-auto': - specifier: ^6.0.1 - version: 6.0.1(@sveltejs/kit@2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))) - '@sveltejs/kit': - specifier: ^2.21.0 - version: 2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) '@sveltejs/package': specifier: ^2.3.11 version: 2.3.11(svelte@5.28.6)(typescript@5.8.2) @@ -1125,9 +1119,6 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@polka/url@1.0.0-next.29': - resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} - '@publint/pack@0.1.2': resolution: {integrity: sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw==} engines: {node: '>=18'} @@ -1306,20 +1297,6 @@ packages: peerDependencies: acorn: ^8.9.0 - '@sveltejs/adapter-auto@6.0.1': - resolution: {integrity: sha512-mcWud3pYGPWM2Pphdj8G9Qiq24nZ8L4LB7coCUckUEy5Y7wOWGJ/enaZ4AtJTcSm5dNK1rIkBRoqt+ae4zlxcQ==} - peerDependencies: - '@sveltejs/kit': ^2.0.0 - - '@sveltejs/kit@2.21.0': - resolution: {integrity: sha512-kvu4h9qXduiPk1Q1oqFKDLFGu/7mslEYbVaqpbBcBxjlRJnvNCFwEvEwKt0Mx9TtSi8J77xRelvJobrGlst4nQ==} - engines: {node: '>=18.13'} - hasBin: true - peerDependencies: - '@sveltejs/vite-plugin-svelte': ^3.0.0 || ^4.0.0-next.1 || ^5.0.0 - svelte: ^4.0.0 || ^5.0.0-next.0 - vite: ^5.0.3 || ^6.0.0 - '@sveltejs/package@2.3.11': resolution: {integrity: sha512-DSMt2U0XNAdoQBYksrmgQi5dKy7jUTVDJLiagS/iXF7AShjAmTbGJQKruBuT/FfYAWvNxfQTSjkXU8eAIjVeNg==} engines: {node: ^16.14 || >=18} @@ -1523,9 +1500,6 @@ packages: '@types/conventional-commits-parser@5.0.1': resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} - '@types/cookie@0.6.0': - resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/cors@2.8.17': resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} @@ -2112,10 +2086,6 @@ packages: cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} - cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} - engines: {node: '>= 0.6'} - cookie@0.7.1: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} @@ -2238,9 +2208,6 @@ packages: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} - devalue@5.1.1: - resolution: {integrity: sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==} - diff@7.0.0: resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} engines: {node: '>=0.3.1'} @@ -3458,10 +3425,6 @@ packages: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} - mrmime@2.0.1: - resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} - engines: {node: '>=10'} - ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -4028,9 +3991,6 @@ packages: resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} engines: {node: '>= 0.8.0'} - set-cookie-parser@2.7.1: - resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} - set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -4105,10 +4065,6 @@ packages: simple-git@3.27.0: resolution: {integrity: sha512-ivHoFS9Yi9GY49ogc6/YAi3Fl9ROnF4VyubNylgCkA+RVqLaKWnDSzXOVzya8csELIaWaYNutsEuAhZrtOjozA==} - sirv@3.0.1: - resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==} - engines: {node: '>=18'} - slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -4337,10 +4293,6 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} - totalist@3.0.1: - resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} - engines: {node: '>=6'} - tough-cookie@5.1.1: resolution: {integrity: sha512-Ek7HndSVkp10hmHP9V4qZO1u+pn1RU5sI0Fw+jCU3lyvuMZcgqsNgc6CmJJZyByK4Vm/qotGRJlfgAX8q+4JiA==} engines: {node: '>=16'} @@ -5552,8 +5504,6 @@ snapshots: '@pkgr/core@0.1.1': {} - '@polka/url@1.0.0-next.29': {} - '@publint/pack@0.1.2': {} '@rollup/pluginutils@5.1.4(rollup@4.36.0)': @@ -5723,28 +5673,6 @@ snapshots: dependencies: acorn: 8.14.1 - '@sveltejs/adapter-auto@6.0.1(@sveltejs/kit@2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))': - dependencies: - '@sveltejs/kit': 2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) - - '@sveltejs/kit@2.21.0(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)))(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0))': - dependencies: - '@sveltejs/acorn-typescript': 1.0.5(acorn@8.14.1) - '@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.28.6)(vite@6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0)) - '@types/cookie': 0.6.0 - acorn: 8.14.1 - cookie: 0.6.0 - devalue: 5.1.1 - esm-env: 1.2.2 - kleur: 4.1.5 - magic-string: 0.30.17 - mrmime: 2.0.1 - sade: 1.8.1 - set-cookie-parser: 2.7.1 - sirv: 3.0.1 - svelte: 5.28.6 - vite: 6.3.5(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.3)(yaml@2.7.0) - '@sveltejs/package@2.3.11(svelte@5.28.6)(typescript@5.8.2)': dependencies: chokidar: 4.0.3 @@ -6000,8 +5928,6 @@ snapshots: dependencies: '@types/node': 22.13.10 - '@types/cookie@0.6.0': {} - '@types/cors@2.8.17': dependencies: '@types/node': 22.13.10 @@ -6677,8 +6603,6 @@ snapshots: cookie-signature@1.0.6: {} - cookie@0.6.0: {} - cookie@0.7.1: {} cors@2.8.5: @@ -6782,8 +6706,6 @@ snapshots: detect-libc@2.0.3: {} - devalue@5.1.1: {} - diff@7.0.0: {} dir-glob@3.0.1: @@ -8135,8 +8057,6 @@ snapshots: mri@1.2.0: {} - mrmime@2.0.1: {} - ms@2.0.0: {} ms@2.1.3: {} @@ -8697,8 +8617,6 @@ snapshots: transitivePeerDependencies: - supports-color - set-cookie-parser@2.7.1: {} - set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -8791,12 +8709,6 @@ snapshots: transitivePeerDependencies: - supports-color - sirv@3.0.1: - dependencies: - '@polka/url': 1.0.0-next.29 - mrmime: 2.0.1 - totalist: 3.0.1 - slash@3.0.0: {} slice-ansi@5.0.0: @@ -9043,8 +8955,6 @@ snapshots: toidentifier@1.0.1: {} - totalist@3.0.1: {} - tough-cookie@5.1.1: dependencies: tldts: 6.1.78 From 013ac2855cc0ffe140d467ac2c3ed0e3a9cbe4d1 Mon Sep 17 00:00:00 2001 From: Robert Soriano Date: Sat, 17 May 2025 06:47:36 -0700 Subject: [PATCH 09/16] chore: add changeset --- .changeset/khaki-ties-shout.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/khaki-ties-shout.md diff --git a/.changeset/khaki-ties-shout.md b/.changeset/khaki-ties-shout.md new file mode 100644 index 0000000..ea4d4d0 --- /dev/null +++ b/.changeset/khaki-ties-shout.md @@ -0,0 +1,5 @@ +--- +"@tanstack/svelte-db": patch +--- + +Add Svelte support From 546ef4e42e25453e3ba1e6d18a78d598f8857016 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:48:47 -0700 Subject: [PATCH 10/16] chore: update readme --- packages/svelte-db/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte-db/README.md b/packages/svelte-db/README.md index 1d5b574..eae8bf5 100644 --- a/packages/svelte-db/README.md +++ b/packages/svelte-db/README.md @@ -1,3 +1,3 @@ -# @tanstack/react-db +# @tanstack/svelte-db Svelte hooks for TanStack DB. See [TanStack/db](https://github.com/TanStack/db) for more details. From 8e8804fe1d7e81913e620efe36175468030a25a8 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:50:35 -0700 Subject: [PATCH 11/16] chore: prettier fix --- packages/svelte-db/package.json | 80 ++++++++++++++++---------------- packages/svelte-db/tsconfig.json | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index cc43785..bc8e279 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -1,47 +1,47 @@ { "name": "@tanstack/svelte-db", "description": "Svelte integration for @tanstack/db", - "version": "0.0.0", - "scripts": { - "build": "svelte-package --input ./src --output ./dist", - "test": "npx vitest --run", - "lint": "eslint . --fix" - }, - "files": [ - "dist", - "!dist/**/*.test.*", - "!dist/**/*.spec.*" - ], - "sideEffects": [ - "**/*.css" - ], - "svelte": "./dist/index.js", - "types": "./dist/index.d.ts", - "type": "module", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "svelte": "./dist/index.js" - } - }, - "dependencies": { - "@tanstack/db": "workspace:*", + "version": "0.0.0", + "scripts": { + "build": "svelte-package --input ./src --output ./dist", + "test": "npx vitest --run", + "lint": "eslint . --fix" + }, + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*" + ], + "sideEffects": [ + "**/*.css" + ], + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + }, + "dependencies": { + "@tanstack/db": "workspace:*", "@tanstack/svelte-store": "^0.7.0" - }, - "peerDependencies": { - "svelte": "^5.0.0" - }, - "devDependencies": { - "@sveltejs/package": "^2.3.11", - "@vitest/coverage-istanbul": "^3.0.9", - "@sveltejs/vite-plugin-svelte": "^5.0.3", - "publint": "^0.3.2", - "svelte": "^5.28.6", - "svelte-check": "^4.2.0" - }, - "keywords": [ - "optimistic", + }, + "peerDependencies": { + "svelte": "^5.0.0" + }, + "devDependencies": { + "@sveltejs/package": "^2.3.11", + "@vitest/coverage-istanbul": "^3.0.9", + "@sveltejs/vite-plugin-svelte": "^5.0.3", + "publint": "^0.3.2", + "svelte": "^5.28.6", + "svelte-check": "^4.2.0" + }, + "keywords": [ + "optimistic", "svelte", "typescript" - ] + ] } diff --git a/packages/svelte-db/tsconfig.json b/packages/svelte-db/tsconfig.json index 17dd3f2..3ff4acd 100644 --- a/packages/svelte-db/tsconfig.json +++ b/packages/svelte-db/tsconfig.json @@ -10,7 +10,7 @@ "strict": true, "esModuleInterop": true, "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true }, "include": ["src/**/*", "tests", "vite.config.ts", "svelte.config.js"], "exclude": ["node_modules", "dist"] From 0aad000725fc0dbdfa33c496b76170c55f4c9cf6 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:54:12 -0700 Subject: [PATCH 12/16] chore: update changeset --- .changeset/khaki-ties-shout.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.changeset/khaki-ties-shout.md b/.changeset/khaki-ties-shout.md index ea4d4d0..228ddda 100644 --- a/.changeset/khaki-ties-shout.md +++ b/.changeset/khaki-ties-shout.md @@ -3,3 +3,19 @@ --- Add Svelte support + +Usage example: + +```svelte + + + + +``` From 248180a8553587d0d99d8b76e54cd726b24f052b Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 06:57:50 -0700 Subject: [PATCH 13/16] chore: update vite config --- packages/svelte-db/vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/svelte-db/vite.config.ts b/packages/svelte-db/vite.config.ts index 3a6ce2a..c8adb39 100644 --- a/packages/svelte-db/vite.config.ts +++ b/packages/svelte-db/vite.config.ts @@ -16,6 +16,7 @@ export default defineConfig({ }, typecheck: { enabled: true }, }, + // Tell Vitest to use the `browser` entry points in `package.json` files, even though it's running in Node resolve: process.env.VITEST ? { conditions: [`browser`], From e83cd595d6c62582b5f731cab7b30063353172c6 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 10:58:46 -0700 Subject: [PATCH 14/16] chore: remove use of store --- packages/svelte-db/src/useLiveQuery.svelte.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/svelte-db/src/useLiveQuery.svelte.ts b/packages/svelte-db/src/useLiveQuery.svelte.ts index 74db894..1cf28dd 100644 --- a/packages/svelte-db/src/useLiveQuery.svelte.ts +++ b/packages/svelte-db/src/useLiveQuery.svelte.ts @@ -1,4 +1,3 @@ -import { useStore } from "@tanstack/svelte-store" import { compileQuery, queryBuilder } from "@tanstack/db" import type { Collection, @@ -33,8 +32,8 @@ export function useLiveQuery< return compiled }) - const state = () => useStore(compiledQuery.results.derivedState).current - const data = () => useStore(compiledQuery.results.derivedArray).current + const state = () => compiledQuery.results.derivedState.state + const data = () => compiledQuery.results.derivedArray.state $effect(() => { return () => { From 284a8070e840e85eb57f9db9292717669b36e0cb Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 11:33:52 -0700 Subject: [PATCH 15/16] chore: remove unused package --- packages/svelte-db/package.json | 3 +-- pnpm-lock.yaml | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/svelte-db/package.json b/packages/svelte-db/package.json index bc8e279..665ad39 100644 --- a/packages/svelte-db/package.json +++ b/packages/svelte-db/package.json @@ -25,8 +25,7 @@ } }, "dependencies": { - "@tanstack/db": "workspace:*", - "@tanstack/svelte-store": "^0.7.0" + "@tanstack/db": "workspace:*" }, "peerDependencies": { "svelte": "^5.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab23091..0ad4cdd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -286,9 +286,6 @@ importers: '@tanstack/db': specifier: workspace:* version: link:../db - '@tanstack/svelte-store': - specifier: ^0.7.0 - version: 0.7.0(svelte@5.28.6) devDependencies: '@sveltejs/package': specifier: ^2.3.11 @@ -1425,11 +1422,6 @@ packages: '@tanstack/store@0.7.0': resolution: {integrity: sha512-CNIhdoUsmD2NolYuaIs8VfWM467RK6oIBAW4nPEKZhg1smZ+/CwtCdpURgp7nxSqOaV9oKkzdWD80+bC66F/Jg==} - '@tanstack/svelte-store@0.7.0': - resolution: {integrity: sha512-FVuPuCLkGV/YcsJImIiJAZRh3s8DqI8C9jQMNXymELwsrpe538Vmb81fxHHNZx9MCtzsFcHfYOkImFB4r4QcfA==} - peerDependencies: - svelte: ^5.0.0 - '@tanstack/typedoc-config@0.1.0': resolution: {integrity: sha512-WaeDXvt9Dyds53SCOCZKGmwHdS6LGwNH7LyDeTtsmPW7zn7ApOaNyAPWlqjkEHGVd0ykvR+XA8CI8RPfLGGxmw==} engines: {node: '>=18'} @@ -5822,11 +5814,6 @@ snapshots: '@tanstack/store@0.7.0': {} - '@tanstack/svelte-store@0.7.0(svelte@5.28.6)': - dependencies: - '@tanstack/store': 0.7.0 - svelte: 5.28.6 - '@tanstack/typedoc-config@0.1.0(typescript@5.8.2)': dependencies: typedoc: 0.27.9(typescript@5.8.2) From b8444cd02ef00b850515759976fce8696af088b9 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Sat, 17 May 2025 11:44:47 -0700 Subject: [PATCH 16/16] chore: add todo --- packages/svelte-db/src/useLiveQuery.svelte.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/svelte-db/src/useLiveQuery.svelte.ts b/packages/svelte-db/src/useLiveQuery.svelte.ts index 1cf28dd..814940c 100644 --- a/packages/svelte-db/src/useLiveQuery.svelte.ts +++ b/packages/svelte-db/src/useLiveQuery.svelte.ts @@ -32,6 +32,9 @@ export function useLiveQuery< return compiled }) + // TODO: Svelte useStore needs to be updated to optionally + // receive a getter to receive updates from compiledQuery. + // For now, doing this should work and be reactive with updates. const state = () => compiledQuery.results.derivedState.state const data = () => compiledQuery.results.derivedArray.state