* fix: make sure pausedMutations always execute in serial
when resumePausedMutations is called multiple times, we are starting the second paused mutation even though the first one has not yet finished. This can happen when a focus event and an online event happen in short succession
* fix: always return the same Promise when resumePausedMutations is called
* fix(core): make sure queries that never fetched can ge garbage collected
This is important if data comes into the cache via a non-fetching method (like setQueryData or hydration) AND there is no active observer for them. Without this, they would never be gc'ed, but they should be after the default cacheTime
* tests: simplify svelte test
* test: add mutation callback after unmount test
* test: make test more resilient
* fix(core): do not call mutate callbacks if mutation started after unmount
* test: adapt tests to what we have in v5
- one test has been removed (because setState was removed entirely)
- the second test has been re-written to not use internals anymore, and it works in v4 as well
* fix(core): do not call mutate callbacks if mutation started after unmount
by making sure the callbacks are only invoked if we have an active listener
* chore: prettier again
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Add some default options
* Rewrite hydration example
* Run prettier
* Rename example to SSR
* Add recommended SvelteKit setup
* Rework infinite scroll in sveltekit
* Add SvelteKit note to overview
* Switch basic example to sveltekit
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Use rimraf for clean script
Supported on windows
* Restructure jest tests, types test, and building types
* Relative eslint and jest paths are not needed
Now works on windows too, and tested to make sure it doesn't break linux
* Run codemod tests from main jest.config.ts
--collectCoverage false breaks when passed in to the union of these
* Remove unused test:lib scripts
* Add prettier-plugin-svelte
* Call test:types in github workflow
* Add missing build:types to query-async-storage-persister
* Build without sveltekit
* Update vite-plugin-svelte to 2.0
* Add dev/watch script to svelte-query
* Replace sveltePreprocess with vitePreprocess
* Fix example component and indentation
* Remove dev/watch
Breaks setup because it adds package.json that isn't removed by rimraf
* Move /src/lib to /src, ignore __tests__ in build
* Fix tsconfig included files
* Replace tabs with spaces
* Whoops messed up merge
* Add more tsconfig.json settings
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
* Use rimraf for clean script
Supported on windows
* Restructure jest tests, types test, and building types
* Relative eslint and jest paths are not needed
Now works on windows too, and tested to make sure it doesn't break linux
* Run codemod tests from main jest.config.ts
--collectCoverage false breaks when passed in to the union of these
* Remove unused test:lib scripts
* Add prettier-plugin-svelte
* Call test:types in github workflow
* Add missing build:types to query-async-storage-persister
* Simplify build script
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>