diff --git a/eslint.config.js b/eslint.config.js index 98d195e26c..14e90f0ed7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -38,6 +38,7 @@ export default [ '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-empty-function': 'off', 'no-case-declarations': 'off', + 'prefer-const': 'off', }, }, ] diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index b809e0904a..3ff755833f 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/kit": "^2.5.18", - "@sveltejs/vite-plugin-svelte": "^3.1.0", - "svelte": "^4.2.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "typescript": "5.3.3", "vite": "^5.3.3" diff --git a/examples/svelte/auto-refetching/src/routes/+layout.svelte b/examples/svelte/auto-refetching/src/routes/+layout.svelte index ef60a2f559..4b170dc01e 100644 --- a/examples/svelte/auto-refetching/src/routes/+layout.svelte +++ b/examples/svelte/auto-refetching/src/routes/+layout.svelte @@ -4,6 +4,8 @@ import { QueryClientProvider, QueryClient } from '@tanstack/svelte-query' import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools' + const { children } = $props() + const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -15,7 +17,7 @@
- + {@render children()}
diff --git a/examples/svelte/auto-refetching/src/routes/+page.svelte b/examples/svelte/auto-refetching/src/routes/+page.svelte index b395580cd0..9d01e1fdfc 100644 --- a/examples/svelte/auto-refetching/src/routes/+page.svelte +++ b/examples/svelte/auto-refetching/src/routes/+page.svelte @@ -12,7 +12,7 @@ const endpoint = 'http://localhost:5173/api/data' - $: todos = createQuery<{ items: string[] }>({ + const todos = createQuery<{ items: string[] }>({ queryKey: ['refetch'], queryFn: async () => await fetch(endpoint).then((r) => r.json()), // Refetch the data every second @@ -49,8 +49,8 @@ margin-left:.5rem; width:.75rem; height:.75rem; - background: {$todos.isFetching ? 'green' : 'transparent'}; - transition:: {!$todos.isFetching ? 'all .3s ease' : 'none'}; + background: {todos.isFetching ? 'green' : 'transparent'}; + transition:: {!todos.isFetching ? 'all .3s ease' : 'none'}; border-radius: 100%; transform: 'scale(2)" > @@ -58,10 +58,10 @@

Todo List

{ + onsubmit={(e) => { e.preventDefault() e.stopPropagation() - $addMutation.mutate(value, { + addMutation.mutate(value, { onSuccess: () => (value = ''), }) }} @@ -69,26 +69,24 @@
-{#if $todos.isPending} +{#if todos.isPending} Loading... {/if} -{#if $todos.error} +{#if todos.error} An error has occurred: - {$todos.error.message} + {todos.error.message} {/if} -{#if $todos.isSuccess} +{#if todos.isSuccess}
- +
{/if} -{#if $todos.isFetching} +{#if todos.isFetching}
'Background Updating...' : ' '
diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index af1fb4ac27..d52d12989f 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/kit": "^2.5.18", - "@sveltejs/vite-plugin-svelte": "^3.1.0", - "svelte": "^4.2.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "typescript": "5.3.3", "vite": "^5.3.3" diff --git a/examples/svelte/basic/src/lib/Post.svelte b/examples/svelte/basic/src/lib/Post.svelte index 56472ce68f..4450ffe490 100644 --- a/examples/svelte/basic/src/lib/Post.svelte +++ b/examples/svelte/basic/src/lib/Post.svelte @@ -3,7 +3,7 @@ import { getPostById } from './data' import type { Post } from './types' - export let postId: number + const { postId }: { postId: number } = $props() const post = createQuery({ queryKey: ['post', postId], @@ -15,17 +15,17 @@
Back
- {#if !postId || $post.isPending} + {#if !postId || post.isPending} Loading... {/if} - {#if $post.error} - Error: {$post.error.message} + {#if post.error} + Error: {post.error.message} {/if} - {#if $post.isSuccess} -

{$post.data.title}

+ {#if post.isSuccess} +

{post.data.title}

-

{$post.data.body}

+

{post.data.body}

-
{$post.isFetching ? 'Background Updating...' : ' '}
+
{post.isFetching ? 'Background Updating...' : ' '}
{/if} diff --git a/examples/svelte/basic/src/lib/Posts.svelte b/examples/svelte/basic/src/lib/Posts.svelte index c4f2f2c642..354ab8b1f6 100644 --- a/examples/svelte/basic/src/lib/Posts.svelte +++ b/examples/svelte/basic/src/lib/Posts.svelte @@ -17,13 +17,13 @@
- {#if $posts.status === 'pending'} + {#if posts.status === 'pending'} Loading... - {:else if $posts.status === 'error'} - Error: {$posts.error.message} + {:else if posts.status === 'error'} + Error: {posts.error.message} {:else}
    - {#each $posts.data as post} + {#each posts.data as post}
- {#if $posts.isFetching} + {#if posts.isFetching}
Background Updating...
diff --git a/examples/svelte/basic/src/routes/+layout.svelte b/examples/svelte/basic/src/routes/+layout.svelte index ef60a2f559..4b170dc01e 100644 --- a/examples/svelte/basic/src/routes/+layout.svelte +++ b/examples/svelte/basic/src/routes/+layout.svelte @@ -4,6 +4,8 @@ import { QueryClientProvider, QueryClient } from '@tanstack/svelte-query' import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools' + const { children } = $props() + const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -15,7 +17,7 @@
- + {@render children()}
diff --git a/examples/svelte/basic/src/routes/[postId]/+page.svelte b/examples/svelte/basic/src/routes/[postId]/+page.svelte index b68acc0bc0..2400baac2a 100644 --- a/examples/svelte/basic/src/routes/[postId]/+page.svelte +++ b/examples/svelte/basic/src/routes/[postId]/+page.svelte @@ -1,8 +1,7 @@ diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index 859ac5879b..6c55c7af62 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/kit": "^2.5.18", - "@sveltejs/vite-plugin-svelte": "^3.1.0", - "svelte": "^4.2.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "typescript": "5.3.3", "vite": "^5.3.3" diff --git a/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte b/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte index 79c602e672..0b51a97a6b 100644 --- a/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte +++ b/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte @@ -23,15 +23,15 @@ }) -{#if $query.isPending} +{#if query.isPending} Loading... {/if} -{#if $query.error} - Error: {$query.error.message} +{#if query.error} + Error: {query.error.message} {/if} -{#if $query.isSuccess} +{#if query.isSuccess}
- {#each $query.data.pages as { results }} + {#each query.data.pages as { results }} {#each results as planet}
@@ -44,12 +44,12 @@
diff --git a/examples/svelte/load-more-infinite-scroll/src/routes/+layout.svelte b/examples/svelte/load-more-infinite-scroll/src/routes/+layout.svelte index ef60a2f559..4b170dc01e 100644 --- a/examples/svelte/load-more-infinite-scroll/src/routes/+layout.svelte +++ b/examples/svelte/load-more-infinite-scroll/src/routes/+layout.svelte @@ -4,6 +4,8 @@ import { QueryClientProvider, QueryClient } from '@tanstack/svelte-query' import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools' + const { children } = $props() + const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -15,7 +17,7 @@
- + {@render children()}
diff --git a/examples/svelte/optimistic-updates-typescript/package.json b/examples/svelte/optimistic-updates-typescript/package.json index f221e33e9e..83a983c498 100644 --- a/examples/svelte/optimistic-updates-typescript/package.json +++ b/examples/svelte/optimistic-updates-typescript/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/kit": "^2.5.18", - "@sveltejs/vite-plugin-svelte": "^3.1.0", - "svelte": "^4.2.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "typescript": "5.3.3", "vite": "^5.3.3" diff --git a/examples/svelte/optimistic-updates-typescript/src/routes/+layout.svelte b/examples/svelte/optimistic-updates-typescript/src/routes/+layout.svelte index ef60a2f559..4b170dc01e 100644 --- a/examples/svelte/optimistic-updates-typescript/src/routes/+layout.svelte +++ b/examples/svelte/optimistic-updates-typescript/src/routes/+layout.svelte @@ -4,6 +4,8 @@ import { QueryClientProvider, QueryClient } from '@tanstack/svelte-query' import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools' + const { children } = $props() + const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -15,7 +17,7 @@
- + {@render children()}
diff --git a/examples/svelte/optimistic-updates-typescript/src/routes/+page.svelte b/examples/svelte/optimistic-updates-typescript/src/routes/+page.svelte index 297c462b71..6ee54e405b 100644 --- a/examples/svelte/optimistic-updates-typescript/src/routes/+page.svelte +++ b/examples/svelte/optimistic-updates-typescript/src/routes/+page.svelte @@ -87,36 +87,36 @@

{ + onsubmit={(e) => { e.preventDefault() e.stopPropagation() - $addTodoMutation.mutate(text) + addTodoMutation.mutate(text) }} >
- +
-{#if $todos.isPending} +{#if todos.isPending} Loading... {/if} -{#if $todos.error} +{#if todos.error} An error has occurred: - {$todos.error.message} + {todos.error.message} {/if} -{#if $todos.isSuccess} +{#if todos.isSuccess}
- Updated At: {new Date($todos.data.ts).toLocaleTimeString()} + Updated At: {new Date(todos.data.ts).toLocaleTimeString()}
    - {#each $todos.data.items as todo} + {#each todos.data.items as todo}
  • {todo.text}
  • {/each}
{/if} -{#if $todos.isFetching} +{#if todos.isFetching}
'Background Updating...' : ' '
diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index f962adc449..8d2220c06d 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/kit": "^2.5.18", - "@sveltejs/vite-plugin-svelte": "^3.1.0", - "svelte": "^4.2.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "typescript": "5.3.3", "vite": "^5.3.3" diff --git a/examples/svelte/playground/src/routes/+layout.svelte b/examples/svelte/playground/src/routes/+layout.svelte index 1b9267032c..76c2d0d277 100644 --- a/examples/svelte/playground/src/routes/+layout.svelte +++ b/examples/svelte/playground/src/routes/+layout.svelte @@ -4,6 +4,8 @@ import { QueryClientProvider, QueryClient } from '@tanstack/svelte-query' import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools' + const { children } = $props() + const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -19,7 +21,7 @@
- + {@render children()}
diff --git a/examples/svelte/playground/src/routes/AddTodo.svelte b/examples/svelte/playground/src/routes/AddTodo.svelte index 97015c4e29..5a56cdee2e 100644 --- a/examples/svelte/playground/src/routes/AddTodo.svelte +++ b/examples/svelte/playground/src/routes/AddTodo.svelte @@ -45,7 +45,7 @@
@@ -25,7 +25,7 @@ {/each} Editing Todo + Editing Todo "{$query.data.name}" (#{$editingIndex}) {/if}
@@ -107,7 +107,7 @@ Loading... (Attempt: {$query.failureCount + 1}) {:else if $query.error} - Error! + Error! {:else if todo}
- +
{$saveMutation.status === 'pending' diff --git a/examples/svelte/playground/src/routes/TodosList.svelte b/examples/svelte/playground/src/routes/TodosList.svelte index fbbb883421..c02d3cc0f7 100644 --- a/examples/svelte/playground/src/routes/TodosList.svelte +++ b/examples/svelte/playground/src/routes/TodosList.svelte @@ -51,7 +51,7 @@ Error: {$query.error.message}
- +
{:else}
    @@ -59,7 +59,7 @@ {#each $query.data as todo}
  • {todo.name}{' '} - +
  • {/each} {/if} diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index 75de9cf55e..f89142d005 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -13,9 +13,9 @@ "@tanstack/svelte-query-devtools": "^5.51.11" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^3.1.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", "@tsconfig/svelte": "^5.0.4", - "svelte": "^4.2.18", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "typescript": "5.3.3", "vite": "^5.3.3" diff --git a/examples/svelte/simple/src/lib/Simple.svelte b/examples/svelte/simple/src/lib/Simple.svelte index dd4b74ca8a..f9cd81fc64 100644 --- a/examples/svelte/simple/src/lib/Simple.svelte +++ b/examples/svelte/simple/src/lib/Simple.svelte @@ -21,20 +21,20 @@

    Simple

    - {#if $query.isPending} + {#if query.isPending} Loading... {/if} - {#if $query.error} + {#if query.error} An error has occurred: - {$query.error.message} + {query.error.message} {/if} - {#if $query.isSuccess} + {#if query.isSuccess}
    -

    {$query.data.name}

    -

    {$query.data.description}

    - 👀 {$query.data.subscribers_count}{' '} - ✨ {$query.data.stargazers_count}{' '} - 🍴 {$query.data.forks_count} +

    {query.data.name}

    +

    {query.data.description}

    + 👀 {query.data.subscribers_count}{' '} + ✨ {query.data.stargazers_count}{' '} + 🍴 {query.data.forks_count}
    {/if}
    diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index d6d6601b25..eb7766ea2e 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/kit": "^2.5.18", - "@sveltejs/vite-plugin-svelte": "^3.1.0", - "svelte": "^4.2.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "typescript": "5.3.3", "vite": "^5.3.3" diff --git a/examples/svelte/ssr/src/lib/Post.svelte b/examples/svelte/ssr/src/lib/Post.svelte index 0de658b6dd..9f6c886d49 100644 --- a/examples/svelte/ssr/src/lib/Post.svelte +++ b/examples/svelte/ssr/src/lib/Post.svelte @@ -3,7 +3,7 @@ import { api } from './api' import type { Post } from './types' - export let postId: number + const { postId }: { postId: number } = $props() const post = createQuery({ queryKey: ['post', postId], @@ -15,17 +15,17 @@
    - {#if !postId || $post.isPending} + {#if !postId || post.isPending} Loading... {/if} - {#if $post.error} - Error: {$post.error.message} + {#if post.error} + Error: {post.error.message} {/if} - {#if $post.isSuccess} -

    {$post.data.title}

    + {#if post.isSuccess} +

    {post.data.title}

    -

    {$post.data.body}

    +

    {post.data.body}

    -
    {$post.isFetching ? 'Background Updating...' : ' '}
    +
    {post.isFetching ? 'Background Updating...' : ' '}
    {/if}
    diff --git a/examples/svelte/ssr/src/lib/Posts.svelte b/examples/svelte/ssr/src/lib/Posts.svelte index 7457dfd49b..38ff753da7 100644 --- a/examples/svelte/ssr/src/lib/Posts.svelte +++ b/examples/svelte/ssr/src/lib/Posts.svelte @@ -17,13 +17,13 @@
    - {#if $posts.status === 'pending'} + {#if posts.status === 'pending'} Loading... - {:else if $posts.status === 'error'} - Error: {$posts.error.message} + {:else if posts.status === 'error'} + Error: {posts.error.message} {:else}
      - {#each $posts.data as post} + {#each posts.data as post}
    - {#if $posts.isFetching} + {#if posts.isFetching}
    Background Updating...
    diff --git a/examples/svelte/ssr/src/routes/+layout.svelte b/examples/svelte/ssr/src/routes/+layout.svelte index d639174e3f..0b02447853 100644 --- a/examples/svelte/ssr/src/routes/+layout.svelte +++ b/examples/svelte/ssr/src/routes/+layout.svelte @@ -2,14 +2,13 @@ import '../app.css' import { QueryClientProvider } from '@tanstack/svelte-query' import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools' - import type { PageData } from './$types' - export let data: PageData + const { data, children } = $props()
    - + {@render children()}
    diff --git a/examples/svelte/ssr/src/routes/+layout.ts b/examples/svelte/ssr/src/routes/+layout.ts index 0d38c02919..5104825207 100644 --- a/examples/svelte/ssr/src/routes/+layout.ts +++ b/examples/svelte/ssr/src/routes/+layout.ts @@ -2,7 +2,7 @@ import { browser } from '$app/environment' import { QueryClient } from '@tanstack/svelte-query' import type { LayoutLoad } from './$types' -export const load: LayoutLoad = async () => { +export const load: LayoutLoad = () => { const queryClient = new QueryClient({ defaultOptions: { queries: { diff --git a/examples/svelte/ssr/src/routes/[postId]/+page.svelte b/examples/svelte/ssr/src/routes/[postId]/+page.svelte index b68acc0bc0..2400baac2a 100644 --- a/examples/svelte/ssr/src/routes/[postId]/+page.svelte +++ b/examples/svelte/ssr/src/routes/[postId]/+page.svelte @@ -1,8 +1,7 @@ diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index 5fcfaff962..f773507321 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -15,10 +15,10 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/kit": "^2.5.18", - "@sveltejs/vite-plugin-svelte": "^3.1.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", "autoprefixer": "^10.4.19", "postcss": "^8.4.35", - "svelte": "^4.2.18", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4", "tailwindcss": "^3.4.3", "typescript": "5.3.3", diff --git a/examples/svelte/star-wars/src/routes/+layout.svelte b/examples/svelte/star-wars/src/routes/+layout.svelte index d11124d6fe..5f2bf488e9 100644 --- a/examples/svelte/star-wars/src/routes/+layout.svelte +++ b/examples/svelte/star-wars/src/routes/+layout.svelte @@ -4,6 +4,8 @@ import { QueryClientProvider, QueryClient } from '@tanstack/svelte-query' import { SvelteQueryDevtools } from '@tanstack/svelte-query-devtools' + const { children } = $props() + const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -25,6 +27,6 @@
    Films Characters - + {@render children()} diff --git a/examples/svelte/star-wars/src/routes/characters/+page.svelte b/examples/svelte/star-wars/src/routes/characters/+page.svelte index 0fef65bd7a..4bd81ba07e 100644 --- a/examples/svelte/star-wars/src/routes/characters/+page.svelte +++ b/examples/svelte/star-wars/src/routes/characters/+page.svelte @@ -12,18 +12,18 @@ }) -{#if $query.status === 'pending'} +{#if query.status === 'pending'}

    Loading...

    {/if} -{#if $query.status === 'error'} +{#if query.status === 'error'}

    Error :(

    {/if} -{#if $query.status === 'success'} +{#if query.status === 'success'}

    Characters

    - {#each $query.data.results as person} + {#each query.data.results as person} {@const personUrlParts = person.url.split('/').filter(Boolean)} {@const personId = personUrlParts[personUrlParts.length - 1]}
    diff --git a/examples/svelte/star-wars/src/routes/characters/[characterId]/+page.svelte b/examples/svelte/star-wars/src/routes/characters/[characterId]/+page.svelte index 6743ccbcb5..e887ba454e 100644 --- a/examples/svelte/star-wars/src/routes/characters/[characterId]/+page.svelte +++ b/examples/svelte/star-wars/src/routes/characters/[characterId]/+page.svelte @@ -2,9 +2,8 @@ import { createQuery } from '@tanstack/svelte-query' import Homeworld from './Homeworld.svelte' import Film from './Film.svelte' - import type { PageData } from './$types' - export let data: PageData + let { data } = $props() const getCharacter = async () => { const res = await fetch( @@ -19,19 +18,19 @@ }) -{#if $query.status === 'pending'} +{#if query.status === 'pending'}

    Loading...

    {/if} -{#if $query.status === 'error'} +{#if query.status === 'error'}

    Error :(

    {/if} -{#if $query.status === 'success'} - {@const homeworldUrlParts = $query.data.homeworld.split('/').filter(Boolean)} +{#if query.status === 'success'} + {@const homeworldUrlParts = query.data.homeworld.split('/').filter(Boolean)} {@const homeworldId = homeworldUrlParts[homeworldUrlParts.length - 1]}
    -

    {$query.data.name}

    +

    {query.data.name}

    @@ -42,23 +41,23 @@ - + - + - + - + - + @@ -68,7 +67,7 @@
    Born{$query.data.birth_year}{query.data.birth_year}
    Eyes{$query.data.eye_color}{query.data.eye_color}
    Hair{$query.data.hair_color}{query.data.hair_color}
    Height{$query.data.height}{query.data.height}
    Mass{$query.data.mass}{query.data.mass}
    Homeworld

    Films

    - {#each $query.data.films as film} + {#each query.data.films as film} {@const filmUrlParts = film.split('/').filter(Boolean)} {@const filmId = filmUrlParts[filmUrlParts.length - 1]} diff --git a/examples/svelte/star-wars/src/routes/characters/[characterId]/Film.svelte b/examples/svelte/star-wars/src/routes/characters/[characterId]/Film.svelte index 7c0210d8d5..a08ed25a6a 100644 --- a/examples/svelte/star-wars/src/routes/characters/[characterId]/Film.svelte +++ b/examples/svelte/star-wars/src/routes/characters/[characterId]/Film.svelte @@ -1,7 +1,7 @@ -{#if $query.status === 'success'} +{#if query.status === 'success'} {/if} diff --git a/examples/svelte/star-wars/src/routes/characters/[characterId]/Homeworld.svelte b/examples/svelte/star-wars/src/routes/characters/[characterId]/Homeworld.svelte index d931b8cc19..384318fd62 100644 --- a/examples/svelte/star-wars/src/routes/characters/[characterId]/Homeworld.svelte +++ b/examples/svelte/star-wars/src/routes/characters/[characterId]/Homeworld.svelte @@ -1,7 +1,7 @@ -{#if $query.status === 'success'} +{#if query.status === 'success'} - {$query.data.name} + {query.data.name} {/if} diff --git a/examples/svelte/star-wars/src/routes/films/+page.svelte b/examples/svelte/star-wars/src/routes/films/+page.svelte index adb251e0d2..ccca60b894 100644 --- a/examples/svelte/star-wars/src/routes/films/+page.svelte +++ b/examples/svelte/star-wars/src/routes/films/+page.svelte @@ -12,18 +12,18 @@ }) -{#if $query.status === 'pending'} +{#if query.status === 'pending'}

    Loading...

    {/if} -{#if $query.status === 'error'} +{#if query.status === 'error'}

    Error :(

    {/if} -{#if $query.status === 'success'} +{#if query.status === 'success'}

    Films

    - {#each $query.data.results as film} + {#each query.data.results as film} {@const filmUrlParts = film.url.split('/').filter(Boolean)} {@const filmId = filmUrlParts[filmUrlParts.length - 1]}
    diff --git a/examples/svelte/star-wars/src/routes/films/[filmId]/+page.svelte b/examples/svelte/star-wars/src/routes/films/[filmId]/+page.svelte index 5342487a6e..1f8d55537f 100644 --- a/examples/svelte/star-wars/src/routes/films/[filmId]/+page.svelte +++ b/examples/svelte/star-wars/src/routes/films/[filmId]/+page.svelte @@ -1,9 +1,8 @@ -{#if $query.status === 'pending'} +{#if query.status === 'pending'}

    Loading...

    {/if} -{#if $query.status === 'error'} +{#if query.status === 'error'}

    Error :(

    {/if} -{#if $query.status === 'success'} +{#if query.status === 'success'}
    -

    {$query.data.title}

    -

    {$query.data.opening_crawl}

    +

    {query.data.title}

    +

    {query.data.opening_crawl}


    Characters

    - {#each $query.data.characters as character} + {#each query.data.characters as character} {@const characterUrlParts = character.split('/').filter(Boolean)} {@const characterId = characterUrlParts[characterUrlParts.length - 1]} diff --git a/examples/svelte/star-wars/src/routes/films/[filmId]/Character.svelte b/examples/svelte/star-wars/src/routes/films/[filmId]/Character.svelte index b4827ccdf9..88c5d6b5d2 100644 --- a/examples/svelte/star-wars/src/routes/films/[filmId]/Character.svelte +++ b/examples/svelte/star-wars/src/routes/films/[filmId]/Character.svelte @@ -1,7 +1,7 @@ -{#if $query.status === 'success'} +{#if query.status === 'success'} {/if} diff --git a/examples/svelte/svelte-melt/.gitignore b/examples/svelte/svelte-melt/.gitignore new file mode 100644 index 0000000000..6635cf5542 --- /dev/null +++ b/examples/svelte/svelte-melt/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +node_modules +/build +/.svelte-kit +/package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/examples/svelte/svelte-melt/README.md b/examples/svelte/svelte-melt/README.md new file mode 100644 index 0000000000..5ce676612e --- /dev/null +++ b/examples/svelte/svelte-melt/README.md @@ -0,0 +1,38 @@ +# create-svelte + +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). + +## 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 +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest 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 +``` + +## Building + +To create a production version of your 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://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/examples/svelte/svelte-melt/package.json b/examples/svelte/svelte-melt/package.json new file mode 100644 index 0000000000..65d614c43e --- /dev/null +++ b/examples/svelte/svelte-melt/package.json @@ -0,0 +1,29 @@ +{ + "name": "svelte-melt", + "private": true, + "type": "module", + "scripts": { + "dev": "vite dev --port 3000", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --check . && eslint .", + "format": "prettier --write ." + }, + "dependencies": { + "@tanstack/query-sync-storage-persister": "^5.51.1", + "@tanstack/svelte-query": "^5.51.1", + "@tanstack/svelte-query-devtools": "^5.51.1", + "@tanstack/svelte-query-persist-client": "^5.51.1" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.2.2", + "@sveltejs/kit": "^2.5.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "svelte": "5.0.0-next.192", + "svelte-check": "^3.8.4", + "typescript": "5.3.3", + "vite": "^5.3.3" + } +} diff --git a/examples/svelte/svelte-melt/src/app.d.ts b/examples/svelte/svelte-melt/src/app.d.ts new file mode 100644 index 0000000000..367926a580 --- /dev/null +++ b/examples/svelte/svelte-melt/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {} diff --git a/examples/svelte/svelte-melt/src/app.html b/examples/svelte/svelte-melt/src/app.html new file mode 100644 index 0000000000..84ffad1665 --- /dev/null +++ b/examples/svelte/svelte-melt/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
    %sveltekit.body%
    + + diff --git a/examples/svelte/svelte-melt/src/routes/+layout.svelte b/examples/svelte/svelte-melt/src/routes/+layout.svelte new file mode 100644 index 0000000000..9fdebff85f --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/+layout.svelte @@ -0,0 +1,39 @@ + + + + +
    + {@render children()} +
    +
    diff --git a/examples/svelte/svelte-melt/src/routes/+page.svelte b/examples/svelte/svelte-melt/src/routes/+page.svelte new file mode 100644 index 0000000000..a0568538e8 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/+page.svelte @@ -0,0 +1,31 @@ + + +isReTORING:{isRes()} + + + diff --git a/examples/svelte/svelte-melt/src/routes/+page.ts b/examples/svelte/svelte-melt/src/routes/+page.ts new file mode 100644 index 0000000000..977abb90f4 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/+page.ts @@ -0,0 +1,2 @@ +export const ssr = false +export const csr = true diff --git a/examples/svelte/svelte-melt/src/routes/CreateQueries.svelte b/examples/svelte/svelte-melt/src/routes/CreateQueries.svelte new file mode 100644 index 0000000000..7b8338af55 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/CreateQueries.svelte @@ -0,0 +1,25 @@ + + +{JSON.stringify(combinedQueries)} diff --git a/examples/svelte/svelte-melt/src/routes/cacheUpdate.svelte b/examples/svelte/svelte-melt/src/routes/cacheUpdate.svelte new file mode 100644 index 0000000000..509ba26ff2 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/cacheUpdate.svelte @@ -0,0 +1,77 @@ + + + + +{data.fetchStatus} +{data.isLoading} +{data.isFetching} +{data.isRefetching} + + +{bookFilterStore.paginate.page} +
    {JSON.stringify(data.data, null, 1)}
    +{#each data?.data ?? [] as item} +
    {item.title}
    +{/each} diff --git a/examples/svelte/svelte-melt/src/routes/derivedQuery.svelte b/examples/svelte/svelte-melt/src/routes/derivedQuery.svelte new file mode 100644 index 0000000000..0775006704 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/derivedQuery.svelte @@ -0,0 +1,68 @@ + + +

    testing derived query with list

    + +isFetching {isFetching()} +isMutating {isMutating()} + +{data.fetchStatus} +{data.isLoading} +{data.isFetching} +{data.isRefetching} + + +{bookFilterStore.paginate.page} +{p.derived_state} +{#each data?.data ?? [] as item} +
    {item.title}
    +{/each} diff --git a/examples/svelte/svelte-melt/src/routes/external.svelte.ts b/examples/svelte/svelte-melt/src/routes/external.svelte.ts new file mode 100644 index 0000000000..5cae384af7 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/external.svelte.ts @@ -0,0 +1,11 @@ +import { createQuery } from '@tanstack/svelte-query' +export function useSvelteExtensionQuery(props) { + const enabled = $derived({ + queryKey: ['sv-externel', props], + queryFn: () => { + return Date.now() + }, + enabled: () => props.paginate.page > 0, + }) + return createQuery(enabled) +} diff --git a/examples/svelte/svelte-melt/src/routes/external.ts b/examples/svelte/svelte-melt/src/routes/external.ts new file mode 100644 index 0000000000..d318d314e1 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/external.ts @@ -0,0 +1,11 @@ +import { createQuery } from '@tanstack/svelte-query' + +export function useQuery(props) { + return createQuery({ + queryKey: ['eternal', props], + queryFn: () => { + return Date.now() + }, + enabled: props.paginate.page > 0, + }) +} diff --git a/examples/svelte/svelte-melt/src/routes/paginate.svelte b/examples/svelte/svelte-melt/src/routes/paginate.svelte new file mode 100644 index 0000000000..fe632aac79 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/paginate.svelte @@ -0,0 +1,64 @@ + + +

    testing create query with list

    + +{data.fetchStatus} +{data.isLoading} +{data.isFetching} +{data.isRefetching} + + +{bookFilterStore.paginate.page} +{#each data?.data ?? [] as item} +
    {item.title}
    +{/each} + + diff --git a/examples/svelte/svelte-melt/src/routes/queries.svelte b/examples/svelte/svelte-melt/src/routes/queries.svelte new file mode 100644 index 0000000000..0139637378 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/queries.svelte @@ -0,0 +1,769 @@ + + + + +
    +

    Create Queries

    +

    + QueryOptions: {JSON.stringify([ + { queryFn: () => 1, queryKey: keys }, + { queryFn: () => 2, queryKey: ['aa'] }, + ])} +

    + + + +
    Result: {JSON.stringify(data)}
    +
    +
    Data: {JSON.stringify(data.data)}
    +
    +
    isError: {JSON.stringify(data)}
    +
    + +C +
    {JSON.stringify(dat1, null, 3)}
    diff --git a/examples/svelte/svelte-melt/src/routes/store.svelte.ts b/examples/svelte/svelte-melt/src/routes/store.svelte.ts new file mode 100644 index 0000000000..f34ebeb186 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/store.svelte.ts @@ -0,0 +1,19 @@ +const init = { + paginate: { + page: 1, + asc: false, + orderWith: 'like_count', + start: 0, + end: 10, + size: 12, + totalSize: 20, + }, + filter: { + tags: [], + category: 'fiction', + updated_at: 'yesterday', + created_at: 'last 300 days', + }, + search: {}, +} +export const bookFilterStore = $state({ ...init }) diff --git a/examples/svelte/svelte-melt/src/routes/test.svelte b/examples/svelte/svelte-melt/src/routes/test.svelte new file mode 100644 index 0000000000..1c5afacbd2 --- /dev/null +++ b/examples/svelte/svelte-melt/src/routes/test.svelte @@ -0,0 +1,793 @@ + + +
    +
    +

    Create Query

    + +

    + Cases for different type of query key +
    +
      +
    • String key:{createQueryKey}
    • +
    • arr Key{createQueryKeyDeep}
    • +
    • Object Key{JSON.stringify(createQueryKeyDeepArr)}
    • +
    +

    + + + + + +
    Result: {JSON.stringify(data.data, null, 3)}
    +
    +
    Data: {JSON.stringify(data.data)}
    +
    +
    isError: {data.isError}
    +
    fetchStatus: {data.fetchStatus}
    + +
    + +
    + +
    +

    mutation

    + +
    diff --git a/examples/svelte/svelte-melt/static/favicon.png b/examples/svelte/svelte-melt/static/favicon.png new file mode 100644 index 0000000000..825b9e65af Binary files /dev/null and b/examples/svelte/svelte-melt/static/favicon.png differ diff --git a/examples/svelte/svelte-melt/svelte.config.js b/examples/svelte/svelte-melt/svelte.config.js new file mode 100644 index 0000000000..6acad8bac2 --- /dev/null +++ b/examples/svelte/svelte-melt/svelte.config.js @@ -0,0 +1,18 @@ +import adapter from '@sveltejs/adapter-auto' +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter(), + }, +} + +export default config diff --git a/examples/svelte/svelte-melt/tsconfig.json b/examples/svelte/svelte-melt/tsconfig.json new file mode 100644 index 0000000000..34aadc0285 --- /dev/null +++ b/examples/svelte/svelte-melt/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in +} diff --git a/examples/svelte/svelte-melt/vite.config.ts b/examples/svelte/svelte-melt/vite.config.ts new file mode 100644 index 0000000000..dd1b8b7fa1 --- /dev/null +++ b/examples/svelte/svelte-melt/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from '@sveltejs/kit/vite' +import { defineConfig } from 'vite' + +export default defineConfig({ + plugins: [sveltekit()], +}) diff --git a/integrations/svelte-vite/package.json b/integrations/svelte-vite/package.json index e578ca6cda..b44040764e 100644 --- a/integrations/svelte-vite/package.json +++ b/integrations/svelte-vite/package.json @@ -6,10 +6,10 @@ "build": "vite build" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^3.1.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", "@tanstack/svelte-query": "workspace:*", "@tanstack/svelte-query-devtools": "workspace:*", - "svelte": "^4.2.18", + "svelte": "5.0.0-next.192", "vite": "^5.3.3" } } diff --git a/packages/svelte-query-devtools/package.json b/packages/svelte-query-devtools/package.json index d2f4d698e9..3c585df3fc 100644 --- a/packages/svelte-query-devtools/package.json +++ b/packages/svelte-query-devtools/package.json @@ -43,14 +43,14 @@ }, "devDependencies": { "@sveltejs/package": "^2.3.1", - "@sveltejs/vite-plugin-svelte": "^3.1.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", "@tanstack/svelte-query": "workspace:*", - "eslint-plugin-svelte": "^2.42.0", - "svelte": "^4.2.18", + "eslint-plugin-svelte": "^2.43.0", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4" }, "peerDependencies": { "@tanstack/svelte-query": "workspace:^", - "svelte": "^3.54.0 || ^4.0.0 || ^5.0.0-next.0" + "svelte": "^5.0.0-next.105" } } diff --git a/packages/svelte-query-devtools/src/Devtools.svelte b/packages/svelte-query-devtools/src/Devtools.svelte index 654a4f7f1c..b29e30d261 100644 --- a/packages/svelte-query-devtools/src/Devtools.svelte +++ b/packages/svelte-query-devtools/src/Devtools.svelte @@ -10,13 +10,50 @@ TanstackQueryDevtools, } from '@tanstack/query-devtools' - export let initialIsOpen = false - export let buttonPosition: DevtoolsButtonPosition = 'bottom-right' - export let position: DevtoolsPosition = 'bottom' - export let client: QueryClient = useQueryClient() - export let errorTypes: Array = [] - export let styleNonce: string | undefined = undefined - export let shadowDOMTarget: ShadowRoot | undefined = undefined + interface DevtoolsOptions { + /** + * Set this true if you want the dev tools to default to being open + */ + initialIsOpen?: boolean + /** + * The position of the TanStack Query logo to open and close the devtools panel. + * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' + * Defaults to 'bottom-right'. + */ + buttonPosition?: DevtoolsButtonPosition + /** + * The position of the TanStack Query devtools panel. + * 'top' | 'bottom' | 'left' | 'right' + * Defaults to 'bottom'. + */ + position?: DevtoolsPosition + /** + * Custom instance of QueryClient + */ + client?: QueryClient + /** + * Use this so you can define custom errors that can be shown in the devtools. + */ + errorTypes?: Array + /** + * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles. + */ + styleNonce?: string + /** + * Use this so you can attach the devtool's styles to specific element in the DOM. + */ + shadowDOMTarget?: ShadowRoot + } + + let { + initialIsOpen = false, + buttonPosition = 'bottom-right', + position = 'bottom', + client = useQueryClient(), + errorTypes = [], + styleNonce = undefined, + shadowDOMTarget = undefined, + }: DevtoolsOptions = $props() let ref: HTMLDivElement let devtools: TanstackQueryDevtools | undefined @@ -41,20 +78,24 @@ devtools.mount(ref) }) + return () => devtools?.unmount() + }) - return () => { - devtools?.unmount() - } + $effect(() => { + devtools?.setButtonPosition(buttonPosition) }) - } - $: { - if (devtools) { - devtools.setButtonPosition(buttonPosition) - devtools.setPosition(position) - devtools.setInitialIsOpen(initialIsOpen) - devtools.setErrorTypes(errorTypes) - } + $effect(() => { + devtools?.setPosition(position) + }) + + $effect(() => { + devtools?.setInitialIsOpen(initialIsOpen) + }) + + $effect(() => { + devtools?.setErrorTypes(errorTypes) + }) } diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index d0e7574f43..a1fe783941 100644 --- a/packages/svelte-query-persist-client/package.json +++ b/packages/svelte-query-persist-client/package.json @@ -45,15 +45,15 @@ }, "devDependencies": { "@sveltejs/package": "^2.3.1", - "@sveltejs/vite-plugin-svelte": "^3.1.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", "@tanstack/svelte-query": "workspace:*", - "@testing-library/svelte": "^5.1.0", - "eslint-plugin-svelte": "^2.42.0", - "svelte": "^4.2.18", + "@testing-library/svelte": "^5.2.0", + "eslint-plugin-svelte": "^2.43.0", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4" }, "peerDependencies": { "@tanstack/svelte-query": "workspace:^", - "svelte": "^3.54.0 || ^4.0.0 || ^5.0.0-next.0" + "svelte": "^5.0.0-next.105" } } diff --git a/packages/svelte-query-persist-client/src/PersistQueryClientProvider.svelte b/packages/svelte-query-persist-client/src/PersistQueryClientProvider.svelte index 5f5e04ada7..abe6ec471c 100644 --- a/packages/svelte-query-persist-client/src/PersistQueryClientProvider.svelte +++ b/packages/svelte-query-persist-client/src/PersistQueryClientProvider.svelte @@ -1,43 +1,51 @@ - - + + {@render children()} diff --git a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte index 7316ce609c..b9ccb7377f 100644 --- a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte +++ b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte @@ -1,20 +1,19 @@ -
    {$query.data}
    -
    fetchStatus: {$query.fetchStatus}
    +
    {query.data}
    +
    fetchStatus: {query.fetchStatus}
    diff --git a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte index c3087ac2fa..7d1201e0da 100644 --- a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte @@ -3,12 +3,15 @@ import AwaitOnSuccess from './AwaitOnSuccess.svelte' import type { OmitKeyof, QueryClient } from '@tanstack/svelte-query' import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core' - import type { Writable } from 'svelte/store' - export let queryClient: QueryClient - export let persistOptions: OmitKeyof - export let onSuccess: () => Promise - export let states: Writable> + interface Props { + queryClient: QueryClient + persistOptions: OmitKeyof + onSuccess: () => Promise + states: Array + } + + let { queryClient, persistOptions, onSuccess, states }: Props = $props() diff --git a/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte b/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte index 48670b32d2..0284becb09 100644 --- a/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte +++ b/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte @@ -1,16 +1,21 @@ -
    data: {$query.data ?? 'undefined'}
    -
    fetchStatus: {$query.fetchStatus}
    +
    data: {query.data ?? 'undefined'}
    +
    fetchStatus: {query.fetchStatus}
    diff --git a/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte b/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte index 4c91c2a2c6..eb52193738 100644 --- a/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte @@ -3,13 +3,16 @@ import FreshData from './FreshData.svelte' import type { OmitKeyof, QueryClient } from '@tanstack/svelte-query' import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core' - import type { Writable } from 'svelte/store' - import type { StatusResult } from '../utils' + import type { StatusResult } from '../utils.svelte' - export let queryClient: QueryClient - export let persistOptions: OmitKeyof - export let states: Writable>> - export let fetched: Writable + interface Props { + queryClient: QueryClient + persistOptions: OmitKeyof + states: { value: Array> } + fetched: boolean + } + + let { queryClient, persistOptions, states, fetched }: Props = $props() diff --git a/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte b/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte index 6046f552e3..25695e07fc 100644 --- a/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte +++ b/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte @@ -1,10 +1,10 @@ -
    {$query.data}
    -
    fetchStatus: {$query.fetchStatus}
    +
    {query.data}
    +
    fetchStatus: {query.fetchStatus}
    diff --git a/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte b/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte index bb7c585027..d18b79aea3 100644 --- a/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte @@ -3,12 +3,15 @@ import InitialData from './InitialData.svelte' import type { OmitKeyof, QueryClient } from '@tanstack/svelte-query' import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core' - import type { Writable } from 'svelte/store' - import type { StatusResult } from '../utils' + import type { StatusResult } from '../utils.svelte' - export let queryClient: QueryClient - export let persistOptions: OmitKeyof - export let states: Writable>> + interface Props { + queryClient: QueryClient + persistOptions: OmitKeyof + states: { value: Array> } + } + + let { queryClient, persistOptions, states }: Props = $props() diff --git a/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte b/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte index c890014886..c07fee7267 100644 --- a/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte +++ b/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte @@ -1,6 +1,6 @@ -
    {$query.data}
    -
    fetchStatus: {$query.fetchStatus}
    +
    {query.data}
    +
    fetchStatus: {query.fetchStatus}
    diff --git a/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte b/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte index c0d2792771..0b280ca570 100644 --- a/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte @@ -4,9 +4,13 @@ import type { OmitKeyof, QueryClient } from '@tanstack/svelte-query' import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core' - export let queryClient: QueryClient - export let persistOptions: OmitKeyof - export let onSuccess: () => void + interface Props { + queryClient: QueryClient + persistOptions: OmitKeyof + onSuccess: () => void + } + + let { queryClient, persistOptions, onSuccess }: Props = $props() diff --git a/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts b/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.svelte.test.ts similarity index 79% rename from packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts rename to packages/svelte-query-persist-client/tests/PersistQueryClientProvider.svelte.test.ts index 1366fe8541..e89387e474 100644 --- a/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts +++ b/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.svelte.test.ts @@ -1,7 +1,6 @@ import { render, waitFor } from '@testing-library/svelte' import { describe, expect, test, vi } from 'vitest' import { persistQueryClientSave } from '@tanstack/query-persist-client-core' -import { get, writable } from 'svelte/store' import AwaitOnSuccess from './AwaitOnSuccess/Provider.svelte' import FreshData from './FreshData/Provider.svelte' import OnSuccess from './OnSuccess/Provider.svelte' @@ -9,14 +8,13 @@ import InitialData from './InitialData/Provider.svelte' import RemoveCache from './RemoveCache/Provider.svelte' import RestoreCache from './RestoreCache/Provider.svelte' import UseQueries from './UseQueries/Provider.svelte' -import { createQueryClient, sleep } from './utils' +import { createQueryClient, ref, sleep } from './utils.svelte' import type { PersistedClient, Persister, } from '@tanstack/query-persist-client-core' -import type { Writable } from 'svelte/store' -import type { StatusResult } from './utils' +import type { StatusResult } from './utils.svelte' const createMockPersister = (): Persister => { let storedState: PersistedClient | undefined @@ -56,7 +54,7 @@ const createMockErrorPersister = ( describe('PersistQueryClientProvider', () => { test('restores cache from persister', async () => { - const statesStore: Writable>> = writable([]) + let states = ref>>([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ @@ -74,7 +72,7 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - states: statesStore, + states, }, }) @@ -82,36 +80,35 @@ describe('PersistQueryClientProvider', () => { await waitFor(() => rendered.getByText('hydrated')) await waitFor(() => rendered.getByText('fetched')) - const states = get(statesStore) - expect(states).toHaveLength(4) + expect(states.value).toHaveLength(3) - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ status: 'pending', fetchStatus: 'idle', data: undefined, }) - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ status: 'success', fetchStatus: 'fetching', data: 'hydrated', }) - expect(states[2]).toMatchObject({ + expect(states.value[2]).toMatchObject({ status: 'success', - fetchStatus: 'fetching', - data: 'hydrated', + fetchStatus: 'idle', + data: 'fetched', }) - expect(states[3]).toMatchObject({ + /* expect(states[3]).toMatchObject({ status: 'success', fetchStatus: 'idle', data: 'fetched', - }) + }) */ }) test('should also put useQueries into idle state', async () => { - const statesStore: Writable>> = writable([]) + let states = ref>>([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ @@ -129,7 +126,7 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - states: statesStore, + states, }, }) @@ -137,29 +134,21 @@ describe('PersistQueryClientProvider', () => { await waitFor(() => rendered.getByText('hydrated')) await waitFor(() => rendered.getByText('fetched')) - const states = get(statesStore) - - expect(states).toHaveLength(4) + expect(states.value).toHaveLength(3) - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ status: 'pending', fetchStatus: 'idle', data: undefined, }) - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ status: 'success', fetchStatus: 'fetching', data: 'hydrated', }) - expect(states[2]).toMatchObject({ - status: 'success', - fetchStatus: 'fetching', - data: 'hydrated', - }) - - expect(states[3]).toMatchObject({ + expect(states.value[2]).toMatchObject({ status: 'success', fetchStatus: 'idle', data: 'fetched', @@ -167,7 +156,7 @@ describe('PersistQueryClientProvider', () => { }) test('should show initialData while restoring', async () => { - const statesStore: Writable>> = writable([]) + let states = ref>>([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ @@ -185,7 +174,7 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - states: statesStore, + states, }, }) @@ -193,28 +182,27 @@ describe('PersistQueryClientProvider', () => { await waitFor(() => rendered.getByText('hydrated')) await waitFor(() => rendered.getByText('fetched')) - const states = get(statesStore) - expect(states).toHaveLength(4) + expect(states.value).toHaveLength(3) - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ status: 'success', fetchStatus: 'idle', data: 'initial', }) - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ status: 'success', fetchStatus: 'fetching', data: 'hydrated', }) - expect(states[2]).toMatchObject({ + /* expect(states[2]).toMatchObject({ status: 'success', fetchStatus: 'fetching', data: 'hydrated', - }) + }) */ - expect(states[3]).toMatchObject({ + expect(states.value[2]).toMatchObject({ status: 'success', fetchStatus: 'idle', data: 'fetched', @@ -222,7 +210,7 @@ describe('PersistQueryClientProvider', () => { }) test('should not refetch after restoring when data is fresh', async () => { - const statesStore: Writable>> = writable([]) + let states = ref>>([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ @@ -236,13 +224,13 @@ describe('PersistQueryClientProvider', () => { queryClient.clear() - const fetched = writable(false) + const fetched = $state(false) const rendered = render(FreshData, { props: { queryClient, persistOptions: { persister }, - states: statesStore, + states, fetched, }, }) @@ -250,18 +238,17 @@ describe('PersistQueryClientProvider', () => { await waitFor(() => rendered.getByText('data: undefined')) await waitFor(() => rendered.getByText('data: hydrated')) - const states = get(statesStore) - expect(states).toHaveLength(2) + expect(fetched).toBe(false) - expect(get(fetched)).toBe(false) + expect(states.value).toHaveLength(2) - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ status: 'pending', fetchStatus: 'idle', data: undefined, }) - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ status: 'success', fetchStatus: 'idle', data: 'hydrated', @@ -311,17 +298,17 @@ describe('PersistQueryClientProvider', () => { queryClient.clear() - const statesStore: Writable> = writable([]) + let states: Array = $state([]) const rendered = render(AwaitOnSuccess, { props: { queryClient, persistOptions: { persister }, - states: statesStore, + states, onSuccess: async () => { - statesStore.update((s) => [...s, 'onSuccess']) - await sleep(20) - statesStore.update((s) => [...s, 'onSuccess done']) + states.push('onSuccess') + await sleep(5) + states.push('onSuccess done') }, }, }) @@ -329,8 +316,6 @@ describe('PersistQueryClientProvider', () => { await waitFor(() => rendered.getByText('hydrated')) await waitFor(() => rendered.getByText('fetched')) - const states = get(statesStore) - expect(states).toEqual([ 'onSuccess', 'onSuccess done', diff --git a/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte b/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte index 8738e99bd5..32e3430c4d 100644 --- a/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte @@ -4,8 +4,12 @@ import type { OmitKeyof, QueryClient } from '@tanstack/svelte-query' import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core' - export let queryClient: QueryClient - export let persistOptions: OmitKeyof + interface Props { + queryClient: QueryClient + persistOptions: OmitKeyof + } + + let { queryClient, persistOptions }: Props = $props() diff --git a/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte b/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte index c890014886..c07fee7267 100644 --- a/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte +++ b/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte @@ -1,6 +1,6 @@ -
    {$query.data}
    -
    fetchStatus: {$query.fetchStatus}
    +
    {query.data}
    +
    fetchStatus: {query.fetchStatus}
    diff --git a/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte b/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte index 0613c9440f..c300d5010a 100644 --- a/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte @@ -3,12 +3,15 @@ import RestoreCache from './RestoreCache.svelte' import type { OmitKeyof, QueryClient } from '@tanstack/svelte-query' import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core' - import type { Writable } from 'svelte/store' - import type { StatusResult } from '../utils' + import type { StatusResult } from '../utils.svelte' - export let queryClient: QueryClient - export let persistOptions: OmitKeyof - export let states: Writable>> + interface Props { + queryClient: QueryClient + persistOptions: OmitKeyof + states: { value: Array> } + } + + let { queryClient, persistOptions, states }: Props = $props() diff --git a/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte b/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte index 2e2af65a58..e7e04e3900 100644 --- a/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte +++ b/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte @@ -1,10 +1,10 @@ -
    {$query.data}
    -
    fetchStatus: {$query.fetchStatus}
    +
    {query.data}
    +
    fetchStatus: {query.fetchStatus}
    diff --git a/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte b/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte index 301eb1629e..41a743b5f1 100644 --- a/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte @@ -3,12 +3,15 @@ import UseQueries from './UseQueries.svelte' import type { OmitKeyof, QueryClient } from '@tanstack/svelte-query' import type { PersistQueryClientOptions } from '@tanstack/query-persist-client-core' - import type { Writable } from 'svelte/store' - import type { StatusResult } from '../utils' + import type { StatusResult } from '../utils.svelte' - export let queryClient: QueryClient - export let persistOptions: OmitKeyof - export let states: Writable>> + interface Props { + queryClient: QueryClient + persistOptions: OmitKeyof + states: { value: Array> } + } + + let { queryClient, persistOptions, states }: Props = $props() diff --git a/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte b/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte index dbf88e6fb7..ac92e933ab 100644 --- a/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte +++ b/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte @@ -1,10 +1,10 @@ -
    {$queries[0].data}
    -
    fetchStatus: {$queries[0].fetchStatus}
    +
    {queries[0].data}
    +
    fetchStatus: {queries[0].fetchStatus}
    diff --git a/packages/svelte-query-persist-client/tests/utils.ts b/packages/svelte-query-persist-client/tests/utils.svelte.ts similarity index 72% rename from packages/svelte-query-persist-client/tests/utils.ts rename to packages/svelte-query-persist-client/tests/utils.svelte.ts index b246d49a35..8e59db6139 100644 --- a/packages/svelte-query-persist-client/tests/utils.ts +++ b/packages/svelte-query-persist-client/tests/utils.svelte.ts @@ -17,3 +17,16 @@ export type StatusResult = { fetchStatus: string data: T | undefined } + +export function ref(initial: T) { + let value = $state(initial) + + return { + get value() { + return value + }, + set value(newValue) { + value = newValue + }, + } +} diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index c2c2b5f793..671b3598ca 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -45,13 +45,13 @@ }, "devDependencies": { "@sveltejs/package": "^2.3.1", - "@sveltejs/vite-plugin-svelte": "^3.1.0", - "@testing-library/svelte": "^5.1.0", - "eslint-plugin-svelte": "^2.42.0", - "svelte": "^4.2.18", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.4", + "@testing-library/svelte": "^5.2.0", + "eslint-plugin-svelte": "^2.43.0", + "svelte": "5.0.0-next.192", "svelte-check": "^3.8.4" }, "peerDependencies": { - "svelte": "^3.54.0 || ^4.0.0 || ^5.0.0-next.0" + "svelte": "^5.0.0-next.105" } } diff --git a/packages/svelte-query/src/HydrationBoundary.svelte b/packages/svelte-query/src/HydrationBoundary.svelte index ecd29cebbf..2550fa656d 100644 --- a/packages/svelte-query/src/HydrationBoundary.svelte +++ b/packages/svelte-query/src/HydrationBoundary.svelte @@ -1,16 +1,27 @@ - +{@render children()} diff --git a/packages/svelte-query/src/QueryClientProvider.svelte b/packages/svelte-query/src/QueryClientProvider.svelte index 938562a14d..c45aa5d809 100644 --- a/packages/svelte-query/src/QueryClientProvider.svelte +++ b/packages/svelte-query/src/QueryClientProvider.svelte @@ -2,8 +2,10 @@ import { onDestroy, onMount } from 'svelte' import { QueryClient } from '@tanstack/query-core' import { setQueryClientContext } from './context' + import type { QueryClientProviderProps } from './types' - export let client = new QueryClient() + const { client = new QueryClient(), children }: QueryClientProviderProps = + $props() onMount(() => { client.mount() @@ -16,4 +18,4 @@ }) - +{@render children()} diff --git a/packages/svelte-query/src/context.ts b/packages/svelte-query/src/context.ts index 962451b232..0676181f57 100644 --- a/packages/svelte-query/src/context.ts +++ b/packages/svelte-query/src/context.ts @@ -1,7 +1,5 @@ import { getContext, setContext } from 'svelte' -import { readable } from 'svelte/store' import type { QueryClient } from '@tanstack/query-core' -import type { Readable } from 'svelte/store' const _contextKey = '$$_queryClient' @@ -25,18 +23,18 @@ export const setQueryClientContext = (client: QueryClient): void => { const _isRestoringContextKey = '$$_isRestoring' /** Retrieves a `isRestoring` from Svelte's context */ -export const getIsRestoringContext = (): Readable => { +export const getIsRestoringContext = (): (() => boolean) => { try { - const isRestoring = getContext | undefined>( + const isRestoring = getContext<(() => boolean) | undefined>( _isRestoringContextKey, ) - return isRestoring ? isRestoring : readable(false) + return isRestoring ?? (() => false) } catch (error) { - return readable(false) + return () => false } } /** Sets a `isRestoring` on Svelte's context */ -export const setIsRestoringContext = (isRestoring: Readable): void => { +export const setIsRestoringContext = (isRestoring: () => boolean): void => { setContext(_isRestoringContextKey, isRestoring) } diff --git a/packages/svelte-query/src/createBaseQuery.svelte.ts b/packages/svelte-query/src/createBaseQuery.svelte.ts new file mode 100644 index 0000000000..f5427bd664 --- /dev/null +++ b/packages/svelte-query/src/createBaseQuery.svelte.ts @@ -0,0 +1,117 @@ +import { notifyManager } from '@tanstack/query-core' +import { untrack } from 'svelte' +import { useIsRestoring } from './useIsRestoring' +import { useQueryClient } from './useQueryClient' +import type { CreateBaseQueryOptions, CreateBaseQueryResult } from './types' +import type { + QueryClient, + QueryKey, + QueryObserver, + QueryObserverResult, +} from '@tanstack/query-core' + +export function createBaseQuery< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey extends QueryKey, +>( + options: CreateBaseQueryOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >, + Observer: typeof QueryObserver, + queryClient?: QueryClient, +): CreateBaseQueryResult { + /** Load query client */ + const client = useQueryClient(queryClient) + const isRestoring = useIsRestoring() + const optionsStore = typeof options !== 'function' ? () => options : options + + /** Creates a store that has the default options applied */ + function updateOptions() { + const key = optionsStore().queryKey + const keyFn = typeof key === 'function' ? key : () => key // allow query-key and enable to be a function + const queryKey: TQueryKey = $state.snapshot(keyFn()) as any // remove proxy prevent reactive query in devTools + let tempEnable = optionsStore().enabled + const defaultedOptions = client.defaultQueryOptions({ + ...optionsStore(), + queryKey: queryKey, + enabled: typeof tempEnable == 'function' ? tempEnable() : tempEnable, + }) + defaultedOptions._optimisticResults = 'optimistic' + if (isRestoring()) { + defaultedOptions._optimisticResults = 'isRestoring' + } + + defaultedOptions.structuralSharing = false + + return defaultedOptions + } + + const defaultedOptionsStore = updateOptions + /** Creates the observer */ + const observer = new Observer< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey + >(client, defaultedOptionsStore()) + + const result = $state>( + observer.getOptimisticResult(defaultedOptionsStore()), + ) + + function upResult(r: QueryObserverResult) { + Object.assign(result, r) + } + + $effect(() => { + let un = () => undefined + if (!isRestoring()) { + { + // @ts-expect-error + un = observer.subscribe((v) => { + notifyManager.batchCalls(() => { + const temp = observer.getOptimisticResult(defaultedOptionsStore()) + upResult(temp) + })() + }) + } + } + + observer.updateResult() + return () => { + un() + } + }) + + /** Subscribe to changes in result and defaultedOptionsStore */ + $effect.pre(() => { + observer.setOptions(defaultedOptionsStore(), { listeners: false }) + upResult(observer.getOptimisticResult(defaultedOptionsStore())) + // result = observer.getOptimisticResult(defaultedOptionsStore()) //prevent lag , somehow observer.subscribe does not return + }) + + const final_ = $state({ value: result }) + + // update result + $effect(() => { + // svelte does not need this with it is proxy state and fine-grained reactivity? + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (result !== null) + untrack(() => { + const v = !defaultedOptionsStore().notifyOnChangeProps + ? observer.trackResult(result) + : result + + final_.value = Object.assign(final_.value, v) + }) + }) + return final_.value +} diff --git a/packages/svelte-query/src/createBaseQuery.ts b/packages/svelte-query/src/createBaseQuery.ts deleted file mode 100644 index c307c9cb80..0000000000 --- a/packages/svelte-query/src/createBaseQuery.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { derived, get, readable } from 'svelte/store' -import { notifyManager } from '@tanstack/query-core' -import { useIsRestoring } from './useIsRestoring' -import { useQueryClient } from './useQueryClient' -import { isSvelteStore } from './utils' -import type { - QueryClient, - QueryKey, - QueryObserver, - QueryObserverResult, -} from '@tanstack/query-core' -import type { - CreateBaseQueryOptions, - CreateBaseQueryResult, - StoreOrVal, -} from './types' - -export function createBaseQuery< - TQueryFnData, - TError, - TData, - TQueryData, - TQueryKey extends QueryKey, ->( - options: StoreOrVal< - CreateBaseQueryOptions - >, - Observer: typeof QueryObserver, - queryClient?: QueryClient, -): CreateBaseQueryResult { - /** Load query client */ - const client = useQueryClient(queryClient) - const isRestoring = useIsRestoring() - /** Converts options to a svelte store if not already a store object */ - const optionsStore = isSvelteStore(options) ? options : readable(options) - - /** Creates a store that has the default options applied */ - const defaultedOptionsStore = derived( - [optionsStore, isRestoring], - ([$optionsStore, $isRestoring]) => { - const defaultedOptions = client.defaultQueryOptions($optionsStore) - defaultedOptions._optimisticResults = $isRestoring - ? 'isRestoring' - : 'optimistic' - return defaultedOptions - }, - ) - - /** Creates the observer */ - const observer = new Observer< - TQueryFnData, - TError, - TData, - TQueryData, - TQueryKey - >(client, get(defaultedOptionsStore)) - - defaultedOptionsStore.subscribe(($defaultedOptions) => { - // Do not notify on updates because of changes in the options because - // these changes should already be reflected in the optimistic result. - observer.setOptions($defaultedOptions, { listeners: false }) - }) - - const result = derived< - typeof isRestoring, - QueryObserverResult - >(isRestoring, ($isRestoring, set) => { - const unsubscribe = $isRestoring - ? () => undefined - : observer.subscribe(notifyManager.batchCalls(set)) - observer.updateResult() - return unsubscribe - }) - - /** Subscribe to changes in result and defaultedOptionsStore */ - const { subscribe } = derived( - [result, defaultedOptionsStore], - ([$result, $defaultedOptionsStore]) => { - $result = observer.getOptimisticResult($defaultedOptionsStore) - return !$defaultedOptionsStore.notifyOnChangeProps - ? observer.trackResult($result) - : $result - }, - ) - - return { subscribe } -} diff --git a/packages/svelte-query/src/createInfiniteQuery.ts b/packages/svelte-query/src/createInfiniteQuery.ts index b39c6eef03..7cd72b7aec 100644 --- a/packages/svelte-query/src/createInfiniteQuery.ts +++ b/packages/svelte-query/src/createInfiniteQuery.ts @@ -1,5 +1,5 @@ import { InfiniteQueryObserver } from '@tanstack/query-core' -import { createBaseQuery } from './createBaseQuery' +import { createBaseQuery } from './createBaseQuery.svelte' import type { DefaultError, InfiniteData, @@ -10,7 +10,6 @@ import type { import type { CreateInfiniteQueryOptions, CreateInfiniteQueryResult, - StoreOrVal, } from './types' export function createInfiniteQuery< @@ -20,15 +19,13 @@ export function createInfiniteQuery< TQueryKey extends QueryKey = QueryKey, TPageParam = unknown, >( - options: StoreOrVal< - CreateInfiniteQueryOptions< - TQueryFnData, - TError, - TData, - TQueryFnData, - TQueryKey, - TPageParam - > + options: CreateInfiniteQueryOptions< + TQueryFnData, + TError, + TData, + TQueryFnData, + TQueryKey, + TPageParam >, queryClient?: QueryClient, ): CreateInfiniteQueryResult { diff --git a/packages/svelte-query/src/createMutation.svelte.ts b/packages/svelte-query/src/createMutation.svelte.ts new file mode 100644 index 0000000000..b3b221ed1a --- /dev/null +++ b/packages/svelte-query/src/createMutation.svelte.ts @@ -0,0 +1,64 @@ +import { onDestroy } from 'svelte' + +import { MutationObserver, notifyManager } from '@tanstack/query-core' +import { useQueryClient } from './useQueryClient' +import type { + CreateMutateFunction, + CreateMutationOptions, + CreateMutationResult, +} from './types' + +import type { DefaultError, QueryClient } from '@tanstack/query-core' + +export function createMutation< + TData = unknown, + TError = DefaultError, + TVariables = void, + TContext = unknown, +>( + options: CreateMutationOptions, + queryClient?: QueryClient, +): CreateMutationResult { + const client = useQueryClient(queryClient) + + const observer = $derived( + new MutationObserver(client, options), + ) + const mutate = $state< + CreateMutateFunction + >((variables, mutateOptions) => { + observer.mutate(variables, mutateOptions).catch(noop) + }) + + $effect.pre(() => { + observer.setOptions(options) + }) + + const result = $state(observer.getCurrentResult()) + + const un = observer.subscribe((val) => { + notifyManager.batchCalls(() => { + Object.assign(result, val) + + // result = val + })() + }) + onDestroy(() => { + un() + }) + // @ts-expect-error + return new Proxy(result, { + get: (_, prop) => { + const r = { + ...result, + mutate, + mutateAsync: result.mutate, + } + if (prop == 'value') return r + // @ts-expect-error + return r[prop] + }, + }) +} + +function noop() {} diff --git a/packages/svelte-query/src/createMutation.ts b/packages/svelte-query/src/createMutation.ts deleted file mode 100644 index 97053fb0f4..0000000000 --- a/packages/svelte-query/src/createMutation.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { derived, get, readable } from 'svelte/store' -import { MutationObserver, notifyManager } from '@tanstack/query-core' -import { useQueryClient } from './useQueryClient' -import { isSvelteStore, noop } from './utils' -import type { - CreateMutateFunction, - CreateMutationOptions, - CreateMutationResult, - StoreOrVal, -} from './types' -import type { DefaultError, QueryClient } from '@tanstack/query-core' - -export function createMutation< - TData = unknown, - TError = DefaultError, - TVariables = void, - TContext = unknown, ->( - options: StoreOrVal< - CreateMutationOptions - >, - queryClient?: QueryClient, -): CreateMutationResult { - const client = useQueryClient(queryClient) - - const optionsStore = isSvelteStore(options) ? options : readable(options) - - const observer = new MutationObserver( - client, - get(optionsStore), - ) - let mutate: CreateMutateFunction - - optionsStore.subscribe(($options) => { - mutate = (variables, mutateOptions) => { - observer.mutate(variables, mutateOptions).catch(noop) - } - observer.setOptions($options) - }) - - const result = readable(observer.getCurrentResult(), (set) => { - return observer.subscribe(notifyManager.batchCalls((val) => set(val))) - }) - - const { subscribe } = derived(result, ($result) => ({ - ...$result, - mutate, - mutateAsync: $result.mutate, - })) - - return { subscribe } -} diff --git a/packages/svelte-query/src/createQueries.ts b/packages/svelte-query/src/createQueries.svelte.ts similarity index 84% rename from packages/svelte-query/src/createQueries.ts rename to packages/svelte-query/src/createQueries.svelte.ts index cb1ba75679..f46d9dd258 100644 --- a/packages/svelte-query/src/createQueries.ts +++ b/packages/svelte-query/src/createQueries.svelte.ts @@ -1,10 +1,8 @@ +import { untrack } from 'svelte' import { QueriesObserver, notifyManager } from '@tanstack/query-core' -import { derived, get, readable } from 'svelte/store' import { useIsRestoring } from './useIsRestoring' import { useQueryClient } from './useQueryClient' -import { isSvelteStore } from './utils' -import type { Readable } from 'svelte/store' -import type { StoreOrVal } from './types' +import type { FnOrVal } from '.' import type { DefaultError, DefinedQueryObserverResult, @@ -121,7 +119,7 @@ type GetCreateQueryResult = unknown extends TError ? DefaultError : TError > : // Fallback - QueryObserverResult + never /** * QueriesOptions reducer recursively unwraps function arguments to infer/enforce type param @@ -210,68 +208,71 @@ export function createQueries< queries, ...options }: { - queries: StoreOrVal<[...QueriesOptions]> + queries: FnOrVal<[...QueriesOptions]> combine?: (result: QueriesResults) => TCombinedResult }, queryClient?: QueryClient, -): Readable { +): TCombinedResult { const client = useQueryClient(queryClient) const isRestoring = useIsRestoring() - const queriesStore = isSvelteStore(queries) ? queries : readable(queries) - - const defaultedQueriesStore = derived( - [queriesStore, isRestoring], - ([$queries, $isRestoring]) => { - return $queries.map((opts) => { - const defaultedOptions = client.defaultQueryOptions( - opts as QueryObserverOptions, - ) - // Make sure the results are already in fetching state before subscribing or updating options - defaultedOptions._optimisticResults = $isRestoring - ? 'isRestoring' - : 'optimistic' - return defaultedOptions - }) - }, + const queriesStore = $derived( + typeof queries != 'function' ? () => queries : queries, ) + + const defaultedQueriesStore = $derived(() => { + return queriesStore().map((opts) => { + const defaultedOptions = client.defaultQueryOptions(opts) + // Make sure the results are already in fetching state before subscribing or updating options + defaultedOptions._optimisticResults = isRestoring() + ? 'isRestoring' + : 'optimistic' + return defaultedOptions as QueryObserverOptions + }) + }) const observer = new QueriesObserver( client, - get(defaultedQueriesStore), + defaultedQueriesStore(), options as QueriesObserverOptions, ) - - defaultedQueriesStore.subscribe(($defaultedQueries) => { + const [_, getCombinedResult, trackResult] = $derived( + observer.getOptimisticResult( + defaultedQueriesStore(), + (options as QueriesObserverOptions).combine, + ), + ) + $effect(() => { // Do not notify on updates because of changes in the options because // these changes should already be reflected in the optimistic result. observer.setQueries( - $defaultedQueries, + defaultedQueriesStore(), options as QueriesObserverOptions, { listeners: false }, ) }) - const result = derived([isRestoring], ([$isRestoring], set) => { - const unsubscribe = $isRestoring - ? () => undefined - : observer.subscribe(notifyManager.batchCalls(set)) + let result = $state(getCombinedResult(trackResult())) - return () => unsubscribe() - }) + $effect(() => { + if (isRestoring()) { + return () => null + } + untrack(() => { + // @ts-expect-error + Object.assign(result, getCombinedResult(trackResult())) + }) - const { subscribe } = derived( - [result, defaultedQueriesStore], - // @ts-expect-error svelte-check thinks this is unused - ([$result, $defaultedQueriesStore]) => { - const [rawResult, combineResult, trackResult] = - observer.getOptimisticResult( - $defaultedQueriesStore, + return observer.subscribe((_result) => { + notifyManager.batchCalls(() => { + const res = observer.getOptimisticResult( + defaultedQueriesStore(), (options as QueriesObserverOptions).combine, ) - $result = rawResult - return combineResult(trackResult()) - }, - ) + // @ts-expect-error + Object.assign(result, res[1](res[2]())) + })() + }) + }) - return { subscribe } + return result } diff --git a/packages/svelte-query/src/createQuery.ts b/packages/svelte-query/src/createQuery.ts index 32bf45e394..794495ba5c 100644 --- a/packages/svelte-query/src/createQuery.ts +++ b/packages/svelte-query/src/createQuery.ts @@ -1,11 +1,10 @@ import { QueryObserver } from '@tanstack/query-core' -import { createBaseQuery } from './createBaseQuery' +import { createBaseQuery } from './createBaseQuery.svelte' import type { DefaultError, QueryClient, QueryKey } from '@tanstack/query-core' import type { CreateQueryOptions, CreateQueryResult, DefinedCreateQueryResult, - StoreOrVal, } from './types' import type { DefinedInitialDataOptions, @@ -18,9 +17,7 @@ export function createQuery< TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, >( - options: StoreOrVal< - DefinedInitialDataOptions - >, + options: DefinedInitialDataOptions, queryClient?: QueryClient, ): DefinedCreateQueryResult @@ -30,9 +27,7 @@ export function createQuery< TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, >( - options: StoreOrVal< - UndefinedInitialDataOptions - >, + options: UndefinedInitialDataOptions, queryClient?: QueryClient, ): CreateQueryResult @@ -42,14 +37,12 @@ export function createQuery< TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, >( - options: StoreOrVal< - CreateQueryOptions - >, + options: CreateQueryOptions, queryClient?: QueryClient, ): CreateQueryResult export function createQuery( - options: StoreOrVal, + options: CreateQueryOptions, queryClient?: QueryClient, ) { return createBaseQuery(options, QueryObserver, queryClient) diff --git a/packages/svelte-query/src/index.ts b/packages/svelte-query/src/index.ts index 7e5df191ac..5cc94ad474 100644 --- a/packages/svelte-query/src/index.ts +++ b/packages/svelte-query/src/index.ts @@ -8,20 +8,20 @@ export * from './types' export * from './context' export { createQuery } from './createQuery' -export type { QueriesResults, QueriesOptions } from './createQueries' +export type { QueriesResults, QueriesOptions } from './createQueries.svelte' export type { DefinedInitialDataOptions, UndefinedInitialDataOptions, } from './queryOptions' export { queryOptions } from './queryOptions' -export { createQueries } from './createQueries' +export { createQueries } from './createQueries.svelte' export { createInfiniteQuery } from './createInfiniteQuery' export { infiniteQueryOptions } from './infiniteQueryOptions' -export { createMutation } from './createMutation' -export { useMutationState } from './useMutationState' +export { createMutation } from './createMutation.svelte' +export { useMutationState } from './useMutationState.svelte' export { useQueryClient } from './useQueryClient' -export { useIsFetching } from './useIsFetching' -export { useIsMutating } from './useIsMutating' +export { useIsFetching } from './useIsFetching.svelte' +export { useIsMutating } from './useIsMutating.svelte' export { useIsRestoring } from './useIsRestoring' export { useHydrate } from './useHydrate' export { default as HydrationBoundary } from './HydrationBoundary.svelte' diff --git a/packages/svelte-query/src/types.ts b/packages/svelte-query/src/types.ts index 4fd8bdb271..42d2c751a0 100644 --- a/packages/svelte-query/src/types.ts +++ b/packages/svelte-query/src/types.ts @@ -1,3 +1,4 @@ +import type { Snippet } from 'svelte' import type { DefaultError, DefinedQueryObserverResult, @@ -9,15 +10,13 @@ import type { MutationObserverOptions, MutationObserverResult, MutationState, - OmitKeyof, + QueryClient, QueryKey, QueryObserverOptions, QueryObserverResult, } from '@tanstack/query-core' -import type { Readable } from 'svelte/store' -/** Allows a type to be either the base object or a store of that object */ -export type StoreOrVal = T | Readable +export type FnOrVal = (() => T) | T // can be a fn that returns reactive statement or $state or $derived deep states /** Options for createBaseQuery */ export type CreateBaseQueryOptions< @@ -26,13 +25,18 @@ export type CreateBaseQueryOptions< TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, -> = QueryObserverOptions +> = FnOrVal< + Omit< + QueryObserverOptions, + 'queryKey' | 'enabled' + > & { enabled?: FnOrVal; queryKey: FnOrVal } +> /** Result from createBaseQuery */ export type CreateBaseQueryResult< TData = unknown, TError = DefaultError, -> = Readable> +> = QueryObserverResult /** Options for createQuery */ export type CreateQueryOptions< @@ -56,26 +60,31 @@ export type CreateInfiniteQueryOptions< TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown, -> = InfiniteQueryObserverOptions< - TQueryFnData, - TError, - TData, - TQueryData, - TQueryKey, - TPageParam +> = FnOrVal< + Omit< + InfiniteQueryObserverOptions< + TQueryFnData, + TError, + TData, + TQueryData, + TQueryKey, + TPageParam + >, + 'queryKey' | 'enabled' + > & { enabled?: FnOrVal; queryKey: FnOrVal } > /** Result from createInfiniteQuery */ export type CreateInfiniteQueryResult< TData = unknown, TError = DefaultError, -> = Readable> +> = InfiniteQueryObserverResult /** Options for createBaseQuery with initialData */ export type DefinedCreateBaseQueryResult< TData = unknown, TError = DefaultError, -> = Readable> +> = DefinedQueryObserverResult /** Options for createQuery with initialData */ export type DefinedCreateQueryResult< @@ -89,9 +98,9 @@ export type CreateMutationOptions< TError = DefaultError, TVariables = void, TContext = unknown, -> = OmitKeyof< +> = Omit< MutationObserverOptions, - '_defaulted' + '_defaulted' | 'variables' > export type CreateMutateFunction< @@ -128,7 +137,7 @@ export type CreateMutationResult< TError = DefaultError, TVariables = unknown, TContext = unknown, -> = Readable> +> = CreateBaseMutationResult type Override = { [AKey in keyof TTargetA]: AKey extends keyof TTargetB @@ -143,3 +152,8 @@ export type MutationStateOptions = { mutation: Mutation, ) => TResult } + +export type QueryClientProviderProps = { + client: QueryClient + children: Snippet +} diff --git a/packages/svelte-query/src/useIsFetching.svelte.ts b/packages/svelte-query/src/useIsFetching.svelte.ts new file mode 100644 index 0000000000..c15527e43a --- /dev/null +++ b/packages/svelte-query/src/useIsFetching.svelte.ts @@ -0,0 +1,23 @@ +import { onDestroy } from 'svelte' +import { useQueryClient } from './useQueryClient' +import type { QueryClient, QueryFilters } from '@tanstack/query-core' + +export function useIsFetching( + filters?: QueryFilters, + queryClient?: QueryClient, +): () => number { + const client = useQueryClient(queryClient) + const queryCache = client.getQueryCache() + + const init = client.isFetching(filters) + let isFetching = $state(init) + $effect(() => { + const unsubscribe = queryCache.subscribe(() => { + isFetching = client.isFetching(filters) + }) + + onDestroy(unsubscribe) + }) + + return () => isFetching +} diff --git a/packages/svelte-query/src/useIsFetching.ts b/packages/svelte-query/src/useIsFetching.ts deleted file mode 100644 index 33157d7e66..0000000000 --- a/packages/svelte-query/src/useIsFetching.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - type QueryClient, - type QueryFilters, - notifyManager, -} from '@tanstack/query-core' -import { readable } from 'svelte/store' -import { useQueryClient } from './useQueryClient' -import type { Readable } from 'svelte/store' - -export function useIsFetching( - filters?: QueryFilters, - queryClient?: QueryClient, -): Readable { - const client = useQueryClient(queryClient) - const cache = client.getQueryCache() - // isFetching is the prev value initialized on mount * - let isFetching = client.isFetching(filters) - - const { subscribe } = readable(isFetching, (set) => { - return cache.subscribe( - notifyManager.batchCalls(() => { - const newIsFetching = client.isFetching(filters) - if (isFetching !== newIsFetching) { - // * and update with each change - isFetching = newIsFetching - set(isFetching) - } - }), - ) - }) - - return { subscribe } -} diff --git a/packages/svelte-query/src/useIsMutating.ts b/packages/svelte-query/src/useIsMutating.svelte.ts similarity index 66% rename from packages/svelte-query/src/useIsMutating.ts rename to packages/svelte-query/src/useIsMutating.svelte.ts index 1c61e5d456..b7c75bbcf0 100644 --- a/packages/svelte-query/src/useIsMutating.ts +++ b/packages/svelte-query/src/useIsMutating.svelte.ts @@ -1,33 +1,29 @@ -import { - type MutationFilters, - type QueryClient, - notifyManager, -} from '@tanstack/query-core' -import { readable } from 'svelte/store' +import { notifyManager } from '@tanstack/query-core' import { useQueryClient } from './useQueryClient' -import type { Readable } from 'svelte/store' +import type { MutationFilters, QueryClient } from '@tanstack/query-core' export function useIsMutating( filters?: MutationFilters, queryClient?: QueryClient, -): Readable { +): () => number { const client = useQueryClient(queryClient) const cache = client.getMutationCache() // isMutating is the prev value initialized on mount * let isMutating = client.isMutating(filters) - const { subscribe } = readable(isMutating, (set) => { + const num = $state({ isMutating }) + $effect(() => { return cache.subscribe( notifyManager.batchCalls(() => { const newIisMutating = client.isMutating(filters) if (isMutating !== newIisMutating) { // * and update with each change isMutating = newIisMutating - set(isMutating) + num.isMutating = isMutating } }), ) }) - return { subscribe } + return () => num.isMutating } diff --git a/packages/svelte-query/src/useIsRestoring.ts b/packages/svelte-query/src/useIsRestoring.ts index ada6043d88..22b9cb9a3b 100644 --- a/packages/svelte-query/src/useIsRestoring.ts +++ b/packages/svelte-query/src/useIsRestoring.ts @@ -1,6 +1,5 @@ import { getIsRestoringContext } from './context' -import type { Readable } from 'svelte/store' -export function useIsRestoring(): Readable { +export function useIsRestoring(): () => boolean { return getIsRestoringContext() } diff --git a/packages/svelte-query/src/useMutationState.svelte.ts b/packages/svelte-query/src/useMutationState.svelte.ts new file mode 100644 index 0000000000..cfa96f0269 --- /dev/null +++ b/packages/svelte-query/src/useMutationState.svelte.ts @@ -0,0 +1,56 @@ +import { replaceEqualDeep } from '@tanstack/query-core' +import { useQueryClient } from './useQueryClient' +import type { + MutationCache, + MutationState, + QueryClient, +} from '@tanstack/query-core' +import type { MutationStateOptions } from './types' + +function getResult( + mutationCache: MutationCache, + options: MutationStateOptions, +): Array { + return mutationCache + .findAll(options.filters) + .map( + (mutation): TResult => + (options.select ? options.select(mutation) : mutation.state) as TResult, + ) +} + +export function useMutationState( + options: MutationStateOptions = {}, + queryClient?: QueryClient, +): Array { + const mutationCache = useQueryClient(queryClient).getMutationCache() + const result = $state(getResult(mutationCache, options)) + + $effect(() => { + const unsubscribe = mutationCache.subscribe(() => { + const nextResult = replaceEqualDeep( + result, + getResult(mutationCache, options), + ) + if (result !== nextResult) { + Object.assign(result, nextResult) + } + }) + + return unsubscribe + }) + + /* $effect(() => { + mutationCache.subscribe(() => { + const nextResult = replaceEqualDeep( + result.current, + getResult(mutationCache, optionsRef), + ) + if (result.current !== nextResult) { + result = nextResult + //notifyManager.schedule(onStoreChange) + } + }) + }) */ + return result +} diff --git a/packages/svelte-query/src/useMutationState.ts b/packages/svelte-query/src/useMutationState.ts deleted file mode 100644 index 0f9a874e44..0000000000 --- a/packages/svelte-query/src/useMutationState.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { readable } from 'svelte/store' -import { notifyManager, replaceEqualDeep } from '@tanstack/query-core' -import { useQueryClient } from './useQueryClient' -import type { - MutationCache, - MutationState, - QueryClient, -} from '@tanstack/query-core' -import type { Readable } from 'svelte/store' -import type { MutationStateOptions } from './types' - -function getResult( - mutationCache: MutationCache, - options: MutationStateOptions, -): Array { - return mutationCache - .findAll(options.filters) - .map( - (mutation): TResult => - (options.select ? options.select(mutation) : mutation.state) as TResult, - ) -} - -export function useMutationState( - options: MutationStateOptions = {}, - queryClient?: QueryClient, -): Readable> { - const client = useQueryClient(queryClient) - const mutationCache = client.getMutationCache() - - let result = getResult(mutationCache, options) - - const { subscribe } = readable(result, (set) => { - return mutationCache.subscribe( - notifyManager.batchCalls(() => { - const nextResult = replaceEqualDeep( - result, - getResult(mutationCache, options), - ) - if (result !== nextResult) { - result = nextResult - set(result) - } - }), - ) - }) - - return { subscribe } -} diff --git a/packages/svelte-query/src/utils.ts b/packages/svelte-query/src/utils.ts deleted file mode 100644 index 617144fae0..0000000000 --- a/packages/svelte-query/src/utils.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Readable } from 'svelte/store' -import type { StoreOrVal } from './types' - -export function isSvelteStore( - obj: StoreOrVal, -): obj is Readable { - return 'subscribe' in obj && typeof obj.subscribe === 'function' -} - -export function noop() {} diff --git a/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte b/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte index 1debd7311a..003f7f9e2f 100644 --- a/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte +++ b/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte @@ -1,6 +1,6 @@ -
    Data: {$query.data ?? 'undefined'}
    +
    Data: {query.data ?? 'undefined'}
    diff --git a/packages/svelte-query/tests/QueryClientProvider/ParentComponent.svelte b/packages/svelte-query/tests/QueryClientProvider/ParentComponent.svelte index 7129cf8a31..1ab775ca53 100644 --- a/packages/svelte-query/tests/QueryClientProvider/ParentComponent.svelte +++ b/packages/svelte-query/tests/QueryClientProvider/ParentComponent.svelte @@ -4,7 +4,7 @@ import ChildComponent from './ChildComponent.svelte' import type { QueryCache } from '@tanstack/query-core' - export let queryCache: QueryCache + let { queryCache }: { queryCache: QueryCache } = $props() const queryClient = new QueryClient({ queryCache }) diff --git a/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte b/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte index 9eb6377e6f..3ff3924d4b 100644 --- a/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte +++ b/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte @@ -1,24 +1,30 @@ -
    Status: {$query.status}
    +
    Status: {query.status}
    diff --git a/packages/svelte-query/tests/createInfiniteQuery/SelectExample.svelte b/packages/svelte-query/tests/createInfiniteQuery/SelectExample.svelte index 00983843d1..3fa45525fe 100644 --- a/packages/svelte-query/tests/createInfiniteQuery/SelectExample.svelte +++ b/packages/svelte-query/tests/createInfiniteQuery/SelectExample.svelte @@ -1,10 +1,10 @@ -
    {$query.data?.pages.join(',')}
    +
    {query.data?.pages.join(',')}
    diff --git a/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts b/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts index b05763b279..88a02b75fe 100644 --- a/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts +++ b/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts @@ -1,18 +1,17 @@ import { describe, expect, test } from 'vitest' import { render, waitFor } from '@testing-library/svelte' -import { get, writable } from 'svelte/store' +import { ref } from '../utils.svelte' import BaseExample from './BaseExample.svelte' import SelectExample from './SelectExample.svelte' -import type { Writable } from 'svelte/store' import type { QueryObserverResult } from '@tanstack/query-core' describe('createInfiniteQuery', () => { test('Return the correct states for a successful query', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) const rendered = render(BaseExample, { props: { - states: statesStore, + states, }, }) @@ -20,11 +19,9 @@ describe('createInfiniteQuery', () => { expect(rendered.queryByText('Status: success')).toBeInTheDocument() }) - const states = get(statesStore) + expect(states.value).toHaveLength(2) - expect(states).toHaveLength(2) - - expect(states[0]).toEqual({ + expect(states.value[0]).toEqual({ data: undefined, dataUpdatedAt: 0, error: null, @@ -59,7 +56,7 @@ describe('createInfiniteQuery', () => { fetchStatus: 'fetching', }) - expect(states[1]).toEqual({ + expect(states.value[1]).toEqual({ data: { pages: [0], pageParams: [0] }, dataUpdatedAt: expect.any(Number), error: null, @@ -96,11 +93,11 @@ describe('createInfiniteQuery', () => { }) test('Select a part of the data', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) const rendered = render(SelectExample, { props: { - states: statesStore, + states, }, }) @@ -108,16 +105,14 @@ describe('createInfiniteQuery', () => { expect(rendered.queryByText('count: 1')).toBeInTheDocument() }) - const states = get(statesStore) - - expect(states).toHaveLength(2) + expect(states.value).toHaveLength(2) - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ data: undefined, isSuccess: false, }) - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ data: { pages: ['count: 1'] }, isSuccess: true, }) diff --git a/packages/svelte-query/tests/createMutation/FailureExample.svelte b/packages/svelte-query/tests/createMutation/FailureExample.svelte index 52f9c8887f..955d52577c 100644 --- a/packages/svelte-query/tests/createMutation/FailureExample.svelte +++ b/packages/svelte-query/tests/createMutation/FailureExample.svelte @@ -1,14 +1,13 @@ - + -
    Data: {$mutation.data?.count}
    -
    Status: {$mutation.status}
    -
    Failure Count: {$mutation.failureCount}
    -
    Failure Reason: {$mutation.failureReason}
    +
    Data: {mutation.data?.count ?? 'undefined'}
    +
    Status: {mutation.status}
    +
    Failure Count: {mutation.failureCount}
    +
    Failure Reason: {mutation.failureReason ?? 'undefined'}
    diff --git a/packages/svelte-query/tests/createMutation/OnSuccessExample.svelte b/packages/svelte-query/tests/createMutation/OnSuccessExample.svelte index 7349bf42df..26141d855a 100644 --- a/packages/svelte-query/tests/createMutation/OnSuccessExample.svelte +++ b/packages/svelte-query/tests/createMutation/OnSuccessExample.svelte @@ -1,8 +1,7 @@ - +
    Count: {$count}
    diff --git a/packages/svelte-query/tests/createMutation/ResetExample.svelte b/packages/svelte-query/tests/createMutation/ResetExample.svelte index f5095d7182..e5f0ea4197 100644 --- a/packages/svelte-query/tests/createMutation/ResetExample.svelte +++ b/packages/svelte-query/tests/createMutation/ResetExample.svelte @@ -1,7 +1,6 @@ - - + + -
    Error: {$mutation.error?.message}
    +
    Error: {mutation.error?.message ?? 'undefined'}
    diff --git a/packages/svelte-query/tests/createMutation/createMutation.test.ts b/packages/svelte-query/tests/createMutation/createMutation.test.ts index f309d334b6..5d05805c38 100644 --- a/packages/svelte-query/tests/createMutation/createMutation.test.ts +++ b/packages/svelte-query/tests/createMutation/createMutation.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test, vi } from 'vitest' import { fireEvent, render, waitFor } from '@testing-library/svelte' -import { sleep } from '../utils' +import { sleep } from '../utils.svelte' import ResetExample from './ResetExample.svelte' import OnSuccessExample from './OnSuccessExample.svelte' import FailureExample from './FailureExample.svelte' @@ -103,6 +103,6 @@ describe('createMutation', () => { await waitFor(() => rendered.getByText('Status: success')) await waitFor(() => rendered.getByText('Data: 2')) await waitFor(() => rendered.getByText('Failure Count: 0')) - await waitFor(() => rendered.getByText('Failure Reason: null')) + await waitFor(() => rendered.getByText('Failure Reason: undefined')) }) }) diff --git a/packages/svelte-query/tests/createQueries/BaseExample.svelte b/packages/svelte-query/tests/createQueries/BaseExample.svelte index 7f285fbb18..c5686f7d83 100644 --- a/packages/svelte-query/tests/createQueries/BaseExample.svelte +++ b/packages/svelte-query/tests/createQueries/BaseExample.svelte @@ -1,17 +1,26 @@ -{#each $queries as query, index} +{#each queries as query, index}
    Status {index + 1}: {query.status}
    Data {index + 1}: {query.data}
    {/each} diff --git a/packages/svelte-query/tests/createQueries/CombineExample.svelte b/packages/svelte-query/tests/createQueries/CombineExample.svelte index a37b266db1..7ff5058848 100644 --- a/packages/svelte-query/tests/createQueries/CombineExample.svelte +++ b/packages/svelte-query/tests/createQueries/CombineExample.svelte @@ -1,6 +1,6 @@ -
    isPending: {$queries.isPending}
    -
    Data: {$queries.data ?? 'undefined'}
    +
    isPending: {queries.isPending}
    +
    Data: {queries.data ?? 'undefined'}
    diff --git a/packages/svelte-query/tests/createQueries/createQueries.test-d.ts b/packages/svelte-query/tests/createQueries/createQueries.test-d.ts index 0f3881330a..24d65222dd 100644 --- a/packages/svelte-query/tests/createQueries/createQueries.test-d.ts +++ b/packages/svelte-query/tests/createQueries/createQueries.test-d.ts @@ -1,8 +1,7 @@ import { describe, expectTypeOf, test } from 'vitest' -import { get } from 'svelte/store' import { skipToken } from '@tanstack/query-core' import { createQueries, queryOptions } from '../../src/index' -import type { OmitKeyof, QueryObserverResult } from '@tanstack/query-core' +import type { QueryObserverResult } from '@tanstack/query-core' import type { CreateQueryOptions } from '../../src/index' describe('createQueries', () => { @@ -20,7 +19,7 @@ describe('createQueries', () => { }) const queryResults = createQueries({ queries: [options] }) - const data = get(queryResults)[0].data + const data = queryResults[0].data expectTypeOf(data).toEqualTypeOf<{ wow: boolean }>() }) @@ -28,9 +27,7 @@ describe('createQueries', () => { test('Allow custom hooks using UseQueryOptions', () => { type Data = string - const useCustomQueries = ( - options?: OmitKeyof, 'queryKey' | 'queryFn'>, - ) => { + const useCustomQueries = (options?: CreateQueryOptions) => { return createQueries({ queries: [ { @@ -43,7 +40,7 @@ describe('createQueries', () => { } const query = useCustomQueries() - const data = get(query)[0].data + const data = query[0].data expectTypeOf(data).toEqualTypeOf() }) @@ -58,7 +55,7 @@ describe('createQueries', () => { ], }) - const firstResult = get(queryResults)[0] + const firstResult = queryResults[0] expectTypeOf(firstResult).toEqualTypeOf< QueryObserverResult diff --git a/packages/svelte-query/tests/createQueries/createQueries.test.ts b/packages/svelte-query/tests/createQueries/createQueries.test.ts index 91a6f8da3b..5f1ffa21dd 100644 --- a/packages/svelte-query/tests/createQueries/createQueries.test.ts +++ b/packages/svelte-query/tests/createQueries/createQueries.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test } from 'vitest' import { render, waitFor } from '@testing-library/svelte' import { QueryClient } from '@tanstack/query-core' -import { sleep } from '../utils' +import { sleep } from '../utils.svelte' import BaseExample from './BaseExample.svelte' import CombineExample from './CombineExample.svelte' diff --git a/packages/svelte-query/tests/createQuery/BaseExample.svelte b/packages/svelte-query/tests/createQuery/BaseExample.svelte index ce196f4783..6acd5c2599 100644 --- a/packages/svelte-query/tests/createQuery/BaseExample.svelte +++ b/packages/svelte-query/tests/createQuery/BaseExample.svelte @@ -1,18 +1,29 @@ -
    Status: {$query.status}
    -
    Failure Count: {$query.failureCount}
    -
    Data: {$query.data ?? 'undefined'}
    +
    Status: {query.status}
    +
    Failure Count: {query.failureCount}
    +
    Data: {query.data ?? 'undefined'}
    diff --git a/packages/svelte-query/tests/createQuery/DisabledExample.svelte b/packages/svelte-query/tests/createQuery/DisabledExample.svelte index 13b1895b69..1a5f804995 100644 --- a/packages/svelte-query/tests/createQuery/DisabledExample.svelte +++ b/packages/svelte-query/tests/createQuery/DisabledExample.svelte @@ -1,31 +1,39 @@ - + -
    Data: {$query.data ?? 'undefined'}
    -
    Count: {$count}
    +
    Data: {query.data ?? 'undefined'}
    +
    Count: {count}
    diff --git a/packages/svelte-query/tests/createQuery/PlaceholderData.svelte b/packages/svelte-query/tests/createQuery/PlaceholderData.svelte index e864f0d419..e119195841 100644 --- a/packages/svelte-query/tests/createQuery/PlaceholderData.svelte +++ b/packages/svelte-query/tests/createQuery/PlaceholderData.svelte @@ -1,30 +1,36 @@ - + -
    Status: {$query.status}
    -
    Data: {$query.data ?? 'undefined'}
    +
    Status: {query.status}
    +
    Data: {query.data ?? 'undefined'}
    diff --git a/packages/svelte-query/tests/createQuery/createQuery.test.ts b/packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts similarity index 79% rename from packages/svelte-query/tests/createQuery/createQuery.test.ts rename to packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts index ec6d2d5c77..1480953df4 100644 --- a/packages/svelte-query/tests/createQuery/createQuery.test.ts +++ b/packages/svelte-query/tests/createQuery/createQuery.svelte.test.ts @@ -1,17 +1,15 @@ import { describe, expect, test } from 'vitest' import { fireEvent, render, waitFor } from '@testing-library/svelte' -import { derived, get, writable } from 'svelte/store' import { QueryClient } from '@tanstack/query-core' -import { sleep } from '../utils' +import { ref, sleep } from '../utils.svelte' import BaseExample from './BaseExample.svelte' import DisabledExample from './DisabledExample.svelte' import PlaceholderData from './PlaceholderData.svelte' -import type { Writable } from 'svelte/store' import type { QueryObserverResult } from '@tanstack/query-core' describe('createQuery', () => { test('Return the correct states for a successful query', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) const options = { queryKey: ['test'], @@ -25,7 +23,7 @@ describe('createQuery', () => { props: { options, queryClient: new QueryClient(), - states: statesStore, + states, }, }) @@ -33,11 +31,9 @@ describe('createQuery', () => { expect(rendered.queryByText('Status: success')).toBeInTheDocument() }) - const states = get(statesStore) + expect(states.value).toHaveLength(2) - expect(states).toHaveLength(2) - - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ data: undefined, dataUpdatedAt: 0, error: null, @@ -64,7 +60,7 @@ describe('createQuery', () => { fetchStatus: 'fetching', }) - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ data: 'Success', dataUpdatedAt: expect.any(Number), error: null, @@ -93,7 +89,7 @@ describe('createQuery', () => { }) test('Return the correct states for an unsuccessful query', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) const options = { queryKey: ['test'], @@ -106,17 +102,15 @@ describe('createQuery', () => { props: { options, queryClient: new QueryClient(), - states: statesStore, + states, }, }) await waitFor(() => rendered.getByText('Status: error')) - const states = get(statesStore) - - expect(states).toHaveLength(3) + expect(states.value).toHaveLength(3) - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ data: undefined, dataUpdatedAt: 0, error: null, @@ -143,7 +137,7 @@ describe('createQuery', () => { fetchStatus: 'fetching', }) - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ data: undefined, dataUpdatedAt: 0, error: null, @@ -170,7 +164,7 @@ describe('createQuery', () => { fetchStatus: 'fetching', }) - expect(states[2]).toMatchObject({ + expect(states.value[2]).toMatchObject({ data: undefined, dataUpdatedAt: 0, error: new Error('Rejected'), @@ -199,9 +193,9 @@ describe('createQuery', () => { }) test('Accept a writable store for options', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) - const optionsStore = writable({ + const optionsStore = $state({ queryKey: ['test'], queryFn: async () => { await sleep(5) @@ -213,7 +207,7 @@ describe('createQuery', () => { props: { options: optionsStore, queryClient: new QueryClient(), - states: statesStore, + states, }, }) @@ -223,12 +217,12 @@ describe('createQuery', () => { }) test('Accept a derived store for options', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) - const writableStore = writable('test') + const writableStore = $state('test') - const derivedStore = derived(writableStore, ($store) => ({ - queryKey: [$store], + const derivedStore = $derived(() => ({ + queryKey: [writableStore], queryFn: async () => { await sleep(5) return 'Success' @@ -239,7 +233,7 @@ describe('createQuery', () => { props: { options: derivedStore, queryClient: new QueryClient(), - states: statesStore, + states, }, }) @@ -249,17 +243,17 @@ describe('createQuery', () => { }) test('Ensure reactivity when queryClient defaults are set', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) - const writableStore = writable(1) + let writableStore = $state(1) - const derivedStore = derived(writableStore, ($store) => ({ - queryKey: [$store], + const derivedStore = $derived({ + queryKey: () => [writableStore], queryFn: async () => { await sleep(5) - return $store + return writableStore }, - })) + }) const rendered = render(BaseExample, { props: { @@ -267,7 +261,7 @@ describe('createQuery', () => { queryClient: new QueryClient({ defaultOptions: { queries: { staleTime: 60 * 1000 } }, }), - states: statesStore, + states, }, }) @@ -276,14 +270,14 @@ describe('createQuery', () => { expect(rendered.queryByText('Data: 2')).not.toBeInTheDocument() }) - writableStore.set(2) + writableStore = 2 await waitFor(() => { expect(rendered.queryByText('Data: 1')).not.toBeInTheDocument() expect(rendered.queryByText('Data: 2')).toBeInTheDocument() }) - writableStore.set(1) + writableStore = 1 await waitFor(() => { expect(rendered.queryByText('Data: 1')).toBeInTheDocument() @@ -292,12 +286,12 @@ describe('createQuery', () => { }) test('Keep previous data when placeholderData is set', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) const rendered = render(PlaceholderData, { props: { queryClient: new QueryClient(), - states: statesStore, + states, }, }) @@ -307,12 +301,10 @@ describe('createQuery', () => { await waitFor(() => rendered.getByText('Data: 1')) - const states = get(statesStore) - - expect(states).toHaveLength(4) + expect(states.value).toHaveLength(4) // Initial - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ data: undefined, isFetching: true, isSuccess: false, @@ -320,7 +312,7 @@ describe('createQuery', () => { }) // Fetched - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ data: 0, isFetching: false, isSuccess: true, @@ -328,7 +320,7 @@ describe('createQuery', () => { }) // Set state - expect(states[2]).toMatchObject({ + expect(states.value[2]).toMatchObject({ data: 0, isFetching: true, isSuccess: true, @@ -336,7 +328,7 @@ describe('createQuery', () => { }) // New data - expect(states[3]).toMatchObject({ + expect(states.value[3]).toMatchObject({ data: 1, isFetching: false, isSuccess: true, @@ -345,11 +337,11 @@ describe('createQuery', () => { }) test('Should not fetch when switching to a disabled query', async () => { - const statesStore: Writable> = writable([]) + let states = ref>([]) const rendered = render(DisabledExample, { props: { - states: statesStore, + states, }, }) @@ -358,30 +350,28 @@ describe('createQuery', () => { fireEvent.click(rendered.getByRole('button', { name: /Increment/i })) await waitFor(() => { - rendered.getByText('Count: 1') - rendered.getByText('Data: undefined') + rendered.getByText('Count: 0') + rendered.getByText('Data: 0') }) - const states = get(statesStore) - - expect(states).toHaveLength(3) + expect(states.value).toHaveLength(3) // Fetch query - expect(states[0]).toMatchObject({ + expect(states.value[0]).toMatchObject({ data: undefined, isFetching: true, isSuccess: false, }) // Fetched query - expect(states[1]).toMatchObject({ + expect(states.value[1]).toMatchObject({ data: 0, isFetching: false, isSuccess: true, }) // Switch to disabled query - expect(states[2]).toMatchObject({ + expect(states.value[2]).toMatchObject({ data: undefined, isFetching: false, isSuccess: false, diff --git a/packages/svelte-query/tests/createQuery/createQuery.test-d.ts b/packages/svelte-query/tests/createQuery/createQuery.test-d.ts index f2931340e9..578bf99c9b 100644 --- a/packages/svelte-query/tests/createQuery/createQuery.test-d.ts +++ b/packages/svelte-query/tests/createQuery/createQuery.test-d.ts @@ -1,7 +1,5 @@ import { describe, expectTypeOf, test } from 'vitest' -import { get } from 'svelte/store' import { createQuery, queryOptions } from '../../src/index' -import type { OmitKeyof } from '@tanstack/query-core' import type { CreateQueryOptions } from '../../src/index' describe('createQuery', () => { @@ -12,7 +10,7 @@ describe('createQuery', () => { initialData: { wow: true }, }) - expectTypeOf(get(query).data).toEqualTypeOf<{ wow: boolean }>() + expectTypeOf(query.data).toEqualTypeOf<{ wow: boolean }>() }) test('TData should be defined when passed through queryOptions', () => { @@ -29,7 +27,7 @@ describe('createQuery', () => { }) const query = createQuery(options) - expectTypeOf(get(query).data).toEqualTypeOf<{ wow: boolean }>() + expectTypeOf(query.data).toEqualTypeOf<{ wow: boolean }>() }) test('TData should have undefined in the union when initialData is NOT provided', () => { @@ -42,15 +40,13 @@ describe('createQuery', () => { }, }) - expectTypeOf(get(query).data).toEqualTypeOf<{ wow: boolean } | undefined>() + expectTypeOf(query.data).toEqualTypeOf<{ wow: boolean } | undefined>() }) test('Allow custom hooks using CreateQueryOptions', () => { type Data = string - const useCustomQuery = ( - options?: OmitKeyof, 'queryKey' | 'queryFn'>, - ) => { + const useCustomQuery = (options?: CreateQueryOptions) => { return createQuery({ ...options, queryKey: ['todos-key'], @@ -60,6 +56,6 @@ describe('createQuery', () => { const query = useCustomQuery() - expectTypeOf(get(query).data).toEqualTypeOf() + expectTypeOf(query.data).toEqualTypeOf() }) }) diff --git a/packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.test-d.ts b/packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.test-d.ts index 0b4af0992e..8c6326ba58 100644 --- a/packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.test-d.ts +++ b/packages/svelte-query/tests/infiniteQueryOptions/infiniteQueryOptions.test-d.ts @@ -1,5 +1,4 @@ import { describe, expectTypeOf, test } from 'vitest' -import { get } from 'svelte/store' import { QueryClient } from '@tanstack/query-core' import { createInfiniteQuery, infiniteQueryOptions } from '../../src/index' import type { InfiniteData } from '@tanstack/query-core' @@ -40,7 +39,7 @@ describe('queryOptions', () => { const query = createInfiniteQuery(options) // known issue: type of pageParams is unknown when returned from useInfiniteQuery - expectTypeOf(get(query).data).toEqualTypeOf< + expectTypeOf(query.data).toEqualTypeOf< InfiniteData | undefined >() }) diff --git a/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts b/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts index 4999037005..563403f659 100644 --- a/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts +++ b/packages/svelte-query/tests/queryOptions/queryOptions.test-d.ts @@ -1,5 +1,4 @@ import { describe, expectTypeOf, test } from 'vitest' -import { get } from 'svelte/store' import { QueriesObserver, QueryClient, @@ -50,7 +49,7 @@ describe('queryOptions', () => { queries: [options], }) - expectTypeOf(get(queries)[0].data).toEqualTypeOf() + expectTypeOf(queries[0].data).toEqualTypeOf() }) test('Should tag the queryKey with the result type of the QueryFn', () => { diff --git a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte index d485b7b69b..6847e54c0f 100644 --- a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte +++ b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte @@ -1,28 +1,27 @@ - + -
    isFetching: {$isFetching}
    -
    Data: {$query.data ?? 'undefined'}
    +
    isFetching: {isFetching()}
    +
    Data: {query.data ?? 'undefined'}
    diff --git a/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts b/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts index 7ca6ca6322..6420dfdfd3 100644 --- a/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts +++ b/packages/svelte-query/tests/useIsFetching/useIsFetching.test.ts @@ -1,5 +1,5 @@ import { describe, test } from 'vitest' -import { fireEvent, render } from '@testing-library/svelte' +import { fireEvent, render, waitFor } from '@testing-library/svelte' import BaseExample from './BaseExample.svelte' describe('useIsFetching', () => { @@ -8,7 +8,10 @@ describe('useIsFetching', () => { await rendered.findByText('isFetching: 0') fireEvent.click(rendered.getByRole('button', { name: /setReady/i })) - await rendered.findByText('isFetching: 1') - await rendered.findByText('isFetching: 0') + + waitFor(async () => { + await rendered.findByText('isFetching: 1') + await rendered.findByText('isFetching: 0') + }) }) }) diff --git a/packages/svelte-query/tests/useIsMutating/BaseExample.svelte b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte index 35dafba38c..b2d71d8760 100644 --- a/packages/svelte-query/tests/useIsMutating/BaseExample.svelte +++ b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte @@ -1,8 +1,8 @@ - + -
    isMutating: {$isMutating}
    +
    isMutating: {isMutating()}
    diff --git a/packages/svelte-query/tests/useMutationState/BaseExample.svelte b/packages/svelte-query/tests/useMutationState/BaseExample.svelte index 543a9a5271..beb4e6adab 100644 --- a/packages/svelte-query/tests/useMutationState/BaseExample.svelte +++ b/packages/svelte-query/tests/useMutationState/BaseExample.svelte @@ -1,16 +1,22 @@
    {JSON.stringify(statuses)}
    - - diff --git a/packages/svelte-query/tests/utils.svelte.ts b/packages/svelte-query/tests/utils.svelte.ts new file mode 100644 index 0000000000..c31dde0389 --- /dev/null +++ b/packages/svelte-query/tests/utils.svelte.ts @@ -0,0 +1,18 @@ +export function sleep(timeout: number): Promise { + return new Promise((resolve, _reject) => { + setTimeout(resolve, timeout) + }) +} + +export function ref(initial: T) { + let value = $state(initial) + + return { + get value() { + return value + }, + set value(newValue) { + value = newValue + }, + } +} diff --git a/packages/svelte-query/tests/utils.ts b/packages/svelte-query/tests/utils.ts deleted file mode 100644 index 1a3a619a22..0000000000 --- a/packages/svelte-query/tests/utils.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function sleep(timeout: number): Promise { - return new Promise((resolve, _reject) => { - setTimeout(resolve, timeout) - }) -} diff --git a/packages/svelte-query/vite.config.ts b/packages/svelte-query/vite.config.ts index 3f68d52480..873c5976e7 100644 --- a/packages/svelte-query/vite.config.ts +++ b/packages/svelte-query/vite.config.ts @@ -11,8 +11,12 @@ export default defineConfig({ watch: false, environment: 'jsdom', setupFiles: ['./tests/test-setup.ts'], - coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] }, + coverage: { enabled: false, provider: 'istanbul', include: ['src/**/*'] }, typecheck: { enabled: true }, - restoreMocks: 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', + }, }, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 070e578789..89d65ea41e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,7 +77,7 @@ importers: version: 4.0.0-alpha.8 prettier-plugin-svelte: specifier: ^3.2.3 - version: 3.2.3(prettier@4.0.0-alpha.8)(svelte@4.2.18) + version: 3.2.3(prettier@4.0.0-alpha.8)(svelte@5.0.0-next.192) publint: specifier: ^0.2.8 version: 0.2.8 @@ -1273,19 +1273,19 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^3.2.2 - version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) '@sveltejs/kit': specifier: ^2.5.18 - version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1304,19 +1304,19 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^3.2.2 - version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) '@sveltejs/kit': specifier: ^2.5.18 - version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1335,19 +1335,19 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^3.2.2 - version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) '@sveltejs/kit': specifier: ^2.5.18 - version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1366,19 +1366,19 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^3.2.2 - version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) '@sveltejs/kit': specifier: ^2.5.18 - version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1397,19 +1397,19 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^3.2.2 - version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) '@sveltejs/kit': specifier: ^2.5.18 - version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1427,17 +1427,17 @@ importers: version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tsconfig/svelte': specifier: ^5.0.4 version: 5.0.4 svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1456,19 +1456,19 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^3.2.2 - version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) '@sveltejs/kit': specifier: ^2.5.18 - version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) typescript: specifier: 5.3.3 version: 5.3.3 @@ -1487,13 +1487,13 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^3.2.2 - version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) '@sveltejs/kit': specifier: ^2.5.18 - version: 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) autoprefixer: specifier: ^10.4.19 version: 10.4.19(postcss@8.4.39) @@ -1501,11 +1501,11 @@ importers: specifier: ^8.4.35 version: 8.4.39 svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) tailwindcss: specifier: ^3.4.3 version: 3.4.3 @@ -1516,6 +1516,43 @@ importers: specifier: ^5.3.3 version: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) + examples/svelte/svelte-melt: + dependencies: + '@tanstack/query-sync-storage-persister': + specifier: ^5.51.1 + version: link:../../../packages/query-sync-storage-persister + '@tanstack/svelte-query': + specifier: ^5.51.1 + version: link:../../../packages/svelte-query + '@tanstack/svelte-query-devtools': + specifier: ^5.51.1 + version: link:../../../packages/svelte-query-devtools + '@tanstack/svelte-query-persist-client': + specifier: ^5.51.1 + version: link:../../../packages/svelte-query-persist-client + devDependencies: + '@sveltejs/adapter-auto': + specifier: ^3.2.2 + version: 3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))) + '@sveltejs/kit': + specifier: ^2.5.18 + version: 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + '@sveltejs/vite-plugin-svelte': + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + svelte: + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 + svelte-check: + specifier: ^3.8.4 + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) + typescript: + specifier: 5.3.3 + version: 5.3.3 + vite: + specifier: ^5.3.3 + version: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) + examples/vue/basic: dependencies: '@tanstack/vue-query': @@ -1666,7 +1703,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) react-scripts: specifier: 4.0.3 - version: 4.0.3(@types/webpack@4.41.35)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(sass@1.71.1)(sockjs-client@1.6.1)(typescript@5.4.2)(vue-template-compiler@2.7.15) + version: 4.0.3(@types/webpack@4.41.35)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(sass@1.71.1)(sockjs-client@1.6.1)(typescript@5.5.3)(vue-template-compiler@2.7.15) devDependencies: cross-env: specifier: ^7.0.3 @@ -1688,7 +1725,7 @@ importers: version: 19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522) react-scripts: specifier: 5.0.1 - version: 5.0.1(@types/babel__core@7.20.5)(@types/webpack@4.41.35)(esbuild@0.19.11)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(rework-visit@1.0.0)(rework@1.0.1)(sass@1.71.1)(sockjs-client@1.6.1)(type-fest@4.10.2)(typescript@5.4.2)(vue-template-compiler@2.7.15) + version: 5.0.1(@types/babel__core@7.20.5)(@types/webpack@4.41.35)(esbuild@0.19.11)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(rework-visit@1.0.0)(rework@1.0.1)(sass@1.71.1)(sockjs-client@1.6.1)(type-fest@4.10.2)(typescript@5.5.3)(vue-template-compiler@2.7.15) devDependencies: cross-env: specifier: ^7.0.3 @@ -1798,8 +1835,8 @@ importers: integrations/svelte-vite: devDependencies: '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tanstack/svelte-query': specifier: workspace:* version: link:../../packages/svelte-query @@ -1807,8 +1844,8 @@ importers: specifier: workspace:* version: link:../../packages/svelte-query-devtools svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 vite: specifier: ^5.3.3 version: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) @@ -1919,11 +1956,11 @@ importers: dependencies: '@typescript-eslint/utils': specifier: 8.0.0-alpha.30 - version: 8.0.0-alpha.30(eslint@8.57.0)(typescript@5.4.2) + version: 8.0.0-alpha.30(eslint@8.57.0)(typescript@5.5.3) devDependencies: '@typescript-eslint/rule-tester': specifier: 8.0.0-alpha.30 - version: 8.0.0-alpha.30(@eslint/eslintrc@3.1.0)(eslint@8.57.0)(typescript@5.4.2) + version: 8.0.0-alpha.30(@eslint/eslintrc@3.1.0)(eslint@8.57.0)(typescript@5.5.3) eslint: specifier: ^8.57.0 version: 8.57.0 @@ -1991,7 +2028,7 @@ importers: version: 2.2.1 tsup-preset-solid: specifier: ^2.2.0 - version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.4.2)) + version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.5.3)) vite-plugin-solid: specifier: ^2.10.2 version: 2.10.2(@testing-library/jest-dom@6.4.6(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(solid-js@1.8.17)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) @@ -2106,7 +2143,7 @@ importers: version: 1.8.17 tsup-preset-solid: specifier: ^2.2.0 - version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.4.2)) + version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.5.3)) vite-plugin-solid: specifier: ^2.10.2 version: 2.10.2(@testing-library/jest-dom@6.4.6(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(solid-js@1.8.17)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) @@ -2125,7 +2162,7 @@ importers: version: 1.8.17 tsup-preset-solid: specifier: ^2.2.0 - version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.4.2)) + version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.5.3)) vite-plugin-solid: specifier: ^2.10.2 version: 2.10.2(@testing-library/jest-dom@6.4.6(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(solid-js@1.8.17)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) @@ -2144,7 +2181,7 @@ importers: version: 1.8.17 tsup-preset-solid: specifier: ^2.2.0 - version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.4.2)) + version: 2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.5.3)) vite-plugin-solid: specifier: ^2.10.2 version: 2.10.2(@testing-library/jest-dom@6.4.6(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(solid-js@1.8.17)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) @@ -2157,22 +2194,22 @@ importers: devDependencies: '@sveltejs/package': specifier: ^2.3.1 - version: 2.3.1(svelte@4.2.18)(typescript@5.4.2) + version: 2.3.1(svelte@5.0.0-next.192)(typescript@5.5.3) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@testing-library/svelte': - specifier: ^5.1.0 - version: 5.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^5.2.0 + version: 5.2.0(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) eslint-plugin-svelte: - specifier: ^2.42.0 - version: 2.42.0(eslint@9.4.0)(svelte@4.2.18) + specifier: ^2.43.0 + version: 2.43.0(eslint@9.4.0)(svelte@5.0.0-next.192) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) packages/svelte-query-devtools: dependencies: @@ -2185,22 +2222,22 @@ importers: devDependencies: '@sveltejs/package': specifier: ^2.3.1 - version: 2.3.1(svelte@4.2.18)(typescript@5.4.2) + version: 2.3.1(svelte@5.0.0-next.192)(typescript@5.5.3) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tanstack/svelte-query': specifier: workspace:* version: link:../svelte-query eslint-plugin-svelte: - specifier: ^2.42.0 - version: 2.42.0(eslint@9.4.0)(svelte@4.2.18) + specifier: ^2.43.0 + version: 2.43.0(eslint@9.4.0)(svelte@5.0.0-next.192) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) packages/svelte-query-persist-client: dependencies: @@ -2210,25 +2247,25 @@ importers: devDependencies: '@sveltejs/package': specifier: ^2.3.1 - version: 2.3.1(svelte@4.2.18)(typescript@5.4.2) + version: 2.3.1(svelte@5.0.0-next.192)(typescript@5.5.3) '@sveltejs/vite-plugin-svelte': - specifier: ^3.1.0 - version: 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^4.0.0-next.4 + version: 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tanstack/svelte-query': specifier: workspace:* version: link:../svelte-query '@testing-library/svelte': - specifier: ^5.1.0 - version: 5.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + specifier: ^5.2.0 + version: 5.2.0(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) eslint-plugin-svelte: - specifier: ^2.42.0 - version: 2.42.0(eslint@9.4.0)(svelte@4.2.18) + specifier: ^2.43.0 + version: 2.43.0(eslint@9.4.0)(svelte@5.0.0-next.192) svelte: - specifier: ^4.2.18 - version: 4.2.18 + specifier: 5.0.0-next.192 + version: 5.0.0-next.192 svelte-check: specifier: ^3.8.4 - version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18) + version: 3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192) packages/vue-query: dependencies: @@ -2243,20 +2280,20 @@ importers: version: 6.5.1 vue-demi: specifier: ^0.14.7 - version: 0.14.7(@vue/composition-api@1.7.2(vue@3.4.27(typescript@5.4.2)))(vue@3.4.27(typescript@5.4.2)) + version: 0.14.7(@vue/composition-api@1.7.2(vue@3.4.27(typescript@5.5.3)))(vue@3.4.27(typescript@5.5.3)) devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vue@3.4.27(typescript@5.4.2)) + version: 5.0.4(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vue@3.4.27(typescript@5.5.3)) '@vue/composition-api': specifier: 1.7.2 - version: 1.7.2(vue@3.4.27(typescript@5.4.2)) + version: 1.7.2(vue@3.4.27(typescript@5.5.3)) eslint-plugin-vue: specifier: ^9.27.0 version: 9.27.0(eslint@9.4.0) vue: specifier: ^3.4.27 - version: 3.4.27(typescript@5.4.2) + version: 3.4.27(typescript@5.5.3) vue2: specifier: npm:vue@2.6 version: vue@2.6.0 @@ -2275,7 +2312,7 @@ importers: version: link:../vue-query '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vue@3.4.27(typescript@5.4.2)) + version: 5.0.4(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vue@3.4.27(typescript@5.5.3)) eslint-plugin-vue: specifier: ^9.27.0 version: 9.27.0(eslint@9.4.0) @@ -2284,10 +2321,10 @@ importers: version: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) vue: specifier: ^3.4.27 - version: 3.4.27(typescript@5.4.2) + version: 3.4.27(typescript@5.5.3) vue-tsc: specifier: ^2.0.26 - version: 2.0.26(typescript@5.4.2) + version: 2.0.26(typescript@5.5.3) packages: @@ -4586,8 +4623,8 @@ packages: resolution: {integrity: sha512-fdI7VJjP3Rvc70lC4xkFXHB0fiPeojiL1PxVG6t1ZvXQrarj893PweuBTujxDUFk0Fxj4R7PIIAZ/aiiyZPZcg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.3': - resolution: {integrity: sha512-HAbhAYKfsAC2EkTqve00ibWIZlaU74Z1EHwAjYr4PXF0YU2VEA1zSIKSSpKszRLRWwHzzRZXvK632u+uXzvsvw==} + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@expo/bunyan@4.0.0': @@ -4930,6 +4967,9 @@ packages: '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -6086,19 +6126,19 @@ packages: peerDependencies: svelte: ^3.44.0 || ^4.0.0 || ^5.0.0-next.1 - '@sveltejs/vite-plugin-svelte-inspector@2.0.0': - resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} - engines: {node: ^18.0.0 || >=20} + '@sveltejs/vite-plugin-svelte-inspector@3.0.0-next.3': + resolution: {integrity: sha512-kuGJ2CZ5lAw3gKF8Kw0AfKtUJWbwdlDHY14K413B0MCyrzvQvsKTorwmwZcky0+QqY6RnVIZ/5FttB9bQmkLXg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} peerDependencies: - '@sveltejs/vite-plugin-svelte': ^3.0.0 - svelte: ^4.0.0 || ^5.0.0-next.0 + '@sveltejs/vite-plugin-svelte': ^4.0.0-next.0||^4.0.0 + svelte: ^5.0.0-next.96 || ^5.0.0 vite: ^5.0.0 - '@sveltejs/vite-plugin-svelte@3.1.0': - resolution: {integrity: sha512-sY6ncCvg+O3njnzbZexcVtUqOBE3iYmQPJ9y+yXSkOwG576QI/xJrBnQSRXFLGwJNBa0T78JEKg5cIR0WOAuUw==} - engines: {node: ^18.0.0 || >=20} + '@sveltejs/vite-plugin-svelte@4.0.0-next.4': + resolution: {integrity: sha512-t/+3+mO5EGr7pTOXevrGb+ZfqlzmRDEm/wQYwR4ctNspzKTfHOhy2Zz1c9zJs120/skcJhlc/rzSIMlXKBlUsg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22} peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.0 + svelte: ^5.0.0-next.96 || ^5.0.0 vite: ^5.0.0 '@svgr/babel-plugin-add-jsx-attribute@5.4.0': @@ -6186,10 +6226,6 @@ packages: resolution: {integrity: sha512-wdsYKy5zupPyLCW2Je5DLHSxSfbIp6h80WoHOQc+RPtmPGA52O9x5MJEkv92Sjonpq+poOAtUKhh1kBGAXBrNA==} engines: {node: '>=18'} - '@testing-library/dom@9.3.4': - resolution: {integrity: sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==} - engines: {node: '>=14'} - '@testing-library/jest-dom@6.4.6': resolution: {integrity: sha512-8qpnGVincVDLEcQXWaHOf6zmlbwTKc6Us6PPu4CRnPXCzo2OGBS5cwgMMOWdxDpEz1mkbvXHpEy99M5Yvt682w==} engines: {node: '>=14', npm: '>=6', yarn: '>=1'} @@ -6226,11 +6262,11 @@ packages: '@types/react-dom': optional: true - '@testing-library/svelte@5.1.0': - resolution: {integrity: sha512-8GW+rBR72U7Qql0Glxl4CtVTr6GPotYf/MB7MamIH6ZpV45i7IJIOm3oHWH4Wr6ZULdUs37F9recegQygLbC0g==} + '@testing-library/svelte@5.2.0': + resolution: {integrity: sha512-oMIFfxMcaPOXp+BQTRVgkeKzfAx7ee9fMrWaiKbMN36tN61kLl4Uj5ZZ/y1w9aL3a0BuBEoErV5iorYwCHqVUA==} engines: {node: '>= 10'} peerDependencies: - svelte: ^3 || ^4 || ^5 + svelte: ^3 || ^4 || ^5 || ^5.0.0-next.0 vite: '*' vitest: '*' peerDependenciesMeta: @@ -6985,8 +7021,8 @@ packages: resolution: {integrity: sha512-M0EUka6rb+QC4l9Z3T0nJEzNOO7JcoJlYMrBlyBCiFSXRyxjLKayd4TbQs2FDRWQU1h9FR7QVNHt+PEaoNL5rQ==} engines: {node: '>=0.4.0'} - acorn-typescript@1.4.12: - resolution: {integrity: sha512-G/oj3oiBmYlc+6SJZYMRz+SPgSgBWqEXPzhO55dYvT4x8SJM+HkxU5o5OPFstxsMMk1tXPYtYCyd7jUdHZy8Eg==} + acorn-typescript@1.4.13: + resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==} peerDependencies: acorn: '>=8.9.0' @@ -7005,6 +7041,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + address@1.1.2: resolution: {integrity: sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==} engines: {node: '>= 0.12.0'} @@ -7215,9 +7256,6 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - aria-query@5.1.3: - resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} - aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} @@ -7398,6 +7436,10 @@ packages: axobject-query@4.0.0: resolution: {integrity: sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==} + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + b4a@1.6.4: resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==} @@ -7981,9 +8023,6 @@ packages: code-block-writer@12.0.0: resolution: {integrity: sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==} - code-red@1.0.4: - resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} - collection-visit@1.0.0: resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} engines: {node: '>=0.10.0'} @@ -8462,10 +8501,6 @@ packages: resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==} engines: {node: '>=8.0.0'} - css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - css-vendor@2.0.8: resolution: {integrity: sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==} @@ -8652,9 +8687,6 @@ packages: deep-equal@1.1.1: resolution: {integrity: sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==} - deep-equal@2.2.2: - resolution: {integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==} - deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -9073,9 +9105,6 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-get-iterator@1.1.3: - resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} - es-module-lexer@1.5.3: resolution: {integrity: sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==} @@ -9158,6 +9187,10 @@ packages: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} @@ -9272,12 +9305,12 @@ packages: typescript: optional: true - eslint-plugin-svelte@2.42.0: - resolution: {integrity: sha512-mHP6z0DWq97KZvoQcApZHdF9m9epcDV/ICKufeEH18Vh+8vl7S+gwt8WdUohEqKNVMuXRkbvy1suMcVvUDiOGw==} + eslint-plugin-svelte@2.43.0: + resolution: {integrity: sha512-REkxQWvg2pp7QVLxQNa+dJ97xUqRe7Y2JJbSWkHSuszu0VcblZtXkPBPckkivk99y5CdLw4slqfPylL2d/X4jQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^8.57.0 - svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.181 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 peerDependenciesMeta: svelte: optional: true @@ -9300,8 +9333,8 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@8.0.1: - resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: @@ -9339,8 +9372,8 @@ packages: esm-env@1.0.0: resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} - espree@10.0.1: - resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} + espree@10.1.0: + resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: @@ -9361,6 +9394,9 @@ packages: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} + esrap@1.2.2: + resolution: {integrity: sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==} + esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -9706,6 +9742,9 @@ packages: flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flatten@1.0.3: resolution: {integrity: sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==} deprecated: flatten is deprecated in favor of utility frameworks such as lodash. @@ -10784,9 +10823,6 @@ packages: is-lambda@1.0.1: resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} - is-map@2.0.2: - resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} - is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} @@ -10889,9 +10925,6 @@ packages: resolution: {integrity: sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==} engines: {node: '>=6'} - is-set@2.0.2: - resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} - is-shared-array-buffer@1.0.3: resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} engines: {node: '>= 0.4'} @@ -10944,15 +10977,9 @@ packages: resolution: {integrity: sha512-+kwPrVDu9Ms03L90Qaml+79+6DZHqHyRoANI6IsZJ/g8frhnfchDOBCa0RbQ6/kdHt5CS5OeIEyrYznNuVN+8A==} engines: {node: '>=0.10.0'} - is-weakmap@2.0.1: - resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} - is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - is-weakset@2.0.2: - resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} - is-what@3.14.1: resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==} @@ -11725,9 +11752,6 @@ packages: mdn-data@2.0.14: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} - mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - mdn-data@2.0.4: resolution: {integrity: sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==} @@ -12603,6 +12627,10 @@ packages: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + ora@3.4.0: resolution: {integrity: sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==} engines: {node: '>=6'} @@ -12901,9 +12929,6 @@ packages: performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - periscopic@3.1.0: - resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} - picocolors@0.2.1: resolution: {integrity: sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==} @@ -15223,10 +15248,6 @@ packages: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} - stop-iteration-iterator@1.0.0: - resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} - engines: {node: '>= 0.4'} - stream-browserify@2.0.2: resolution: {integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==} @@ -15513,21 +15534,15 @@ packages: peerDependencies: svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 - svelte-eslint-parser@0.40.0: - resolution: {integrity: sha512-M+v1HhC5T1WKYVxWexUCS4o6oIBS88XKzOZuhl2ew+eGxol7eC21e+VE8TC4rXJ3iT3iXT0qlZsZcpKjVo5/zQ==} + svelte-eslint-parser@0.41.0: + resolution: {integrity: sha512-L6f4hOL+AbgfBIB52Z310pg1d2QjRqm7wy3kI1W6hhdhX5bvu7+f0R6w4ykp5HoDdzq+vGhIJmsisaiJDGmVfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.181 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 peerDependenciesMeta: svelte: optional: true - svelte-hmr@0.16.0: - resolution: {integrity: sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==} - engines: {node: ^12.20 || ^14.13.1 || >= 16} - peerDependencies: - svelte: ^3.19.0 || ^4.0.0 - svelte-preprocess@5.1.3: resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==} engines: {node: '>= 16.0.0', pnpm: ^8.0.0} @@ -15571,9 +15586,9 @@ packages: svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 typescript: ^4.9.4 || ^5.0.0 - svelte@4.2.18: - resolution: {integrity: sha512-d0FdzYIiAePqRJEb90WlJDkjUEx42xhivxN8muUBmfZnP+tzUgz12DJ2hRJi8sIHCME7jeK1PTMgKPSfTd8JrA==} - engines: {node: '>=16'} + svelte@5.0.0-next.192: + resolution: {integrity: sha512-UgjiqTCsEWyQ157x5YNbmx859vBVFfznKaxuiMCPqHS3HRZ1iqTsSyO3LI/4BHjqPrtxwrOn1Z63VwoJkYBBDA==} + engines: {node: '>=18'} svg-parser@2.0.4: resolution: {integrity: sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==} @@ -15921,6 +15936,9 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + tslib@2.6.3: + resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tsup-preset-solid@2.2.0: resolution: {integrity: sha512-sPAzeArmYkVAZNRN+m4tkiojdd0GzW/lCwd4+TQDKMENe8wr2uAuro1s0Z59ASmdBbkXoxLgCiNcuQMyiidMZg==} peerDependencies: @@ -16112,6 +16130,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.5.3: + resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} + engines: {node: '>=14.17'} + hasBin: true + ua-parser-js@1.0.36: resolution: {integrity: sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==} @@ -16968,9 +16991,6 @@ packages: which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - which-collection@1.0.1: - resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} - which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} @@ -17321,6 +17341,9 @@ packages: zeptomatch@1.2.2: resolution: {integrity: sha512-0ETdzEO0hdYmT8aXHHf5aMjpX+FHFE61sG4qKFAoJD2Umt3TWdCmH7ADxn2oUiWTlqBGC+SGr8sYMfr+37J8pQ==} + zimmerframe@1.1.2: + resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} + zip-stream@6.0.1: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} @@ -17662,7 +17685,7 @@ snapshots: '@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))': dependencies: '@angular/core': 17.3.10(rxjs@7.8.1)(zone.js@0.14.6) - tslib: 2.6.2 + tslib: 2.6.3 optional: true '@angular/cli@17.3.8(chokidar@3.6.0)': @@ -17794,7 +17817,7 @@ snapshots: '@astrojs/language-server@2.11.1(prettier@3.3.2)(typescript@5.3.3)': dependencies: '@astrojs/compiler': 2.8.0 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@volar/kit': 2.4.0-alpha.16(typescript@5.3.3) '@volar/language-core': 2.4.0-alpha.16 '@volar/language-server': 2.4.0-alpha.16 @@ -20292,9 +20315,9 @@ snapshots: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 7.17.0 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 string-ts: 2.2.0 ts-pattern: 5.2.0 @@ -20311,10 +20334,10 @@ snapshots: '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) '@eslint-react/var': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 + '@typescript-eslint/scope-manager': 7.17.0 '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 short-unique-id: 5.2.0 ts-pattern: 5.2.0 @@ -20332,7 +20355,7 @@ snapshots: '@typescript-eslint/scope-manager': 7.16.1 '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 eslint: 8.57.0 eslint-plugin-react-dom: 1.5.17(eslint@8.57.0)(typescript@5.3.3) @@ -20351,9 +20374,9 @@ snapshots: '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) '@eslint-react/var': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 7.17.0 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 micro-memoize: 4.1.2 ts-pattern: 5.2.0 @@ -20364,7 +20387,7 @@ snapshots: '@eslint-react/shared@1.5.17(eslint@8.57.0)(typescript@5.3.3)': dependencies: - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) deepmerge-ts: 7.0.3 valibot: 0.35.0 transitivePeerDependencies: @@ -20377,8 +20400,8 @@ snapshots: '@eslint-react/types@1.5.17(eslint@8.57.0)(typescript@5.3.3)': dependencies: '@eslint-react/tools': 1.5.17 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) transitivePeerDependencies: - eslint - supports-color @@ -20389,9 +20412,9 @@ snapshots: '@eslint-react/ast': 1.5.17(eslint@8.57.0)(typescript@5.3.3) '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 7.17.0 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 string-ts: 2.2.0 valibot: 0.35.0 @@ -20402,7 +20425,7 @@ snapshots: '@eslint/config-array@0.15.1': dependencies: - '@eslint/object-schema': 2.1.3 + '@eslint/object-schema': 2.1.4 debug: 4.3.5(supports-color@6.1.0) minimatch: 3.1.2 transitivePeerDependencies: @@ -20426,7 +20449,7 @@ snapshots: dependencies: ajv: 6.12.6 debug: 4.3.5(supports-color@6.1.0) - espree: 10.0.1 + espree: 10.1.0 globals: 14.0.0 ignore: 5.3.1 import-fresh: 3.3.0 @@ -20440,7 +20463,7 @@ snapshots: '@eslint/js@9.4.0': {} - '@eslint/object-schema@2.1.3': {} + '@eslint/object-schema@2.1.4': {} '@expo/bunyan@4.0.0': dependencies: @@ -20965,7 +20988,7 @@ snapshots: '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/resolve-uri@3.1.1': {} @@ -20979,6 +21002,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.1 @@ -22349,7 +22374,7 @@ snapshots: acorn: 8.11.3 eslint: 8.57.0 eslint-visitor-keys: 4.0.0 - espree: 10.0.1 + espree: 10.1.0 '@surma/rollup-plugin-off-main-thread@1.4.2': dependencies: @@ -22363,14 +22388,14 @@ snapshots: magic-string: 0.25.9 string.prototype.matchall: 4.0.11 - '@sveltejs/adapter-auto@3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))': + '@sveltejs/adapter-auto@3.2.2(@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))': dependencies: - '@sveltejs/kit': 2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + '@sveltejs/kit': 2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) import-meta-resolve: 4.1.0 - '@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': + '@sveltejs/kit@2.5.18(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + '@sveltejs/vite-plugin-svelte': 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@types/cookie': 0.6.0 cookie: 0.6.0 devalue: 5.0.0 @@ -22382,39 +22407,38 @@ snapshots: sade: 1.8.1 set-cookie-parser: 2.6.0 sirv: 2.0.4 - svelte: 4.2.18 + svelte: 5.0.0-next.192 tiny-glob: 0.2.9 vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) - '@sveltejs/package@2.3.1(svelte@4.2.18)(typescript@5.4.2)': + '@sveltejs/package@2.3.1(svelte@5.0.0-next.192)(typescript@5.5.3)': dependencies: chokidar: 3.6.0 kleur: 4.1.5 sade: 1.8.1 semver: 7.6.3 - svelte: 4.2.18 - svelte2tsx: 0.7.1(svelte@4.2.18)(typescript@5.4.2) + svelte: 5.0.0-next.192 + svelte2tsx: 0.7.1(svelte@5.0.0-next.192)(typescript@5.5.3) transitivePeerDependencies: - typescript - '@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': + '@sveltejs/vite-plugin-svelte-inspector@3.0.0-next.3(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + '@sveltejs/vite-plugin-svelte': 4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) debug: 4.3.5(supports-color@6.1.0) - svelte: 4.2.18 + svelte: 5.0.0-next.192 vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': + '@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) + '@sveltejs/vite-plugin-svelte-inspector': 3.0.0-next.3(@sveltejs/vite-plugin-svelte@4.0.0-next.4(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) debug: 4.3.5(supports-color@6.1.0) deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.10 - svelte: 4.2.18 - svelte-hmr: 0.16.0(svelte@4.2.18) + svelte: 5.0.0-next.192 vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) vitefu: 0.2.5(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) transitivePeerDependencies: @@ -22555,17 +22579,6 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/dom@9.3.4': - dependencies: - '@babel/code-frame': 7.24.6 - '@babel/runtime': 7.24.0 - '@types/aria-query': 5.0.3 - aria-query: 5.1.3 - chalk: 4.1.2 - dom-accessibility-api: 0.5.16 - lz-string: 1.5.0 - pretty-format: 27.5.1 - '@testing-library/jest-dom@6.4.6(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: '@adobe/css-tools': 4.4.0 @@ -22589,10 +22602,10 @@ snapshots: '@types/react': types-react@19.0.0-rc.1 '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@testing-library/svelte@5.1.0(svelte@4.2.18)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': + '@testing-library/svelte@5.2.0(svelte@5.0.0-next.192)(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: - '@testing-library/dom': 9.3.4 - svelte: 4.2.18 + '@testing-library/dom': 10.1.0 + svelte: 5.0.0-next.192 optionalDependencies: vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) vitest: 2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) @@ -22937,11 +22950,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/rule-tester@8.0.0-alpha.30(@eslint/eslintrc@3.1.0)(eslint@8.57.0)(typescript@5.4.2)': + '@typescript-eslint/rule-tester@8.0.0-alpha.30(@eslint/eslintrc@3.1.0)(eslint@8.57.0)(typescript@5.5.3)': dependencies: '@eslint/eslintrc': 3.1.0 - '@typescript-eslint/typescript-estree': 8.0.0-alpha.30(typescript@5.4.2) - '@typescript-eslint/utils': 8.0.0-alpha.30(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/typescript-estree': 8.0.0-alpha.30(typescript@5.5.3) + '@typescript-eslint/utils': 8.0.0-alpha.30(eslint@8.57.0)(typescript@5.5.3) ajv: 6.12.6 eslint: 8.57.0 json-stable-stringify-without-jsonify: 1.0.1 @@ -23026,7 +23039,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.0.0-alpha.30(typescript@5.4.2)': + '@typescript-eslint/typescript-estree@8.0.0-alpha.30(typescript@5.5.3)': dependencies: '@typescript-eslint/types': 8.0.0-alpha.30 '@typescript-eslint/visitor-keys': 8.0.0-alpha.30 @@ -23035,9 +23048,9 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.4.2) + ts-api-utils: 1.3.0(typescript@5.5.3) optionalDependencies: - typescript: 5.4.2 + typescript: 5.5.3 transitivePeerDependencies: - supports-color @@ -23063,12 +23076,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.0.0-alpha.30(eslint@8.57.0)(typescript@5.4.2)': + '@typescript-eslint/utils@8.0.0-alpha.30(eslint@8.57.0)(typescript@5.5.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 8.0.0-alpha.30 '@typescript-eslint/types': 8.0.0-alpha.30 - '@typescript-eslint/typescript-estree': 8.0.0-alpha.30(typescript@5.4.2) + '@typescript-eslint/typescript-estree': 8.0.0-alpha.30(typescript@5.5.3) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -23116,8 +23129,8 @@ snapshots: dependencies: '@mapbox/node-pre-gyp': 1.0.11(encoding@0.1.13) '@rollup/pluginutils': 4.2.1 - acorn: 8.11.3 - acorn-import-attributes: 1.9.5(acorn@8.11.3) + acorn: 8.12.1 + acorn-import-attributes: 1.9.5(acorn@8.12.1) async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 @@ -23155,10 +23168,10 @@ snapshots: '@vinxi/plugin-directives@0.3.1(vinxi@0.3.11(@types/node@20.14.10)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: '@babel/parser': 7.24.6 - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) acorn-loose: 8.4.0 - acorn-typescript: 1.4.12(acorn@8.11.3) + acorn-typescript: 1.4.13(acorn@8.12.1) astring: 1.8.6 magicast: 0.2.11 recast: 0.23.4 @@ -23168,9 +23181,9 @@ snapshots: '@vinxi/server-components@0.3.3(vinxi@0.3.11(@types/node@20.14.10)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: '@vinxi/plugin-directives': 0.3.1(vinxi@0.3.11(@types/node@20.14.10)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) - acorn: 8.11.3 + acorn: 8.12.1 acorn-loose: 8.4.0 - acorn-typescript: 1.4.12(acorn@8.11.3) + acorn-typescript: 1.4.13(acorn@8.12.1) astring: 1.8.6 magicast: 0.2.11 recast: 0.23.4 @@ -23179,9 +23192,9 @@ snapshots: '@vinxi/server-functions@0.3.2(vinxi@0.3.11(@types/node@20.14.10)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: '@vinxi/plugin-directives': 0.3.1(vinxi@0.3.11(@types/node@20.14.10)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) - acorn: 8.11.3 + acorn: 8.12.1 acorn-loose: 8.4.0 - acorn-typescript: 1.4.12(acorn@8.11.3) + acorn-typescript: 1.4.13(acorn@8.12.1) astring: 1.8.6 magicast: 0.2.11 recast: 0.23.4 @@ -23207,10 +23220,10 @@ snapshots: vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) vue: 3.4.27(typescript@5.3.3) - '@vitejs/plugin-vue@5.0.4(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vue@3.4.27(typescript@5.4.2))': + '@vitejs/plugin-vue@5.0.4(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vue@3.4.27(typescript@5.5.3))': dependencies: vite: 5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1) - vue: 3.4.27(typescript@5.4.2) + vue: 3.4.27(typescript@5.5.3) '@vitest/coverage-istanbul@2.0.2(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))': dependencies: @@ -23366,9 +23379,9 @@ snapshots: '@vue/compiler-dom': 3.4.27 '@vue/shared': 3.4.27 - '@vue/composition-api@1.7.2(vue@3.4.27(typescript@5.4.2))': + '@vue/composition-api@1.7.2(vue@3.4.27(typescript@5.5.3))': dependencies: - vue: 3.4.27(typescript@5.4.2) + vue: 3.4.27(typescript@5.5.3) '@vue/devtools-api@6.5.1': {} @@ -23399,7 +23412,7 @@ snapshots: optionalDependencies: typescript: 5.3.3 - '@vue/language-core@2.0.26(typescript@5.4.2)': + '@vue/language-core@2.0.26(typescript@5.5.3)': dependencies: '@volar/language-core': 2.4.0-alpha.16 '@vue/compiler-dom': 3.4.27 @@ -23410,7 +23423,7 @@ snapshots: path-browserify: 1.0.1 vue-template-compiler: 2.7.15 optionalDependencies: - typescript: 5.4.2 + typescript: 5.5.3 '@vue/reactivity@3.4.27': dependencies: @@ -23433,11 +23446,11 @@ snapshots: '@vue/shared': 3.4.27 vue: 3.4.27(typescript@5.3.3) - '@vue/server-renderer@3.4.27(vue@3.4.27(typescript@5.4.2))': + '@vue/server-renderer@3.4.27(vue@3.4.27(typescript@5.5.3))': dependencies: '@vue/compiler-ssr': 3.4.27 '@vue/shared': 3.4.27 - vue: 3.4.27(typescript@5.4.2) + vue: 3.4.27(typescript@5.5.3) '@vue/shared@3.4.27': {} @@ -23647,25 +23660,29 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-import-assertions@1.9.0(acorn@8.11.3): + acorn-import-assertions@1.9.0(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 - acorn-import-attributes@1.9.5(acorn@8.11.3): + acorn-import-attributes@1.9.5(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 acorn-jsx@5.3.2(acorn@8.11.3): dependencies: acorn: 8.11.3 + acorn-jsx@5.3.2(acorn@8.12.1): + dependencies: + acorn: 8.12.1 + acorn-loose@8.4.0: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 - acorn-typescript@1.4.12(acorn@8.11.3): + acorn-typescript@1.4.13(acorn@8.12.1): dependencies: - acorn: 8.11.3 + acorn: 8.12.1 acorn@6.4.2: {} @@ -23673,6 +23690,8 @@ snapshots: acorn@8.11.3: {} + acorn@8.12.1: {} + address@1.1.2: {} address@1.2.2: {} @@ -23897,10 +23916,6 @@ snapshots: argparse@2.0.1: {} - aria-query@5.1.3: - dependencies: - deep-equal: 2.2.2 - aria-query@5.3.0: dependencies: dequal: 2.0.3 @@ -24154,6 +24169,8 @@ snapshots: dependencies: dequal: 2.0.3 + axobject-query@4.1.0: {} + b4a@1.6.4: {} babel-core@7.0.0-bridge.0(@babel/core@7.24.6): @@ -24964,14 +24981,6 @@ snapshots: code-block-writer@12.0.0: {} - code-red@1.0.4: - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - '@types/estree': 1.0.5 - acorn: 8.11.3 - estree-walker: 3.0.3 - periscopic: 3.1.0 - collection-visit@1.0.0: dependencies: map-visit: 1.0.0 @@ -25524,11 +25533,6 @@ snapshots: mdn-data: 2.0.14 source-map: 0.6.1 - css-tree@2.3.1: - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.2.0 - css-vendor@2.0.8: dependencies: '@babel/runtime': 7.24.0 @@ -25749,27 +25753,6 @@ snapshots: object-keys: 1.1.1 regexp.prototype.flags: 1.5.2 - deep-equal@2.2.2: - dependencies: - array-buffer-byte-length: 1.0.1 - call-bind: 1.0.7 - es-get-iterator: 1.1.3 - get-intrinsic: 1.2.4 - is-arguments: 1.1.1 - is-array-buffer: 3.0.4 - is-date-object: 1.0.5 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 - isarray: 2.0.5 - object-is: 1.1.5 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.2 - side-channel: 1.0.6 - which-boxed-primitive: 1.0.2 - which-collection: 1.0.1 - which-typed-array: 1.1.15 - deep-extend@0.6.0: {} deep-is@0.1.4: {} @@ -26220,18 +26203,6 @@ snapshots: es-errors@1.3.0: {} - es-get-iterator@1.1.3: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - is-arguments: 1.1.1 - is-map: 2.0.2 - is-set: 2.0.2 - is-string: 1.0.7 - isarray: 2.0.5 - stop-iteration-iterator: 1.0.0 - es-module-lexer@1.5.3: {} es-object-atoms@1.0.0: @@ -26424,6 +26395,8 @@ snapshots: escalade@3.1.1: {} + escalade@3.1.2: {} + escape-html@1.0.3: {} escape-string-regexp@1.0.5: {} @@ -26471,7 +26444,7 @@ snapshots: eslint-plugin-import-x@3.0.1(eslint@8.57.0)(typescript@5.3.3): dependencies: '@rtsao/scc': 1.1.0 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) debug: 4.3.5(supports-color@6.1.0) doctrine: 3.0.0 eslint: 8.57.0 @@ -26535,9 +26508,9 @@ snapshots: '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) '@eslint-react/var': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 7.17.0 + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 eslint: 8.57.0 string-ts: 2.2.0 @@ -26556,10 +26529,10 @@ snapshots: '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) '@eslint-react/var': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 + '@typescript-eslint/scope-manager': 7.17.0 '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 eslint: 8.57.0 string-ts: 2.2.0 @@ -26581,10 +26554,10 @@ snapshots: '@eslint-react/shared': 1.5.17(eslint@8.57.0)(typescript@5.3.3) '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 + '@typescript-eslint/scope-manager': 7.17.0 '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 eslint: 8.57.0 string-ts: 2.2.0 @@ -26607,10 +26580,10 @@ snapshots: '@eslint-react/tools': 1.5.17 '@eslint-react/types': 1.5.17(eslint@8.57.0)(typescript@5.3.3) '@eslint-react/var': 1.5.17(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.16.1 + '@typescript-eslint/scope-manager': 7.17.0 '@typescript-eslint/type-utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/types': 7.16.1 - '@typescript-eslint/utils': 7.16.1(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/utils': 7.17.0(eslint@8.57.0)(typescript@5.3.3) effect: 3.4.5 eslint: 8.57.0 string-ts: 2.2.0 @@ -26621,10 +26594,10 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-svelte@2.42.0(eslint@9.4.0)(svelte@4.2.18): + eslint-plugin-svelte@2.43.0(eslint@9.4.0)(svelte@5.0.0-next.192): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.4.0) - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 eslint: 9.4.0 eslint-compat-utils: 0.5.1(eslint@9.4.0) esutils: 2.0.3 @@ -26634,9 +26607,9 @@ snapshots: postcss-safe-parser: 6.0.0(postcss@8.4.39) postcss-selector-parser: 6.1.0 semver: 7.6.3 - svelte-eslint-parser: 0.40.0(svelte@4.2.18) + svelte-eslint-parser: 0.41.0(svelte@5.0.0-next.192) optionalDependencies: - svelte: 4.2.18 + svelte: 5.0.0-next.192 transitivePeerDependencies: - ts-node @@ -26669,7 +26642,7 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.0.1: + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -26757,9 +26730,9 @@ snapshots: cross-spawn: 7.0.3 debug: 4.3.5(supports-color@6.1.0) escape-string-regexp: 4.0.0 - eslint-scope: 8.0.1 + eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 - espree: 10.0.1 + espree: 10.1.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -26775,7 +26748,7 @@ snapshots: lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.3 + optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 transitivePeerDependencies: @@ -26783,10 +26756,10 @@ snapshots: esm-env@1.0.0: {} - espree@10.0.1: + espree@10.1.0: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 4.0.0 espree@9.6.1: @@ -26803,6 +26776,11 @@ snapshots: dependencies: estraverse: 5.3.0 + esrap@1.2.2: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + '@types/estree': 1.0.5 + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -27277,13 +27255,15 @@ snapshots: flat-cache@4.0.1: dependencies: - flatted: 3.2.9 + flatted: 3.3.1 keyv: 4.5.4 flat@5.0.2: {} flatted@3.2.9: {} + flatted@3.3.1: {} + flatten@1.0.3: {} flattie@1.1.1: {} @@ -27320,7 +27300,7 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@4.1.6(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@4.44.2): + fork-ts-checker-webpack-plugin@4.1.6(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@4.44.2): dependencies: '@babel/code-frame': 7.24.6 chalk: 2.4.2 @@ -27328,7 +27308,7 @@ snapshots: minimatch: 3.1.2 semver: 5.7.2 tapable: 1.1.3 - typescript: 5.4.2 + typescript: 5.5.3 webpack: 4.44.2 worker-rpc: 0.1.1 optionalDependencies: @@ -27337,7 +27317,7 @@ snapshots: transitivePeerDependencies: - supports-color - fork-ts-checker-webpack-plugin@6.5.3(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)): + fork-ts-checker-webpack-plugin@6.5.3(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)): dependencies: '@babel/code-frame': 7.24.6 '@types/json-schema': 7.0.14 @@ -27352,7 +27332,7 @@ snapshots: schema-utils: 2.7.0 semver: 7.6.3 tapable: 1.1.3 - typescript: 5.4.2 + typescript: 5.5.3 webpack: 5.90.3(esbuild@0.19.11) optionalDependencies: eslint: 9.4.0 @@ -28479,8 +28459,6 @@ snapshots: is-lambda@1.0.1: {} - is-map@2.0.2: {} - is-module@1.0.0: {} is-nan@1.3.2: @@ -28557,8 +28535,6 @@ snapshots: is-root@2.1.0: {} - is-set@2.0.2: {} - is-shared-array-buffer@1.0.3: dependencies: call-bind: 1.0.7 @@ -28599,17 +28575,10 @@ snapshots: dependencies: is-invalid-path: 0.1.0 - is-weakmap@2.0.1: {} - is-weakref@1.0.2: dependencies: call-bind: 1.0.7 - is-weakset@2.0.2: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - is-what@3.14.1: {} is-what@4.1.15: {} @@ -29381,7 +29350,7 @@ snapshots: magic-string@0.30.8: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 magicast@0.2.11: dependencies: @@ -29609,8 +29578,6 @@ snapshots: mdn-data@2.0.14: {} - mdn-data@2.0.30: {} - mdn-data@2.0.4: {} mdurl@2.0.0: {} @@ -30177,7 +30144,7 @@ snapshots: mlly@1.6.1: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 pathe: 1.1.2 pkg-types: 1.0.3 ufo: 1.5.3 @@ -30980,6 +30947,15 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + ora@3.4.0: dependencies: chalk: 2.4.2 @@ -31301,12 +31277,6 @@ snapshots: performance-now@2.1.0: {} - periscopic@3.1.0: - dependencies: - '@types/estree': 1.0.5 - estree-walker: 3.0.3 - is-reference: 3.0.2 - picocolors@0.2.1: {} picocolors@1.0.1: {} @@ -31368,9 +31338,9 @@ snapshots: pngjs@3.4.0: {} - pnp-webpack-plugin@1.6.4(typescript@5.4.2): + pnp-webpack-plugin@1.6.4(typescript@5.5.3): dependencies: - ts-pnp: 1.2.0(typescript@5.4.2) + ts-pnp: 1.2.0(typescript@5.5.3) transitivePeerDependencies: - typescript @@ -32284,10 +32254,10 @@ snapshots: prepend-http@1.0.4: {} - prettier-plugin-svelte@3.2.3(prettier@4.0.0-alpha.8)(svelte@4.2.18): + prettier-plugin-svelte@3.2.3(prettier@4.0.0-alpha.8)(svelte@5.0.0-next.192): dependencies: prettier: 4.0.0-alpha.8 - svelte: 4.2.18 + svelte: 5.0.0-next.192 prettier@3.3.2: optional: true @@ -32523,7 +32493,7 @@ snapshots: regenerator-runtime: 0.13.11 whatwg-fetch: 3.6.19 - react-dev-utils@11.0.4(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@4.44.2): + react-dev-utils@11.0.4(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@4.44.2): dependencies: '@babel/code-frame': 7.10.4 address: 1.1.2 @@ -32534,7 +32504,7 @@ snapshots: escape-string-regexp: 2.0.0 filesize: 6.1.0 find-up: 4.1.0 - fork-ts-checker-webpack-plugin: 4.1.6(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@4.44.2) + fork-ts-checker-webpack-plugin: 4.1.6(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@4.44.2) global-modules: 2.0.0 globby: 11.0.1 gzip-size: 5.1.1 @@ -32551,13 +32521,13 @@ snapshots: text-table: 0.2.0 webpack: 4.44.2 optionalDependencies: - typescript: 5.4.2 + typescript: 5.5.3 transitivePeerDependencies: - eslint - supports-color - vue-template-compiler - react-dev-utils@12.0.1(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)): + react-dev-utils@12.0.1(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)): dependencies: '@babel/code-frame': 7.24.6 address: 1.2.2 @@ -32568,7 +32538,7 @@ snapshots: escape-string-regexp: 4.0.0 filesize: 8.0.7 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)) + fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)) global-modules: 2.0.0 globby: 11.1.0 gzip-size: 6.0.0 @@ -32585,7 +32555,7 @@ snapshots: text-table: 0.2.0 webpack: 5.90.3(esbuild@0.19.11) optionalDependencies: - typescript: 5.4.2 + typescript: 5.5.3 transitivePeerDependencies: - eslint - supports-color @@ -32773,7 +32743,7 @@ snapshots: '@remix-run/router': 1.16.1 react: 19.0.0-rc-4c2e457c7c-20240522 - react-scripts@4.0.3(@types/webpack@4.41.35)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(sass@1.71.1)(sockjs-client@1.6.1)(typescript@5.4.2)(vue-template-compiler@2.7.15): + react-scripts@4.0.3(@types/webpack@4.41.35)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(sass@1.71.1)(sockjs-client@1.6.1)(typescript@5.5.3)(vue-template-compiler@2.7.15): dependencies: '@babel/core': 7.12.3 '@pmmmwh/react-refresh-webpack-plugin': 0.4.3(@types/webpack@4.41.35)(react-refresh@0.8.3)(sockjs-client@1.6.1)(webpack-dev-server@3.11.1(webpack@4.44.2))(webpack@4.44.2) @@ -32795,7 +32765,7 @@ snapshots: identity-obj-proxy: 3.0.0 mini-css-extract-plugin: 0.11.3(webpack@4.44.2) optimize-css-assets-webpack-plugin: 5.0.4(webpack@4.44.2) - pnp-webpack-plugin: 1.6.4(typescript@5.4.2) + pnp-webpack-plugin: 1.6.4(typescript@5.5.3) postcss-flexbugs-fixes: 4.2.1 postcss-loader: 3.0.0 postcss-normalize: 8.0.1 @@ -32804,7 +32774,7 @@ snapshots: prompts: 2.4.0 react: 19.0.0-rc-4c2e457c7c-20240522 react-app-polyfill: 2.0.0 - react-dev-utils: 11.0.4(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@4.44.2) + react-dev-utils: 11.0.4(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@4.44.2) react-refresh: 0.8.3 resolve: 1.18.1 resolve-url-loader: 3.1.5 @@ -32812,7 +32782,7 @@ snapshots: semver: 7.3.2 style-loader: 1.3.0(webpack@4.44.2) terser-webpack-plugin: 4.2.3(webpack@4.44.2) - ts-pnp: 1.2.0(typescript@5.4.2) + ts-pnp: 1.2.0(typescript@5.5.3) url-loader: 4.1.1(file-loader@6.1.1(webpack@4.44.2))(webpack@4.44.2) webpack: 4.44.2 webpack-dev-server: 3.11.1(webpack@4.44.2) @@ -32820,7 +32790,7 @@ snapshots: workbox-webpack-plugin: 5.1.4(webpack@4.44.2) optionalDependencies: fsevents: 2.3.3 - typescript: 5.4.2 + typescript: 5.5.3 transitivePeerDependencies: - '@types/webpack' - bluebird @@ -32838,7 +32808,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@types/babel__core@7.20.5)(@types/webpack@4.41.35)(esbuild@0.19.11)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(rework-visit@1.0.0)(rework@1.0.1)(sass@1.71.1)(sockjs-client@1.6.1)(type-fest@4.10.2)(typescript@5.4.2)(vue-template-compiler@2.7.15): + react-scripts@5.0.1(@types/babel__core@7.20.5)(@types/webpack@4.41.35)(esbuild@0.19.11)(eslint@9.4.0)(react@19.0.0-rc-4c2e457c7c-20240522)(rework-visit@1.0.0)(rework@1.0.1)(sass@1.71.1)(sockjs-client@1.6.1)(type-fest@4.10.2)(typescript@5.5.3)(vue-template-compiler@2.7.15): dependencies: '@babel/core': 7.24.6 '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(@types/webpack@4.41.35)(react-refresh@0.11.0)(sockjs-client@1.6.1)(type-fest@4.10.2)(webpack-dev-server@4.15.1(webpack@5.90.3(esbuild@0.19.11)))(webpack@5.90.3(esbuild@0.19.11)) @@ -32869,7 +32839,7 @@ snapshots: prompts: 2.4.2 react: 19.0.0-rc-4c2e457c7c-20240522 react-app-polyfill: 3.0.0 - react-dev-utils: 12.0.1(eslint@9.4.0)(typescript@5.4.2)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)) + react-dev-utils: 12.0.1(eslint@9.4.0)(typescript@5.5.3)(vue-template-compiler@2.7.15)(webpack@5.90.3(esbuild@0.19.11)) react-refresh: 0.11.0 resolve: 1.22.8 resolve-url-loader: 4.0.0(rework-visit@1.0.0)(rework@1.0.1) @@ -32885,7 +32855,7 @@ snapshots: workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.90.3(esbuild@0.19.11)) optionalDependencies: fsevents: 2.3.3 - typescript: 5.4.2 + typescript: 5.5.3 transitivePeerDependencies: - '@parcel/css' - '@rspack/core' @@ -33967,7 +33937,7 @@ snapshots: sorcery@0.11.0: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 buffer-crc32: 0.2.13 minimist: 1.2.8 sander: 0.5.1 @@ -34136,10 +34106,6 @@ snapshots: stdin-discarder@0.2.2: {} - stop-iteration-iterator@1.0.0: - dependencies: - internal-slot: 1.0.7 - stream-browserify@2.0.2: dependencies: inherits: 2.0.4 @@ -34311,7 +34277,7 @@ snapshots: strip-literal@1.3.0: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 strnum@1.0.5: {} @@ -34420,14 +34386,14 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-check@3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18): + svelte-check@3.8.4(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192): dependencies: '@jridgewell/trace-mapping': 0.3.25 chokidar: 3.6.0 picocolors: 1.0.1 sade: 1.8.1 - svelte: 4.2.18 - svelte-preprocess: 5.1.3(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18)(typescript@5.3.3) + svelte: 5.0.0-next.192 + svelte-preprocess: 5.1.3(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192)(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: - '@babel/core' @@ -34440,7 +34406,7 @@ snapshots: - stylus - sugarss - svelte-eslint-parser@0.40.0(svelte@4.2.18): + svelte-eslint-parser@0.41.0(svelte@5.0.0-next.192): dependencies: eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 @@ -34448,20 +34414,16 @@ snapshots: postcss: 8.4.39 postcss-scss: 4.0.9(postcss@8.4.39) optionalDependencies: - svelte: 4.2.18 - - svelte-hmr@0.16.0(svelte@4.2.18): - dependencies: - svelte: 4.2.18 + svelte: 5.0.0-next.192 - svelte-preprocess@5.1.3(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@4.2.18)(typescript@5.3.3): + svelte-preprocess@5.1.3(@babel/core@7.24.6)(less@4.2.0)(postcss-load-config@4.0.2(postcss@8.4.39))(postcss@8.4.39)(sass@1.71.1)(svelte@5.0.0-next.192)(typescript@5.3.3): dependencies: '@types/pug': 2.0.8 detect-indent: 6.1.0 magic-string: 0.30.10 sorcery: 0.11.0 strip-indent: 3.0.0 - svelte: 4.2.18 + svelte: 5.0.0-next.192 optionalDependencies: '@babel/core': 7.24.6 less: 4.2.0 @@ -34470,29 +34432,28 @@ snapshots: sass: 1.71.1 typescript: 5.3.3 - svelte2tsx@0.7.1(svelte@4.2.18)(typescript@5.4.2): + svelte2tsx@0.7.1(svelte@5.0.0-next.192)(typescript@5.5.3): dependencies: dedent-js: 1.0.1 pascal-case: 3.1.2 - svelte: 4.2.18 - typescript: 5.4.2 + svelte: 5.0.0-next.192 + typescript: 5.5.3 - svelte@4.2.18: + svelte@5.0.0-next.192: dependencies: '@ampproject/remapping': 2.3.0 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/sourcemap-codec': 1.5.0 '@types/estree': 1.0.5 - acorn: 8.11.3 + acorn: 8.12.1 + acorn-typescript: 1.4.13(acorn@8.12.1) aria-query: 5.3.0 - axobject-query: 4.0.0 - code-red: 1.0.4 - css-tree: 2.3.1 - estree-walker: 3.0.3 + axobject-query: 4.1.0 + esm-env: 1.0.0 + esrap: 1.2.2 is-reference: 3.0.2 locate-character: 3.0.0 magic-string: 0.30.10 - periscopic: 3.1.0 + zimmerframe: 1.1.2 svg-parser@2.0.4: {} @@ -34667,7 +34628,7 @@ snapshots: terser@4.8.1: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 commander: 2.20.3 source-map: 0.6.1 source-map-support: 0.5.21 @@ -34675,7 +34636,7 @@ snapshots: terser@5.29.1: dependencies: '@jridgewell/source-map': 0.3.5 - acorn: 8.11.3 + acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 @@ -34862,9 +34823,9 @@ snapshots: dependencies: typescript: 5.3.3 - ts-api-utils@1.3.0(typescript@5.4.2): + ts-api-utils@1.3.0(typescript@5.5.3): dependencies: - typescript: 5.4.2 + typescript: 5.5.3 ts-expose-internals-conditionally@1.0.0-empty.0: {} @@ -34877,9 +34838,9 @@ snapshots: ts-pattern@5.2.0: {} - ts-pnp@1.2.0(typescript@5.4.2): + ts-pnp@1.2.0(typescript@5.5.3): optionalDependencies: - typescript: 5.4.2 + typescript: 5.5.3 ts-toolbelt@9.6.0: {} @@ -34895,10 +34856,13 @@ snapshots: tslib@2.6.2: {} - tsup-preset-solid@2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.4.2)): + tslib@2.6.3: + optional: true + + tsup-preset-solid@2.2.0(esbuild@0.21.3)(solid-js@1.8.17)(tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.5.3)): dependencies: esbuild-plugin-solid: 0.5.0(esbuild@0.21.3)(solid-js@1.8.17) - tsup: 8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.4.2) + tsup: 8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.5.3) transitivePeerDependencies: - esbuild - solid-js @@ -34928,7 +34892,7 @@ snapshots: - supports-color - ts-node - tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.4.2): + tsup@8.0.2(@microsoft/api-extractor@7.46.2(@types/node@20.14.10))(postcss@8.4.39)(typescript@5.5.3): dependencies: bundle-require: 4.0.2(esbuild@0.19.11) cac: 6.7.14 @@ -34947,7 +34911,7 @@ snapshots: optionalDependencies: '@microsoft/api-extractor': 7.46.2(@types/node@20.14.10) postcss: 8.4.39 - typescript: 5.4.2 + typescript: 5.5.3 transitivePeerDependencies: - supports-color - ts-node @@ -35094,6 +35058,8 @@ snapshots: typescript@5.4.2: {} + typescript@5.5.3: {} + ua-parser-js@1.0.36: {} uc.micro@2.1.0: {} @@ -35113,7 +35079,7 @@ snapshots: unctx@2.3.1: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 estree-walker: 3.0.3 magic-string: 0.30.10 unplugin: 1.10.1 @@ -35176,7 +35142,7 @@ snapshots: unimport@3.7.1(rollup@4.14.1): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.14.1) - acorn: 8.11.3 + acorn: 8.12.1 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 fast-glob: 3.3.2 @@ -35301,7 +35267,7 @@ snapshots: unplugin@1.10.1: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 chokidar: 3.6.0 webpack-sources: 3.2.3 webpack-virtual-modules: 0.6.1 @@ -35786,11 +35752,11 @@ snapshots: vscode-uri@3.0.8: {} - vue-demi@0.14.7(@vue/composition-api@1.7.2(vue@3.4.27(typescript@5.4.2)))(vue@3.4.27(typescript@5.4.2)): + vue-demi@0.14.7(@vue/composition-api@1.7.2(vue@3.4.27(typescript@5.5.3)))(vue@3.4.27(typescript@5.5.3)): dependencies: - vue: 3.4.27(typescript@5.4.2) + vue: 3.4.27(typescript@5.5.3) optionalDependencies: - '@vue/composition-api': 1.7.2(vue@3.4.27(typescript@5.4.2)) + '@vue/composition-api': 1.7.2(vue@3.4.27(typescript@5.5.3)) vue-eslint-parser@9.4.3(eslint@9.4.0): dependencies: @@ -35824,12 +35790,12 @@ snapshots: semver: 7.6.3 typescript: 5.3.3 - vue-tsc@2.0.26(typescript@5.4.2): + vue-tsc@2.0.26(typescript@5.5.3): dependencies: '@volar/typescript': 2.4.0-alpha.16 - '@vue/language-core': 2.0.26(typescript@5.4.2) + '@vue/language-core': 2.0.26(typescript@5.5.3) semver: 7.6.3 - typescript: 5.4.2 + typescript: 5.5.3 vue@2.6.0: {} @@ -35848,15 +35814,15 @@ snapshots: optionalDependencies: typescript: 5.3.3 - vue@3.4.27(typescript@5.4.2): + vue@3.4.27(typescript@5.5.3): dependencies: '@vue/compiler-dom': 3.4.27 '@vue/compiler-sfc': 3.4.27 '@vue/runtime-dom': 3.4.27 - '@vue/server-renderer': 3.4.27(vue@3.4.27(typescript@5.4.2)) + '@vue/server-renderer': 3.4.27(vue@3.4.27(typescript@5.5.3)) '@vue/shared': 3.4.27 optionalDependencies: - typescript: 5.4.2 + typescript: 5.5.3 w3c-xmlserializer@5.0.0: dependencies: @@ -36106,8 +36072,8 @@ snapshots: '@webassemblyjs/ast': 1.11.6 '@webassemblyjs/wasm-edit': 1.11.6 '@webassemblyjs/wasm-parser': 1.11.6 - acorn: 8.11.3 - acorn-import-assertions: 1.9.0(acorn@8.11.3) + acorn: 8.12.1 + acorn-import-assertions: 1.9.0(acorn@8.12.1) browserslist: 4.23.0 chrome-trace-event: 1.0.3 enhanced-resolve: 5.17.0 @@ -36180,13 +36146,6 @@ snapshots: is-string: 1.0.7 is-symbol: 1.0.4 - which-collection@1.0.1: - dependencies: - is-map: 2.0.2 - is-set: 2.0.2 - is-weakmap: 2.0.1 - is-weakset: 2.0.2 - which-module@2.0.1: {} which-pm-runs@1.1.0: {} @@ -36612,7 +36571,7 @@ snapshots: yargs@16.2.0: dependencies: cliui: 7.0.4 - escalade: 3.1.1 + escalade: 3.1.2 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -36651,6 +36610,8 @@ snapshots: dependencies: grammex: 3.1.3 + zimmerframe@1.1.2: {} + zip-stream@6.0.1: dependencies: archiver-utils: 5.0.2