* fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports
* chore(.changeset/export-type-star-adapters): trim redundant PR cross-reference from changeset body
Replace prettier with oxfmt
The options and ignores have been ported to the `.oxfmtrc.json` file (oxfmt `printWidth` default is 100 characters, so preserving 80 for now). While the configuration with Prettier is the same, oxfmt seems to modify some things slightly differently, apparently due to the use of a pre-3.9 Prettier layout for union types that break onto their own line so we still end up with about 30 files changed.
Files with actual changes are:
- `.prettierignore`.`prettier.config.js`: Deleted. Replaced with `.oxfmtrc.json`
- `package.json`: `format` script changed to `oxfmt`. Added `oxfmt` and `svelte` as `devDependencies`; removed `prettier` and `prettier-plugin-svelte`.
- `pnpm-lock.yaml`: Lockfile update for the dependency changes above.
- `scripts/generate-labeler-config.ts`: Formats with oxfmt's `format()` API instead of Prettier's. It reads `.oxfmtrc.json` itself, because the API doesn't find config files on its own, and throws if formatting reports errors. Its output is identical to what Prettier produced.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore: replace eslint with oxlint
Migrates to oxlint as the replacement linter for eslint.
Keeps the existing ruleset, runs js plugins for non-native oxlint rules and the local no-restricted-syntax plugin
Svelte packages keep a slim ESLint config for the svelte/* rules, which need the component template.
React examples that use the query eslint plugin also still use eslint for now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: use oxlint disable directives
ESLint no longer lints these files, so switch eslint-disable comments to
oxlint-disable and the @typescript-eslint/ prefix to typescript/. Remove
directives that oxlint reports as unused, and name the rule in the
cspell oxlint-enable comments, which oxlint does not match to a
rule-specific disable otherwise.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: lint expectTypeOf with vitest valid-expect
Oxlint's native vitest/valid-expect only checks `expect` calls, so load
@vitest/eslint-plugin as a JS plugin for this rule to keep flagging
`expectTypeOf` calls without a matcher, and restore the directives for
the intentional ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* docs(svelte-query): add JSDoc to the exported classes, methods, and arrow functions
* docs(svelte-query/utils): describe that 'watchChanges' runs on every change of the state its sources read
* test(*): start test titles with 'should'
* test(*): start the remaining test titles with 'should'
* test(eslint-plugin-query): start 'it.each' titles with 'should'
* test({react,preact}-query/useSuspenseQueries): fix title to match the assertion that 'TData' excludes 'undefined'
* 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>