* chore(svelte-query*): type check on TS 5.6-5.9 and 7.0 with 'tsconfig.legacy.json' like other packages
* chore(svelte-query*): run 'svelte-check' with each TypeScript version for TS 5.6-5.9 instead of 'tsc'
* chore(svelte-query*): use descriptive names in the 'svelte-check' TypeScript swap scripts
* chore(svelte-query*): fail the versioned type checks when 'svelte-check' does not load the swapped TypeScript
* test(svelte-query): remove blank lines between actions, waits and their assertions
* test(svelte-query/createQuery): add blank lines around 'queryClient' calls
* test(svelte-query-devtools): remove blank lines between 'vi.dynamicImportSettled' and its assertions
* test({svelte-query,svelte-query-devtools}): separate actions after assertions and add blank lines after 'render'
* test(svelte-query): advance timers by the time the awaited work takes
* test(svelte-query/createQuery): keep the intentional 100ms wait in the disabled query invalidation test
* test(svelte-query/createInfiniteQuery): add tests for 'initialData' with a failed refetch and an infinite query waiting on 'skipToken'
* test(svelte-query/createInfiniteQuery): advance timers by the minimum 10ms in the 'initialData' and 'skipToken' tests
* docs({react-query,preact-query,solid-query,svelte-query}/README): point the CI badge at the 'release.yml' workflow on 'main'
* docs({react-query,preact-query,solid-query,svelte-query}/README): add alt text to the release badge
* docs(svelte-query/useMutationState): replace 'hook instance' with 'createMutation' call in JSDoc
* docs(svelte-query/useMutationState): align the JSDoc description with the other adapters
* docs(svelte-query): add package README
Every other adapter (react, preact, solid, vue, lit, angular) ships a
README; svelte-query did not, so its npm page is empty. Copied from
solid-query, which uses the ci badge that still resolves.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs(svelte-query): fix the CI link encoding and point the downloads badge at this package
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs(svelte-query/README): replace 'Primitives' with 'Functions' in the description
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
* fix(svelte-query/{createQuery,queryOptions}): correct the overload selected for 'initialData'
* test(svelte-query/queryOptions): use a non-literal condition instead of a wrapper function in the optional 'initialData' object test
* docs(svelte-query/{createInfiniteQuery,infiniteQueryOptions}): describe overload selection by whether 'initialData' is known to be defined
* docs(svelte-query): regenerate reference docs
* fix: support async Svelte
Svelte 5 now supports async await in components. One behavior there is that when a component is created as part of a boundary that has pending async work, its `$effect`s will not run until that async work is done.
The way the code is written right now means you can end up in an infinite pending state: If you do `await someQuery.promise`, the `$effect` for the subscription will never run, and therefore the `await` will never resolve. This PR fixes it.
* lint
* fix
---------
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
* chore: update type tests to use new query methods, types
* chore: disallow future calls to deprecated methods
* fix(eslint): detect computed query method calls
- Match bracket notation for deprecated query client methods
* test(vue-query/useQuery): add type test for inferring the result type from a generic 'queryFn'
* test(svelte-query/createQuery): add type test for inferring the result type from a generic 'queryFn'
* test(svelte-query/createMutation): add tests for 'onSuccess'/'onError'/'onSettled' callbacks and result timing after 'mutateAsync'
* test(svelte-query/createMutation): use 'noop' instead of an empty callback for the ignored rejection
* test(svelte-query/createMutation): assert 'mutateAsync' awaits the hook-level callback's returned promise
* test(svelte-query/createMutation): assert 'onSettled' also awaits the hook-level callback's returned promise